(function(A,Au){typeof exports=="object"&&typeof module<"u"?module.exports=Au(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],Au):(A=typeof globalThis<"u"?globalThis:A||self,A["InvokeAI UI"]=Au(A.React,A.ReactDOM))})(this,function(A,Au){"use strict";function fq(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function hq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const gt=fq(A);var Bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pq(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v={},mq={get exports(){return v},set exports(e){v=e}},Rb={};/** * @license React * react-jsx-runtime.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 TM;function vq(){if(TM)return Rb;TM=1;var e=A,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,c,d){var p,g={},S=null,w=null;d!==void 0&&(S=""+d),c.key!==void 0&&(S=""+c.key),c.ref!==void 0&&(w=c.ref);for(p in c)r.call(c,p)&&!a.hasOwnProperty(p)&&(g[p]=c[p]);if(s&&s.defaultProps)for(p in c=s.defaultProps,c)g[p]===void 0&&(g[p]=c[p]);return{$$typeof:t,type:s,key:S,ref:w,props:g,_owner:i.current}}return Rb.Fragment=n,Rb.jsx=o,Rb.jsxs=o,Rb}var Nb={};/** * @license React * react-jsx-runtime.development.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 kM;function gq(){return kM||(kM=1,process.env.NODE_ENV!=="production"&&function(){var e=A,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),C=Symbol.iterator,k="@@iterator";function P(pe){if(pe===null||typeof pe!="object")return null;var dt=C&&pe[C]||pe[k];return typeof dt=="function"?dt:null}var D=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(pe){{for(var dt=arguments.length,Pt=new Array(dt>1?dt-1:0),on=1;on=1&&Mr>=0&&Ln[Dr]!==Ei[Mr];)Mr--;for(;Dr>=1&&Mr>=0;Dr--,Mr--)if(Ln[Dr]!==Ei[Mr]){if(Dr!==1||Mr!==1)do if(Dr--,Mr--,Mr<0||Ln[Dr]!==Ei[Mr]){var fi=` `+Ln[Dr].replace(" at new "," at ");return pe.displayName&&fi.includes("")&&(fi=fi.replace("",pe.displayName)),typeof pe=="function"&&St.set(pe,fi),fi}while(Dr>=1&&Mr>=0);break}}}finally{vt=!1,Te.current=An,Me(),Error.prepareStackTrace=er}var co=pe?pe.displayName||pe.name:"",ru=co?Qe(co):"";return typeof pe=="function"&&St.set(pe,ru),ru}function Lt(pe,dt,Pt){return Ce(pe,!1)}function De(pe){var dt=pe.prototype;return!!(dt&&dt.isReactComponent)}function wt(pe,dt,Pt){if(pe==null)return"";if(typeof pe=="function")return Ce(pe,De(pe));if(typeof pe=="string")return Qe(pe);switch(pe){case d:return Qe("Suspense");case p:return Qe("SuspenseList")}if(typeof pe=="object")switch(pe.$$typeof){case c:return Lt(pe.render);case g:return wt(pe.type,dt,Pt);case S:{var on=pe,er=on._payload,An=on._init;try{return wt(An(er),dt,Pt)}catch{}}}return""}var ln=Object.prototype.hasOwnProperty,Wt={},Rn=D.ReactDebugCurrentFrame;function ar(pe){if(pe){var dt=pe._owner,Pt=wt(pe.type,pe._source,dt?dt.type:null);Rn.setExtraStackFrame(Pt)}else Rn.setExtraStackFrame(null)}function xe(pe,dt,Pt,on,er){{var An=Function.call.bind(ln);for(var Fn in pe)if(An(pe,Fn)){var Ln=void 0;try{if(typeof pe[Fn]!="function"){var Ei=Error((on||"React class")+": "+Pt+" type `"+Fn+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof pe[Fn]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ei.name="Invariant Violation",Ei}Ln=pe[Fn](dt,Fn,on,Pt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Dr){Ln=Dr}Ln&&!(Ln instanceof Error)&&(ar(er),M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",on||"React class",Pt,Fn,typeof Ln),ar(null)),Ln instanceof Error&&!(Ln.message in Wt)&&(Wt[Ln.message]=!0,ar(er),M("Failed %s type: %s",Pt,Ln.message),ar(null))}}}var it=Array.isArray;function at(pe){return it(pe)}function bt(pe){{var dt=typeof Symbol=="function"&&Symbol.toStringTag,Pt=dt&&pe[Symbol.toStringTag]||pe.constructor.name||"Object";return Pt}}function Ve(pe){try{return ot(pe),!1}catch{return!0}}function ot(pe){return""+pe}function Jt(pe){if(Ve(pe))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",bt(pe)),ot(pe)}var rn=D.ReactCurrentOwner,$e={key:!0,ref:!0,__self:!0,__source:!0},an,Nn,st;st={};function Ge(pe){if(ln.call(pe,"ref")){var dt=Object.getOwnPropertyDescriptor(pe,"ref").get;if(dt&&dt.isReactWarning)return!1}return pe.ref!==void 0}function mt(pe){if(ln.call(pe,"key")){var dt=Object.getOwnPropertyDescriptor(pe,"key").get;if(dt&&dt.isReactWarning)return!1}return pe.key!==void 0}function Ft(pe,dt){if(typeof pe.ref=="string"&&rn.current&&dt&&rn.current.stateNode!==dt){var Pt=X(rn.current.type);st[Pt]||(M('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',X(rn.current.type),pe.ref),st[Pt]=!0)}}function In(pe,dt){{var Pt=function(){an||(an=!0,M("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",dt))};Pt.isReactWarning=!0,Object.defineProperty(pe,"key",{get:Pt,configurable:!0})}}function Hn(pe,dt){{var Pt=function(){Nn||(Nn=!0,M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",dt))};Pt.isReactWarning=!0,Object.defineProperty(pe,"ref",{get:Pt,configurable:!0})}}var jt=function(pe,dt,Pt,on,er,An,Fn){var Ln={$$typeof:t,type:pe,key:dt,ref:Pt,props:Fn,_owner:An};return Ln._store={},Object.defineProperty(Ln._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ln,"_self",{configurable:!1,enumerable:!1,writable:!1,value:on}),Object.defineProperty(Ln,"_source",{configurable:!1,enumerable:!1,writable:!1,value:er}),Object.freeze&&(Object.freeze(Ln.props),Object.freeze(Ln)),Ln};function zt(pe,dt,Pt,on,er){{var An,Fn={},Ln=null,Ei=null;Pt!==void 0&&(Jt(Pt),Ln=""+Pt),mt(dt)&&(Jt(dt.key),Ln=""+dt.key),Ge(dt)&&(Ei=dt.ref,Ft(dt,er));for(An in dt)ln.call(dt,An)&&!$e.hasOwnProperty(An)&&(Fn[An]=dt[An]);if(pe&&pe.defaultProps){var Dr=pe.defaultProps;for(An in Dr)Fn[An]===void 0&&(Fn[An]=Dr[An])}if(Ln||Ei){var Mr=typeof pe=="function"?pe.displayName||pe.name||"Unknown":pe;Ln&&In(Fn,Mr),Ei&&Hn(Fn,Mr)}return jt(pe,Ln,Ei,er,on,rn.current,Fn)}}var vr=D.ReactCurrentOwner,gr=D.ReactDebugCurrentFrame;function hn(pe){if(pe){var dt=pe._owner,Pt=wt(pe.type,pe._source,dt?dt.type:null);gr.setExtraStackFrame(Pt)}else gr.setExtraStackFrame(null)}var ri;ri=!1;function qs(pe){return typeof pe=="object"&&pe!==null&&pe.$$typeof===t}function lo(){{if(vr.current){var pe=X(vr.current.type);if(pe)return` Check the render method of \``+pe+"`."}return""}}function Yn(pe){{if(pe!==void 0){var dt=pe.fileName.replace(/^.*[\\\/]/,""),Pt=pe.lineNumber;return` Check your code at `+dt+":"+Pt+"."}return""}}var Ro={};function uo(pe){{var dt=lo();if(!dt){var Pt=typeof pe=="string"?pe:pe.displayName||pe.name;Pt&&(dt=` Check the top-level render call using <`+Pt+">.")}return dt}}function Zo(pe,dt){{if(!pe._store||pe._store.validated||pe.key!=null)return;pe._store.validated=!0;var Pt=uo(dt);if(Ro[Pt])return;Ro[Pt]=!0;var on="";pe&&pe._owner&&pe._owner!==vr.current&&(on=" It was passed a child from "+X(pe._owner.type)+"."),hn(pe),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Pt,on),hn(null)}}function La(pe,dt){{if(typeof pe!="object")return;if(at(pe))for(var Pt=0;Pt",Ln=" Did you accidentally export a JSX literal instead of a component?"):Dr=typeof pe,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Dr,Ln)}var Mr=zt(pe,dt,Pt,er,An);if(Mr==null)return Mr;if(Fn){var fi=dt.children;if(fi!==void 0)if(on)if(at(fi)){for(var co=0;co"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:s;return _T.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,_T}var TT={};/** * @license React * use-sync-external-store-shim.development.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 AM;function Sq(){return AM||(AM=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=A,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(R){{for(var L=arguments.length,z=new Array(L>1?L-1:0),U=1;UMM=e,Tq=()=>MM,Ff=A.createContext(null);process.env.NODE_ENV!=="production"&&(Ff.displayName="ReactRedux");function jM(){const e=A.useContext(Ff);if(process.env.NODE_ENV!=="production"&&!e)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a ");return e}let IM=()=>{throw new Error("uSES not initialized!")};const kq=e=>{IM=e},Pq=(e,t)=>e===t;function Aq(e=Ff){const t=e===Ff?jM:()=>A.useContext(e);return function(r,i=Pq){if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof i!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:a,subscription:o,getServerState:s}=t(),c=IM(o.addNestedSub,a.getState,s||a.getState,r,i);return A.useDebugValue(c),c}}const Oq=Aq();function Uf(){return Uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var Lb={},Dq={get exports(){return Lb},set exports(e){Lb=e}},Hr={};/** @license React v16.13.1 * 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 RM;function Mq(){if(RM)return Hr;RM=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,S=e?Symbol.for("react.suspense_list"):60120,w=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function R(z){if(typeof z=="object"&&z!==null){var U=z.$$typeof;switch(U){case t:switch(z=z.type,z){case c:case d:case r:case a:case i:case g:return z;default:switch(z=z&&z.$$typeof,z){case s:case p:case C:case w:case o:return z;default:return U}}case n:return U}}}function L(z){return R(z)===d}return Hr.AsyncMode=c,Hr.ConcurrentMode=d,Hr.ContextConsumer=s,Hr.ContextProvider=o,Hr.Element=t,Hr.ForwardRef=p,Hr.Fragment=r,Hr.Lazy=C,Hr.Memo=w,Hr.Portal=n,Hr.Profiler=a,Hr.StrictMode=i,Hr.Suspense=g,Hr.isAsyncMode=function(z){return L(z)||R(z)===c},Hr.isConcurrentMode=L,Hr.isContextConsumer=function(z){return R(z)===s},Hr.isContextProvider=function(z){return R(z)===o},Hr.isElement=function(z){return typeof z=="object"&&z!==null&&z.$$typeof===t},Hr.isForwardRef=function(z){return R(z)===p},Hr.isFragment=function(z){return R(z)===r},Hr.isLazy=function(z){return R(z)===C},Hr.isMemo=function(z){return R(z)===w},Hr.isPortal=function(z){return R(z)===n},Hr.isProfiler=function(z){return R(z)===a},Hr.isStrictMode=function(z){return R(z)===i},Hr.isSuspense=function(z){return R(z)===g},Hr.isValidElementType=function(z){return typeof z=="string"||typeof z=="function"||z===r||z===d||z===a||z===i||z===g||z===S||typeof z=="object"&&z!==null&&(z.$$typeof===C||z.$$typeof===w||z.$$typeof===o||z.$$typeof===s||z.$$typeof===p||z.$$typeof===P||z.$$typeof===D||z.$$typeof===M||z.$$typeof===k)},Hr.typeOf=R,Hr}var Vr={};/** @license React v16.13.1 * react-is.development.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 NM;function jq(){return NM||(NM=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,S=e?Symbol.for("react.suspense_list"):60120,w=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function R(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===r||Ce===d||Ce===a||Ce===i||Ce===g||Ce===S||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===C||Ce.$$typeof===w||Ce.$$typeof===o||Ce.$$typeof===s||Ce.$$typeof===p||Ce.$$typeof===P||Ce.$$typeof===D||Ce.$$typeof===M||Ce.$$typeof===k)}function L(Ce){if(typeof Ce=="object"&&Ce!==null){var Lt=Ce.$$typeof;switch(Lt){case t:var De=Ce.type;switch(De){case c:case d:case r:case a:case i:case g:return De;default:var wt=De&&De.$$typeof;switch(wt){case s:case p:case C:case w:case o:return wt;default:return Lt}}case n:return Lt}}}var z=c,U=d,H=s,q=o,J=t,$=p,K=r,fe=C,X=w,G=n,te=a,oe=i,ie=g,re=!1;function le(Ce){return re||(re=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ee(Ce)||L(Ce)===c}function ee(Ce){return L(Ce)===d}function de(Ce){return L(Ce)===s}function Re(Ce){return L(Ce)===o}function Ae(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===t}function _e(Ce){return L(Ce)===p}function Me(Ce){return L(Ce)===r}function Te(Ce){return L(Ce)===C}function Xe(Ce){return L(Ce)===w}function Qe(Ce){return L(Ce)===n}function vt(Ce){return L(Ce)===a}function St(Ce){return L(Ce)===i}function qe(Ce){return L(Ce)===g}Vr.AsyncMode=z,Vr.ConcurrentMode=U,Vr.ContextConsumer=H,Vr.ContextProvider=q,Vr.Element=J,Vr.ForwardRef=$,Vr.Fragment=K,Vr.Lazy=fe,Vr.Memo=X,Vr.Portal=G,Vr.Profiler=te,Vr.StrictMode=oe,Vr.Suspense=ie,Vr.isAsyncMode=le,Vr.isConcurrentMode=ee,Vr.isContextConsumer=de,Vr.isContextProvider=Re,Vr.isElement=Ae,Vr.isForwardRef=_e,Vr.isFragment=Me,Vr.isLazy=Te,Vr.isMemo=Xe,Vr.isPortal=Qe,Vr.isProfiler=vt,Vr.isStrictMode=St,Vr.isSuspense=qe,Vr.isValidElementType=R,Vr.typeOf=L}()),Vr}(function(e){process.env.NODE_ENV==="production"?e.exports=Mq():e.exports=jq()})(Dq);var LM=Lb,Iq={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Rq={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zM={};zM[LM.ForwardRef]=Iq,zM[LM.Memo]=Rq;var BM={},Nq={get exports(){return BM},set exports(e){BM=e}},Gr={};/** * @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 FM;function Lq(){if(FM)return Gr;FM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),C;C=Symbol.for("react.module.reference");function k(P){if(typeof P=="object"&&P!==null){var D=P.$$typeof;switch(D){case e:switch(P=P.type,P){case n:case i:case r:case d:case p:return P;default:switch(P=P&&P.$$typeof,P){case s:case o:case c:case S:case g:case a:return P;default:return D}}case t:return D}}}return Gr.ContextConsumer=o,Gr.ContextProvider=a,Gr.Element=e,Gr.ForwardRef=c,Gr.Fragment=n,Gr.Lazy=S,Gr.Memo=g,Gr.Portal=t,Gr.Profiler=i,Gr.StrictMode=r,Gr.Suspense=d,Gr.SuspenseList=p,Gr.isAsyncMode=function(){return!1},Gr.isConcurrentMode=function(){return!1},Gr.isContextConsumer=function(P){return k(P)===o},Gr.isContextProvider=function(P){return k(P)===a},Gr.isElement=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===e},Gr.isForwardRef=function(P){return k(P)===c},Gr.isFragment=function(P){return k(P)===n},Gr.isLazy=function(P){return k(P)===S},Gr.isMemo=function(P){return k(P)===g},Gr.isPortal=function(P){return k(P)===t},Gr.isProfiler=function(P){return k(P)===i},Gr.isStrictMode=function(P){return k(P)===r},Gr.isSuspense=function(P){return k(P)===d},Gr.isSuspenseList=function(P){return k(P)===p},Gr.isValidElementType=function(P){return typeof P=="string"||typeof P=="function"||P===n||P===i||P===r||P===d||P===p||P===w||typeof P=="object"&&P!==null&&(P.$$typeof===S||P.$$typeof===g||P.$$typeof===a||P.$$typeof===o||P.$$typeof===c||P.$$typeof===C||P.getModuleId!==void 0)},Gr.typeOf=k,Gr}var Wr={};/** * @license React * react-is.development.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 UM;function zq(){return UM||(UM=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),C=!1,k=!1,P=!1,D=!1,M=!1,R;R=Symbol.for("react.module.reference");function L(De){return!!(typeof De=="string"||typeof De=="function"||De===n||De===i||M||De===r||De===d||De===p||D||De===w||C||k||P||typeof De=="object"&&De!==null&&(De.$$typeof===S||De.$$typeof===g||De.$$typeof===a||De.$$typeof===o||De.$$typeof===c||De.$$typeof===R||De.getModuleId!==void 0))}function z(De){if(typeof De=="object"&&De!==null){var wt=De.$$typeof;switch(wt){case e:var ln=De.type;switch(ln){case n:case i:case r:case d:case p:return ln;default:var Wt=ln&&ln.$$typeof;switch(Wt){case s:case o:case c:case S:case g:case a:return Wt;default:return wt}}case t:return wt}}}var U=o,H=a,q=e,J=c,$=n,K=S,fe=g,X=t,G=i,te=r,oe=d,ie=p,re=!1,le=!1;function ee(De){return re||(re=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function de(De){return le||(le=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Re(De){return z(De)===o}function Ae(De){return z(De)===a}function _e(De){return typeof De=="object"&&De!==null&&De.$$typeof===e}function Me(De){return z(De)===c}function Te(De){return z(De)===n}function Xe(De){return z(De)===S}function Qe(De){return z(De)===g}function vt(De){return z(De)===t}function St(De){return z(De)===i}function qe(De){return z(De)===r}function Ce(De){return z(De)===d}function Lt(De){return z(De)===p}Wr.ContextConsumer=U,Wr.ContextProvider=H,Wr.Element=q,Wr.ForwardRef=J,Wr.Fragment=$,Wr.Lazy=K,Wr.Memo=fe,Wr.Portal=X,Wr.Profiler=G,Wr.StrictMode=te,Wr.Suspense=oe,Wr.SuspenseList=ie,Wr.isAsyncMode=ee,Wr.isConcurrentMode=de,Wr.isContextConsumer=Re,Wr.isContextProvider=Ae,Wr.isElement=_e,Wr.isForwardRef=Me,Wr.isFragment=Te,Wr.isLazy=Xe,Wr.isMemo=Qe,Wr.isPortal=vt,Wr.isProfiler=St,Wr.isStrictMode=qe,Wr.isSuspense=Ce,Wr.isSuspenseList=Lt,Wr.isValidElementType=L,Wr.typeOf=z}()),Wr}(function(e){process.env.NODE_ENV==="production"?e.exports=Lq():e.exports=zq()})(Nq);function Bq(){const e=Tq();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,a=n={callback:r,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){!i||t===null||(i=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}const HM={notify(){},get:()=>[]};function Fq(e,t){let n,r=HM;function i(g){return c(),r.subscribe(g)}function a(){r.notify()}function o(){p.onStateChange&&p.onStateChange()}function s(){return Boolean(n)}function c(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=Bq())}function d(){n&&(n(),n=void 0,r.clear(),r=HM)}const p={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:o,isSubscribed:s,trySubscribe:c,tryUnsubscribe:d,getListeners:()=>r};return p}const Uq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect;function Hq({store:e,context:t,children:n,serverState:r}){const i=A.useMemo(()=>{const s=Fq(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),a=A.useMemo(()=>e.getState(),[e]);Uq(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,a]);const o=t||Ff;return A.createElement(o.Provider,{value:i},n)}function VM(e=Ff){const t=e===Ff?jM:()=>A.useContext(e);return function(){const{store:r}=t();return r}}const Vq=VM();function Gq(e=Ff){const t=e===Ff?Vq:VM(e);return function(){return t().dispatch}}const Wq=Gq();kq(kT.useSyncExternalStoreWithSelector),_q(Au.unstable_batchedUpdates);function S2(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?S2=function(n){return typeof n}:S2=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},S2(e)}function qq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GM(e,t){for(var n=0;n1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:jT(e)?2:IT(e)?3:0}function Qg(e,t){return Xg(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qq(e,t){return Xg(e)===2?e.get(t):e[t]}function qM(e,t,n){var r=Xg(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function YM(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function jT(e){return nY&&e instanceof Map}function IT(e){return rY&&e instanceof Set}function sp(e){return e.o||e.t}function RT(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=n6(e);delete t[Zi];for(var n=Jg(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Zq),Object.freeze(e),t&&Hm(e,function(n,r){return NT(r,!0)},!0)),e}function Zq(){Do(2)}function LT(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function yd(e){var t=qT[e];return t||Do(18,e),t}function Jq(e,t){qT[e]||(qT[e]=t)}function zT(){return process.env.NODE_ENV==="production"||Zg||Do(0),Zg}function BT(e,t){t&&(yd("Patches"),e.u=[],e.s=[],e.v=t)}function C2(e){FT(e),e.p.forEach($q),e.p=null}function FT(e){e===Zg&&(Zg=e.l)}function KM(e){return Zg={p:[],l:Zg,h:e,m:!0,_:0}}function $q(e){var t=e[Zi];t.i===0||t.i===1?t.j():t.O=!0}function UT(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||yd("ES5").S(t,e,r),r?(n[Zi].P&&(C2(t),Do(4)),Hf(e)&&(e=E2(t,e),t.l||_2(t,e)),t.u&&yd("Patches").M(n[Zi].t,e,t.u,t.s)):e=E2(t,n,[]),C2(t),t.u&&t.v(t.u,t.s),e!==e6?e:void 0}function E2(e,t,n){if(LT(t))return t;var r=t[Zi];if(!r)return Hm(t,function(s,c){return XM(e,r,t,s,c,n)},!0),t;if(r.A!==e)return t;if(!r.P)return _2(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=RT(r.k):r.o,a=i,o=!1;r.i===3&&(a=new Set(i),i.clear(),o=!0),Hm(a,function(s,c){return XM(e,r,i,s,c,n,o)}),_2(e,i,!1),n&&e.u&&yd("Patches").N(r,n,e.u,e.s)}return r.o}function XM(e,t,n,r,i,a,o){if(process.env.NODE_ENV!=="production"&&i===n&&Do(5),op(i)){var s=E2(e,i,a&&t&&t.i!==3&&!Qg(t.R,r)?a.concat(r):void 0);if(qM(n,r,s),!op(s))return;e.m=!1}else o&&n.add(i);if(Hf(i)&&!LT(i)){if(!e.h.D&&e._<1)return;E2(e,i),t&&t.A.l||_2(e,i)}}function _2(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&NT(t,n)}function HT(e,t){var n=e[Zi];return(n?sp(n):e)[t]}function QM(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 lp(e){e.P||(e.P=!0,e.l&&lp(e.l))}function VT(e){e.o||(e.o=RT(e.t))}function GT(e,t,n){var r=jT(t)?yd("MapSet").F(t,n):IT(t)?yd("MapSet").T(t,n):e.g?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:zT(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},c=s,d=zb;o&&(c=[s],d=Bb);var p=Proxy.revocable(c,d),g=p.revoke,S=p.proxy;return s.k=S,s.j=g,S}(t,n):yd("ES5").J(t,n);return(n?n.A:zT()).p.push(r),r}function eY(e){return op(e)||Do(22,e),function t(n){if(!Hf(n))return n;var r,i=n[Zi],a=Xg(n);if(i){if(!i.P&&(i.i<4||!yd("ES5").K(i)))return i.t;i.I=!0,r=ZM(n,a),i.I=!1}else r=ZM(n,a);return Hm(r,function(o,s){i&&Qq(i.t,o)===s||qM(r,o,t(s))}),a===3?new Set(r):r}(e)}function ZM(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return RT(e)}function tY(){function e(o,s){var c=a[o];return c?c.enumerable=s:a[o]=c={configurable:!0,enumerable:s,get:function(){var d=this[Zi];return process.env.NODE_ENV!=="production"&&i(d),zb.get(d,o)},set:function(d){var p=this[Zi];process.env.NODE_ENV!=="production"&&i(p),zb.set(p,o,d)}},c}function t(o){for(var s=o.length-1;s>=0;s--){var c=o[s][Zi];if(!c.P)switch(c.i){case 5:r(c)&&lp(c);break;case 4:n(c)&&lp(c)}}}function n(o){for(var s=o.t,c=o.k,d=Jg(c),p=d.length-1;p>=0;p--){var g=d[p];if(g!==Zi){var S=s[g];if(S===void 0&&!Qg(s,g))return!0;var w=c[g],C=w&&w[Zi];if(C?C.t!==S:!YM(w,S))return!0}}var k=!!s[Zi];return d.length!==Jg(s).length+(k?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var c=Object.getOwnPropertyDescriptor(s,s.length-1);if(c&&!c.get)return!0;for(var d=0;d1?D-1:0),R=1;R1?p-1:0),S=1;S=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 o=yd("Patches").$;return op(n)?o(n,r):this.produce(n,function(s){return o(s,r)})},e}(),Wl=new oY,r6=Wl.produce;Wl.produceWithPatches.bind(Wl),Wl.setAutoFreeze.bind(Wl),Wl.setUseProxies.bind(Wl),Wl.applyPatches.bind(Wl),Wl.createDraft.bind(Wl),Wl.finishDraft.bind(Wl);function Ou(e){return Ou=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},Ou(e)}function sY(e,t){if(Ou(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ou(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i6(e){var t=sY(e,"string");return Ou(t)==="symbol"?t:String(t)}function Du(e,t,n){return t=i6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a6(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 o6(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?hs(1):"Expected the enhancer to be a function. Instead, received: '"+Gm(n)+"'");return n(KT)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?hs(2):"Expected the root reducer to be a function. Instead, received: '"+Gm(e)+"'");var i=e,a=t,o=[],s=o,c=!1;function d(){s===o&&(s=o.slice())}function p(){if(c)throw new Error(process.env.NODE_ENV==="production"?hs(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function g(k){if(typeof k!="function")throw new Error(process.env.NODE_ENV==="production"?hs(4):"Expected the listener to be a function. Instead, received: '"+Gm(k)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?hs(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var P=!0;return d(),s.push(k),function(){if(P){if(c)throw new Error(process.env.NODE_ENV==="production"?hs(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");P=!1,d();var M=s.indexOf(k);s.splice(M,1),o=null}}}function S(k){if(!l6(k))throw new Error(process.env.NODE_ENV==="production"?hs(7):"Actions must be plain objects. Instead, the actual type was: '"+Gm(k)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof k.type>"u")throw new Error(process.env.NODE_ENV==="production"?hs(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?hs(9):"Reducers may not dispatch actions.");try{c=!0,a=i(a,k)}finally{c=!1}for(var P=o=s,D=0;D0)return"Unexpected "+(o.length>1?"keys":"key")+" "+('"'+o.join('", "')+'" found in '+a+". ")+"Expected to find one of the known reducer keys instead: "+('"'+i.join('", "')+'". Unexpected keys will be ignored.')}function hY(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Vm.INIT});if(typeof r>"u")throw new Error(process.env.NODE_ENV==="production"?hs(12):'The slice reducer for key "'+t+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Vm.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?hs(13):'The slice reducer for key "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle '"+Vm.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function c6(e){for(var t=Object.keys(e),n={},r=0;r"u"&&u6('No reducer provided for key "'+i+'"'),typeof e[i]=="function"&&(n[i]=e[i])}var a=Object.keys(n),o;process.env.NODE_ENV!=="production"&&(o={});var s;try{hY(n)}catch(c){s=c}return function(d,p){if(d===void 0&&(d={}),s)throw s;if(process.env.NODE_ENV!=="production"){var g=fY(d,n,p,o);g&&u6(g)}for(var S=!1,w={},C=0;C"u"){var R=p&&p.type;throw new Error(process.env.NODE_ENV==="production"?hs(14):"When called with an action of type "+(R?'"'+String(R)+'"':"(unknown type)")+', the slice reducer for key "'+k+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}w[k]=M,S=S||M!==D}return S=S||a.length!==Object.keys(d).length,S?w:d}}function T2(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var d=n[c];return c>0&&(n.splice(c,1),n.unshift(d)),d.value}return k2}function i(s,c){r(s)===k2&&(n.unshift({key:s,value:c}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var gY=function(t,n){return t===n};function yY(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,a=0;a1?t-1:0),r=1;r0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]e&&console.warn(t+" took "+n+"ms, which is more than the warning threshold of "+e+`ms. If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions. It is disabled in production builds, so you don't need to worry about that.`)}}}var DY=function(e){wY(t,e);function t(){for(var n=[],r=0;r0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?r.splice(o,1/0,i):r.push(i),~n.indexOf(a)&&(a=t.call(this,i,a))}else n.push(a);return e==null?a:e.call(this,i,a)}}function RY(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function NY(e,t,n){var r=S6(e,t,n);return{detectMutations:function(){return x6(e,t,r,n)}}}function S6(e,t,n,r){t===void 0&&(t=[]),r===void 0&&(r="");var i={value:n};if(!e(n)){i.children={};for(var a in n){var o=r?r+"."+a:a;t.length&&t.indexOf(o)!==-1||(i.children[a]=S6(e,t,n[a],o))}}return i}function x6(e,t,n,r,i,a){t===void 0&&(t=[]),i===void 0&&(i=!1),a===void 0&&(a="");var o=n?n.value:void 0,s=o===r;if(i&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:a};if(e(o)||e(r))return{wasMutated:!1};var c={};for(var d in n.children)c[d]=!0;for(var d in r)c[d]=!0;var p=t.length>0,g=function(w){var C=a?a+"."+w:w;if(p){var k=t.some(function(D){return D instanceof RegExp?D.test(C):C===D});if(k)return"continue"}var P=x6(e,t,n.children[w],r[w],s,C);if(P.wasMutated)return{value:P}};for(var d in c){var S=g(d);if(typeof S=="object")return S.value}return{wasMutated:!1}}function LY(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(c){return function(d){return c(d)}}};var t=e.isImmutable,n=t===void 0?RY:t,r=e.ignoredPaths,i=e.warnAfter,a=i===void 0?32:i,o=e.ignore;r=r||o;var s=NY.bind(null,n,r);return function(c){var d=c.getState,p=d(),g=s(p),S;return function(w){return function(C){var k=g6(a,"ImmutableStateInvariantMiddleware");k.measureTime(function(){p=d(),S=g.detectMutations(),g=s(p),b6(!S.wasMutated,"A state mutation was detected between dispatches, in the path '"+(S.path||"")+"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")});var P=w(C);return k.measureTime(function(){p=d(),S=g.detectMutations(),g=s(p),S.wasMutated&&b6(!S.wasMutated,"A state mutation was detected inside a dispatch, in the path: "+(S.path||"")+". Take a look at the reducer(s) handling the action "+jY(C)+". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}),k.warnIfExceeded(),P}}}}function w6(e){var t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||v6(e)}function ZT(e,t,n,r,i,a){t===void 0&&(t=""),n===void 0&&(n=w6),i===void 0&&(i=[]);var o;if(!n(e))return{keyPath:t||"",value:e};if(typeof e!="object"||e===null||a!=null&&a.has(e))return!1;for(var s=r!=null?r(e):Object.entries(e),c=i.length>0,d=function(P,D){var M=t?t+"."+P:P;if(c){var R=i.some(function(L){return L instanceof RegExp?L.test(M):M===L});if(R)return"continue"}if(!n(D))return{value:{keyPath:M,value:D}};if(typeof D=="object"&&(o=ZT(D,M,n,r,i,a),o))return{value:o}},p=0,g=s;p0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`")}var s=typeof a=="string"?a:a.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=o,i},addMatcher:function(a,o){if(process.env.NODE_ENV!=="production"&&r)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:a,reducer:o}),i},addDefaultCase:function(a){if(process.env.NODE_ENV!=="production"&&r)throw new Error("`builder.addDefaultCase` can only be called once");return r=a,i}};return e(i),[t,n,r]}function HY(e){return typeof e=="function"}var _6=!1;function VY(e,t,n,r){n===void 0&&(n=[]),process.env.NODE_ENV!=="production"&&typeof t=="object"&&(_6||(_6=!0,console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer")));var i=typeof t=="function"?E6(t):[t,n,r],a=i[0],o=i[1],s=i[2],c;if(HY(e))c=function(){return QT(e())};else{var d=QT(e);c=function(){return d}}function p(g,S){g===void 0&&(g=c());var w=P2([a[S.type]],o.filter(function(C){var k=C.matcher;return k(S)}).map(function(C){var k=C.reducer;return k}));return w.filter(function(C){return!!C}).length===0&&(w=[s]),w.reduce(function(C,k){if(k)if(op(C)){var P=C,D=k(P,S);return D===void 0?C:D}else{if(Hf(C))return r6(C,function(M){return k(M,S)});var D=k(C,S);if(D===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return D}return C},g)}return p.getInitialState=c,p}var T6=!1;function GY(e,t){return e+"/"+t}function Wm(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&e.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");var n=typeof e.initialState=="function"?e.initialState:QT(e.initialState),r=e.reducers||{},i=Object.keys(r),a={},o={},s={};i.forEach(function(p){var g=r[p],S=GY(t,p),w,C;"reducer"in g?(w=g.reducer,C=g.prepare):w=g,a[p]=w,o[S]=w,s[p]=C?Ji(S,C):Ji(S)});function c(){process.env.NODE_ENV!=="production"&&typeof e.extraReducers=="object"&&(T6||(T6=!0,console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice")));var p=typeof e.extraReducers=="function"?E6(e.extraReducers):[e.extraReducers],g=p[0],S=g===void 0?{}:g,w=p[1],C=w===void 0?[]:w,k=p[2],P=k===void 0?void 0:k,D=up(up({},S),o);return VY(n,function(M){for(var R in D)M.addCase(R,D[R]);for(var L=0,z=C;L{Object.keys(U).forEach(function(H){R(H)&&p[H]!==U[H]&&S.indexOf(H)===-1&&S.push(H)}),Object.keys(p).forEach(function(H){U[H]===void 0&&R(H)&&S.indexOf(H)===-1&&p[H]!==void 0&&S.push(H)}),w===null&&(w=setInterval(D,i)),p=U},a)}function D(){if(S.length===0){w&&clearInterval(w),w=null;return}var U=S.shift(),H=r.reduce(function(q,J){return J.in(q,U,p)},p[U]);if(H!==void 0)try{g[U]=c(H)}catch(q){console.error("redux-persist/createPersistoid: error serializing state",q)}else delete g[U];S.length===0&&M()}function M(){Object.keys(g).forEach(function(U){p[U]===void 0&&delete g[U]}),C=s.setItem(o,c(g)).catch(L)}function R(U){return!(n&&n.indexOf(U)===-1&&U!=="_persist"||t&&t.indexOf(U)!==-1)}function L(U){d&&d(U),U&&process.env.NODE_ENV!=="production"&&console.error("Error storing data",U)}var z=function(){for(;S.length!==0;)D();return C||Promise.resolve()};return{update:P,flush:z}}function nK(e){return JSON.stringify(e)}function rK(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:nk).concat(e.key),r=e.storage,i=e.debug,a;return e.deserialize===!1?a=function(s){return s}:typeof e.deserialize=="function"?a=e.deserialize:a=iK,r.getItem(n).then(function(o){if(o)try{var s={},c=a(o);return Object.keys(c).forEach(function(d){s[d]=t.reduceRight(function(p,g){return g.out(p,d,c)},a(c[d]))}),s}catch(d){throw process.env.NODE_ENV!=="production"&&i&&console.log("redux-persist/getStoredState: Error restoring data ".concat(o),d),d}else return})}function iK(e){return JSON.parse(e)}function aK(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:nk).concat(e.key);return t.removeItem(n,oK)}function oK(e){e&&process.env.NODE_ENV!=="production"&&console.error("redux-persist/purgeStoredState: Error purging data stored state",e)}function R6(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 Vf(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uK(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var cK=5e3;function dK(e,t){if(process.env.NODE_ENV!=="production"){if(!e)throw new Error("config is required for persistReducer");if(!e.key)throw new Error("key is required in persistor config");if(!e.storage)throw new Error("redux-persist: config.storage is required. Try using one of the provided storage engines `import storage from 'redux-persist/lib/storage'`")}var n=e.version!==void 0?e.version:ZY;e.debug;var r=e.stateReconciler===void 0?eK:e.stateReconciler,i=e.getStoredState||rK,a=e.timeout!==void 0?e.timeout:cK,o=null,s=!1,c=!0,d=function(g){return g._persist.rehydrated&&o&&!c&&o.update(g),g};return function(p,g){var S=p||{},w=S._persist,C=lK(S,["_persist"]),k=C;if(g.type===D6){var P=!1,D=function(q,J){process.env.NODE_ENV!=="production"&&P&&console.error('redux-persist: rehydrate for "'.concat(e.key,'" called after timeout.'),q,J),P||(g.rehydrate(e.key,q,J),P=!0)};if(a&&setTimeout(function(){!P&&D(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},a),c=!1,o||(o=tK(e)),w)return Vf({},t(k,g),{_persist:w});if(typeof g.rehydrate!="function"||typeof g.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 g.register(e.key),i(e).then(function(H){var q=e.migrate||function(J,$){return Promise.resolve(J)};q(H,n).then(function(J){D(J)},function(J){process.env.NODE_ENV!=="production"&&J&&console.error("redux-persist: migration error",J),D(void 0,J)})},function(H){D(void 0,H)}),Vf({},t(k,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===M6)return s=!0,g.result(aK(e)),Vf({},t(k,g),{_persist:w});if(g.type===A6)return g.result(o&&o.flush()),Vf({},t(k,g),{_persist:w});if(g.type===O6)c=!0;else if(g.type===rk){if(s)return Vf({},k,{_persist:Vf({},w,{rehydrated:!0})});if(g.key===e.key){var M=t(k,g),R=g.payload,L=r!==!1&&R!==void 0?r(R,p,M,e):M,z=Vf({},L,{_persist:Vf({},w,{rehydrated:!0})});return d(z)}}}if(!w)return t(p,g);var U=t(k,g);return U===k?p:d(Vf({},U,{_persist:w}))}}function N6(e){return pK(e)||hK(e)||fK()}function fK(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function hK(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function pK(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:z6,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case j6:return ik({},t,{registry:[].concat(N6(t.registry),[n.key])});case rk:var r=t.registry.indexOf(n.key),i=N6(t.registry);return i.splice(r,1),ik({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function gK(e,t,n){if(process.env.NODE_ENV!=="production"){var r=t||{},i=["blacklist","whitelist","transforms","storage","keyPrefix","migrate"];i.forEach(function(p){r[p]&&console.error('redux-persist: invalid option passed to persistStore: "'.concat(p,'". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.'))})}var a=n||!1,o=KT(vK,z6,t&&t.enhancer?t.enhancer:void 0),s=function(g){o.dispatch({type:j6,key:g})},c=function(g,S,w){var C={type:rk,payload:S,err:w,key:g};e.dispatch(C),o.dispatch(C),a&&d.getState().bootstrapped&&(a(),a=!1)},d=ik({},o,{purge:function(){var g=[];return e.dispatch({type:M6,result:function(w){g.push(w)}}),Promise.all(g)},flush:function(){var g=[];return e.dispatch({type:A6,result:function(w){g.push(w)}}),Promise.all(g)},pause:function(){e.dispatch({type:O6})},persist:function(){e.dispatch({type:D6,register:s,rehydrate:c})}});return t&&t.manualPersist||d.persist(),d}var ak={},ok={};ok.__esModule=!0,ok.default=SK;function A2(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A2=function(n){return typeof n}:A2=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A2(e)}function sk(){}var yK={getItem:sk,setItem:sk,removeItem:sk};function bK(e){if((typeof self>"u"?"undefined":A2(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 process.env.NODE_ENV!=="production"&&console.warn("redux-persist ".concat(e," test failed, persistence will be disabled.")),!1}return!0}function SK(e){var t="".concat(e,"Storage");return bK(t)?self[t]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),yK)}ak.__esModule=!0,ak.default=CK;var xK=wK(ok);function wK(e){return e&&e.__esModule?e:{default:e}}function CK(e){var t=(0,xK.default)(e);return{getItem:function(r){return new Promise(function(i,a){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(a,o){a(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,a){i(t.removeItem(r))})}}}var B6=void 0,EK=_K(ak);function _K(e){return e&&e.__esModule?e:{default:e}}var TK=(0,EK.default)("local");B6=TK;var F6={},U6={},qm={};Object.defineProperty(qm,"__esModule",{value:!0}),qm.PLACEHOLDER_UNDEFINED=qm.PACKAGE_NAME=void 0,qm.PACKAGE_NAME="redux-deep-persist",qm.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var lk={};(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={}))})(lk),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=qm,n=lk,r=function(X){return typeof X=="object"&&X!==null};e.isObjectLike=r;const i=function(X){return typeof X=="number"&&X>-1&&X%1==0&&X<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(X){return(0,e.isLength)(X&&X.length)&&Object.prototype.toString.call(X)==="[object Array]"};const a=function(X){return!!X&&typeof X=="object"&&!(0,e.isArray)(X)};e.isPlainObject=a;const o=function(X){return String(~~X)===X&&Number(X)>=0};e.isIntegerString=o;const s=function(X){return Object.prototype.toString.call(X)==="[object String]"};e.isString=s;const c=function(X){return Object.prototype.toString.call(X)==="[object Date]"};e.isDate=c;const d=function(X){return Object.keys(X).length===0};e.isEmpty=d;const p=Object.prototype.hasOwnProperty,g=function(X,G,te){te||(te=new Set([X])),G||(G="");for(const oe in X){const ie=G?`${G}.${oe}`:oe,re=X[oe];if((0,e.isObjectLike)(re))return te.has(re)?`${G}.${oe}:`:(te.add(re),(0,e.getCircularPath)(re,ie,te))}return null};e.getCircularPath=g;const S=function(X){if(!(0,e.isObjectLike)(X))return X;if((0,e.isDate)(X))return new Date(+X);const G=(0,e.isArray)(X)?[]:{};for(const te in X){const oe=X[te];G[te]=(0,e._cloneDeep)(oe)}return G};e._cloneDeep=S;const w=function(X){const G=(0,e.getCircularPath)(X);if(G)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${G}' of object you're trying to persist: ${X}`);return(0,e._cloneDeep)(X)};e.cloneDeep=w;const C=function(X,G){if(X===G)return{};if(!(0,e.isObjectLike)(X)||!(0,e.isObjectLike)(G))return G;const te=(0,e.cloneDeep)(X),oe=(0,e.cloneDeep)(G),ie=Object.keys(te).reduce((le,ee)=>(p.call(oe,ee)||(le[ee]=void 0),le),{});if((0,e.isDate)(te)||(0,e.isDate)(oe))return te.valueOf()===oe.valueOf()?{}:oe;const re=Object.keys(oe).reduce((le,ee)=>{if(!p.call(te,ee))return le[ee]=oe[ee],le;const de=(0,e.difference)(te[ee],oe[ee]);return(0,e.isObjectLike)(de)&&(0,e.isEmpty)(de)&&!(0,e.isDate)(de)?(0,e.isArray)(te)&&!(0,e.isArray)(oe)||!(0,e.isArray)(te)&&(0,e.isArray)(oe)?oe:le:(le[ee]=de,le)},ie);return delete re._persist,re};e.difference=C;const k=function(X,G){return G.reduce((te,oe)=>{if(te){const ie=parseInt(oe,10),re=(0,e.isIntegerString)(oe)&&ie<0?te.length+ie:oe;return(0,e.isString)(te)?te.charAt(re):te[re]}},X)};e.path=k;const P=function(X,G){return[...X].reverse().reduce((ie,re,le)=>{const ee=(0,e.isIntegerString)(re)?[]:{};return ee[re]=le===0?G:ie,ee},{})};e.assocPath=P;const D=function(X,G){const te=(0,e.cloneDeep)(X);return G.reduce((oe,ie,re)=>(re===G.length-1&&oe&&(0,e.isObjectLike)(oe)&&delete oe[ie],oe&&oe[ie]),te),te};e.dissocPath=D;const M=function(X,G,...te){if(!te||!te.length)return G;const oe=te.shift(),{preservePlaceholder:ie,preserveUndefined:re}=X;if((0,e.isObjectLike)(G)&&(0,e.isObjectLike)(oe))for(const le in oe)if((0,e.isObjectLike)(oe[le])&&(0,e.isObjectLike)(G[le]))G[le]||(G[le]={}),M(X,G[le],oe[le]);else if((0,e.isArray)(G)){let ee=oe[le];const de=ie?t.PLACEHOLDER_UNDEFINED:void 0;re||(ee=typeof ee<"u"?ee:G[parseInt(le,10)]),ee=ee!==t.PLACEHOLDER_UNDEFINED?ee:de,G[parseInt(le,10)]=ee}else{const ee=oe[le]!==t.PLACEHOLDER_UNDEFINED?oe[le]:void 0;G[le]=ee}return M(X,G,...te)},R=function(X,G,te){return M({preservePlaceholder:te==null?void 0:te.preservePlaceholder,preserveUndefined:te==null?void 0:te.preserveUndefined},(0,e.cloneDeep)(X),(0,e.cloneDeep)(G))};e.mergeDeep=R;const L=function(X,G=[],te,oe,ie){if(!(0,e.isObjectLike)(X))return X;for(const re in X){const le=X[re],ee=(0,e.isArray)(X),de=oe?oe+"."+re:re;le===null&&(te===n.ConfigType.WHITELIST&&G.indexOf(de)===-1||te===n.ConfigType.BLACKLIST&&G.indexOf(de)!==-1)&&ee&&(X[parseInt(re,10)]=void 0),le===void 0&&ie&&te===n.ConfigType.BLACKLIST&&G.indexOf(de)===-1&&ee&&(X[parseInt(re,10)]=t.PLACEHOLDER_UNDEFINED),L(le,G,te,de,ie)}},z=function(X,G,te,oe){const ie=(0,e.cloneDeep)(X);return L(ie,G,te,"",oe),ie};e.preserveUndefined=z;const U=function(X,G,te){return te.indexOf(X)===G};e.unique=U;const H=function(X){return X.reduce((G,te)=>{const oe=X.filter(Re=>Re===te),ie=X.filter(Re=>(te+".").indexOf(Re+".")===0),{duplicates:re,subsets:le}=G,ee=oe.length>1&&re.indexOf(te)===-1,de=ie.length>1;return{duplicates:[...re,...ee?oe:[]],subsets:[...le,...de?ie:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=H;const q=function(X,G,te){const oe=te===n.ConfigType.WHITELIST?"whitelist":"blacklist",ie=`${t.PACKAGE_NAME}: incorrect ${oe} configuration.`,re=`Check your create${te===n.ConfigType.WHITELIST?"White":"Black"}list arguments. `;if(!(0,e.isString)(G)||G.length<1)throw new Error(`${ie} Name (key) of reducer is required. ${re}`);if(!X||!X.length)return;const{duplicates:le,subsets:ee}=(0,e.findDuplicatesAndSubsets)(X);if(le.length>1)throw new Error(`${ie} Duplicated paths. ${JSON.stringify(le)} ${re}`);if(ee.length>1)throw new Error(`${ie} You are trying to persist an entire property and also some of its subset. ${JSON.stringify(ee)} ${re}`)};e.singleTransformValidator=q;const J=function(X){if(!(0,e.isArray)(X))return;const G=(X==null?void 0:X.map(te=>te.deepPersistKey).filter(te=>te))||[];if(G.length){const te=G.filter((oe,ie)=>G.indexOf(oe)!==ie);if(te.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(te)}`)}};e.transformsValidator=J;const $=function({whitelist:X,blacklist:G}){if(X&&X.length&&G&&G.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(X){const{duplicates:te,subsets:oe}=(0,e.findDuplicatesAndSubsets)(X);(0,e.throwError)({duplicates:te,subsets:oe},"whitelist")}if(G){const{duplicates:te,subsets:oe}=(0,e.findDuplicatesAndSubsets)(G);(0,e.throwError)({duplicates:te,subsets:oe},"blacklist")}};e.configValidator=$;const K=function({duplicates:X,subsets:G},te){if(X.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${te}. ${JSON.stringify(X)}`);if(G.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${te}. You must decide if you want to persist an entire path or its specific subset. ${JSON.stringify(G)}`)};e.throwError=K;const fe=function(X){return(0,e.isArray)(X)?X.filter(e.unique).reduce((G,te)=>{const oe=te.split("."),ie=oe[0],re=oe.slice(1).join(".")||void 0,le=G.filter(de=>Object.keys(de)[0]===ie)[0],ee=le?Object.values(le)[0]:void 0;return le||G.push({[ie]:re?[re]:void 0}),le&&!ee&&re&&(le[ie]=[re]),le&&ee&&re&&ee.push(re),G},[]):[]};e.getRootKeysGroup=fe}(U6),function(e){var t=Bs&&Bs.__rest||function(g,S){var w={};for(var C in g)Object.prototype.hasOwnProperty.call(g,C)&&S.indexOf(C)<0&&(w[C]=g[C]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,C=Object.getOwnPropertySymbols(g);k!P(M)&&g?g(D,M,R):D,out:(D,M,R)=>!P(M)&&S?S(D,M,R):D,deepPersistKey:C&&C[0]}},o=(g,S,w,{debug:C,whitelist:k,blacklist:P,transforms:D})=>{if(k||P)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)(D);const M=(0,n.cloneDeep)(w);let R=g;if(R&&(0,n.isObjectLike)(R)){const L=(0,n.difference)(S,w);(0,n.isEmpty)(L)||(R=(0,n.mergeDeep)(g,L,{preserveUndefined:!0}),C&&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(R).forEach(z=>{if(z!=="_persist"){if((0,n.isObjectLike)(M[z])){M[z]=(0,n.mergeDeep)(M[z],R[z]);return}M[z]=R[z]}})}return C&&R&&(0,n.isObjectLike)(R)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(R)}`),M};e.autoMergeDeep=o;const s=(g,S)=>((0,n.singleTransformValidator)(S,g,i.ConfigType.WHITELIST),a(w=>{if(!S||!S.length)return w;let C=null,k;return S.forEach(P=>{const D=P.split(".");k=(0,n.path)(w,D),typeof k>"u"&&(0,n.isIntegerString)(D[D.length-1])&&(k=r.PLACEHOLDER_UNDEFINED);const M=(0,n.assocPath)(D,k),R=(0,n.isArray)(M)?[]:{};C=(0,n.mergeDeep)(C||R,M,{preservePlaceholder:!0})}),C||w},w=>(0,n.preserveUndefined)(w,S,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const c=(g,S)=>((0,n.singleTransformValidator)(S,g,i.ConfigType.BLACKLIST),a(w=>{if(!S||!S.length)return;const C=(0,n.preserveUndefined)(w,S,i.ConfigType.BLACKLIST,!0);return S.map(P=>P.split(".")).reduce((P,D)=>(0,n.dissocPath)(P,D),C)},w=>(0,n.preserveUndefined)(w,S,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=c;const d=function(g,S){return S.map(w=>{const C=Object.keys(w)[0],k=w[C];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(C,k):(0,e.createBlacklist)(C,k)})};e.getTransforms=d;const p=g=>{var{key:S,whitelist:w,blacklist:C,storage:k,transforms:P,rootReducer:D}=g,M=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:w,blacklist:C});const R=(0,n.getRootKeysGroup)(w),L=(0,n.getRootKeysGroup)(C),z=Object.keys(D(void 0,{type:""})),U=R.map(fe=>Object.keys(fe)[0]),H=L.map(fe=>Object.keys(fe)[0]),q=z.filter(fe=>U.indexOf(fe)===-1&&H.indexOf(fe)===-1),J=(0,e.getTransforms)(i.ConfigType.WHITELIST,R),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,L),K=(0,n.isArray)(w)?q.map(fe=>(0,e.createBlacklist)(fe)):[];return Object.assign(Object.assign({},M),{key:S,storage:k,transforms:[...J,...$,...K,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=p}(F6);const cp=(e,t)=>Math.floor(e/t)*t,bd=(e,t)=>Math.round(e/t)*t;var Je={},kK={get exports(){return Je},set exports(e){Je=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,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",g=1,S=2,w=4,C=1,k=2,P=1,D=2,M=4,R=8,L=16,z=32,U=64,H=128,q=256,J=512,$=30,K="...",fe=800,X=16,G=1,te=2,oe=3,ie=1/0,re=9007199254740991,le=17976931348623157e292,ee=0/0,de=4294967295,Re=de-1,Ae=de>>>1,_e=[["ary",H],["bind",P],["bindKey",D],["curry",R],["curryRight",L],["flip",J],["partial",z],["partialRight",U],["rearg",q]],Me="[object Arguments]",Te="[object Array]",Xe="[object AsyncFunction]",Qe="[object Boolean]",vt="[object Date]",St="[object DOMException]",qe="[object Error]",Ce="[object Function]",Lt="[object GeneratorFunction]",De="[object Map]",wt="[object Number]",ln="[object Null]",Wt="[object Object]",Rn="[object Promise]",ar="[object Proxy]",xe="[object RegExp]",it="[object Set]",at="[object String]",bt="[object Symbol]",Ve="[object Undefined]",ot="[object WeakMap]",Jt="[object WeakSet]",rn="[object ArrayBuffer]",$e="[object DataView]",an="[object Float32Array]",Nn="[object Float64Array]",st="[object Int8Array]",Ge="[object Int16Array]",mt="[object Int32Array]",Ft="[object Uint8Array]",In="[object Uint8ClampedArray]",Hn="[object Uint16Array]",jt="[object Uint32Array]",zt=/\b__p \+= '';/g,vr=/\b(__p \+=) '' \+/g,gr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hn=/&(?:amp|lt|gt|quot|#39);/g,ri=/[&<>"']/g,qs=RegExp(hn.source),lo=RegExp(ri.source),Yn=/<%-([\s\S]+?)%>/g,Ro=/<%([\s\S]+?)%>/g,uo=/<%=([\s\S]+?)%>/g,Zo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,La=/^\w*$/,Ui=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jo=/[\\^$.*+?()[\]{}|]/g,tu=RegExp(Jo.source),Xu=/^\s+/,Hc=/\s/,nu=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,di=/\{\n\/\* \[wrapped with (.+)\] \*/,pe=/,? & /,dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pt=/[()=,{}\[\]\/\s]/,on=/\\(\\)?/g,er=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,An=/\w*$/,Fn=/^[-+]0x[0-9a-f]+$/i,Ln=/^0b[01]+$/i,Ei=/^\[object .+?Constructor\]$/,Dr=/^0o[0-7]+$/i,Mr=/^(?:0|[1-9]\d*)$/,fi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,co=/($^)/,ru=/['\n\r\u2028\u2029\\]/g,pa="\\ud800-\\udfff",Vc="\\u0300-\\u036f",Qu="\\ufe20-\\ufe2f",iu="\\u20d0-\\u20ff",au=Vc+Qu+iu,yh="\\u2700-\\u27bf",Kd="a-z\\xdf-\\xf6\\xf8-\\xff",ou="\\xac\\xb1\\xd7\\xf7",Ys="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Gn="\\u2000-\\u206f",_r=" \\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",Ks="A-Z\\xc0-\\xd6\\xd8-\\xde",ma="\\ufe0e\\ufe0f",za=ou+Ys+Gn+_r,Xs="['’]",Zu="["+pa+"]",va="["+za+"]",Cl="["+au+"]",Xd="\\d+",su="["+yh+"]",El="["+Kd+"]",Qd="[^"+pa+za+Xd+yh+Kd+Ks+"]",fo="\\ud83c[\\udffb-\\udfff]",Zd="(?:"+Cl+"|"+fo+")",Gc="[^"+pa+"]",bh="(?:\\ud83c[\\udde6-\\uddff]){2}",ta="[\\ud800-\\udbff][\\udc00-\\udfff]",ho="["+Ks+"]",ga="\\u200d",Wc="(?:"+El+"|"+Qd+")",Yv="(?:"+ho+"|"+Qd+")",Jd="(?:"+Xs+"(?:d|ll|m|re|s|t|ve))?",$d="(?:"+Xs+"(?:D|LL|M|RE|S|T|VE))?",Sh=Zd+"?",ef="["+ma+"]?",po="(?:"+ga+"(?:"+[Gc,bh,ta].join("|")+")"+ef+Sh+")*",xh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tr=ef+Sh+po,Ju="(?:"+[su,bh,ta].join("|")+")"+tr,tf="(?:"+[Gc+Cl+"?",Cl,bh,ta,Zu].join("|")+")",nf=RegExp(Xs,"g"),Qp=RegExp(Cl,"g"),Qs=RegExp(fo+"(?="+fo+")|"+tf+tr,"g"),hi=RegExp([ho+"?"+El+"+"+Jd+"(?="+[va,ho,"$"].join("|")+")",Yv+"+"+$d+"(?="+[va,ho+Wc,"$"].join("|")+")",ho+"?"+Wc+"+"+Jd,ho+"+"+$d,qc,xh,Xd,Ju].join("|"),"g"),wh=RegExp("["+ga+pa+au+ma+"]"),Zp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ch=["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"],Jp=-1,Tr={};Tr[an]=Tr[Nn]=Tr[st]=Tr[Ge]=Tr[mt]=Tr[Ft]=Tr[In]=Tr[Hn]=Tr[jt]=!0,Tr[Me]=Tr[Te]=Tr[rn]=Tr[Qe]=Tr[$e]=Tr[vt]=Tr[qe]=Tr[Ce]=Tr[De]=Tr[wt]=Tr[Wt]=Tr[xe]=Tr[it]=Tr[at]=Tr[ot]=!1;var nr={};nr[Me]=nr[Te]=nr[rn]=nr[$e]=nr[Qe]=nr[vt]=nr[an]=nr[Nn]=nr[st]=nr[Ge]=nr[mt]=nr[De]=nr[wt]=nr[Wt]=nr[xe]=nr[it]=nr[at]=nr[bt]=nr[Ft]=nr[In]=nr[Hn]=nr[jt]=!0,nr[qe]=nr[Ce]=nr[ot]=!1;var $p={À:"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"},em={"&":"&","<":"<",">":">",'"':""","'":"'"},ae={"&":"&","<":"<",">":">",""":'"',"'":"'"},ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Le=parseFloat,Bt=parseInt,Kn=typeof Bs=="object"&&Bs&&Bs.Object===Object&&Bs,jr=typeof self=="object"&&self&&self.Object===Object&&self,pn=Kn||jr||Function("return this")(),On=t&&!t.nodeType&&t,rr=On&&!0&&e&&!e.nodeType&&e,na=rr&&rr.exports===On,Hi=na&&Kn.process,kr=function(){try{var ge=rr&&rr.require&&rr.require("util").types;return ge||Hi&&Hi.binding&&Hi.binding("util")}catch{}}(),Ba=kr&&kr.isArrayBuffer,Ss=kr&&kr.isDate,$o=kr&&kr.isMap,Zs=kr&&kr.isRegExp,_l=kr&&kr.isSet,Kv=kr&&kr.isTypedArray;function mo(ge,ze,Pe){switch(Pe.length){case 0:return ge.call(ze);case 1:return ge.call(ze,Pe[0]);case 2:return ge.call(ze,Pe[0],Pe[1]);case 3:return ge.call(ze,Pe[0],Pe[1],Pe[2])}return ge.apply(ze,Pe)}function rf(ge,ze,Pe,Rt){for(var nn=-1,Un=ge==null?0:ge.length;++nn-1}function tm(ge,ze,Pe){for(var Rt=-1,nn=ge==null?0:ge.length;++Rt-1;);return Pe}function kl(ge,ze){for(var Pe=ge.length;Pe--&&sf(ze,ge[Pe],0)>-1;);return Pe}function rm(ge,ze){for(var Pe=ge.length,Rt=0;Pe--;)ge[Pe]===ze&&++Rt;return Rt}var Qv=kh($p),Pl=kh(em);function ec(ge){return"\\"+ve[ge]}function im(ge,ze){return ge==null?n:ge[ze]}function lu(ge){return wh.test(ge)}function cf(ge){return Zp.test(ge)}function uu(ge){for(var ze,Pe=[];!(ze=ge.next()).done;)Pe.push(ze.value);return Pe}function df(ge){var ze=-1,Pe=Array(ge.size);return ge.forEach(function(Rt,nn){Pe[++ze]=[nn,Rt]}),Pe}function Xc(ge,ze){return function(Pe){return ge(ze(Pe))}}function $s(ge,ze){for(var Pe=-1,Rt=ge.length,nn=0,Un=[];++Pe-1}function Oy(f,y){var T=this.__data__,N=aa(T,f);return N<0?(++this.size,T.push([f,y])):T[N][1]=y,this}es.prototype.clear=rg,es.prototype.delete=Ay,es.prototype.get=ig,es.prototype.has=mf,es.prototype.set=Oy;function Ts(f){var y=-1,T=f==null?0:f.length;for(this.clear();++y=y?f:y)),f}function oa(f,y,T,N,V,Z){var ce,se=y&g,Ee=y&S,We=y&w;if(T&&(ce=V?T(f,N,V,Z):T(f)),ce!==n)return ce;if(!yi(f))return f;var et=Dn(f);if(et){if(ce=KE(f),!se)return Co(f,ce)}else{var ft=ji(f),Nt=ft==Ce||ft==Lt;if(_u(f))return yc(f,se);if(ft==Wt||ft==Me||Nt&&!V){if(ce=Ee||Nt?{}:Ry(f),!se)return Ee?_m(f,bo(ce,f)):Ds(f,Vt(ce,f))}else{if(!nr[ft])return V?f:{};ce=HO(f,ft,se)}}Z||(Z=new Qt);var $t=Z.get(f);if($t)return $t;Z.set(f,ce),T_(f)?f.forEach(function(fn){ce.add(oa(fn,y,T,fn,f,Z))}):Ox(f)&&f.forEach(function(fn,Jn){ce.set(Jn,oa(fn,y,T,Jn,f,Z))});var wn=We?Ee?Be:Cr:Ee?Vo:no,qn=et?n:wn(f);return pi(qn||f,function(fn,Jn){qn&&(Jn=fn,fn=f[Jn]),dc(ce,Jn,oa(fn,y,T,Jn,f,Z))}),ce}function Bo(f){var y=no(f);return function(T){return Wi(T,f,y)}}function Wi(f,y,T){var N=T.length;if(f==null)return!N;for(f=yr(f);N--;){var V=T[N],Z=y[V],ce=f[V];if(ce===n&&!(V in f)||!Z(ce))return!1}return!0}function ag(f,y,T){if(typeof f!="function")throw new ia(o);return Dm(function(){f.apply(n,T)},y)}function Sf(f,y,T,N){var V=-1,Z=No,ce=!0,se=f.length,Ee=[],We=y.length;if(!se)return Ee;T&&(y=ai(y,ra(T))),N?(Z=tm,ce=!1):y.length>=i&&(Z=Kc,ce=!1,y=new ks(y));e:for(;++VV?0:V+T),N=N===n||N>V?V:xn(N),N<0&&(N+=V),N=T>N?0:Fl(N);T0&&T(se)?y>1?xa(se,y-1,T,N,V):Tl(V,se):N||(V[V.length]=se)}return V}var Yi=Su(),xo=Su(!0);function Ps(f,y){return f&&Yi(f,y,no)}function Va(f,y){return f&&xo(f,y,no)}function Vh(f,y){return ws(y,function(T){return Tu(f[T])})}function hc(f,y){y=Il(y,f);for(var T=0,N=y.length;f!=null&&Ty}function Dt(f,y){return f!=null&&hr.call(f,y)}function ts(f,y){return f!=null&&y in yr(f)}function Fo(f,y,T){return f>=ya(y,T)&&f=120&&et.length>=120)?new ks(ce&&et):n}et=f[0];var ft=-1,Nt=se[0];e:for(;++ft-1;)se!==f&&Oh.call(se,Ee,1),Oh.call(f,Ee,1);return f}function Wh(f,y){for(var T=f?y.length:0,N=T-1;T--;){var V=y[T];if(T==N||V!==Z){var Z=V;zl(V)?Oh.call(f,V,1):jl(f,V)}}return f}function qh(f,y){return f+tl(jh()*(y-f+1))}function Ml(f,y,T,N){for(var V=-1,Z=Oi(Lo((y-f)/(T||1)),0),ce=Pe(Z);Z--;)ce[N?Z:++V]=f,f+=T;return ce}function Ef(f,y){var T="";if(!f||y<1||y>re)return T;do y%2&&(T+=f),y=tl(y/2),y&&(f+=f);while(y);return T}function tn(f,y){return QS(Qh(f,y,Rs),f+"")}function As(f){return bf(Hl(f))}function sd(f,y){var T=Hl(f);return zy(T,fu(y,0,T.length))}function gu(f,y,T,N){if(!yi(f))return f;y=Il(y,f);for(var V=-1,Z=y.length,ce=Z-1,se=f;se!=null&&++VV?0:V+y),T=T>V?V:T,T<0&&(T+=V),V=y>T?0:T-y>>>0,y>>>=0;for(var Z=Pe(V);++N>>1,ce=f[Z];ce!==null&&!Is(ce)&&(T?ce<=y:ce=i){var We=y?null:ne(f);if(We)return Qc(We);ce=!1,V=Kc,Ee=new ks}else Ee=y?[]:se;e:for(;++N=N?f:Nr(f,y,T)}var Yh=ed||function(f){return pn.clearTimeout(f)};function yc(f,y){if(y)return f.slice();var T=f.length,N=yo?yo(T):new f.constructor(T);return f.copy(N),N}function fg(f){var y=new f.constructor(f.byteLength);return new cr(y).set(new cr(f)),y}function is(f,y){var T=y?fg(f.buffer):f.buffer;return new f.constructor(T,f.byteOffset,f.byteLength)}function Ma(f){var y=new f.constructor(f.source,An.exec(f));return y.lastIndex=f.lastIndex,y}function sr(f){return pf?yr(pf.call(f)):{}}function Os(f,y){var T=y?fg(f.buffer):f.buffer;return new f.constructor(T,f.byteOffset,f.length)}function Rl(f,y){if(f!==y){var T=f!==n,N=f===null,V=f===f,Z=Is(f),ce=y!==n,se=y===null,Ee=y===y,We=Is(y);if(!se&&!We&&!Z&&f>y||Z&&ce&&Ee&&!se&&!We||N&&ce&&Ee||!T&&Ee||!V)return 1;if(!N&&!Z&&!We&&f=se)return Ee;var We=T[N];return Ee*(We=="desc"?-1:1)}}return f.index-y.index}function My(f,y,T,N){for(var V=-1,Z=f.length,ce=T.length,se=-1,Ee=y.length,We=Oi(Z-ce,0),et=Pe(Ee+We),ft=!N;++se1?T[V-1]:n,ce=V>2?T[2]:n;for(Z=f.length>3&&typeof Z=="function"?(V--,Z):n,ce&&Wa(T[0],T[1],ce)&&(Z=V<3?n:Z,V=1),y=yr(y);++N-1?V[Z?y[ce]:ce]:n}}function pg(f){return or(function(y){var T=y.length,N=T,V=Xn.prototype.thru;for(f&&y.reverse();N--;){var Z=y[N];if(typeof Z!="function")throw new ia(o);if(V&&!ce&&Ue(Z)=="wrapper")var ce=new Xn([],!0)}for(N=ce?N:T;++N1&&dr.reverse(),et&&Eese))return!1;var We=Z.get(f),et=Z.get(y);if(We&&et)return We==y&&et==f;var ft=-1,Nt=!0,$t=T&k?new ks:n;for(Z.set(f,y),Z.set(y,f);++ft1?"& ":"")+y[N],y=y.join(T>2?", ":" "),f.replace(nu,`{ /* [wrapped with `+y+`] */ `)}function xu(f){return Dn(f)||wc(f)||!!(Dh&&f&&f[Dh])}function zl(f,y){var T=typeof f;return y=y??re,!!y&&(T=="number"||T!="symbol"&&Mr.test(f))&&f>-1&&f%1==0&&f0){if(++y>=fe)return arguments[0]}else y=0;return f.apply(n,arguments)}}function zy(f,y){var T=-1,N=f.length,V=N-1;for(y=y===n?N:y;++T1?f[y-1]:n;return T=typeof T=="function"?(f.pop(),T):n,fd(f,T)});function $y(f){var y=Y(f);return y.__chain__=!0,y}function $O(f,y){return y(f),f}function wg(f,y){return y(f)}var d_=or(function(f){var y=f.length,T=y?f[0]:0,N=this.__wrapped__,V=function(Z){return fc(Z,f)};return y>1||this.__actions__.length||!(N instanceof Wn)||!zl(T)?this.thru(V):(N=N.slice(T,+T+(y?1:0)),N.__actions__.push({func:wg,args:[V],thisArg:n}),new Xn(N,this.__chain__).thru(function(Z){return y&&!Z.length&&Z.push(n),Z}))});function Cg(){return $y(this)}function Cu(){return new Xn(this.value(),this.__chain__)}function gx(){this.__values__===n&&(this.__values__=jx(this.value()));var f=this.__index__>=this.__values__.length,y=f?n:this.__values__[this.__index__++];return{done:f,value:y}}function Im(){return this}function yx(f){for(var y,T=this;T instanceof Nh;){var N=Fy(T);N.__index__=0,N.__values__=n,y?V.__wrapped__=N:y=N;var V=N;T=T.__wrapped__}return V.__wrapped__=f,y}function eD(){var f=this.__wrapped__;if(f instanceof Wn){var y=f;return this.__actions__.length&&(y=new Wn(this)),y=y.reverse(),y.__actions__.push({func:wg,args:[Ky],thisArg:n}),new Xn(y,this.__chain__)}return this.thru(Ky)}function Mf(){return gc(this.__wrapped__,this.__actions__)}var Rm=Kh(function(f,y,T){hr.call(f,T)?++f[T]:So(f,T,1)});function tD(f,y,T){var N=Dn(f)?ii:ym;return T&&Wa(f,y,T)&&(y=n),N(f,rt(y,3))}function eb(f,y){var T=Dn(f)?ws:il;return T(f,rt(y,3))}var js=hg(JE),qa=hg(ex);function xc(f,y){return xa(hd(f,y),1)}function Ya(f,y){return xa(hd(f,y),ie)}function _o(f,y,T){return T=T===n?1:xn(T),xa(hd(f,y),T)}function tb(f,y){var T=Dn(f)?pi:hu;return T(f,rt(y,3))}function nb(f,y){var T=Dn(f)?xs:Hh;return T(f,rt(y,3))}var nD=Kh(function(f,y,T){hr.call(f,T)?f[T].push(y):So(f,T,[y])});function Ut(f,y,T,N){f=ko(f)?f:Hl(f),T=T&&!N?xn(T):0;var V=f.length;return T<0&&(T=Oi(V+T,0)),hb(f)?T<=V&&f.indexOf(y,T)>-1:!!V&&sf(f,y,T)>-1}var Eg=tn(function(f,y,T){var N=-1,V=typeof y=="function",Z=ko(f)?Pe(f.length):[];return hu(f,function(ce){Z[++N]=V?mo(y,ce,T):pu(ce,y,T)}),Z}),bx=Kh(function(f,y,T){So(f,T,y)});function hd(f,y){var T=Dn(f)?ai:Qi;return T(f,rt(y,3))}function $h(f,y,T,N){return f==null?[]:(Dn(y)||(y=y==null?[]:[y]),T=N?n:T,Dn(T)||(T=T==null?[]:[T]),wo(f,y,T))}var Lr=Kh(function(f,y,T){f[T?0:1].push(y)},function(){return[[],[]]});function Ka(f,y,T){var N=Dn(f)?Eh:nm,V=arguments.length<3;return N(f,rt(y,4),T,V,hu)}function Xa(f,y,T){var N=Dn(f)?Sy:nm,V=arguments.length<3;return N(f,rt(y,4),T,V,Hh)}function rb(f,y){var T=Dn(f)?ws:il;return T(f,os(rt(y,3)))}function _g(f){var y=Dn(f)?bf:As;return y(f)}function Tg(f,y,T){(T?Wa(f,y,T):y===n)?y=1:y=xn(y);var N=Dn(f)?Ha:sd;return N(f,y)}function rD(f){var y=Dn(f)?VS:Ga;return y(f)}function iD(f){if(f==null)return 0;if(ko(f))return hb(f)?Es(f):f.length;var y=ji(f);return y==De||y==it?f.size:Ca(f).length}function Ye(f,y,T){var N=Dn(f)?af:rs;return T&&Wa(f,y,T)&&(y=n),N(f,rt(y,3))}var Bl=tn(function(f,y){if(f==null)return[];var T=y.length;return T>1&&Wa(f,y[0],y[1])?y=[]:T>2&&Wa(y[0],y[1],y[2])&&(y=[y[0]]),wo(f,xa(y,1),[])}),Eu=Ol||function(){return pn.Date.now()};function Sx(f,y){if(typeof y!="function")throw new ia(o);return f=xn(f),function(){if(--f<1)return y.apply(this,arguments)}}function Er(f,y,T){return y=T?n:y,y=f&&y==null?f.length:y,Ne(f,H,n,n,n,n,y)}function At(f,y){var T;if(typeof y!="function")throw new ia(o);return f=xn(f),function(){return--f>0&&(T=y.apply(this,arguments)),f<=1&&(y=n),T}}var jf=tn(function(f,y,T){var N=P;if(T.length){var V=$s(T,It(jf));N|=z}return Ne(f,N,y,T,V)}),f_=tn(function(f,y,T){var N=P|D;if(T.length){var V=$s(T,It(f_));N|=z}return Ne(y,N,f,T,V)});function To(f,y,T){y=T?n:y;var N=Ne(f,R,n,n,n,n,n,y);return N.placeholder=To.placeholder,N}function ib(f,y,T){y=T?n:y;var N=Ne(f,L,n,n,n,n,n,y);return N.placeholder=ib.placeholder,N}function ep(f,y,T){var N,V,Z,ce,se,Ee,We=0,et=!1,ft=!1,Nt=!0;if(typeof f!="function")throw new ia(o);y=ss(y)||0,yi(T)&&(et=!!T.leading,ft="maxWait"in T,Z=ft?Oi(ss(T.maxWait)||0,y):Z,Nt="trailing"in T?!!T.trailing:Nt);function $t(_a){var Ta=N,Go=V;return N=V=n,We=_a,ce=f.apply(Go,Ta),ce}function wn(_a){return We=_a,se=Dm(Jn,y),et?$t(_a):ce}function qn(_a){var Ta=_a-Ee,Go=_a-We,nT=y-Ta;return ft?ya(nT,Z-Go):nT}function fn(_a){var Ta=_a-Ee,Go=_a-We;return Ee===n||Ta>=y||Ta<0||ft&&Go>=Z}function Jn(){var _a=Eu();if(fn(_a))return dr(_a);se=Dm(Jn,qn(_a))}function dr(_a){return se=n,Nt&&N?$t(_a):(N=V=n,ce)}function ul(){se!==n&&Yh(se),We=0,N=Ee=V=se=n}function us(){return se===n?ce:dr(Eu())}function cl(){var _a=Eu(),Ta=fn(_a);if(N=arguments,V=this,Ee=_a,Ta){if(se===n)return wn(Ee);if(ft)return Yh(se),se=Dm(Jn,y),$t(Ee)}return se===n&&(se=Dm(Jn,y)),ce}return cl.cancel=ul,cl.flush=us,cl}var Nm=tn(function(f,y){return ag(f,1,y)}),h_=tn(function(f,y,T){return ag(f,ss(y)||0,T)});function p_(f){return Ne(f,J)}function sl(f,y){if(typeof f!="function"||y!=null&&typeof y!="function")throw new ia(o);var T=function(){var N=arguments,V=y?y.apply(this,N):N[0],Z=T.cache;if(Z.has(V))return Z.get(V);var ce=f.apply(this,N);return T.cache=Z.set(V,ce)||Z,ce};return T.cache=new(sl.Cache||Ts),T}sl.Cache=Ts;function os(f){if(typeof f!="function")throw new ia(o);return function(){var y=arguments;switch(y.length){case 0:return!f.call(this);case 1:return!f.call(this,y[0]);case 2:return!f.call(this,y[0],y[1]);case 3:return!f.call(this,y[0],y[1],y[2])}return!f.apply(this,y)}}function m_(f){return At(2,f)}var xx=Cm(function(f,y){y=y.length==1&&Dn(y[0])?ai(y[0],ra(rt())):ai(xa(y,1),ra(rt()));var T=y.length;return tn(function(N){for(var V=-1,Z=ya(N.length,T);++V=y}),wc=Sm(function(){return arguments}())?Sm:function(f){return Ii(f)&&hr.call(f,"callee")&&!$v.call(f,"callee")},Dn=Pe.isArray,lb=Ba?ra(Ba):sg;function ko(f){return f!=null&&Lm(f.length)&&!Tu(f)}function _i(f){return Ii(f)&&ko(f)}function Tx(f){return f===!0||f===!1||Ii(f)&&Ki(f)==Qe}var _u=ff||Eb,kx=Ss?ra(Ss):sa;function ub(f){return Ii(f)&&f.nodeType===1&&!Og(f)}function x_(f){if(f==null)return!0;if(ko(f)&&(Dn(f)||typeof f=="string"||typeof f.splice=="function"||_u(f)||tp(f)||wc(f)))return!f.length;var y=ji(f);if(y==De||y==it)return!f.size;if(Om(f))return!Ca(f).length;for(var T in f)if(hr.call(f,T))return!1;return!0}function Px(f,y){return wf(f,y)}function cb(f,y,T){T=typeof T=="function"?T:n;var N=T?T(f,y):n;return N===n?wf(f,y,n,T):!!N}function Ax(f){if(!Ii(f))return!1;var y=Ki(f);return y==qe||y==St||typeof f.message=="string"&&typeof f.name=="string"&&!Og(f)}function db(f){return typeof f=="number"&&hf(f)}function Tu(f){if(!yi(f))return!1;var y=Ki(f);return y==Ce||y==Lt||y==Xe||y==ar}function Ag(f){return typeof f=="number"&&f==xn(f)}function Lm(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=re}function yi(f){var y=typeof f;return f!=null&&(y=="object"||y=="function")}function Ii(f){return f!=null&&typeof f=="object"}var Ox=$o?ra($o):GS;function w_(f,y){return f===y||id(f,y,Sn(y))}function C_(f,y,T){return T=typeof T=="function"?T:n,id(f,y,Sn(y),T)}function aD(f){return Mx(f)&&f!=+f}function Dx(f){if(Ly(f))throw new nn(a);return pc(f)}function E_(f){return f===null}function __(f){return f==null}function Mx(f){return typeof f=="number"||Ii(f)&&Ki(f)==wt}function Og(f){if(!Ii(f)||Ki(f)!=Wt)return!1;var y=$c(f);if(y===null)return!0;var T=hr.call(y,"constructor")&&y.constructor;return typeof T=="function"&&T instanceof T&&Ai.call(T)==Vi}var Dg=Zs?ra(Zs):Jr;function fb(f){return Ag(f)&&f>=-re&&f<=re}var T_=_l?ra(_l):Qn;function hb(f){return typeof f=="string"||!Dn(f)&&Ii(f)&&Ki(f)==at}function Is(f){return typeof f=="symbol"||Ii(f)&&Ki(f)==bt}var tp=Kv?ra(Kv):Da;function k_(f){return f===n}function P_(f){return Ii(f)&&ji(f)==ot}function pb(f){return Ii(f)&&Ki(f)==Jt}var A_=O(mc),O_=O(function(f,y){return f<=y});function jx(f){if(!f)return[];if(ko(f))return hb(f)?vo(f):Co(f);if(tt&&f[tt])return uu(f[tt]());var y=ji(f),T=y==De?df:y==it?Qc:Hl;return T(f)}function Cc(f){if(!f)return f===0?f:0;if(f=ss(f),f===ie||f===-ie){var y=f<0?-1:1;return y*le}return f===f?f:0}function xn(f){var y=Cc(f),T=y%1;return y===y?T?y-T:y:0}function Fl(f){return f?fu(xn(f),0,de):0}function ss(f){if(typeof f=="number")return f;if(Is(f))return ee;if(yi(f)){var y=typeof f.valueOf=="function"?f.valueOf():f;f=yi(y)?y+"":y}if(typeof f!="string")return f===0?f:+f;f=Fa(f);var T=Ln.test(f);return T||Dr.test(f)?Bt(f.slice(2),T?2:8):Fn.test(f)?ee:+f}function mb(f){return Nl(f,Vo(f))}function Tn(f){return f?fu(xn(f),-re,re):f===0?f:0}function lr(f){return f==null?"":gi(f)}var D_=Eo(function(f,y){if(Om(y)||ko(y)){Nl(y,no(y),f);return}for(var T in y)hr.call(y,T)&&dc(f,T,y[T])}),Mg=Eo(function(f,y){Nl(y,Vo(y),f)}),If=Eo(function(f,y,T,N){Nl(y,Vo(y),f,N)}),vb=Eo(function(f,y,T,N){Nl(y,no(y),f,N)}),Ix=or(fc);function gb(f,y){var T=ba(f);return y==null?T:Vt(T,y)}var M_=tn(function(f,y){f=yr(f);var T=-1,N=y.length,V=N>2?y[2]:n;for(V&&Wa(y[0],y[1],V)&&(N=1);++T1),Z}),Nl(f,Be(f),T),N&&(T=oa(T,g|S|w,un));for(var V=y.length;V--;)jl(T,y[V]);return T});function dD(f,y){return Fx(f,os(rt(y)))}var L_=or(function(f,y){return f==null?{}:cg(f,y)});function Fx(f,y){if(f==null)return{};var T=ai(Be(f),function(N){return[N]});return y=rt(y),Gh(f,T,function(N,V){return y(N,V[0])})}function fD(f,y,T){y=Il(y,f);var N=-1,V=y.length;for(V||(V=1,f=n);++Ny){var N=f;f=y,y=N}if(T||f%1||y%1){var V=jh();return ya(f+V*(y-f+Le("1e-"+((V+"").length-1))),y)}return qh(f,y)}var z_=Ll(function(f,y,T){return y=y.toLowerCase(),f+(T?Wx(y):y)});function Wx(f){return Lg(lr(f).toLowerCase())}function qx(f){return f=lr(f),f&&f.replace(fi,Qv).replace(Qp,"")}function B_(f,y,T){f=lr(f),y=gi(y);var N=f.length;T=T===n?N:fu(xn(T),0,N);var V=T;return T-=y.length,T>=0&&f.slice(T,V)==y}function mD(f){return f=lr(f),f&&lo.test(f)?f.replace(ri,Pl):f}function vD(f){return f=lr(f),f&&tu.test(f)?f.replace(Jo,"\\$&"):f}var gD=Ll(function(f,y,T){return f+(T?"-":"")+y.toLowerCase()}),F_=Ll(function(f,y,T){return f+(T?" ":"")+y.toLowerCase()}),Yx=Pf("toLowerCase");function U_(f,y,T){f=lr(f),y=xn(y);var N=y?Es(f):0;if(!y||N>=y)return f;var V=(y-N)/2;return h(tl(V),T)+f+h(Lo(V),T)}function Kx(f,y,T){f=lr(f),y=xn(y);var N=y?Es(f):0;return y&&N>>0,T?(f=lr(f),f&&(typeof y=="string"||y!=null&&!Dg(y))&&(y=gi(y),!y&&lu(f))?bu(vo(f),0,T):f.split(y,T)):[]}var wD=Ll(function(f,y,T){return f+(T?" ":"")+Lg(y)});function CD(f,y,T){return f=lr(f),T=T==null?0:fu(xn(T),0,f.length),y=gi(y),f.slice(T,T+y.length)==y}function Xx(f,y,T){var N=Y.templateSettings;T&&Wa(f,y,T)&&(y=n),f=lr(f),y=If({},y,N,xt);var V=If({},y.imports,N.imports,xt),Z=no(V),ce=uf(V,Z),se,Ee,We=0,et=y.interpolate||co,ft="__p += '",Nt=Al((y.escape||co).source+"|"+et.source+"|"+(et===uo?er:co).source+"|"+(y.evaluate||co).source+"|$","g"),$t="//# sourceURL="+(hr.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jp+"]")+` `;f.replace(Nt,function(fn,Jn,dr,ul,us,cl){return dr||(dr=ul),ft+=f.slice(We,cl).replace(ru,ec),Jn&&(se=!0,ft+=`' + __e(`+Jn+`) + '`),us&&(Ee=!0,ft+=`'; `+us+`; __p += '`),dr&&(ft+=`' + ((__t = (`+dr+`)) == null ? '' : __t) + '`),We=cl+fn.length,fn}),ft+=`'; `;var wn=hr.call(y,"variable")&&y.variable;if(!wn)ft=`with (obj) { `+ft+` } `;else if(Pt.test(wn))throw new nn(s);ft=(Ee?ft.replace(zt,""):ft).replace(vr,"$1").replace(gr,"$1;"),ft="function("+(wn||"obj")+`) { `+(wn?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(se?", __e = _.escape":"")+(Ee?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+ft+`return __p }`;var qn=W_(function(){return Un(Z,$t+"return "+ft).apply(n,ce)});if(qn.source=ft,Ax(qn))throw qn;return qn}function Qx(f){return lr(f).toLowerCase()}function Zx(f){return lr(f).toUpperCase()}function ED(f,y,T){if(f=lr(f),f&&(T||y===n))return Fa(f);if(!f||!(y=gi(y)))return f;var N=vo(f),V=vo(y),Z=Cs(N,V),ce=kl(N,V)+1;return bu(N,Z,ce).join("")}function _D(f,y,T){if(f=lr(f),f&&(T||y===n))return f.slice(0,om(f)+1);if(!f||!(y=gi(y)))return f;var N=vo(f),V=kl(N,vo(y))+1;return bu(N,0,V).join("")}function TD(f,y,T){if(f=lr(f),f&&(T||y===n))return f.replace(Xu,"");if(!f||!(y=gi(y)))return f;var N=vo(f),V=Cs(N,vo(y));return bu(N,V).join("")}function G_(f,y){var T=$,N=K;if(yi(y)){var V="separator"in y?y.separator:V;T="length"in y?xn(y.length):T,N="omission"in y?gi(y.omission):N}f=lr(f);var Z=f.length;if(lu(f)){var ce=vo(f);Z=ce.length}if(T>=Z)return f;var se=T-Es(N);if(se<1)return N;var Ee=ce?bu(ce,0,se).join(""):f.slice(0,se);if(V===n)return Ee+N;if(ce&&(se+=Ee.length-se),Dg(V)){if(f.slice(se).search(V)){var We,et=Ee;for(V.global||(V=Al(V.source,lr(An.exec(V))+"g")),V.lastIndex=0;We=V.exec(et);)var ft=We.index;Ee=Ee.slice(0,ft===n?se:ft)}}else if(f.indexOf(gi(V),se)!=se){var Nt=Ee.lastIndexOf(V);Nt>-1&&(Ee=Ee.slice(0,Nt))}return Ee+N}function Jx(f){return f=lr(f),f&&qs.test(f)?f.replace(hn,Jv):f}var kD=Ll(function(f,y,T){return f+(T?" ":"")+y.toUpperCase()}),Lg=Pf("toUpperCase");function $x(f,y,T){return f=lr(f),y=T?n:y,y===n?cf(f)?Zc(f):Xv(f):f.match(y)||[]}var W_=tn(function(f,y){try{return mo(f,n,y)}catch(T){return Ax(T)?T:new nn(T)}}),PD=or(function(f,y){return pi(y,function(T){T=wu(T),So(f,T,jf(f[T],f))}),f});function xb(f){var y=f==null?0:f.length,T=rt();return f=y?ai(f,function(N){if(typeof N[1]!="function")throw new ia(o);return[T(N[0]),N[1]]}):[],tn(function(N){for(var V=-1;++Vre)return[];var T=de,N=ya(f,de);y=rt(y),f-=de;for(var V=Ah(N,y);++T0||y<0)?new Wn(T):(f<0?T=T.takeRight(-f):f&&(T=T.drop(f)),y!==n&&(y=xn(y),T=y<0?T.dropRight(-y):T.take(y-f)),T)},Wn.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},Wn.prototype.toArray=function(){return this.take(de)},Ps(Wn.prototype,function(f,y){var T=/^(?:filter|find|map|reject)|While$/.test(y),N=/^(?:head|last)$/.test(y),V=Y[N?"take"+(y=="last"?"Right":""):y],Z=N||/^find/.test(y);V&&(Y.prototype[y]=function(){var ce=this.__wrapped__,se=N?[1]:arguments,Ee=ce instanceof Wn,We=se[0],et=Ee||Dn(ce),ft=function(Jn){var dr=V.apply(Y,Tl([Jn],se));return N&&Nt?dr[0]:dr};et&&T&&typeof We=="function"&&We.length!=1&&(Ee=et=!1);var Nt=this.__chain__,$t=!!this.__actions__.length,wn=Z&&!Nt,qn=Ee&&!$t;if(!Z&&et){ce=qn?ce:new Wn(this);var fn=f.apply(ce,se);return fn.__actions__.push({func:wg,args:[ft],thisArg:n}),new Xn(fn,Nt)}return wn&&qn?f.apply(this,se):(fn=this.thru(ft),wn?N?fn.value()[0]:fn.value():fn)})}),pi(["pop","push","shift","sort","splice","unshift"],function(f){var y=du[f],T=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",N=/^(?:pop|shift)$/.test(f);Y.prototype[f]=function(){var V=arguments;if(N&&!this.__chain__){var Z=this.value();return y.apply(Dn(Z)?Z:[],V)}return this[T](function(ce){return y.apply(Dn(ce)?ce:[],V)})}}),Ps(Wn.prototype,function(f,y){var T=Y[y];if(T){var N=T.name+"";hr.call(zo,N)||(zo[N]=[]),zo[N].push({name:y,func:T})}}),zo[Af(n,D).name]=[{name:"wrapper",func:n}],Wn.prototype.clone=Ua,Wn.prototype.reverse=Sa,Wn.prototype.value=Lh,Y.prototype.at=d_,Y.prototype.chain=Cg,Y.prototype.commit=Cu,Y.prototype.next=gx,Y.prototype.plant=yx,Y.prototype.reverse=eD,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=Mf,Y.prototype.first=Y.prototype.head,tt&&(Y.prototype[tt]=Im),Y},Oa=go();rr?((rr.exports=Oa)._=Oa,On._=Oa):pn._=Oa}).call(Bs)})(kK,Je);const $g=(e,t,n,r,i,a,o)=>{const s=e/2-(n+i/2)*o,c=t/2-(r+a/2)*o;return{x:s,y:c}},e0=(e,t,n,r,i=.95)=>{const a=e*i/n,o=t*i/r;return Math.min(1,Math.min(a,o))},PK=.999,AK=.1,OK=20,Ub=.95,H6=30,uk=10,V6=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),Ym=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,a=t/n;let o=t*n,s=448;for(;o1?(r.width=s,r.height=bd(s/a,64)):a<1&&(r.height=s,r.width=bd(s*a,64)),o=r.width*r.height;return r},DK=e=>({width:bd(e.width,64),height:bd(e.height,64)}),G6=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],MK=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],ck=e=>e.kind==="line"&&e.layer==="mask",jK=e=>e.kind==="line"&&e.layer==="base",O2=e=>e.kind==="image"&&e.layer==="base",IK=e=>e.kind==="fillRect"&&e.layer==="base",RK=e=>e.kind==="eraseRect"&&e.layer==="base",NK=e=>e.kind==="line",Hb={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},W6=Wm({name:"canvas",initialState:{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:Hb,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"},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(Je.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!ck(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:cp(Je.clamp(n.width,64,512),64),height:cp(Je.clamp(n.height,64,512),64)},a={x:bd(n.width/2-i.width/2,64),y:bd(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const c=Ym(i);e.scaledBoundingBoxDimensions=c}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=a,e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.layerState={...Hb,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const o=e0(r.width,r.height,n.width,n.height,Ub),s=$g(r.width,r.height,0,0,n.width,n.height,o);e.stageScale=o,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=DK(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=Ym(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=V6(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(Je.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(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...Hb.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(Je.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(Je.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:a,shouldRestrictStrokesToBox:o}=e;if(n==="move"||n==="colorPicker")return;const s=a/2,c=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const d={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...c};o&&(d.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(d),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(NK);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(Je.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(Je.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(Je.cloneDeep(e.layerState)),e.layerState=Hb,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(O2),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const p=e0(i.width,i.height,512,512,Ub),g=$g(i.width,i.height,0,0,512,512,p),S={width:512,height:512};if(e.stageScale=p,e.stageCoordinates=g,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=S,e.boundingBoxScaleMethod==="auto"){const w=Ym(S);e.scaledBoundingBoxDimensions=w}return}const{width:a,height:o}=r,c=e0(t,n,a,o,.95),d=$g(i.width,i.height,0,0,a,o,c);e.minimumStageScale=c,e.stageScale=c,e.stageCoordinates=V6(d),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(O2)){const i=e0(r.width,r.height,512,512,Ub),a=$g(r.width,r.height,0,0,512,512,i),o={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=a,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=o,e.boundingBoxScaleMethod==="auto"){const s=Ym(o);e.scaledBoundingBoxDimensions=s}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:a}}=e,{x:o,y:s,width:c,height:d}=n;if(c!==0&&d!==0){const p=r?1:e0(i,a,c,d,Ub),g=$g(i,a,o,s,c,d,p);e.stageScale=p,e.stageCoordinates=g}else{const p=e0(i,a,512,512,Ub),g=$g(i,a,0,0,512,512,p),S={width:512,height:512};if(e.stageScale=p,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=S,e.boundingBoxScaleMethod==="auto"){const w=Ym(S);e.scaledBoundingBoxDimensions=w}}},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(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...Hb.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,a=r.width/i,o=r.height/i;if(n.x<0||n.x+t.width>a||n.y<0||n.y+t.height>o){const s={width:cp(Je.clamp(a,64,512),64),height:cp(Je.clamp(o,64,512),64)},c={x:bd(a/2-s.width/2,64),y:bd(o/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=c,e.boundingBoxScaleMethod==="auto"){const d=Ym(s);e.scaledBoundingBoxDimensions=d}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=Ym(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(Je.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:q6,addFillRect:Y6,addImageToStagingArea:LK,addLine:zK,addPointToCurrentLine:K6,clearCanvasHistory:X6,clearMask:dk,commitColorPickerColor:BK,commitStagingAreaImage:FK,discardStagedImages:UK,fitBoundingBoxToStage:Yje,mouseLeftCanvas:HK,nextStagingAreaImage:VK,prevStagingAreaImage:GK,redo:WK,resetCanvas:fk,resetCanvasInteractionState:qK,resetCanvasView:Q6,resizeAndScaleCanvas:D2,resizeCanvas:YK,setBoundingBoxCoordinates:hk,setBoundingBoxDimensions:Vb,setBoundingBoxPreviewFill:Kje,setBoundingBoxScaleMethod:KK,setBrushColor:t0,setBrushSize:n0,setCanvasContainerDimensions:XK,setColorPickerColor:QK,setCursorPosition:ZK,setDoesCanvasNeedScaling:Wo,setInitialCanvasImage:M2,setIsDrawing:Z6,setIsMaskEnabled:Gb,setIsMouseOverBoundingBox:j2,setIsMoveBoundingBoxKeyHeld:Xje,setIsMoveStageKeyHeld:Qje,setIsMovingBoundingBox:pk,setIsMovingStage:I2,setIsTransformingBoundingBox:mk,setLayer:R2,setMaskColor:J6,setMergedCanvas:JK,setShouldAutoSave:$6,setShouldCropToBoundingBoxOnSave:ej,setShouldDarkenOutsideBoundingBox:tj,setShouldLockBoundingBox:Zje,setShouldPreserveMaskedArea:nj,setShouldShowBoundingBox:$K,setShouldShowBrush:Jje,setShouldShowBrushPreview:$je,setShouldShowCanvasDebugInfo:rj,setShouldShowCheckboardTransparency:eIe,setShouldShowGrid:ij,setShouldShowIntermediates:aj,setShouldShowStagingImage:eX,setShouldShowStagingOutline:oj,setShouldSnapToGrid:N2,setStageCoordinates:sj,setStageScale:tX,setTool:Sd,toggleShouldLockBoundingBox:tIe,toggleTool:nIe,undo:nX,setScaledBoundingBoxDimensions:L2,setShouldRestrictStrokesToBox:lj}=W6.actions,rX=W6.reducer,uj=Wm({name:"gallery",initialState:{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},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,a=i.filter(o=>o.uuid!==n);if(n===e.currentImageUuid){const o=i.findIndex(c=>c.uuid===n),s=Je.clamp(o,0,a.length-1);e.currentImage=a.length?a[s]:void 0,e.currentImageUuid=a.length?a[s].uuid:""}e.categories[r].images=a},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:a,mtime:o}=n,s=e.categories[r];s.images.find(c=>c.url===a&&c.mtime===o)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=o)},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,a=e.categories[i].images;if(n.length>0){const o=n.filter(s=>!a.find(c=>c.url===s.url&&c.mtime===s.mtime));if(e.categories[i].images=a.concat(o).sort((s,c)=>c.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},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:r0,clearIntermediateImage:vk,removeImage:cj,setCurrentImage:dj,addGalleryImages:iX,setIntermediateImage:aX,selectNextImage:fj,selectPrevImage:hj,setShouldPinGallery:oX,setShouldShowGallery:Km,setGalleryImageMinimumWidth:Wb,setGalleryImageObjectFit:sX,setShouldHoldGalleryOpen:lX,setShouldAutoSwitchToNewImages:uX,setCurrentCategory:z2,setGalleryWidth:cX,setShouldUseSingleGalleryColumn:dX}=uj.actions,fX=uj.reducer,pj=Wm({name:"lightbox",initialState:{isLightboxOpen:!1},reducers:{setIsLightboxOpen:(e,t)=>{e.isLightboxOpen=t.payload}}}),{setIsLightboxOpen:Xm}=pj.actions,hX=pj.reducer,i0=e=>typeof e=="string"?e:e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" ");function mj(e){let t=typeof e=="string"?e:i0(e),n="";const r=new RegExp(/\[([^\][]*)]/,"gi"),i=[...t.matchAll(r)].map(a=>a[1]);return i.length&&(n=i.join(" "),i.forEach(a=>{t=t.replace(`[${a}]`,"").replaceAll("[]","").trim()})),[t,n]}const pX=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return gk(r)?r:!1},gk=e=>Boolean(typeof e=="string"?pX(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),a=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&a)})),B2=e=>e.reduce((t,n,r,i)=>{const{seed:a,weight:o}=n;return t+=`${a}:${o}`,r!==i.length-1&&(t+=","),t},""),mX=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0],10),parseFloat(r[1])]),vj={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},gj=Wm({name:"generation",initialState:vj,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=i0(n)},setNegativePrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.negativePrompt=n:e.negativePrompt=i0(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},clampSymmetrySteps:e=>{e.horizontalSymmetrySteps=Je.clamp(e.horizontalSymmetrySteps,0,e.steps),e.verticalSymmetrySteps=Je.clamp(e.verticalSymmetrySteps,0,e.steps)},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},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:a,steps:o,cfg_scale:s,threshold:c,perlin:d,seamless:p,_hires_fix:g,width:S,height:w}=t.payload.image;a&&a.length>0?(e.seedWeights=B2(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=i0(r)),n&&(e.sampler=n),o&&(e.steps=o),s&&(e.cfgScale=s),typeof c>"u"?e.threshold=0:e.threshold=c,typeof d>"u"?e.perlin=0:e.perlin=d,typeof p=="boolean"&&(e.seamless=p),S&&(e.width=S),w&&(e.height=w)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:a,mask_image_path:o}=t.payload.image;n==="img2img"&&(a&&(e.initialImage=a),o&&(e.maskPath=o),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:a,variations:o,steps:s,cfg_scale:c,threshold:d,perlin:p,seamless:g,_hires_fix:S,width:w,height:C,strength:k,fit:P,init_image_path:D,mask_image_path:M}=t.payload.image;if(n==="img2img"&&(D&&(e.initialImage=D),M&&(e.maskPath=M),k&&(e.img2imgStrength=k),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),o&&o.length>0?(e.seedWeights=B2(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,a&&(e.seed=a,e.shouldRandomizeSeed=!1),i){const[R,L]=mj(i);R&&(e.prompt=R),L?e.negativePrompt=L:e.negativePrompt=""}r&&(e.sampler=r),s&&(e.steps=s),c&&(e.cfgScale=c),typeof d>"u"?e.threshold=0:e.threshold=d,typeof p>"u"?e.perlin=0:e.perlin=p,typeof g=="boolean"&&(e.seamless=g),w&&(e.width=w),C&&(e.height=C)},resetParametersState:e=>({...e,...vj}),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},setHorizontalSymmetrySteps:(e,t)=>{e.horizontalSymmetrySteps=t.payload},setVerticalSymmetrySteps:(e,t)=>{e.verticalSymmetrySteps=t.payload}}}),{clampSymmetrySteps:yj,clearInitialImage:bj,resetParametersState:sIe,resetSeed:lIe,setAllImageToImageParameters:vX,setAllParameters:Sj,setAllTextToImageParameters:uIe,setCfgScale:yk,setHeight:F2,setImg2imgStrength:bk,setInfillMethod:xj,setInitialImage:a0,setIterations:wj,setMaskPath:Cj,setParameter:cIe,setPerlin:Sk,setPrompt:Ej,setNegativePrompt:_j,setSampler:Tj,setSeamBlur:kj,setSeamless:Pj,setSeamSize:Aj,setSeamSteps:Oj,setSeamStrength:Dj,setSeed:qb,setSeedWeights:Mj,setShouldFitToWidthHeight:jj,setShouldGenerateVariations:gX,setShouldRandomizeSeed:yX,setSteps:xk,setThreshold:wk,setTileSize:Ij,setVariationAmount:Rj,setWidth:U2,setShouldUseSymmetry:bX,setHorizontalSymmetrySteps:Nj,setVerticalSymmetrySteps:Lj}=gj.actions,SX=gj.reducer,zj={codeformerFidelity:.75,facetoolStrength:.75,facetoolType:"gfpgan",hiresFix:!1,hiresStrength:.75,shouldLoopback:!1,shouldRunESRGAN:!1,shouldRunFacetool:!1,upscalingLevel:4,upscalingDenoising:.75,upscalingStrength:.75},Bj=Wm({name:"postprocessing",initialState:zj,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,...zj}),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:fIe,setCodeformerFidelity:Ck,setFacetoolStrength:H2,setFacetoolType:V2,setHiresFix:Fj,setHiresStrength:Uj,setShouldLoopback:xX,setShouldRunESRGAN:wX,setShouldRunFacetool:CX,setUpscalingLevel:Hj,setUpscalingDenoising:Ek,setUpscalingStrength:_k}=Bj.actions,EX=Bj.reducer;function Mu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vj(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]:{};Mu(this,e),this.init(t,n)}return ju(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||kX,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?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(i())return{};var o=r(a.shift());!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={}}return i()?{}:{obj:e,k:r(a.shift())}}function Zj(e,t,n){var r=Tk(e,t,Object),i=r.obj,a=r.k;i[a]=n}function OX(e,t,n,r){var i=Tk(e,t,Object),a=i.obj,o=i.k;a[o]=a[o]||[],r&&(a[o]=a[o].concat(n)),r||a[o].push(n)}function q2(e,t){var n=Tk(e,t),r=n.obj,i=n.k;if(r)return r[i]}function Jj(e,t,n){var r=q2(e,n);return r!==void 0?r:q2(t,n)}function $j(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]):$j(e[r],t[r],n):e[r]=t[r]);return e}function o0(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var DX={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function MX(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return DX[t]}):e}var Y2=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,jX=[" ",",","?","!",";"];function IX(e,t,n){t=t||"",n=n||"";var r=jX.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("|"),")")),a=!i.test(e);if(!a){var o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a}function eI(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 K2(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 tI(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,a=0;aa+o;)o++,s=r.slice(a,a+o).join(n),c=i[s];if(c===void 0)return;if(c===null)return null;if(t.endsWith(s)){if(typeof c=="string")return c;if(s&&typeof c[s]=="string")return c[s]}var d=r.slice(a+o).join(n);return d?tI(c,d,n):void 0}i=i[r[a]]}return i}}var LX=function(e){W2(n,e);var t=RX(n);function n(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Mu(this,n),i=t.call(this),Y2&&fp.call(dp(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 ju(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,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,d=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,p=[i,a];o&&typeof o!="string"&&(p=p.concat(o)),o&&typeof o=="string"&&(p=p.concat(c?o.split(c):o)),i.indexOf(".")>-1&&(p=i.split("."));var g=q2(this.data,p);return g||!d||typeof o!="string"?g:tI(this.data&&this.data[i]&&this.data[i][a],o,c)}},{key:"addResource",value:function(i,a,o,s){var c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},d=this.options.keySeparator;d===void 0&&(d=".");var p=[i,a];o&&(p=p.concat(d?o.split(d):o)),i.indexOf(".")>-1&&(p=i.split("."),s=a,a=p[1]),this.addNamespaces(a),Zj(this.data,p,s),c.silent||this.emit("added",i,a,o,s)}},{key:"addResources",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var c in o)(typeof o[c]=="string"||Object.prototype.toString.apply(o[c])==="[object Array]")&&this.addResource(i,a,c,o[c],{silent:!0});s.silent||this.emit("added",i,a,o)}},{key:"addResourceBundle",value:function(i,a,o,s,c){var d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},p=[i,a];i.indexOf(".")>-1&&(p=i.split("."),s=o,o=a,a=p[1]),this.addNamespaces(a);var g=q2(this.data,p)||{};s?$j(g,o,c):g=K2(K2({},g),o),Zj(this.data,p,g),d.silent||this.emit("added",i,a,o)}},{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"?K2(K2({},{}),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),o=a&&Object.keys(a)||[];return!!o.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(fp),nI={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,a){var o=this;return t.forEach(function(s){o.processors[s]&&(n=o.processors[s].process(n,r,i,a))}),n}};function rI(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;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 iI={},aI=function(e){W2(n,e);var t=zX(n);function n(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Mu(this,n),i=t.call(this),Y2&&fp.call(dp(i)),AX(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,dp(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=wd.create("translator"),i}return ju(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 o=this.resolve(i,a);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,a){var o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=a.ns||this.options.defaultNS||[],d=o&&i.indexOf(o)>-1,p=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!IX(i,o,s);if(d&&!p){var g=i.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:i,namespaces:c};var S=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(S[0])>-1)&&(c=S.shift()),i=S.join(s)}return typeof c=="string"&&(c=[c]),{key:i,namespaces:c}}},{key:"translate",value:function(i,a,o){var s=this;if(Ou(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,d=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,p=this.extractFromKey(i[i.length-1],a),g=p.key,S=p.namespaces,w=S[S.length-1],C=a.lng||this.language,k=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(C&&C.toLowerCase()==="cimode"){if(k){var P=a.nsSeparator||this.options.nsSeparator;return c?{res:"".concat(w).concat(P).concat(g),usedKey:g,exactUsedKey:g,usedLng:C,usedNS:w}:"".concat(w).concat(P).concat(g)}return c?{res:g,usedKey:g,exactUsedKey:g,usedLng:C,usedNS:w}:g}var D=this.resolve(i,a),M=D&&D.res,R=D&&D.usedKey||g,L=D&&D.exactUsedKey||g,z=Object.prototype.toString.apply(M),U=["[object Number]","[object Function]","[object RegExp]"],H=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,q=!this.i18nFormat||this.i18nFormat.handleAsObject,J=typeof M!="string"&&typeof M!="boolean"&&typeof M!="number";if(q&&M&&J&&U.indexOf(z)<0&&!(typeof H=="string"&&z==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,M,Fs(Fs({},a),{},{ns:S})):"key '".concat(g," (").concat(this.language,")' returned an object instead of string.");return c?(D.res=$,D):$}if(d){var K=z==="[object Array]",fe=K?[]:{},X=K?L:R;for(var G in M)if(Object.prototype.hasOwnProperty.call(M,G)){var te="".concat(X).concat(d).concat(G);fe[G]=this.translate(te,Fs(Fs({},a),{joinArrays:!1,ns:S})),fe[G]===te&&(fe[G]=M[G])}M=fe}}else if(q&&typeof H=="string"&&z==="[object Array]")M=M.join(H),M&&(M=this.extendTranslation(M,i,a,o));else{var oe=!1,ie=!1,re=a.count!==void 0&&typeof a.count!="string",le=n.hasDefaultValue(a),ee=re?this.pluralResolver.getSuffix(C,a.count,a):"",de=a["defaultValue".concat(ee)]||a.defaultValue;!this.isValidLookup(M)&&le&&(oe=!0,M=de),this.isValidLookup(M)||(ie=!0,M=g);var Re=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Ae=Re&&ie?void 0:M,_e=le&&de!==M&&this.options.updateMissing;if(ie||oe||_e){if(this.logger.log(_e?"updateKey":"missingKey",C,w,g,_e?de:M),d){var Me=this.resolve(g,Fs(Fs({},a),{},{keySeparator:!1}));Me&&Me.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 Te=[],Xe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Xe&&Xe[0])for(var Qe=0;Qe1&&arguments[1]!==void 0?arguments[1]:{},s,c,d,p,g;return typeof i=="string"&&(i=[i]),i.forEach(function(S){if(!a.isValidLookup(s)){var w=a.extractFromKey(S,o),C=w.key;c=C;var k=w.namespaces;a.options.fallbackNS&&(k=k.concat(a.options.fallbackNS));var P=o.count!==void 0&&typeof o.count!="string",D=P&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),M=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",R=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);k.forEach(function(L){a.isValidLookup(s)||(g=L,!iI["".concat(R[0],"-").concat(L)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(g)&&(iI["".concat(R[0],"-").concat(L)]=!0,a.logger.warn('key "'.concat(c,'" for languages "').concat(R.join(", "),`" won't get resolved as namespace "`).concat(g,'" 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!!!")),R.forEach(function(z){if(!a.isValidLookup(s)){p=z;var U=[C];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(U,C,z,L,o);else{var H;P&&(H=a.pluralResolver.getSuffix(z,o.count,o));var q="".concat(a.options.pluralSeparator,"zero");if(P&&(U.push(C+H),D&&U.push(C+q)),M){var J="".concat(C).concat(a.options.contextSeparator).concat(o.context);U.push(J),P&&(U.push(J+H),D&&U.push(J+q))}}for(var $;$=U.pop();)a.isValidLookup(s)||(d=$,s=a.getResource(z,L,$,o))}}))})}}),{res:s,usedKey:c,exactUsedKey:d,usedLng:p,usedNS:g}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,o,s):this.resourceStore.getResource(i,a,o,s)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&a===o.substring(0,a.length)&&i[o]!==void 0)return!0;return!1}}]),n}(fp);function kk(e){return e.charAt(0).toUpperCase()+e.slice(1)}var oI=function(){function e(t){Mu(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wd.create("languageUtils")}return ju(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(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]=kk(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]=kk(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=kk(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 o=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&n.forEach(function(a){if(!i){var o=r.getLanguagePartFromCode(a);if(r.isSupportedCode(o))return i=o;i=r.options.supportedLngs.find(function(s){if(s.indexOf(o)===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,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),o=[],s=function(d){d&&(i.isSupportedCode(d)?o.push(d):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(d)))};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)),a.forEach(function(c){o.indexOf(c)<0&&s(i.formatLanguageCode(c))}),o}}]),e}(),FX=[{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}],UX={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)}},HX=["v1","v2","v3"],sI={zero:0,one:1,two:2,few:3,many:4,other:5};function VX(){var e={};return FX.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:UX[t.fc]}})}),e}var GX=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Mu(this,e),this.languageUtils=t,this.options=n,this.logger=wd.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=VX()}return ju(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(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(o,s){return sI[o]-sI[s]}).map(function(o){return"".concat(r.options.prepend).concat(o)}):a.numbers.map(function(o){return r.getSuffix(n,o,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)),o=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var s=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!HX.includes(this.options.compatibilityJSON)}}]),e}();function lI(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 Ac(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};Mu(this,e),this.logger=wd.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return ju(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:MX,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?o0(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?o0(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?o0(r.nestingPrefix):r.nestingPrefixEscaped||o0("$t("),this.nestingSuffix=r.nestingSuffix?o0(r.nestingSuffix):r.nestingSuffixEscaped||o0(")"),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 o=this,s,c,d,p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function g(P){return P.replace(/\$/g,"$$$$")}var S=function(D){if(D.indexOf(o.formatSeparator)<0){var M=Jj(r,p,D);return o.alwaysFormat?o.format(M,void 0,i,Ac(Ac(Ac({},a),r),{},{interpolationkey:D})):M}var R=D.split(o.formatSeparator),L=R.shift().trim(),z=R.join(o.formatSeparator).trim();return o.format(Jj(r,p,L),z,i,Ac(Ac(Ac({},a),r),{},{interpolationkey:L}))};this.resetRegExp();var w=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,C=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,k=[{regex:this.regexpUnescape,safeValue:function(D){return g(D)}},{regex:this.regexp,safeValue:function(D){return o.escapeValue?g(o.escape(D)):g(D)}}];return k.forEach(function(P){for(d=0;s=P.regex.exec(n);){var D=s[1].trim();if(c=S(D),c===void 0)if(typeof w=="function"){var M=w(n,s,a);c=typeof M=="string"?M:""}else if(a&&Object.prototype.hasOwnProperty.call(a,D))c="";else if(C){c=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(D," for interpolating ").concat(n)),c="";else typeof c!="string"&&!o.useRawValueToEscape&&(c=Qj(c));var R=P.safeValue(c);if(n=n.replace(s[0],R),C?(P.regex.lastIndex+=c.length,P.regex.lastIndex-=s[0].length):P.regex.lastIndex=0,d++,d>=o.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,c;function d(w,C){var k=this.nestingOptionsSeparator;if(w.indexOf(k)<0)return w;var P=w.split(new RegExp("".concat(k,"[ ]*{"))),D="{".concat(P[1]);w=P[0],D=this.interpolate(D,c);var M=D.match(/'/g),R=D.match(/"/g);(M&&M.length%2===0&&!R||R.length%2!==0)&&(D=D.replace(/'/g,'"'));try{c=JSON.parse(D),C&&(c=Ac(Ac({},C),c))}catch(L){return this.logger.warn("failed parsing options string in nesting for key ".concat(w),L),"".concat(w).concat(k).concat(D)}return delete c.defaultValue,w}for(;o=this.nestingRegexp.exec(n);){var p=[];c=Ac({},a),c=c.replace&&typeof c.replace!="string"?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;var g=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var S=o[1].split(this.formatSeparator).map(function(w){return w.trim()});o[1]=S.shift(),p=S,g=!0}if(s=r(d.call(this,o[1].trim(),c),c),s&&o[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=Qj(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(n)),s=""),g&&(s=p.reduce(function(w,C){return i.format(w,C,a.lng,Ac(Ac({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),n=n.replace(o[0],s),this.regexp.lastIndex=0}return n}}]),e}();function uI(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 Gf(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 a=i.split(";");a.forEach(function(o){if(o){var s=o.split(":"),c=TX(s),d=c[0],p=c.slice(1),g=p.join(":").trim().replace(/^'+|'+$/g,"");n[d.trim()]||(n[d.trim()]=g),g==="false"&&(n[d.trim()]=!1),g==="true"&&(n[d.trim()]=!0),isNaN(g)||(n[d.trim()]=parseInt(g,10))}})}}return{formatName:t,formatOptions:n}}function s0(e){var t={};return function(r,i,a){var o=i+JSON.stringify(a),s=t[o];return s||(s=e(i,a),t[o]=s),s(r)}}var YX=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Mu(this,e),this.logger=wd.create("formatter"),this.options=t,this.formats={number:s0(function(n,r){var i=new Intl.NumberFormat(n,Gf({},r));return function(a){return i.format(a)}}),currency:s0(function(n,r){var i=new Intl.NumberFormat(n,Gf(Gf({},r),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:s0(function(n,r){var i=new Intl.DateTimeFormat(n,Gf({},r));return function(a){return i.format(a)}}),relativetime:s0(function(n,r){var i=new Intl.RelativeTimeFormat(n,Gf({},r));return function(a){return i.format(a,r.range||"day")}}),list:s0(function(n,r){var i=new Intl.ListFormat(n,Gf({},r));return function(a){return i.format(a)}})},this.init(t)}return ju(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()]=s0(r)}},{key:"format",value:function(n,r,i){var a=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=r.split(this.formatSeparator),c=s.reduce(function(d,p){var g=qX(p),S=g.formatName,w=g.formatOptions;if(a.formats[S]){var C=d;try{var k=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},P=k.locale||k.lng||o.locale||o.lng||i;C=a.formats[S](d,P,Gf(Gf(Gf({},w),o),k))}catch(D){a.logger.warn(D)}return C}else a.logger.warn("there was no format function for ".concat(S));return d},n);return c}}]),e}();function cI(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 dI(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 QX(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var ZX=function(e){W2(n,e);var t=KX(n);function n(r,i,a){var o,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Mu(this,n),o=t.call(this),Y2&&fp.call(dp(o)),o.backend=r,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=wd.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(a,s.backend,s),o}return ju(n,[{key:"queueLoad",value:function(i,a,o,s){var c=this,d={},p={},g={},S={};return i.forEach(function(w){var C=!0;a.forEach(function(k){var P="".concat(w,"|").concat(k);!o.reload&&c.store.hasResourceBundle(w,k)?c.state[P]=2:c.state[P]<0||(c.state[P]===1?p[P]===void 0&&(p[P]=!0):(c.state[P]=1,C=!1,p[P]===void 0&&(p[P]=!0),d[P]===void 0&&(d[P]=!0),S[k]===void 0&&(S[k]=!0)))}),C||(g[w]=!0)}),(Object.keys(d).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(d),pending:Object.keys(p),toLoadLanguages:Object.keys(g),toLoadNamespaces:Object.keys(S)}}},{key:"loaded",value:function(i,a,o){var s=i.split("|"),c=s[0],d=s[1];a&&this.emit("failedLoading",c,d,a),o&&this.store.addResourceBundle(c,d,o),this.state[i]=a?-1:2;var p={};this.queue.forEach(function(g){OX(g.loaded,[c],d),QX(g,i),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(function(S){p[S]||(p[S]={});var w=g.loaded[S];w.length&&w.forEach(function(C){p[S][C]===void 0&&(p[S][C]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(function(g){return!g.done})}},{key:"read",value:function(i,a,o){var s=this,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,p=arguments.length>5?arguments[5]:void 0;if(!i.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:o,tried:c,wait:d,callback:p});return}this.readingCalls++;var g=function(k,P){if(s.readingCalls--,s.waitingReads.length>0){var D=s.waitingReads.shift();s.read(D.lng,D.ns,D.fcName,D.tried,D.wait,D.callback)}if(k&&P&&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 d=this.queueLoad(i,a,s,c);if(!d.toLoad.length)return d.pending.length||c(),null;d.toLoad.forEach(function(p){o.loadOne(p)})}},{key:"load",value:function(i,a,o){this.prepareLoading(i,a,{},o)}},{key:"reload",value:function(i,a,o){this.prepareLoading(i,a,{reload:!0},o)}},{key:"loadOne",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),c=s[0],d=s[1];this.read(c,d,"read",void 0,void 0,function(p,g){p&&a.logger.warn("".concat(o,"loading namespace ").concat(d," for language ").concat(c," failed"),p),!p&&g&&a.logger.log("".concat(o,"loaded namespace ").concat(d," for language ").concat(c),g),a.loaded(i,p,g)})}},{key:"saveMissing",value:function(i,a,o,s,c){var d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},p=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(o,'" 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(!(o==null||o==="")){if(this.backend&&this.backend.create){var g=dI(dI({},d),{},{isUpdate:c}),S=this.backend.create.bind(this.backend);if(S.length<6)try{var w;S.length===5?w=S(i,a,o,s,g):w=S(i,a,o,s),w&&typeof w.then=="function"?w.then(function(C){return p(null,C)}).catch(p):p(null,w)}catch(C){p(C)}else S(i,a,o,s,p,g)}!i||!i[0]||this.store.addResource(i[0],a,o,s)}}}]),n}(fp);function fI(){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(Ou(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Ou(t[2])==="object"||Ou(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 hI(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 pI(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 Cd(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 X2(){}function eQ(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Q2=function(e){W2(n,e);var t=JX(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Mu(this,n),r=t.call(this),Y2&&fp.call(dp(r)),r.options=hI(i),r.services={},r.logger=wd,r.modules={external:[]},eQ(dp(r)),a&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,a),Yb(r,dp(r));setTimeout(function(){r.init(i,a)},0)}return r}return ju(n,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(o=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 s=fI();this.options=Cd(Cd(Cd({},s),this.options),hI(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Cd(Cd({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function c(D){return D?typeof D=="function"?new D:D:null}if(!this.options.isClone){this.modules.logger?wd.init(c(this.modules.logger),this.options):wd.init(null,this.options);var d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=YX);var p=new oI(this.options);this.store=new LX(this.options.resources,this.options);var g=this.services;g.logger=wd,g.resourceStore=this.store,g.languageUtils=p,g.pluralResolver=new GX(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(g.formatter=c(d),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new WX(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new ZX(c(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(D){for(var M=arguments.length,R=new Array(M>1?M-1:0),L=1;L1?M-1:0),L=1;L0&&S[0]!=="dev"&&(this.options.lng=S[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var w=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];w.forEach(function(D){i[D]=function(){var M;return(M=i.store)[D].apply(M,arguments)}});var C=["addResource","addResources","addResourceBundle","removeResourceBundle"];C.forEach(function(D){i[D]=function(){var M;return(M=i.store)[D].apply(M,arguments),i}});var k=Kb(),P=function(){var M=function(L,z){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),k.resolve(z),o(L,z)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return M(null,i.t.bind(i));i.changeLanguage(i.options.lng,M)};return this.options.resources||!this.options.initImmediate?P():setTimeout(P,0),k}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:X2,s=o,c=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(c&&c.toLowerCase()==="cimode")return s();var d=[],p=function(w){if(w){var C=a.services.languageUtils.toResolveHierarchy(w);C.forEach(function(k){d.indexOf(k)<0&&d.push(k)})}};if(c)p(c);else{var g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.forEach(function(S){return p(S)})}this.options.preload&&this.options.preload.forEach(function(S){return p(S)}),this.services.backendConnector.load(d,this.options.ns,function(S){!S&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(S)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Kb();return i||(i=this.languages),a||(a=this.options.ns),o||(o=X2),this.services.backendConnector.reload(i,a,function(c){s.resolve(),o(c)}),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"&&nI.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(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,a){var o=this;this.isLanguageChangingTo=i;var s=Kb();this.emit("languageChanging",i);var c=function(S){o.language=S,o.languages=o.services.languageUtils.toResolveHierarchy(S),o.resolvedLanguage=void 0,o.setResolvedLanguage(S)},d=function(S,w){w?(c(w),o.translator.changeLanguage(w),o.isLanguageChangingTo=void 0,o.emit("languageChanged",w),o.logger.log("languageChanged",w)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(S,function(){return o.t.apply(o,arguments)})},p=function(S){!i&&!S&&o.services.languageDetector&&(S=[]);var w=typeof S=="string"?S:o.services.languageUtils.getBestMatchFromCodes(S);w&&(o.language||c(w),o.translator.language||o.translator.changeLanguage(w),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage&&o.services.languageDetector.cacheUserLanguage(w)),o.loadResources(w,function(C){d(C,w)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(i),s}},{key:"getFixedT",value:function(i,a,o){var s=this,c=function d(p,g){var S;if(Ou(g)!=="object"){for(var w=arguments.length,C=new Array(w>2?w-2:0),k=2;k1&&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],c=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var p=function(w,C){var k=a.services.backendConnector.state["".concat(w,"|").concat(C)];return k===-1||k===2};if(o.precheck){var g=o.precheck(this,p);if(g!==void 0)return g}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(s,i)&&(!c||p(d,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Kb();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(c){o.options.ns.indexOf(c)<0&&o.options.ns.push(c)}),this.loadResources(function(c){s.resolve(),a&&a(c)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var o=Kb();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],c=i.filter(function(d){return s.indexOf(d)<0});return c.length?(this.options.preload=s.concat(c),this.loadResources(function(d){o.resolve(),a&&a(d)}),o):(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"],o=this.services&&this.services.languageUtils||new oI(fI());return a.indexOf(o.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]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:X2,s=Cd(Cd(Cd({},this.options),a),{isClone:!0}),c=new n(s);(a.debug!==void 0||a.prefix!==void 0)&&(c.logger=c.logger.clone(a));var d=["store","services","language"];return d.forEach(function(p){c[p]=i[p]}),c.services=Cd({},this.services),c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c.translator=new aI(c.services,c.options),c.translator.on("*",function(p){for(var g=arguments.length,S=new Array(g>1?g-1:0),w=1;w0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Q2(e,t)});var En=Q2.createInstance();En.createInstance=Q2.createInstance,En.createInstance,En.dir,En.init,En.loadResources,En.reloadResources,En.use,En.changeLanguage,En.getFixedT,En.t,En.exists,En.setDefaultNamespace,En.hasLoadedNamespace,En.loadNamespaces,En.loadLanguages;var mI=[],tQ=mI.forEach,nQ=mI.slice;function rQ(e){return tQ.call(nQ.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var vI=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,iQ=function(t,n,r){var i=r||{};i.path=i.path||"/";var a=encodeURIComponent(n),o="".concat(t,"=").concat(a);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!vI.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!vI.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var c=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(c){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},gI={create:function(t,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=iQ(t,encodeURIComponent(n),a)},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),a=i.split("&"),o=0;o0){var c=a[o].substring(0,s);c===t.lookupQuerystring&&(n=a[o].substring(s+1))}}}return n}},Xb=null,yI=function(){if(Xb!==null)return Xb;try{Xb=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Xb=!1}return Xb},sQ={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&yI()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&yI()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Qb=null,bI=function(){if(Qb!==null)return Qb;try{Qb=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Qb=!1}return Qb},lQ={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&bI()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&bI()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},uQ={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},cQ={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}},dQ={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}},fQ={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 hQ(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var SI=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Mu(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return ju(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=rQ(r,this.options||{},hQ()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(aQ),this.addDetector(oQ),this.addDetector(sQ),this.addDetector(lQ),this.addDetector(uQ),this.addDetector(cQ),this.addDetector(dQ),this.addDetector(fQ)}},{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 o=r.detectors[a].lookup(r.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),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)}))}}]),e}();SI.type="languageDetector";function Pk(e){return Pk=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},Pk(e)}var xI=[],pQ=xI.forEach,mQ=xI.slice;function Ak(e){return pQ.call(mQ.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function wI(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Pk(XMLHttpRequest))==="object"}function vQ(e){return!!e&&typeof e.then=="function"}function gQ(e){return vQ(e)?e:Promise.resolve(e)}function yQ(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 Zb={},bQ={get exports(){return Zb},set exports(e){Zb=e}},Jb={},SQ={get exports(){return Jb},set exports(e){Jb=e}},CI;function xQ(){return CI||(CI=1,function(e,t){var n=typeof self<"u"?self:Bs,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(o){var s={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(G){return G&&DataView.prototype.isPrototypeOf(G)}if(s.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(G){return G&&d.indexOf(Object.prototype.toString.call(G))>-1};function g(G){if(typeof G!="string"&&(G=String(G)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(G))throw new TypeError("Invalid character in header field name");return G.toLowerCase()}function S(G){return typeof G!="string"&&(G=String(G)),G}function w(G){var te={next:function(){var oe=G.shift();return{done:oe===void 0,value:oe}}};return s.iterable&&(te[Symbol.iterator]=function(){return te}),te}function C(G){this.map={},G instanceof C?G.forEach(function(te,oe){this.append(oe,te)},this):Array.isArray(G)?G.forEach(function(te){this.append(te[0],te[1])},this):G&&Object.getOwnPropertyNames(G).forEach(function(te){this.append(te,G[te])},this)}C.prototype.append=function(G,te){G=g(G),te=S(te);var oe=this.map[G];this.map[G]=oe?oe+", "+te:te},C.prototype.delete=function(G){delete this.map[g(G)]},C.prototype.get=function(G){return G=g(G),this.has(G)?this.map[G]:null},C.prototype.has=function(G){return this.map.hasOwnProperty(g(G))},C.prototype.set=function(G,te){this.map[g(G)]=S(te)},C.prototype.forEach=function(G,te){for(var oe in this.map)this.map.hasOwnProperty(oe)&&G.call(te,this.map[oe],oe,this)},C.prototype.keys=function(){var G=[];return this.forEach(function(te,oe){G.push(oe)}),w(G)},C.prototype.values=function(){var G=[];return this.forEach(function(te){G.push(te)}),w(G)},C.prototype.entries=function(){var G=[];return this.forEach(function(te,oe){G.push([oe,te])}),w(G)},s.iterable&&(C.prototype[Symbol.iterator]=C.prototype.entries);function k(G){if(G.bodyUsed)return Promise.reject(new TypeError("Already read"));G.bodyUsed=!0}function P(G){return new Promise(function(te,oe){G.onload=function(){te(G.result)},G.onerror=function(){oe(G.error)}})}function D(G){var te=new FileReader,oe=P(te);return te.readAsArrayBuffer(G),oe}function M(G){var te=new FileReader,oe=P(te);return te.readAsText(G),oe}function R(G){for(var te=new Uint8Array(G),oe=new Array(te.length),ie=0;ie-1?te:G}function q(G,te){te=te||{};var oe=te.body;if(G instanceof q){if(G.bodyUsed)throw new TypeError("Already read");this.url=G.url,this.credentials=G.credentials,te.headers||(this.headers=new C(G.headers)),this.method=G.method,this.mode=G.mode,this.signal=G.signal,!oe&&G._bodyInit!=null&&(oe=G._bodyInit,G.bodyUsed=!0)}else this.url=String(G);if(this.credentials=te.credentials||this.credentials||"same-origin",(te.headers||!this.headers)&&(this.headers=new C(te.headers)),this.method=H(te.method||this.method||"GET"),this.mode=te.mode||this.mode||null,this.signal=te.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&oe)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(oe)}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function J(G){var te=new FormData;return G.trim().split("&").forEach(function(oe){if(oe){var ie=oe.split("="),re=ie.shift().replace(/\+/g," "),le=ie.join("=").replace(/\+/g," ");te.append(decodeURIComponent(re),decodeURIComponent(le))}}),te}function $(G){var te=new C,oe=G.replace(/\r?\n[\t ]+/g," ");return oe.split(/\r?\n/).forEach(function(ie){var re=ie.split(":"),le=re.shift().trim();if(le){var ee=re.join(":").trim();te.append(le,ee)}}),te}z.call(q.prototype);function K(G,te){te||(te={}),this.type="default",this.status=te.status===void 0?200:te.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in te?te.statusText:"OK",this.headers=new C(te.headers),this.url=te.url||"",this._initBody(G)}z.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new C(this.headers),url:this.url})},K.error=function(){var G=new K(null,{status:0,statusText:""});return G.type="error",G};var fe=[301,302,303,307,308];K.redirect=function(G,te){if(fe.indexOf(te)===-1)throw new RangeError("Invalid status code");return new K(null,{status:te,headers:{location:G}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(te,oe){this.message=te,this.name=oe;var ie=Error(te);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function X(G,te){return new Promise(function(oe,ie){var re=new q(G,te);if(re.signal&&re.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var le=new XMLHttpRequest;function ee(){le.abort()}le.onload=function(){var de={status:le.status,statusText:le.statusText,headers:$(le.getAllResponseHeaders()||"")};de.url="responseURL"in le?le.responseURL:de.headers.get("X-Request-URL");var Re="response"in le?le.response:le.responseText;oe(new K(Re,de))},le.onerror=function(){ie(new TypeError("Network request failed"))},le.ontimeout=function(){ie(new TypeError("Network request failed"))},le.onabort=function(){ie(new o.DOMException("Aborted","AbortError"))},le.open(re.method,re.url,!0),re.credentials==="include"?le.withCredentials=!0:re.credentials==="omit"&&(le.withCredentials=!1),"responseType"in le&&s.blob&&(le.responseType="blob"),re.headers.forEach(function(de,Re){le.setRequestHeader(Re,de)}),re.signal&&(re.signal.addEventListener("abort",ee),le.onreadystatechange=function(){le.readyState===4&&re.signal.removeEventListener("abort",ee)}),le.send(typeof re._bodyInit>"u"?null:re._bodyInit)})}return X.polyfill=!0,a.fetch||(a.fetch=X,a.Headers=C,a.Request=q,a.Response=K),o.Headers=C,o.Request=q,o.Response=K,o.fetch=X,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(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}(SQ,Jb)),Jb}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Bs<"u"&&Bs.fetch?n=Bs.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof yQ<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||xQ();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(bQ,Zb);const EI=Zb,_I=hq({__proto__:null,default:EI},[Zb]);function Z2(e){return Z2=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},Z2(e)}var Wf;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Wf=global.fetch:typeof window<"u"&&window.fetch?Wf=window.fetch:Wf=fetch);var $b;wI()&&(typeof global<"u"&&global.XMLHttpRequest?$b=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&($b=window.XMLHttpRequest));var J2;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?J2=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(J2=window.ActiveXObject)),!Wf&&_I&&!$b&&!J2&&(Wf=EI||_I),typeof Wf!="function"&&(Wf=void 0);var Ok=function(t,n){if(n&&Z2(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},TI=function(t,n,r){Wf(t,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)},kI=!1,wQ=function(t,n,r,i){t.queryStringParams&&(n=Ok(n,t.queryStringParams));var a=Ak({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(a["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=Ak({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},kI?{}:o);try{TI(n,s,i)}catch(c){if(!o||Object.keys(o).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(o).forEach(function(d){delete s[d]}),TI(n,s,i),kI=!0}catch(d){i(d)}}},CQ=function(t,n,r,i){r&&Z2(r)==="object"&&(r=Ok("",r).slice(1)),t.queryStringParams&&(n=Ok(n,t.queryStringParams));try{var a;$b?a=new $b:a=new J2("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var s in o)a.setRequestHeader(s,o[s]);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)}},EQ=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Wf&&n.indexOf("file:")!==0)return wQ(t,n,r,i);if(wI()||typeof ActiveXObject=="function")return CQ(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function e1(e){return e1=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},e1(e)}function _Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PI(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_Q(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return TQ(e,[{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=Ak(i,this.options||{},AQ()),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,o){var s=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=gQ(c),c.then(function(d){if(!d)return o(null,{});var p=s.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(p,o,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var o=this;this.options.request(this.options,n,void 0,function(s,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&&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 d,p;try{typeof c.data=="string"?d=o.options.parse(c.data,i,a):d=c.data}catch{p="failed parsing "+n+" to json"}if(p)return r(p,!1);r(null,d)})}},{key:"create",value:function(n,r,i,a,o){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,a),d=0,p=[],g=[];n.forEach(function(S){var w=s.options.addPath;typeof s.options.addPath=="function"&&(w=s.options.addPath(S,r));var C=s.services.interpolator.interpolate(w,{lng:S,ns:r});s.options.request(s.options,C,c,function(k,P){d+=1,p.push(k),g.push(P),d===n.length&&typeof o=="function"&&o(p,g)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,o=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var c=[],d=function(g){var S=a.toResolveHierarchy(g);S.forEach(function(w){c.indexOf(w)<0&&c.push(w)})};d(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(p){return d(p)}),c.forEach(function(p){n.allOptions.ns.forEach(function(g){i.read(p,g,"read",null,null,function(S,w){S&&o.warn("loading namespace ".concat(g," for language ").concat(p," failed"),S),!S&&w&&o.log("loaded namespace ".concat(g," for language ").concat(p),w),i.loaded("".concat(p,"|").concat(g),S,w)})})})}}}]),e}();OI.type="backend";function OQ(){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,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var o=function(c,d){var p=t.services.backendConnector.state["".concat(c,"|").concat(d)];return p===-1||p===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(r,e)&&(!i||o(a,e)))}function MQ(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Dk("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,o){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}):DQ(e,t,n)}var jQ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,IQ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},RQ=function(t){return IQ[t]},NQ=function(t){return t.replace(jQ,RQ)};function jI(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 II(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};Mk=II(II({},Mk),e)}function zQ(){return Mk}var RI;function BQ(e){RI=e}function FQ(){return RI}var UQ={type:"3rdParty",init:function(t){LQ(t.options.react),BQ(t)}},HQ=A.createContext(),VQ=function(){function e(){Mu(this,e),this.usedNamespaces={}}return ju(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 GQ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,d=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(p){d=!0,i=p}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(d)throw i}}return s}}function WQ(e,t){return Gj(e)||GQ(e,t)||qj(e,t)||Yj()}function NI(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 jk(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=A.useContext(HQ)||{},i=r.i18n,a=r.defaultNS,o=n||i||FQ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new VQ),!o){Dk("You will need to pass in an i18next instance by using initReactI18next");var s=function(J,$){return typeof $=="string"?$:$&&Ou($)==="object"&&typeof $.defaultValue=="string"?$.defaultValue:Array.isArray(J)?J[J.length-1]:J},c=[s,{},!1];return c.t=s,c.i18n={},c.ready=!1,c}o.options.react&&o.options.react.wait!==void 0&&Dk("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=jk(jk(jk({},zQ()),o.options.react),t),p=d.useSuspense,g=d.keyPrefix,S=e||a||o.options&&o.options.defaultNS;S=typeof S=="string"?[S]:S||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(S);var w=(o.isInitialized||o.initializedStoreOnce)&&S.every(function(q){return MQ(q,o,d)});function C(){return o.getFixedT(null,d.nsMode==="fallback"?S:S[0],g)}var k=A.useState(C),P=WQ(k,2),D=P[0],M=P[1],R=S.join(),L=qQ(R),z=A.useRef(!0);A.useEffect(function(){var q=d.bindI18n,J=d.bindI18nStore;z.current=!0,!w&&!p&&MI(o,S,function(){z.current&&M(C)}),w&&L&&L!==R&&z.current&&M(C);function $(){z.current&&M(C)}return q&&o&&o.on(q,$),J&&o&&o.store.on(J,$),function(){z.current=!1,q&&o&&q.split(" ").forEach(function(K){return o.off(K,$)}),J&&o&&J.split(" ").forEach(function(K){return o.store.off(K,$)})}},[o,R]);var U=A.useRef(!0);A.useEffect(function(){z.current&&!U.current&&M(C),U.current=!1},[o,g]);var H=[D,o,w];if(H.t=D,H.i18n=o,H.ready=w,w||!w&&!p)return H;throw new Promise(function(q){MI(o,S,function(){q()})})}En.use(OI).use(SI).use(UQ).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const YQ={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:En.isInitialized?En.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}},LI=Wm({name:"system",initialState:YQ,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=En.t("common.statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?En.t("common.statusConnected"):En.t("common.statusDisconnected")},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,o={timestamp:n,message:r,level:i||"info"};e.log.push(o)},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=En.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=En.t("common.statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=En.t("common.statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},modelConvertRequested:e=>{e.currentStatus=En.t("common.statusConvertingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},modelMergingRequested:e=>{e.currentStatus=En.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:KQ,setIsProcessing:ql,addLogEntry:Mo,setShouldShowLogViewer:Ik,setIsConnected:zI,setSocketId:hIe,setShouldConfirmOnDelete:BI,setOpenAccordions:XQ,setSystemStatus:QQ,setCurrentStatus:Qm,setSystemConfig:ZQ,setShouldDisplayGuides:JQ,processingCanceled:$Q,errorOccurred:FI,errorSeen:UI,setModelList:l0,setIsCancelable:hp,modelChangeRequested:eZ,modelConvertRequested:tZ,modelMergingRequested:nZ,setSaveIntermediatesInterval:rZ,setEnableImageDebugging:iZ,generationRequested:aZ,addToast:qf,clearToastQueue:oZ,setProcessingIndeterminateTask:sZ,setSearchFolder:HI,setFoundModels:VI,setOpenModel:GI,setCancelType:WI,setCancelAfter:Rk}=LI.actions,lZ=LI.reducer,Nk=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],qI=Wm({name:"ui",initialState:{activeTab:0,currentTheme:"dark",parametersPanelScrollPosition:0,shouldHoldParametersPanelOpen:!1,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,addNewModelUIOption:null},reducers:{setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=Nk.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},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:pl,setCurrentTheme:uZ,setParametersPanelScrollPosition:cZ,setShouldHoldParametersPanelOpen:dZ,setShouldPinParametersPanel:fZ,setShouldShowParametersPanel:Zm,setShouldShowImageDetails:YI,setShouldUseCanvasBetaLayout:hZ,setShouldShowExistingModelsInSearch:pZ,setShouldUseSliders:mZ,setAddNewModelUIOption:Jm}=qI.actions,vZ=qI.reducer,Ed=Object.create(null);Ed.open="0",Ed.close="1",Ed.ping="2",Ed.pong="3",Ed.message="4",Ed.upgrade="5",Ed.noop="6";const $2=Object.create(null);Object.keys(Ed).forEach(e=>{$2[Ed[e]]=e});const gZ={type:"error",data:"parser error"},yZ=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",bZ=typeof ArrayBuffer=="function",SZ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,KI=({type:e,data:t},n,r)=>yZ&&t instanceof Blob?n?r(t):XI(t,r):bZ&&(t instanceof ArrayBuffer||SZ(t))?n?r(t):XI(new Blob([t]),r):r(Ed[e]+(t||"")),XI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)},QI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),p=new Uint8Array(d);for(r=0;r>4,p[i++]=(o&15)<<4|s>>2,p[i++]=(s&3)<<6|c&63;return d},wZ=typeof ArrayBuffer=="function",ZI=(e,t)=>{if(typeof e!="string")return{type:"message",data:JI(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CZ(e.substring(1),t)}:$2[n]?e.length>1?{type:$2[n],data:e.substring(1)}:{type:$2[n]}:gZ},CZ=(e,t)=>{if(wZ){const n=xZ(e);return JI(n,t)}else return{base64:!0,data:e}},JI=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},$I=String.fromCharCode(30),EZ=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((a,o)=>{KI(a,!1,s=>{r[o]=s,++i===n&&t(r.join($I))})})},_Z=(e,t)=>{const n=e.split($I),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function tR(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const kZ=Iu.setTimeout,PZ=Iu.clearTimeout;function ew(e,t){t.useNativeTimers?(e.setTimeoutFn=kZ.bind(Iu),e.clearTimeoutFn=PZ.bind(Iu)):(e.setTimeoutFn=Iu.setTimeout.bind(Iu),e.clearTimeoutFn=Iu.clearTimeout.bind(Iu))}const AZ=1.33;function OZ(e){return typeof e=="string"?DZ(e):Math.ceil((e.byteLength||e.size)*AZ)}function DZ(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class MZ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class nR extends Qa{constructor(t){super(),this.writable=!1,ew(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new MZ(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=ZI(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 rR="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Lk=64,jZ={};let iR=0,tw=0,aR;function oR(e){let t="";do t=rR[e%Lk]+t,e=Math.floor(e/Lk);while(e>0);return t}function sR(){const e=oR(+new Date);return e!==aR?(iR=0,aR=e):e+"."+oR(iR++)}for(;tw{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)};_Z(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,EZ(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]=sR()),!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=lR(t),a=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(a?"["+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 _d(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}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 _d extends Qa{constructor(t,n){super(),ew(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=tR(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 cR(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=_d.requestsCount++,_d.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=NZ,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete _d.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()}}if(_d.requestsCount=0,_d.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dR);else if(typeof addEventListener=="function"){const e="onpagehide"in Iu?"pagehide":"unload";addEventListener(e,dR,!1)}}function dR(){for(let e in _d.requests)_d.requests.hasOwnProperty(e)&&_d.requests[e].abort()}const fR=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),nw=Iu.WebSocket||Iu.MozWebSocket,hR=!0,BZ="arraybuffer",pR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class FZ extends nR{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=pR?{}:tR(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=hR&&!pR?n?new nw(t,n):new nw(t):new nw(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||BZ,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 o={};try{hR&&this.ws.send(a)}catch{}i&&fR(()=>{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]=sR()),this.supportsBinary||(t.b64=1);const i=lR(t),a=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!nw}}const UZ={websocket:FZ,polling:zZ},HZ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,VZ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zk(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=HZ.exec(e||""),a={},o=14;for(;o--;)a[VZ[o]]=i[o]||"";return n!=-1&&r!=-1&&(a.source=t,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=GZ(a,a.path),a.queryKey=WZ(a,a.query),a}function GZ(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 WZ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}let mR=class Ib extends Qa{constructor(t,n={}){super(),this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=zk(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=zk(n.host).host),ew(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=IZ(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=eR,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 UZ[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ib.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;Ib.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ib.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const S=new Error("probe error");S.transport=n.name,this.emitReserved("upgradeError",S)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const o=g=>{const S=new Error("probe error: "+g);S.transport=n.name,a(),this.emitReserved("upgradeError",S)};function s(){o("transport closed")}function c(){o("socket closed")}function d(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",s),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",o),n.once("close",s),this.once("close",c),this.once("upgrading",d),n.open()}onOpen(){if(this.readyState="open",Ib.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 a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),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){Ib.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,vR=Object.prototype.toString,XZ=typeof Blob=="function"||typeof Blob<"u"&&vR.call(Blob)==="[object BlobConstructor]",QZ=typeof File=="function"||typeof File<"u"&&vR.call(File)==="[object FileConstructor]";function Bk(e){return YZ&&(e instanceof ArrayBuffer||KZ(e))||XZ&&e instanceof Blob||QZ&&e instanceof File}function rw(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 Sr.ACK:case Sr.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tJ{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=JZ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const nJ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Hk,Encoder:eJ,get PacketType(){return Sr},protocol:$Z},Symbol.toStringTag,{value:"Module"}));function Oc(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const rJ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class gR extends Qa{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,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=[Oc(t,"open",this.onopen.bind(this)),Oc(t,"packet",this.onpacket.bind(this)),Oc(t,"error",this.onerror.bind(this)),Oc(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(rJ.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:Sr.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,s=n.pop();this._registerAckCallback(o,s),r.id=o}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 a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(a),n.apply(this,[null,...o])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,a)=>{n.push((o,s)=>r?o?a(o):i(s):i(o)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...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(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Sr.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 Sr.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 Sr.EVENT:case Sr.BINARY_EVENT:this.onevent(t);break;case Sr.ACK:case Sr.BINARY_ACK:this.onack(t);break;case Sr.DISCONNECT:this.ondisconnect();break;case Sr.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:Sr.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Sr.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}u0.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},u0.prototype.reset=function(){this.attempts=0},u0.prototype.setMin=function(e){this.ms=e},u0.prototype.setMax=function(e){this.max=e},u0.prototype.setJitter=function(e){this.jitter=e};class Vk extends Qa{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,ew(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 u0({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||nJ;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 mR(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Oc(n,"open",function(){r.onopen(),t&&t()}),a=Oc(n,"error",o=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",o),t?t(o):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const o=this._timeout;o===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},o);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Oc(t,"ping",this.onping.bind(this)),Oc(t,"data",this.ondata.bind(this)),Oc(t,"error",this.onerror.bind(this)),Oc(t,"close",this.onclose.bind(this)),Oc(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){fR(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new gR(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const n1={};function iw(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=qZ(e,t.path||"/socket.io"),r=n.source,i=n.id,a=n.path,o=n1[i]&&a in n1[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return s?c=new Vk(r,t):(n1[i]||(n1[i]=new Vk(r,t)),c=n1[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(iw,{Manager:Vk,Socket:gR,io:iw,connect:iw});const iJ=["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"],aJ=["ddim","plms","k_lms","dpmpp_2","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_euler","k_euler_a","k_heun"],oJ=[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],sJ=[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],lJ=[{key:"2x",value:2},{key:"4x",value:4}],Gk=0,Wk=4294967295,uJ=["gfpgan","codeformer"],cJ=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}];var dJ=Math.PI/180;function fJ(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const c0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Xt={_global:c0,version:"8.4.2",isBrowser:fJ(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return Xt.angleDeg?e*dJ: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 Xt.DD.isDragging},isDragReady(){return!!Xt.DD.node},releaseCanvasOnDestroy:!0,document:c0.document,_injectGlobal(e){c0.Konva=e}},la=e=>{Xt[e.prototype.getClassName()]=e};Xt._injectGlobal(Xt);class Yl{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 Yl(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,a=this.m[1]*n+this.m[3]*r,o=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]=a,this.m[2]=o,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,a=this.m[2]+this.m[0]*t,o=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,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],a=this.m[1]*t.m[2]+this.m[3]*t.m[3],o=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]=a,this.m[4]=o,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,a=this.m[0]*t,o=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]=a,this.m[4]=o,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],a=this.m[4],o=this.m[5],s=t*i-n*r;let c={x:a,y:o,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var d=Math.sqrt(t*t+n*n);c.rotation=n>0?Math.acos(t/d):-Math.acos(t/d),c.scaleX=d,c.scaleY=s/d,c.skewX=(t*r+n*i)/s,c.skewY=0}else if(r!=0||i!=0){var p=Math.sqrt(r*r+i*i);c.rotation=Math.PI/2-(i>0?Math.acos(-r/p):-Math.acos(r/p)),c.scaleX=s/p,c.scaleY=p,c.skewX=0,c.skewY=(t*r+n*i)/s}return c.rotation=ke._getRotation(c.rotation),c}}var hJ="[object Array]",pJ="[object Number]",mJ="[object String]",vJ="[object Boolean]",gJ=Math.PI/180,yJ=180/Math.PI,qk="#",bJ="",SJ="0",xJ="Konva warning: ",yR="Konva error: ",wJ="rgb(",Yk={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]},CJ=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,aw=[];const EJ=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},ke={_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)===hJ},_isNumber(e){return Object.prototype.toString.call(e)===pJ&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===mJ},_isBoolean(e){return Object.prototype.toString.call(e)===vJ},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){aw.push(e),aw.length===1&&EJ(function(){const t=aw;aw=[],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=ke.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(qk,bJ);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=SJ+e;return qk+e},getRGB(e){var t;return e in Yk?(t=Yk[e],{r:t[0],g:t[1],b:t[2]}):e[0]===qk?this._hexToRgb(e.substring(1)):e.substr(0,4)===wJ?(t=CJ.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",ke._namedColorToRBA(e)||ke._hex3ColorToRGBA(e)||ke._hex4ColorToRGBA(e)||ke._hex6ColorToRGBA(e)||ke._hex8ColorToRGBA(e)||ke._rgbColorToRGBA(e)||ke._rgbaColorToRGBA(e)||ke._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Yk[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,a=Number(n[2])/100;let o,s,c;if(i===0)return c=a*255,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};a<.5?o=a*(1+i):o=a+i-a*i;const d=2*a-o,p=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-1),s<0&&s++,s>1&&s--,6*s<1?c=d+(o-d)*6*s:2*s<1?c=o:3*s<2?c=d+(o-d)*(2/3-s)*6:c=d,p[g]=c*255;return{r:Math.round(p[0]),g:Math.round(p[1]),b:Math.round(p[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(o=n,s=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(o=e+p*(n-e),s=t+p*(r-t),c=(o-i)*(o-i)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(e,t,n){var r=ke.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(a,o){if(!(!n&&o===t.length-1)){var s=t[(o+1)%t.length],c=ke._getProjectionToSegment(a.x,a.y,s.x,s.y,e.x,e.y),d=c[0],p=c[1],g=c[2];gt.length){var o=t;t=e,e=o}for(r=0;r{t.width=0,t.height=0})},drawRoundedRectPath(e,t,n,r){let i=0,a=0,o=0,s=0;typeof r=="number"?i=a=o=s=Math.min(r,t/2,n/2):(i=Math.min(r[0]||0,t/2,n/2),a=Math.min(r[1]||0,t/2,n/2),s=Math.min(r[2]||0,t/2,n/2),o=Math.min(r[3]||0,t/2,n/2)),e.moveTo(i,0),e.lineTo(t-a,0),e.arc(t-a,a,a,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(o,n),e.arc(o,n-o,o,Math.PI/2,Math.PI,!1),e.lineTo(0,i),e.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}};function pp(e){return ke._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||ke._isBoolean(e)?e:Object.prototype.toString.call(e)}function bR(e){return e>255?255:e<0?0:Math.round(e)}function Et(){if(Xt.isUnminified)return function(e,t){return ke._isNumber(e)||ke.warn(pp(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function Kk(e){if(Xt.isUnminified)return function(t,n){let r=ke._isNumber(t),i=ke._isArray(t)&&t.length==e;return!r&&!i&&ke.warn(pp(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Xk(){if(Xt.isUnminified)return function(e,t){var n=ke._isNumber(e),r=e==="auto";return n||r||ke.warn(pp(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function d0(){if(Xt.isUnminified)return function(e,t){return ke._isString(e)||ke.warn(pp(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function SR(){if(Xt.isUnminified)return function(e,t){const n=ke._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||ke.warn(pp(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function _J(){if(Xt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(ke._isArray(e)?e.forEach(function(r){ke._isNumber(r)||ke.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):ke.warn(pp(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Dc(){if(Xt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||ke.warn(pp(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function TJ(e){if(Xt.isUnminified)return function(t,n){return t==null||ke.isObject(t)||ke.warn(pp(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var r1="get",i1="set";const he={addGetterSetter(e,t,n,r,i){he.addGetter(e,t,n),he.addSetter(e,t,r,i),he.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=r1+ke._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=i1+ke._capitalize(t);e.prototype[i]||he.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=i1+ke._capitalize(t);e.prototype[i]=function(a){return n&&a!==void 0&&a!==null&&(a=n.call(this,a,t)),this._setAttr(t,a),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var a=n.length,o=ke._capitalize,s=r1+o(t),c=i1+o(t),d,p;e.prototype[s]=function(){var S={};for(d=0;d{this._setAttr(t+o(k),void 0)}),this._fireChangeEvent(t,w,S),i&&i.call(this),this},he.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=ke._capitalize(t),r=i1+n,i=r1+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){ke.error("Adding deprecated "+t);var i=r1+ke._capitalize(t),a=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){ke.error(a);var o=this.attrs[t];return o===void 0?n:o},he.addSetter(e,t,r,function(){ke.error(a)}),he.addOverloadedGetterSetter(e,t)},backCompat(e,t){ke.each(t,function(n,r){var i=e.prototype[r],a=r1+ke._capitalize(n),o=i1+ke._capitalize(n);function s(){i.apply(this,arguments),ke.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[a]=s,e.prototype[o]=s})},afterSetFilter(){this._filterUpToDate=!1}};function kJ(e){var t=[],n=e.length,r=ke,i,a;for(i=0;itypeof p=="number"?Math.floor(p):p)),a+=PJ+d.join(xR)+AJ)):(a+=s.property,t||(a+=IJ+s.val)),a+=MJ;return a}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=NJ&&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,a,o){this._context.arc(t,n,r,i,a,o)}arcTo(t,n,r,i,a){this._context.arcTo(t,n,r,i,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,a,o){this._context.bezierCurveTo(t,n,r,i,a,o)}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,a,o){return this._context.createRadialGradient(t,n,r,i,a,o)}drawImage(t,n,r,i,a,o,s,c,d){var p=arguments,g=this._context;p.length===3?g.drawImage(t,n,r):p.length===5?g.drawImage(t,n,r,i,a):p.length===9&&g.drawImage(t,n,r,i,a,o,s,c,d)}ellipse(t,n,r,i,a,o,s,c){this._context.ellipse(t,n,r,i,a,o,s,c)}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,a,o){this._context.setTransform(t,n,r,i,a,o)}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,a,o){this._context.transform(t,n,r,i,a,o)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=wR.length,r=this.setAttr,i,a,o=function(s){var c=t[s],d;t[s]=function(){return a=kJ(Array.prototype.slice.call(arguments,0)),d=c.apply(t,arguments),t._trace({method:s,args:a}),d}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return Ir._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];Ir._dragElements.forEach((n,r)=>{const{node:i}=n,a=i.getStage();a.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=ke._getFirstPointerId(e));const o=a._changedPointerPositions.find(d=>d.id===n.pointerId);if(o){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),c=Math.max(Math.abs(o.x-n.startPointerPos.x),Math.abs(o.y-n.startPointerPos.y));if(c{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];Ir._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")&&(Ir.justDragged=!0,Xt._mouseListenClick=!1,Xt._touchListenClick=!1,Xt._pointerListenClick=!1,n.dragStatus="stopped");const o=n.node.getLayer()||n.node instanceof Xt.Stage&&n.node;o&&t.indexOf(o)===-1&&t.push(o)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){Ir._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&Ir._dragElements.delete(n)})}};Xt.isBrowser&&(window.addEventListener("mouseup",Ir._endDragBefore,!0),window.addEventListener("touchend",Ir._endDragBefore,!0),window.addEventListener("mousemove",Ir._drag),window.addEventListener("touchmove",Ir._drag),window.addEventListener("mouseup",Ir._endDragAfter,!1),window.addEventListener("touchend",Ir._endDragAfter,!1));var uw="absoluteOpacity",cw="allEventListeners",Yf="absoluteTransform",CR="absoluteScale",$m="canvas",FJ="Change",UJ="children",HJ="konva",Zk="listening",ER="mouseenter",_R="mouseleave",TR="set",kR="Shape",dw=" ",PR="stage",mp="transform",VJ="Stage",Jk="visible",GJ=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(dw);let WJ=1,Tt=class _M{constructor(t){this._id=WJ++,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===mp||t===Yf)&&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===mp||t===Yf,a=r===void 0||i&&r.dirty===!0;return a&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(a=>a+"Change.konva").join(dw);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get($m)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Yf&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has($m)){const{scene:t,filter:n,hit:r}=this._cache.get($m);ke.releaseCanvas(t,n,r),this._cache.delete($m)}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),a=Math.ceil(n.height||r.height),o=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,c=n.y===void 0?Math.floor(r.y):n.y,d=n.offset||0,p=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!a){ke.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=d*2+1,a+=d*2+1,s-=d,c-=d;var S=new f0({pixelRatio:o,width:i,height:a}),w=new f0({pixelRatio:o,width:0,height:0}),C=new Qk({pixelRatio:g,width:i,height:a}),k=S.getContext(),P=C.getContext();return C.isCache=!0,S.isCache=!0,this._cache.delete($m),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(S.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),k.save(),P.save(),k.translate(-s,-c),P.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(uw),this._clearSelfAndDescendantCache(CR),this.drawScene(S,this),this.drawHit(C,this),this._isUnderCache=!1,k.restore(),P.restore(),p&&(k.save(),k.beginPath(),k.rect(0,0,i,a),k.closePath(),k.setAttr("strokeStyle","red"),k.setAttr("lineWidth",5),k.stroke(),k.restore()),this._cache.set($m,{scene:S,filter:w,hit:C,x:s,y:c}),this._requestDraw(),this}isCached(){return this._cache.has($m)}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,a,o,s,c=this.getAbsoluteTransform(n);return r.forEach(function(d){var p=c.point(d);i===void 0&&(i=o=p.x,a=s=p.y),i=Math.min(i,p.x),a=Math.min(a,p.y),o=Math.max(o,p.x),s=Math.max(s,p.y)}),{x:i,y:a,width:o-i,height:s-a}}_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,a=i.getContext(),o,s,c,d;if(t){if(!this._filterUpToDate){var p=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(o=t.length,a.clear(),a.drawImage(r._canvas,0,0,r.getWidth()/p,r.getHeight()/p),s=a.getImageData(0,0,i.getWidth(),i.getHeight()),c=0;c{var n,r;if(!t)return this;for(n in t)n!==UJ&&(r=TR+ke._capitalize(n),ke._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(Zk,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(Jk,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;Ir._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(o.node.nodeType==="Stage"||o.node.getLayer()===r)&&(i=!0)});var a=!n&&!Xt.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 t=this.getDepth(),n=this,r=0,i,a,o,s;function c(d){for(i=[],a=d.length,o=0;o0&&i[0].getDepth()<=t&&c(i)}return n.nodeType!==VJ&&c(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(mp),this._clearSelfAndDescendantCache(Yf)),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(),a=new Yl,o=this.offset();return a.m=i.slice(),a.translate(o.x,o.y),a.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(mp);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(mp),this._clearSelfAndDescendantCache(Yf),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(),a=this.y();return n!==void 0&&(i+=n),r!==void 0&&(a+=r),this.setPosition({x:i,y:a}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),a,o;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,o=0;o0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return ke.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 ke.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&ke.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(uw,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,a,o,s;t.attrs={};for(r in n)i=n[r],s=ke.isObject(i)&&!ke._isPlainObject(i)&&!ke._isArray(i),!s&&(a=typeof this[r]=="function"&&this[r],delete n[r],o=a?a.call(this):null,n[r]=i,o!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),ke._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 a=this.parent;a;){if(a===r)return i;a._isMatch(t)&&i.push(a),a=a.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,a;for(i=0;i{try{const i=t==null?void 0:t.callback;i&&delete t.callback,ke._urlToImage(this.toDataURL(t),function(a){n(a),i==null||i(a)})}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(a=>{n(a),i==null||i(a)})}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():Xt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],a,o,s;for(a=0;a=0;if(r&&!this.isDragging()){var i=!1;Ir._dragElements.forEach(a=>{this.isAncestorOf(a.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=Ir._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&Ir._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 ke.haveIntersection(r,this.getClientRect())}static create(t,n){return ke._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=_M.prototype.getClassName.call(t),i=t.children,a,o,s;n&&(t.attrs.container=n),Xt[r]||(ke.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const c=Xt[r];if(a=new c(t.attrs),i)for(o=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 a=i._isMatch(t);return a&&r.push(i),!!(a&&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=Tt.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=Tt.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(),a=i&&i.getContext(),o=this._getCanvasCache(),s=o&&o.scene,c=i&&i.isCache;if(!this.isVisible()&&!c)return this;if(s){a.save();var d=this.getAbsoluteTransform(n).getMatrix();a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedSceneCanvas(a),a.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,a=i&&i.getContext(),o=this._getCanvasCache(),s=o&&o.hit;if(s){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(t,n,r){var i,a=n&&n.getContext(),o=this.clipWidth(),s=this.clipHeight(),c=this.clipFunc(),d=o&&s||c;const p=r===this;if(d){a.save();var g=this.getAbsoluteTransform(r),S=g.getMatrix();if(a.transform(S[0],S[1],S[2],S[3],S[4],S[5]),a.beginPath(),c)c.call(this,a,this);else{var w=this.clipX(),C=this.clipY();a.rect(w,C,o,s)}a.clip(),S=g.copy().invert().getMatrix(),a.transform(S[0],S[1],S[2],S[3],S[4],S[5])}var k=!p&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";k&&(a.save(),a._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),k&&a.restore(),d&&a.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,a,o,s,c,d={x:1/0,y:1/0,width:0,height:0},p=this;(n=this.children)===null||n===void 0||n.forEach(function(k){if(k.visible()){var P=k.getClientRect({relativeTo:p,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(a===void 0?(a=P.x,o=P.y,s=P.x+P.width,c=P.y+P.height):(a=Math.min(a,P.x),o=Math.min(o,P.y),s=Math.max(s,P.x+P.width),c=Math.max(c,P.y+P.height)))}});for(var g=this.find("Shape"),S=!1,w=0;we.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",p0=e=>{const t=c1(e);if(t==="pointer")return Xt.pointerEventsEnabled&&r4.pointer;if(t==="touch")return r4.touch;if(t==="mouse")return r4.mouse};function VR(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&ke.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const JJ="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);",vw=[];let gw=class extends Kl{constructor(t){super(VR(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),vw.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{VR(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||ke.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===YJ){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&&vw.splice(n,1),ke.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}:(ke.warn(JJ),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 f0({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(a){if(a.isVisible()){var o=a._toKonvaCanvas(t);r.drawImage(o._canvas,t.x,t.y,o.getWidth()/o.getPixelRatio(),o.getHeight()/o.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,a;for(a=i;a>=0;a--){const o=n[a].getIntersection(t);if(o)return o}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+MR,this.content.style.height=n+MR),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;rQJ&&ke.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(),Xt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return OR(t,this)}setPointerCapture(t){DR(t,this)}releaseCapture(t){o1(t)}getLayers(){return this.children}_bindContentEvents(){Xt.isBrowser&&ZJ.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=p0(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=p0(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=p0(t.type),r=c1(t.type);if(n){this.setPointersPositions(t);var i=this._getTargetShape(r),a=!Ir.isDragging||Xt.hitOnDragEnabled;i&&a?(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):a&&(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=p0(t.type),r=c1(t.type);if(n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(a=>{var o=this.getIntersection(a);if(Ir.justDragged=!1,Xt["_"+r+"ListenClick"]=!0,!(o&&o.isListening()))return;Xt.capturePointerEventsEnabled&&o.setPointerCapture(a.id),this[r+"ClickStartShape"]=o,o._fireAndBubble(n.pointerdown,{evt:t,pointerId:a.id}),i=!0;const c=t.type.indexOf("touch")>=0;o.preventDefault()&&t.cancelable&&c&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=p0(t.type),r=c1(t.type);if(!n)return;Ir.isDragging&&Ir.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!Ir.isDragging||Xt.hitOnDragEnabled;if(!i)return;var a={};let o=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(c=>{const d=$k(c.id)||this.getIntersection(c),p=c.id,g={evt:t,pointerId:p};var S=s!==d;if(S&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),d),s._fireAndBubble(n.pointerleave,Object.assign({},g),d)),d){if(a[d._id])return;a[d._id]=!0}d&&d.isListening()?(o=!0,S&&(d._fireAndBubble(n.pointerover,Object.assign({},g),s),d._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=d),d._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:p}),this[r+"targetShape"]=null)}),o||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=p0(t.type),r=c1(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],a=this[r+"ClickEndShape"];var o={};let s=!1;this._changedPointerPositions.forEach(c=>{const d=$k(c.id)||this.getIntersection(c);if(d){if(d.releaseCapture(c.id),o[d._id])return;o[d._id]=!0}const p=c.id,g={evt:t,pointerId:p};let S=!1;Xt["_"+r+"InDblClickWindow"]?(S=!0,clearTimeout(this[r+"DblTimeout"])):Ir.justDragged||(Xt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){Xt["_"+r+"InDblClickWindow"]=!1},Xt.dblClickWindow),d&&d.isListening()?(s=!0,this[r+"ClickEndShape"]=d,d._fireAndBubble(n.pointerup,Object.assign({},g)),Xt["_"+r+"ListenClick"]&&i&&i===d&&(d._fireAndBubble(n.pointerclick,Object.assign({},g)),S&&a&&a===d&&d._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,Xt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:p}),S&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:p}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Xt["_"+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(t4,{evt:t}):this._fire(t4,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(n4,{evt:t}):this._fire(n4,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=$k(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(h0,e4(t)),o1(t.pointerId)}_lostpointercapture(t){o1(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,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(t.changedTouches||t.touches,a=>{this._changedPointerPositions.push({id:a.identifier,x:(a.clientX-n.left)/n.scaleX,y:(a.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:ke._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:ke._getFirstPointerId(t)}])}_setPointerPosition(t){ke.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 f0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Qk({pixelRatio:1,width:this.width(),height:this.height()}),!!Xt.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 ke.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}};gw.prototype.nodeType=qJ,la(gw),he.addGetterSetter(gw,"container");var GR="hasShadow",WR="shadowRGBA",qR="patternImage",YR="linearGradient",KR="radialGradient";let yw;function i4(){return yw||(yw=ke.createCanvasElement().getContext("2d"),yw)}const d1={};function $J(e){e.fill()}function e$(e){e.stroke()}function t$(e){e.fill()}function n$(e){e.stroke()}function r$(){this._clearCache(GR)}function i$(){this._clearCache(WR)}function a$(){this._clearCache(qR)}function o$(){this._clearCache(YR)}function s$(){this._clearCache(KR)}class yt extends Tt{constructor(t){super(t);let n;for(;n=ke.getRandomColor(),!(n&&!(n in d1)););this.colorKey=n,d1[n]=this}getContext(){return ke.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return ke.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(GR,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(qR,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=i4();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Yl;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(Xt.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(YR,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=i4(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),a=n.createLinearGradient(r.x,r.y,i.x,i.y),o=0;othis.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 Tt.prototype.destroy.call(this),delete d1[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(),a=this.hasStroke(),o=this.getAbsoluteOpacity()!==1;if(i&&a&&o)return!0;const s=this.hasShadow(),c=this.shadowForStrokeEnabled();return!!(i&&a&&s&&c)}setStrokeHitEnabled(t){ke.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(),o=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+o,c=i.height+o,d=!t.skipShadow&&this.hasShadow(),p=d?this.shadowOffsetX():0,g=d?this.shadowOffsetY():0,S=s+Math.abs(p),w=c+Math.abs(g),C=d&&this.shadowBlur()||0,k=S+C*2,P=w+C*2,D={width:k,height:P,x:-(o/2+C)+Math.min(p,0)+i.x,y:-(o/2+C)+Math.min(g,0)+i.y};return n?D:this._transformedRect(D,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),a=i.getContext(),o=this._getCanvasCache(),s=this.getSceneFunc(),c=this.hasShadow(),d,p,g,S=i.isCache,w=n===this;if(!this.isVisible()&&!w)return this;if(o){a.save();var C=this.getAbsoluteTransform(n).getMatrix();return a.transform(C[0],C[1],C[2],C[3],C[4],C[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),this._useBufferCanvas()&&!S){d=this.getStage(),p=d.bufferCanvas,g=p.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var k=this.getAbsoluteTransform(n).getMatrix();g.transform(k[0],k[1],k[2],k[3],k[4],k[5]),s.call(this,g,this),g.restore();var P=p.pixelRatio;c&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(p._canvas,0,0,p.width/P,p.height/P)}else{if(a._applyLineJoin(this),!w){var k=this.getAbsoluteTransform(n).getMatrix();a.transform(k[0],k[1],k[2],k[3],k[4],k[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}c&&a._applyShadow(this),s.call(this,a,this)}return a.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),a=t||i.hitCanvas,o=a&&a.getContext(),s=this.hitFunc()||this.sceneFunc(),c=this._getCanvasCache(),d=c&&c.hit;if(this.colorKey||ke.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()"),d){o.save();var p=this.getAbsoluteTransform(n).getMatrix();return o.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),o._applyLineJoin(this),!(this===n)){var S=this.getAbsoluteTransform(n).getMatrix();o.transform(S[0],S[1],S[2],S[3],S[4],S[5])}return s.call(this,o,this),o.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,a=i.getContext(),o=i.getWidth(),s=i.getHeight(),c,d,p,g,S,w;a.clear(),a.drawImage(r._canvas,0,0,o,s);try{for(c=a.getImageData(0,0,o,s),d=c.data,p=d.length,g=ke._hexToRgb(this.colorKey),S=0;St?(d[S]=g.r,d[S+1]=g.g,d[S+2]=g.b,d[S+3]=255):d[S+3]=0;a.putImageData(c,0,0)}catch(C){ke.error("Unable to draw hit graph from cached scene canvas. "+C.message)}return this}hasPointerCapture(t){return OR(t,this)}setPointerCapture(t){DR(t,this)}releaseCapture(t){o1(t)}}yt.prototype._fillFunc=$J,yt.prototype._strokeFunc=e$,yt.prototype._fillFuncHit=t$,yt.prototype._strokeFuncHit=n$,yt.prototype._centroid=!1,yt.prototype.nodeType="Shape",la(yt),yt.prototype.eventListeners={},yt.prototype.on.call(yt.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",r$),yt.prototype.on.call(yt.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",i$),yt.prototype.on.call(yt.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",a$),yt.prototype.on.call(yt.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",o$),yt.prototype.on.call(yt.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",s$),he.addGetterSetter(yt,"stroke",void 0,SR()),he.addGetterSetter(yt,"strokeWidth",2,Et()),he.addGetterSetter(yt,"fillAfterStrokeEnabled",!1),he.addGetterSetter(yt,"hitStrokeWidth","auto",Xk()),he.addGetterSetter(yt,"strokeHitEnabled",!0,Dc()),he.addGetterSetter(yt,"perfectDrawEnabled",!0,Dc()),he.addGetterSetter(yt,"shadowForStrokeEnabled",!0,Dc()),he.addGetterSetter(yt,"lineJoin"),he.addGetterSetter(yt,"lineCap"),he.addGetterSetter(yt,"sceneFunc"),he.addGetterSetter(yt,"hitFunc"),he.addGetterSetter(yt,"dash"),he.addGetterSetter(yt,"dashOffset",0,Et()),he.addGetterSetter(yt,"shadowColor",void 0,d0()),he.addGetterSetter(yt,"shadowBlur",0,Et()),he.addGetterSetter(yt,"shadowOpacity",1,Et()),he.addComponentsGetterSetter(yt,"shadowOffset",["x","y"]),he.addGetterSetter(yt,"shadowOffsetX",0,Et()),he.addGetterSetter(yt,"shadowOffsetY",0,Et()),he.addGetterSetter(yt,"fillPatternImage"),he.addGetterSetter(yt,"fill",void 0,SR()),he.addGetterSetter(yt,"fillPatternX",0,Et()),he.addGetterSetter(yt,"fillPatternY",0,Et()),he.addGetterSetter(yt,"fillLinearGradientColorStops"),he.addGetterSetter(yt,"strokeLinearGradientColorStops"),he.addGetterSetter(yt,"fillRadialGradientStartRadius",0),he.addGetterSetter(yt,"fillRadialGradientEndRadius",0),he.addGetterSetter(yt,"fillRadialGradientColorStops"),he.addGetterSetter(yt,"fillPatternRepeat","repeat"),he.addGetterSetter(yt,"fillEnabled",!0),he.addGetterSetter(yt,"strokeEnabled",!0),he.addGetterSetter(yt,"shadowEnabled",!0),he.addGetterSetter(yt,"dashEnabled",!0),he.addGetterSetter(yt,"strokeScaleEnabled",!0),he.addGetterSetter(yt,"fillPriority","color"),he.addComponentsGetterSetter(yt,"fillPatternOffset",["x","y"]),he.addGetterSetter(yt,"fillPatternOffsetX",0,Et()),he.addGetterSetter(yt,"fillPatternOffsetY",0,Et()),he.addComponentsGetterSetter(yt,"fillPatternScale",["x","y"]),he.addGetterSetter(yt,"fillPatternScaleX",1,Et()),he.addGetterSetter(yt,"fillPatternScaleY",1,Et()),he.addComponentsGetterSetter(yt,"fillLinearGradientStartPoint",["x","y"]),he.addComponentsGetterSetter(yt,"strokeLinearGradientStartPoint",["x","y"]),he.addGetterSetter(yt,"fillLinearGradientStartPointX",0),he.addGetterSetter(yt,"strokeLinearGradientStartPointX",0),he.addGetterSetter(yt,"fillLinearGradientStartPointY",0),he.addGetterSetter(yt,"strokeLinearGradientStartPointY",0),he.addComponentsGetterSetter(yt,"fillLinearGradientEndPoint",["x","y"]),he.addComponentsGetterSetter(yt,"strokeLinearGradientEndPoint",["x","y"]),he.addGetterSetter(yt,"fillLinearGradientEndPointX",0),he.addGetterSetter(yt,"strokeLinearGradientEndPointX",0),he.addGetterSetter(yt,"fillLinearGradientEndPointY",0),he.addGetterSetter(yt,"strokeLinearGradientEndPointY",0),he.addComponentsGetterSetter(yt,"fillRadialGradientStartPoint",["x","y"]),he.addGetterSetter(yt,"fillRadialGradientStartPointX",0),he.addGetterSetter(yt,"fillRadialGradientStartPointY",0),he.addComponentsGetterSetter(yt,"fillRadialGradientEndPoint",["x","y"]),he.addGetterSetter(yt,"fillRadialGradientEndPointX",0),he.addGetterSetter(yt,"fillRadialGradientEndPointY",0),he.addGetterSetter(yt,"fillPatternRotation",0),he.backCompat(yt,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var l$="#",u$="beforeDraw",c$="draw",XR=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],d$=XR.length;let ev=class extends Kl{constructor(t){super(t),this.canvas=new f0,this.hitCanvas=new Qk({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(u$,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Kl.prototype.drawScene.call(this,i,n),this._fire(c$,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Kl.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){ke.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return ke.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 ke.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};ev.prototype.nodeType="Layer",la(ev),he.addGetterSetter(ev,"imageSmoothingEnabled",!0),he.addGetterSetter(ev,"clearBeforeDraw",!0),he.addGetterSetter(ev,"hitGraphEnabled",!0,Dc());class a4 extends ev{constructor(t){super(t),this.listening(!1),ke.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}a4.prototype.nodeType="FastLayer",la(a4);let m0=class extends Kl{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&ke.throw("You may only add groups and shapes to groups.")}};m0.prototype.nodeType="Group",la(m0);var o4=function(){return c0.performance&&c0.performance.now?function(){return c0.performance.now()}:function(){return new Date().getTime()}}();class Ru{constructor(t,n){this.id=Ru.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:o4(),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=QR,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=ZR,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===QR?this.setTime(t):this.state===ZR&&this.setTime(this.duration-t)}pause(){this.state=h$,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Ia{constructor(t){var n=this,r=t.node,i=r._id,a,o=t.easing||f1.Linear,s=!!t.yoyo,c;typeof t.duration>"u"?a=.3:t.duration===0?a=.001:a=t.duration,this.node=r,this._id=p$++;var d=r.getLayer()||(r instanceof Xt.Stage?r.getLayers():null);d||ke.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ru(function(){n.tween.onEnterFrame()},d),this.tween=new m$(c,function(p){n._tweenFunc(p)},o,0,1,a*1e3,s),this._addListeners(),Ia.attrs[i]||(Ia.attrs[i]={}),Ia.attrs[i][this._id]||(Ia.attrs[i][this._id]={}),Ia.tweens[i]||(Ia.tweens[i]={});for(c in t)f$[c]===void 0&&this._addAttr(c,t[c]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,a,o,s,c,d,p,g,S;if(s=Ia.tweens[i][t],s&&delete Ia.attrs[i][s][t],a=r.getAttr(t),ke._isArray(n))if(o=[],d=Math.max(n.length,a.length),t==="points"&&n.length!==a.length&&(n.length>a.length?(g=a,a=ke._prepareArrayForTween(a,n,r.closed())):(p=n,n=ke._prepareArrayForTween(n,a,r.closed()))),t.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 t=this.node,n=Ia.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=Ia.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=Ia.tweens[t],i;this.pause();for(i in r)delete Ia.tweens[t][i];delete Ia.attrs[t][n]}}Ia.attrs={},Ia.tweens={},Tt.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Ia(e);n.play()};const f1={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,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||(a=r*.3),!i||i0?t:n),p=o*n,g=s*(s>0?t:n),S=c*(c>0?n:t);return{x:d,y:r?-1*S:g,width:p-d,height:S-g}}}Kf.prototype._centroid=!0,Kf.prototype.className="Arc",Kf.prototype._attrsAffectingSize=["innerRadius","outerRadius"],la(Kf),he.addGetterSetter(Kf,"innerRadius",0,Et()),he.addGetterSetter(Kf,"outerRadius",0,Et()),he.addGetterSetter(Kf,"angle",0,Et()),he.addGetterSetter(Kf,"clockwise",!1,Dc());function s4(e,t,n,r,i,a,o){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),c=Math.sqrt(Math.pow(i-n,2)+Math.pow(a-r,2)),d=o*s/(s+c),p=o*c/(s+c),g=n-d*(i-e),S=r-d*(a-t),w=n+p*(i-e),C=r+p*(a-t);return[g,S,w,C]}function $R(e,t){var n=e.length,r=[],i,a;for(i=2;i4){for(s=this.getTensionPoints(),c=s.length,d=a?0:4,a||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);dp?d:p,P=d>p?1:d/p,D=d>p?p/d:1;t.translate(s,c),t.rotate(w),t.scale(P,D),t.arc(0,0,k,g,g+S,1-C),t.scale(1/P,1/D),t.rotate(-w),t.translate(-s,-c);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(d){if(d.command==="A"){var p=d.points[4],g=d.points[5],S=d.points[4]+g,w=Math.PI/180;if(Math.abs(p-S)S;C-=w){const k=ui.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],C,0);t.push(k.x,k.y)}else for(let C=p+w;Cthis.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 a=this.dataArray[r],o=a.points;switch(a.command){case"L":return ui.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case"C":return ui.getPointOnCubicBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case"Q":return ui.getPointOnQuadraticBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case"A":var s=o[0],c=o[1],d=o[2],p=o[3],g=o[4],S=o[5],w=o[6];return g+=S*t/a.pathLength,ui.getPointOnEllipticalArc(s,c,d,p,g,w)}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,a,o,s){o===void 0&&(o=n),s===void 0&&(s=r);var c=(a-r)/(i-n+1e-8),d=Math.sqrt(t*t/(1+c*c));i0&&!isNaN(C[0]);){var M=null,R=[],L=c,z=d,U,H,q,J,$,K,fe,X,G,te;switch(w){case"l":c+=C.shift(),d+=C.shift(),M="L",R.push(c,d);break;case"L":c=C.shift(),d=C.shift(),R.push(c,d);break;case"m":var oe=C.shift(),ie=C.shift();if(c+=oe,d+=ie,M="M",o.length>2&&o[o.length-1].command==="z"){for(var re=o.length-2;re>=0;re--)if(o[re].command==="M"){c=o[re].points[0]+oe,d=o[re].points[1]+ie;break}}R.push(c,d),w="l";break;case"M":c=C.shift(),d=C.shift(),M="M",R.push(c,d),w="L";break;case"h":c+=C.shift(),M="L",R.push(c,d);break;case"H":c=C.shift(),M="L",R.push(c,d);break;case"v":d+=C.shift(),M="L",R.push(c,d);break;case"V":d=C.shift(),M="L",R.push(c,d);break;case"C":R.push(C.shift(),C.shift(),C.shift(),C.shift()),c=C.shift(),d=C.shift(),R.push(c,d);break;case"c":R.push(c+C.shift(),d+C.shift(),c+C.shift(),d+C.shift()),c+=C.shift(),d+=C.shift(),M="C",R.push(c,d);break;case"S":H=c,q=d,U=o[o.length-1],U.command==="C"&&(H=c+(c-U.points[2]),q=d+(d-U.points[3])),R.push(H,q,C.shift(),C.shift()),c=C.shift(),d=C.shift(),M="C",R.push(c,d);break;case"s":H=c,q=d,U=o[o.length-1],U.command==="C"&&(H=c+(c-U.points[2]),q=d+(d-U.points[3])),R.push(H,q,c+C.shift(),d+C.shift()),c+=C.shift(),d+=C.shift(),M="C",R.push(c,d);break;case"Q":R.push(C.shift(),C.shift()),c=C.shift(),d=C.shift(),R.push(c,d);break;case"q":R.push(c+C.shift(),d+C.shift()),c+=C.shift(),d+=C.shift(),M="Q",R.push(c,d);break;case"T":H=c,q=d,U=o[o.length-1],U.command==="Q"&&(H=c+(c-U.points[0]),q=d+(d-U.points[1])),c=C.shift(),d=C.shift(),M="Q",R.push(H,q,c,d);break;case"t":H=c,q=d,U=o[o.length-1],U.command==="Q"&&(H=c+(c-U.points[0]),q=d+(d-U.points[1])),c+=C.shift(),d+=C.shift(),M="Q",R.push(H,q,c,d);break;case"A":J=C.shift(),$=C.shift(),K=C.shift(),fe=C.shift(),X=C.shift(),G=c,te=d,c=C.shift(),d=C.shift(),M="A",R=this.convertEndpointToCenterParameterization(G,te,c,d,fe,X,J,$,K);break;case"a":J=C.shift(),$=C.shift(),K=C.shift(),fe=C.shift(),X=C.shift(),G=c,te=d,c+=C.shift(),d+=C.shift(),M="A",R=this.convertEndpointToCenterParameterization(G,te,c,d,fe,X,J,$,K);break}o.push({command:M||w,points:R,start:{x:L,y:z},pathLength:this.calcLength(L,z,M||w,R)})}(w==="z"||w==="Z")&&o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,n,r,i){var a,o,s,c,d=ui;switch(r){case"L":return d.getLineLength(t,n,i[0],i[1]);case"C":for(a=0,o=d.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)s=d.getPointOnCubicBezier(c,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),a+=d.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case"Q":for(a=0,o=d.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)s=d.getPointOnQuadraticBezier(c,t,n,i[0],i[1],i[2],i[3]),a+=d.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case"A":a=0;var p=i[4],g=i[5],S=i[4]+g,w=Math.PI/180;if(Math.abs(p-S)S;c-=w)s=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=d.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=p+w;c1&&(s*=Math.sqrt(w),c*=Math.sqrt(w));var C=Math.sqrt((s*s*(c*c)-s*s*(S*S)-c*c*(g*g))/(s*s*(S*S)+c*c*(g*g)));a===o&&(C*=-1),isNaN(C)&&(C=0);var k=C*s*S/c,P=C*-c*g/s,D=(t+r)/2+Math.cos(p)*k-Math.sin(p)*P,M=(n+i)/2+Math.sin(p)*k+Math.cos(p)*P,R=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},L=function($,K){return($[0]*K[0]+$[1]*K[1])/(R($)*R(K))},z=function($,K){return($[0]*K[1]<$[1]*K[0]?-1:1)*Math.acos(L($,K))},U=z([1,0],[(g-k)/s,(S-P)/c]),H=[(g-k)/s,(S-P)/c],q=[(-1*g-k)/s,(-1*S-P)/c],J=z(H,q);return L(H,q)<=-1&&(J=Math.PI),L(H,q)>=1&&(J=0),o===0&&J>0&&(J=J-2*Math.PI),o===1&&J<0&&(J=J+2*Math.PI),[D,M,s,c,U,J,p,o]}}ui.prototype.className="Path",ui.prototype._attrsAffectingSize=["data"],la(ui),he.addGetterSetter(ui,"data");class nv extends Xf{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,a=this.tension()!==0&&r.length>4;a&&(i=this.getTensionPoints());var o=this.pointerLength(),s=r.length,c,d;if(a){const S=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],w=ui.calcLength(i[i.length-4],i[i.length-3],"C",S),C=ui.getPointOnQuadraticBezier(Math.min(1,1-o/w),S[0],S[1],S[2],S[3],S[4],S[5]);c=r[s-2]-C.x,d=r[s-1]-C.y}else c=r[s-2]-r[s-4],d=r[s-1]-r[s-3];var p=(Math.atan2(d,c)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(p),t.moveTo(0,0),t.lineTo(-o,g/2),t.lineTo(-o,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),a?(c=(i[0]+i[2])/2-r[0],d=(i[1]+i[3])/2-r[1]):(c=r[2]-r[0],d=r[3]-r[1]),t.rotate((Math.atan2(-d,-c)+n)%n),t.moveTo(0,0),t.lineTo(-o,g/2),t.lineTo(-o,-g/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}}}nv.prototype.className="Arrow",la(nv),he.addGetterSetter(nv,"pointerLength",10,Et()),he.addGetterSetter(nv,"pointerWidth",10,Et()),he.addGetterSetter(nv,"pointerAtBeginning",!1),he.addGetterSetter(nv,"pointerAtEnding",!0);let v0=class extends yt{_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)}};v0.prototype._centroid=!0,v0.prototype.className="Circle",v0.prototype._attrsAffectingSize=["radius"],la(v0),he.addGetterSetter(v0,"radius",0,Et());class vp extends yt{_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)}}vp.prototype.className="Ellipse",vp.prototype._centroid=!0,vp.prototype._attrsAffectingSize=["radiusX","radiusY"],la(vp),he.addComponentsGetterSetter(vp,"radius",["x","y"]),he.addGetterSetter(vp,"radiusX",0,Et()),he.addGetterSetter(vp,"radiusY",0,Et());let Td=class dq extends yt{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(),a=this.attrs.image;let o;if(a){const s=this.attrs.cropWidth,c=this.attrs.cropHeight;s&&c?o=[a,this.cropX(),this.cropY(),s,c,0,0,n,r]:o=[a,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?ke.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),a&&(i&&t.clip(),t.drawImage.apply(t,o))}_hitFunc(t){var n=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?ke.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=ke.createImageElement();i.onload=function(){var a=new dq({image:i});n(a)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};Td.prototype.className="Image",la(Td),he.addGetterSetter(Td,"cornerRadius",0,Kk(4)),he.addGetterSetter(Td,"image"),he.addComponentsGetterSetter(Td,"crop",["x","y","width","height"]),he.addGetterSetter(Td,"cropX",0,Et()),he.addGetterSetter(Td,"cropY",0,Et()),he.addGetterSetter(Td,"cropWidth",0,Et()),he.addGetterSetter(Td,"cropHeight",0,Et());var eN=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],v$="Change.konva",g$="none",l4="up",u4="right",c4="down",d4="left",y$=eN.length;class f4 extends m0{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,o.x),r=Math.max(r,o.x),i=Math.min(i,o.y),a=Math.max(a,o.y)}),{x:n,y:i,width:r-n,height:a-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}iv.prototype.className="RegularPolygon",iv.prototype._centroid=!0,iv.prototype._attrsAffectingSize=["radius"],la(iv),he.addGetterSetter(iv,"radius",0,Et()),he.addGetterSetter(iv,"sides",0,Et());var tN=Math.PI*2;class av extends yt{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,tN,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),tN,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)}}av.prototype.className="Ring",av.prototype._centroid=!0,av.prototype._attrsAffectingSize=["innerRadius","outerRadius"],la(av),he.addGetterSetter(av,"innerRadius",0,Et()),he.addGetterSetter(av,"outerRadius",0,Et());class kd extends yt{constructor(t){super(t),this._updated=!0,this.anim=new Ru(()=>{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,a=this.animations()[n],o=this.frameOffsets(),s=a[i+0],c=a[i+1],d=a[i+2],p=a[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,d,p),t.closePath(),t.fillStrokeShape(this)),g)if(o){var S=o[n],w=r*2;t.drawImage(g,s,c,d,p,S[w+0],S[w+1],d,p)}else t.drawImage(g,s,c,d,p,0,0,d,p)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,a=this.animations()[n],o=this.frameOffsets(),s=a[i+2],c=a[i+3];if(t.beginPath(),o){var d=o[n],p=r*2;t.rect(d[p+0],d[p+1],s,c)}else t.rect(0,0,s,c);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],a=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 Sw;function p4(){return Sw||(Sw=ke.createCanvasElement().getContext(x$),Sw)}function M$(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function j$(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function I$(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}let ua=class extends yt{constructor(t){super(I$(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(D+=o)}}}_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=ke._isString(t)?t:t==null?"":t+"";return this._setAttr(w$,n),this}getWidth(){var t=this.attrs.width===g0||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===g0||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 ke.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=p4(),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()+bw+this.fontVariant()+bw+(this.fontSize()+T$)+D$(this.fontFamily())}_addTextLine(t){this.align()===p1&&(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 p4().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` `),n=+this.fontSize(),r=0,i=this.lineHeight()*n,a=this.attrs.width,o=this.attrs.height,s=a!==g0&&a!==void 0,c=o!==g0&&o!==void 0,d=this.padding(),p=a-d*2,g=o-d*2,S=0,w=this.wrap(),C=w!==sN,k=w!==A$&&C,P=this.ellipsis();this.textArr=[],p4().font=this._getContextFont();for(var D=P?this._getTextWidth(h4):0,M=0,R=t.length;Mp)for(;L.length>0;){for(var U=0,H=L.length,q="",J=0;U>>1,K=L.slice(0,$+1),fe=this._getTextWidth(K)+D;fe<=p?(U=$+1,q=K,J=fe):H=$}if(q){if(k){var X,G=L[q.length],te=G===bw||G===rN;te&&J<=p?X=q.length:X=Math.max(q.lastIndexOf(bw),q.lastIndexOf(rN))+1,X>0&&(U=X,q=q.slice(0,U),J=this._getTextWidth(q))}q=q.trimRight(),this._addTextLine(q),r=Math.max(r,J),S+=i;var oe=this._shouldHandleEllipsis(S);if(oe){this._tryToAddEllipsisToLastLine();break}if(L=L.slice(U),L=L.trimLeft(),L.length>0&&(z=this._getTextWidth(L),z<=p)){this._addTextLine(L),S+=i,r=Math.max(r,z);break}}else break}else this._addTextLine(L),S+=i,r=Math.max(r,z),this._shouldHandleEllipsis(S)&&Mg)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,a=i!==g0&&i!==void 0,o=this.padding(),s=i-o*2,c=this.wrap(),d=c!==sN;return!d||a&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==g0&&t!==void 0,r=this.padding(),i=t-r*2,a=this.ellipsis(),o=this.textArr[this.textArr.length-1];if(!(!o||!a)){if(n){var s=this._getTextWidth(o.text+h4)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[c].pathLength);var d=0;i==="center"&&(d=Math.max(0,s/2-o/2)),i==="right"&&(d=Math.max(0,s-o));for(var p=nN(this.text()),g=this.text().split(" ").length-1,S,w,C,k=-1,P=0,D=function(){P=0;for(var fe=t.dataArray,X=k+1;X0)return k=X,fe[X];fe[X].command==="M"&&(S={x:fe[X].points[0],y:fe[X].points[1]})}return{}},M=function(fe){var X=t._getTextSize(fe).width+r;fe===" "&&i==="justify"&&(X+=(s-o)/g);var G=0,te=0;for(w=void 0;Math.abs(X-G)/X>.01&&te<20;){te++;for(var oe=G;C===void 0;)C=D(),C&&oe+C.pathLengthX?w=ui.getPointOnLine(X,S.x,S.y,C.points[0],C.points[1],S.x,S.y):C=void 0;break;case"A":var re=C.points[4],le=C.points[5],ee=C.points[4]+le;P===0?P=re+1e-8:X>G?P+=Math.PI/180*le/Math.abs(le):P-=Math.PI/360*le/Math.abs(le),(le<0&&P=0&&P>ee)&&(P=ee,ie=!0),w=ui.getPointOnEllipticalArc(C.points[0],C.points[1],C.points[2],C.points[3],P,C.points[6]);break;case"C":P===0?X>C.pathLength?P=1e-8:P=X/C.pathLength:X>G?P+=(X-G)/C.pathLength/2:P=Math.max(P-(G-X)/C.pathLength/2,0),P>1&&(P=1,ie=!0),w=ui.getPointOnCubicBezier(P,C.start.x,C.start.y,C.points[0],C.points[1],C.points[2],C.points[3],C.points[4],C.points[5]);break;case"Q":P===0?P=X/C.pathLength:X>G?P+=(X-G)/C.pathLength:P-=(G-X)/C.pathLength,P>1&&(P=1,ie=!0),w=ui.getPointOnQuadraticBezier(P,C.start.x,C.start.y,C.points[0],C.points[1],C.points[2],C.points[3]);break}w!==void 0&&(G=ui.getLineLength(S.x,S.y,w.x,w.y)),ie&&(ie=!1,C=void 0)}},R="C",L=t._getTextSize(R).width+r,z=d/L-1,U=0;Ue+`.${fN}`).join(" "),hN="nodesRect",L$=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],z$={"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 B$="ontouchstart"in Xt._global;function F$(e,t){if(e==="rotater")return"crosshair";t+=ke.degToRad(z$[e]||0);var n=(ke.radToDeg(t)%360+360)%360;return ke._inRange(n,315+22.5,360)||ke._inRange(n,0,22.5)?"ns-resize":ke._inRange(n,45-22.5,45+22.5)?"nesw-resize":ke._inRange(n,90-22.5,90+22.5)?"ew-resize":ke._inRange(n,135-22.5,135+22.5)?"nwse-resize":ke._inRange(n,180-22.5,180+22.5)?"ns-resize":ke._inRange(n,225-22.5,225+22.5)?"nesw-resize":ke._inRange(n,270-22.5,270+22.5)?"ew-resize":ke._inRange(n,315-22.5,315+22.5)?"nwse-resize":(ke.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var xw=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],pN=1e8;function U$(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 mN(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 H$(e,t){const n=U$(e);return mN(e,t,n)}function V$(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()},a=r._attrsAffectingSize.map(o=>o+"Change."+this._getEventNamespace()).join(" ");r.on(a,i),r.on(L$.map(o=>o+`.${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(),a=i.x-n.x,o=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const c=s.getAbsolutePosition();s.setAbsolutePosition({x:c.x+a,y:c.y+o}),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(hN),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(hN,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=t.getAbsoluteScale(r),o=t.getAbsolutePosition(r),s=i.x*a.x-t.offsetX()*a.x,c=i.y*a.y-t.offsetY()*a.y;const d=(Xt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),p={x:o.x+s*Math.cos(d)+c*Math.sin(-d),y:o.y+c*Math.cos(d)+s*Math.sin(d),width:i.width*a.x,height:i.height*a.y,rotation:d};return mN(p,-Xt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-pN,y:-pN,width:0,height:0,rotation:0};const n=[];this.nodes().map(d=>{const p=d.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:p.x,y:p.y},{x:p.x+p.width,y:p.y},{x:p.x+p.width,y:p.y+p.height},{x:p.x,y:p.y+p.height}],S=d.getAbsoluteTransform();g.forEach(function(w){var C=S.point(w);n.push(C)})});const r=new Yl;r.rotate(-Xt.getAngle(this.rotation()));var i,a,o,s;n.forEach(function(d){var p=r.point(d);i===void 0&&(i=o=p.x,a=s=p.y),i=Math.min(i,p.x),a=Math.min(a,p.y),o=Math.max(o,p.x),s=Math.max(s,p.y)}),r.invert();const c=r.point({x:i,y:a});return{x:c.x,y:c.y,width:o-i,height:s-a,rotation:Xt.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(),xw.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new h1({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:B$?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=Xt.getAngle(this.rotation()),a=F$(t,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 t=new yt({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()*ke._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,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 o=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-o.x,y:s.y-o.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(c=>{c._fire("transformstart",{evt:t.evt,target:c})})}_handleMouseMove(t){var n,r,i,a=this.findOne("."+this._movingAnchorName),o=a.getStage();o.setPointersPositions(t);const s=o.getPointerPosition();let c={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const d=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(d,c,t)),a.setAbsolutePosition(c);const p=a.getAbsolutePosition();if(!(d.x===p.x&&d.y===p.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=a.x()-g.width/2,r=-a.y()+g.height/2;let fe=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(fe-=Math.PI);var S=Xt.getAngle(this.rotation());const X=S+fe,G=Xt.getAngle(this.rotationSnapTolerance()),oe=V$(this.rotationSnaps(),X,G)-g.rotation,ie=H$(g,oe);this._fitNodesInto(ie,t);return}var w=this.keepRatio()||t.shiftKey,M=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(w){var C=M?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(C.x-a.x(),2)+Math.pow(C.y-a.y(),2));var k=this.findOne(".top-left").x()>C.x?-1:1,P=this.findOne(".top-left").y()>C.y?-1:1;n=i*this.cos*k,r=i*this.sin*P,this.findOne(".top-left").x(C.x-n),this.findOne(".top-left").y(C.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(a.y());else if(this._movingAnchorName==="top-right"){if(w){var C=M?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(a.x()-C.x,2)+Math.pow(C.y-a.y(),2));var k=this.findOne(".top-right").x()C.y?-1:1;n=i*this.cos*k,r=i*this.sin*P,this.findOne(".top-right").x(C.x+n),this.findOne(".top-right").y(C.y-r)}var D=a.position();this.findOne(".top-left").y(D.y),this.findOne(".bottom-right").x(D.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(w){var C=M?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(C.x-a.x(),2)+Math.pow(a.y()-C.y,2));var k=C.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(ke._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(ke._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const a=this.flipEnabled();var o=new Yl;if(o.rotate(Xt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=o.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!a){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=o.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!a){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=o.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!a){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=o.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!a){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:ke.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,c=new Yl;c.translate(r.x,r.y),c.rotate(r.rotation),c.scale(r.width/s,r.height/s);const d=new Yl;d.translate(t.x,t.y),d.rotate(t.rotation),d.scale(t.width/s,t.height/s);const p=d.multiply(c.invert());this._nodes.forEach(g=>{var S;const w=g.getParent().getAbsoluteTransform(),C=g.getTransform().copy();C.translate(g.offsetX(),g.offsetY());const k=new Yl;k.multiply(w.copy().invert()).multiply(p).multiply(w).multiply(C);const P=k.decompose();g.setAttrs(P),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(S=g.getLayer())===null||S===void 0||S.batchDraw()}),this.rotation(ke._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(ke._getRotation(n.rotation));var r=n.width,i=n.height,a=this.enabledAnchors(),o=this.resizeEnabled(),s=this.padding(),c=this.anchorSize();this.find("._anchor").forEach(d=>{d.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+s,offsetY:c/2+s,visible:o&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:c/2+s,visible:o&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:c/2-s,offsetY:c/2+s,visible:o&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:c/2+s,visible:o&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:c/2-s,visible:o&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:c/2+s,offsetY:c/2-s,visible:o&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:c/2-s,visible:o&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:c/2-s,offsetY:c/2-s,visible:o&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*ke._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=""),m0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Tt.prototype.toObject.call(this)}clone(t){var n=Tt.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};function G$(e){return e instanceof Array||ke.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){xw.indexOf(t)===-1&&ke.warn("Unknown anchor name: "+t+". Available names are: "+xw.join(", "))}),e||[]}qr.prototype.className="Transformer",la(qr),he.addGetterSetter(qr,"enabledAnchors",xw,G$),he.addGetterSetter(qr,"flipEnabled",!0,Dc()),he.addGetterSetter(qr,"resizeEnabled",!0),he.addGetterSetter(qr,"anchorSize",10,Et()),he.addGetterSetter(qr,"rotateEnabled",!0),he.addGetterSetter(qr,"rotationSnaps",[]),he.addGetterSetter(qr,"rotateAnchorOffset",50,Et()),he.addGetterSetter(qr,"rotationSnapTolerance",5,Et()),he.addGetterSetter(qr,"borderEnabled",!0),he.addGetterSetter(qr,"anchorStroke","rgb(0, 161, 255)"),he.addGetterSetter(qr,"anchorStrokeWidth",1,Et()),he.addGetterSetter(qr,"anchorFill","white"),he.addGetterSetter(qr,"anchorCornerRadius",0,Et()),he.addGetterSetter(qr,"borderStroke","rgb(0, 161, 255)"),he.addGetterSetter(qr,"borderStrokeWidth",1,Et()),he.addGetterSetter(qr,"borderDash"),he.addGetterSetter(qr,"keepRatio",!0),he.addGetterSetter(qr,"centeredScaling",!1),he.addGetterSetter(qr,"ignoreStroke",!1),he.addGetterSetter(qr,"padding",0,Et()),he.addGetterSetter(qr,"node"),he.addGetterSetter(qr,"nodes"),he.addGetterSetter(qr,"boundBoxFunc"),he.addGetterSetter(qr,"anchorDragBoundFunc"),he.addGetterSetter(qr,"shouldOverdrawWholeArea",!1),he.addGetterSetter(qr,"useSingleNodeRotation",!0),he.backCompat(qr,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Qf extends yt{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,Xt.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)}}Qf.prototype.className="Wedge",Qf.prototype._centroid=!0,Qf.prototype._attrsAffectingSize=["radius"],la(Qf),he.addGetterSetter(Qf,"radius",0,Et()),he.addGetterSetter(Qf,"angle",0,Et()),he.addGetterSetter(Qf,"clockwise",!1),he.backCompat(Qf,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function vN(){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],q$=[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 Y$(e,t){var n=e.data,r=e.width,i=e.height,a,o,s,c,d,p,g,S,w,C,k,P,D,M,R,L,z,U,H,q,J,$,K,fe,X=t+t+1,G=r-1,te=i-1,oe=t+1,ie=oe*(oe+1)/2,re=new vN,le=null,ee=re,de=null,Re=null,Ae=W$[t],_e=q$[t];for(s=1;s>_e,K!==0?(K=255/K,n[p]=(S*Ae>>_e)*K,n[p+1]=(w*Ae>>_e)*K,n[p+2]=(C*Ae>>_e)*K):n[p]=n[p+1]=n[p+2]=0,S-=P,w-=D,C-=M,k-=R,P-=de.r,D-=de.g,M-=de.b,R-=de.a,c=g+((c=a+t+1)>_e,K>0?(K=255/K,n[c]=(S*Ae>>_e)*K,n[c+1]=(w*Ae>>_e)*K,n[c+2]=(C*Ae>>_e)*K):n[c]=n[c+1]=n[c+2]=0,S-=P,w-=D,C-=M,k-=R,P-=de.r,D-=de.g,M-=de.b,R-=de.a,c=a+((c=o+oe)0&&Y$(t,n)};he.addGetterSetter(Tt,"blurRadius",0,Et(),he.afterSetFilter);const X$=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,n[s]=i,n[s+1]=a,n[s+2]=o};he.addGetterSetter(Tt,"contrast",0,Et(),he.afterSetFilter);const Z$=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),a=0,o=0,s=e.data,c=e.width,d=e.height,p=c*4,g=d;switch(r){case"top-left":a=-1,o=-1;break;case"top":a=-1,o=0;break;case"top-right":a=-1,o=1;break;case"right":a=0,o=1;break;case"bottom-right":a=1,o=1;break;case"bottom":a=1,o=0;break;case"bottom-left":a=1,o=-1;break;case"left":a=0,o=-1;break;default:ke.error("Unknown emboss direction: "+r)}do{var S=(g-1)*p,w=a;g+w<1&&(w=0),g+w>d&&(w=0);var C=(g-1+w)*c*4,k=c;do{var P=S+(k-1)*4,D=o;k+D<1&&(D=0),k+D>c&&(D=0);var M=C+(k-1+D)*4,R=s[P]-s[M],L=s[P+1]-s[M+1],z=s[P+2]-s[M+2],U=R,H=U>0?U:-U,q=L>0?L:-L,J=z>0?z:-z;if(q>H&&(U=L),J>H&&(U=z),U*=t,i){var $=s[P]+U,K=s[P+1]+U,fe=s[P+2]+U;s[P]=$>255?255:$<0?0:$,s[P+1]=K>255?255:K<0?0:K,s[P+2]=fe>255?255:fe<0?0:fe}else{var X=n-U;X<0?X=0:X>255&&(X=255),s[P]=s[P+1]=s[P+2]=X}}while(--k)}while(--g)};he.addGetterSetter(Tt,"embossStrength",.5,Et(),he.afterSetFilter),he.addGetterSetter(Tt,"embossWhiteLevel",.5,Et(),he.afterSetFilter),he.addGetterSetter(Tt,"embossDirection","top-left",null,he.afterSetFilter),he.addGetterSetter(Tt,"embossBlend",!1,null,he.afterSetFilter);function m4(e,t,n,r,i){var a=n-t,o=i-r,s;return a===0?r+o/2:o===0?r:(s=(e-t)/a,s=o*s+r,s)}const J$=function(e){var t=e.data,n=t.length,r=t[0],i=r,a,o=t[1],s=o,c,d=t[2],p=d,g,S,w=this.enhance();if(w!==0){for(S=0;Si&&(i=a),c=t[S+1],cs&&(s=c),g=t[S+2],gp&&(p=g);i===r&&(i=255,r=0),s===o&&(s=255,o=0),p===d&&(p=255,d=0);var C,k,P,D,M,R,L,z,U;for(w>0?(k=i+w*(255-i),P=r-w*(r-0),M=s+w*(255-s),R=o-w*(o-0),z=p+w*(255-p),U=d-w*(d-0)):(C=(i+r)*.5,k=i+w*(i-C),P=r+w*(r-C),D=(s+o)*.5,M=s+w*(s-D),R=o+w*(o-D),L=(p+d)*.5,z=p+w*(p-L),U=d+w*(d-L)),S=0;SD?P:D;var M=o,R=a,L,z,U=360/R*Math.PI/180,H,q;for(z=0;zR?M:R;var L=o,z=a,U,H,q=n.polarRotation||0,J,$;for(p=0;pt&&(L=R,z=0,U=-1),i=0;i=0&&w=0&&C=0&&w=0&&C=255*4?255:0}return o}function dee(e,t,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),o=[],s=0;s=0&&w=0&&C=n))for(a=k;a=r||(o=(n*a+i)*4,s+=L[o+0],c+=L[o+1],d+=L[o+2],p+=L[o+3],R+=1);for(s=s/R,c=c/R,d=d/R,p=p/R,i=w;i=n))for(a=k;a=r||(o=(n*a+i)*4,L[o+0]=s,L[o+1]=c,L[o+2]=d,L[o+3]=p)}};he.addGetterSetter(Tt,"pixelSize",8,Et(),he.afterSetFilter);const mee=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,a;for(a=0;a255?255:e<0?0:Math.round(e)}),he.addGetterSetter(Tt,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),he.addGetterSetter(Tt,"blue",0,bR,he.afterSetFilter);const gee=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o=this.alpha(),s,c;for(s=0;s255?255:e<0?0:Math.round(e)}),he.addGetterSetter(Tt,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),he.addGetterSetter(Tt,"blue",0,bR,he.afterSetFilter),he.addGetterSetter(Tt,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const yee=function(e){var t=e.data,n=t.length,r,i,a,o;for(r=0;r127&&(d=255-d),p>127&&(p=255-p),g>127&&(g=255-g),t[c]=d,t[c+1]=p,t[c+2]=g}while(--s)}while(--a)},See=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"),a=new y0.Stage({container:i,width:n,height:r}),o=new y0.Layer,s=new y0.Layer;o.add(new y0.Rect({...t,fill:"white"})),e.forEach(d=>s.add(new y0.Line({points:d.points,stroke:"black",strokeWidth:d.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:d.tool==="brush"?"source-over":"destination-out"}))),a.add(o),a.add(s);const c=a.toDataURL({...t});return i.remove(),c};let gN=null,yN=null;const wee=e=>{gN=e},Mc=()=>gN,Cee=e=>{yN=e},bN=()=>yN,Eee=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("

")})},SN=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),_ee=e=>{const t=Mc(),{generationMode:n,generationState:r,postprocessingState:i,canvasState:a,systemState:o}=e,{codeformerFidelity:s,facetoolStrength:c,facetoolType:d,hiresFix:p,hiresStrength:g,shouldRunESRGAN:S,shouldRunFacetool:w,upscalingLevel:C,upscalingStrength:k,upscalingDenoising:P}=i,{cfgScale:D,height:M,img2imgStrength:R,infillMethod:L,initialImage:z,iterations:U,perlin:H,prompt:q,negativePrompt:J,sampler:$,seamBlur:K,seamless:fe,seamSize:X,seamSteps:G,seamStrength:te,seed:oe,seedWeights:ie,shouldFitToWidthHeight:re,shouldGenerateVariations:le,shouldRandomizeSeed:ee,steps:de,threshold:Re,tileSize:Ae,variationAmount:_e,width:Me,shouldUseSymmetry:Te,horizontalSymmetrySteps:Xe,verticalSymmetrySteps:Qe}=r,{shouldDisplayInProgressType:vt,saveIntermediatesInterval:St,enableImageDebugging:qe}=o,Ce={prompt:q,iterations:U,steps:de,cfg_scale:D,threshold:Re,perlin:H,height:M,width:Me,sampler_name:$,seed:oe,progress_images:vt==="full-res",progress_latents:vt==="latents",save_intermediates:St,generation_mode:n,init_mask:""};let Lt=!1,De=!1;if(J!==""&&(Ce.prompt=`${q} [${J}]`),Ce.seed=ee?SN(Gk,Wk):oe,Te&&(Xe>0&&(Ce.h_symmetry_time_pct=Math.max(0,Math.min(1,Xe/de))),Qe>0&&(Ce.v_symmetry_time_pct=Math.max(0,Math.min(1,Qe/de)))),n==="txt2img"&&(Ce.hires_fix=p,p&&(Ce.strength=g)),["txt2img","img2img"].includes(n)&&(Ce.seamless=fe,S&&(Lt={level:C,denoise_str:P,strength:k}),w&&(De={type:d,strength:c},d==="codeformer"&&(De.codeformer_fidelity=s))),n==="img2img"&&z&&(Ce.init_img=typeof z=="string"?z:z.url,Ce.strength=R,Ce.fit=re),n==="unifiedCanvas"&&t){const{layerState:{objects:wt},boundingBoxCoordinates:ln,boundingBoxDimensions:Wt,stageScale:Rn,isMaskEnabled:ar,shouldPreserveMaskedArea:xe,boundingBoxScaleMethod:it,scaledBoundingBoxDimensions:at}=a,bt={...ln,...Wt},Ve=xee(ar?wt.filter(ck):[],bt);Ce.init_mask=Ve,Ce.fit=!1,Ce.strength=R,Ce.invert_mask=xe,Ce.bounding_box=bt;const ot=t.scale();t.scale({x:1/Rn,y:1/Rn});const Jt=t.getAbsolutePosition(),rn=t.toDataURL({x:bt.x+Jt.x,y:bt.y+Jt.y,width:bt.width,height:bt.height});qe&&Eee([{base64:Ve,caption:"mask sent as init_mask"},{base64:rn,caption:"image sent as init_img"}]),t.scale(ot),Ce.init_img=rn,Ce.progress_images=!1,it!=="none"&&(Ce.inpaint_width=at.width,Ce.inpaint_height=at.height),Ce.seam_size=X,Ce.seam_blur=K,Ce.seam_strength=te,Ce.seam_steps=G,Ce.tile_size=Ae,Ce.infill_method=L,Ce.force_outpaint=!1}return le?(Ce.variation_amount=_e,ie&&(Ce.with_variations=mX(ie))):Ce.variation_amount=0,qe&&(Ce.enable_image_debugging=qe),{generationParameters:Ce,esrganParameters:Lt,facetoolParameters:De}};var Tee=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,kee=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Pee=/[^-+\dA-Z]/g;function jo(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(xN[t]||t||xN.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var a=function(){return n?"getUTC":"get"},o=function(){return e[a()+"Date"]()},s=function(){return e[a()+"Day"]()},c=function(){return e[a()+"Month"]()},d=function(){return e[a()+"FullYear"]()},p=function(){return e[a()+"Hours"]()},g=function(){return e[a()+"Minutes"]()},S=function(){return e[a()+"Seconds"]()},w=function(){return e[a()+"Milliseconds"]()},C=function(){return n?0:e.getTimezoneOffset()},k=function(){return Aee(e)},P=function(){return Oee(e)},D={d:function(){return o()},dd:function(){return Xl(o())},ddd:function(){return ml.dayNames[s()]},DDD:function(){return wN({y:d(),m:c(),d:o(),_:a(),dayName:ml.dayNames[s()],short:!0})},dddd:function(){return ml.dayNames[s()+7]},DDDD:function(){return wN({y:d(),m:c(),d:o(),_:a(),dayName:ml.dayNames[s()+7]})},m:function(){return c()+1},mm:function(){return Xl(c()+1)},mmm:function(){return ml.monthNames[c()]},mmmm:function(){return ml.monthNames[c()+12]},yy:function(){return String(d()).slice(2)},yyyy:function(){return Xl(d(),4)},h:function(){return p()%12||12},hh:function(){return Xl(p()%12||12)},H:function(){return p()},HH:function(){return Xl(p())},M:function(){return g()},MM:function(){return Xl(g())},s:function(){return S()},ss:function(){return Xl(S())},l:function(){return Xl(w(),3)},L:function(){return Xl(Math.floor(w()/10))},t:function(){return p()<12?ml.timeNames[0]:ml.timeNames[1]},tt:function(){return p()<12?ml.timeNames[2]:ml.timeNames[3]},T:function(){return p()<12?ml.timeNames[4]:ml.timeNames[5]},TT:function(){return p()<12?ml.timeNames[6]:ml.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Dee(e)},o:function(){return(C()>0?"-":"+")+Xl(Math.floor(Math.abs(C())/60)*100+Math.abs(C())%60,4)},p:function(){return(C()>0?"-":"+")+Xl(Math.floor(Math.abs(C())/60),2)+":"+Xl(Math.floor(Math.abs(C())%60),2)},S:function(){return["th","st","nd","rd"][o()%10>3?0:(o()%100-o()%10!=10)*o()%10]},W:function(){return k()},WW:function(){return Xl(k())},N:function(){return P()}};return t.replace(Tee,function(M){return M in D?D[M]():M.slice(1,M.length-1)})}var xN={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"},ml={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"]},Xl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},wN=function(t){var n=t.y,r=t.m,i=t.d,a=t._,o=t.dayName,s=t.short,c=s===void 0?!1:s,d=new Date,p=new Date;p.setDate(p[a+"Date"]()-1);var g=new Date;g.setDate(g[a+"Date"]()+1);var S=function(){return d[a+"Date"]()},w=function(){return d[a+"Month"]()},C=function(){return d[a+"FullYear"]()},k=function(){return p[a+"Date"]()},P=function(){return p[a+"Month"]()},D=function(){return p[a+"FullYear"]()},M=function(){return g[a+"Date"]()},R=function(){return g[a+"Month"]()},L=function(){return g[a+"FullYear"]()};return C()===n&&w()===r&&S()===i?c?"Tdy":"Today":D()===n&&P()===r&&k()===i?c?"Ysd":"Yesterday":L()===n&&R()===r&&M()===i?c?"Tmw":"Tomorrow":o},Aee=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 a=(n-r)/(864e5*7);return 1+Math.floor(a)},Oee=function(t){var n=t.getDay();return n===0&&(n=7),n},Dee=function(t){return(String(t).match(kee)||[""]).pop().replace(Pee,"").replace(/GMT\+0000/g,"UTC")};const Mee=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(ql(!0));const a=r(),{generation:o,postprocessing:s,system:c,canvas:d}=a,p={generationMode:i,generationState:o,postprocessingState:s,canvasState:d,systemState:c};n(aZ());const{generationParameters:g,esrganParameters:S,facetoolParameters:w}=_ee(p);t.emit("generateImage",g,S,w),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...S,...w})}`}))},emitRunESRGAN:i=>{n(ql(!0));const{postprocessing:{upscalingLevel:a,upscalingDenoising:o,upscalingStrength:s}}=r(),c={upscale:[a,o,s]};t.emit("runPostprocessing",i,{type:"esrgan",...c}),n(Mo({timestamp:jo(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...c})}`}))},emitRunFacetool:i=>{n(ql(!0));const{postprocessing:{facetoolType:a,facetoolStrength:o,codeformerFidelity:s}}=r(),c={facetool_strength:o};a==="codeformer"&&(c.codeformer_fidelity=s),t.emit("runPostprocessing",i,{type:a,...c}),n(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...c})}`}))},emitDeleteImage:i=>{const{url:a,uuid:o,category:s,thumbnail:c}=i;n(cj(i)),t.emit("deleteImage",a,c,o,s)},emitRequestImages:i=>{const a=r().gallery,{earliest_mtime:o}=a.categories[i];t.emit("requestImages",i,o)},emitRequestNewImages:i=>{const a=r().gallery,{latest_mtime:o}=a.categories[i];t.emit("requestLatestImages",i,o)},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(tZ()),t.emit("convertToDiffusers",i)},emitMergeDiffusersModels:i=>{n(nZ()),t.emit("mergeDiffusersModels",i)},emitRequestModelChange:i=>{n(eZ()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}};let Cw;const jee=new Uint8Array(16);function Iee(){if(!Cw&&(Cw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cw(jee)}const qo=[];for(let e=0;e<256;++e)qo.push((e+256).toString(16).slice(1));function Ree(e,t=0){return(qo[e[t+0]]+qo[e[t+1]]+qo[e[t+2]]+qo[e[t+3]]+"-"+qo[e[t+4]]+qo[e[t+5]]+"-"+qo[e[t+6]]+qo[e[t+7]]+"-"+qo[e[t+8]]+qo[e[t+9]]+"-"+qo[e[t+10]]+qo[e[t+11]]+qo[e[t+12]]+qo[e[t+13]]+qo[e[t+14]]+qo[e[t+15]]).toLowerCase()}const CN={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function b0(e,t,n){if(CN.randomUUID&&!t&&!e)return CN.randomUUID();e=e||{};const r=e.random||(e.rng||Iee)();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 Ree(r)}const v4=Ji("socketio/generateImage"),Nee=Ji("socketio/runESRGAN"),Lee=Ji("socketio/runFacetool"),zee=Ji("socketio/deleteImage"),g4=Ji("socketio/requestImages"),EN=Ji("socketio/requestNewImages"),Bee=Ji("socketio/cancelProcessing"),Fee=Ji("socketio/requestSystemConfig"),_N=Ji("socketio/searchForModels"),v1=Ji("socketio/addNewModel"),Uee=Ji("socketio/deleteModel"),Hee=Ji("socketio/convertToDiffusers"),Vee=Ji("socketio/mergeDiffusersModels"),TN=Ji("socketio/requestModelChange"),Gee=Ji("socketio/saveStagingAreaImageToGallery"),Wee=Ji("socketio/requestEmptyTempFolder"),qee=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(zI(!0)),t(Qm(En.t("common.statusConnected"))),t(Fee());const r=n().gallery;r.categories.result.latest_mtime?t(EN("result")):t(g4("result")),r.categories.user.latest_mtime?t(EN("user")):t(g4("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(zI(!1)),t(Qm(En.t("common.statusDisconnected"))),t(Mo({timestamp:jo(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:o}=i.postprocessing,{boundingBox:s,generationMode:c,...d}=r,p={uuid:b0(),...d};if(["txt2img","img2img"].includes(c)&&t(r0({category:"result",image:{...p,category:"result"}})),c==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(LK({image:{...p,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(r0({image:{...p,category:"result"},category:"result"}))}if(o)switch(Nk[a]){case"img2img":{t(a0(p));break}}t(vk()),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(aX({uuid:b0(),...r,category:"result"})),r.isBase64||t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(r0({category:"result",image:{uuid:b0(),...r,category:"result"}})),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(ql(!0)),t(QQ(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:a}=r;try{t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(FI()),t(vk())}catch(o){console.error(o)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:a,category:o}=r,s=i.map(c=>({uuid:b0(),...c}));t(iX({images:s,areMoreImagesAvailable:a,category:o})),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t($Q());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(r0({category:"result",image:r})),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(vk())),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(cj(r));const{generation:{initialImage:a,maskPath:o}}=n();(a===i||(a==null?void 0:a.url)===i)&&t(bj()),o===i&&t(Cj("")),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(ZQ(r)),r.infill_methods.includes("patchmatch")||t(xj(r.infill_methods[0]))},onFoundModels:r=>{const{search_folder:i,found_models:a}=r;t(HI(i)),t(VI(a))},onNewModelAdded:r=>{const{new_model_name:i,model_list:a,update:o}=r;t(l0(a)),t(ql(!1)),t(Qm(En.t("modelManager.modelAdded"))),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Model Added: ${i}`,level:"info"})),t(qf({title:o?`${En.t("modelManager.modelUpdated")}: ${i}`:`${En.t("modelManager.modelAdded")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelDeleted:r=>{const{deleted_model_name:i,model_list:a}=r;t(l0(a)),t(ql(!1)),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`${En.t("modelManager.modelAdded")}: ${i}`,level:"info"})),t(qf({title:`${En.t("modelManager.modelEntryDeleted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelConverted:r=>{const{converted_model_name:i,model_list:a}=r;t(l0(a)),t(Qm(En.t("common.statusModelConverted"))),t(ql(!1)),t(hp(!0)),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Model converted: ${i}`,level:"info"})),t(qf({title:`${En.t("modelManager.modelConverted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelsMerged:r=>{const{merged_models:i,merged_model_name:a,model_list:o}=r;t(l0(o)),t(Qm(En.t("common.statusMergedModels"))),t(ql(!1)),t(hp(!0)),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Models merged: ${i}`,level:"info"})),t(qf({title:`${En.t("modelManager.modelsMerged")}: ${a}`,status:"success",duration:2500,isClosable:!0}))},onModelChanged:r=>{const{model_name:i,model_list:a}=r;t(l0(a)),t(Qm(En.t("common.statusModelChanged"))),t(ql(!1)),t(hp(!0)),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:a}=r;t(l0(a)),t(ql(!1)),t(hp(!0)),t(FI()),t(Mo({timestamp:jo(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(qf({title:En.t("toast.tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},Yee=()=>{const{origin:e}=new URL(window.location.href),t=iw(e,{timeout:6e4,path:`${window.location.pathname}socket.io`});let n=!1;return i=>a=>o=>{const{onConnect:s,onDisconnect:c,onError:d,onPostprocessingResult:p,onGenerationResult:g,onIntermediateResult:S,onProgressUpdate:w,onGalleryImages:C,onProcessingCanceled:k,onImageDeleted:P,onSystemConfig:D,onModelChanged:M,onFoundModels:R,onNewModelAdded:L,onModelDeleted:z,onModelConverted:U,onModelsMerged:H,onModelChangeFailed:q,onTempFolderEmptied:J}=qee(i),{emitGenerateImage:$,emitRunESRGAN:K,emitRunFacetool:fe,emitDeleteImage:X,emitRequestImages:G,emitRequestNewImages:te,emitCancelProcessing:oe,emitRequestSystemConfig:ie,emitSearchForModels:re,emitAddNewModel:le,emitDeleteModel:ee,emitConvertToDiffusers:de,emitMergeDiffusersModels:Re,emitRequestModelChange:Ae,emitSaveStagingAreaImageToGallery:_e,emitRequestEmptyTempFolder:Me}=Mee(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>c()),t.on("error",Te=>d(Te)),t.on("generationResult",Te=>g(Te)),t.on("postprocessingResult",Te=>p(Te)),t.on("intermediateResult",Te=>S(Te)),t.on("progressUpdate",Te=>w(Te)),t.on("galleryImages",Te=>C(Te)),t.on("processingCanceled",()=>{k()}),t.on("imageDeleted",Te=>{P(Te)}),t.on("systemConfig",Te=>{D(Te)}),t.on("foundModels",Te=>{R(Te)}),t.on("newModelAdded",Te=>{L(Te)}),t.on("modelDeleted",Te=>{z(Te)}),t.on("modelConverted",Te=>{U(Te)}),t.on("modelsMerged",Te=>{H(Te)}),t.on("modelChanged",Te=>{M(Te)}),t.on("modelChangeFailed",Te=>{q(Te)}),t.on("tempFolderEmptied",()=>{J()}),n=!0),o.type){case"socketio/generateImage":{$(o.payload);break}case"socketio/runESRGAN":{K(o.payload);break}case"socketio/runFacetool":{fe(o.payload);break}case"socketio/deleteImage":{X(o.payload);break}case"socketio/requestImages":{G(o.payload);break}case"socketio/requestNewImages":{te(o.payload);break}case"socketio/cancelProcessing":{oe();break}case"socketio/requestSystemConfig":{ie();break}case"socketio/searchForModels":{re(o.payload);break}case"socketio/addNewModel":{le(o.payload);break}case"socketio/deleteModel":{ee(o.payload);break}case"socketio/convertToDiffusers":{de(o.payload);break}case"socketio/mergeDiffusersModels":{Re(o.payload);break}case"socketio/requestModelChange":{Ae(o.payload);break}case"socketio/saveStagingAreaImageToGallery":{_e(o.payload);break}case"socketio/requestEmptyTempFolder":{Me();break}}a(o)}},Kee=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),Xee=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel","cancelOptions.cancelAfter"].map(e=>`system.${e}`),Qee=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),kN=c6({generation:SX,postprocessing:EX,gallery:fX,system:lZ,canvas:rX,ui:vZ,lightbox:hX}),Zee=F6.getPersistConfig({key:"root",storage:B6,rootReducer:kN,blacklist:[...Kee,...Xee,...Qee],debounce:300}),Jee=dK(Zee,kN),PN=UY({reducer:Jee,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(Yee()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),AN=gK(PN),gIe="",yIe="",bIe="",SIe="",xIe="",wIe="",CIe="",EIe="",_Ie="";function $ee(e){if(e.sheet)return e.sheet;for(var t=0;t0?Yo(x0,--vl):0,S0--,Za===10&&(S0=1,kw--),Za}function Ql(){return Za=vl2||S1(Za)>3?"":" "}function dte(e,t){for(;--t&&Ql()&&!(Za<48||Za>102||Za>57&&Za<65||Za>70&&Za<97););return b1(e,Aw()+(t<6&&Ad()==32&&Ql()==32))}function C4(e){for(;Ql();)switch(Za){case e:return vl;case 34:case 39:e!==34&&e!==39&&C4(Za);break;case 40:e===41&&C4(e);break;case 92:Ql();break}return vl}function fte(e,t){for(;Ql()&&e+Za!==47+10;)if(e+Za===42+42&&Ad()===47)break;return"/*"+b1(t,vl-1)+"*"+_w(e===47?e:Ql())}function hte(e){for(;!S1(Ad());)Ql();return b1(e,vl)}function pte(e){return IN(Dw("",null,null,null,[""],e=jN(e),0,[0],e))}function Dw(e,t,n,r,i,a,o,s,c){for(var d=0,p=0,g=o,S=0,w=0,C=0,k=1,P=1,D=1,M=0,R="",L=i,z=a,U=r,H=R;P;)switch(C=M,M=Ql()){case 40:if(C!=108&&Yo(H,g-1)==58){x4(H+=Yr(Ow(M),"&","&\f"),"&\f")!=-1&&(D=-1);break}case 34:case 39:case 91:H+=Ow(M);break;case 9:case 10:case 13:case 32:H+=cte(C);break;case 92:H+=dte(Aw()-1,7);continue;case 47:switch(Ad()){case 42:case 47:Tw(mte(fte(Ql(),Aw()),t,n),c);break;default:H+="/"}break;case 123*k:s[d++]=Pd(H)*D;case 125*k:case 59:case 0:switch(M){case 0:case 125:P=0;case 59+p:w>0&&Pd(H)-g&&Tw(w>32?NN(H+";",r,n,g-1):NN(Yr(H," ","")+";",r,n,g-2),c);break;case 59:H+=";";default:if(Tw(U=RN(H,t,n,d,p,i,s,R,L=[],z=[],g),a),M===123)if(p===0)Dw(H,t,U,U,L,a,g,s,z);else switch(S===99&&Yo(H,3)===110?100:S){case 100:case 109:case 115:Dw(e,U,U,r&&Tw(RN(e,U,U,0,0,i,s,R,i,L=[],g),z),i,z,g,s,r?L:z);break;default:Dw(H,U,U,U,[""],z,0,s,z)}}d=p=w=0,k=D=1,R=H="",g=o;break;case 58:g=1+Pd(H),w=C;default:if(k<1){if(M==123)--k;else if(M==125&&k++==0&&ute()==125)continue}switch(H+=_w(M),M*k){case 38:D=p>0?1:(H+="\f",-1);break;case 44:s[d++]=(Pd(H)-1)*D,D=1;break;case 64:Ad()===45&&(H+=Ow(Ql())),S=Ad(),p=g=Pd(R=H+=hte(Aw())),M++;break;case 45:C===45&&Pd(H)==2&&(k=0)}}return a}function RN(e,t,n,r,i,a,o,s,c,d,p){for(var g=i-1,S=i===0?a:[""],w=w4(S),C=0,k=0,P=0;C0?S[D]+" "+M:Yr(M,/&\f/g,S[D])))&&(c[P++]=R);return Pw(e,t,n,i===0?b4:s,c,d,p)}function mte(e,t,n){return Pw(e,t,n,y4,_w(lte()),g1(e,2,-2),0)}function NN(e,t,n,r){return Pw(e,t,n,S4,g1(e,0,r),g1(e,r+1,-1),r)}function w0(e,t){for(var n="",r=w4(e),i=0;i-1},Tte=function(t){return function(n,r,i){if(!(n.type!=="rule"||t.compat)){var a=n.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var o=n.parent===i[0],s=o?i[0].children:i,c=s.length-1;c>=0;c--){var d=s[c];if(d.line=0;r--)if(!FN(n[r]))return!0;return!1},UN=function(t){t.type="",t.value="",t.return="",t.children="",t.props=""},Pte=function(t,n,r){FN(t)&&(t.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),UN(t)):kte(n,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),UN(t)))};function HN(e,t){switch(ate(e,t)){case 5103:return zr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return zr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return zr+e+Ew+e+ps+e+e;case 6828:case 4268:return zr+e+ps+e+e;case 6165:return zr+e+ps+"flex-"+e+e;case 5187:return zr+e+Yr(e,/(\w+).+(:[^]+)/,zr+"box-$1$2"+ps+"flex-$1$2")+e;case 5443:return zr+e+ps+"flex-item-"+Yr(e,/flex-|-self/,"")+e;case 4675:return zr+e+ps+"flex-line-pack"+Yr(e,/align-content|flex-|-self/,"")+e;case 5548:return zr+e+ps+Yr(e,"shrink","negative")+e;case 5292:return zr+e+ps+Yr(e,"basis","preferred-size")+e;case 6060:return zr+"box-"+Yr(e,"-grow","")+zr+e+ps+Yr(e,"grow","positive")+e;case 4554:return zr+Yr(e,/([^-])(transform)/g,"$1"+zr+"$2")+e;case 6187:return Yr(Yr(Yr(e,/(zoom-|grab)/,zr+"$1"),/(image-set)/,zr+"$1"),e,"")+e;case 5495:case 3959:return Yr(e,/(image-set\([^]*)/,zr+"$1$`$1");case 4968:return Yr(Yr(e,/(.+:)(flex-)?(.*)/,zr+"box-pack:$3"+ps+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+zr+e+e;case 4095:case 3583:case 4068:case 2532:return Yr(e,/(.+)-inline(.+)/,zr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Pd(e)-1-t>6)switch(Yo(e,t+1)){case 109:if(Yo(e,t+4)!==45)break;case 102:return Yr(e,/(.+:)(.+)-([^]+)/,"$1"+zr+"$2-$3$1"+Ew+(Yo(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~x4(e,"stretch")?HN(Yr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Yo(e,t+1)!==115)break;case 6444:switch(Yo(e,Pd(e)-3-(~x4(e,"!important")&&10))){case 107:return Yr(e,":",":"+zr)+e;case 101:return Yr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zr+(Yo(e,14)===45?"inline-":"")+"box$3$1"+zr+"$2$3$1"+ps+"$2box$3")+e}break;case 5936:switch(Yo(e,t+11)){case 114:return zr+e+ps+Yr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zr+e+ps+Yr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zr+e+ps+Yr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zr+e+ps+e+e}return e}var Ate=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case S4:t.return=HN(t.value,t.length);break;case ON:return w0([y1(t,{value:Yr(t.value,"@","@"+zr)})],i);case b4:if(t.length)return ste(t.props,function(a){switch(ote(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return w0([y1(t,{props:[Yr(a,/:(read-\w+)/,":"+Ew+"$1")]})],i);case"::placeholder":return w0([y1(t,{props:[Yr(a,/:(plac\w+)/,":"+zr+"input-$1")]}),y1(t,{props:[Yr(a,/:(plac\w+)/,":"+Ew+"$1")]}),y1(t,{props:[Yr(a,/:(plac\w+)/,ps+"input-$1")]})],i)}return""})}},Ote=[Ate],Dte=function(t){var n=t.key;if(process.env.NODE_ENV!=="production"&&!n)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements.`);if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(k){var P=k.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(k),k.setAttribute("data-s",""))})}var i=t.stylisPlugins||Ote;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(n))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+n+'" was passed');var a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(k){for(var P=k.getAttribute("data-emotion").split(" "),D=1;D=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 Ite={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},VN=`You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". You can read more about this here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Rte="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Nte=/[A-Z]|^ms/g,GN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_4=function(t){return t.charCodeAt(1)===45},WN=function(t){return t!=null&&typeof t!="boolean"},T4=zN(function(e){return _4(e)?e:e.replace(Nte,"-$&").toLowerCase()}),Iw=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(GN,function(r,i,a){return jc={name:i,styles:a,next:jc},i})}return Ite[t]!==1&&!_4(t)&&typeof n=="number"&&n!==0?n+"px":n};if(process.env.NODE_ENV!=="production"){var Lte=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,zte=["normal","none","initial","inherit","unset"],Bte=Iw,Fte=/^-ms-/,Ute=/-(.)/g,qN={};Iw=function(t,n){if(t==="content"&&(typeof n!="string"||zte.indexOf(n)===-1&&!Lte.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+n+"\"'`");var r=Bte(t,n);return r!==""&&!_4(t)&&t.indexOf("-")!==-1&&qN[t]===void 0&&(qN[t]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+t.replace(Fte,"ms-").replace(Ute,function(i,a){return a.toUpperCase()})+"?")),r}}var YN="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function x1(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&n.toString()==="NO_COMPONENT_SELECTOR")throw new Error(YN);return n}switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return jc={name:n.name,styles:n.styles,next:jc},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)jc={name:r.name,styles:r.styles,next:jc},r=r.next;var i=n.styles+";";return process.env.NODE_ENV!=="production"&&n.map!==void 0&&(i+=n.map),i}return Hte(e,t,n)}case"function":{if(e!==void 0){var a=jc,o=n(e);return jc=a,x1(e,t,o)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var s=[],c=n.replace(GN,function(p,g,S){var w="animation"+s.length;return s.push("const "+w+" = keyframes`"+S.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+w+"}"});s.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(s,["`"+c+"`"]).join(` `)+` You should wrap it with \`css\` like this: `+("css`"+c+"`"))}break}if(t==null)return n;var d=t[n];return d!==void 0?d:n}function Hte(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i ({})}!");return r}if(process.env.NODE_ENV!=="production"&&(n==null||typeof n!="object"||Array.isArray(n)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Uf({},t,n)},qte=LN(function(e){return LN(function(t){return Wte(e,t)})}),Yte=function(t){var n=A.useContext(yp);return t.theme!==n&&(n=qte(n)(t.theme)),A.createElement(yp.Provider,{value:n},t.children)},JN="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",$N="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",Kte=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Mw(n,r,i),k4(function(){return jw(n,r,i)}),null},Xte=Rw(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[JN],a=[r],o="";typeof e.className=="string"?o=E4(t.registered,a,e.className):e.className!=null&&(o=e.className+" ");var s=C0(a,void 0,A.useContext(yp));if(process.env.NODE_ENV!=="production"&&s.name.indexOf("-")===-1){var c=e[$N];c&&(s=C0([s,"label:"+c+";"]))}o+=t.key+"-"+s.name;var d={};for(var p in e)Gte.call(e,p)&&p!=="css"&&p!==JN&&(process.env.NODE_ENV==="production"||p!==$N)&&(d[p]=e[p]);return d.ref=n,d.className=o,A.createElement(A.Fragment,null,A.createElement(Kte,{cache:t,serialized:s,isStringTag:typeof i=="string"}),A.createElement(i,d))});process.env.NODE_ENV!=="production"&&(Xte.displayName="EmotionCssPropInternal");var Qte={name:"@emotion/react",version:"11.10.6",main:"dist/emotion-react.cjs.js",module:"dist/emotion-react.esm.js",browser:{"./dist/emotion-react.esm.js":"./dist/emotion-react.browser.esm.js"},exports:{".":{module:{worker:"./dist/emotion-react.worker.esm.js",browser:"./dist/emotion-react.browser.esm.js",default:"./dist/emotion-react.esm.js"},default:"./dist/emotion-react.cjs.js"},"./jsx-runtime":{module:{worker:"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",browser:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"},default:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"},"./_isolated-hnrs":{module:{worker:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",browser:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"},default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"},"./jsx-dev-runtime":{module:{worker:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",browser:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"},default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"},"./package.json":"./package.json","./types/css-prop":"./types/css-prop.d.ts","./macro":"./macro.js"},types:"types/index.d.ts",files:["src","dist","jsx-runtime","jsx-dev-runtime","_isolated-hnrs","types/*.d.ts","macro.js","macro.d.ts","macro.js.flow"],sideEffects:!1,author:"Emotion Contributors",license:"MIT",scripts:{"test:typescript":"dtslint types"},dependencies:{"@babel/runtime":"^7.18.3","@emotion/babel-plugin":"^11.10.6","@emotion/cache":"^11.10.5","@emotion/serialize":"^1.1.1","@emotion/use-insertion-effect-with-fallbacks":"^1.0.0","@emotion/utils":"^1.2.0","@emotion/weak-memoize":"^0.3.0","hoist-non-react-statics":"^3.3.1"},peerDependencies:{react:">=16.8.0"},peerDependenciesMeta:{"@types/react":{optional:!0}},devDependencies:{"@definitelytyped/dtslint":"0.0.112","@emotion/css":"11.10.6","@emotion/css-prettifier":"1.1.1","@emotion/server":"11.10.0","@emotion/styled":"11.10.6","html-tag-names":"^1.1.2",react:"16.14.0","svg-tag-names":"^1.1.1",typescript:"^4.5.5"},repository:"https://github.com/emotion-js/emotion/tree/main/packages/react",publishConfig:{access:"public"},"umd:main":"dist/emotion-react.umd.min.js",preconstruct:{entrypoints:["./index.js","./jsx-runtime.js","./jsx-dev-runtime.js","./_isolated-hnrs.js"],umdName:"emotionReact",exports:{envConditions:["browser","worker"],extra:{"./types/css-prop":"./types/css-prop.d.ts","./macro":"./macro.js"}}}},eL=!1,w1=Rw(function(e,t){process.env.NODE_ENV!=="production"&&!eL&&(e.className||e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),eL=!0);var n=e.styles,r=C0([n],void 0,A.useContext(yp)),i=A.useRef();return ZN(function(){var a=t.key+"-global",o=new t.sheet.constructor({key:a,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,c=document.querySelector('style[data-emotion="'+a+" "+r.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),c!==null&&(s=!0,c.setAttribute("data-emotion",a),o.hydrate([c])),i.current=[o,s],function(){o.flush()}},[t]),ZN(function(){var a=i.current,o=a[0],s=a[1];if(s){a[1]=!1;return}if(r.next!==void 0&&jw(t,r.next,!0),o.tags.length){var c=o.tags[o.tags.length-1].nextElementSibling;o.before=c,o.flush()}t.insert("",r,o,!1)},[t,r.name]),null});process.env.NODE_ENV!=="production"&&(w1.displayName="EmotionGlobal");function Zte(){for(var e=arguments.length,t=new Array(e),n=0;n component."),o="";for(var s in a)a[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=a}o&&(i&&(i+=" "),i+=o)}}return i};function $te(e,t,n){var r=[],i=E4(e,r,n);return r.length<2?n:i+t(r)}var ene=function(t){var n=t.cache,r=t.serializedArr;return k4(function(){for(var i=0;iv.jsx(w1,{styles:iL}),ine=()=>v.jsx(w1,{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; } ${iL} `});function ane(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Kr(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:a}=e,o=A.createContext(void 0);o.displayName=t;function s(){var c;const d=A.useContext(o);if(!d&&n){const p=new Error(a??ane(r,i));throw p.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,p,s),p}return d}return[o.Provider,s,o]}var[one,sne]=Kr({strict:!1,name:"PortalManagerContext"});function aL(e){const{children:t,zIndex:n}=e;return v.jsx(one,{value:{zIndex:n},children:t})}aL.displayName="PortalManager";var Od=Boolean(globalThis==null?void 0:globalThis.document)?A.useLayoutEffect:A.useEffect,[oL,lne]=Kr({strict:!1,name:"PortalContext"}),A4="chakra-portal",une=".chakra-portal",cne=e=>v.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),dne=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=A.useState(null),a=A.useRef(null),[,o]=A.useState({});A.useEffect(()=>o({}),[]);const s=lne(),c=sne();Od(()=>{if(!r)return;const p=r.ownerDocument,g=t?s??p.body:p.body;if(!g)return;a.current=p.createElement("div"),a.current.className=A4,g.appendChild(a.current),o({});const S=a.current;return()=>{g.contains(S)&&g.removeChild(S)}},[r]);const d=c!=null&&c.zIndex?v.jsx(cne,{zIndex:c==null?void 0:c.zIndex,children:n}):n;return a.current?Au.createPortal(v.jsx(oL,{value:a.current,children:d}),a.current):v.jsx("span",{ref:p=>{p&&i(p)}})},fne=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,a=i??(typeof window<"u"?document.body:void 0),o=A.useMemo(()=>{const c=i==null?void 0:i.ownerDocument.createElement("div");return c&&(c.className=A4),c},[i]),[,s]=A.useState({});return Od(()=>s({}),[]),Od(()=>{if(!(!o||!a))return a.appendChild(o),()=>{a.removeChild(o)}},[o,a]),a&&o?Au.createPortal(v.jsx(oL,{value:r?o:null,children:t}),o):null};function ov(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?v.jsx(fne,{containerRef:n,...r}):v.jsx(dne,{...r})}ov.className=A4,ov.selector=une,ov.displayName="Portal";function Sp(){const e=A.useContext(yp);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var O4=A.createContext({});O4.displayName="ColorModeContext";function D4(){const e=A.useContext(O4);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Nw={light:"chakra-ui-light",dark:"chakra-ui-dark"};function hne(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?Nw.dark:Nw.light),document.body.classList.remove(r?Nw.light:Nw.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(),a=o=>{r(o.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(a):i.addEventListener("change",a),()=>{typeof i.removeListener=="function"?i.removeListener(a):i.removeEventListener("change",a)}},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 pne="chakra-ui-color-mode";function mne(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 vne=mne(pne),sL=()=>{};function lL(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function uL(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:a}={},colorModeManager:o=vne}=e,s=i==="dark"?"dark":"light",[c,d]=A.useState(()=>lL(o,s)),[p,g]=A.useState(()=>lL(o)),{getSystemTheme:S,setClassName:w,setDataset:C,addListener:k}=A.useMemo(()=>hne({preventTransition:a}),[a]),P=i==="system"&&!c?p:c,D=A.useCallback(L=>{const z=L==="system"?S():L;d(z),w(z==="dark"),C(z),o.set(z)},[o,S,w,C]);Od(()=>{i==="system"&&g(S())},[]),A.useEffect(()=>{const L=o.get();if(L){D(L);return}if(i==="system"){D("system");return}D(s)},[o,s,i,D]);const M=A.useCallback(()=>{D(P==="dark"?"light":"dark")},[P,D]);A.useEffect(()=>{if(r)return k(D)},[r,k,D]);const R=A.useMemo(()=>({colorMode:t??P,toggleColorMode:t?sL:M,setColorMode:t?sL:D,forced:t!==void 0}),[P,M,D,t]);return v.jsx(O4.Provider,{value:R,children:n})}uL.displayName="ColorModeProvider";function cL(){const e=D4(),t=Sp();return{...e,theme:t}}var cn=(...e)=>e.filter(Boolean).join(" ");function gne(){return process.env.NODE_ENV!=="production"}function ms(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var C1=e=>{const{condition:t,message:n}=e;t&&gne()&&console.warn(n)};function Nu(e,...t){return yne(e)?e(...t):e}var yne=e=>typeof e=="function",$n=e=>e?"":void 0,Zf=e=>e?!0:void 0;function Zt(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Lw(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var zw={},bne={get exports(){return zw},set exports(e){zw=e}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,a=16,o=9007199254740991,s="[object Arguments]",c="[object Array]",d="[object AsyncFunction]",p="[object Boolean]",g="[object Date]",S="[object Error]",w="[object Function]",C="[object GeneratorFunction]",k="[object Map]",P="[object Number]",D="[object Null]",M="[object Object]",R="[object Proxy]",L="[object RegExp]",z="[object Set]",U="[object String]",H="[object Undefined]",q="[object WeakMap]",J="[object ArrayBuffer]",$="[object DataView]",K="[object Float32Array]",fe="[object Float64Array]",X="[object Int8Array]",G="[object Int16Array]",te="[object Int32Array]",oe="[object Uint8Array]",ie="[object Uint8ClampedArray]",re="[object Uint16Array]",le="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,de=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,Ae={};Ae[K]=Ae[fe]=Ae[X]=Ae[G]=Ae[te]=Ae[oe]=Ae[ie]=Ae[re]=Ae[le]=!0,Ae[s]=Ae[c]=Ae[J]=Ae[p]=Ae[$]=Ae[g]=Ae[S]=Ae[w]=Ae[k]=Ae[P]=Ae[M]=Ae[L]=Ae[z]=Ae[U]=Ae[q]=!1;var _e=typeof Bs=="object"&&Bs&&Bs.Object===Object&&Bs,Me=typeof self=="object"&&self&&self.Object===Object&&self,Te=_e||Me||Function("return this")(),Xe=t&&!t.nodeType&&t,Qe=Xe&&!0&&e&&!e.nodeType&&e,vt=Qe&&Qe.exports===Xe,St=vt&&_e.process,qe=function(){try{var ae=Qe&&Qe.require&&Qe.require("util").types;return ae||St&&St.binding&&St.binding("util")}catch{}}(),Ce=qe&&qe.isTypedArray;function Lt(ae,ve,Le){switch(Le.length){case 0:return ae.call(ve);case 1:return ae.call(ve,Le[0]);case 2:return ae.call(ve,Le[0],Le[1]);case 3:return ae.call(ve,Le[0],Le[1],Le[2])}return ae.apply(ve,Le)}function De(ae,ve){for(var Le=-1,Bt=Array(ae);++Le-1}function nu(ae,ve){var Le=this.__data__,Bt=pa(Le,ae);return Bt<0?(++this.size,Le.push([ae,ve])):Le[Bt][1]=ve,this}Ui.prototype.clear=Jo,Ui.prototype.delete=tu,Ui.prototype.get=Xu,Ui.prototype.has=Hc,Ui.prototype.set=nu;function di(ae){var ve=-1,Le=ae==null?0:ae.length;for(this.clear();++ve1?Le[Kn-1]:void 0,pn=Kn>2?Le[2]:void 0;for(jr=ae.length>3&&typeof jr=="function"?(Kn--,jr):void 0,pn&&Gc(Le[0],Le[1],pn)&&(jr=Kn<3?void 0:jr,Kn=1),ve=Object(ve);++Bt-1&&ae%1==0&&ae0){if(++ve>=i)return arguments[0]}else ve=0;return ae.apply(void 0,arguments)}}function ef(ae){if(ae!=null){try{return at.call(ae)}catch{}try{return ae+""}catch{}}return""}function po(ae,ve){return ae===ve||ae!==ae&&ve!==ve}var xh=au(function(){return arguments}())?au:function(ae){return hi(ae)&&bt.call(ae,"callee")&&!Ft.call(ae,"callee")},qc=Array.isArray;function tr(ae){return ae!=null&&Qp(ae.length)&&!nf(ae)}function Ju(ae){return hi(ae)&&tr(ae)}var tf=zt||em;function nf(ae){if(!Qs(ae))return!1;var ve=iu(ae);return ve==w||ve==C||ve==d||ve==R}function Qp(ae){return typeof ae=="number"&&ae>-1&&ae%1==0&&ae<=o}function Qs(ae){var ve=typeof ae;return ae!=null&&(ve=="object"||ve=="function")}function hi(ae){return ae!=null&&typeof ae=="object"}function wh(ae){if(!hi(ae)||iu(ae)!=M)return!1;var ve=Ge(ae);if(ve===null)return!0;var Le=bt.call(ve,"constructor")&&ve.constructor;return typeof Le=="function"&&Le instanceof Le&&at.call(Le)==Jt}var Zp=Ce?wt(Ce):Kd;function Ch(ae){return va(ae,Jp(ae))}function Jp(ae){return tr(ae)?fi(ae,!0):ou(ae)}var Tr=Cl(function(ae,ve,Le,Bt){Ys(ae,ve,Le,Bt)});function nr(ae){return function(){return ae}}function $p(ae){return ae}function em(){return!1}e.exports=Tr})(bne,zw);const Lu=zw;var Sne=e=>/!(important)?$/.test(e),dL=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,xne=(e,t)=>n=>{const r=String(t),i=Sne(r),a=dL(r),o=e?`${e}.${a}`:a;let s=ms(n.__cssMap)&&o in n.__cssMap?n.__cssMap[o].varRef:t;return s=dL(s),i?`${s} !important`:s};function M4(e){const{scale:t,transform:n,compose:r}=e;return(a,o)=>{var s;const c=xne(t,a)(o);let d=(s=n==null?void 0:n(c,o))!=null?s:c;return r&&(d=r(d,o)),d}}var Bw=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Ic(e,t){return n=>{const r={property:n,scale:e};return r.transform=M4({scale:e,transform:t}),r}}var wne=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function Cne(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:wne(t),transform:n?M4({scale:n,compose:r}):r}}var fL=["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 Ene(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...fL].join(" ")}function _ne(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...fL].join(" ")}var Tne={"--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(" ")},kne={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 Pne(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 Ane={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},j4={"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"},One=new Set(Object.values(j4)),hL=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Dne=e=>e.trim();function Mne(e,t){if(e==null||hL.has(e))return e;const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),i=r==null?void 0:r[1],a=r==null?void 0:r[2];if(!i||!a)return e;const o=i.includes("-gradient")?i:`${i}-gradient`,[s,...c]=a.split(",").map(Dne).filter(Boolean);if((c==null?void 0:c.length)===0)return e;const d=s in j4?j4[s]:s;c.unshift(d);const p=c.map(g=>{if(One.has(g))return g;const S=g.indexOf(" "),[w,C]=S!==-1?[g.substr(0,S),g.substr(S+1)]:[g],k=pL(C)?C:C&&C.split(" "),P=`colors.${w}`,D=P in t.__cssMap?t.__cssMap[P].varRef:w;return k?[D,...Array.isArray(k)?k:[k]].join(" "):D});return`${o}(${p.join(", ")})`}var pL=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),jne=(e,t)=>Mne(e,t??{});function Ine(e){return/^var\(--.+\)$/.test(e)}var Rne=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Dd=e=>t=>`${e}(${t})`,Ar={filter(e){return e!=="auto"?e:Tne},backdropFilter(e){return e!=="auto"?e:kne},ring(e){return Pne(Ar.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?Ene():e==="auto-gpu"?_ne():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Rne(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(Ine(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:jne,blur:Dd("blur"),opacity:Dd("opacity"),brightness:Dd("brightness"),contrast:Dd("contrast"),dropShadow:Dd("drop-shadow"),grayscale:Dd("grayscale"),hueRotate:Dd("hue-rotate"),invert:Dd("invert"),saturate:Dd("saturate"),sepia:Dd("sepia"),bgImage(e){return e==null||pL(e)||hL.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=Ane[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},Se={borderWidths:Ic("borderWidths"),borderStyles:Ic("borderStyles"),colors:Ic("colors"),borders:Ic("borders"),radii:Ic("radii",Ar.px),space:Ic("space",Bw(Ar.vh,Ar.px)),spaceT:Ic("space",Bw(Ar.vh,Ar.px)),degreeT(e){return{property:e,transform:Ar.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:M4({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Ic("sizes",Bw(Ar.vh,Ar.px)),sizesT:Ic("sizes",Bw(Ar.vh,Ar.fraction)),shadows:Ic("shadows"),logical:Cne,blur:Ic("blur",Ar.blur)},Fw={background:Se.colors("background"),backgroundColor:Se.colors("backgroundColor"),backgroundImage:Se.propT("backgroundImage",Ar.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Ar.bgClip},bgSize:Se.prop("backgroundSize"),bgPosition:Se.prop("backgroundPosition"),bg:Se.colors("background"),bgColor:Se.colors("backgroundColor"),bgPos:Se.prop("backgroundPosition"),bgRepeat:Se.prop("backgroundRepeat"),bgAttachment:Se.prop("backgroundAttachment"),bgGradient:Se.propT("backgroundImage",Ar.gradient),bgClip:{transform:Ar.bgClip}};Object.assign(Fw,{bgImage:Fw.backgroundImage,bgImg:Fw.backgroundImage});var Br={border:Se.borders("border"),borderWidth:Se.borderWidths("borderWidth"),borderStyle:Se.borderStyles("borderStyle"),borderColor:Se.colors("borderColor"),borderRadius:Se.radii("borderRadius"),borderTop:Se.borders("borderTop"),borderBlockStart:Se.borders("borderBlockStart"),borderTopLeftRadius:Se.radii("borderTopLeftRadius"),borderStartStartRadius:Se.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:Se.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:Se.radii("borderTopRightRadius"),borderStartEndRadius:Se.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:Se.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:Se.borders("borderRight"),borderInlineEnd:Se.borders("borderInlineEnd"),borderBottom:Se.borders("borderBottom"),borderBlockEnd:Se.borders("borderBlockEnd"),borderBottomLeftRadius:Se.radii("borderBottomLeftRadius"),borderBottomRightRadius:Se.radii("borderBottomRightRadius"),borderLeft:Se.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:Se.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:Se.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:Se.borders(["borderLeft","borderRight"]),borderInline:Se.borders("borderInline"),borderY:Se.borders(["borderTop","borderBottom"]),borderBlock:Se.borders("borderBlock"),borderTopWidth:Se.borderWidths("borderTopWidth"),borderBlockStartWidth:Se.borderWidths("borderBlockStartWidth"),borderTopColor:Se.colors("borderTopColor"),borderBlockStartColor:Se.colors("borderBlockStartColor"),borderTopStyle:Se.borderStyles("borderTopStyle"),borderBlockStartStyle:Se.borderStyles("borderBlockStartStyle"),borderBottomWidth:Se.borderWidths("borderBottomWidth"),borderBlockEndWidth:Se.borderWidths("borderBlockEndWidth"),borderBottomColor:Se.colors("borderBottomColor"),borderBlockEndColor:Se.colors("borderBlockEndColor"),borderBottomStyle:Se.borderStyles("borderBottomStyle"),borderBlockEndStyle:Se.borderStyles("borderBlockEndStyle"),borderLeftWidth:Se.borderWidths("borderLeftWidth"),borderInlineStartWidth:Se.borderWidths("borderInlineStartWidth"),borderLeftColor:Se.colors("borderLeftColor"),borderInlineStartColor:Se.colors("borderInlineStartColor"),borderLeftStyle:Se.borderStyles("borderLeftStyle"),borderInlineStartStyle:Se.borderStyles("borderInlineStartStyle"),borderRightWidth:Se.borderWidths("borderRightWidth"),borderInlineEndWidth:Se.borderWidths("borderInlineEndWidth"),borderRightColor:Se.colors("borderRightColor"),borderInlineEndColor:Se.colors("borderInlineEndColor"),borderRightStyle:Se.borderStyles("borderRightStyle"),borderInlineEndStyle:Se.borderStyles("borderInlineEndStyle"),borderTopRadius:Se.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:Se.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:Se.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:Se.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Br,{rounded:Br.borderRadius,roundedTop:Br.borderTopRadius,roundedTopLeft:Br.borderTopLeftRadius,roundedTopRight:Br.borderTopRightRadius,roundedTopStart:Br.borderStartStartRadius,roundedTopEnd:Br.borderStartEndRadius,roundedBottom:Br.borderBottomRadius,roundedBottomLeft:Br.borderBottomLeftRadius,roundedBottomRight:Br.borderBottomRightRadius,roundedBottomStart:Br.borderEndStartRadius,roundedBottomEnd:Br.borderEndEndRadius,roundedLeft:Br.borderLeftRadius,roundedRight:Br.borderRightRadius,roundedStart:Br.borderInlineStartRadius,roundedEnd:Br.borderInlineEndRadius,borderStart:Br.borderInlineStart,borderEnd:Br.borderInlineEnd,borderTopStartRadius:Br.borderStartStartRadius,borderTopEndRadius:Br.borderStartEndRadius,borderBottomStartRadius:Br.borderEndStartRadius,borderBottomEndRadius:Br.borderEndEndRadius,borderStartRadius:Br.borderInlineStartRadius,borderEndRadius:Br.borderInlineEndRadius,borderStartWidth:Br.borderInlineStartWidth,borderEndWidth:Br.borderInlineEndWidth,borderStartColor:Br.borderInlineStartColor,borderEndColor:Br.borderInlineEndColor,borderStartStyle:Br.borderInlineStartStyle,borderEndStyle:Br.borderInlineEndStyle});var Nne={color:Se.colors("color"),textColor:Se.colors("color"),fill:Se.colors("fill"),stroke:Se.colors("stroke")},I4={boxShadow:Se.shadows("boxShadow"),mixBlendMode:!0,blendMode:Se.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:Se.prop("backgroundBlendMode"),opacity:!0};Object.assign(I4,{shadow:I4.boxShadow});var Lne={filter:{transform:Ar.filter},blur:Se.blur("--chakra-blur"),brightness:Se.propT("--chakra-brightness",Ar.brightness),contrast:Se.propT("--chakra-contrast",Ar.contrast),hueRotate:Se.degreeT("--chakra-hue-rotate"),invert:Se.propT("--chakra-invert",Ar.invert),saturate:Se.propT("--chakra-saturate",Ar.saturate),dropShadow:Se.propT("--chakra-drop-shadow",Ar.dropShadow),backdropFilter:{transform:Ar.backdropFilter},backdropBlur:Se.blur("--chakra-backdrop-blur"),backdropBrightness:Se.propT("--chakra-backdrop-brightness",Ar.brightness),backdropContrast:Se.propT("--chakra-backdrop-contrast",Ar.contrast),backdropHueRotate:Se.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:Se.propT("--chakra-backdrop-invert",Ar.invert),backdropSaturate:Se.propT("--chakra-backdrop-saturate",Ar.saturate)},Uw={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Ar.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:Se.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:Se.space("gap"),rowGap:Se.space("rowGap"),columnGap:Se.space("columnGap")};Object.assign(Uw,{flexDir:Uw.flexDirection});var mL={gridGap:Se.space("gridGap"),gridColumnGap:Se.space("gridColumnGap"),gridRowGap:Se.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},zne={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Ar.outline},outlineOffset:!0,outlineColor:Se.colors("outlineColor")},zu={width:Se.sizesT("width"),inlineSize:Se.sizesT("inlineSize"),height:Se.sizes("height"),blockSize:Se.sizes("blockSize"),boxSize:Se.sizes(["width","height"]),minWidth:Se.sizes("minWidth"),minInlineSize:Se.sizes("minInlineSize"),minHeight:Se.sizes("minHeight"),minBlockSize:Se.sizes("minBlockSize"),maxWidth:Se.sizes("maxWidth"),maxInlineSize:Se.sizes("maxInlineSize"),maxHeight:Se.sizes("maxHeight"),maxBlockSize:Se.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:Se.propT("float",Ar.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(zu,{w:zu.width,h:zu.height,minW:zu.minWidth,maxW:zu.maxWidth,minH:zu.minHeight,maxH:zu.maxHeight,overscroll:zu.overscrollBehavior,overscrollX:zu.overscrollBehaviorX,overscrollY:zu.overscrollBehaviorY});var Bne={listStyleType:!0,listStylePosition:!0,listStylePos:Se.prop("listStylePosition"),listStyleImage:!0,listStyleImg:Se.prop("listStyleImage")};function Fne(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,a,o)=>{if(typeof r>"u")return e(r,i,a);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const c=e(r,i,a,o);return s.set(i,c),c}},Hne=Une(Fne),Vne={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Gne={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},R4=(e,t,n)=>{const r={},i=Hne(e,t,{});for(const a in i)a in n&&n[a]!=null||(r[a]=i[a]);return r},Wne={srOnly:{transform(e){return e===!0?Vne:e==="focusable"?Gne:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>R4(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>R4(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>R4(t,e,n)}},E1={position:!0,pos:Se.prop("position"),zIndex:Se.prop("zIndex","zIndices"),inset:Se.spaceT("inset"),insetX:Se.spaceT(["left","right"]),insetInline:Se.spaceT("insetInline"),insetY:Se.spaceT(["top","bottom"]),insetBlock:Se.spaceT("insetBlock"),top:Se.spaceT("top"),insetBlockStart:Se.spaceT("insetBlockStart"),bottom:Se.spaceT("bottom"),insetBlockEnd:Se.spaceT("insetBlockEnd"),left:Se.spaceT("left"),insetInlineStart:Se.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:Se.spaceT("right"),insetInlineEnd:Se.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(E1,{insetStart:E1.insetInlineStart,insetEnd:E1.insetInlineEnd});var qne={ring:{transform:Ar.ring},ringColor:Se.colors("--chakra-ring-color"),ringOffset:Se.prop("--chakra-ring-offset-width"),ringOffsetColor:Se.colors("--chakra-ring-offset-color"),ringInset:Se.prop("--chakra-ring-inset")},Ri={margin:Se.spaceT("margin"),marginTop:Se.spaceT("marginTop"),marginBlockStart:Se.spaceT("marginBlockStart"),marginRight:Se.spaceT("marginRight"),marginInlineEnd:Se.spaceT("marginInlineEnd"),marginBottom:Se.spaceT("marginBottom"),marginBlockEnd:Se.spaceT("marginBlockEnd"),marginLeft:Se.spaceT("marginLeft"),marginInlineStart:Se.spaceT("marginInlineStart"),marginX:Se.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:Se.spaceT("marginInline"),marginY:Se.spaceT(["marginTop","marginBottom"]),marginBlock:Se.spaceT("marginBlock"),padding:Se.space("padding"),paddingTop:Se.space("paddingTop"),paddingBlockStart:Se.space("paddingBlockStart"),paddingRight:Se.space("paddingRight"),paddingBottom:Se.space("paddingBottom"),paddingBlockEnd:Se.space("paddingBlockEnd"),paddingLeft:Se.space("paddingLeft"),paddingInlineStart:Se.space("paddingInlineStart"),paddingInlineEnd:Se.space("paddingInlineEnd"),paddingX:Se.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:Se.space("paddingInline"),paddingY:Se.space(["paddingTop","paddingBottom"]),paddingBlock:Se.space("paddingBlock")};Object.assign(Ri,{m:Ri.margin,mt:Ri.marginTop,mr:Ri.marginRight,me:Ri.marginInlineEnd,marginEnd:Ri.marginInlineEnd,mb:Ri.marginBottom,ml:Ri.marginLeft,ms:Ri.marginInlineStart,marginStart:Ri.marginInlineStart,mx:Ri.marginX,my:Ri.marginY,p:Ri.padding,pt:Ri.paddingTop,py:Ri.paddingY,px:Ri.paddingX,pb:Ri.paddingBottom,pl:Ri.paddingLeft,ps:Ri.paddingInlineStart,paddingStart:Ri.paddingInlineStart,pr:Ri.paddingRight,pe:Ri.paddingInlineEnd,paddingEnd:Ri.paddingInlineEnd});var Yne={textDecorationColor:Se.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:Se.shadows("textShadow")},Kne={clipPath:!0,transform:Se.propT("transform",Ar.transform),transformOrigin:!0,translateX:Se.spaceT("--chakra-translate-x"),translateY:Se.spaceT("--chakra-translate-y"),skewX:Se.degreeT("--chakra-skew-x"),skewY:Se.degreeT("--chakra-skew-y"),scaleX:Se.prop("--chakra-scale-x"),scaleY:Se.prop("--chakra-scale-y"),scale:Se.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:Se.degreeT("--chakra-rotate")},Xne={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:Se.prop("transitionDuration","transition.duration"),transitionProperty:Se.prop("transitionProperty","transition.property"),transitionTimingFunction:Se.prop("transitionTimingFunction","transition.easing")},Qne={fontFamily:Se.prop("fontFamily","fonts"),fontSize:Se.prop("fontSize","fontSizes",Ar.px),fontWeight:Se.prop("fontWeight","fontWeights"),lineHeight:Se.prop("lineHeight","lineHeights"),letterSpacing:Se.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"}},Zne={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:Se.spaceT("scrollMargin"),scrollMarginTop:Se.spaceT("scrollMarginTop"),scrollMarginBottom:Se.spaceT("scrollMarginBottom"),scrollMarginLeft:Se.spaceT("scrollMarginLeft"),scrollMarginRight:Se.spaceT("scrollMarginRight"),scrollMarginX:Se.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:Se.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:Se.spaceT("scrollPadding"),scrollPaddingTop:Se.spaceT("scrollPaddingTop"),scrollPaddingBottom:Se.spaceT("scrollPaddingBottom"),scrollPaddingLeft:Se.spaceT("scrollPaddingLeft"),scrollPaddingRight:Se.spaceT("scrollPaddingRight"),scrollPaddingX:Se.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:Se.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function vL(e){return ms(e)&&e.reference?e.reference:String(e)}var Hw=(e,...t)=>t.map(vL).join(` ${e} `).replace(/calc/g,""),gL=(...e)=>`calc(${Hw("+",...e)})`,yL=(...e)=>`calc(${Hw("-",...e)})`,N4=(...e)=>`calc(${Hw("*",...e)})`,bL=(...e)=>`calc(${Hw("/",...e)})`,SL=e=>{const t=vL(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N4(t,-1)},sv=Object.assign(e=>({add:(...t)=>sv(gL(e,...t)),subtract:(...t)=>sv(yL(e,...t)),multiply:(...t)=>sv(N4(e,...t)),divide:(...t)=>sv(bL(e,...t)),negate:()=>sv(SL(e)),toString:()=>e.toString()}),{add:gL,subtract:yL,multiply:N4,divide:bL,negate:SL});function Jne(e,t="-"){return e.replace(/\s+/g,t)}function $ne(e){const t=Jne(e.toString());return tre(ere(t))}function ere(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function tre(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function nre(e,t=""){return[t,e].filter(Boolean).join("-")}function rre(e,t){return`var(${e}${t?`, ${t}`:""})`}function ire(e,t=""){return $ne(`--${nre(e,t)}`)}function Rr(e,t,n){const r=ire(e,n);return{variable:r,reference:rre(r,t)}}function are(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function ore(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function L4(e){if(e==null)return e;const{unitless:t}=ore(e);return t||typeof e=="number"?`${e}px`:e}var xL=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,z4=e=>Object.fromEntries(Object.entries(e).sort(xL));function wL(e){const t=z4(e);return Object.assign(Object.values(t),t)}function sre(e){const t=Object.keys(z4(e));return new Set(t)}function CL(e){var t;if(!e)return e;e=(t=L4(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function _1(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${L4(e)})`),t&&n.push("and",`(max-width: ${L4(t)})`),n.join(" ")}function lre(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=wL(e),r=Object.entries(e).sort(xL).map(([o,s],c,d)=>{var p;let[,g]=(p=d[c+1])!=null?p:[];return g=parseFloat(g)>0?CL(g):void 0,{_minW:CL(s),breakpoint:o,minW:s,maxW:g,maxWQuery:_1(null,g),minWQuery:_1(s),minMaxQuery:_1(s,g)}}),i=sre(e),a=Array.from(i.values());return{keys:i,normalized:n,isResponsive(o){const s=Object.keys(o);return s.length>0&&s.every(c=>i.has(c))},asObject:z4(e),asArray:wL(e),details:r,get(o){return r.find(s=>s.breakpoint===o)},media:[null,...n.map(o=>_1(o)).slice(1)],toArrayValue(o){if(!ms(o))throw new Error("toArrayValue: value must be an object");const s=a.map(c=>{var d;return(d=o[c])!=null?d:null});for(;are(s)===null;)s.pop();return s},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((s,c,d)=>{const p=a[d];return p!=null&&c!=null&&(s[p]=c),s},{})}}}var Ko={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}`},xp=e=>EL(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Jf=e=>EL(t=>e(t,"~ &"),"[data-peer]",".peer"),EL=(e,...t)=>t.map(e).join(", "),Vw={_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:xp(Ko.hover),_peerHover:Jf(Ko.hover),_groupFocus:xp(Ko.focus),_peerFocus:Jf(Ko.focus),_groupFocusVisible:xp(Ko.focusVisible),_peerFocusVisible:Jf(Ko.focusVisible),_groupActive:xp(Ko.active),_peerActive:Jf(Ko.active),_groupDisabled:xp(Ko.disabled),_peerDisabled:Jf(Ko.disabled),_groupInvalid:xp(Ko.invalid),_peerInvalid:Jf(Ko.invalid),_groupChecked:xp(Ko.checked),_peerChecked:Jf(Ko.checked),_groupFocusWithin:xp(Ko.focusWithin),_peerFocusWithin:Jf(Ko.focusWithin),_peerPlaceholderShown:Jf(Ko.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]"},ure=Object.keys(Vw);function _L(e,t){return Rr(String(e).replace(/\./g,"-"),void 0,t)}function cre(e,t){let n={};const r={};for(const[i,a]of Object.entries(e)){const{isSemantic:o,value:s}=a,{variable:c,reference:d}=_L(i,t==null?void 0:t.cssVarPrefix);if(!o){if(i.startsWith("space")){const S=i.split("."),[w,...C]=S,k=`${w}.-${C.join(".")}`,P=sv.negate(s),D=sv.negate(d);r[k]={value:P,var:c,varRef:D}}n[c]=s,r[i]={value:s,var:c,varRef:d};continue}const p=S=>{const C=[String(i).split(".")[0],S].join(".");if(!e[C])return S;const{reference:P}=_L(C,t==null?void 0:t.cssVarPrefix);return P},g=ms(s)?s:{default:s};n=Lu(n,Object.entries(g).reduce((S,[w,C])=>{var k,P;const D=p(C);if(w==="default")return S[c]=D,S;const M=(P=(k=Vw)==null?void 0:k[w])!=null?P:w;return S[M]={[c]:D},S},{})),r[i]={value:d,var:c,varRef:d}}return{cssVars:n,cssMap:r}}function dre(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function fre(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var hre=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function pre(e){return fre(e,hre)}function mre(e){return e.semanticTokens}function vre(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function gre({tokens:e,semanticTokens:t}){var n,r;const i=Object.entries((n=B4(e))!=null?n:{}).map(([o,s])=>[o,{isSemantic:!1,value:s}]),a=Object.entries((r=B4(t,1))!=null?r:{}).map(([o,s])=>[o,{isSemantic:!0,value:s}]);return Object.fromEntries([...i,...a])}function B4(e,t=1/0){return!ms(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(ms(i)||Array.isArray(i)?Object.entries(B4(i,t-1)).forEach(([a,o])=>{n[`${r}.${a}`]=o}):n[r]=i,n),{})}function yre(e){var t;const n=vre(e),r=pre(n),i=mre(n),a=gre({tokens:r,semanticTokens:i}),o=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:c}=cre(a,{cssVarPrefix:o});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:s,__breakpoints:lre(n.breakpoints)}),n}var F4=Lu({},Fw,Br,Nne,Uw,zu,Lne,qne,zne,mL,Wne,E1,I4,Ri,Zne,Qne,Yne,Kne,Bne,Xne),bre=Object.assign({},Ri,zu,Uw,mL,E1),TL=Object.keys(bre),Sre=[...Object.keys(F4),...ure],xre={...F4,...Vw},wre=e=>e in xre,Cre=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,a={};for(const o in e){let s=Nu(e[o],t);if(s==null)continue;if(s=ms(s)&&n(s)?r(s):s,!Array.isArray(s)){a[o]=s;continue}const c=s.slice(0,i.length).length;for(let d=0;de.startsWith("--")&&typeof t=="string"&&!_re(t),kre=(e,t)=>{var n,r;if(t==null)return t;const i=c=>{var d,p;return(p=(d=e.__cssMap)==null?void 0:d[c])==null?void 0:p.varRef},a=c=>{var d;return(d=i(c))!=null?d:c},[o,s]=Ere(t);return t=(r=(n=i(o))!=null?n:a(s))!=null?r:a(t),t};function Pre(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(a,o=!1)=>{var s,c,d;const p=Nu(a,r),g=Cre(p)(r);let S={};for(let w in g){const C=g[w];let k=Nu(C,r);w in n&&(w=n[w]),Tre(w,k)&&(k=kre(r,k));let P=t[w];if(P===!0&&(P={property:w}),ms(k)){S[w]=(s=S[w])!=null?s:{},S[w]=Lu({},S[w],i(k,!0));continue}let D=(d=(c=P==null?void 0:P.transform)==null?void 0:c.call(P,k,r,p))!=null?d:k;D=P!=null&&P.processResult?i(D,!0):D;const M=Nu(P==null?void 0:P.property,r);if(!o&&(P!=null&&P.static)){const R=Nu(P.static,r);S=Lu({},S,R)}if(M&&Array.isArray(M)){for(const R of M)S[R]=D;continue}if(M){M==="&"&&ms(D)?S=Lu({},S,D):S[M]=D;continue}if(ms(D)){S=Lu({},S,D);continue}S[w]=D}return S};return i}var kL=e=>t=>Pre({theme:t,pseudos:Vw,configs:F4})(e);function TIe(e){return e}function kIe(e){return e}function fr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function Are(e,t){if(Array.isArray(e))return e;if(ms(e))return t(e);if(e!=null)return[e]}function Ore(e,t){for(let n=t+1;n{Lu(d,{[R]:S?M[R]:{[D]:M[R]}})});continue}if(!w){S?Lu(d,M):d[D]=M;continue}d[D]=M}}return d}}function Mre(e){return t=>{var n;const{variant:r,size:i,theme:a}=t,o=Dre(a);return Lu({},Nu((n=e.baseStyle)!=null?n:{},t),o(e,"sizes",i,t),o(e,"variants",r,t))}}function jre(e,t,n){var r,i,a;return(a=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?a:n}function Si(e){return dre(e,["styleConfig","size","variant","colorScheme"])}var Ire=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function Rre(e){return ms(e)?Ire.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var Nre={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},Lre=Nre,zre={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Bre=zre,Fre={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"}},Ure=Fre,Hre={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Vre=Hre,Gre={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"},Wre=Gre,qre={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"},Yre={"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)"},Kre={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Xre={property:qre,easing:Yre,duration:Kre},Qre=Xre,Zre={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Jre=Zre,$re={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},eie=$re,tie={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"}},PL=tie,AL={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"},nie={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"},rie={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},iie={...AL,...nie,container:rie},OL=iie,aie={breakpoints:Bre,zIndices:Lre,radii:Vre,blur:Jre,colors:Ure,...PL,sizes:OL,shadows:Wre,space:AL,borders:eie,transition:Qre};function Xr(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(...p){r();for(const g of p)t[g]=c(g);return Xr(e,t)}function a(...p){for(const g of p)g in t||(t[g]=c(g));return Xr(e,t)}function o(){return Object.fromEntries(Object.entries(t).map(([g,S])=>[g,S.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,S])=>[g,S.className]))}function c(p){const w=`chakra-${(["container","root"].includes(p??"")?[e]:[e,p]).filter(Boolean).join("__")}`;return{className:w,selector:`.${w}`,toString:()=>p}}return{parts:i,toPart:c,extend:a,selectors:o,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var oie=Xr("accordion").parts("root","container","button","panel").extend("icon"),sie=Xr("alert").parts("title","description","container").extend("icon","spinner"),lie=Xr("avatar").parts("label","badge","container").extend("excessLabel","group"),uie=Xr("breadcrumb").parts("link","item","container").extend("separator");Xr("button").parts();var cie=Xr("checkbox").parts("control","icon","container").extend("label");Xr("progress").parts("track","filledTrack").extend("label");var die=Xr("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),fie=Xr("editable").parts("preview","input","textarea"),hie=Xr("form").parts("container","requiredIndicator","helperText"),pie=Xr("formError").parts("text","icon"),mie=Xr("input").parts("addon","field","element"),vie=Xr("list").parts("container","item","icon"),gie=Xr("menu").parts("button","list","item").extend("groupTitle","command","divider"),yie=Xr("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),bie=Xr("numberinput").parts("root","field","stepperGroup","stepper");Xr("pininput").parts("field");var Sie=Xr("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),xie=Xr("progress").parts("label","filledTrack","track"),wie=Xr("radio").parts("container","control","label"),Cie=Xr("select").parts("field","icon"),Eie=Xr("slider").parts("container","track","thumb","filledTrack","mark"),_ie=Xr("stat").parts("container","label","helpText","number","icon"),Tie=Xr("switch").parts("container","track","thumb"),kie=Xr("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Pie=Xr("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Aie=Xr("tag").parts("container","label","closeButton"),Oie=Xr("card").parts("container","header","body","footer");function lv(e,t,n){return Math.min(Math.max(e,n),t)}class Die extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var T1=Die;function U4(e){if(typeof e!="string")throw new T1(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=Bie.test(e)?Iie(e):e;const n=Rie.exec(t);if(n){const o=Array.from(n).slice(1);return[...o.slice(0,3).map(s=>parseInt(k1(s,2),16)),parseInt(k1(o[3]||"f",2),16)/255]}const r=Nie.exec(t);if(r){const o=Array.from(r).slice(1);return[...o.slice(0,3).map(s=>parseInt(s,16)),parseInt(o[3]||"ff",16)/255]}const i=Lie.exec(t);if(i){const o=Array.from(i).slice(1);return[...o.slice(0,3).map(s=>parseInt(s,10)),parseFloat(o[3]||"1")]}const a=zie.exec(t);if(a){const[o,s,c,d]=Array.from(a).slice(1).map(parseFloat);if(lv(0,100,s)!==s)throw new T1(e);if(lv(0,100,c)!==c)throw new T1(e);return[...Fie(o,s,c),Number.isNaN(d)?1:d]}throw new T1(e)}function Mie(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const DL=e=>parseInt(e.replace(/_/g,""),36),jie="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=DL(t.substring(0,3)),r=DL(t.substring(3)).toString(16);let i="";for(let a=0;a<6-r.length;a++)i+="0";return e[n]=`${i}${r}`,e},{});function Iie(e){const t=e.toLowerCase().trim(),n=jie[Mie(t)];if(!n)throw new T1(e);return`#${n}`}const k1=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),Rie=new RegExp(`^#${k1("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Nie=new RegExp(`^#${k1("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Lie=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${k1(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),zie=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Bie=/^[a-z]+$/i,ML=e=>Math.round(e*255),Fie=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(ML);const i=(e%360+360)%360/60,a=(1-Math.abs(2*r-1))*(t/100),o=a*(1-Math.abs(i%2-1));let s=0,c=0,d=0;i>=0&&i<1?(s=a,c=o):i>=1&&i<2?(s=o,c=a):i>=2&&i<3?(c=a,d=o):i>=3&&i<4?(c=o,d=a):i>=4&&i<5?(s=o,d=a):i>=5&&i<6&&(s=a,d=o);const p=r-a/2,g=s+p,S=c+p,w=d+p;return[g,S,w].map(ML)};function Uie(e,t,n,r){return`rgba(${lv(0,255,e).toFixed()}, ${lv(0,255,t).toFixed()}, ${lv(0,255,n).toFixed()}, ${parseFloat(lv(0,1,r).toFixed(3))})`}function Hie(e,t){const[n,r,i,a]=U4(e);return Uie(n,r,i,a-t)}function Vie(e){const[t,n,r,i]=U4(e);let a=o=>{const s=lv(0,255,o).toString(16);return s.length===1?`0${s}`:s};return`#${a(t)}${a(n)}${a(r)}${i<1?a(Math.round(i*255)):""}`}function Gie(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Us=(e,t,n)=>{const r=Gie(e,`colors.${t}`,t);try{return Vie(r),r}catch{return n??"#000000"}},qie=e=>{const[t,n,r]=U4(e);return(t*299+n*587+r*114)/1e3},Yie=e=>t=>{const n=Us(t,e);return qie(n)<128?"dark":"light"},Kie=e=>t=>Yie(e)(t)==="dark",E0=(e,t)=>n=>{const r=Us(n,e);return Hie(r,1-t)};function jL(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 Xie=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function Qie(e){const t=Xie();return!e||Wie(e)?t:e.string&&e.colors?Jie(e.string,e.colors):e.string&&!e.colors?Zie(e.string):e.colors&&!e.string?$ie(e.colors):t}function Zie(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 Jie(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function H4(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function IL(e){return ms(e)&&e.reference?e.reference:String(e)}var Gw=(e,...t)=>t.map(IL).join(` ${e} `).replace(/calc/g,""),RL=(...e)=>`calc(${Gw("+",...e)})`,NL=(...e)=>`calc(${Gw("-",...e)})`,V4=(...e)=>`calc(${Gw("*",...e)})`,LL=(...e)=>`calc(${Gw("/",...e)})`,zL=e=>{const t=IL(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:V4(t,-1)},$f=Object.assign(e=>({add:(...t)=>$f(RL(e,...t)),subtract:(...t)=>$f(NL(e,...t)),multiply:(...t)=>$f(V4(e,...t)),divide:(...t)=>$f(LL(e,...t)),negate:()=>$f(zL(e)),toString:()=>e.toString()}),{add:RL,subtract:NL,multiply:V4,divide:LL,negate:zL});function eae(e){return!Number.isInteger(parseFloat(e.toString()))}function tae(e,t="-"){return e.replace(/\s+/g,t)}function BL(e){const t=tae(e.toString());return t.includes("\\.")?e:eae(e)?t.replace(".","\\."):e}function nae(e,t=""){return[t,BL(e)].filter(Boolean).join("-")}function rae(e,t){return`var(${BL(e)}${t?`, ${t}`:""})`}function iae(e,t=""){return`--${nae(e,t)}`}function oo(e,t){const n=iae(e,t==null?void 0:t.prefix);return{variable:n,reference:rae(n,aae(t==null?void 0:t.fallback))}}function aae(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:oae,definePartsStyle:Ww}=fr(Tie.keys),P1=oo("switch-track-width"),uv=oo("switch-track-height"),G4=oo("switch-track-diff"),sae=$f.subtract(P1,uv),W4=oo("switch-thumb-x"),A1=oo("switch-bg"),lae=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[P1.reference],height:[uv.reference],transitionProperty:"common",transitionDuration:"fast",[A1.variable]:"colors.gray.300",_dark:{[A1.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[A1.variable]:`colors.${t}.500`,_dark:{[A1.variable]:`colors.${t}.200`}},bg:A1.reference}},uae={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[uv.reference],height:[uv.reference],_checked:{transform:`translateX(${W4.reference})`}},cae=Ww(e=>({container:{[G4.variable]:sae,[W4.variable]:G4.reference,_rtl:{[W4.variable]:$f(G4).negate().toString()}},track:lae(e),thumb:uae})),dae={sm:Ww({container:{[P1.variable]:"1.375rem",[uv.variable]:"sizes.3"}}),md:Ww({container:{[P1.variable]:"1.875rem",[uv.variable]:"sizes.4"}}),lg:Ww({container:{[P1.variable]:"2.875rem",[uv.variable]:"sizes.6"}})},fae=oae({baseStyle:cae,sizes:dae,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:hae,definePartsStyle:_0}=fr(kie.keys),pae=_0({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"}}),qw={"&[data-is-numeric=true]":{textAlign:"end"}},mae=_0(e=>{const{colorScheme:t}=e;return{th:{color:bn("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bn(`${t}.100`,`${t}.700`)(e),...qw},td:{borderBottom:"1px",borderColor:bn(`${t}.100`,`${t}.700`)(e),...qw},caption:{color:bn("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),vae=_0(e=>{const{colorScheme:t}=e;return{th:{color:bn("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bn(`${t}.100`,`${t}.700`)(e),...qw},td:{borderBottom:"1px",borderColor:bn(`${t}.100`,`${t}.700`)(e),...qw},caption:{color:bn("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:bn(`${t}.100`,`${t}.700`)(e)},td:{background:bn(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),gae={simple:mae,striped:vae,unstyled:{}},yae={sm:_0({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:_0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:_0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},bae=hae({baseStyle:pae,variants:gae,sizes:yae,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),gl=Rr("tabs-color"),Rc=Rr("tabs-bg"),Yw=Rr("tabs-border-color"),{defineMultiStyleConfig:Sae,definePartsStyle:Md}=fr(Pie.keys),xae=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},wae=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}}},Cae=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Eae={p:4},_ae=Md(e=>({root:xae(e),tab:wae(e),tablist:Cae(e),tabpanel:Eae})),Tae={sm:Md({tab:{py:1,px:4,fontSize:"sm"}}),md:Md({tab:{fontSize:"md",py:2,px:4}}),lg:Md({tab:{fontSize:"lg",py:3,px:4}})},kae=Md(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",a=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[a]:"-2px",_selected:{[gl.variable]:`colors.${t}.600`,_dark:{[gl.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Rc.variable]:"colors.gray.200",_dark:{[Rc.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:gl.reference,bg:Rc.reference}}}),Pae=Md(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Yw.variable]:"transparent",_selected:{[gl.variable]:`colors.${t}.600`,[Yw.variable]:"colors.white",_dark:{[gl.variable]:`colors.${t}.300`,[Yw.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Yw.reference},color:gl.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Aae=Md(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Rc.variable]:"colors.gray.50",_dark:{[Rc.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Rc.variable]:"colors.white",[gl.variable]:`colors.${t}.600`,_dark:{[Rc.variable]:"colors.gray.800",[gl.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:gl.reference,bg:Rc.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Oae=Md(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Us(n,`${t}.700`),bg:Us(n,`${t}.100`)}}}}),Dae=Md(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[gl.variable]:"colors.gray.600",_dark:{[gl.variable]:"inherit"},_selected:{[gl.variable]:"colors.white",[Rc.variable]:`colors.${t}.600`,_dark:{[gl.variable]:"colors.gray.800",[Rc.variable]:`colors.${t}.300`}},color:gl.reference,bg:Rc.reference}}}),Mae=Md({}),jae={line:kae,enclosed:Pae,"enclosed-colored":Aae,"soft-rounded":Oae,"solid-rounded":Dae,unstyled:Mae},Iae=Sae({baseStyle:_ae,sizes:Tae,variants:jae,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Rae={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},T0=Rr("badge-bg"),jd=Rr("badge-color"),Nae=e=>{const{colorScheme:t,theme:n}=e,r=E0(`${t}.500`,.6)(n);return{[T0.variable]:`colors.${t}.500`,[jd.variable]:"colors.white",_dark:{[T0.variable]:r,[jd.variable]:"colors.whiteAlpha.800"},bg:T0.reference,color:jd.reference}},Lae=e=>{const{colorScheme:t,theme:n}=e,r=E0(`${t}.200`,.16)(n);return{[T0.variable]:`colors.${t}.100`,[jd.variable]:`colors.${t}.800`,_dark:{[T0.variable]:r,[jd.variable]:`colors.${t}.200`},bg:T0.reference,color:jd.reference}},zae=e=>{const{colorScheme:t,theme:n}=e,r=E0(`${t}.200`,.8)(n);return{[jd.variable]:`colors.${t}.500`,_dark:{[jd.variable]:r},color:jd.reference,boxShadow:`inset 0 0 0px 1px ${jd.reference}`}},Bae={solid:Nae,subtle:Lae,outline:zae},O1={baseStyle:Rae,variants:Bae,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Fae,definePartsStyle:cv}=fr(Aie.keys),Uae={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Hae={lineHeight:1.2,overflow:"visible"},Vae={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}},Gae=cv({container:Uae,label:Hae,closeButton:Vae}),Wae={sm:cv({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:cv({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:cv({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},qae={subtle:cv(e=>{var t;return{container:(t=O1.variants)==null?void 0:t.subtle(e)}}),solid:cv(e=>{var t;return{container:(t=O1.variants)==null?void 0:t.solid(e)}}),outline:cv(e=>{var t;return{container:(t=O1.variants)==null?void 0:t.outline(e)}})},Yae=Fae({variants:qae,baseStyle:Gae,sizes:Wae,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:eh,defineMultiStyleConfig:Kae}=fr(mie.keys),Xae=eh({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wp={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"}},Qae={lg:eh({field:wp.lg,addon:wp.lg}),md:eh({field:wp.md,addon:wp.md}),sm:eh({field:wp.sm,addon:wp.sm}),xs:eh({field:wp.xs,addon:wp.xs})};function q4(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||bn("blue.500","blue.300")(e),errorBorderColor:n||bn("red.500","red.300")(e)}}var Zae=eh(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=q4(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:bn("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Us(t,r),boxShadow:`0 0 0 1px ${Us(t,r)}`},_focusVisible:{zIndex:1,borderColor:Us(t,n),boxShadow:`0 0 0 1px ${Us(t,n)}`}},addon:{border:"1px solid",borderColor:bn("inherit","whiteAlpha.50")(e),bg:bn("gray.100","whiteAlpha.300")(e)}}}),Jae=eh(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=q4(e);return{field:{border:"2px solid",borderColor:"transparent",bg:bn("gray.100","whiteAlpha.50")(e),_hover:{bg:bn("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Us(t,r)},_focusVisible:{bg:"transparent",borderColor:Us(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:bn("gray.100","whiteAlpha.50")(e)}}}),$ae=eh(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=q4(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Us(t,r),boxShadow:`0px 1px 0px 0px ${Us(t,r)}`},_focusVisible:{borderColor:Us(t,n),boxShadow:`0px 1px 0px 0px ${Us(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),eoe=eh({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),toe={outline:Zae,filled:Jae,flushed:$ae,unstyled:eoe},Fr=Kae({baseStyle:Xae,sizes:Qae,variants:toe,defaultProps:{size:"md",variant:"outline"}}),FL,noe={...(FL=Fr.baseStyle)==null?void 0:FL.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},UL,HL,roe={outline:e=>{var t,n;return(n=(t=Fr.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=Fr.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=Fr.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(HL=(UL=Fr.variants)==null?void 0:UL.unstyled.field)!=null?HL:{}},VL,GL,WL,qL,YL,KL,XL,QL,ioe={xs:(GL=(VL=Fr.sizes)==null?void 0:VL.xs.field)!=null?GL:{},sm:(qL=(WL=Fr.sizes)==null?void 0:WL.sm.field)!=null?qL:{},md:(KL=(YL=Fr.sizes)==null?void 0:YL.md.field)!=null?KL:{},lg:(QL=(XL=Fr.sizes)==null?void 0:XL.lg.field)!=null?QL:{}},aoe={baseStyle:noe,sizes:ioe,variants:roe,defaultProps:{size:"md",variant:"outline"}},Kw=oo("tooltip-bg"),Y4=oo("tooltip-fg"),ooe=oo("popper-arrow-bg"),soe={bg:Kw.reference,color:Y4.reference,[Kw.variable]:"colors.gray.700",[Y4.variable]:"colors.whiteAlpha.900",_dark:{[Kw.variable]:"colors.gray.300",[Y4.variable]:"colors.gray.900"},[ooe.variable]:Kw.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},loe={baseStyle:soe},{defineMultiStyleConfig:uoe,definePartsStyle:D1}=fr(xie.keys),coe=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,a=bn(jL(),jL("1rem","rgba(0,0,0,0.1)"))(e),o=bn(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( to right, transparent 0%, ${Us(n,o)} 50%, transparent 100% )`;return{...!r&&i&&a,...r?{bgImage:s}:{bgColor:o}}},doe={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},foe=e=>({bg:bn("gray.100","whiteAlpha.300")(e)}),hoe=e=>({transitionProperty:"common",transitionDuration:"slow",...coe(e)}),poe=D1(e=>({label:doe,filledTrack:hoe(e),track:foe(e)})),moe={xs:D1({track:{h:"1"}}),sm:D1({track:{h:"2"}}),md:D1({track:{h:"3"}}),lg:D1({track:{h:"4"}})},voe=uoe({sizes:moe,baseStyle:poe,defaultProps:{size:"md",colorScheme:"blue"}}),goe=e=>typeof e=="function";function Hs(e,...t){return goe(e)?e(...t):e}var{definePartsStyle:Xw,defineMultiStyleConfig:yoe}=fr(cie.keys),M1=Rr("checkbox-size"),boe=e=>{const{colorScheme:t}=e;return{w:M1.reference,h:M1.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:bn(`${t}.500`,`${t}.200`)(e),borderColor:bn(`${t}.500`,`${t}.200`)(e),color:bn("white","gray.900")(e),_hover:{bg:bn(`${t}.600`,`${t}.300`)(e),borderColor:bn(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:bn("gray.200","transparent")(e),bg:bn("gray.200","whiteAlpha.300")(e),color:bn("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:bn(`${t}.500`,`${t}.200`)(e),borderColor:bn(`${t}.500`,`${t}.200`)(e),color:bn("white","gray.900")(e)},_disabled:{bg:bn("gray.100","whiteAlpha.100")(e),borderColor:bn("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:bn("red.500","red.300")(e)}}},Soe={_disabled:{cursor:"not-allowed"}},xoe={userSelect:"none",_disabled:{opacity:.4}},woe={transitionProperty:"transform",transitionDuration:"normal"},Coe=Xw(e=>({icon:woe,container:Soe,control:Hs(boe,e),label:xoe})),Eoe={sm:Xw({control:{[M1.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Xw({control:{[M1.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Xw({control:{[M1.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Qw=yoe({baseStyle:Coe,sizes:Eoe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:_oe,definePartsStyle:Zw}=fr(wie.keys),Toe=e=>{var t;const n=(t=Hs(Qw.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"}}}},koe=Zw(e=>{var t,n,r,i;return{label:(n=(t=Qw).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=Qw).baseStyle)==null?void 0:i.call(r,e).container,control:Toe(e)}}),Poe={md:Zw({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Zw({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Zw({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Aoe=_oe({baseStyle:koe,sizes:Poe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Ooe,definePartsStyle:Doe}=fr(Cie.keys),Jw=Rr("select-bg"),ZL,Moe={...(ZL=Fr.baseStyle)==null?void 0:ZL.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Jw.reference,[Jw.variable]:"colors.white",_dark:{[Jw.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Jw.reference}},joe={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Ioe=Doe({field:Moe,icon:joe}),$w={paddingInlineEnd:"8"},JL,$L,e8,t8,n8,r8,i8,a8,Roe={lg:{...(JL=Fr.sizes)==null?void 0:JL.lg,field:{...($L=Fr.sizes)==null?void 0:$L.lg.field,...$w}},md:{...(e8=Fr.sizes)==null?void 0:e8.md,field:{...(t8=Fr.sizes)==null?void 0:t8.md.field,...$w}},sm:{...(n8=Fr.sizes)==null?void 0:n8.sm,field:{...(r8=Fr.sizes)==null?void 0:r8.sm.field,...$w}},xs:{...(i8=Fr.sizes)==null?void 0:i8.xs,field:{...(a8=Fr.sizes)==null?void 0:a8.xs.field,...$w},icon:{insetEnd:"1"}}},Noe=Ooe({baseStyle:Ioe,sizes:Roe,variants:Fr.variants,defaultProps:Fr.defaultProps}),K4=Rr("skeleton-start-color"),X4=Rr("skeleton-end-color"),Loe={[K4.variable]:"colors.gray.100",[X4.variable]:"colors.gray.400",_dark:{[K4.variable]:"colors.gray.800",[X4.variable]:"colors.gray.600"},background:K4.reference,borderColor:X4.reference,opacity:.7,borderRadius:"sm"},zoe={baseStyle:Loe},Q4=Rr("skip-link-bg"),Boe={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Q4.variable]:"colors.white",_dark:{[Q4.variable]:"colors.gray.700"},bg:Q4.reference}},Foe={baseStyle:Boe},{defineMultiStyleConfig:Uoe,definePartsStyle:eC}=fr(Eie.keys),j1=Rr("slider-thumb-size"),I1=Rr("slider-track-size"),Cp=Rr("slider-bg"),Hoe=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...H4({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Voe=e=>({...H4({orientation:e.orientation,horizontal:{h:I1.reference},vertical:{w:I1.reference}}),overflow:"hidden",borderRadius:"sm",[Cp.variable]:"colors.gray.200",_dark:{[Cp.variable]:"colors.whiteAlpha.200"},_disabled:{[Cp.variable]:"colors.gray.300",_dark:{[Cp.variable]:"colors.whiteAlpha.300"}},bg:Cp.reference}),Goe=e=>{const{orientation:t}=e;return{...H4({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:j1.reference,h:j1.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"}}},Woe=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Cp.variable]:`colors.${t}.500`,_dark:{[Cp.variable]:`colors.${t}.200`},bg:Cp.reference}},qoe=eC(e=>({container:Hoe(e),track:Voe(e),thumb:Goe(e),filledTrack:Woe(e)})),Yoe=eC({container:{[j1.variable]:"sizes.4",[I1.variable]:"sizes.1"}}),Koe=eC({container:{[j1.variable]:"sizes.3.5",[I1.variable]:"sizes.1"}}),Xoe=eC({container:{[j1.variable]:"sizes.2.5",[I1.variable]:"sizes.0.5"}}),Qoe={lg:Yoe,md:Koe,sm:Xoe},Zoe=Uoe({baseStyle:qoe,sizes:Qoe,defaultProps:{size:"md",colorScheme:"blue"}}),dv=oo("spinner-size"),Joe={width:[dv.reference],height:[dv.reference]},$oe={xs:{[dv.variable]:"sizes.3"},sm:{[dv.variable]:"sizes.4"},md:{[dv.variable]:"sizes.6"},lg:{[dv.variable]:"sizes.8"},xl:{[dv.variable]:"sizes.12"}},ese={baseStyle:Joe,sizes:$oe,defaultProps:{size:"md"}},{defineMultiStyleConfig:tse,definePartsStyle:o8}=fr(_ie.keys),nse={fontWeight:"medium"},rse={opacity:.8,marginBottom:"2"},ise={verticalAlign:"baseline",fontWeight:"semibold"},ase={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},ose=o8({container:{},label:nse,helpText:rse,number:ise,icon:ase}),sse={md:o8({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},lse=tse({baseStyle:ose,sizes:sse,defaultProps:{size:"md"}}),Z4=Rr("kbd-bg"),use={[Z4.variable]:"colors.gray.100",_dark:{[Z4.variable]:"colors.whiteAlpha.100"},bg:Z4.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},cse={baseStyle:use},dse={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},fse={baseStyle:dse},{defineMultiStyleConfig:hse,definePartsStyle:pse}=fr(vie.keys),mse={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},vse=pse({icon:mse}),gse=hse({baseStyle:vse}),{defineMultiStyleConfig:yse,definePartsStyle:bse}=fr(gie.keys),Id=Rr("menu-bg"),J4=Rr("menu-shadow"),Sse={[Id.variable]:"#fff",[J4.variable]:"shadows.sm",_dark:{[Id.variable]:"colors.gray.700",[J4.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Id.reference,boxShadow:J4.reference},xse={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Id.variable]:"colors.gray.100",_dark:{[Id.variable]:"colors.whiteAlpha.100"}},_active:{[Id.variable]:"colors.gray.200",_dark:{[Id.variable]:"colors.whiteAlpha.200"}},_expanded:{[Id.variable]:"colors.gray.100",_dark:{[Id.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Id.reference},wse={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Cse={opacity:.6},Ese={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},_se={transitionProperty:"common",transitionDuration:"normal"},Tse=bse({button:_se,list:Sse,item:xse,groupTitle:wse,command:Cse,divider:Ese}),kse=yse({baseStyle:Tse}),{defineMultiStyleConfig:Pse,definePartsStyle:$4}=fr(yie.keys),Ase={bg:"blackAlpha.600",zIndex:"modal"},Ose=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"}},Dse=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:bn("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:bn("lg","dark-lg")(e)}},Mse={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},jse={position:"absolute",top:"2",insetEnd:"3"},Ise=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Rse={px:"6",py:"4"},Nse=$4(e=>({overlay:Ase,dialogContainer:Hs(Ose,e),dialog:Hs(Dse,e),header:Mse,closeButton:jse,body:Hs(Ise,e),footer:Rse}));function Nc(e){return $4(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Lse={xs:Nc("xs"),sm:Nc("sm"),md:Nc("md"),lg:Nc("lg"),xl:Nc("xl"),"2xl":Nc("2xl"),"3xl":Nc("3xl"),"4xl":Nc("4xl"),"5xl":Nc("5xl"),"6xl":Nc("6xl"),full:Nc("full")},zse=Pse({baseStyle:Nse,sizes:Lse,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Bse,definePartsStyle:s8}=fr(bie.keys),e5=oo("number-input-stepper-width"),l8=oo("number-input-input-padding"),Fse=$f(e5).add("0.5rem").toString(),t5=oo("number-input-bg"),n5=oo("number-input-color"),r5=oo("number-input-border-color"),Use={[e5.variable]:"sizes.6",[l8.variable]:Fse},Hse=e=>{var t,n;return(n=(t=Hs(Fr.baseStyle,e))==null?void 0:t.field)!=null?n:{}},Vse={width:e5.reference},Gse={borderStart:"1px solid",borderStartColor:r5.reference,color:n5.reference,bg:t5.reference,[n5.variable]:"colors.chakra-body-text",[r5.variable]:"colors.chakra-border-color",_dark:{[n5.variable]:"colors.whiteAlpha.800",[r5.variable]:"colors.whiteAlpha.300"},_active:{[t5.variable]:"colors.gray.200",_dark:{[t5.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Wse=s8(e=>{var t;return{root:Use,field:(t=Hs(Hse,e))!=null?t:{},stepperGroup:Vse,stepper:Gse}});function tC(e){var t,n,r;const i=(t=Fr.sizes)==null?void 0:t[e],a={lg:"md",md:"md",sm:"sm",xs:"sm"},o=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",s=PL.fontSizes[o];return s8({field:{...i.field,paddingInlineEnd:l8.reference,verticalAlign:"top"},stepper:{fontSize:$f(s).multiply(.75).toString(),_first:{borderTopEndRadius:a[e]},_last:{borderBottomEndRadius:a[e],mt:"-1px",borderTopWidth:1}}})}var qse={xs:tC("xs"),sm:tC("sm"),md:tC("md"),lg:tC("lg")},Yse=Bse({baseStyle:Wse,sizes:qse,variants:Fr.variants,defaultProps:Fr.defaultProps}),u8,Kse={...(u8=Fr.baseStyle)==null?void 0:u8.field,textAlign:"center"},Xse={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"}},c8,d8,Qse={outline:e=>{var t,n,r;return(r=(n=Hs((t=Fr.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=Hs((t=Fr.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=Hs((t=Fr.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(d8=(c8=Fr.variants)==null?void 0:c8.unstyled.field)!=null?d8:{}},Zse={baseStyle:Kse,sizes:Xse,variants:Qse,defaultProps:Fr.defaultProps},{defineMultiStyleConfig:Jse,definePartsStyle:$se}=fr(Sie.keys),nC=oo("popper-bg"),ele=oo("popper-arrow-bg"),f8=oo("popper-arrow-shadow-color"),tle={zIndex:10},nle={[nC.variable]:"colors.white",bg:nC.reference,[ele.variable]:nC.reference,[f8.variable]:"colors.gray.200",_dark:{[nC.variable]:"colors.gray.700",[f8.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},rle={px:3,py:2,borderBottomWidth:"1px"},ile={px:3,py:2},ale={px:3,py:2,borderTopWidth:"1px"},ole={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},sle=$se({popper:tle,content:nle,header:rle,body:ile,footer:ale,closeButton:ole}),lle=Jse({baseStyle:sle}),{definePartsStyle:i5,defineMultiStyleConfig:ule}=fr(die.keys),a5=Rr("drawer-bg"),o5=Rr("drawer-box-shadow");function k0(e){return i5(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var cle={bg:"blackAlpha.600",zIndex:"overlay"},dle={display:"flex",zIndex:"modal",justifyContent:"center"},fle=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[a5.variable]:"colors.white",[o5.variable]:"shadows.lg",_dark:{[a5.variable]:"colors.gray.700",[o5.variable]:"shadows.dark-lg"},bg:a5.reference,boxShadow:o5.reference}},hle={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},ple={position:"absolute",top:"2",insetEnd:"3"},mle={px:"6",py:"2",flex:"1",overflow:"auto"},vle={px:"6",py:"4"},gle=i5(e=>({overlay:cle,dialogContainer:dle,dialog:Hs(fle,e),header:hle,closeButton:ple,body:mle,footer:vle})),yle={xs:k0("xs"),sm:k0("md"),md:k0("lg"),lg:k0("2xl"),xl:k0("4xl"),full:k0("full")},ble=ule({baseStyle:gle,sizes:yle,defaultProps:{size:"xs"}}),{definePartsStyle:Sle,defineMultiStyleConfig:xle}=fr(fie.keys),wle={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Cle={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Ele={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},_le=Sle({preview:wle,input:Cle,textarea:Ele}),Tle=xle({baseStyle:_le}),{definePartsStyle:kle,defineMultiStyleConfig:Ple}=fr(hie.keys),P0=Rr("form-control-color"),Ale={marginStart:"1",[P0.variable]:"colors.red.500",_dark:{[P0.variable]:"colors.red.300"},color:P0.reference},Ole={mt:"2",[P0.variable]:"colors.gray.600",_dark:{[P0.variable]:"colors.whiteAlpha.600"},color:P0.reference,lineHeight:"normal",fontSize:"sm"},Dle=kle({container:{width:"100%",position:"relative"},requiredIndicator:Ale,helperText:Ole}),Mle=Ple({baseStyle:Dle}),{definePartsStyle:jle,defineMultiStyleConfig:Ile}=fr(pie.keys),A0=Rr("form-error-color"),Rle={[A0.variable]:"colors.red.500",_dark:{[A0.variable]:"colors.red.300"},color:A0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Nle={marginEnd:"0.5em",[A0.variable]:"colors.red.500",_dark:{[A0.variable]:"colors.red.300"},color:A0.reference},Lle=jle({text:Rle,icon:Nle}),zle=Ile({baseStyle:Lle}),Ble={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Fle={baseStyle:Ble},Ule={fontFamily:"heading",fontWeight:"bold"},Hle={"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}},Vle={baseStyle:Ule,sizes:Hle,defaultProps:{size:"xl"}},{defineMultiStyleConfig:Gle,definePartsStyle:Wle}=fr(uie.keys),qle={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Yle=Wle({link:qle}),Kle=Gle({baseStyle:Yle}),Xle={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"}}},h8=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:bn("inherit","whiteAlpha.900")(e),_hover:{bg:bn("gray.100","whiteAlpha.200")(e)},_active:{bg:bn("gray.200","whiteAlpha.300")(e)}};const r=E0(`${t}.200`,.12)(n),i=E0(`${t}.200`,.24)(n);return{color:bn(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:bn(`${t}.50`,r)(e)},_active:{bg:bn(`${t}.100`,i)(e)}}},Qle=e=>{const{colorScheme:t}=e,n=bn("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"},...Hs(h8,e)}},Zle={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Jle=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const c=bn("gray.100","whiteAlpha.200")(e);return{bg:c,_hover:{bg:bn("gray.200","whiteAlpha.300")(e),_disabled:{bg:c}},_active:{bg:bn("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:a=`${n}.600`,activeBg:o=`${n}.700`}=(t=Zle[n])!=null?t:{},s=bn(r,`${n}.200`)(e);return{bg:s,color:bn(i,"gray.800")(e),_hover:{bg:bn(a,`${n}.300`)(e),_disabled:{bg:s}},_active:{bg:bn(o,`${n}.400`)(e)}}},$le=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:bn(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:bn(`${t}.700`,`${t}.500`)(e)}}},eue={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},tue={ghost:h8,outline:Qle,solid:Jle,link:$le,unstyled:eue},nue={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"}},rue={baseStyle:Xle,variants:tue,sizes:nue,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:fv,defineMultiStyleConfig:iue}=fr(Oie.keys),rC=Rr("card-bg"),th=Rr("card-padding"),p8=Rr("card-shadow"),iC=Rr("card-radius"),m8=Rr("card-border-width","0"),v8=Rr("card-border-color"),aue=fv({container:{[rC.variable]:"colors.chakra-body-bg",backgroundColor:rC.reference,boxShadow:p8.reference,borderRadius:iC.reference,color:"chakra-body-text",borderWidth:m8.reference,borderColor:v8.reference},body:{padding:th.reference,flex:"1 1 0%"},header:{padding:th.reference},footer:{padding:th.reference}}),oue={sm:fv({container:{[iC.variable]:"radii.base",[th.variable]:"space.3"}}),md:fv({container:{[iC.variable]:"radii.md",[th.variable]:"space.5"}}),lg:fv({container:{[iC.variable]:"radii.xl",[th.variable]:"space.7"}})},sue={elevated:fv({container:{[p8.variable]:"shadows.base",_dark:{[rC.variable]:"colors.gray.700"}}}),outline:fv({container:{[m8.variable]:"1px",[v8.variable]:"colors.chakra-border-color"}}),filled:fv({container:{[rC.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[th.variable]:0},header:{[th.variable]:0},footer:{[th.variable]:0}}},lue=iue({baseStyle:aue,variants:sue,sizes:oue,defaultProps:{variant:"elevated",size:"md"}}),R1=oo("close-button-size"),N1=oo("close-button-bg"),uue={w:[R1.reference],h:[R1.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[N1.variable]:"colors.blackAlpha.100",_dark:{[N1.variable]:"colors.whiteAlpha.100"}},_active:{[N1.variable]:"colors.blackAlpha.200",_dark:{[N1.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:N1.reference},cue={lg:{[R1.variable]:"sizes.10",fontSize:"md"},md:{[R1.variable]:"sizes.8",fontSize:"xs"},sm:{[R1.variable]:"sizes.6",fontSize:"2xs"}},due={baseStyle:uue,sizes:cue,defaultProps:{size:"md"}},{variants:fue,defaultProps:hue}=O1,pue={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},mue={baseStyle:pue,variants:fue,defaultProps:hue},vue={w:"100%",mx:"auto",maxW:"prose",px:"4"},gue={baseStyle:vue},yue={opacity:.6,borderColor:"inherit"},bue={borderStyle:"solid"},Sue={borderStyle:"dashed"},xue={solid:bue,dashed:Sue},wue={baseStyle:yue,variants:xue,defaultProps:{variant:"solid"}},{definePartsStyle:Cue,defineMultiStyleConfig:Eue}=fr(oie.keys),_ue={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tue={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},kue={pt:"2",px:"4",pb:"5"},Pue={fontSize:"1.25em"},Aue=Cue({container:_ue,button:Tue,panel:kue,icon:Pue}),Oue=Eue({baseStyle:Aue}),{definePartsStyle:L1,defineMultiStyleConfig:Due}=fr(sie.keys),Zl=Rr("alert-fg"),nh=Rr("alert-bg"),Mue=L1({container:{bg:nh.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Zl.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Zl.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function s5(e){const{theme:t,colorScheme:n}=e,r=E0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var jue=L1(e=>{const{colorScheme:t}=e,n=s5(e);return{container:{[Zl.variable]:`colors.${t}.500`,[nh.variable]:n.light,_dark:{[Zl.variable]:`colors.${t}.200`,[nh.variable]:n.dark}}}}),Iue=L1(e=>{const{colorScheme:t}=e,n=s5(e);return{container:{[Zl.variable]:`colors.${t}.500`,[nh.variable]:n.light,_dark:{[Zl.variable]:`colors.${t}.200`,[nh.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Zl.reference}}}),Rue=L1(e=>{const{colorScheme:t}=e,n=s5(e);return{container:{[Zl.variable]:`colors.${t}.500`,[nh.variable]:n.light,_dark:{[Zl.variable]:`colors.${t}.200`,[nh.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Zl.reference}}}),Nue=L1(e=>{const{colorScheme:t}=e;return{container:{[Zl.variable]:"colors.white",[nh.variable]:`colors.${t}.500`,_dark:{[Zl.variable]:"colors.gray.900",[nh.variable]:`colors.${t}.200`},color:Zl.reference}}}),Lue={subtle:jue,"left-accent":Iue,"top-accent":Rue,solid:Nue},zue=Due({baseStyle:Mue,variants:Lue,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:g8,defineMultiStyleConfig:Bue}=fr(lie.keys),O0=Rr("avatar-border-color"),l5=Rr("avatar-bg"),Fue={borderRadius:"full",border:"0.2em solid",[O0.variable]:"white",_dark:{[O0.variable]:"colors.gray.800"},borderColor:O0.reference},Uue={[l5.variable]:"colors.gray.200",_dark:{[l5.variable]:"colors.whiteAlpha.400"},bgColor:l5.reference},y8=Rr("avatar-background"),Hue=e=>{const{name:t,theme:n}=e,r=t?Qie({string:t}):"colors.gray.400",i=Kie(r)(n);let a="white";return i||(a="gray.800"),{bg:y8.reference,"&:not([data-loaded])":{[y8.variable]:r},color:a,[O0.variable]:"colors.white",_dark:{[O0.variable]:"colors.gray.800"},borderColor:O0.reference,verticalAlign:"top"}},Vue=g8(e=>({badge:Hs(Fue,e),excessLabel:Hs(Uue,e),container:Hs(Hue,e)}));function Ep(e){const t=e!=="100%"?OL[e]:void 0;return g8({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 Gue={"2xs":Ep(4),xs:Ep(6),sm:Ep(8),md:Ep(12),lg:Ep(16),xl:Ep(24),"2xl":Ep(32),full:Ep("100%")},Wue=Bue({baseStyle:Vue,sizes:Gue,defaultProps:{size:"md"}}),que={Accordion:Oue,Alert:zue,Avatar:Wue,Badge:O1,Breadcrumb:Kle,Button:rue,Checkbox:Qw,CloseButton:due,Code:mue,Container:gue,Divider:wue,Drawer:ble,Editable:Tle,Form:Mle,FormError:zle,FormLabel:Fle,Heading:Vle,Input:Fr,Kbd:cse,Link:fse,List:gse,Menu:kse,Modal:zse,NumberInput:Yse,PinInput:Zse,Popover:lle,Progress:voe,Radio:Aoe,Select:Noe,Skeleton:zoe,SkipLink:Foe,Slider:Zoe,Spinner:ese,Stat:lse,Switch:fae,Table:bae,Tabs:Iae,Tag:Yae,Textarea:aoe,Tooltip:loe,Card:lue},Yue={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"}}},Kue={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"}}},Xue="ltr",Que={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},b8={semanticTokens:Yue,direction:Xue,...aie,components:que,styles:Kue,config:Que};function z1(e){return typeof e=="function"}function Zue(...e){return t=>e.reduce((n,r)=>r(n),t)}var Jue=e=>function(...n){let r=[...n],i=n[n.length-1];return Rre(i)&&r.length>1?r=r.slice(0,r.length-1):i=e,Zue(...r.map(a=>o=>z1(a)?a(o):ece(o,a)))(i)},$ue=Jue(b8);function ece(...e){return Lu({},...e,S8)}function S8(e,t,n,r){if((z1(e)||z1(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const a=z1(e)?e(...i):e,o=z1(t)?t(...i):t;return Lu({},a,o,S8)}}function tce(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var nce=tce();function rce(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function ice(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,a,o)=>{if(typeof r>"u")return e(r,i,a);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const c=e(r,i,a,o);return s.set(i,c),c}},x8=ace(ice);function w8(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var C8=e=>w8(e,t=>t!=null);function oce(e){return typeof e=="function"}process.env.NODE_ENV,process.env.NODE_ENV;function aC(e,...t){return oce(e)?e(...t):e}function sce(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}const E8=1/60*1e3,lce=typeof performance<"u"?()=>performance.now():()=>Date.now(),_8=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(lce()),E8);function uce(e){let t=[],n=[],r=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(c,d=!1,p=!1)=>{const g=p&&i,S=g?t:n;return d&&o.add(c),S.indexOf(c)===-1&&(S.push(c),g&&i&&(r=t.length)),c},cancel:c=>{const d=n.indexOf(c);d!==-1&&n.splice(d,1),o.delete(c)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let d=0;d(e[t]=uce(()=>B1=!0),e),{}),dce=F1.reduce((e,t)=>{const n=oC[t];return e[t]=(r,i=!1,a=!1)=>(B1||pce(),n.schedule(r,i,a)),e},{}),fce=F1.reduce((e,t)=>(e[t]=oC[t].cancel,e),{});F1.reduce((e,t)=>(e[t]=()=>oC[t].process(D0),e),{});const hce=e=>oC[e].process(D0),T8=e=>{B1=!1,D0.delta=u5?E8:Math.max(Math.min(e-D0.timestamp,cce),1),D0.timestamp=e,c5=!0,F1.forEach(hce),c5=!1,B1&&(u5=!1,_8(T8))},pce=()=>{B1=!0,u5=!0,c5||_8(T8)},k8=()=>D0;var mce=typeof Element<"u",vce=typeof Map=="function",gce=typeof Set=="function",yce=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function sC(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(!sC(e[r],t[r]))return!1;return!0}var a;if(vce&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!sC(r.value[1],t.get(r.value[0])))return!1;return!0}if(gce&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(yce&&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(mce&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!sC(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var bce=function(t,n){try{return sC(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 P8(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:a,colorMode:o}=cL(),s=e?x8(a,`components.${e}`):void 0,c=r||s,d=Lu({theme:a,colorMode:o},(n=c==null?void 0:c.defaultProps)!=null?n:{},C8(rce(i,["children"]))),p=A.useRef({});if(c){const S=Mre(c)(d);bce(p.current,S)||(p.current=S)}return p.current}function Bu(e,t={}){return P8(e,t)}function Xo(e,t={}){return P8(e,t)}var Sce=new Set([...Sre,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),xce=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function wce(e){return xce.has(e)||!Sce.has(e)}function Cce(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ece(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 _ce=/^((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)-.*))$/,Tce=zN(function(e){return _ce.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),kce=Tce,Pce=function(t){return t!=="theme"},A8=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?kce:Pce},O8=function(t,n,r){var i;if(n){var a=n.shouldForwardProp;i=t.__emotion_forwardProp&&a?function(o){return t.__emotion_forwardProp(o)&&a(o)}:a}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},D8=`You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". You can read more about this here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Ace=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Mw(n,r,i),k4(function(){return jw(n,r,i)}),null},Oce=function e(t,n){if(process.env.NODE_ENV!=="production"&&t===void 0)throw new Error(`You are trying to create a styled element with an undefined component. You may have forgotten to import it.`);var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=O8(t,n,r),c=s||A8(i),d=!c("as");return function(){var p=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&g.push("label:"+a+";"),p[0]==null||p[0].raw===void 0)g.push.apply(g,p);else{process.env.NODE_ENV!=="production"&&p[0][0]===void 0&&console.error(D8),g.push(p[0][0]);for(var S=p.length,w=1;wt=>{const{theme:n,css:r,__css:i,sx:a,...o}=t,s=w8(o,(g,S)=>wre(S)),c=aC(e,t),d=Ece({},i,c,C8(s),a),p=kL(d)(t.theme);return r?[p,r]:p};function d5(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=wce);const i=jce({baseStyle:n}),a=Mce(e,r)(i);return A.forwardRef(function(c,d){const{colorMode:p,forced:g}=D4();return A.createElement(a,{ref:d,"data-theme":g?p:void 0,...c})})}function Ice(){const e=new Map;return new Proxy(d5,{apply(t,n,r){return d5(...r)},get(t,n){return e.has(n)||e.set(n,d5(n)),e.get(n)}})}var ct=Ice();function _t(e){return A.forwardRef(e)}function Rce(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=A.createContext(void 0);i.displayName=r;function a(){var o;const s=A.useContext(i);if(!s&&t){const c=new Error(n);throw c.name="ContextError",(o=Error.captureStackTrace)==null||o.call(Error,c,a),c}return s}return[i.Provider,a,i]}function Nce(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=A.useMemo(()=>yre(n),[n]);return v.jsxs(Yte,{theme:i,children:[v.jsx(Lce,{root:t}),r]})}function Lce({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return v.jsx(w1,{styles:n=>({[t]:n.__cssVars})})}Rce({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function zce(){const{colorMode:e}=D4();return v.jsx(w1,{styles:t=>{const n=x8(t,"styles.global"),r=aC(n,{theme:t,colorMode:e});return r?kL(r)(t):void 0}})}var j8=A.createContext({getDocument(){return document},getWindow(){return window}});j8.displayName="EnvironmentContext";function I8(e){const{children:t,environment:n,disabled:r}=e,i=A.useRef(null),a=A.useMemo(()=>n||{getDocument:()=>{var s,c;return(c=(s=i.current)==null?void 0:s.ownerDocument)!=null?c:document},getWindow:()=>{var s,c;return(c=(s=i.current)==null?void 0:s.ownerDocument.defaultView)!=null?c:window}},[n]),o=!r||!n;return v.jsxs(j8.Provider,{value:a,children:[t,o&&v.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}I8.displayName="EnvironmentProvider";var Bce=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:a={},environment:o,cssVarsRoot:s,disableEnvironment:c}=e,d=v.jsx(I8,{environment:o,disabled:c,children:t});return v.jsx(Nce,{theme:a,cssVarsRoot:s,children:v.jsxs(uL,{colorModeManager:n,options:a.config,children:[i?v.jsx(ine,{}):v.jsx(rne,{}),v.jsx(zce,{}),r?v.jsx(aL,{zIndex:r,children:d}):d]})})},Fce=(e,t)=>e.find(n=>n.id===t);function R8(e,t){const n=N8(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function N8(e,t){for(const[n,r]of Object.entries(e))if(Fce(r,t))return n}function Uce(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 Hce(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,a=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",o=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:a,left:o}}function Ra(e,t=[]){const n=A.useRef(e);return A.useEffect(()=>{n.current=e}),A.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Vce(e,t){const n=Ra(e);A.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function rh(e,t){const n=A.useRef(!1),r=A.useRef(!1);A.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),A.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const L8=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),uC=A.createContext({});function Gce(){return A.useContext(uC).visualElement}const U1=A.createContext(null),cC=typeof document<"u",dC=cC?A.useLayoutEffect:A.useEffect,z8=A.createContext({strict:!1});function Wce(e,t,n,r){const i=Gce(),a=A.useContext(z8),o=A.useContext(U1),s=A.useContext(L8).reducedMotion,c=A.useRef();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:s}));const d=c.current;return A.useInsertionEffect(()=>{d&&d.update(n,o)}),dC(()=>{d&&d.render()}),A.useEffect(()=>{d&&d.updateFeatures()}),(window.HandoffAppearAnimations?dC:A.useEffect)(()=>{d&&d.animationState&&d.animationState.animateChanges()}),d}function M0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qce(e,t,n){return A.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):M0(n)&&(n.current=r))},[t])}function H1(e){return typeof e=="string"||Array.isArray(e)}function fC(e){return typeof e=="object"&&typeof e.start=="function"}const f5=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],h5=["initial",...f5];function hC(e){return fC(e.animate)||h5.some(t=>H1(e[t]))}function B8(e){return Boolean(hC(e)||e.variants)}function Yce(e,t){if(hC(e)){const{initial:n,animate:r}=e;return{initial:n===!1||H1(n)?n:void 0,animate:H1(r)?r:void 0}}return e.inherit!==!1?t:{}}function Kce(e){const{initial:t,animate:n}=Yce(e,A.useContext(uC));return A.useMemo(()=>({initial:t,animate:n}),[F8(t),F8(n)])}function F8(e){return Array.isArray(e)?e.join(" "):e}const U8={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"]},V1={};for(const e in U8)V1[e]={isEnabled:t=>U8[e].some(n=>!!t[n])};function Xce(e){for(const t in e)V1[t]={...V1[t],...e[t]}}function p5(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const G1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qce=1;function Zce(){return p5(()=>{if(G1.hasEverUpdated)return Qce++})}const m5=A.createContext({}),H8=A.createContext({}),Jce=Symbol.for("motionComponentSymbol");function $ce({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Xce(e);function a(s,c){let d;const p={...A.useContext(L8),...s,layoutId:ede(s)},{isStatic:g}=p,S=Kce(s),w=g?void 0:Zce(),C=r(s,g);if(!g&&cC){S.visualElement=Wce(i,C,p,t);const k=A.useContext(H8),P=A.useContext(z8).strict;S.visualElement&&(d=S.visualElement.loadFeatures(p,P,e,w,k))}return gt.createElement(uC.Provider,{value:S},d&&S.visualElement?gt.createElement(d,{visualElement:S.visualElement,...p}):null,n(i,s,w,qce(C,S.visualElement,c),C,g,S.visualElement))}const o=A.forwardRef(a);return o[Jce]=i,o}function ede({layoutId:e}){const t=A.useContext(m5).id;return t&&e!==void 0?t+"-"+e:e}function tde(e){function t(r,i={}){return $ce(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 nde=["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 v5(e){return typeof e!="string"||e.includes("-")?!1:!!(nde.indexOf(e)>-1||/[A-Z]/.test(e))}const pC={};function rde(e){Object.assign(pC,e)}const mC=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hv=new Set(mC);function V8(e,{layout:t,layoutId:n}){return hv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!pC[e]||e==="opacity")}const yl=e=>Boolean(e&&e.getVelocity),ide={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ade=mC.length;function ode(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),W8=G8("--"),g5=G8("var(--"),sde=(e,t)=>t&&typeof e=="number"?t.transform(e):e,j0=(e,t,n)=>Math.min(Math.max(n,e),t),pv={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},W1={...pv,transform:e=>j0(0,1,e)},vC={...pv,default:1},q1=e=>Math.round(e*1e5)/1e5,Y1=/(-)?([\d]*\.?[\d])+/g,y5=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,lde=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function K1(e){return typeof e=="string"}const X1=e=>({test:t=>K1(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_p=X1("deg"),Rd=X1("%"),Pn=X1("px"),ude=X1("vh"),cde=X1("vw"),q8={...Rd,parse:e=>Rd.parse(e)/100,transform:e=>Rd.transform(e*100)},Y8={...pv,transform:Math.round},K8={borderWidth:Pn,borderTopWidth:Pn,borderRightWidth:Pn,borderBottomWidth:Pn,borderLeftWidth:Pn,borderRadius:Pn,radius:Pn,borderTopLeftRadius:Pn,borderTopRightRadius:Pn,borderBottomRightRadius:Pn,borderBottomLeftRadius:Pn,width:Pn,maxWidth:Pn,height:Pn,maxHeight:Pn,size:Pn,top:Pn,right:Pn,bottom:Pn,left:Pn,padding:Pn,paddingTop:Pn,paddingRight:Pn,paddingBottom:Pn,paddingLeft:Pn,margin:Pn,marginTop:Pn,marginRight:Pn,marginBottom:Pn,marginLeft:Pn,rotate:_p,rotateX:_p,rotateY:_p,rotateZ:_p,scale:vC,scaleX:vC,scaleY:vC,scaleZ:vC,skew:_p,skewX:_p,skewY:_p,distance:Pn,translateX:Pn,translateY:Pn,translateZ:Pn,x:Pn,y:Pn,z:Pn,perspective:Pn,transformPerspective:Pn,opacity:W1,originX:q8,originY:q8,originZ:Pn,zIndex:Y8,fillOpacity:W1,strokeOpacity:W1,numOctaves:Y8};function b5(e,t,n,r){const{style:i,vars:a,transform:o,transformOrigin:s}=e;let c=!1,d=!1,p=!0;for(const g in t){const S=t[g];if(W8(g)){a[g]=S;continue}const w=K8[g],C=sde(S,w);if(hv.has(g)){if(c=!0,o[g]=C,!p)continue;S!==(w.default||0)&&(p=!1)}else g.startsWith("origin")?(d=!0,s[g]=C):i[g]=C}if(t.transform||(c||r?i.transform=ode(e.transform,n,p,r):i.transform&&(i.transform="none")),d){const{originX:g="50%",originY:S="50%",originZ:w=0}=s;i.transformOrigin=`${g} ${S} ${w}`}}const S5=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function X8(e,t,n){for(const r in t)!yl(t[r])&&!V8(r,n)&&(e[r]=t[r])}function dde({transformTemplate:e},t,n){return A.useMemo(()=>{const r=S5();return b5(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function fde(e,t,n){const r=e.style||{},i={};return X8(i,r,e),Object.assign(i,dde(e,t,n)),e.transformValues?e.transformValues(i):i}function hde(e,t,n){const r={},i=fde(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 pde=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 gC(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||pde.has(e)}let Q8=e=>!gC(e);function mde(e){e&&(Q8=t=>t.startsWith("on")?!gC(t):e(t))}try{mde(require("@emotion/is-prop-valid").default)}catch{}function vde(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Q8(i)||n===!0&&gC(i)||!t&&!gC(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Z8(e,t,n){return typeof e=="string"?e:Pn.transform(t+n*e)}function gde(e,t,n){const r=Z8(t,e.x,e.width),i=Z8(n,e.y,e.height);return`${r} ${i}`}const yde={offset:"stroke-dashoffset",array:"stroke-dasharray"},bde={offset:"strokeDashoffset",array:"strokeDasharray"};function Sde(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?yde:bde;e[a.offset]=Pn.transform(-r);const o=Pn.transform(t),s=Pn.transform(n);e[a.array]=`${o} ${s}`}function x5(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:a,pathSpacing:o=1,pathOffset:s=0,...c},d,p,g){if(b5(e,c,d,g),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:S,style:w,dimensions:C}=e;S.transform&&(C&&(w.transform=S.transform),delete S.transform),C&&(r!==void 0||i!==void 0||w.transform)&&(w.transformOrigin=gde(C,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(S.x=t),n!==void 0&&(S.y=n),a!==void 0&&Sde(S,a,o,s,!1)}const J8=()=>({...S5(),attrs:{}}),w5=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xde(e,t,n,r){const i=A.useMemo(()=>{const a=J8();return x5(a,t,{enableHardwareAcceleration:!1},w5(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};X8(a,e.style,e),i.style={...a,...i.style}}return i}function wde(e=!1){return(n,r,i,a,{latestValues:o},s)=>{const d=(v5(n)?xde:hde)(r,o,s,n),g={...vde(r,typeof n=="string",e),...d,ref:a},{children:S}=r,w=A.useMemo(()=>yl(S)?S.get():S,[S]);return i&&(g["data-projection-id"]=i),A.createElement(n,{...g,children:w})}}const C5=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function $8(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const ez=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 tz(e,t,n,r){$8(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ez.has(i)?i:C5(i),t.attrs[i])}function E5(e,t){const{style:n}=e,r={};for(const i in n)(yl(n[i])||t.style&&yl(t.style[i])||V8(i,e))&&(r[i]=n[i]);return r}function nz(e,t){const n=E5(e,t);for(const r in e)if(yl(e[r])||yl(t[r])){const i=r==="x"||r==="y"?"attr"+r.toUpperCase():r;n[i]=e[r]}return n}function _5(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 yC=e=>Array.isArray(e),Cde=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),Ede=e=>yC(e)?e[e.length-1]||0:e;function bC(e){const t=yl(e)?e.get():e;return Cde(t)?t.toValue():t}function _de({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:Tde(r,i,a,e),renderState:t()};return n&&(o.mount=s=>n(r,s,o)),o}const rz=e=>(t,n)=>{const r=A.useContext(uC),i=A.useContext(U1),a=()=>_de(e,t,r,i);return n?a():p5(a)};function Tde(e,t,n,r){const i={},a=r(e,{});for(const S in a)i[S]=bC(a[S]);let{initial:o,animate:s}=e;const c=hC(e),d=B8(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let p=n?n.initial===!1:!1;p=p||o===!1;const g=p?s:o;return g&&typeof g!="boolean"&&!fC(g)&&(Array.isArray(g)?g:[g]).forEach(w=>{const C=_5(e,w);if(!C)return;const{transitionEnd:k,transition:P,...D}=C;for(const M in D){let R=D[M];if(Array.isArray(R)){const L=p?R.length-1:0;R=R[L]}R!==null&&(i[M]=R)}for(const M in k)i[M]=k[M]}),i}const kde={useVisualState:rz({scrapeMotionValuesFromProps:nz,createRenderState:J8,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}}x5(n,r,{enableHardwareAcceleration:!1},w5(t.tagName),e.transformTemplate),tz(t,n)}})},Pde={useVisualState:rz({scrapeMotionValuesFromProps:E5,createRenderState:S5})};function Ade(e,{forwardMotionProps:t=!1},n,r){return{...v5(e)?kde:Pde,preloadedFeatures:n,useRender:wde(t),createVisualElement:r,Component:e}}function ih(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const iz=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function SC(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Ode=e=>t=>iz(t)&&e(t,SC(t));function ah(e,t,n,r){return ih(e,t,Ode(n),r)}const Dde=(e,t)=>n=>t(e(n)),Tp=(...e)=>e.reduce(Dde);function az(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const oz=az("dragHorizontal"),sz=az("dragVertical");function lz(e){let t=!1;if(e==="y")t=sz();else if(e==="x")t=oz();else{const n=oz(),r=sz();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function uz(){const e=lz(!0);return e?(e(),!1):!0}let kp=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};function cz(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,o)=>{if(a.type==="touch"||uz())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&s[r](a,o)};return ah(e.current,n,i,{passive:!e.getProps()[r]})}class Mde extends kp{mount(){this.unmount=Tp(cz(this.node,!0),cz(this.node,!1))}unmount(){}}class jde extends kp{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tp(ih(this.node.current,"focus",()=>this.onFocus()),ih(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dz=(e,t)=>t?e===t?!0:dz(e,t.parentElement):!1,Fu=e=>e;function T5(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,SC(n))}class Ide extends kp{constructor(){super(...arguments),this.removeStartListeners=Fu,this.removeEndListeners=Fu,this.removeAccessibleListeners=Fu,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=ah(window,"pointerup",(s,c)=>{if(!this.checkPressEnd())return;const{onTap:d,onTapCancel:p}=this.node.getProps();dz(this.node.current,s.target)?d&&d(s,c):p&&p(s,c)},{passive:!(r.onTap||r.onPointerUp)}),o=ah(window,"pointercancel",(s,c)=>this.cancelPress(s,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Tp(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||T5("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=ih(this.node.current,"keyup",o),T5("down",(s,c)=>{this.startPress(s,c)})},n=ih(this.node.current,"keydown",t),r=()=>{this.isPressing&&T5("cancel",(a,o)=>this.cancelPress(a,o))},i=ih(this.node.current,"blur",r);this.removeAccessibleListeners=Tp(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&r(t,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!uz()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&r(t,n)}mount(){const t=this.node.getProps(),n=ah(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=ih(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Tp(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const k5=new WeakMap,P5=new WeakMap,Rde=e=>{const t=k5.get(e.target);t&&t(e)},Nde=e=>{e.forEach(Rde)};function Lde({root:e,...t}){const n=e||document;P5.has(n)||P5.set(n,{});const r=P5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nde,{root:e,...t})),r[i]}function zde(e,t,n){const r=Lde(t);return k5.set(e,n),r.observe(e),()=>{k5.delete(e),r.unobserve(e)}}const Bde={some:0,all:1};class Fde extends kp{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("whileInView",!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a,fallback:o=!0}=t;if(typeof IntersectionObserver>"u"){o&&this.viewportFallback();return}const s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Bde[i]},c=d=>{const{isIntersecting:p}=d;if(this.isInView===p||(this.isInView=p,a&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:g,onViewportLeave:S}=this.node.getProps(),w=p?g:S;w&&w(d)};return zde(this.node.current,s,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ude(t,n))&&this.startObserver()}unmount(){}}function Ude({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Hde={inView:{Feature:Fde},tap:{Feature:Ide},focus:{Feature:jde},hover:{Feature:Mde}};function fz(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),Gde=e=>/^0[^.\s]+$/.test(e),oh={delta:0,timestamp:0},hz=1/60*1e3,Wde=typeof performance<"u"?()=>performance.now():()=>Date.now(),pz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Wde()),hz);function qde(e){let t=[],n=[],r=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(c,d=!1,p=!1)=>{const g=p&&i,S=g?t:n;return d&&o.add(c),S.indexOf(c)===-1&&(S.push(c),g&&i&&(r=t.length)),c},cancel:c=>{const d=n.indexOf(c);d!==-1&&n.splice(d,1),o.delete(c)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let d=0;d(e[t]=qde(()=>Q1=!0),e),{}),vs=Z1.reduce((e,t)=>{const n=xC[t];return e[t]=(r,i=!1,a=!1)=>(Q1||Xde(),n.schedule(r,i,a)),e},{}),Pp=Z1.reduce((e,t)=>(e[t]=xC[t].cancel,e),{}),D5=Z1.reduce((e,t)=>(e[t]=()=>xC[t].process(oh),e),{}),Kde=e=>xC[e].process(oh),mz=e=>{Q1=!1,oh.delta=A5?hz:Math.max(Math.min(e-oh.timestamp,Yde),1),oh.timestamp=e,O5=!0,Z1.forEach(Kde),O5=!1,Q1&&(A5=!1,pz(mz))},Xde=()=>{Q1=!0,A5=!0,O5||pz(mz)};function M5(e,t){e.indexOf(t)===-1&&e.push(t)}function j5(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class I5{constructor(){this.subscriptions=[]}add(t){return M5(this.subscriptions,t),()=>j5(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 a=0;a!isNaN(parseFloat(e));class Zde{constructor(t,n={}){this.version="9.1.7",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:a,timestamp:o}=oh;this.lastUpdated!==o&&(this.timeDelta=a,this.lastUpdated=o,vs.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=()=>vs.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=Qde(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new I5);const r=this.events[t].add(n);return t==="change"?()=>{r(),vs.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?R5(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 I0(e,t){return new Zde(e,t)}const N5=(e,t)=>n=>Boolean(K1(n)&&lde.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),vz=(e,t,n)=>r=>{if(!K1(r))return r;const[i,a,o,s]=r.match(Y1);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},Jde=e=>j0(0,255,e),L5={...pv,transform:e=>Math.round(Jde(e))},mv={test:N5("rgb","red"),parse:vz("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+L5.transform(e)+", "+L5.transform(t)+", "+L5.transform(n)+", "+q1(W1.transform(r))+")"};function $de(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 z5={test:N5("#"),parse:$de,transform:mv.transform},R0={test:N5("hsl","hue"),parse:vz("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rd.transform(q1(t))+", "+Rd.transform(q1(n))+", "+q1(W1.transform(r))+")"},Vs={test:e=>mv.test(e)||z5.test(e)||R0.test(e),parse:e=>mv.test(e)?mv.parse(e):R0.test(e)?R0.parse(e):z5.parse(e),transform:e=>K1(e)?e:e.hasOwnProperty("red")?mv.transform(e):R0.transform(e)},gz="${c}",yz="${n}";function efe(e){var t,n;return isNaN(e)&&K1(e)&&(((t=e.match(Y1))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(y5))===null||n===void 0?void 0:n.length)||0)>0}function wC(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0,r=0;const i=e.match(y5);i&&(n=i.length,e=e.replace(y5,gz),t.push(...i.map(Vs.parse)));const a=e.match(Y1);return a&&(r=a.length,e=e.replace(Y1,yz),t.push(...a.map(pv.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function bz(e){return wC(e).values}function Sz(e){const{values:t,numColors:n,tokenised:r}=wC(e),i=t.length;return a=>{let o=r;for(let s=0;stypeof e=="number"?0:e;function nfe(e){const t=bz(e);return Sz(e)(t.map(tfe))}const Ap={test:efe,parse:bz,createTransformer:Sz,getAnimatableNone:nfe},rfe=new Set(["brightness","contrast","saturate","opacity"]);function ife(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Y1)||[];if(!r)return e;const i=n.replace(r,"");let a=rfe.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const afe=/([a-z-]*)\(.*?\)/g,B5={...Ap,getAnimatableNone:e=>{const t=e.match(afe);return t?t.map(ife).join(" "):e}},ofe={...K8,color:Vs,backgroundColor:Vs,outlineColor:Vs,fill:Vs,stroke:Vs,borderColor:Vs,borderTopColor:Vs,borderRightColor:Vs,borderBottomColor:Vs,borderLeftColor:Vs,filter:B5,WebkitFilter:B5},F5=e=>ofe[e];function U5(e,t){let n=F5(e);return n!==B5&&(n=Ap),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xz=e=>t=>t.test(e),wz=[pv,Pn,Rd,_p,cde,ude,{test:e=>e==="auto",parse:e=>e}],J1=e=>wz.find(xz(e)),sfe=[...wz,Vs,Ap],lfe=e=>sfe.find(xz(e));function ufe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function cfe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function CC(e,t,n){const r=e.getProps();return _5(r,t,n!==void 0?n:r.custom,ufe(e),cfe(e))}function dfe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,I0(n))}function ffe(e,t){const n=CC(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const o in a){const s=Ede(a[o]);dfe(e,o,s)}}function hfe(e,t,n){var r,i;const a=Object.keys(t).filter(s=>!e.hasValue(s)),o=a.length;if(o)for(let s=0;s{!e&&typeof console<"u"&&console.warn(t)},Lc=(e,t)=>{if(!e)throw new Error(t)});const _C=e=>e*1e3,gfe={current:!1},H5=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,V5=e=>t=>1-e(1-t),G5=e=>e*e,yfe=V5(G5),W5=H5(G5),ca=(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 bfe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=q5(c,s,e+1/3),a=q5(c,s,e),o=q5(c,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}const Y5=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Sfe=[z5,mv,R0],xfe=e=>Sfe.find(t=>t.test(e));function Cz(e){const t=xfe(e);Lc(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===R0&&(n=bfe(n)),n}const Ez=(e,t)=>{const n=Cz(e),r=Cz(t),i={...n};return a=>(i.red=Y5(n.red,r.red,a),i.green=Y5(n.green,r.green,a),i.blue=Y5(n.blue,r.blue,a),i.alpha=ca(n.alpha,r.alpha,a),mv.transform(i))};function _z(e,t){return typeof e=="number"?n=>ca(e,t,n):Vs.test(e)?Ez(e,t):kz(e,t)}const Tz=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,o)=>_z(a,t[o]));return a=>{for(let o=0;o{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=_z(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},kz=(e,t)=>{const n=Ap.createTransformer(t),r=wC(e),i=wC(t);return r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Tp(Tz(r.values,i.values),n):($1(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),o=>`${o>0?t:e}`)},eS=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Pz=(e,t)=>n=>ca(e,t,n);function Cfe(e){return typeof e=="number"?Pz:typeof e=="string"?Vs.test(e)?Ez:kz:Array.isArray(e)?Tz:typeof e=="object"?wfe:Pz}function Efe(e,t,n){const r=[],i=n||Cfe(e[0]),a=e.length-1;for(let o=0;oe[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Efe(t,r,i),s=o.length,c=d=>{let p=0;if(s>1)for(;pc(j0(e[0],e[a-1],d)):c}function _fe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=eS(0,t,r);e.push(ca(n,1,i))}}function Tfe(e){const t=[0];return _fe(t,e.length-1),t}function kfe(e,t){return e.map(n=>n*t)}const Oz=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pfe=1e-7,Afe=12;function Ofe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Oz(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Pfe&&++sOfe(a,0,1,e,n);return a=>a===0||a===1?a:Oz(i(a),t,r)}const Mz=e=>1-Math.sin(Math.acos(e)),K5=V5(Mz),Dfe=H5(K5),jz=Dz(.33,1.53,.69,.99),X5=V5(jz),Mfe=H5(X5),Iz={linear:Fu,easeIn:G5,easeInOut:W5,easeOut:yfe,circIn:Mz,circInOut:Dfe,circOut:K5,backIn:X5,backInOut:Mfe,backOut:jz,anticipate:e=>(e*=2)<1?.5*X5(e):.5*(2-Math.pow(2,-10*(e-1)))},Rz=e=>{if(Array.isArray(e)){Lc(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return Dz(t,n,r,i)}else if(typeof e=="string")return Lc(Iz[e]!==void 0,`Invalid easing type '${e}'`),Iz[e];return e},jfe=e=>Array.isArray(e)&&typeof e[0]!="number";function Ife(e,t){return e.map(()=>t||W5).splice(0,e.length-1)}function Q5({keyframes:e,ease:t=W5,times:n,duration:r=300}){e=[...e];const i=jfe(t)?t.map(Rz):Rz(t),a={done:!1,value:e[0]},o=kfe(n&&n.length===e.length?n:Tfe(e),r);function s(){return Az(o,e,{ease:Array.isArray(i)?i:Ife(e,i)})}let c=s();return{next:d=>(a.value=c(d),a.done=d>=r,a),flipTarget:()=>{e.reverse(),c=s()}}}const Z5=.001,Rfe=.01,Nz=10,Nfe=.05,Lfe=1;function zfe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;$1(e<=Nz*1e3,"Spring duration must be 10 seconds or less");let o=1-t;o=j0(Nfe,Lfe,o),e=j0(Rfe,Nz,e/1e3),o<1?(i=d=>{const p=d*o,g=p*e,S=p-n,w=J5(d,o),C=Math.exp(-g);return Z5-S/w*C},a=d=>{const g=d*o*e,S=g*n+n,w=Math.pow(o,2)*Math.pow(d,2)*e,C=Math.exp(-g),k=J5(Math.pow(d,2),o);return(-i(d)+Z5>0?-1:1)*((S-w)*C)/k}):(i=d=>{const p=Math.exp(-d*e),g=(d-n)*e+1;return-Z5+p*g},a=d=>{const p=Math.exp(-d*e),g=(n-d)*(e*e);return p*g});const s=5/e,c=Ffe(i,a,s);if(e=e*1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:o*2*Math.sqrt(r*d),duration:e}}}const Bfe=12;function Ffe(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Vfe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Lz(e,Hfe)&&Lz(e,Ufe)){const n=zfe(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}const Gfe=5;function zz({keyframes:e,restDelta:t,restSpeed:n,...r}){let i=e[0],a=e[e.length-1];const o={done:!1,value:i},{stiffness:s,damping:c,mass:d,velocity:p,duration:g,isResolvedFromDuration:S}=Vfe(r);let w=Wfe,C=p?-(p/1e3):0;const k=c/(2*Math.sqrt(s*d));function P(){const D=a-i,M=Math.sqrt(s/d)/1e3,R=Math.abs(D)<5;if(n||(n=R?.01:2),t||(t=R?.005:.5),k<1){const L=J5(M,k);w=z=>{const U=Math.exp(-k*M*z);return a-U*((C+k*M*D)/L*Math.sin(L*z)+D*Math.cos(L*z))}}else if(k===1)w=L=>a-Math.exp(-M*L)*(D+(C+M*D)*L);else{const L=M*Math.sqrt(k*k-1);w=z=>{const U=Math.exp(-k*M*z),H=Math.min(L*z,300);return a-U*((C+k*M*D)*Math.sinh(H)+L*D*Math.cosh(H))/L}}}return P(),{next:D=>{const M=w(D);if(S)o.done=D>=g;else{let R=C;if(D!==0)if(k<1){const U=Math.max(0,D-Gfe);R=R5(M-w(U),D-U)}else R=0;const L=Math.abs(R)<=n,z=Math.abs(a-M)<=t;o.done=L&&z}return o.value=o.done?a:M,o},flipTarget:()=>{C=-C,[i,a]=[a,i],P()}}}zz.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const Wfe=e=>0;function qfe({keyframes:e=[0],velocity:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){const o=e[0],s={done:!1,value:o};let c=n*t;const d=o+c,p=a===void 0?d:a(d);return p!==d&&(c=p-o),{next:g=>{const S=-c*Math.exp(-g/r);return s.done=!(S>i||S<-i),s.value=s.done?p:p+S,s},flipTarget:()=>{}}}const Yfe={decay:qfe,keyframes:Q5,tween:Q5,spring:zz};function Bz(e,t,n=0){return e-t-n}function Kfe(e,t=0,n=0,r=!0){return r?Bz(t+-e,t,n):t-(e-t)+n}function Xfe(e,t,n,r){return r?e>=t+n:e<=-n}const Qfe=e=>{const t=({delta:n})=>e(n);return{start:()=>vs.update(t,!0),stop:()=>Pp.update(t)}};function TC({duration:e,driver:t=Qfe,elapsed:n=0,repeat:r=0,repeatType:i="loop",repeatDelay:a=0,keyframes:o,autoplay:s=!0,onPlay:c,onStop:d,onComplete:p,onRepeat:g,onUpdate:S,type:w="keyframes",...C}){const k=n;let P,D=0,M=e,R=!1,L=!0,z;const U=Yfe[o.length>2?"keyframes":w]||Q5,H=o[0],q=o[o.length-1];let J={done:!1,value:H};const{needsInterpolation:$}=U;$&&$(H,q)&&(z=Az([0,100],[H,q],{clamp:!1}),o=[0,100]);const K=U({...C,duration:e,keyframes:o});function fe(){D++,i==="reverse"?(L=D%2===0,n=Kfe(n,M,a,L)):(n=Bz(n,M,a),i==="mirror"&&K.flipTarget()),R=!1,g&&g()}function X(){P&&P.stop(),p&&p()}function G(oe){L||(oe=-oe),n+=oe,R||(J=K.next(Math.max(0,n)),z&&(J.value=z(J.value)),R=L?J.done:n<=0),S&&S(J.value),R&&(D===0&&(M=M!==void 0?M:n),D{d&&d(),P&&P.stop()},set currentTime(oe){n=k,G(oe)},sample:oe=>{n=k;const ie=e&&typeof e=="number"?Math.max(e*.5,50):50;let re=0;for(G(0);re<=oe;){const le=oe-re;G(Math.min(le,ie)),re+=ie}return J}}}function Zfe(e){return!e||Array.isArray(e)||typeof e=="string"&&Fz[e]}const tS=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fz={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tS([0,.65,.55,1]),circOut:tS([.55,0,1,.45]),backIn:tS([.31,.01,.66,-.59]),backOut:tS([.33,1.53,.69,.99])};function Jfe(e){if(e)return Array.isArray(e)?tS(e):Fz[e]}function $fe(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:o="loop",ease:s,times:c}={}){return e.animate({[t]:n,offset:c},{delay:r,duration:i,easing:Jfe(s),fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}const Uz={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},$5={},Hz={};for(const e in Uz)Hz[e]=()=>($5[e]===void 0&&($5[e]=Uz[e]()),$5[e]);function ehe(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const the=new Set(["opacity","clipPath","filter","transform"]),kC=10;function nhe(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Hz.waapi()&&the.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:s=300,elapsed:c=0,ease:d}=i;if(i.type==="spring"||!Zfe(i.ease)){if(i.repeat===1/0)return;const g=TC({...i,elapsed:0});let S={done:!1,value:o[0]};const w=[];let C=0;for(;!S.done&&C<2e4;)S=g.sample(C),w.push(S.value),C+=kC;o=w,s=C-kC,d="linear"}const p=$fe(e.owner.current,t,o,{...i,delay:-c,duration:s,ease:d});return p.onfinish=()=>{e.set(ehe(o,i)),vs.update(()=>p.cancel()),r&&r()},{get currentTime(){return p.currentTime||0},set currentTime(g){p.currentTime=g},stop:()=>{const{currentTime:g}=p;if(g){const S=TC({...i,autoplay:!1});e.setWithVelocity(S.sample(g-kC).value,S.sample(g).value,kC)}vs.update(()=>p.cancel())}}}function Vz(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Pp.read(r),e(a-t))};return vs.read(r,!0),()=>Pp.read(r)}function rhe({keyframes:e,elapsed:t,onUpdate:n,onComplete:r}){const i=()=>{n&&n(e[e.length-1]),r&&r()};return t?{stop:Vz(i,-t)}:i()}function ihe({keyframes:e,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:o=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:d,driver:p,onUpdate:g,onComplete:S,onStop:w}){const C=e[0];let k;function P(L){return n!==void 0&&Lr}function D(L){return n===void 0?r:r===void 0||Math.abs(n-L){g&&g(z),L.onUpdate&&L.onUpdate(z)},onComplete:S,onStop:w})}function R(L){M({type:"spring",stiffness:o,damping:s,restDelta:c,...L})}if(P(C))R({velocity:t,keyframes:[C,D(C)]});else{let L=i*t+C;typeof d<"u"&&(L=d(L));const z=D(L),U=z===n?-1:1;let H,q;const J=$=>{H=q,q=$,t=R5($-H,oh.delta),(U===1&&$>z||U===-1&&$k&&k.stop()}}const ahe={type:"spring",stiffness:500,damping:25,restSpeed:10},ohe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),she={type:"keyframes",duration:.8},lhe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uhe=(e,{keyframes:t})=>t.length>2?she:hv.has(e)?e.startsWith("scale")?ohe(t[1]):ahe:lhe,eP=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Ap.test(t)&&!t.startsWith("url("));function che({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:d,...p}){return!!Object.keys(p).length}function Gz(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function Wz(e){return typeof e=="number"?0:U5("",e)}function qz(e,t){return e[t]||e.default||e}function dhe(e,t,n,r){const i=eP(t,n);let a=r.from!==void 0?r.from:e.get();return a==="none"&&i&&typeof n=="string"?a=U5(t,n):Gz(a)&&typeof n=="string"?a=Wz(n):!Array.isArray(n)&&Gz(n)&&typeof a=="string"&&(n=Wz(a)),Array.isArray(n)?(n[0]===null&&(n[0]=a),n):[a,n]}const tP=(e,t,n,r={})=>i=>{const a=qz(r,e)||{},o=a.delay||r.delay||0;let{elapsed:s=0}=r;s=s-_C(o);const c=dhe(t,e,n,a),d=c[0],p=c[c.length-1],g=eP(e,d),S=eP(e,p);$1(g===S,`You are trying to animate ${e} from "${d}" to "${p}". ${d} is not an animatable value - to enable this animation set ${d} to a value animatable to ${p} via the \`style\` property.`);let w={keyframes:c,velocity:t.getVelocity(),...a,elapsed:s,onUpdate:C=>{t.set(C),a.onUpdate&&a.onUpdate(C)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(!g||!S||gfe.current||a.type===!1)return rhe(w);if(a.type==="inertia")return ihe(w);if(che(a)||(w={...w,...uhe(e,w)}),w.duration&&(w.duration=_C(w.duration)),w.repeatDelay&&(w.repeatDelay=_C(w.repeatDelay)),t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const C=nhe(t,e,w);if(C)return C}return TC(w)};function fhe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>nP(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=nP(e,t,n);else{const i=typeof t=="function"?CC(e,t,n.custom):t;r=Yz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function nP(e,t,n={}){const r=CC(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Yz(e,r,n):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:g}=i;return hhe(e,t,d+c,p,g,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,d]=s==="beforeChildren"?[a,o]:[o,a];return c().then(d)}else return Promise.all([a(),o(n.delay)])}function Yz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(a=r);const d=[],p=i&&e.animationState&&e.animationState.getState()[i];for(const g in s){const S=e.getValue(g),w=s[g];if(!S||w===void 0||p&&mhe(p,g))continue;const C={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!S.hasAnimated){const P=e.getProps()[vfe];P&&(C.elapsed=window.HandoffAppearAnimations(P,g,S,vs))}let k=S.start(tP(g,S,w,e.shouldReduceMotion&&hv.has(g)?{type:!1}:C));EC(c)&&(c.add(g),k=k.then(()=>c.remove(g))),d.push(k)}return Promise.all(d).then(()=>{o&&ffe(e,o)})}function hhe(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,c=i===1?(d=0)=>d*r:(d=0)=>s-d*r;return Array.from(e.variantChildren).sort(phe).forEach((d,p)=>{d.notify("AnimationStart",t),o.push(nP(d,t,{...a,delay:n+c(p)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(o)}function phe(e,t){return e.sortNodePosition(t)}function mhe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const vhe=[...f5].reverse(),ghe=f5.length;function yhe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fhe(e,n,r)))}function bhe(e){let t=yhe(e);const n=xhe();let r=!0;const i=(c,d)=>{const p=CC(e,d);if(p){const{transition:g,transitionEnd:S,...w}=p;c={...c,...w,...S}}return c};function a(c){t=c(e)}function o(c,d){const p=e.getProps(),g=e.getVariantContext(!0)||{},S=[],w=new Set;let C={},k=1/0;for(let D=0;Dk&&z;const $=Array.isArray(L)?L:[L];let K=$.reduce(i,{});U===!1&&(K={});const{prevResolvedValues:fe={}}=R,X={...fe,...K},G=te=>{J=!0,w.delete(te),R.needsAnimating[te]=!0};for(const te in X){const oe=K[te],ie=fe[te];C.hasOwnProperty(te)||(oe!==ie?yC(oe)&&yC(ie)?!fz(oe,ie)||q?G(te):R.protectedKeys[te]=!0:oe!==void 0?G(te):w.add(te):oe!==void 0&&w.has(te)?G(te):R.protectedKeys[te]=!0)}R.prevProp=L,R.prevResolvedValues=K,R.isActive&&(C={...C,...K}),r&&e.blockInitialAnimation&&(J=!1),J&&!H&&S.push(...$.map(te=>({animation:te,options:{type:M,...c}})))}if(w.size){const D={};w.forEach(M=>{const R=e.getBaseTarget(M);R!==void 0&&(D[M]=R)}),S.push({animation:D})}let P=Boolean(S.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(S):Promise.resolve()}function s(c,d,p){var g;if(n[c].isActive===d)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(w=>{var C;return(C=w.animationState)===null||C===void 0?void 0:C.setActive(c,d)}),n[c].isActive=d;const S=o(p,c);for(const w in n)n[w].protectedKeys={};return S}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n}}function She(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fz(t,e):!1}function vv(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xhe(){return{animate:vv(!0),whileInView:vv(),whileHover:vv(),whileTap:vv(),whileDrag:vv(),whileFocus:vv(),exit:vv()}}class whe extends kp{constructor(t){super(t),t.animationState||(t.animationState=bhe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),fC(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 Che=0;class Ehe extends kp{constructor(){super(...arguments),this.id=Che++}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 a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const _he={animation:{Feature:whe},exit:{Feature:Ehe}},Kz=(e,t)=>Math.abs(e-t);function The(e,t){const n=Kz(e.x,t.x),r=Kz(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xz{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 d=iP(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=The(d.offset,{x:0,y:0})>=3;if(!p&&!g)return;const{point:S}=d,{timestamp:w}=oh;this.history.push({...S,timestamp:w});const{onStart:C,onMove:k}=this.handlers;p||(C&&C(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=rP(p,this.transformPagePoint),vs.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:g,onSessionEnd:S}=this.handlers,w=iP(d.type==="pointercancel"?this.lastMoveEventInfo:rP(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,w),S&&S(d,w)},!iz(t))return;this.handlers=n,this.transformPagePoint=r;const i=SC(t),a=rP(i,this.transformPagePoint),{point:o}=a,{timestamp:s}=oh;this.history=[{...o,timestamp:s}];const{onSessionStart:c}=n;c&&c(t,iP(a,this.history)),this.removeListeners=Tp(ah(window,"pointermove",this.handlePointerMove),ah(window,"pointerup",this.handlePointerUp),ah(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Pp.update(this.updatePoint)}}function rP(e,t){return t?{point:t(e.point)}:e}function Qz(e,t){return{x:e.x-t.x,y:e.y-t.y}}function iP({point:e},t){return{point:e,delta:Qz(e,Zz(t)),offset:Qz(e,khe(t)),velocity:Phe(t,.1)}}function khe(e){return e[0]}function Zz(e){return e[e.length-1]}function Phe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>_C(t)));)n--;if(!r)return{x:0,y:0};const a=(i.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Jl(e){return e.max-e.min}function aP(e,t=0,n=.01){return Math.abs(e-t)<=n}function Jz(e,t,n,r=.5){e.origin=r,e.originPoint=ca(t.min,t.max,e.origin),e.scale=Jl(n)/Jl(t),(aP(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ca(n.min,n.max,e.origin)-e.originPoint,(aP(e.translate)||isNaN(e.translate))&&(e.translate=0)}function nS(e,t,n,r){Jz(e.x,t.x,n.x,r?r.originX:void 0),Jz(e.y,t.y,n.y,r?r.originY:void 0)}function $z(e,t,n){e.min=n.min+t.min,e.max=e.min+Jl(t)}function Ahe(e,t,n){$z(e.x,t.x,n.x),$z(e.y,t.y,n.y)}function e9(e,t,n){e.min=t.min-n.min,e.max=e.min+Jl(t)}function rS(e,t,n){e9(e.x,t.x,n.x),e9(e.y,t.y,n.y)}function Ohe(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ca(n,e,r.max):Math.min(e,n)),e}function t9(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 Dhe(e,{top:t,left:n,bottom:r,right:i}){return{x:t9(e.x,n,i),y:t9(e.y,t,r)}}function n9(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=eS(t.min,t.max-r,e.min):r>i&&(n=eS(e.min,e.max-i,t.min)),j0(0,1,n)}function Ihe(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 oP=.35;function Rhe(e=oP){return e===!1?e=0:e===!0&&(e=oP),{x:r9(e,"left","right"),y:r9(e,"top","bottom")}}function r9(e,t,n){return{min:i9(e,t),max:i9(e,n)}}function i9(e,t){return typeof e=="number"?e:e[t]||0}const a9=()=>({translate:0,scale:1,origin:0,originPoint:0}),iS=()=>({x:a9(),y:a9()}),o9=()=>({min:0,max:0}),Ja=()=>({x:o9(),y:o9()});function Nd(e){return[e("x"),e("y")]}function s9({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Nhe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Lhe(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 sP(e){return e===void 0||e===1}function lP({scale:e,scaleX:t,scaleY:n}){return!sP(e)||!sP(t)||!sP(n)}function gv(e){return lP(e)||l9(e)||e.z||e.rotate||e.rotateX||e.rotateY}function l9(e){return u9(e.x)||u9(e.y)}function u9(e){return e&&e!=="0%"}function PC(e,t,n){const r=e-n,i=t*r;return n+i}function c9(e,t,n,r,i){return i!==void 0&&(e=PC(e,i,r)),PC(e,n,r)+t}function uP(e,t=0,n=1,r,i){e.min=c9(e.min,t,n,r,i),e.max=c9(e.max,t,n,r,i)}function d9(e,{x:t,y:n}){uP(e.x,t.translate,t.scale,t.originPoint),uP(e.y,n.translate,n.scale,n.originPoint)}function zhe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Op(e,t){e.min=e.min+t,e.max=e.max+t}function h9(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,o=ca(e.min,e.max,a);uP(e,t[n],t[r],o,t.scale)}const Bhe=["x","scaleX","originX"],Fhe=["y","scaleY","originY"];function N0(e,t){h9(e.x,t,Bhe),h9(e.y,t,Fhe)}function p9(e,t){return s9(Lhe(e.getBoundingClientRect(),t))}function Uhe(e,t,n){const r=p9(e,n),{scroll:i}=t;return i&&(Op(r.x,i.offset.x),Op(r.y,i.offset.y)),r}const Hhe=new WeakMap;class Vhe{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=Ja(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(SC(c,"page").point)},a=(c,d)=>{const{drag:p,dragPropagation:g,onDragStart:S}=this.getProps();if(p&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=lz(p),!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),Nd(C=>{let k=this.getAxisMotionValue(C).get()||0;if(Rd.test(k)){const{projection:P}=this.visualElement;if(P&&P.layout){const D=P.layout.layoutBox[C];D&&(k=Jl(D)*(parseFloat(k)/100))}}this.originPoint[C]=k}),S&&S(c,d);const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:S,onDrag:w}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:C}=d;if(g&&this.currentDirection===null){this.currentDirection=Ghe(C),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",d.point,C),this.updateAxis("y",d.point,C),this.visualElement.render(),w&&w(c,d)},s=(c,d)=>this.stop(c,d);this.panSession=new Xz(t,{onSessionStart:i,onStart:a,onMove:o,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:a}=this.getProps();a&&a(t,n)}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!AC(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Ohe(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&M0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Dhe(r.layoutBox,t):this.constraints=!1,this.elastic=Rhe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Nd(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=Ihe(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!M0(t))return!1;const r=t.current;Lc(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Uhe(r,i.root,this.visualElement.getTransformPagePoint());let o=Mhe(i.layout.layoutBox,a);if(n){const s=n(Nhe(o));this.hasMutatedConstraints=!!s,s&&(o=s9(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},d=Nd(p=>{if(!AC(p,n,this.currentDirection))return;let g=c&&c[p]||{};o&&(g={min:0,max:0});const S=i?200:1e6,w=i?40:1e7,C={type:"inertia",velocity:r?t[p]:0,bounceStiffness:S,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...a,...g};return this.startAxisValueAnimation(p,C)});return Promise.all(d).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(tP(t,r,0,n))}stopAnimation(){Nd(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){Nd(n=>{const{drag:r}=this.getProps();if(!AC(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-ca(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!M0(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Nd(o=>{const s=this.getAxisMotionValue(o);if(s){const c=s.get();i[o]=jhe({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Nd(o=>{if(!AC(o,t,null))return;const s=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];s.set(ca(c,d,i[o]))})}addListeners(){if(!this.visualElement.current)return;Hhe.set(this.visualElement,this);const t=this.visualElement.current,n=ah(t,"pointerdown",c=>{const{drag:d,dragListener:p=!0}=this.getProps();d&&p&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();M0(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const o=ih(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Nd(p=>{const g=this.getAxisMotionValue(p);g&&(this.originPoint[p]+=c[p].translate,g.set(g.get()+c[p].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=oP,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function AC(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ghe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Whe extends kp{constructor(t){super(t),this.removeGroupControls=Fu,this.removeListeners=Fu,this.controls=new Vhe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Fu}unmount(){this.removeGroupControls(),this.removeListeners()}}class qhe extends kp{constructor(){super(...arguments),this.removePointerDownListener=Fu}onPointerDown(t){this.session=new Xz(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:(a,o)=>{delete this.session,i&&i(a,o)}}}mount(){this.removePointerDownListener=ah(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 m9(){const e=A.useContext(U1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=A.useId();return A.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Yhe(){return Khe(A.useContext(U1))}function Khe(e){return e===null?!0:e.isPresent}function v9(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const aS={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Pn.test(e))e=parseFloat(e);else return e;const n=v9(e,t.target.x),r=v9(e,t.target.y);return`${n}% ${r}%`}},g9=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Xhe(e){const t=g9.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const Qhe=4;function cP(e,t,n=1){Lc(n<=Qhe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=Xhe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);return a?a.trim():g5(i)?cP(i,t,n+1):i}function Zhe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!g5(a))return;const o=cP(a,r);o&&i.set(o)});for(const i in t){const a=t[i];if(!g5(a))continue;const o=cP(a,r);o&&(t[i]=o,n&&n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const y9="_$css",Jhe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),a=[];i&&(e=e.replace(g9,w=>(a.push(w),y9)));const o=Ap.parse(e);if(o.length>5)return r;const s=Ap.createTransformer(e),c=typeof o[0]!="number"?1:0,d=n.x.scale*t.x,p=n.y.scale*t.y;o[0+c]/=d,o[1+c]/=p;const g=ca(d,p,.5);typeof o[2+c]=="number"&&(o[2+c]/=g),typeof o[3+c]=="number"&&(o[3+c]/=g);let S=s(o);if(i){let w=0;S=S.replace(y9,()=>{const C=a[w];return w++,C})}return S}};class $he extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;rde(epe),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),G1.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||vs.postRender(()=>{const s=o.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 b9(e){const[t,n]=m9(),r=A.useContext(m5);return A.createElement($he,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(H8),isPresent:t,safeToRemove:n})}const epe={borderRadius:{...aS,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:aS,borderTopRightRadius:aS,borderBottomLeftRadius:aS,borderBottomRightRadius:aS,boxShadow:Jhe};function tpe(e,t,n={}){const r=yl(e)?e:I0(e);return r.start(tP("",r,t,n)),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const S9=["TopLeft","TopRight","BottomLeft","BottomRight"],npe=S9.length,x9=e=>typeof e=="string"?parseFloat(e):e,w9=e=>typeof e=="number"||Pn.test(e);function rpe(e,t,n,r,i,a){i?(e.opacity=ca(0,n.opacity!==void 0?n.opacity:1,ipe(r)),e.opacityExit=ca(t.opacity!==void 0?t.opacity:1,0,ape(r))):a&&(e.opacity=ca(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(eS(e,t,r))}function _9(e,t){e.min=t.min,e.max=t.max}function Uu(e,t){_9(e.x,t.x),_9(e.y,t.y)}function T9(e,t,n,r,i){return e-=t,e=PC(e,1/n,r),i!==void 0&&(e=PC(e,1/i,r)),e}function ope(e,t=0,n=1,r=.5,i,a=e,o=e){if(Rd.test(t)&&(t=parseFloat(t),t=ca(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=ca(a.min,a.max,r);e===a&&(s-=t),e.min=T9(e.min,t,n,s,i),e.max=T9(e.max,t,n,s,i)}function k9(e,t,[n,r,i],a,o){ope(e,t[n],t[r],t[i],t.scale,a,o)}const spe=["x","scaleX","originX"],lpe=["y","scaleY","originY"];function P9(e,t,n,r){k9(e.x,t,spe,n?n.x:void 0,r?r.x:void 0),k9(e.y,t,lpe,n?n.y:void 0,r?r.y:void 0)}function A9(e){return e.translate===0&&e.scale===1}function O9(e){return A9(e.x)&&A9(e.y)}function dP(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 D9(e){return Jl(e.x)/Jl(e.y)}class upe{constructor(){this.members=[]}add(t){M5(this.members,t),t.scheduleRender()}remove(t){if(j5(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 a=this.members[i];if(a.isPresent!==!1){r=a;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 M9(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:c,rotateX:d,rotateY:p}=n;c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `)}const o=e.x.scale*t.x,s=e.y.scale*t.y;return(o!==1||s!==1)&&(r+=`scale(${o}, ${s})`),r||"none"}const cpe=(e,t)=>e.depth-t.depth;class dpe{constructor(){this.children=[],this.isDirty=!1}add(t){M5(this.children,t),this.isDirty=!0}remove(t){j5(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cpe),this.isDirty=!1,this.children.forEach(t)}}function fpe(e){window.MotionDebug&&window.MotionDebug.record(e)}const j9=["","X","Y","Z"],I9=1e3;let hpe=0;const yv={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function R9({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o,s={},c=t==null?void 0:t()){this.id=hpe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{yv.totalNodes=yv.resolvedTargetDeltas=yv.recalculatedProjection=0,this.nodes.forEach(vpe),this.nodes.forEach(Spe),this.nodes.forEach(xpe),this.nodes.forEach(gpe),fpe(yv)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=s,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 d=0;dthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,g&&g(),g=Vz(S,250),G1.hasAnimatedSinceResize&&(G1.hasAnimatedSinceResize=!1,this.nodes.forEach(L9))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&p&&(c||d)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:S,hasRelativeTargetChanged:w,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||p.getDefaultTransition()||Tpe,{onLayoutAnimationStart:P,onLayoutAnimationComplete:D}=p.getProps(),M=!this.targetLayout||!dP(this.targetLayout,C)||w,R=!S&&w;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||S&&(M||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(g,R);const L={...qz(k,"layout"),onPlay:P,onComplete:D};(p.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!S&&this.animationProgress===0&&L9(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}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,Pp.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(wpe),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 p=0;p{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 z=L/1e3;z9(g.x,o.x,z),z9(g.y,o.y,z),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rS(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Epe(this.relativeTarget,this.relativeTargetOrigin,S,z),R&&dP(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Ja()),Uu(R,this.relativeTarget)),k&&(this.animationValues=p,rpe(p,d,this.latestValues,z,M,D)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=z},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&&(Pp.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vs.update(()=>{G1.hasAnimatedSinceResize=!0,this.currentAnimation=tpe(0,I9,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},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(I9),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:c,layout:d,latestValues:p}=o;if(!(!s||!c||!d)){if(this!==o&&this.layout&&d&&U9(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||Ja();const g=Jl(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+g;const S=Jl(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+S}Uu(s,c),N0(s,p),nS(this.projectionDeltaWithTransform,this.layoutCorrected,s,p)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new upe),this.sharedNodes.get(o).add(s);const d=s.options.initialPromotionConfig;s.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(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:s,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(s=!0),!s)return;const d={};for(let p=0;p{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(N9),this.root.sharedNodes.clear()}}}function ppe(e){e.updateLayout()}function mpe(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:a}=e.options,o=n.source!==e.layout.source;a==="size"?Nd(g=>{const S=o?n.measuredBox[g]:n.layoutBox[g],w=Jl(S);S.min=r[g].min,S.max=S.min+w}):U9(a,n.layoutBox,r)&&Nd(g=>{const S=o?n.measuredBox[g]:n.layoutBox[g],w=Jl(r[g]);S.max=S.min+w});const s=iS();nS(s,r,n.layoutBox);const c=iS();o?nS(c,e.applyTransform(i,!0),n.measuredBox):nS(c,r,n.layoutBox);const d=!O9(s);let p=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:S,layout:w}=g;if(S&&w){const C=Ja();rS(C,n.layoutBox,S.layoutBox);const k=Ja();rS(k,r,w.layoutBox),dP(C,k)||(p=!0),g.options.layoutRoot&&(e.relativeTarget=k,e.relativeTargetOrigin=C,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:s,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vpe(e){yv.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function gpe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ype(e){e.clearSnapshot()}function N9(e){e.clearMeasurements()}function bpe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function L9(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Spe(e){e.resolveTargetDelta()}function xpe(e){e.calcProjection()}function wpe(e){e.resetRotation()}function Cpe(e){e.removeLeadSnapshot()}function z9(e,t,n){e.translate=ca(t.translate,0,n),e.scale=ca(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function B9(e,t,n,r){e.min=ca(t.min,n.min,r),e.max=ca(t.max,n.max,r)}function Epe(e,t,n,r){B9(e.x,t.x,n.x,r),B9(e.y,t.y,n.y,r)}function _pe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Tpe={duration:.45,ease:[.4,0,.1,1]};function kpe(e,t){let n=e.root;for(let a=e.path.length-1;a>=0;a--)if(Boolean(e.path[a].instance)){n=e.path[a];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function F9(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Ppe(e){F9(e.x),F9(e.y)}function U9(e,t,n){return e==="position"||e==="preserve-aspect"&&!aP(D9(t),D9(n),.2)}const Ape=R9({attachResizeListener:(e,t)=>ih(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fP={current:void 0},H9=R9({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fP.current){const e=new Ape(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),fP.current=e}return fP.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ope={pan:{Feature:qhe},drag:{Feature:Whe,ProjectionNode:H9,MeasureLayout:b9}},Dpe=new Set(["width","height","top","left","right","bottom","x","y"]),V9=e=>Dpe.has(e),Mpe=e=>Object.keys(e).some(V9),OC=e=>e===pv||e===Pn,G9=(e,t)=>parseFloat(e.split(", ")[t]),W9=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return G9(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?G9(a[1],e):0}},jpe=new Set(["x","y","z"]),Ipe=mC.filter(e=>!jpe.has(e));function Rpe(e){const t=[];return Ipe.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 q9={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:W9(4,13),y:W9(5,14)},Npe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:o}=a,s={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(d=>{s[d]=q9[d](r,a)}),t.render();const c=t.measureViewportBox();return n.forEach(d=>{const p=t.getValue(d);p&&p.jump(s[d]),e[d]=q9[d](c,a)}),e},Lpe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(V9);let a=[],o=!1;const s=[];if(i.forEach(c=>{const d=e.getValue(c);if(!e.hasValue(c))return;let p=n[c],g=J1(p);const S=t[c];let w;if(yC(S)){const C=S.length,k=S[0]===null?1:0;p=S[k],g=J1(p);for(let P=k;P=0?window.pageYOffset:null,d=Npe(t,e,s);return a.length&&a.forEach(([p,g])=>{e.getValue(p).set(g)}),e.render(),cC&&c!==null&&window.scrollTo({top:c}),{target:d,transitionEnd:r}}else return{target:t,transitionEnd:r}};function zpe(e,t,n,r){return Mpe(t)?Lpe(e,t,n,r):{target:t,transitionEnd:r}}const Bpe=(e,t,n,r)=>{const i=Zhe(e,t,r);return t=i.target,r=i.transitionEnd,zpe(e,t,n,r)},hP={current:null},Y9={current:!1};function Fpe(){if(Y9.current=!0,!!cC)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hP.current=e.matches;e.addListener(t),t()}else hP.current=!1}const K9=new Set;function pP(e,t,n){e||K9.has(t)||(console.warn(t),n&&console.warn(n),K9.add(t))}function Upe(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],o=n[i];if(yl(a))e.addValue(i,a),EC(r)&&r.add(i),process.env.NODE_ENV==="development"&&pP(a.version==="9.1.7",`Attempting to mix Framer Motion versions ${a.version} with 9.1.7 may not work as expected.`);else if(yl(o))e.addValue(i,I0(a,{owner:e})),EC(r)&&r.remove(i);else if(o!==a)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(a)}else{const s=e.getStaticValue(i);e.addValue(i,I0(s!==void 0?s:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const X9=Object.keys(V1),Hpe=X9.length,Q9=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Vpe=h5.length;class Gpe{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},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=()=>vs.render(this.render,!1,!0);const{latestValues:s,renderState:c}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=hC(n),this.isVariantNode=B8(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{});for(const g in p){const S=p[g];s[g]!==void 0&&yl(S)&&(S.set(s[g],!1),EC(d)&&d.add(g))}}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)),Y9.current||Fpe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:hP.current,process.env.NODE_ENV!=="production"&&pP(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Pp.update(this.notifyUpdate),Pp.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=hv.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&vs.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a,o){let s,c;if(process.env.NODE_ENV!=="production"&&i&&r){const d="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?$1(!1,d):Lc(!1,d)}for(let d=0;dthis.scheduleRender(),animationType:typeof p=="string"?p:"both",initialPromotionConfig:o,layoutScroll:w,layoutRoot:C})}return c}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):Ja()}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=I0(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=_5(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!yl(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new I5),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Z9 extends Gpe{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},a){let o=mfe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),o&&(o=i(o))),a){hfe(this,r,o);const s=Bpe(this,r,o,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Wpe(e){return window.getComputedStyle(e)}class qpe extends Z9{readValueFromInstance(t,n){if(hv.has(n)){const r=F5(n);return r&&r.default||0}else{const r=Wpe(t),i=(W8(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return p9(t,n)}build(t,n,r,i){b5(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return E5(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;yl(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){$8(t,n,r,i)}}class Ype extends Z9{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hv.has(n)){const r=F5(n);return r&&r.default||0}return n=ez.has(n)?n:C5(n),t.getAttribute(n)}measureInstanceViewportBox(){return Ja()}scrapeMotionValuesFromProps(t,n){return nz(t,n)}build(t,n,r,i){x5(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){tz(t,n,r,i)}mount(t){this.isSVGTag=w5(t.tagName),super.mount(t)}}const Kpe=(e,t)=>v5(e)?new Ype(t,{enableHardwareAcceleration:!1}):new qpe(t,{enableHardwareAcceleration:!0}),Xpe={..._he,...Hde,...Ope,...{layout:{ProjectionNode:H9,MeasureLayout:b9}}},Ld=tde((e,t)=>Ade(e,t,Xpe,Kpe));function J9(){const e=A.useRef(!1);return dC(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Qpe(){const e=J9(),[t,n]=A.useState(0),r=A.useCallback(()=>{e.current&&n(t+1)},[t]);return[A.useCallback(()=>vs.postRender(r),[r]),t]}class Zpe extends gt.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 Jpe({children:e,isPresent:t}){const n=A.useId(),r=A.useRef(null),i=A.useRef({width:0,height:0,top:0,left:0});return A.useInsertionEffect(()=>{const{width:a,height:o,top:s,left:c}=i.current;if(t||!r.current||!a||!o)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${a}px !important; height: ${o}px !important; top: ${s}px !important; left: ${c}px !important; } `),()=>{document.head.removeChild(d)}},[t]),gt.createElement(Zpe,{isPresent:t,childRef:r,sizeRef:i},gt.cloneElement(e,{ref:r}))}const mP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=p5($pe),c=A.useId(),d=A.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:p=>{s.set(p,!0);for(const g of s.values())if(!g)return;r&&r()},register:p=>(s.set(p,!1),()=>s.delete(p))}),a?void 0:[n]);return A.useMemo(()=>{s.forEach((p,g)=>s.set(g,!1))},[n]),gt.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o==="popLayout"&&(e=gt.createElement(Jpe,{isPresent:n},e)),gt.createElement(U1.Provider,{value:d},e)};function $pe(){return new Map}function eme(e){return A.useEffect(()=>()=>e(),[])}const L0=e=>e.key||"";function tme(e,t){e.forEach(n=>{const r=L0(n);t.set(r,n)})}function nme(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const bv=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{i&&(o="wait",process.env.NODE_ENV!=="production"&&pP(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Qpe();const c=A.useContext(m5).forceRender;c&&(s=c);const d=J9(),p=nme(e);let g=p;const S=new Set,w=A.useRef(g),C=A.useRef(new Map).current,k=A.useRef(!0);if(dC(()=>{k.current=!1,tme(p,C),w.current=g}),eme(()=>{k.current=!0,C.clear(),S.clear()}),k.current)return gt.createElement(gt.Fragment,null,g.map(R=>gt.createElement(mP,{key:L0(R),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:a,mode:o},R)));g=[...g];const P=w.current.map(L0),D=p.map(L0),M=P.length;for(let R=0;R{if(D.indexOf(R)!==-1)return;const L=C.get(R);if(!L)return;const z=P.indexOf(R),U=()=>{C.delete(R),S.delete(R);const H=w.current.findIndex(q=>q.key===R);if(w.current.splice(H,1),!S.size){if(w.current=p,d.current===!1)return;s(),r&&r()}};g.splice(z,0,gt.createElement(mP,{key:L0(L),isPresent:!1,onExitComplete:U,custom:t,presenceAffectsLayout:a,mode:o},L))}),g=g.map(R=>{const L=R.key;return S.has(L)?R:gt.createElement(mP,{key:L0(R),isPresent:!0,presenceAffectsLayout:a,mode:o},R)}),process.env.NODE_ENV!=="production"&&o==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),gt.createElement(gt.Fragment,null,S.size?g:g.map(R=>A.cloneElement(R)))};var rme={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},$9=A.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:a=!1,position:o="bottom",duration:s=5e3,containerStyle:c,motionVariants:d=rme,toastSpacing:p="0.5rem"}=e,[g,S]=A.useState(s),w=Yhe();rh(()=>{w||r==null||r()},[w]),rh(()=>{S(s)},[s]);const C=()=>S(null),k=()=>S(s),P=()=>{w&&i()};A.useEffect(()=>{w&&a&&i()},[w,a,i]),Vce(P,g);const D=A.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:p,...c}),[c,p]),M=A.useMemo(()=>Uce(o),[o]);return v.jsx(Ld.li,{layout:!0,className:"chakra-toast",variants:d,initial:"initial",animate:"animate",exit:"exit",onHoverStart:C,onHoverEnd:k,custom:{position:o},style:M,children:v.jsx(ct.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:D,children:Nu(n,{id:t,onClose:P})})})});$9.displayName="ToastComponent";function ime(e,t){var n;const r=e??"bottom",a={"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=a==null?void 0:a[t])!=null?n:r}var e7={path:v.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[v.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"}),v.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"}),v.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},da=_t((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:a=!1,children:o,className:s,__css:c,...d}=e,p=cn("chakra-icon",s),g=Bu("Icon",e),S={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...c,...g},w={ref:t,focusable:a,className:p,__css:S},C=r??e7.viewBox;if(n&&typeof n!="string")return v.jsx(ct.svg,{as:n,...w,...d});const k=o??e7.path;return v.jsx(ct.svg,{verticalAlign:"middle",viewBox:C,...w,...d,children:k})});da.displayName="Icon";function vP(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,a=A.Children.toArray(e.path),o=_t((s,c)=>v.jsx(da,{ref:c,viewBox:t,...i,...s,children:a.length?a:v.jsx("path",{fill:"currentColor",d:n})}));return o.displayName=r,o}function ame(e){return v.jsx(da,{viewBox:"0 0 24 24",...e,children:v.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 ome(e){return v.jsx(da,{viewBox:"0 0 24 24",...e,children:v.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 t7(e){return v.jsx(da,{viewBox:"0 0 24 24",...e,children:v.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 sme=bp({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),z0=_t((e,t)=>{const n=Bu("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:a="0.45s",emptyColor:o="transparent",className:s,...c}=Si(e),d=cn("chakra-spinner",s),p={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:o,borderLeftColor:o,animation:`${sme} ${a} linear infinite`,...n};return v.jsx(ct.div,{ref:t,__css:p,className:d,...c,children:r&&v.jsx(ct.span,{srOnly:!0,children:r})})});z0.displayName="Spinner";var[lme,ume]=Kr({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[cme,gP]=Kr({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),n7={info:{icon:ome,colorScheme:"blue"},warning:{icon:t7,colorScheme:"orange"},success:{icon:ame,colorScheme:"green"},error:{icon:t7,colorScheme:"red"},loading:{icon:z0,colorScheme:"blue"}};function dme(e){return n7[e].colorScheme}function fme(e){return n7[e].icon}var r7=_t(function(t,n){const i={display:"inline",...gP().description};return v.jsx(ct.div,{ref:n,...t,className:cn("chakra-alert__desc",t.className),__css:i})});r7.displayName="AlertDescription";function i7(e){const{status:t}=ume(),n=fme(t),r=gP(),i=t==="loading"?r.spinner:r.icon;return v.jsx(ct.span,{display:"inherit",...e,className:cn("chakra-alert__icon",e.className),__css:i,children:e.children||v.jsx(n,{h:"100%",w:"100%"})})}i7.displayName="AlertIcon";var a7=_t(function(t,n){const r=gP();return v.jsx(ct.div,{ref:n,...t,className:cn("chakra-alert__title",t.className),__css:r.title})});a7.displayName="AlertTitle";var o7=_t(function(t,n){var r;const{status:i="info",addRole:a=!0,...o}=Si(t),s=(r=t.colorScheme)!=null?r:dme(i),c=Xo("Alert",{...t,colorScheme:s}),d={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...c.container};return v.jsx(lme,{value:{status:i},children:v.jsx(cme,{value:c,children:v.jsx(ct.div,{role:a?"alert":void 0,ref:n,...o,className:cn("chakra-alert",t.className),__css:d})})})});o7.displayName="Alert";function hme(e){return v.jsx(da,{focusable:"false","aria-hidden":!0,...e,children:v.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 yP=_t(function(t,n){const r=Bu("CloseButton",t),{children:i,isDisabled:a,__css:o,...s}=Si(t),c={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return v.jsx(ct.button,{type:"button","aria-label":"Close",ref:n,disabled:a,__css:{...c,...r,...o},...s,children:i||v.jsx(hme,{width:"1em",height:"1em"})})});yP.displayName="CloseButton";var pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},zd=mme(pme);function mme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(a=>a())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,a)=>{r(o=>({...o,[a]:o[a].filter(s=>s.id!=i)}))},notify:(i,a)=>{const o=vme(i,a),{position:s,id:c}=o;return r(d=>{var p,g;const w=s.includes("top")?[o,...(p=d[s])!=null?p:[]]:[...(g=d[s])!=null?g:[],o];return{...d,[s]:w}}),c},update:(i,a)=>{i&&r(o=>{const s={...o},{position:c,index:d}=R8(s,i);return c&&d!==-1&&(s[c][d]={...s[c][d],...a,message:l7(a)}),s})},closeAll:({positions:i}={})=>{r(a=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((c,d)=>(c[d]=a[d].map(p=>({...p,requestClose:!0})),c),{...a}))},close:i=>{r(a=>{const o=N8(a,i);return o?{...a,[o]:a[o].map(s=>s.id==i?{...s,requestClose:!0}:s)}:a})},isActive:i=>Boolean(R8(zd.getState(),i).position)}}var s7=0;function vme(e,t={}){var n,r;s7+=1;const i=(n=t.id)!=null?n:s7,a=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:a,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>zd.removeToast(String(i),a),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var gme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:a,onClose:o,description:s,icon:c}=e,d=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return v.jsxs(o7,{addRole:!1,status:t,variant:n,id:d==null?void 0:d.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",children:[v.jsx(i7,{children:c}),v.jsxs(ct.div,{flex:"1",maxWidth:"100%",children:[i&&v.jsx(a7,{id:d==null?void 0:d.title,children:i}),s&&v.jsx(r7,{id:d==null?void 0:d.description,display:"block",children:s})]}),a&&v.jsx(yP,{size:"sm",onClick:o,position:"absolute",insetEnd:1,top:1})]})};function l7(e={}){const{render:t,toastComponent:n=gme}=e;return i=>typeof t=="function"?t({...i,...e}):v.jsx(n,{...i,...e})}function yme(e,t){const n=i=>{var a;return{...t,...i,position:ime((a=i==null?void 0:i.position)!=null?a:t==null?void 0:t.position,e)}},r=i=>{const a=n(i),o=l7(a);return zd.notify(o,a)};return r.update=(i,a)=>{zd.update(i,n(a))},r.promise=(i,a)=>{const o=r({...a.loading,status:"loading",duration:null});i.then(s=>r.update(o,{status:"success",duration:5e3,...Nu(a.success,s)})).catch(s=>r.update(o,{status:"error",duration:5e3,...Nu(a.error,s)}))},r.closeAll=zd.closeAll,r.close=zd.close,r.isActive=zd.isActive,r}var[bme,Sme]=Kr({name:"ToastOptionsContext",strict:!1}),xme=e=>{const t=A.useSyncExternalStore(zd.subscribe,zd.getState,zd.getState),{motionVariants:n,component:r=$9,portalProps:i}=e,o=Object.keys(t).map(s=>{const c=t[s];return v.jsx("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${s}`,style:Hce(s),children:v.jsx(bv,{initial:!1,children:c.map(d=>v.jsx(r,{motionVariants:n,...d},d.id))})},s)});return v.jsx(ov,{...i,children:o})};function oS(e){const{theme:t}=cL(),n=Sme();return A.useMemo(()=>yme(t.direction,{...n,...e}),[e,t.direction,n])}var wme=e=>function({children:n,theme:r=e,toastOptions:i,...a}){return v.jsxs(Bce,{theme:r,...a,children:[v.jsx(bme,{value:i==null?void 0:i.defaultOptions,children:n}),v.jsx(xme,{...i})]})},Cme=wme(b8),Eme=Object.defineProperty,_me=(e,t,n)=>t in e?Eme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t,n)=>(_me(e,typeof t!="symbol"?t+"":t,n),n);function u7(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 Tme=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function c7(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function d7(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var bP=typeof window<"u"?A.useLayoutEffect:A.useEffect,DC=e=>e,kme=class{constructor(){Aa(this,"descendants",new Map),Aa(this,"register",e=>{if(e!=null)return Tme(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Aa(this,"unregister",e=>{this.descendants.delete(e);const t=u7(Array.from(this.descendants.keys()));this.assignIndex(t)}),Aa(this,"destroy",()=>{this.descendants.clear()}),Aa(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Aa(this,"count",()=>this.descendants.size),Aa(this,"enabledCount",()=>this.enabledValues().length),Aa(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Aa(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Aa(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Aa(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Aa(this,"first",()=>this.item(0)),Aa(this,"firstEnabled",()=>this.enabledItem(0)),Aa(this,"last",()=>this.item(this.descendants.size-1)),Aa(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Aa(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Aa(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Aa(this,"next",(e,t=!0)=>{const n=c7(e,this.count(),t);return this.item(n)}),Aa(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=c7(r,this.enabledCount(),t);return this.enabledItem(i)}),Aa(this,"prev",(e,t=!0)=>{const n=d7(e,this.count()-1,t);return this.item(n)}),Aa(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=d7(r,this.enabledCount()-1,t);return this.enabledItem(i)}),Aa(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=u7(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 Pme(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 ti(...e){return t=>{e.forEach(n=>{Pme(n,t)})}}function Ame(...e){return A.useMemo(()=>ti(...e),e)}function Ome(){const e=A.useRef(new kme);return bP(()=>()=>e.current.destroy()),e.current}var[Dme,f7]=Kr({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Mme(e){const t=f7(),[n,r]=A.useState(-1),i=A.useRef(null);bP(()=>()=>{i.current&&t.unregister(i.current)},[]),bP(()=>{if(!i.current)return;const o=Number(i.current.dataset.index);n!=o&&!Number.isNaN(o)&&r(o)});const a=DC(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:ti(a,i)}}function SP(){return[DC(Dme),()=>DC(f7()),()=>Ome(),i=>Mme(i)]}var[jme,MC]=Kr({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Ime,xP]=Kr({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Rme,MIe,Nme,Lme]=SP(),B0=_t(function(t,n){const{getButtonProps:r}=xP(),i=r(t,n),o={display:"flex",alignItems:"center",width:"100%",outline:0,...MC().button};return v.jsx(ct.button,{...i,className:cn("chakra-accordion__button",t.className),__css:o})});B0.displayName="AccordionButton";function wP(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(S,w)=>S!==w}=e,a=Ra(r),o=Ra(i),[s,c]=A.useState(n),d=t!==void 0,p=d?t:s,g=Ra(S=>{const C=typeof S=="function"?S(p):S;o(p,C)&&(d||c(C),a(C))},[d,a,p,o]);return[p,g]}function zme(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:a,...o}=e;Ume(e),Hme(e);const s=Nme(),[c,d]=A.useState(-1);A.useEffect(()=>()=>{d(-1)},[]);const[p,g]=wP({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:p,setIndex:g,htmlProps:o,getAccordionItemProps:w=>{let C=!1;return w!==null&&(C=Array.isArray(p)?p.includes(w):p===w),{isOpen:C,onChange:P=>{if(w!==null)if(i&&Array.isArray(p)){const D=P?p.concat(w):p.filter(M=>M!==w);g(D)}else P?g(w):a&&g(-1)}}},focusedIndex:c,setFocusedIndex:d,descendants:s}}var[Bme,CP]=Kr({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Fme(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:a,setFocusedIndex:o}=CP(),s=A.useRef(null),c=A.useId(),d=r??c,p=`accordion-button-${d}`,g=`accordion-panel-${d}`;Vme(e);const{register:S,index:w,descendants:C}=Lme({disabled:t&&!n}),{isOpen:k,onChange:P}=a(w===-1?null:w);Gme({isOpen:k,isDisabled:t});const D=()=>{P==null||P(!0)},M=()=>{P==null||P(!1)},R=A.useCallback(()=>{P==null||P(!k),o(w)},[w,o,k,P]),L=A.useCallback(q=>{const $={ArrowDown:()=>{const K=C.nextEnabled(w);K==null||K.node.focus()},ArrowUp:()=>{const K=C.prevEnabled(w);K==null||K.node.focus()},Home:()=>{const K=C.firstEnabled();K==null||K.node.focus()},End:()=>{const K=C.lastEnabled();K==null||K.node.focus()}}[q.key];$&&(q.preventDefault(),$(q))},[C,w]),z=A.useCallback(()=>{o(w)},[o,w]),U=A.useCallback(function(J={},$=null){return{...J,type:"button",ref:ti(S,s,$),id:p,disabled:!!t,"aria-expanded":!!k,"aria-controls":g,onClick:Zt(J.onClick,R),onFocus:Zt(J.onFocus,z),onKeyDown:Zt(J.onKeyDown,L)}},[p,t,k,R,z,L,g,S]),H=A.useCallback(function(J={},$=null){return{...J,ref:$,role:"region",id:g,"aria-labelledby":p,hidden:!k}},[p,k,g]);return{isOpen:k,isDisabled:t,isFocusable:n,onOpen:D,onClose:M,getButtonProps:U,getPanelProps:H,htmlProps:i}}function Ume(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;C1({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Hme(e){C1({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 Vme(e){C1({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 Gme(e){C1({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function F0(e){const{isOpen:t,isDisabled:n}=xP(),{reduceMotion:r}=CP(),i=cn("chakra-accordion__icon",e.className),a=MC(),o={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...a.icon};return v.jsx(da,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:o,...e,children:v.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}F0.displayName="AccordionIcon";var U0=_t(function(t,n){const{children:r,className:i}=t,{htmlProps:a,...o}=Fme(t),c={...MC().container,overflowAnchor:"none"},d=A.useMemo(()=>o,[o]);return v.jsx(Ime,{value:d,children:v.jsx(ct.div,{ref:n,...a,className:cn("chakra-accordion__item",i),__css:c,children:typeof r=="function"?r({isExpanded:!!o.isOpen,isDisabled:!!o.isDisabled}):r})})});U0.displayName="AccordionItem";var H0={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Sv={enter:{duration:.2,ease:H0.easeOut},exit:{duration:.1,ease:H0.easeIn}},sh={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})},Wme=e=>e!=null&&parseInt(e.toString(),10)>0,h7={exit:{height:{duration:.2,ease:H0.ease},opacity:{duration:.3,ease:H0.ease}},enter:{height:{duration:.3,ease:H0.ease},opacity:{duration:.4,ease:H0.ease}}},qme={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var a;return{...e&&{opacity:Wme(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(a=n==null?void 0:n.exit)!=null?a:sh.exit(h7.exit,i)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var a;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(a=n==null?void 0:n.enter)!=null?a:sh.enter(h7.enter,i)}}},p7=A.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:a=0,endingHeight:o="auto",style:s,className:c,transition:d,transitionEnd:p,...g}=e,[S,w]=A.useState(!1);A.useEffect(()=>{const M=setTimeout(()=>{w(!0)});return()=>clearTimeout(M)},[]),C1({condition:Boolean(a>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const C=parseFloat(a.toString())>0,k={startingHeight:a,endingHeight:o,animateOpacity:i,transition:S?d:{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"}}},P=r?n:!0,D=n||r?"enter":"exit";return v.jsx(bv,{initial:!1,custom:k,children:P&&v.jsx(Ld.div,{ref:t,...g,className:cn("chakra-collapse",c),style:{overflow:"hidden",display:"block",...s},custom:k,variants:qme,initial:r?"exit":!1,animate:D,exit:"exit"})})});p7.displayName="Collapse";var Yme={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:sh.enter(Sv.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:sh.exit(Sv.exit,n),transitionEnd:t==null?void 0:t.exit}}},m7={initial:"exit",animate:"enter",exit:"exit",variants:Yme},Kme=A.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:a,transition:o,transitionEnd:s,delay:c,...d}=t,p=i||r?"enter":"exit",g=r?i&&r:!0,S={transition:o,transitionEnd:s,delay:c};return v.jsx(bv,{custom:S,children:g&&v.jsx(Ld.div,{ref:n,className:cn("chakra-fade",a),custom:S,...m7,animate:p,...d})})});Kme.displayName="Fade";var Xme={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var a;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(a=n==null?void 0:n.exit)!=null?a:sh.exit(Sv.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:sh.enter(Sv.enter,n),transitionEnd:e==null?void 0:e.enter}}},v7={initial:"exit",animate:"enter",exit:"exit",variants:Xme},Qme=A.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:a=!0,initialScale:o=.95,className:s,transition:c,transitionEnd:d,delay:p,...g}=t,S=r?i&&r:!0,w=i||r?"enter":"exit",C={initialScale:o,reverse:a,transition:c,transitionEnd:d,delay:p};return v.jsx(bv,{custom:C,children:S&&v.jsx(Ld.div,{ref:n,className:cn("chakra-offset-slide",s),...v7,animate:w,custom:C,...g})})});Qme.displayName="ScaleFade";var Zme={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var a;return{opacity:0,x:e,y:t,transition:(a=n==null?void 0:n.exit)!=null?a:sh.exit(Sv.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:sh.enter(Sv.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:a})=>{var o;const s={x:t,y:e};return{opacity:0,transition:(o=n==null?void 0:n.exit)!=null?o:sh.exit(Sv.exit,a),...i?{...s,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...s,...r==null?void 0:r.exit}}}}},EP={initial:"initial",animate:"enter",exit:"exit",variants:Zme},Jme=A.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:a=!0,className:o,offsetX:s=0,offsetY:c=8,transition:d,transitionEnd:p,delay:g,...S}=t,w=r?i&&r:!0,C=i||r?"enter":"exit",k={offsetX:s,offsetY:c,reverse:a,transition:d,transitionEnd:p,delay:g};return v.jsx(bv,{custom:k,children:w&&v.jsx(Ld.div,{ref:n,className:cn("chakra-offset-slide",o),custom:k,...EP,animate:C,...S})})});Jme.displayName="SlideFade";var V0=_t(function(t,n){const{className:r,motionProps:i,...a}=t,{reduceMotion:o}=CP(),{getPanelProps:s,isOpen:c}=xP(),d=s(a,n),p=cn("chakra-accordion__panel",r),g=MC();o||delete d.hidden;const S=v.jsx(ct.div,{...d,__css:g.panel,className:p});return o?S:v.jsx(p7,{in:c,...i,children:S})});V0.displayName="AccordionPanel";var _P=_t(function({children:t,reduceMotion:n,...r},i){const a=Xo("Accordion",r),o=Si(r),{htmlProps:s,descendants:c,...d}=zme(o),p=A.useMemo(()=>({...d,reduceMotion:!!n}),[d,n]);return v.jsx(Rme,{value:c,children:v.jsx(Bme,{value:p,children:v.jsx(jme,{value:a,children:v.jsx(ct.div,{ref:i,...s,className:cn("chakra-accordion",r.className),__css:a.root,children:t})})})})});_P.displayName="Accordion";var TP=_t(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:a,...o}=t;return v.jsx("img",{width:r,height:i,ref:n,alt:a,...o})});TP.displayName="NativeImage";function $me(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:a,crossOrigin:o,sizes:s,ignoreFallback:c}=e,[d,p]=A.useState("pending");A.useEffect(()=>{p(n?"loading":"pending")},[n]);const g=A.useRef(),S=A.useCallback(()=>{if(!n)return;w();const C=new Image;C.src=n,o&&(C.crossOrigin=o),r&&(C.srcset=r),s&&(C.sizes=s),t&&(C.loading=t),C.onload=k=>{w(),p("loaded"),i==null||i(k)},C.onerror=k=>{w(),p("failed"),a==null||a(k)},g.current=C},[n,o,r,s,i,a,t]),w=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return Od(()=>{if(!c)return d==="loading"&&S(),()=>{w()}},[d,S,c]),c?"loaded":d}var eve=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function tve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var sS=_t(function(t,n){const{fallbackSrc:r,fallback:i,src:a,srcSet:o,align:s,fit:c,loading:d,ignoreFallback:p,crossOrigin:g,fallbackStrategy:S="beforeLoadOrError",referrerPolicy:w,...C}=t,k=r!==void 0||i!==void 0,P=d!=null||p||!k,D=$me({...t,ignoreFallback:P}),M=eve(D,S),R={ref:n,objectFit:c,objectPosition:s,...P?C:tve(C,["onError","onLoad"])};return M?i||v.jsx(ct.img,{as:TP,className:"chakra-image__placeholder",src:r,...R}):v.jsx(ct.img,{as:TP,src:a,srcSet:o,crossOrigin:g,loading:d,referrerPolicy:w,className:"chakra-image",...R})});sS.displayName="Image";function kP(e){return A.Children.toArray(e).filter(t=>A.isValidElement(t))}var[nve,rve]=Kr({strict:!1,name:"ButtonGroupContext"}),ive={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}}},ave={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Io=_t(function(t,n){const{size:r,colorScheme:i,variant:a,className:o,spacing:s="0.5rem",isAttached:c,isDisabled:d,orientation:p="horizontal",...g}=t,S=cn("chakra-button__group",o),w=A.useMemo(()=>({size:r,colorScheme:i,variant:a,isDisabled:d}),[r,i,a,d]);let C={display:"inline-flex",...c?ive[p]:ave[p](s)};const k=p==="vertical";return v.jsx(nve,{value:w,children:v.jsx(ct.div,{ref:n,role:"group",__css:C,className:S,"data-attached":c?"":void 0,"data-orientation":p,flexDir:k?"column":void 0,...g})})});Io.displayName="ButtonGroup";function ove(e){const[t,n]=A.useState(!e);return{ref:A.useCallback(a=>{a&&n(a.tagName==="BUTTON")},[]),type:t?"button":void 0}}function PP(e){const{children:t,className:n,...r}=e,i=A.isValidElement(t)?A.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,a=cn("chakra-button__icon",n);return v.jsx(ct.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:a,children:i})}PP.displayName="ButtonIcon";function jC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=v.jsx(z0,{color:"currentColor",width:"1em",height:"1em"}),className:a,__css:o,...s}=e,c=cn("chakra-button__spinner",a),d=n==="start"?"marginEnd":"marginStart",p=A.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[d]:t?r:0,fontSize:"1em",lineHeight:"normal",...o}),[o,t,d,r]);return v.jsx(ct.div,{className:c,...s,__css:p,children:i})}jC.displayName="ButtonSpinner";var xv=_t((e,t)=>{const n=rve(),r=Bu("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:a,isActive:o,children:s,leftIcon:c,rightIcon:d,loadingText:p,iconSpacing:g="0.5rem",type:S,spinner:w,spinnerPlacement:C="start",className:k,as:P,...D}=Si(e),M=A.useMemo(()=>{const U={...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:U}}},[r,n]),{ref:R,type:L}=ove(P),z={rightIcon:d,leftIcon:c,iconSpacing:g,children:s};return v.jsxs(ct.button,{ref:Ame(t,R),as:P,type:S??L,"data-active":$n(o),"data-loading":$n(a),__css:M,className:cn("chakra-button",k),...D,disabled:i||a,children:[a&&C==="start"&&v.jsx(jC,{className:"chakra-button__spinner--start",label:p,placement:"start",spacing:g,children:w}),a?p||v.jsx(ct.span,{opacity:0,children:v.jsx(g7,{...z})}):v.jsx(g7,{...z}),a&&C==="end"&&v.jsx(jC,{className:"chakra-button__spinner--end",label:p,placement:"end",spacing:g,children:w})]})});xv.displayName="Button";function g7(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return v.jsxs(v.Fragment,{children:[t&&v.jsx(PP,{marginEnd:i,children:t}),r,n&&v.jsx(PP,{marginStart:i,children:n})]})}var Dp=_t((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":a,...o}=e,s=n||r,c=A.isValidElement(s)?A.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return v.jsx(xv,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":a,...o,children:c})});Dp.displayName="IconButton";var[jIe,sve]=Kr({name:"CheckboxGroupContext",strict:!1});function lve(e){return v.jsx(ct.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:v.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function uve(e){return v.jsx(ct.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:v.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function cve(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?uve:lve;return n||t?v.jsx(ct.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:v.jsx(i,{...r})}):null}var[dve,y7]=Kr({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[fve,wv]=Kr({strict:!1,name:"FormControlContext"});function hve(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:a,...o}=e,s=A.useId(),c=t||`field-${s}`,d=`${c}-label`,p=`${c}-feedback`,g=`${c}-helptext`,[S,w]=A.useState(!1),[C,k]=A.useState(!1),[P,D]=A.useState(!1),M=A.useCallback((H={},q=null)=>({id:g,...H,ref:ti(q,J=>{J&&k(!0)})}),[g]),R=A.useCallback((H={},q=null)=>{var J,$;return{...H,ref:q,"data-focus":$n(P),"data-disabled":$n(i),"data-invalid":$n(r),"data-readonly":$n(a),id:(J=H.id)!=null?J:d,htmlFor:($=H.htmlFor)!=null?$:c}},[c,i,P,r,a,d]),L=A.useCallback((H={},q=null)=>({id:p,...H,ref:ti(q,J=>{J&&w(!0)}),"aria-live":"polite"}),[p]),z=A.useCallback((H={},q=null)=>({...H,...o,ref:q,role:"group"}),[o]),U=A.useCallback((H={},q=null)=>({...H,ref:q,role:"presentation","aria-hidden":!0,children:H.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!a,isDisabled:!!i,isFocused:!!P,onFocus:()=>D(!0),onBlur:()=>D(!1),hasFeedbackText:S,setHasFeedbackText:w,hasHelpText:C,setHasHelpText:k,id:c,labelId:d,feedbackId:p,helpTextId:g,htmlProps:o,getHelpTextProps:M,getErrorMessageProps:L,getRootProps:z,getLabelProps:R,getRequiredIndicatorProps:U}}var Or=_t(function(t,n){const r=Xo("Form",t),i=Si(t),{getRootProps:a,htmlProps:o,...s}=hve(i),c=cn("chakra-form-control",t.className);return v.jsx(fve,{value:s,children:v.jsx(dve,{value:r,children:v.jsx(ct.div,{...a({},n),className:c,__css:r.container})})})});Or.displayName="FormControl";var Ni=_t(function(t,n){const r=wv(),i=y7(),a=cn("chakra-form__helper-text",t.className);return v.jsx(ct.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:a})});Ni.displayName="FormHelperText";var[pve,mve]=Kr({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Li=_t((e,t)=>{const n=Xo("FormError",e),r=Si(e),i=wv();return i!=null&&i.isInvalid?v.jsx(pve,{value:n,children:v.jsx(ct.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:cn("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})}):null});Li.displayName="FormErrorMessage";var vve=_t((e,t)=>{const n=mve(),r=wv();if(!(r!=null&&r.isInvalid))return null;const i=cn("chakra-form__error-icon",e.className);return v.jsx(da,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:v.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"})})});vve.displayName="FormErrorIcon";var Qr=_t(function(t,n){var r;const i=Bu("FormLabel",t),a=Si(t),{className:o,children:s,requiredIndicator:c=v.jsx(b7,{}),optionalIndicator:d=null,...p}=a,g=wv(),S=(r=g==null?void 0:g.getLabelProps(p,n))!=null?r:{ref:n,...p};return v.jsxs(ct.label,{...S,className:cn("chakra-form__label",a.className),__css:{display:"block",textAlign:"start",...i},children:[s,g!=null&&g.isRequired?c:d]})});Qr.displayName="FormLabel";var b7=_t(function(t,n){const r=wv(),i=y7();if(!(r!=null&&r.isRequired))return null;const a=cn("chakra-form__required-indicator",t.className);return v.jsx(ct.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:a})});b7.displayName="RequiredIndicator";function AP(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...a}=OP(e);return{...a,disabled:t,readOnly:r,required:i,"aria-invalid":Zf(n),"aria-required":Zf(i),"aria-readonly":Zf(r)}}function OP(e){var t,n,r;const i=wv(),{id:a,disabled:o,readOnly:s,required:c,isRequired:d,isInvalid:p,isReadOnly:g,isDisabled:S,onFocus:w,onBlur:C,...k}=e,P=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&P.push(i.feedbackId),i!=null&&i.hasHelpText&&P.push(i.helpTextId),{...k,"aria-describedby":P.join(" ")||void 0,id:a??(i==null?void 0:i.id),isDisabled:(t=o??S)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=s??g)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=c??d)!=null?r:i==null?void 0:i.isRequired,isInvalid:p??(i==null?void 0:i.isInvalid),onFocus:Zt(i==null?void 0:i.onFocus,w),onBlur:Zt(i==null?void 0:i.onBlur,C)}}var DP={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},S7=ct("span",{baseStyle:DP});S7.displayName="VisuallyHidden";var gve=ct("input",{baseStyle:DP});gve.displayName="VisuallyHiddenInput";var x7=!1,lS=null,Cv=!1,MP=!1,jP=new Set;function IP(e,t){jP.forEach(n=>n(e,t))}var yve=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function bve(e){return!(e.metaKey||!yve&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function w7(e){Cv=!0,bve(e)&&(lS="keyboard",IP("keyboard",e))}function G0(e){if(lS="pointer",e.type==="mousedown"||e.type==="pointerdown"){Cv=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;IP("pointer",e)}}function Sve(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function xve(e){Sve(e)&&(Cv=!0,lS="virtual")}function wve(e){e.target===window||e.target===document||(!Cv&&!MP&&(lS="virtual",IP("virtual",e)),Cv=!1,MP=!1)}function Cve(){Cv=!1,MP=!0}function C7(){return lS!=="pointer"}function Eve(){if(typeof window>"u"||x7)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Cv=!0,e.apply(this,n)},document.addEventListener("keydown",w7,!0),document.addEventListener("keyup",w7,!0),document.addEventListener("click",xve,!0),window.addEventListener("focus",wve,!0),window.addEventListener("blur",Cve,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",G0,!0),document.addEventListener("pointermove",G0,!0),document.addEventListener("pointerup",G0,!0)):(document.addEventListener("mousedown",G0,!0),document.addEventListener("mousemove",G0,!0),document.addEventListener("mouseup",G0,!0)),x7=!0}function E7(e){Eve(),e(C7());const t=()=>e(C7());return jP.add(t),()=>{jP.delete(t)}}function _ve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function _7(e={}){const t=OP(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:a,id:o,onBlur:s,onFocus:c,"aria-describedby":d}=t,{defaultChecked:p,isChecked:g,isFocusable:S,onChange:w,isIndeterminate:C,name:k,value:P,tabIndex:D=void 0,"aria-label":M,"aria-labelledby":R,"aria-invalid":L,...z}=e,U=_ve(z,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),H=Ra(w),q=Ra(s),J=Ra(c),[$,K]=A.useState(!1),[fe,X]=A.useState(!1),[G,te]=A.useState(!1),[oe,ie]=A.useState(!1);A.useEffect(()=>E7(K),[]);const re=A.useRef(null),[le,ee]=A.useState(!0),[de,Re]=A.useState(!!p),Ae=g!==void 0,_e=Ae?g:de,Me=A.useCallback(De=>{if(r||n){De.preventDefault();return}Ae||Re(_e?De.target.checked:C?!0:De.target.checked),H==null||H(De)},[r,n,_e,Ae,C,H]);Od(()=>{re.current&&(re.current.indeterminate=Boolean(C))},[C]),rh(()=>{n&&X(!1)},[n,X]),Od(()=>{const De=re.current;De!=null&&De.form&&(De.form.onreset=()=>{Re(!!p)})},[]);const Te=n&&!S,Xe=A.useCallback(De=>{De.key===" "&&ie(!0)},[ie]),Qe=A.useCallback(De=>{De.key===" "&&ie(!1)},[ie]);Od(()=>{if(!re.current)return;re.current.checked!==_e&&Re(re.current.checked)},[re.current]);const vt=A.useCallback((De={},wt=null)=>{const ln=Wt=>{fe&&Wt.preventDefault(),ie(!0)};return{...De,ref:wt,"data-active":$n(oe),"data-hover":$n(G),"data-checked":$n(_e),"data-focus":$n(fe),"data-focus-visible":$n(fe&&$),"data-indeterminate":$n(C),"data-disabled":$n(n),"data-invalid":$n(a),"data-readonly":$n(r),"aria-hidden":!0,onMouseDown:Zt(De.onMouseDown,ln),onMouseUp:Zt(De.onMouseUp,()=>ie(!1)),onMouseEnter:Zt(De.onMouseEnter,()=>te(!0)),onMouseLeave:Zt(De.onMouseLeave,()=>te(!1))}},[oe,_e,n,fe,$,G,C,a,r]),St=A.useCallback((De={},wt=null)=>({...U,...De,ref:ti(wt,ln=>{ln&&ee(ln.tagName==="LABEL")}),onClick:Zt(De.onClick,()=>{var ln;le||((ln=re.current)==null||ln.click(),requestAnimationFrame(()=>{var Wt;(Wt=re.current)==null||Wt.focus()}))}),"data-disabled":$n(n),"data-checked":$n(_e),"data-invalid":$n(a)}),[U,n,_e,a,le]),qe=A.useCallback((De={},wt=null)=>({...De,ref:ti(re,wt),type:"checkbox",name:k,value:P,id:o,tabIndex:D,onChange:Zt(De.onChange,Me),onBlur:Zt(De.onBlur,q,()=>X(!1)),onFocus:Zt(De.onFocus,J,()=>X(!0)),onKeyDown:Zt(De.onKeyDown,Xe),onKeyUp:Zt(De.onKeyUp,Qe),required:i,checked:_e,disabled:Te,readOnly:r,"aria-label":M,"aria-labelledby":R,"aria-invalid":L?Boolean(L):a,"aria-describedby":d,"aria-disabled":n,style:DP}),[k,P,o,Me,q,J,Xe,Qe,i,_e,Te,r,M,R,L,a,d,n,D]),Ce=A.useCallback((De={},wt=null)=>({...De,ref:wt,onMouseDown:Zt(De.onMouseDown,T7),onTouchStart:Zt(De.onTouchStart,T7),"data-disabled":$n(n),"data-checked":$n(_e),"data-invalid":$n(a)}),[_e,n,a]);return{state:{isInvalid:a,isFocused:fe,isChecked:_e,isActive:oe,isHovered:G,isIndeterminate:C,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:St,getCheckboxProps:vt,getInputProps:qe,getLabelProps:Ce,htmlProps:U}}function T7(e){e.preventDefault(),e.stopPropagation()}var Tve={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},kve={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Pve=bp({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ave=bp({from:{opacity:0},to:{opacity:1}}),Ove=bp({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),k7=_t(function(t,n){const r=sve(),i={...r,...t},a=Xo("Checkbox",i),o=Si(t),{spacing:s="0.5rem",className:c,children:d,iconColor:p,iconSize:g,icon:S=v.jsx(cve,{}),isChecked:w,isDisabled:C=r==null?void 0:r.isDisabled,onChange:k,inputProps:P,...D}=o;let M=w;r!=null&&r.value&&o.value&&(M=r.value.includes(o.value));let R=k;r!=null&&r.onChange&&o.value&&(R=Lw(r.onChange,k));const{state:L,getInputProps:z,getCheckboxProps:U,getLabelProps:H,getRootProps:q}=_7({...D,isDisabled:C,isChecked:M,onChange:R}),J=A.useMemo(()=>({animation:L.isIndeterminate?`${Ave} 20ms linear, ${Ove} 200ms linear`:`${Pve} 200ms linear`,fontSize:g,color:p,...a.icon}),[p,g,,L.isIndeterminate,a.icon]),$=A.cloneElement(S,{__css:J,isIndeterminate:L.isIndeterminate,isChecked:L.isChecked});return v.jsxs(ct.label,{__css:{...kve,...a.container},className:cn("chakra-checkbox",c),...q(),children:[v.jsx("input",{className:"chakra-checkbox__input",...z(P,n)}),v.jsx(ct.span,{__css:{...Tve,...a.control},className:"chakra-checkbox__control",...U(),children:$}),d&&v.jsx(ct.span,{className:"chakra-checkbox__label",...H(),__css:{marginStart:s,...a.label},children:d})]})});k7.displayName="Checkbox";function Dve(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function RP(e,t){let n=Dve(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function NP(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 P7(e,t,n){return(e-t)*100/(n-t)}function Mve(e,t,n){return(n-t)*e+t}function A7(e,t,n){const r=Math.round((e-t)/n)*n+t,i=NP(n);return RP(r,i)}function IC(e,t,n){return e==null?e:(n{var $;return r==null?"":($=LP(r,a,n))!=null?$:""}),S=typeof i<"u",w=S?i:p,C=O7(Mp(w),a),k=n??C,P=A.useCallback($=>{$!==w&&(S||g($.toString()),d==null||d($.toString(),Mp($)))},[d,S,w]),D=A.useCallback($=>{let K=$;return c&&(K=IC(K,o,s)),RP(K,k)},[k,c,s,o]),M=A.useCallback(($=a)=>{let K;w===""?K=Mp($):K=Mp(w)+$,K=D(K),P(K)},[D,a,P,w]),R=A.useCallback(($=a)=>{let K;w===""?K=Mp(-$):K=Mp(w)-$,K=D(K),P(K)},[D,a,P,w]),L=A.useCallback(()=>{var $;let K;r==null?K="":K=($=LP(r,a,n))!=null?$:o,P(K)},[r,n,a,P,o]),z=A.useCallback($=>{var K;const fe=(K=LP($,a,k))!=null?K:o;P(fe)},[k,a,P,o]),U=Mp(w);return{isOutOfRange:U>s||U{const a=typeof e=="function"?e():e??document;if(!(!n||!a))return a.addEventListener(t,i,r),()=>{a.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const a=typeof e=="function"?e():e??document;a==null||a.removeEventListener(t,i,r)}}function Ive(e){return"current"in e}var D7=()=>typeof window<"u";function Rve(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var Nve=e=>D7()&&e.test(navigator.vendor),Lve=e=>D7()&&e.test(Rve()),zve=()=>Lve(/mac|iphone|ipad|ipod/i),Bve=()=>zve()&&Nve(/apple/i);function Fve(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var a,o;return(o=(a=t.current)==null?void 0:a.ownerDocument)!=null?o:document};Ev(i,"pointerdown",a=>{if(!Bve()||!r)return;const o=a.target,c=(n??[t]).some(d=>{const p=Ive(d)?d.current:d;return(p==null?void 0:p.contains(o))||p===o});i().activeElement!==o&&c&&(a.preventDefault(),o.focus())})}var pt={},M7={get exports(){return pt},set exports(e){pt=e}};/* object-assign (c) Sindre Sorhus @license MIT */var zP,j7;function Uve(){if(j7)return zP;j7=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(o).map(function(p){return o[p]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(p){d[p]=p}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zP=i()?Object.assign:function(a,o){for(var s,c=r(a),d,p=1;p1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function de(Re,Ae,_e,Me,Te){for(var Xe=Re[Ae],Qe=0;Qe0?", expected one of type ["+vt.join(", ")+"]":"";return new k("Invalid "+Xe+" `"+Qe+"` supplied to "+("`"+Te+"`"+Lt+"."))}return P(Ae)}function $(){function ee(de,Re,Ae,_e,Me){return G(de[Re])?null:new k("Invalid "+_e+" `"+Me+"` supplied to "+("`"+Ae+"`, expected a ReactNode."))}return P(ee)}function K(ee,de,Re,Ae,_e){return new k((ee||"React class")+": "+de+" type `"+Re+"."+Ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_e+"`.")}function fe(ee){function de(Re,Ae,_e,Me,Te){var Xe=Re[Ae],Qe=oe(Xe);if(Qe!=="object")return new k("Invalid "+Me+" `"+Te+"` of type `"+Qe+"` "+("supplied to `"+_e+"`, expected `object`."));for(var vt in ee){var St=ee[vt];if(typeof St!="function")return K(_e,Me,Te,vt,ie(St));var qe=St(Xe,vt,_e,Me,Te+"."+vt,n);if(qe)return qe}return null}return P(de)}function X(ee){function de(Re,Ae,_e,Me,Te){var Xe=Re[Ae],Qe=oe(Xe);if(Qe!=="object")return new k("Invalid "+Me+" `"+Te+"` of type `"+Qe+"` "+("supplied to `"+_e+"`, expected `object`."));var vt=t({},Re[Ae],ee);for(var St in vt){var qe=ee[St];if(r(ee,St)&&typeof qe!="function")return K(_e,Me,Te,St,ie(qe));if(!qe)return new k("Invalid "+Me+" `"+Te+"` key `"+St+"` supplied to `"+_e+"`.\nBad object: "+JSON.stringify(Re[Ae],null," ")+` Valid keys: `+JSON.stringify(Object.keys(ee),null," "));var Ce=qe(Xe,St,_e,Me,Te+"."+St,n);if(Ce)return Ce}return null}return P(de)}function G(ee){switch(typeof ee){case"number":case"string":case"undefined":return!0;case"boolean":return!ee;case"object":if(Array.isArray(ee))return ee.every(G);if(ee===null||s(ee))return!0;var de=g(ee);if(de){var Re=de.call(ee),Ae;if(de!==ee.entries){for(;!(Ae=Re.next()).done;)if(!G(Ae.value))return!1}else for(;!(Ae=Re.next()).done;){var _e=Ae.value;if(_e&&!G(_e[1]))return!1}}else return!1;return!0;default:return!1}}function te(ee,de){return ee==="symbol"?!0:de?de["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&de instanceof Symbol:!1}function oe(ee){var de=typeof ee;return Array.isArray(ee)?"array":ee instanceof RegExp?"object":te(de,ee)?"symbol":de}function ie(ee){if(typeof ee>"u"||ee===null)return""+ee;var de=oe(ee);if(de==="object"){if(ee instanceof Date)return"date";if(ee instanceof RegExp)return"regexp"}return de}function re(ee){var de=ie(ee);switch(de){case"array":case"object":return"an "+de;case"boolean":case"date":case"regexp":return"a "+de;default:return de}}function le(ee){return!ee.constructor||!ee.constructor.name?S:ee.constructor.name}return w.checkPropTypes=i,w.resetWarningCache=i.resetWarningCache,w.PropTypes=w,w},VP}var GP,B7;function Gve(){if(B7)return GP;B7=1;var e=FP();function t(){}function n(){}return n.resetWarningCache=t,GP=function(){function r(o,s,c,d,p,g){if(g!==e){var S=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 S.name="Invariant Violation",S}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},GP}if(process.env.NODE_ENV!=="production"){var Wve=Lb,qve=!0;M7.exports=Vve()(Wve.isElement,qve)}else M7.exports=Gve()();var WP="data-focus-lock",F7="data-focus-lock-disabled",Yve="data-no-focus-lock",Kve="data-autofocus-inside",Xve="data-no-autofocus";function Qve(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zve(e,t){var n=A.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 U7(e,t){return Zve(t||null,function(n){return e.forEach(function(r){return Qve(r,n)})})}var qP={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};process.env.NODE_ENV!=="production"&&pt.node;var Bd=function(){return Bd=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function YP(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r=0}).sort(cge)},dge=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],JP=dge.join(","),fge="".concat(JP,", [data-focus-guard]"),oB=function(e,t){return Fd((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?fge:JP)?[r]:[],oB(r))},[])},hge=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?LC([e.contentDocument.body],t):[e]},LC=function(e,t){return e.reduce(function(n,r){var i,a=oB(r,t),o=(i=[]).concat.apply(i,a.map(function(s){return hge(s,t)}));return n.concat(o,r.parentNode?Fd(r.parentNode.querySelectorAll(JP)).filter(function(s){return s===r}):[])},[])},pge=function(e){var t=e.querySelectorAll("[".concat(Kve,"]"));return Fd(t).map(function(n){return LC([n])}).reduce(function(n,r){return n.concat(r)},[])},$P=function(e,t){return Fd(e).filter(function(n){return eB(t,n)}).filter(function(n){return sge(n)})},sB=function(e,t){return t===void 0&&(t=new Map),Fd(e).filter(function(n){return tB(t,n)})},e3=function(e,t,n){return aB($P(LC(e,n),t),!0,n)},lB=function(e,t){return aB($P(LC(e),t),!1)},mge=function(e,t){return $P(pge(e),t)},Y0=function(e,t){return e.shadowRoot?Y0(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Fd(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?Y0(i,t):!1}return Y0(n,t)})},vge=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(o,s){return!t.has(s)})},uB=function(e){return e.parentNode?uB(e.parentNode):e},t3=function(e){var t=RC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(WP);return n.push.apply(n,i?vge(Fd(uB(r).querySelectorAll("[".concat(WP,'="').concat(i,'"]:not([').concat(F7,'="disabled"])')))):[r]),n},[])},gge=function(e){try{return e()}catch{return}},uS=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?uS(t.shadowRoot):t instanceof HTMLIFrameElement&&gge(function(){return t.contentWindow.document})?uS(t.contentWindow.document):t}},yge=function(e,t){return e===t},bge=function(e,t){return Boolean(Fd(e.querySelectorAll("iframe")).some(function(n){return yge(n,t)}))},cB=function(e,t){return t===void 0&&(t=uS(Z7(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:t3(e).some(function(n){return Y0(n,t)||bge(n,t)})},Sge=function(e){e===void 0&&(e=document);var t=uS(e);return t?Fd(e.querySelectorAll("[".concat(Yve,"]"))).some(function(n){return Y0(n,t)}):!1},xge=function(e,t){return t.filter(iB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},n3=function(e,t){return iB(e)&&e.name?xge(e,t):e},wge=function(e){var t=new Set;return e.forEach(function(n){return t.add(n3(n,e))}),e.filter(function(n){return t.has(n)})},dB=function(e){return e[0]&&e.length>1?n3(e[0],e):e[0]},fB=function(e,t){return e.length>1?e.indexOf(n3(e[t],e)):t},hB="NEW_FOCUS",Cge=function(e,t,n,r){var i=e.length,a=e[0],o=e[i-1],s=ZP(n);if(!(n&&e.indexOf(n)>=0)){var c=n!==void 0?t.indexOf(n):-1,d=r?t.indexOf(r):c,p=r?e.indexOf(r):-1,g=c-d,S=t.indexOf(a),w=t.indexOf(o),C=wge(t),k=n!==void 0?C.indexOf(n):-1,P=k-(r?C.indexOf(r):c),D=fB(e,0),M=fB(e,i-1);if(c===-1||p===-1)return hB;if(!g&&p>=0)return p;if(c<=S&&s&&Math.abs(g)>1)return M;if(c>=w&&s&&Math.abs(g)>1)return D;if(g&&Math.abs(P)>1)return p;if(c<=S)return M;if(c>w)return D;if(g)return Math.abs(g)>1?p:(i+p+g)%i}},Ege=function(e){return function(t){var n,r=(n=nB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},_ge=function(e,t,n){var r=e.map(function(a){var o=a.node;return o}),i=sB(r.filter(Ege(n)));return i&&i.length?dB(i):dB(sB(t))},r3=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&r3(e.parentNode.host||e.parentNode,t),t},i3=function(e,t){for(var n=r3(e),r=r3(t),i=0;i=0)return a}return!1},pB=function(e,t,n){var r=RC(e),i=RC(t),a=r[0],o=!1;return i.filter(Boolean).forEach(function(s){o=i3(o||s,s)||o,n.filter(Boolean).forEach(function(c){var d=i3(a,c);d&&(!o||Y0(d,o)?o=d:o=i3(d,o))})}),o},Tge=function(e,t){return e.reduce(function(n,r){return n.concat(mge(r,t))},[])},kge=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(uge)},Pge=function(e,t){var n=uS(RC(e).length>0?document:Z7(e).ownerDocument),r=t3(e).filter(NC),i=pB(n||e,e,r),a=new Map,o=lB(r,a),s=e3(r,a).filter(function(w){var C=w.node;return NC(C)});if(!(!s[0]&&(s=o,!s[0]))){var c=lB([i],a).map(function(w){var C=w.node;return C}),d=kge(c,s),p=d.map(function(w){var C=w.node;return C}),g=Cge(p,c,n,t);if(g===hB){var S=_ge(o,p,Tge(r,a));if(S)return{node:S};console.warn("focus-lock: cannot find any node to move focus into");return}return g===void 0?g:d[g]}},Age=function(e){var t=t3(e).filter(NC),n=pB(e,e,t),r=new Map,i=e3([n],r,!0),a=e3(t,r).filter(function(o){var s=o.node;return NC(s)}).map(function(o){var s=o.node;return s});return i.map(function(o){var s=o.node,c=o.index;return{node:s,index:c,lockItem:a.indexOf(s)>=0,guard:ZP(s)}})},Oge=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},a3=0,o3=!1,mB=function(e,t,n){n===void 0&&(n={});var r=Pge(e,t);if(!o3&&r){if(a3>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),o3=!0,setTimeout(function(){o3=!1},1);return}a3++,Oge(r.node,n.focusOptions),a3--}};function vB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var Dge=function(){return document&&document.activeElement===document.body},Mge=function(){return Dge()||Sge()},K0=null,X0=null,Q0=null,cS=!1,jge=function(){return!0},Ige=function(t){return(K0.whiteList||jge)(t)},Rge=function(t,n){Q0={observerNode:t,portaledElement:n}},Nge=function(t){return Q0&&Q0.portaledElement===t};function gB(e,t,n,r){var i=null,a=e;do{var o=r[a];if(o.guard)o.node.dataset.focusAutoGuard&&(i=o);else if(o.lockItem){if(a!==e)return;i=null}else break}while((a+=n)!==t);i&&(i.node.tabIndex=0)}var Lge=function(t){return t&&"current"in t?t.current:t},zge=function(t){return t?Boolean(cS):cS==="meanwhile"},Bge=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},Fge=function(t,n){return n.some(function(r){return Bge(t,r,r)})},zC=function(){var t=!1;if(K0){var n=K0,r=n.observed,i=n.persistentFocus,a=n.autoFocus,o=n.shards,s=n.crossFrame,c=n.focusOptions,d=r||Q0&&Q0.portaledElement,p=document&&document.activeElement;if(d){var g=[d].concat(o.map(Lge).filter(Boolean));if((!p||Ige(p))&&(i||zge(s)||!Mge()||!X0&&a)&&(d&&!(cB(g)||p&&Fge(p,g)||Nge(p))&&(document&&!X0&&p&&!a?(p.blur&&p.blur(),document.body.focus()):(t=mB(g,X0,{focusOptions:c}),Q0={})),cS=!1,X0=document&&document.activeElement),document){var S=document&&document.activeElement,w=Age(g),C=w.map(function(k){var P=k.node;return P}).indexOf(S);C>-1&&(w.filter(function(k){var P=k.guard,D=k.node;return P&&D.dataset.focusAutoGuard}).forEach(function(k){var P=k.node;return P.removeAttribute("tabIndex")}),gB(C,w.length,1,w),gB(C,-1,-1,w))}}}return t},yB=function(t){zC()&&t&&(t.stopPropagation(),t.preventDefault())},s3=function(){return vB(zC)},Uge=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||Rge(r,n)},Hge=function(){return null};process.env.NODE_ENV!=="production"&&pt.node.isRequired;var bB=function(){cS="just",setTimeout(function(){cS="meanwhile"},0)},Vge=function(){document.addEventListener("focusin",yB),document.addEventListener("focusout",s3),window.addEventListener("blur",bB)},Gge=function(){document.removeEventListener("focusin",yB),document.removeEventListener("focusout",s3),window.removeEventListener("blur",bB)};function Wge(e){return e.filter(function(t){var n=t.disabled;return!n})}function qge(e){var t=e.slice(-1)[0];t&&!K0&&Vge();var n=K0,r=n&&t&&t.id===n.id;K0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var a=i.id;return a===n.id}).length||n.returnFocus(!t)),t?(X0=null,(!r||n.observed!==t.observed)&&t.onActivation(),zC(),vB(zC)):(Gge(),X0=null)}K7.assignSyncMedium(Uge),X7.assignMedium(s3),$ve.assignMedium(function(e){return e({moveFocusInside:mB,focusInside:cB})});const Yge=nge(Wge,qge)(Hge);var SB=gt.forwardRef(function(t,n){return gt.createElement(Q7,Uf({sideCar:Yge,ref:n},t))}),xB=Q7.propTypes||{};xB.sideCar;var Kge=OT(xB,["sideCar"]);SB.propTypes=process.env.NODE_ENV!=="production"?Kge:{};const wB=SB;function CB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function EB(e){var t;if(!CB(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function Xge(e){var t,n;return(n=(t=_B(e))==null?void 0:t.defaultView)!=null?n:window}function _B(e){return CB(e)?e.ownerDocument:document}function Qge(e){return _B(e).activeElement}var TB=e=>e.hasAttribute("tabindex"),Zge=e=>TB(e)&&e.tabIndex===-1;function Jge(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function kB(e){return e.parentElement&&kB(e.parentElement)?!0:e.hidden}function $ge(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function PB(e){if(!EB(e)||kB(e)||Jge(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]():$ge(e)?!0:TB(e)}function e0e(e){return e?EB(e)&&PB(e)&&!Zge(e):!1}var t0e=["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]"],n0e=t0e.join(),r0e=e=>e.offsetWidth>0&&e.offsetHeight>0;function AB(e){const t=Array.from(e.querySelectorAll(n0e));return t.unshift(e),t.filter(n=>PB(n)&&r0e(n))}var OB,i0e=(OB=wB.default)!=null?OB:wB,DB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:a,isDisabled:o,autoFocus:s,persistentFocus:c,lockFocusAcrossFrames:d}=e,p=A.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&AB(r.current).length===0&&requestAnimationFrame(()=>{var C;(C=r.current)==null||C.focus()})},[t,r]),g=A.useCallback(()=>{var w;(w=n==null?void 0:n.current)==null||w.focus()},[n]),S=i&&!n;return v.jsx(i0e,{crossFrame:d,persistentFocus:c,autoFocus:s,disabled:o,onActivation:p,onDeactivation:g,returnFocus:S,children:a})};DB.displayName="FocusLock";var a0e=nce?A.useLayoutEffect:A.useEffect;function l3(e,t=[]){const n=A.useRef(e);return a0e(()=>{n.current=e}),A.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function o0e(e,t,n,r){const i=l3(t);return A.useEffect(()=>{var a;const o=(a=aC(n))!=null?a:document;if(t)return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[e,n,r,i,t]),()=>{var a;((a=aC(n))!=null?a:document).removeEventListener(e,i,r)}}function s0e(e,t){const n=A.useId();return A.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function l0e(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function jp(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,a=l3(n),o=l3(t),[s,c]=A.useState(e.defaultIsOpen||!1),[d,p]=l0e(r,s),g=s0e(i,"disclosure"),S=A.useCallback(()=>{d||c(!1),o==null||o()},[d,o]),w=A.useCallback(()=>{d||c(!0),a==null||a()},[d,a]),C=A.useCallback(()=>{(p?S:w)()},[p,w,S]);return{isOpen:!!p,onOpen:w,onClose:S,onToggle:C,isControlled:d,getButtonProps:(k={})=>({...k,"aria-expanded":p,"aria-controls":g,onClick:sce(k.onClick,C)}),getDisclosureProps:(k={})=>({...k,hidden:!p,id:g})}}var u3=_t(function(t,n){const{htmlSize:r,...i}=t,a=Xo("Input",i),o=Si(i),s=AP(o),c=cn("chakra-input",t.className);return v.jsx(ct.input,{size:r,...s,__css:a.field,ref:n,className:c})});u3.displayName="Input",u3.id="Input";var[u0e,MB]=Kr({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),c3=_t(function(t,n){const r=Xo("List",t),{children:i,styleType:a="none",stylePosition:o,spacing:s,...c}=Si(t),d=kP(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return v.jsx(u0e,{value:r,children:v.jsx(ct.ul,{ref:n,listStyleType:a,listStylePosition:o,role:"list",__css:{...r.container,...g},...c,children:d})})});c3.displayName="List";var c0e=_t((e,t)=>{const{as:n,...r}=e;return v.jsx(c3,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});c0e.displayName="OrderedList";var jB=_t(function(t,n){const{as:r,...i}=t;return v.jsx(c3,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});jB.displayName="UnorderedList";var dS=_t(function(t,n){const r=MB();return v.jsx(ct.li,{ref:n,...t,__css:r.item})});dS.displayName="ListItem";var d0e=_t(function(t,n){const r=MB();return v.jsx(da,{ref:n,role:"presentation",...t,__css:r.icon})});d0e.displayName="ListIcon";var Hu=_t(function(t,n){const{templateAreas:r,gap:i,rowGap:a,columnGap:o,column:s,row:c,autoFlow:d,autoRows:p,templateRows:g,autoColumns:S,templateColumns:w,...C}=t,k={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:a,gridColumnGap:o,gridAutoColumns:S,gridColumn:s,gridRow:c,gridAutoFlow:d,gridAutoRows:p,gridTemplateRows:g,gridTemplateColumns:w};return v.jsx(ct.div,{ref:n,__css:k,...C})});Hu.displayName="Grid";function IB(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):ms(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var BC=ct("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});BC.displayName="Spacer";var Yt=_t(function(t,n){const r=Bu("Text",t),{className:i,align:a,decoration:o,casing:s,...c}=Si(t),d=Cce({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return v.jsx(ct.p,{ref:n,className:cn("chakra-text",t.className),...d,...c,__css:r})});Yt.displayName="Text";var RB=e=>v.jsx(ct.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});RB.displayName="StackItem";var d3="& > *:not(style) ~ *:not(style)";function f0e(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,[d3]:IB(n,i=>r[i])}}function h0e(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{"&":IB(n,i=>r[i])}}var f3=_t((e,t)=>{const{isInline:n,direction:r,align:i,justify:a,spacing:o="0.5rem",wrap:s,children:c,divider:d,className:p,shouldWrapChildren:g,...S}=e,w=n?"row":r??"column",C=A.useMemo(()=>f0e({direction:w,spacing:o}),[w,o]),k=A.useMemo(()=>h0e({spacing:o,direction:w}),[o,w]),P=!!d,D=!g&&!P,M=A.useMemo(()=>{const L=kP(c);return D?L:L.map((z,U)=>{const H=typeof z.key<"u"?z.key:U,q=U+1===L.length,$=g?v.jsx(RB,{children:z},H):z;if(!P)return $;const K=A.cloneElement(d,{__css:k}),fe=q?null:K;return v.jsxs(A.Fragment,{children:[$,fe]},H)})},[d,k,P,D,g,c]),R=cn("chakra-stack",p);return v.jsx(ct.div,{ref:t,display:"flex",alignItems:i,justifyContent:a,flexDirection:C.flexDirection,flexWrap:s,className:R,__css:P?{}:{[d3]:C[d3]},...S,children:M})});f3.displayName="Stack";var jn=_t((e,t)=>v.jsx(f3,{align:"center",...e,direction:"column",ref:t}));jn.displayName="VStack";var Z0=_t((e,t)=>v.jsx(f3,{align:"center",...e,direction:"row",ref:t}));Z0.displayName="HStack";var Vu=_t(function(t,n){const r=Bu("Heading",t),{className:i,...a}=Si(t);return v.jsx(ct.h2,{ref:n,className:cn("chakra-heading",t.className),...a,__css:r})});Vu.displayName="Heading";var Bn=ct("div");Bn.displayName="Box";var NB=_t(function(t,n){const{size:r,centerContent:i=!0,...a}=t,o=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return v.jsx(Bn,{ref:n,boxSize:r,__css:{...o,flexShrink:0,flexGrow:0},...a})});NB.displayName="Square";var p0e=_t(function(t,n){const{size:r,...i}=t;return v.jsx(NB,{size:r,ref:n,borderRadius:"9999px",...i})});p0e.displayName="Circle";var _v=_t(function(t,n){const r=Bu("Link",t),{className:i,isExternal:a,...o}=Si(t);return v.jsx(ct.a,{target:a?"_blank":void 0,rel:a?"noopener":void 0,ref:n,className:cn("chakra-link",i),...o,__css:r})});_v.displayName="Link";var LB=_t(function(t,n){const r=Bu("Badge",t),{className:i,...a}=Si(t);return v.jsx(ct.span,{ref:n,className:cn("chakra-badge",t.className),...a,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});LB.displayName="Badge";var zB=ct("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});zB.displayName="Center";var m0e={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};_t(function(t,n){const{axis:r="both",...i}=t;return v.jsx(ct.div,{ref:n,__css:m0e[r],...i,position:"absolute"})});var BB=_t(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:a,borderRightWidth:o,borderWidth:s,borderStyle:c,borderColor:d,...p}=Bu("Divider",t),{className:g,orientation:S="horizontal",__css:w,...C}=Si(t),k={vertical:{borderLeftWidth:r||o||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||a||s||"1px",width:"100%"}};return v.jsx(ct.hr,{ref:n,"aria-orientation":S,...C,__css:{...p,border:"0",borderColor:d,borderStyle:c,...k[S],...w},className:cn("chakra-divider",g)})});BB.displayName="Divider";var Fe=_t(function(t,n){const{direction:r,align:i,justify:a,wrap:o,basis:s,grow:c,shrink:d,...p}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:a,flexWrap:o,flexBasis:s,flexGrow:c,flexShrink:d};return v.jsx(ct.div,{ref:n,__css:g,...p})});Fe.displayName="Flex";function v0e(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function g0e(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,i]=A.useState([]),a=A.useRef(),o=()=>{a.current&&(clearTimeout(a.current),a.current=null)},s=()=>{o(),a.current=setTimeout(()=>{i([]),a.current=null},t)};A.useEffect(()=>o,[]);function c(d){return p=>{if(p.key==="Backspace"){const g=[...r];g.pop(),i(g);return}if(v0e(p)){const g=r.concat(p.key);n(p)&&(p.preventDefault(),p.stopPropagation()),i(g),d(g.join("")),s()}}}return c}function y0e(e,t,n,r){if(t==null)return r;if(!r)return e.find(o=>n(o).toLowerCase().startsWith(t.toLowerCase()));const i=e.filter(a=>n(a).toLowerCase().startsWith(t.toLowerCase()));if(i.length>0){let a;return i.includes(r)?(a=i.indexOf(r)+1,a===i.length&&(a=0),i[a]):(a=e.indexOf(i[0]),e[a])}return r}function b0e(){const e=A.useRef(new Map),t=e.current,n=A.useCallback((i,a,o,s)=>{e.current.set(o,{type:a,el:i,options:s}),i.addEventListener(a,o,s)},[]),r=A.useCallback((i,a,o,s)=>{i.removeEventListener(a,o,s),e.current.delete(o)},[]);return A.useEffect(()=>()=>{t.forEach((i,a)=>{r(i.el,i.type,a,i.options)})},[r,t]),{add:n,remove:r}}function h3(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function FB(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:a=!0,onMouseDown:o,onMouseUp:s,onClick:c,onKeyDown:d,onKeyUp:p,tabIndex:g,onMouseOver:S,onMouseLeave:w,...C}=e,[k,P]=A.useState(!0),[D,M]=A.useState(!1),R=b0e(),L=ie=>{ie&&ie.tagName!=="BUTTON"&&P(!1)},z=k?g:g||0,U=n&&!r,H=A.useCallback(ie=>{if(n){ie.stopPropagation(),ie.preventDefault();return}ie.currentTarget.focus(),c==null||c(ie)},[n,c]),q=A.useCallback(ie=>{D&&h3(ie)&&(ie.preventDefault(),ie.stopPropagation(),M(!1),R.remove(document,"keyup",q,!1))},[D,R]),J=A.useCallback(ie=>{if(d==null||d(ie),n||ie.defaultPrevented||ie.metaKey||!h3(ie.nativeEvent)||k)return;const re=i&&ie.key==="Enter";a&&ie.key===" "&&(ie.preventDefault(),M(!0)),re&&(ie.preventDefault(),ie.currentTarget.click()),R.add(document,"keyup",q,!1)},[n,k,d,i,a,R,q]),$=A.useCallback(ie=>{if(p==null||p(ie),n||ie.defaultPrevented||ie.metaKey||!h3(ie.nativeEvent)||k)return;a&&ie.key===" "&&(ie.preventDefault(),M(!1),ie.currentTarget.click())},[a,k,n,p]),K=A.useCallback(ie=>{ie.button===0&&(M(!1),R.remove(document,"mouseup",K,!1))},[R]),fe=A.useCallback(ie=>{if(ie.button!==0)return;if(n){ie.stopPropagation(),ie.preventDefault();return}k||M(!0),ie.currentTarget.focus({preventScroll:!0}),R.add(document,"mouseup",K,!1),o==null||o(ie)},[n,k,o,R,K]),X=A.useCallback(ie=>{ie.button===0&&(k||M(!1),s==null||s(ie))},[s,k]),G=A.useCallback(ie=>{if(n){ie.preventDefault();return}S==null||S(ie)},[n,S]),te=A.useCallback(ie=>{D&&(ie.preventDefault(),M(!1)),w==null||w(ie)},[D,w]),oe=ti(t,L);return k?{...C,ref:oe,type:"button","aria-disabled":U?void 0:n,disabled:U,onClick:H,onMouseDown:o,onMouseUp:s,onKeyUp:p,onKeyDown:d,onMouseOver:S,onMouseLeave:w}:{...C,ref:oe,role:"button","data-active":$n(D),"aria-disabled":n?"true":void 0,tabIndex:U?void 0:z,onClick:H,onMouseDown:fe,onMouseUp:X,onKeyUp:$,onKeyDown:J,onMouseOver:G,onMouseLeave:te}}function S0e(e){const t=e.current;if(!t)return!1;const n=Qge(t);return!n||t.contains(n)?!1:!!e0e(n)}function UB(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,a=n&&!r;rh(()=>{if(!a||S0e(e))return;const o=(i==null?void 0:i.current)||e.current;o&&requestAnimationFrame(()=>{o.focus()})},[a,e,i])}var x0e={preventScroll:!0,shouldFocus:!1};function w0e(e,t=x0e){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:a}=t,o=C0e(e)?e.current:e,s=i&&a,c=A.useRef(s),d=A.useRef(a);Od(()=>{!d.current&&a&&(c.current=s),d.current=a},[a,s]);const p=A.useCallback(()=>{if(!(!a||!o||!c.current)&&(c.current=!1,!o.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=AB(o);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[a,r,o,n]);rh(()=>{p()},[p]),Ev(o,"transitionend",p)}function C0e(e){return"current"in e}var J0=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),$a={arrowShadowColor:J0("--popper-arrow-shadow-color"),arrowSize:J0("--popper-arrow-size","8px"),arrowSizeHalf:J0("--popper-arrow-size-half"),arrowBg:J0("--popper-arrow-bg"),transformOrigin:J0("--popper-transform-origin"),arrowOffset:J0("--popper-arrow-offset")};function E0e(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 _0e={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"},T0e=e=>_0e[e],HB={scroll:!0,resize:!0};function k0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...HB,...e}}:t={enabled:e,options:HB},t}var P0e={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`}},A0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{VB(e)},effect:({state:e})=>()=>{VB(e)}},VB=e=>{e.elements.popper.style.setProperty($a.transformOrigin.var,T0e(e.placement))},O0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{D0e(e)}},D0e=e=>{var t;if(!e.placement)return;const n=M0e(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:$a.arrowSize.varRef,height:$a.arrowSize.varRef,zIndex:-1});const r={[$a.arrowSizeHalf.var]:`calc(${$a.arrowSize.varRef} / 2)`,[$a.arrowOffset.var]:`calc(${$a.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},M0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:$a.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:$a.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:$a.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:$a.arrowOffset.varRef}},j0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{GB(e)},effect:({state:e})=>()=>{GB(e)}},GB=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=E0e(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:$a.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},I0e={"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"}},R0e={"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 N0e(e,t="ltr"){var n,r;const i=((n=I0e[e])==null?void 0:n[t])||e;return t==="ltr"?i:(r=R0e[e])!=null?r:i}var bl="top",Gu="bottom",Wu="right",Sl="left",FC="auto",fS=[bl,Gu,Wu,Sl],$0="start",hS="end",L0e="clippingParents",WB="viewport",pS="popper",z0e="reference",qB=fS.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+hS])},[]),YB=[].concat(fS,[FC]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+hS])},[]),B0e="beforeRead",F0e="read",U0e="afterRead",H0e="beforeMain",V0e="main",G0e="afterMain",W0e="beforeWrite",q0e="write",Y0e="afterWrite",p3=[B0e,F0e,U0e,H0e,V0e,G0e,W0e,q0e,Y0e];function Ud(e){return e?(e.nodeName||"").toLowerCase():null}function qu(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Tv(e){var t=qu(e).Element;return e instanceof t||e instanceof Element}function $l(e){var t=qu(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function m3(e){if(typeof ShadowRoot>"u")return!1;var t=qu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function K0e(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!$l(a)||!Ud(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function X0e(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],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=o.reduce(function(c,d){return c[d]="",c},{});!$l(i)||!Ud(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(c){i.removeAttribute(c)}))})}}const Q0e={name:"applyStyles",enabled:!0,phase:"write",fn:K0e,effect:X0e,requires:["computeStyles"]};function zc(e){return e.split("-")[0]}var kv=Math.max,UC=Math.min,ey=Math.round;function v3(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function KB(){return!/^((?!chrome|android).)*safari/i.test(v3())}function ty(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&$l(e)&&(i=e.offsetWidth>0&&ey(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&ey(r.height)/e.offsetHeight||1);var o=Tv(e)?qu(e):window,s=o.visualViewport,c=!KB()&&n,d=(r.left+(c&&s?s.offsetLeft:0))/i,p=(r.top+(c&&s?s.offsetTop:0))/a,g=r.width/i,S=r.height/a;return{width:g,height:S,top:p,right:d+g,bottom:p+S,left:d,x:d,y:p}}function g3(e){var t=ty(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 XB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&m3(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Bc(e){return qu(e).getComputedStyle(e)}function Z0e(e){return["table","td","th"].indexOf(Ud(e))>=0}function Ip(e){return((Tv(e)?e.ownerDocument:e.document)||window.document).documentElement}function HC(e){return Ud(e)==="html"?e:e.assignedSlot||e.parentNode||(m3(e)?e.host:null)||Ip(e)}function QB(e){return!$l(e)||Bc(e).position==="fixed"?null:e.offsetParent}function J0e(e){var t=/firefox/i.test(v3()),n=/Trident/i.test(v3());if(n&&$l(e)){var r=Bc(e);if(r.position==="fixed")return null}var i=HC(e);for(m3(i)&&(i=i.host);$l(i)&&["html","body"].indexOf(Ud(i))<0;){var a=Bc(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function mS(e){for(var t=qu(e),n=QB(e);n&&Z0e(n)&&Bc(n).position==="static";)n=QB(n);return n&&(Ud(n)==="html"||Ud(n)==="body"&&Bc(n).position==="static")?t:n||J0e(e)||t}function y3(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function vS(e,t,n){return kv(e,UC(t,n))}function $0e(e,t,n){var r=vS(e,t,n);return r>n?n:r}function ZB(){return{top:0,right:0,bottom:0,left:0}}function JB(e){return Object.assign({},ZB(),e)}function $B(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var eye=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,JB(typeof t!="number"?t:$B(t,fS))};function tye(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=zc(n.placement),c=y3(s),d=[Sl,Wu].indexOf(s)>=0,p=d?"height":"width";if(!(!a||!o)){var g=eye(i.padding,n),S=g3(a),w=c==="y"?bl:Sl,C=c==="y"?Gu:Wu,k=n.rects.reference[p]+n.rects.reference[c]-o[c]-n.rects.popper[p],P=o[c]-n.rects.reference[c],D=mS(a),M=D?c==="y"?D.clientHeight||0:D.clientWidth||0:0,R=k/2-P/2,L=g[w],z=M-S[p]-g[C],U=M/2-S[p]/2+R,H=vS(L,U,z),q=c;n.modifiersData[r]=(t={},t[q]=H,t.centerOffset=H-U,t)}}function nye(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;if(i!=null&&!(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i))){if(process.env.NODE_ENV!=="production"&&($l(i)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!XB(t.elements.popper,i)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}t.elements.arrow=i}}const rye={name:"arrow",enabled:!0,phase:"main",fn:tye,effect:nye,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ny(e){return e.split("-")[1]}var iye={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aye(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:ey(t*i)/i||0,y:ey(n*i)/i||0}}function eF(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,d=e.adaptive,p=e.roundOffsets,g=e.isFixed,S=o.x,w=S===void 0?0:S,C=o.y,k=C===void 0?0:C,P=typeof p=="function"?p({x:w,y:k}):{x:w,y:k};w=P.x,k=P.y;var D=o.hasOwnProperty("x"),M=o.hasOwnProperty("y"),R=Sl,L=bl,z=window;if(d){var U=mS(n),H="clientHeight",q="clientWidth";if(U===qu(n)&&(U=Ip(n),Bc(U).position!=="static"&&s==="absolute"&&(H="scrollHeight",q="scrollWidth")),U=U,i===bl||(i===Sl||i===Wu)&&a===hS){L=Gu;var J=g&&U===z&&z.visualViewport?z.visualViewport.height:U[H];k-=J-r.height,k*=c?1:-1}if(i===Sl||(i===bl||i===Gu)&&a===hS){R=Wu;var $=g&&U===z&&z.visualViewport?z.visualViewport.width:U[q];w-=$-r.width,w*=c?1:-1}}var K=Object.assign({position:s},d&&iye),fe=p===!0?aye({x:w,y:k}):{x:w,y:k};if(w=fe.x,k=fe.y,c){var X;return Object.assign({},K,(X={},X[L]=M?"0":"",X[R]=D?"0":"",X.transform=(z.devicePixelRatio||1)<=1?"translate("+w+"px, "+k+"px)":"translate3d("+w+"px, "+k+"px, 0)",X))}return Object.assign({},K,(t={},t[L]=M?k+"px":"",t[R]=D?w+"px":"",t.transform="",t))}function oye(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s;if(process.env.NODE_ENV!=="production"){var d=Bc(t.elements.popper).transitionProperty||"";o&&["transform","top","right","bottom","left"].some(function(g){return d.indexOf(g)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",` `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var p={placement:zc(t.placement),variation:ny(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,eF(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,eF(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const sye={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:oye,data:{}};var VC={passive:!0};function lye(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=qu(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(p){p.addEventListener("scroll",n.update,VC)}),s&&c.addEventListener("resize",n.update,VC),function(){a&&d.forEach(function(p){p.removeEventListener("scroll",n.update,VC)}),s&&c.removeEventListener("resize",n.update,VC)}}const uye={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lye,data:{}};var cye={left:"right",right:"left",bottom:"top",top:"bottom"};function GC(e){return e.replace(/left|right|bottom|top/g,function(t){return cye[t]})}var dye={start:"end",end:"start"};function tF(e){return e.replace(/start|end/g,function(t){return dye[t]})}function b3(e){var t=qu(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function S3(e){return ty(Ip(e)).left+b3(e).scrollLeft}function fye(e,t){var n=qu(e),r=Ip(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var d=KB();(d||!d&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+S3(e),y:c}}function hye(e){var t,n=Ip(e),r=b3(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=kv(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=kv(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+S3(e),c=-r.scrollTop;return Bc(i||n).direction==="rtl"&&(s+=kv(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function x3(e){var t=Bc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function nF(e){return["html","body","#document"].indexOf(Ud(e))>=0?e.ownerDocument.body:$l(e)&&x3(e)?e:nF(HC(e))}function gS(e,t){var n;t===void 0&&(t=[]);var r=nF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=qu(r),o=i?[a].concat(a.visualViewport||[],x3(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(gS(HC(o)))}function w3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pye(e,t){var n=ty(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 rF(e,t,n){return t===WB?w3(fye(e,n)):Tv(t)?pye(t,n):w3(hye(Ip(e)))}function mye(e){var t=gS(HC(e)),n=["absolute","fixed"].indexOf(Bc(e).position)>=0,r=n&&$l(e)?mS(e):e;return Tv(r)?t.filter(function(i){return Tv(i)&&XB(i,r)&&Ud(i)!=="body"}):[]}function vye(e,t,n,r){var i=t==="clippingParents"?mye(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(c,d){var p=rF(e,d,r);return c.top=kv(p.top,c.top),c.right=UC(p.right,c.right),c.bottom=UC(p.bottom,c.bottom),c.left=kv(p.left,c.left),c},rF(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function iF(e){var t=e.reference,n=e.element,r=e.placement,i=r?zc(r):null,a=r?ny(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case bl:c={x:o,y:t.y-n.height};break;case Gu:c={x:o,y:t.y+t.height};break;case Wu:c={x:t.x+t.width,y:s};break;case Sl:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var d=i?y3(i):null;if(d!=null){var p=d==="y"?"height":"width";switch(a){case $0:c[d]=c[d]-(t[p]/2-n[p]/2);break;case hS:c[d]=c[d]+(t[p]/2-n[p]/2);break}}return c}function yS(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?L0e:s,d=n.rootBoundary,p=d===void 0?WB:d,g=n.elementContext,S=g===void 0?pS:g,w=n.altBoundary,C=w===void 0?!1:w,k=n.padding,P=k===void 0?0:k,D=JB(typeof P!="number"?P:$B(P,fS)),M=S===pS?z0e:pS,R=e.rects.popper,L=e.elements[C?M:S],z=vye(Tv(L)?L:L.contextElement||Ip(e.elements.popper),c,p,o),U=ty(e.elements.reference),H=iF({reference:U,element:R,strategy:"absolute",placement:i}),q=w3(Object.assign({},R,H)),J=S===pS?q:U,$={top:z.top-J.top+D.top,bottom:J.bottom-z.bottom+D.bottom,left:z.left-J.left+D.left,right:J.right-z.right+D.right},K=e.modifiersData.offset;if(S===pS&&K){var fe=K[i];Object.keys($).forEach(function(X){var G=[Wu,Gu].indexOf(X)>=0?1:-1,te=[bl,Gu].indexOf(X)>=0?"y":"x";$[X]+=fe[te]*G})}return $}function gye(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?YB:c,p=ny(r),g=p?s?qB:qB.filter(function(C){return ny(C)===p}):fS,S=g.filter(function(C){return d.indexOf(C)>=0});S.length===0&&(S=g,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var w=S.reduce(function(C,k){return C[k]=yS(e,{placement:k,boundary:i,rootBoundary:a,padding:o})[zc(k)],C},{});return Object.keys(w).sort(function(C,k){return w[C]-w[k]})}function yye(e){if(zc(e)===FC)return[];var t=GC(e);return[tF(e),t,tF(t)]}function bye(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,d=n.padding,p=n.boundary,g=n.rootBoundary,S=n.altBoundary,w=n.flipVariations,C=w===void 0?!0:w,k=n.allowedAutoPlacements,P=t.options.placement,D=zc(P),M=D===P,R=c||(M||!C?[GC(P)]:yye(P)),L=[P].concat(R).reduce(function(_e,Me){return _e.concat(zc(Me)===FC?gye(t,{placement:Me,boundary:p,rootBoundary:g,padding:d,flipVariations:C,allowedAutoPlacements:k}):Me)},[]),z=t.rects.reference,U=t.rects.popper,H=new Map,q=!0,J=L[0],$=0;$=0,te=G?"width":"height",oe=yS(t,{placement:K,boundary:p,rootBoundary:g,altBoundary:S,padding:d}),ie=G?X?Wu:Sl:X?Gu:bl;z[te]>U[te]&&(ie=GC(ie));var re=GC(ie),le=[];if(a&&le.push(oe[fe]<=0),s&&le.push(oe[ie]<=0,oe[re]<=0),le.every(function(_e){return _e})){J=K,q=!1;break}H.set(K,le)}if(q)for(var ee=C?3:1,de=function(Me){var Te=L.find(function(Xe){var Qe=H.get(Xe);if(Qe)return Qe.slice(0,Me).every(function(vt){return vt})});if(Te)return J=Te,"break"},Re=ee;Re>0;Re--){var Ae=de(Re);if(Ae==="break")break}t.placement!==J&&(t.modifiersData[r]._skip=!0,t.placement=J,t.reset=!0)}}const Sye={name:"flip",enabled:!0,phase:"main",fn:bye,requiresIfExists:["offset"],data:{_skip:!1}};function aF(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 oF(e){return[bl,Wu,Gu,Sl].some(function(t){return e[t]>=0})}function xye(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=yS(t,{elementContext:"reference"}),s=yS(t,{altBoundary:!0}),c=aF(o,r),d=aF(s,i,a),p=oF(c),g=oF(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":g})}const wye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xye};function Cye(e,t,n){var r=zc(e),i=[Sl,bl].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Sl,Wu].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function Eye(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=YB.reduce(function(p,g){return p[g]=Cye(g,t.rects,a),p},{}),s=o[t.placement],c=s.x,d=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=o}const _ye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Eye};function Tye(e){var t=e.state,n=e.name;t.modifiersData[n]=iF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const kye={name:"popperOffsets",enabled:!0,phase:"read",fn:Tye,data:{}};function Pye(e){return e==="x"?"y":"x"}function Aye(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.padding,S=n.tether,w=S===void 0?!0:S,C=n.tetherOffset,k=C===void 0?0:C,P=yS(t,{boundary:c,rootBoundary:d,padding:g,altBoundary:p}),D=zc(t.placement),M=ny(t.placement),R=!M,L=y3(D),z=Pye(L),U=t.modifiersData.popperOffsets,H=t.rects.reference,q=t.rects.popper,J=typeof k=="function"?k(Object.assign({},t.rects,{placement:t.placement})):k,$=typeof J=="number"?{mainAxis:J,altAxis:J}:Object.assign({mainAxis:0,altAxis:0},J),K=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,fe={x:0,y:0};if(U){if(a){var X,G=L==="y"?bl:Sl,te=L==="y"?Gu:Wu,oe=L==="y"?"height":"width",ie=U[L],re=ie+P[G],le=ie-P[te],ee=w?-q[oe]/2:0,de=M===$0?H[oe]:q[oe],Re=M===$0?-q[oe]:-H[oe],Ae=t.elements.arrow,_e=w&&Ae?g3(Ae):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ZB(),Te=Me[G],Xe=Me[te],Qe=vS(0,H[oe],_e[oe]),vt=R?H[oe]/2-ee-Qe-Te-$.mainAxis:de-Qe-Te-$.mainAxis,St=R?-H[oe]/2+ee+Qe+Xe+$.mainAxis:Re+Qe+Xe+$.mainAxis,qe=t.elements.arrow&&mS(t.elements.arrow),Ce=qe?L==="y"?qe.clientTop||0:qe.clientLeft||0:0,Lt=(X=K==null?void 0:K[L])!=null?X:0,De=ie+vt-Lt-Ce,wt=ie+St-Lt,ln=vS(w?UC(re,De):re,ie,w?kv(le,wt):le);U[L]=ln,fe[L]=ln-ie}if(s){var Wt,Rn=L==="x"?bl:Sl,ar=L==="x"?Gu:Wu,xe=U[z],it=z==="y"?"height":"width",at=xe+P[Rn],bt=xe-P[ar],Ve=[bl,Sl].indexOf(D)!==-1,ot=(Wt=K==null?void 0:K[z])!=null?Wt:0,Jt=Ve?at:xe-H[it]-q[it]-ot+$.altAxis,rn=Ve?xe+H[it]+q[it]-ot-$.altAxis:bt,$e=w&&Ve?$0e(Jt,xe,rn):vS(w?Jt:at,xe,w?rn:bt);U[z]=$e,fe[z]=$e-xe}t.modifiersData[r]=fe}}const Oye={name:"preventOverflow",enabled:!0,phase:"main",fn:Aye,requiresIfExists:["offset"]};function Dye(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Mye(e){return e===qu(e)||!$l(e)?b3(e):Dye(e)}function jye(e){var t=e.getBoundingClientRect(),n=ey(t.width)/e.offsetWidth||1,r=ey(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Iye(e,t,n){n===void 0&&(n=!1);var r=$l(t),i=$l(t)&&jye(t),a=Ip(t),o=ty(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Ud(t)!=="body"||x3(a))&&(s=Mye(t)),$l(t)?(c=ty(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=S3(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Rye(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&i(c)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function Nye(e){var t=Rye(e);return p3.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Lye(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Rp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r100)){console.error(Hye);break}if(p.reset===!0){p.reset=!1,z=-1;continue}var U=p.orderedModifiers[z],H=U.fn,q=U.options,J=q===void 0?{}:q,$=U.name;typeof H=="function"&&(p=H({state:p,options:J,name:$,instance:w})||p)}}},update:Lye(function(){return new Promise(function(P){w.forceUpdate(),P(p)})}),destroy:function(){k(),S=!0}};if(!cF(s,c))return process.env.NODE_ENV!=="production"&&console.error(lF),w;w.setOptions(d).then(function(P){!S&&d.onFirstUpdate&&d.onFirstUpdate(P)});function C(){p.orderedModifiers.forEach(function(P){var D=P.name,M=P.options,R=M===void 0?{}:M,L=P.effect;if(typeof L=="function"){var z=L({state:p,name:D,instance:w,options:R}),U=function(){};g.push(z||U)}})}function k(){g.forEach(function(P){return P()}),g=[]}return w}}var Gye=[uye,kye,sye,Q0e,_ye,Sye,Oye,rye,wye],Wye=Vye({defaultModifiers:Gye});function C3(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:a=8,eventListeners:o=!0,offset:s,gutter:c=8,flip:d=!0,boundary:p="clippingParents",preventOverflow:g=!0,matchWidth:S,direction:w="ltr"}=e,C=A.useRef(null),k=A.useRef(null),P=A.useRef(null),D=N0e(r,w),M=A.useRef(()=>{}),R=A.useCallback(()=>{var $;!t||!C.current||!k.current||(($=M.current)==null||$.call(M),P.current=Wye(C.current,k.current,{placement:D,modifiers:[j0e,O0e,A0e,{...P0e,enabled:!!S},{name:"eventListeners",...k0e(o)},{name:"arrow",options:{padding:a}},{name:"offset",options:{offset:s??[0,c]}},{name:"flip",enabled:!!d,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:p}},...n??[]],strategy:i}),P.current.forceUpdate(),M.current=P.current.destroy)},[D,t,n,S,o,a,s,c,d,g,p,i]);A.useEffect(()=>()=>{var $;!C.current&&!k.current&&(($=P.current)==null||$.destroy(),P.current=null)},[]);const L=A.useCallback($=>{C.current=$,R()},[R]),z=A.useCallback(($={},K=null)=>({...$,ref:ti(L,K)}),[L]),U=A.useCallback($=>{k.current=$,R()},[R]),H=A.useCallback(($={},K=null)=>({...$,ref:ti(U,K),style:{...$.style,position:i,minWidth:S?void 0:"max-content",inset:"0 auto auto 0"}}),[i,U,S]),q=A.useCallback(($={},K=null)=>{const{size:fe,shadowColor:X,bg:G,style:te,...oe}=$;return{...oe,ref:K,"data-popper-arrow":"",style:qye($)}},[]),J=A.useCallback(($={},K=null)=>({...$,ref:K,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=P.current)==null||$.update()},forceUpdate(){var $;($=P.current)==null||$.forceUpdate()},transformOrigin:$a.transformOrigin.varRef,referenceRef:L,popperRef:U,getPopperProps:H,getArrowProps:q,getArrowInnerProps:J,getReferenceProps:z}}function qye(e){const{size:t,shadowColor:n,bg:r,style:i}=e,a={...i,position:"absolute"};return t&&(a["--popper-arrow-size"]=t),n&&(a["--popper-arrow-shadow-color"]=n),r&&(a["--popper-arrow-bg"]=r),a}function E3(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,a=Ra(n),o=Ra(t),[s,c]=A.useState(e.defaultIsOpen||!1),d=r!==void 0?r:s,p=r!==void 0,g=A.useId(),S=i??`disclosure-${g}`,w=A.useCallback(()=>{p||c(!1),o==null||o()},[p,o]),C=A.useCallback(()=>{p||c(!0),a==null||a()},[p,a]),k=A.useCallback(()=>{d?w():C()},[d,C,w]);function P(M={}){return{...M,"aria-expanded":d,"aria-controls":S,onClick(R){var L;(L=M.onClick)==null||L.call(M,R),k()}}}function D(M={}){return{...M,hidden:!d,id:S}}return{isOpen:d,onOpen:C,onClose:w,onToggle:k,isControlled:p,getButtonProps:P,getDisclosureProps:D}}function Yye(e){const{ref:t,handler:n,enabled:r=!0}=e,i=Ra(n),o=A.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;A.useEffect(()=>{if(!r)return;const s=g=>{_3(g,t)&&(o.isPointerDown=!0)},c=g=>{if(o.ignoreEmulatedMouseEvents){o.ignoreEmulatedMouseEvents=!1;return}o.isPointerDown&&n&&_3(g,t)&&(o.isPointerDown=!1,i(g))},d=g=>{o.ignoreEmulatedMouseEvents=!0,n&&o.isPointerDown&&_3(g,t)&&(o.isPointerDown=!1,i(g))},p=dF(t.current);return p.addEventListener("mousedown",s,!0),p.addEventListener("mouseup",c,!0),p.addEventListener("touchstart",s,!0),p.addEventListener("touchend",d,!0),()=>{p.removeEventListener("mousedown",s,!0),p.removeEventListener("mouseup",c,!0),p.removeEventListener("touchstart",s,!0),p.removeEventListener("touchend",d,!0)}},[n,t,i,o,r])}function _3(e,t){var n;const r=e.target;return e.button>0||r&&!dF(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function dF(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function fF(e){const{isOpen:t,ref:n}=e,[r,i]=A.useState(t),[a,o]=A.useState(!1);return A.useEffect(()=>{a||(i(t),o(!0))},[t,a,r]),Ev(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var c;const d=Xge(n.current),p=new d.CustomEvent("animationend",{bubbles:!0});(c=n.current)==null||c.dispatchEvent(p)}}}function T3(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Kye,Xye,Qye,Zye]=SP(),[Jye,bS]=Kr({strict:!1,name:"MenuContext"});function $ye(e,...t){const n=A.useId(),r=e||n;return A.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}function hF(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function pF(e){return hF(e).activeElement===e}function ebe(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:i,autoSelect:a=!0,isLazy:o,isOpen:s,defaultIsOpen:c,onClose:d,onOpen:p,placement:g="bottom-start",lazyBehavior:S="unmount",direction:w,computePositionOnMount:C=!1,...k}=e,P=A.useRef(null),D=A.useRef(null),M=Qye(),R=A.useCallback(()=>{requestAnimationFrame(()=>{var Ae;(Ae=P.current)==null||Ae.focus({preventScroll:!1})})},[]),L=A.useCallback(()=>{const Ae=setTimeout(()=>{var _e;if(i)(_e=i.current)==null||_e.focus();else{const Me=M.firstEnabled();Me&&X(Me.index)}});re.current.add(Ae)},[M,i]),z=A.useCallback(()=>{const Ae=setTimeout(()=>{const _e=M.lastEnabled();_e&&X(_e.index)});re.current.add(Ae)},[M]),U=A.useCallback(()=>{p==null||p(),a?L():R()},[a,L,R,p]),{isOpen:H,onOpen:q,onClose:J,onToggle:$}=E3({isOpen:s,defaultIsOpen:c,onClose:d,onOpen:U});Yye({enabled:H&&r,ref:P,handler:Ae=>{var _e;(_e=D.current)!=null&&_e.contains(Ae.target)||J()}});const K=C3({...k,enabled:H||C,placement:g,direction:w}),[fe,X]=A.useState(-1);rh(()=>{H||X(-1)},[H]),UB(P,{focusRef:D,visible:H,shouldFocus:!0});const G=fF({isOpen:H,ref:P}),[te,oe]=$ye(t,"menu-button","menu-list"),ie=A.useCallback(()=>{q(),R()},[q,R]),re=A.useRef(new Set([]));sbe(()=>{re.current.forEach(Ae=>clearTimeout(Ae)),re.current.clear()});const le=A.useCallback(()=>{q(),L()},[L,q]),ee=A.useCallback(()=>{q(),z()},[q,z]),de=A.useCallback(()=>{var Ae,_e;const Me=hF(P.current),Te=(Ae=P.current)==null?void 0:Ae.contains(Me.activeElement);if(!(H&&!Te))return;const Qe=(_e=M.item(fe))==null?void 0:_e.node;Qe==null||Qe.focus()},[H,fe,M]),Re=A.useRef(null);return{openAndFocusMenu:ie,openAndFocusFirstItem:le,openAndFocusLastItem:ee,onTransitionEnd:de,unstable__animationState:G,descendants:M,popper:K,buttonId:te,menuId:oe,forceUpdate:K.forceUpdate,orientation:"vertical",isOpen:H,onToggle:$,onOpen:q,onClose:J,menuRef:P,buttonRef:D,focusedIndex:fe,closeOnSelect:n,closeOnBlur:r,autoSelect:a,setFocusedIndex:X,isLazy:o,lazyBehavior:S,initialFocusRef:i,rafId:Re}}function tbe(e={},t=null){const n=bS(),{onToggle:r,popper:i,openAndFocusFirstItem:a,openAndFocusLastItem:o}=n,s=A.useCallback(c=>{const d=c.key,g={Enter:a,ArrowDown:a,ArrowUp:o}[d];g&&(c.preventDefault(),c.stopPropagation(),g(c))},[a,o]);return{...e,ref:ti(n.buttonRef,t,i.referenceRef),id:n.buttonId,"data-active":$n(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:Zt(e.onClick,r),onKeyDown:Zt(e.onKeyDown,s)}}function k3(e){var t;return abe(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function nbe(e={},t=null){const n=bS();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:i,menuRef:a,isOpen:o,onClose:s,menuId:c,isLazy:d,lazyBehavior:p,unstable__animationState:g}=n,S=Xye(),w=g0e({preventDefault:D=>D.key!==" "&&k3(D.target)}),C=A.useCallback(D=>{const M=D.key,L={Tab:U=>U.preventDefault(),Escape:s,ArrowDown:()=>{const U=S.nextEnabled(r);U&&i(U.index)},ArrowUp:()=>{const U=S.prevEnabled(r);U&&i(U.index)}}[M];if(L){D.preventDefault(),L(D);return}const z=w(U=>{const H=y0e(S.values(),U,q=>{var J,$;return($=(J=q==null?void 0:q.node)==null?void 0:J.textContent)!=null?$:""},S.item(r));if(H){const q=S.indexOf(H.node);i(q)}});k3(D.target)&&z(D)},[S,r,w,s,i]),k=A.useRef(!1);o&&(k.current=!0);const P=T3({wasSelected:k.current,enabled:d,mode:p,isSelected:g.present});return{...e,ref:ti(a,t),children:P?e.children:null,tabIndex:-1,role:"menu",id:c,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:Zt(e.onKeyDown,C)}}function rbe(e={}){const{popper:t,isOpen:n}=bS();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function ibe(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onClick:a,onFocus:o,isDisabled:s,isFocusable:c,closeOnSelect:d,type:p,...g}=e,S=bS(),{setFocusedIndex:w,focusedIndex:C,closeOnSelect:k,onClose:P,menuRef:D,isOpen:M,menuId:R,rafId:L}=S,z=A.useRef(null),U=`${R}-menuitem-${A.useId()}`,{index:H,register:q}=Zye({disabled:s&&!c}),J=A.useCallback(ie=>{n==null||n(ie),!s&&w(H)},[w,H,s,n]),$=A.useCallback(ie=>{r==null||r(ie),z.current&&!pF(z.current)&&J(ie)},[J,r]),K=A.useCallback(ie=>{i==null||i(ie),!s&&w(-1)},[w,s,i]),fe=A.useCallback(ie=>{a==null||a(ie),k3(ie.currentTarget)&&(d??k)&&P()},[P,a,k,d]),X=A.useCallback(ie=>{o==null||o(ie),w(H)},[w,o,H]),G=H===C,te=s&&!c;rh(()=>{M&&(G&&!te&&z.current?(L.current&&cancelAnimationFrame(L.current),L.current=requestAnimationFrame(()=>{var ie;(ie=z.current)==null||ie.focus(),L.current=null})):D.current&&!pF(D.current)&&D.current.focus())},[G,te,D,M]);const oe=FB({onClick:fe,onFocus:X,onMouseEnter:J,onMouseMove:$,onMouseLeave:K,ref:ti(q,z,t),isDisabled:s,isFocusable:c});return{...g,...oe,type:p??oe.type,id:U,role:"menuitem",tabIndex:G?0:-1}}function abe(e){var t;if(!obe(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function obe(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function sbe(e,t=[]){return A.useEffect(()=>()=>e(),t)}var[lbe,WC]=Kr({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P3=e=>{const{children:t}=e,n=Xo("Menu",e),r=Si(e),{direction:i}=Sp(),{descendants:a,...o}=ebe({...r,direction:i}),s=A.useMemo(()=>o,[o]),{isOpen:c,onClose:d,forceUpdate:p}=s;return v.jsx(Kye,{value:a,children:v.jsx(Jye,{value:s,children:v.jsx(lbe,{value:n,children:Nu(t,{isOpen:c,onClose:d,forceUpdate:p})})})})};P3.displayName="Menu";var mF=_t((e,t)=>{const n=WC();return v.jsx(ct.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});mF.displayName="MenuCommand";var ube=_t((e,t)=>{const{type:n,...r}=e,i=WC(),a=r.as||n?n??void 0:"button",o=A.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 v.jsx(ct.button,{ref:t,type:a,...r,__css:o})}),vF=e=>{const{className:t,children:n,...r}=e,i=A.Children.only(n),a=A.isValidElement(i)?A.cloneElement(i,{focusable:"false","aria-hidden":!0,className:cn("chakra-menu__icon",i.props.className)}):null,o=cn("chakra-menu__icon-wrapper",t);return v.jsx(ct.span,{className:o,...r,__css:{flexShrink:0},children:a})};vF.displayName="MenuIcon";var Hd=_t((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:i,commandSpacing:a="0.75rem",children:o,...s}=e,c=ibe(s,t),p=n||i?v.jsx("span",{style:{pointerEvents:"none",flex:1},children:o}):o;return v.jsxs(ube,{...c,className:cn("chakra-menu__menuitem",c.className),children:[n&&v.jsx(vF,{fontSize:"0.8em",marginEnd:r,children:n}),p,i&&v.jsx(mF,{marginStart:a,children:i})]})});Hd.displayName="MenuItem";var cbe={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"}}},dbe=ct(Ld.div),A3=_t(function(t,n){var r,i;const{rootProps:a,motionProps:o,...s}=t,{isOpen:c,onTransitionEnd:d,unstable__animationState:p}=bS(),g=nbe(s,n),S=rbe(a),w=WC();return v.jsx(ct.div,{...S,__css:{zIndex:(i=t.zIndex)!=null?i:(r=w.list)==null?void 0:r.zIndex},children:v.jsx(dbe,{variants:cbe,initial:!1,animate:c?"enter":"exit",__css:{outline:0,...w.list},...o,className:cn("chakra-menu__menu-list",g.className),...g,onUpdate:d,onAnimationComplete:Lw(p.onComplete,g.onAnimationComplete)})})});A3.displayName="MenuList";var fbe=_t((e,t)=>{const n=WC();return v.jsx(ct.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),O3=_t((e,t)=>{const{children:n,as:r,...i}=e,a=tbe(i,t),o=r||fbe;return v.jsx(o,{...a,className:cn("chakra-menu__menu-button",e.className),children:v.jsx(ct.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});O3.displayName="MenuButton";var hbe={slideInBottom:{...EP,custom:{offsetY:16,reverse:!0}},slideInRight:{...EP,custom:{offsetX:16,reverse:!0}},scale:{...v7,custom:{initialScale:.95,reverse:!0}},none:{}},pbe=ct(Ld.section),mbe=e=>hbe[e||"none"],gF=A.forwardRef((e,t)=>{const{preset:n,motionProps:r=mbe(n),...i}=e;return v.jsx(pbe,{ref:t,...r,...i})});gF.displayName="ModalTransition";var vbe=Object.defineProperty,gbe=(e,t,n)=>t in e?vbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ybe=(e,t,n)=>(gbe(e,typeof t!="symbol"?t+"":t,n),n),bbe=class{constructor(){ybe(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}},D3=new bbe;function yF(e,t){const[n,r]=A.useState(0);return A.useEffect(()=>{const i=e.current;if(i){if(t){const a=D3.add(i);r(a)}return()=>{D3.remove(i),r(0)}}},[t,e]),n}var Sbe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ry=new WeakMap,qC=new WeakMap,YC={},M3=0,bF=function(e){return e&&(e.host||bF(e.parentNode))},xbe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bF(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)})},wbe=function(e,t,n,r){var i=xbe(t,Array.isArray(e)?e:[e]);YC[n]||(YC[n]=new WeakMap);var a=YC[n],o=[],s=new Set,c=new Set(i),d=function(g){!g||s.has(g)||(s.add(g),d(g.parentNode))};i.forEach(d);var p=function(g){!g||c.has(g)||Array.prototype.forEach.call(g.children,function(S){if(s.has(S))p(S);else{var w=S.getAttribute(r),C=w!==null&&w!=="false",k=(ry.get(S)||0)+1,P=(a.get(S)||0)+1;ry.set(S,k),a.set(S,P),o.push(S),k===1&&C&&qC.set(S,!0),P===1&&S.setAttribute(n,"true"),C||S.setAttribute(r,"true")}})};return p(t),s.clear(),M3++,function(){o.forEach(function(g){var S=ry.get(g)-1,w=a.get(g)-1;ry.set(g,S),a.set(g,w),S||(qC.has(g)||g.removeAttribute(r),qC.delete(g)),w||g.removeAttribute(n)}),M3--,M3||(ry=new WeakMap,ry=new WeakMap,qC=new WeakMap,YC={})}},Cbe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Sbe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),wbe(r,i,n,"aria-hidden")):function(){return null}};function Ebe(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:a=!0,useInert:o=!0,onOverlayClick:s,onEsc:c}=e,d=A.useRef(null),p=A.useRef(null),[g,S,w]=Tbe(r,"chakra-modal","chakra-modal--header","chakra-modal--body");_be(d,t&&o),yF(d,t);const C=A.useRef(null),k=A.useCallback(q=>{C.current=q.target},[]),P=A.useCallback(q=>{q.key==="Escape"&&(q.stopPropagation(),a&&(n==null||n()),c==null||c())},[a,n,c]),[D,M]=A.useState(!1),[R,L]=A.useState(!1),z=A.useCallback((q={},J=null)=>({role:"dialog",...q,ref:ti(J,d),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":D?S:void 0,"aria-describedby":R?w:void 0,onClick:Zt(q.onClick,$=>$.stopPropagation())}),[w,R,g,S,D]),U=A.useCallback(q=>{q.stopPropagation(),C.current===q.target&&D3.isTopModal(d.current)&&(i&&(n==null||n()),s==null||s())},[n,i,s]),H=A.useCallback((q={},J=null)=>({...q,ref:ti(J,p),onClick:Zt(q.onClick,U),onKeyDown:Zt(q.onKeyDown,P),onMouseDown:Zt(q.onMouseDown,k)}),[P,k,U]);return{isOpen:t,onClose:n,headerId:S,bodyId:w,setBodyMounted:L,setHeaderMounted:M,dialogRef:d,overlayRef:p,getDialogProps:z,getDialogContainerProps:H}}function _be(e,t){const n=e.current;A.useEffect(()=>{if(!(!e.current||!t))return Cbe(e.current)},[t,e,n])}function Tbe(e,...t){const n=A.useId(),r=e||n;return A.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[kbe,iy]=Kr({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Pbe,Av]=Kr({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),Np=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:a,initialFocusRef:o,finalFocusRef:s,returnFocusOnClose:c,blockScrollOnMount:d,allowPinchZoom:p,preserveScrollBarGap:g,motionPreset:S,lockFocusAcrossFrames:w,onCloseComplete:C}=t,k=Xo("Modal",t),D={...Ebe(t),autoFocus:i,trapFocus:a,initialFocusRef:o,finalFocusRef:s,returnFocusOnClose:c,blockScrollOnMount:d,allowPinchZoom:p,preserveScrollBarGap:g,motionPreset:S,lockFocusAcrossFrames:w};return v.jsx(Pbe,{value:D,children:v.jsx(kbe,{value:k,children:v.jsx(bv,{onExitComplete:C,children:D.isOpen&&v.jsx(ov,{...n,children:r})})})})};Np.displayName="Modal";var KC="right-scroll-bar-position",XC="width-before-scroll-bar",Abe="with-scroll-bars-hidden",Obe="--removed-body-scroll-bar-size",SF=q7(),j3=function(){},QC=gt.forwardRef(function(e,t){var n=gt.useRef(null),r=gt.useState({onScrollCapture:j3,onWheelCapture:j3,onTouchMoveCapture:j3}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,S=e.sideCar,w=e.noIsolation,C=e.inert,k=e.allowPinchZoom,P=e.as,D=P===void 0?"div":P,M=H7(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),R=S,L=U7([n,t]),z=Bd(Bd({},M),i);return gt.createElement(gt.Fragment,null,p&>.createElement(R,{sideCar:SF,removeScrollBar:d,shards:g,noIsolation:w,inert:C,setCallbacks:a,allowPinchZoom:!!k,lockRef:n}),o?gt.cloneElement(gt.Children.only(s),Bd(Bd({},z),{ref:L})):gt.createElement(D,Bd({},z,{className:c,ref:L}),s))});QC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},QC.classNames={fullWidth:XC,zeroRight:KC};var xF,Dbe=function(){if(xF)return xF;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mbe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Dbe();return t&&e.setAttribute("nonce",t),e}function jbe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ibe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rbe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mbe())&&(jbe(t,n),Ibe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nbe=function(){var e=Rbe();return function(t,n){gt.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wF=function(){var e=Nbe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Lbe={left:0,top:0,right:0,gap:0},I3=function(e){return parseInt(e||"",10)||0},zbe=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[I3(n),I3(r),I3(i)]},Bbe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Lbe;var t=zbe(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])}},Fbe=wF(),Ube=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(Abe,` { 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(a,`px; padding-right: `).concat(o,`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(KC,` { right: `).concat(s,"px ").concat(r,`; } .`).concat(XC,` { margin-right: `).concat(s,"px ").concat(r,`; } .`).concat(KC," .").concat(KC,` { right: 0 `).concat(r,`; } .`).concat(XC," .").concat(XC,` { margin-right: 0 `).concat(r,`; } body { `).concat(Obe,": ").concat(s,`px; } `)},Hbe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,a=gt.useMemo(function(){return Bbe(i)},[i]);return gt.createElement(Fbe,{styles:Ube(a,!t,i,n?"":"!important")})},R3=!1;if(typeof window<"u")try{var ZC=Object.defineProperty({},"passive",{get:function(){return R3=!0,!0}});window.addEventListener("test",ZC,ZC),window.removeEventListener("test",ZC,ZC)}catch{R3=!1}var ay=R3?{passive:!1}:!1,Vbe=function(e){return e.tagName==="TEXTAREA"},CF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Vbe(e)&&n[t]==="visible")},Gbe=function(e){return CF(e,"overflowY")},Wbe=function(e){return CF(e,"overflowX")},EF=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_F(e,n);if(r){var i=TF(e,n),a=i[1],o=i[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},qbe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ybe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_F=function(e,t){return e==="v"?Gbe(t):Wbe(t)},TF=function(e,t){return e==="v"?qbe(t):Ybe(t)},Kbe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Xbe=function(e,t,n,r,i){var a=Kbe(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),d=!1,p=o>0,g=0,S=0;do{var w=TF(e,s),C=w[0],k=w[1],P=w[2],D=k-P-a*C;(C||D)&&_F(e,s)&&(g+=D,S+=C),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(p&&(i&&g===0||!i&&o>g)||!p&&(i&&S===0||!i&&-o>S))&&(d=!0),d},JC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kF=function(e){return[e.deltaX,e.deltaY]},PF=function(e){return e&&"current"in e?e.current:e},Qbe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zbe=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},Jbe=0,oy=[];function $be(e){var t=gt.useRef([]),n=gt.useRef([0,0]),r=gt.useRef(),i=gt.useState(Jbe++)[0],a=gt.useState(function(){return wF()})[0],o=gt.useRef(e);gt.useEffect(function(){o.current=e},[e]),gt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=YP([e.lockRef.current],(e.shards||[]).map(PF),!0).filter(Boolean);return k.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=gt.useCallback(function(k,P){if("touches"in k&&k.touches.length===2)return!o.current.allowPinchZoom;var D=JC(k),M=n.current,R="deltaX"in k?k.deltaX:M[0]-D[0],L="deltaY"in k?k.deltaY:M[1]-D[1],z,U=k.target,H=Math.abs(R)>Math.abs(L)?"h":"v";if("touches"in k&&H==="h"&&U.type==="range")return!1;var q=EF(H,U);if(!q)return!0;if(q?z=H:(z=H==="v"?"h":"v",q=EF(H,U)),!q)return!1;if(!r.current&&"changedTouches"in k&&(R||L)&&(r.current=z),!z)return!0;var J=r.current||z;return Xbe(J,P,k,J==="h"?R:L,!0)},[]),c=gt.useCallback(function(k){var P=k;if(!(!oy.length||oy[oy.length-1]!==a)){var D="deltaY"in P?kF(P):JC(P),M=t.current.filter(function(z){return z.name===P.type&&z.target===P.target&&Qbe(z.delta,D)})[0];if(M&&M.should){P.cancelable&&P.preventDefault();return}if(!M){var R=(o.current.shards||[]).map(PF).filter(Boolean).filter(function(z){return z.contains(P.target)}),L=R.length>0?s(P,R[0]):!o.current.noIsolation;L&&P.cancelable&&P.preventDefault()}}},[]),d=gt.useCallback(function(k,P,D,M){var R={name:k,delta:P,target:D,should:M};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(L){return L!==R})},1)},[]),p=gt.useCallback(function(k){n.current=JC(k),r.current=void 0},[]),g=gt.useCallback(function(k){d(k.type,kF(k),k.target,s(k,e.lockRef.current))},[]),S=gt.useCallback(function(k){d(k.type,JC(k),k.target,s(k,e.lockRef.current))},[]);gt.useEffect(function(){return oy.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:S}),document.addEventListener("wheel",c,ay),document.addEventListener("touchmove",c,ay),document.addEventListener("touchstart",p,ay),function(){oy=oy.filter(function(k){return k!==a}),document.removeEventListener("wheel",c,ay),document.removeEventListener("touchmove",c,ay),document.removeEventListener("touchstart",p,ay)}},[]);var w=e.removeScrollBar,C=e.inert;return gt.createElement(gt.Fragment,null,C?gt.createElement(a,{styles:Zbe(i)}):null,w?gt.createElement(Hbe,{gapMode:"margin"}):null)}const e1e=Jve(SF,$be);var AF=gt.forwardRef(function(e,t){return gt.createElement(QC,Bd({},e,{ref:t,sideCar:e1e}))});AF.classNames=QC.classNames;const t1e=AF;function n1e(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:a,allowPinchZoom:o,finalFocusRef:s,returnFocusOnClose:c,preserveScrollBarGap:d,lockFocusAcrossFrames:p,isOpen:g}=Av(),[S,w]=m9();A.useEffect(()=>{!S&&w&&setTimeout(w)},[S,w]);const C=yF(r,g);return v.jsx(DB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:c,contentRef:r,lockFocusAcrossFrames:p,children:v.jsx(t1e,{removeScrollBar:!d,allowPinchZoom:o,enabled:C===1&&a,forwardProps:!0,children:e.children})})}var Lp=_t((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:a,...o}=e,{getDialogProps:s,getDialogContainerProps:c}=Av(),d=s(o,t),p=c(i),g=cn("chakra-modal__content",n),S=iy(),w={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...S.dialog},C={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...S.dialogContainer},{motionPreset:k}=Av();return v.jsx(n1e,{children:v.jsx(ct.div,{...p,className:"chakra-modal__content-container",tabIndex:-1,__css:C,children:v.jsx(gF,{preset:k,motionProps:a,className:g,...d,__css:w,children:r})})})});Lp.displayName="ModalContent";function OF(e){const{leastDestructiveRef:t,...n}=e;return v.jsx(Np,{...n,initialFocusRef:t})}var DF=_t((e,t)=>v.jsx(Lp,{ref:t,role:"alertdialog",...e})),lh=_t((e,t)=>{const{className:n,...r}=e,i=cn("chakra-modal__footer",n),o={display:"flex",alignItems:"center",justifyContent:"flex-end",...iy().footer};return v.jsx(ct.footer,{ref:t,...r,__css:o,className:i})});lh.displayName="ModalFooter";var uh=_t((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:a}=Av();A.useEffect(()=>(a(!0),()=>a(!1)),[a]);const o=cn("chakra-modal__header",n),c={flex:0,...iy().header};return v.jsx(ct.header,{ref:t,className:o,id:i,...r,__css:c})});uh.displayName="ModalHeader";var r1e=ct(Ld.div),ch=_t((e,t)=>{const{className:n,transition:r,motionProps:i,...a}=e,o=cn("chakra-modal__overlay",n),c={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...iy().overlay},{motionPreset:d}=Av(),g=i||(d==="none"?{}:m7);return v.jsx(r1e,{...g,__css:c,ref:t,className:o,...a})});ch.displayName="ModalOverlay";var dh=_t((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:a}=Av();A.useEffect(()=>(a(!0),()=>a(!1)),[a]);const o=cn("chakra-modal__body",n),s=iy();return v.jsx(ct.div,{ref:t,className:o,id:i,...r,__css:s.body})});dh.displayName="ModalBody";var sy=_t((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:a}=Av(),o=cn("chakra-modal__close-btn",r),s=iy();return v.jsx(yP,{ref:t,__css:s.closeButton,className:o,onClick:Zt(n,c=>{c.stopPropagation(),a()}),...i})});sy.displayName="ModalCloseButton";var i1e=e=>v.jsx(da,{viewBox:"0 0 24 24",...e,children:v.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"})}),a1e=e=>v.jsx(da,{viewBox:"0 0 24 24",...e,children:v.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 MF(e,t,n,r){A.useEffect(()=>{var i;if(!e.current||!r)return;const a=(i=e.current.ownerDocument.defaultView)!=null?i:window,o=Array.isArray(t)?t:[t],s=new a.MutationObserver(c=>{for(const d of c)d.type==="attributes"&&d.attributeName&&o.includes(d.attributeName)&&n(d)});return s.observe(e.current,{attributes:!0,attributeFilter:o}),()=>s.disconnect()})}function o1e(e,t){const n=Ra(e);A.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var s1e=50,jF=300;function l1e(e,t){const[n,r]=A.useState(!1),[i,a]=A.useState(null),[o,s]=A.useState(!0),c=A.useRef(null),d=()=>clearTimeout(c.current);o1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?s1e:null);const p=A.useCallback(()=>{o&&e(),c.current=setTimeout(()=>{s(!1),r(!0),a("increment")},jF)},[e,o]),g=A.useCallback(()=>{o&&t(),c.current=setTimeout(()=>{s(!1),r(!0),a("decrement")},jF)},[t,o]),S=A.useCallback(()=>{s(!0),r(!1),d()},[]);return A.useEffect(()=>()=>d(),[]),{up:p,down:g,stop:S,isSpinning:n}}var u1e=/^[Ee0-9+\-.]$/;function c1e(e){return u1e.test(e)}function d1e(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 f1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:a=Number.MAX_SAFE_INTEGER,step:o=1,isReadOnly:s,isDisabled:c,isRequired:d,isInvalid:p,pattern:g="[0-9]*(.[0-9]+)?",inputMode:S="decimal",allowMouseWheel:w,id:C,onChange:k,precision:P,name:D,"aria-describedby":M,"aria-label":R,"aria-labelledby":L,onFocus:z,onBlur:U,onInvalid:H,getAriaValueText:q,isValidCharacter:J,format:$,parse:K,...fe}=e,X=Ra(z),G=Ra(U),te=Ra(H),oe=Ra(J??c1e),ie=Ra(q),re=jve(e),{update:le,increment:ee,decrement:de}=re,[Re,Ae]=A.useState(!1),_e=!(s||c),Me=A.useRef(null),Te=A.useRef(null),Xe=A.useRef(null),Qe=A.useRef(null),vt=A.useCallback($e=>$e.split("").filter(oe).join(""),[oe]),St=A.useCallback($e=>{var an;return(an=K==null?void 0:K($e))!=null?an:$e},[K]),qe=A.useCallback($e=>{var an;return((an=$==null?void 0:$($e))!=null?an:$e).toString()},[$]);rh(()=>{(re.valueAsNumber>a||re.valueAsNumber{if(!Me.current)return;if(Me.current.value!=re.value){const an=St(Me.current.value);re.setValue(vt(an))}},[St,vt]);const Ce=A.useCallback(($e=o)=>{_e&&ee($e)},[ee,_e,o]),Lt=A.useCallback(($e=o)=>{_e&&de($e)},[de,_e,o]),De=l1e(Ce,Lt);MF(Xe,"disabled",De.stop,De.isSpinning),MF(Qe,"disabled",De.stop,De.isSpinning);const wt=A.useCallback($e=>{if($e.nativeEvent.isComposing)return;const Nn=St($e.currentTarget.value);le(vt(Nn)),Te.current={start:$e.currentTarget.selectionStart,end:$e.currentTarget.selectionEnd}},[le,vt,St]),ln=A.useCallback($e=>{var an,Nn,st;X==null||X($e),Te.current&&($e.target.selectionStart=(Nn=Te.current.start)!=null?Nn:(an=$e.currentTarget.value)==null?void 0:an.length,$e.currentTarget.selectionEnd=(st=Te.current.end)!=null?st:$e.currentTarget.selectionStart)},[X]),Wt=A.useCallback($e=>{if($e.nativeEvent.isComposing)return;d1e($e,oe)||$e.preventDefault();const an=Rn($e)*o,Nn=$e.key,Ge={ArrowUp:()=>Ce(an),ArrowDown:()=>Lt(an),Home:()=>le(i),End:()=>le(a)}[Nn];Ge&&($e.preventDefault(),Ge($e))},[oe,o,Ce,Lt,le,i,a]),Rn=$e=>{let an=1;return($e.metaKey||$e.ctrlKey)&&(an=.1),$e.shiftKey&&(an=10),an},ar=A.useMemo(()=>{const $e=ie==null?void 0:ie(re.value);if($e!=null)return $e;const an=re.value.toString();return an||void 0},[re.value,ie]),xe=A.useCallback(()=>{let $e=re.value;if(re.value==="")return;/^[eE]/.test(re.value.toString())?re.setValue(""):(re.valueAsNumbera&&($e=a),re.cast($e))},[re,a,i]),it=A.useCallback(()=>{Ae(!1),n&&xe()},[n,Ae,xe]),at=A.useCallback(()=>{t&&requestAnimationFrame(()=>{var $e;($e=Me.current)==null||$e.focus()})},[t]),bt=A.useCallback($e=>{$e.preventDefault(),De.up(),at()},[at,De]),Ve=A.useCallback($e=>{$e.preventDefault(),De.down(),at()},[at,De]);Ev(()=>Me.current,"wheel",$e=>{var an,Nn;const Ge=((Nn=(an=Me.current)==null?void 0:an.ownerDocument)!=null?Nn:document).activeElement===Me.current;if(!w||!Ge)return;$e.preventDefault();const mt=Rn($e)*o,Ft=Math.sign($e.deltaY);Ft===-1?Ce(mt):Ft===1&&Lt(mt)},{passive:!1});const ot=A.useCallback(($e={},an=null)=>{const Nn=c||r&&re.isAtMax;return{...$e,ref:ti(an,Xe),role:"button",tabIndex:-1,onPointerDown:Zt($e.onPointerDown,st=>{st.button!==0||Nn||bt(st)}),onPointerLeave:Zt($e.onPointerLeave,De.stop),onPointerUp:Zt($e.onPointerUp,De.stop),disabled:Nn,"aria-disabled":Zf(Nn)}},[re.isAtMax,r,bt,De.stop,c]),Jt=A.useCallback(($e={},an=null)=>{const Nn=c||r&&re.isAtMin;return{...$e,ref:ti(an,Qe),role:"button",tabIndex:-1,onPointerDown:Zt($e.onPointerDown,st=>{st.button!==0||Nn||Ve(st)}),onPointerLeave:Zt($e.onPointerLeave,De.stop),onPointerUp:Zt($e.onPointerUp,De.stop),disabled:Nn,"aria-disabled":Zf(Nn)}},[re.isAtMin,r,Ve,De.stop,c]),rn=A.useCallback(($e={},an=null)=>{var Nn,st,Ge,mt;return{name:D,inputMode:S,type:"text",pattern:g,"aria-labelledby":L,"aria-label":R,"aria-describedby":M,id:C,disabled:c,...$e,readOnly:(Nn=$e.readOnly)!=null?Nn:s,"aria-readonly":(st=$e.readOnly)!=null?st:s,"aria-required":(Ge=$e.required)!=null?Ge:d,required:(mt=$e.required)!=null?mt:d,ref:ti(Me,an),value:qe(re.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":Number.isNaN(re.valueAsNumber)?void 0:re.valueAsNumber,"aria-invalid":Zf(p??re.isOutOfRange),"aria-valuetext":ar,autoComplete:"off",autoCorrect:"off",onChange:Zt($e.onChange,wt),onKeyDown:Zt($e.onKeyDown,Wt),onFocus:Zt($e.onFocus,ln,()=>Ae(!0)),onBlur:Zt($e.onBlur,G,it)}},[D,S,g,L,R,qe,M,C,c,d,s,p,re.value,re.valueAsNumber,re.isOutOfRange,i,a,ar,wt,Wt,ln,G,it]);return{value:qe(re.value),valueAsNumber:re.valueAsNumber,isFocused:Re,isDisabled:c,isReadOnly:s,getIncrementButtonProps:ot,getDecrementButtonProps:Jt,getInputProps:rn,htmlProps:fe}}var[h1e,$C]=Kr({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[p1e,N3]=Kr({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),L3=_t(function(t,n){const r=Xo("NumberInput",t),i=Si(t),a=OP(i),{htmlProps:o,...s}=f1e(a),c=A.useMemo(()=>s,[s]);return v.jsx(p1e,{value:c,children:v.jsx(h1e,{value:r,children:v.jsx(ct.div,{...o,ref:n,className:cn("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});L3.displayName="NumberInput";var z3=_t(function(t,n){const r=$C();return v.jsx(ct.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}})});z3.displayName="NumberInputStepper";var B3=_t(function(t,n){const{getInputProps:r}=N3(),i=r(t,n),a=$C();return v.jsx(ct.input,{...i,className:cn("chakra-numberinput__field",t.className),__css:{width:"100%",...a.field}})});B3.displayName="NumberInputField";var IF=ct("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),F3=_t(function(t,n){var r;const i=$C(),{getDecrementButtonProps:a}=N3(),o=a(t,n);return v.jsx(IF,{...o,__css:i.stepper,children:(r=t.children)!=null?r:v.jsx(i1e,{})})});F3.displayName="NumberDecrementStepper";var U3=_t(function(t,n){var r;const{getIncrementButtonProps:i}=N3(),a=i(t,n),o=$C();return v.jsx(IF,{...a,__css:o.stepper,children:(r=t.children)!=null?r:v.jsx(a1e,{})})});U3.displayName="NumberIncrementStepper";var[m1e,SS]=Kr({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[v1e,H3]=Kr({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `});function V3(e){const t=A.Children.only(e.children),{getTriggerProps:n}=SS();return A.cloneElement(t,n(t.props,t.ref))}V3.displayName="PopoverTrigger";var ly={click:"click",hover:"hover"};function g1e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:a=!0,autoFocus:o=!0,arrowSize:s,arrowShadowColor:c,trigger:d=ly.click,openDelay:p=200,closeDelay:g=200,isLazy:S,lazyBehavior:w="unmount",computePositionOnMount:C,...k}=e,{isOpen:P,onClose:D,onOpen:M,onToggle:R}=E3(e),L=A.useRef(null),z=A.useRef(null),U=A.useRef(null),H=A.useRef(!1),q=A.useRef(!1);P&&(q.current=!0);const[J,$]=A.useState(!1),[K,fe]=A.useState(!1),X=A.useId(),G=i??X,[te,oe,ie,re]=["popover-trigger","popover-content","popover-header","popover-body"].map(wt=>`${wt}-${G}`),{referenceRef:le,getArrowProps:ee,getPopperProps:de,getArrowInnerProps:Re,forceUpdate:Ae}=C3({...k,enabled:P||!!C}),_e=fF({isOpen:P,ref:U});Fve({enabled:P,ref:z}),UB(U,{focusRef:z,visible:P,shouldFocus:a&&d===ly.click}),w0e(U,{focusRef:r,visible:P,shouldFocus:o&&d===ly.click});const Me=T3({wasSelected:q.current,enabled:S,mode:w,isSelected:_e.present}),Te=A.useCallback((wt={},ln=null)=>{const Wt={...wt,style:{...wt.style,transformOrigin:$a.transformOrigin.varRef,[$a.arrowSize.var]:s?`${s}px`:void 0,[$a.arrowShadowColor.var]:c},ref:ti(U,ln),children:Me?wt.children:null,id:oe,tabIndex:-1,role:"dialog",onKeyDown:Zt(wt.onKeyDown,Rn=>{n&&Rn.key==="Escape"&&D()}),onBlur:Zt(wt.onBlur,Rn=>{const ar=RF(Rn),xe=G3(U.current,ar),it=G3(z.current,ar);P&&t&&(!xe&&!it)&&D()}),"aria-labelledby":J?ie:void 0,"aria-describedby":K?re:void 0};return d===ly.hover&&(Wt.role="tooltip",Wt.onMouseEnter=Zt(wt.onMouseEnter,()=>{H.current=!0}),Wt.onMouseLeave=Zt(wt.onMouseLeave,Rn=>{Rn.nativeEvent.relatedTarget!==null&&(H.current=!1,setTimeout(()=>D(),g))})),Wt},[Me,oe,J,ie,K,re,d,n,D,P,t,g,c,s]),Xe=A.useCallback((wt={},ln=null)=>de({...wt,style:{visibility:P?"visible":"hidden",...wt.style}},ln),[P,de]),Qe=A.useCallback((wt,ln=null)=>({...wt,ref:ti(ln,L,le)}),[L,le]),vt=A.useRef(),St=A.useRef(),qe=A.useCallback(wt=>{L.current==null&&le(wt)},[le]),Ce=A.useCallback((wt={},ln=null)=>{const Wt={...wt,ref:ti(z,ln,qe),id:te,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":oe};return d===ly.click&&(Wt.onClick=Zt(wt.onClick,R)),d===ly.hover&&(Wt.onFocus=Zt(wt.onFocus,()=>{vt.current===void 0&&M()}),Wt.onBlur=Zt(wt.onBlur,Rn=>{const ar=RF(Rn),xe=!G3(U.current,ar);P&&t&&xe&&D()}),Wt.onKeyDown=Zt(wt.onKeyDown,Rn=>{Rn.key==="Escape"&&D()}),Wt.onMouseEnter=Zt(wt.onMouseEnter,()=>{H.current=!0,vt.current=window.setTimeout(()=>M(),p)}),Wt.onMouseLeave=Zt(wt.onMouseLeave,()=>{H.current=!1,vt.current&&(clearTimeout(vt.current),vt.current=void 0),St.current=window.setTimeout(()=>{H.current===!1&&D()},g)})),Wt},[te,P,oe,d,qe,R,M,t,D,p,g]);A.useEffect(()=>()=>{vt.current&&clearTimeout(vt.current),St.current&&clearTimeout(St.current)},[]);const Lt=A.useCallback((wt={},ln=null)=>({...wt,id:ie,ref:ti(ln,Wt=>{$(!!Wt)})}),[ie]),De=A.useCallback((wt={},ln=null)=>({...wt,id:re,ref:ti(ln,Wt=>{fe(!!Wt)})}),[re]);return{forceUpdate:Ae,isOpen:P,onAnimationComplete:_e.onComplete,onClose:D,getAnchorProps:Qe,getArrowProps:ee,getArrowInnerProps:Re,getPopoverPositionerProps:Xe,getPopoverProps:Te,getTriggerProps:Ce,getHeaderProps:Lt,getBodyProps:De}}function G3(e,t){return e===t||(e==null?void 0:e.contains(t))}function RF(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function W3(e){const t=Xo("Popover",e),{children:n,...r}=Si(e),i=Sp(),a=g1e({...r,direction:i.direction});return v.jsx(m1e,{value:a,children:v.jsx(v1e,{value:t,children:Nu(n,{isOpen:a.isOpen,onClose:a.onClose,forceUpdate:a.forceUpdate})})})}W3.displayName="Popover";function q3(e){var t;const{bg:n,bgColor:r,backgroundColor:i,shadow:a,boxShadow:o}=e,{getArrowProps:s,getArrowInnerProps:c}=SS(),d=H3(),p=(t=n??r)!=null?t:i,g=a??o;return v.jsx(ct.div,{...s(),className:"chakra-popover__arrow-positioner",children:v.jsx(ct.div,{className:cn("chakra-popover__arrow",e.className),...c(e),__css:{"--popper-arrow-bg":p?`colors.${p}, ${p}`:void 0,"--popper-arrow-shadow":g?`shadows.${g}, ${g}`:void 0,...d.arrow}})})}q3.displayName="PopoverArrow";var NF=_t(function(t,n){const{getBodyProps:r}=SS(),i=H3();return v.jsx(ct.div,{...r(t,n),className:cn("chakra-popover__body",t.className),__css:i.body})});NF.displayName="PopoverBody";function y1e(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var b1e={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]}}},S1e=ct(Ld.section),LF=_t(function(t,n){const{variants:r=b1e,...i}=t,{isOpen:a}=SS();return v.jsx(S1e,{ref:n,variants:y1e(r),initial:!1,animate:a?"enter":"exit",...i})});LF.displayName="PopoverTransition";var Y3=_t(function(t,n){const{rootProps:r,motionProps:i,...a}=t,{getPopoverProps:o,getPopoverPositionerProps:s,onAnimationComplete:c}=SS(),d=H3(),p={position:"relative",display:"flex",flexDirection:"column",...d.content};return v.jsx(ct.div,{...s(r),__css:d.popper,className:"chakra-popover__popper",children:v.jsx(LF,{...i,...o(a,n),onAnimationComplete:Lw(c,a.onAnimationComplete),className:cn("chakra-popover__content",t.className),__css:p})})});Y3.displayName="PopoverContent";function x1e(e,t,n){return(e-t)*100/(n-t)}bp({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),bp({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});var w1e=bp({"0%":{left:"-40%"},"100%":{left:"100%"}}),C1e=bp({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function E1e(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:a,isIndeterminate:o,role:s="progressbar"}=e,c=x1e(t,n,r);return{bind:{"data-indeterminate":o?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":o?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof a=="function"?a(t,c):i})(),role:s},percent:c,value:t}}var[_1e,T1e]=Kr({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),k1e=_t((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:a,role:o,...s}=e,c=E1e({value:i,min:n,max:r,isIndeterminate:a,role:o}),p={height:"100%",...T1e().filledTrack};return v.jsx(ct.div,{ref:t,style:{width:`${c.percent}%`,...s.style},...c.bind,...s,__css:p})}),zF=_t((e,t)=>{var n;const{value:r,min:i=0,max:a=100,hasStripe:o,isAnimated:s,children:c,borderRadius:d,isIndeterminate:p,"aria-label":g,"aria-labelledby":S,"aria-valuetext":w,title:C,role:k,...P}=Si(e),D=Xo("Progress",e),M=d??((n=D.track)==null?void 0:n.borderRadius),R={animation:`${C1e} 1s linear infinite`},U={...!p&&o&&s&&R,...p&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${w1e} 1s ease infinite normal none running`}},H={overflow:"hidden",position:"relative",...D.track};return v.jsx(ct.div,{ref:t,borderRadius:M,__css:H,...P,children:v.jsxs(_1e,{value:D,children:[v.jsx(k1e,{"aria-label":g,"aria-labelledby":S,"aria-valuetext":w,min:i,max:a,value:r,isIndeterminate:p,css:U,borderRadius:M,title:C,role:k}),c]})})});zF.displayName="Progress";function P1e(e){return e&&ms(e)&&ms(e.target)}function A1e(e={}){const{onChange:t,value:n,defaultValue:r,name:i,isDisabled:a,isFocusable:o,isNative:s,...c}=e,[d,p]=A.useState(r||""),g=typeof n<"u",S=g?n:d,w=A.useRef(null),C=A.useCallback(()=>{const z=w.current;if(!z)return;let U="input:not(:disabled):checked";const H=z.querySelector(U);if(H){H.focus();return}U="input:not(:disabled)";const q=z.querySelector(U);q==null||q.focus()},[]),P=`radio-${A.useId()}`,D=i||P,M=A.useCallback(z=>{const U=P1e(z)?z.target.value:z;g||p(U),t==null||t(String(U))},[t,g]),R=A.useCallback((z={},U=null)=>({...z,ref:ti(U,w),role:"radiogroup"}),[]),L=A.useCallback((z={},U=null)=>({...z,ref:U,name:D,[s?"checked":"isChecked"]:S!=null?z.value===S:void 0,onChange(q){M(q)},"data-radiogroup":!0}),[s,D,M,S]);return{getRootProps:R,getRadioProps:L,name:D,ref:w,focus:C,setValue:p,value:S,onChange:M,isDisabled:a,isFocusable:o,htmlProps:c}}var[O1e,BF]=Kr({name:"RadioGroupContext",strict:!1}),xS=_t((e,t)=>{const{colorScheme:n,size:r,variant:i,children:a,className:o,isDisabled:s,isFocusable:c,...d}=e,{value:p,onChange:g,getRootProps:S,name:w,htmlProps:C}=A1e(d),k=A.useMemo(()=>({name:w,size:r,onChange:g,colorScheme:n,value:p,variant:i,isDisabled:s,isFocusable:c}),[w,r,g,n,p,i,s,c]);return v.jsx(O1e,{value:k,children:v.jsx(ct.div,{...S(C,t),className:cn("chakra-radio-group",o),children:a})})});xS.displayName="RadioGroup";var D1e={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function M1e(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:i,isReadOnly:a,isRequired:o,onChange:s,isInvalid:c,name:d,value:p,id:g,"data-radiogroup":S,"aria-describedby":w,...C}=e,k=`radio-${A.useId()}`,P=wv(),M=!!BF()||!!S;let L=!!P&&!M?P.id:k;L=g??L;const z=i??(P==null?void 0:P.isDisabled),U=a??(P==null?void 0:P.isReadOnly),H=o??(P==null?void 0:P.isRequired),q=c??(P==null?void 0:P.isInvalid),[J,$]=A.useState(!1),[K,fe]=A.useState(!1),[X,G]=A.useState(!1),[te,oe]=A.useState(!1),[ie,re]=A.useState(Boolean(t)),le=typeof n<"u",ee=le?n:ie;A.useEffect(()=>E7($),[]);const de=A.useCallback(qe=>{if(U||z){qe.preventDefault();return}le||re(qe.target.checked),s==null||s(qe)},[le,z,U,s]),Re=A.useCallback(qe=>{qe.key===" "&&oe(!0)},[oe]),Ae=A.useCallback(qe=>{qe.key===" "&&oe(!1)},[oe]),_e=A.useCallback((qe={},Ce=null)=>({...qe,ref:Ce,"data-active":$n(te),"data-hover":$n(X),"data-disabled":$n(z),"data-invalid":$n(q),"data-checked":$n(ee),"data-focus":$n(K),"data-focus-visible":$n(K&&J),"data-readonly":$n(U),"aria-hidden":!0,onMouseDown:Zt(qe.onMouseDown,()=>oe(!0)),onMouseUp:Zt(qe.onMouseUp,()=>oe(!1)),onMouseEnter:Zt(qe.onMouseEnter,()=>G(!0)),onMouseLeave:Zt(qe.onMouseLeave,()=>G(!1))}),[te,X,z,q,ee,K,U,J]),{onFocus:Me,onBlur:Te}=P??{},Xe=A.useCallback((qe={},Ce=null)=>{const Lt=z&&!r;return{...qe,id:L,ref:Ce,type:"radio",name:d,value:p,onChange:Zt(qe.onChange,de),onBlur:Zt(Te,qe.onBlur,()=>fe(!1)),onFocus:Zt(Me,qe.onFocus,()=>fe(!0)),onKeyDown:Zt(qe.onKeyDown,Re),onKeyUp:Zt(qe.onKeyUp,Ae),checked:ee,disabled:Lt,readOnly:U,required:H,"aria-invalid":Zf(q),"aria-disabled":Zf(Lt),"aria-required":Zf(H),"data-readonly":$n(U),"aria-describedby":w,style:D1e}},[z,r,L,d,p,de,Te,Me,Re,Ae,ee,U,H,q,w]);return{state:{isInvalid:q,isFocused:K,isChecked:ee,isActive:te,isHovered:X,isDisabled:z,isReadOnly:U,isRequired:H},getCheckboxProps:_e,getInputProps:Xe,getLabelProps:(qe={},Ce=null)=>({...qe,ref:Ce,onMouseDown:Zt(qe.onMouseDown,FF),onTouchStart:Zt(qe.onTouchStart,FF),"data-disabled":$n(z),"data-checked":$n(ee),"data-invalid":$n(q)}),getRootProps:(qe,Ce=null)=>({...qe,ref:Ce,"data-disabled":$n(z),"data-checked":$n(ee),"data-invalid":$n(q)}),htmlProps:C}}function FF(e){e.preventDefault(),e.stopPropagation()}function j1e(e,t){const n={},r={};for(const[i,a]of Object.entries(e))t.includes(i)?n[i]=a:r[i]=a;return[n,r]}var Gs=_t((e,t)=>{var n;const r=BF(),{onChange:i,value:a}=e,o=Xo("Radio",{...r,...e}),s=Si(e),{spacing:c="0.5rem",children:d,isDisabled:p=r==null?void 0:r.isDisabled,isFocusable:g=r==null?void 0:r.isFocusable,inputProps:S,...w}=s;let C=e.isChecked;(r==null?void 0:r.value)!=null&&a!=null&&(C=r.value===a);let k=i;r!=null&&r.onChange&&a!=null&&(k=Lw(r.onChange,i));const P=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:D,getCheckboxProps:M,getLabelProps:R,getRootProps:L,htmlProps:z}=M1e({...w,isChecked:C,isFocusable:g,isDisabled:p,onChange:k,name:P}),[U,H]=j1e(z,TL),q=M(H),J=D(S,t),$=R(),K=Object.assign({},U,L()),fe={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...o.container},X={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...o.control},G={userSelect:"none",marginStart:c,...o.label};return v.jsxs(ct.label,{className:"chakra-radio",...K,__css:fe,children:[v.jsx("input",{className:"chakra-radio__input",...J}),v.jsx(ct.span,{className:"chakra-radio__control",...q,__css:X}),d&&v.jsx(ct.span,{className:"chakra-radio__label",...$,__css:G,children:d})]})});Gs.displayName="Radio";var UF=_t(function(t,n){const{children:r,placeholder:i,className:a,...o}=t;return v.jsxs(ct.select,{...o,ref:n,className:cn("chakra-select",a),children:[i&&v.jsx("option",{value:"",children:i}),r]})});UF.displayName="SelectField";function I1e(e,t){const n={},r={};for(const[i,a]of Object.entries(e))t.includes(i)?n[i]=a:r[i]=a;return[n,r]}var HF=_t((e,t)=>{var n;const r=Xo("Select",e),{rootProps:i,placeholder:a,icon:o,color:s,height:c,h:d,minH:p,minHeight:g,iconColor:S,iconSize:w,...C}=Si(e),[k,P]=I1e(C,TL),D=AP(P),M={width:"100%",height:"fit-content",position:"relative",color:s},R={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return v.jsxs(ct.div,{className:"chakra-select__wrapper",__css:M,...k,...i,children:[v.jsx(UF,{ref:t,height:d??c,minH:p??g,placeholder:a,...D,__css:R,children:e.children}),v.jsx(VF,{"data-disabled":$n(D.disabled),...(S||s)&&{color:S||s},__css:r.icon,...w&&{fontSize:w},children:o})]})});HF.displayName="Select";var R1e=e=>v.jsx("svg",{viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),N1e=ct("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),VF=e=>{const{children:t=v.jsx(R1e,{}),...n}=e,r=A.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return v.jsx(N1e,{...n,className:"chakra-select__icon-wrapper",children:A.isValidElement(t)?r:null})};VF.displayName="SelectIcon";var uy=e=>e?"":void 0,K3=e=>e?!0:void 0,wS=(...e)=>e.filter(Boolean).join(" ");function X3(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function eE(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var tE={width:0,height:0},nE=e=>e||tE;function L1e(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,a=k=>{var P;const D=(P=r[k])!=null?P:tE;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...eE({orientation:t,vertical:{bottom:`calc(${n[k]}% - ${D.height/2}px)`},horizontal:{left:`calc(${n[k]}% - ${D.width/2}px)`}})}},o=t==="vertical"?r.reduce((k,P)=>nE(k).height>nE(P).height?k:P,tE):r.reduce((k,P)=>nE(k).width>nE(P).width?k:P,tE),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...eE({orientation:t,vertical:o?{paddingLeft:o.width/2,paddingRight:o.width/2}:{},horizontal:o?{paddingTop:o.height/2,paddingBottom:o.height/2}:{}})},c={position:"absolute",...eE({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},d=n.length===1,p=[0,i?100-n[0]:n[0]],g=d?p:n;let S=g[0];!d&&i&&(S=100-S);const w=Math.abs(g[g.length-1]-g[0]),C={...c,...eE({orientation:t,vertical:i?{height:`${w}%`,top:`${S}%`}:{height:`${w}%`,bottom:`${S}%`},horizontal:i?{width:`${w}%`,right:`${S}%`}:{width:`${w}%`,left:`${S}%`}})};return{trackStyle:c,innerTrackStyle:C,rootStyle:s,getThumbStyle:a}}function z1e(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function B1e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function F1e(e){const t=H1e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function GF(e){return!!e.touches}function U1e(e){return GF(e)&&e.touches.length>1}function H1e(e){var t;return(t=e.view)!=null?t:window}function V1e(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function G1e(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function WF(e,t="page"){return GF(e)?V1e(e,t):G1e(e,t)}function W1e(e){return t=>{const n=F1e(t);(!n||n&&t.button===0)&&e(t)}}function q1e(e,t=!1){function n(i){e(i,{point:WF(i)})}return t?W1e(n):n}function rE(e,t,n,r){return B1e(e,t,q1e(n,t==="pointerdown"),r)}var Y1e=Object.defineProperty,K1e=(e,t,n)=>t in e?Y1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fc=(e,t,n)=>(K1e(e,typeof t!="symbol"?t+"":t,n),n),X1e=class{constructor(e,t,n){Fc(this,"history",[]),Fc(this,"startEvent",null),Fc(this,"lastEvent",null),Fc(this,"lastEventInfo",null),Fc(this,"handlers",{}),Fc(this,"removeListeners",()=>{}),Fc(this,"threshold",3),Fc(this,"win"),Fc(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const s=Q3(this.lastEventInfo,this.history),c=this.startEvent!==null,d=$1e(s.offset,{x:0,y:0})>=this.threshold;if(!c&&!d)return;const{timestamp:p}=k8();this.history.push({...s.point,timestamp:p});const{onStart:g,onMove:S}=this.handlers;c||(g==null||g(this.lastEvent,s),this.startEvent=this.lastEvent),S==null||S(this.lastEvent,s)}),Fc(this,"onPointerMove",(s,c)=>{this.lastEvent=s,this.lastEventInfo=c,dce.update(this.updatePoint,!0)}),Fc(this,"onPointerUp",(s,c)=>{const d=Q3(c,this.history),{onEnd:p,onSessionEnd:g}=this.handlers;g==null||g(s,d),this.end(),!(!p||!this.startEvent)&&(p==null||p(s,d))});var r;if(this.win=(r=e.view)!=null?r:window,U1e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const i={point:WF(e)},{timestamp:a}=k8();this.history=[{...i.point,timestamp:a}];const{onSessionStart:o}=t;o==null||o(e,Q3(i,this.history)),this.removeListeners=J1e(rE(this.win,"pointermove",this.onPointerMove),rE(this.win,"pointerup",this.onPointerUp),rE(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),fce.update(this.updatePoint)}};function qF(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Q3(e,t){return{point:e.point,delta:qF(e.point,t[t.length-1]),offset:qF(e.point,t[0]),velocity:Z1e(t,.1)}}var Q1e=e=>e*1e3;function Z1e(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>Q1e(t)));)n--;if(!r)return{x:0,y:0};const a=(i.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function J1e(...e){return t=>e.reduce((n,r)=>r(n),t)}function Z3(e,t){return Math.abs(e-t)}function YF(e){return"x"in e&&"y"in e}function $1e(e,t){if(typeof e=="number"&&typeof t=="number")return Z3(e,t);if(YF(e)&&YF(t)){const n=Z3(e.x,t.x),r=Z3(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function KF(e){const t=A.useRef(null);return t.current=e,t}function eSe(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:a,onPanSessionEnd:o,threshold:s}=t,c=Boolean(n||r||i||a||o),d=A.useRef(null),p=KF({onSessionStart:a,onSessionEnd:o,onStart:r,onMove:n,onEnd(g,S){d.current=null,i==null||i(g,S)}});A.useEffect(()=>{var g;(g=d.current)==null||g.updateHandlers(p.current)}),A.useEffect(()=>{const g=e.current;if(!g||!c)return;function S(w){d.current=new X1e(w,p.current,s)}return rE(g,"pointerdown",S)},[e,c,p,s]),A.useEffect(()=>()=>{var g;(g=d.current)==null||g.end(),d.current=null},[])}function tSe(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(a=>{if(!Array.isArray(a)||!a.length)return;const[o]=a;let s,c;if("borderBoxSize"in o){const d=o.borderBoxSize,p=Array.isArray(d)?d[0]:d;s=p.inlineSize,c=p.blockSize}else s=e.offsetWidth,c=e.offsetHeight;t({width:s,height:c})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}var nSe=Boolean(globalThis==null?void 0:globalThis.document)?A.useLayoutEffect:A.useEffect;function rSe(e,t){var n,r;if(!e||!e.parentElement)return;const i=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,a=new i.MutationObserver(()=>{t()});return a.observe(e.parentElement,{childList:!0}),()=>{a.disconnect()}}function iSe({getNodes:e,observeMutation:t=!0}){const[n,r]=A.useState([]),[i,a]=A.useState(0);return nSe(()=>{const o=e(),s=o.map((c,d)=>tSe(c,p=>{r(g=>[...g.slice(0,d),p,...g.slice(d+1)])}));if(t){const c=o[0];s.push(rSe(c,()=>{a(d=>d+1)}))}return()=>{s.forEach(c=>{c==null||c()})}},[i]),n}function aSe(e){return typeof e=="object"&&e!==null&&"current"in e}function oSe(e){const[t]=iSe({observeMutation:!1,getNodes(){return[aSe(e)?e.current:e]}});return t}function sSe(e){var t;const{min:n=0,max:r=100,onChange:i,value:a,defaultValue:o,isReversed:s,direction:c="ltr",orientation:d="horizontal",id:p,isDisabled:g,isReadOnly:S,onChangeStart:w,onChangeEnd:C,step:k=1,getAriaValueText:P,"aria-valuetext":D,"aria-label":M,"aria-labelledby":R,name:L,focusThumbOnChange:z=!0,...U}=e,H=Ra(w),q=Ra(C),J=Ra(P),$=z1e({isReversed:s,direction:c,orientation:d}),[K,fe]=wP({value:a,defaultValue:o??uSe(n,r),onChange:i}),[X,G]=A.useState(!1),[te,oe]=A.useState(!1),ie=!(g||S),re=(r-n)/10,le=k||(r-n)/100,ee=IC(K,n,r),de=r-ee+n,Ae=P7($?de:ee,n,r),_e=d==="vertical",Me=KF({min:n,max:r,step:k,isDisabled:g,value:ee,isInteractive:ie,isReversed:$,isVertical:_e,eventSource:null,focusThumbOnChange:z,orientation:d}),Te=A.useRef(null),Xe=A.useRef(null),Qe=A.useRef(null),vt=A.useId(),St=p??vt,[qe,Ce]=[`slider-thumb-${St}`,`slider-track-${St}`],Lt=A.useCallback(Ge=>{var mt,Ft;if(!Te.current)return;const In=Me.current;In.eventSource="pointer";const Hn=Te.current.getBoundingClientRect(),{clientX:jt,clientY:zt}=(Ft=(mt=Ge.touches)==null?void 0:mt[0])!=null?Ft:Ge,vr=_e?Hn.bottom-zt:jt-Hn.left,gr=_e?Hn.height:Hn.width;let hn=vr/gr;$&&(hn=1-hn);let ri=Mve(hn,In.min,In.max);return In.step&&(ri=parseFloat(A7(ri,In.min,In.step))),ri=IC(ri,In.min,In.max),ri},[_e,$,Me]),De=A.useCallback(Ge=>{const mt=Me.current;mt.isInteractive&&(Ge=parseFloat(A7(Ge,mt.min,le)),Ge=IC(Ge,mt.min,mt.max),fe(Ge))},[le,fe,Me]),wt=A.useMemo(()=>({stepUp(Ge=le){const mt=$?ee-Ge:ee+Ge;De(mt)},stepDown(Ge=le){const mt=$?ee+Ge:ee-Ge;De(mt)},reset(){De(o||0)},stepTo(Ge){De(Ge)}}),[De,$,ee,le,o]),ln=A.useCallback(Ge=>{const mt=Me.current,In={ArrowRight:()=>wt.stepUp(),ArrowUp:()=>wt.stepUp(),ArrowLeft:()=>wt.stepDown(),ArrowDown:()=>wt.stepDown(),PageUp:()=>wt.stepUp(re),PageDown:()=>wt.stepDown(re),Home:()=>De(mt.min),End:()=>De(mt.max)}[Ge.key];In&&(Ge.preventDefault(),Ge.stopPropagation(),In(Ge),mt.eventSource="keyboard")},[wt,De,re,Me]),Wt=(t=J==null?void 0:J(ee))!=null?t:D,Rn=oSe(Xe),{getThumbStyle:ar,rootStyle:xe,trackStyle:it,innerTrackStyle:at}=A.useMemo(()=>{const Ge=Me.current,mt=Rn??{width:0,height:0};return L1e({isReversed:$,orientation:Ge.orientation,thumbRects:[mt],thumbPercents:[Ae]})},[$,Rn,Ae,Me]),bt=A.useCallback(()=>{Me.current.focusThumbOnChange&&setTimeout(()=>{var mt;return(mt=Xe.current)==null?void 0:mt.focus()})},[Me]);rh(()=>{const Ge=Me.current;bt(),Ge.eventSource==="keyboard"&&(q==null||q(Ge.value))},[ee,q]);function Ve(Ge){const mt=Lt(Ge);mt!=null&&mt!==Me.current.value&&fe(mt)}eSe(Qe,{onPanSessionStart(Ge){const mt=Me.current;mt.isInteractive&&(G(!0),bt(),Ve(Ge),H==null||H(mt.value))},onPanSessionEnd(){const Ge=Me.current;Ge.isInteractive&&(G(!1),q==null||q(Ge.value))},onPan(Ge){Me.current.isInteractive&&Ve(Ge)}});const ot=A.useCallback((Ge={},mt=null)=>({...Ge,...U,ref:ti(mt,Qe),tabIndex:-1,"aria-disabled":K3(g),"data-focused":uy(te),style:{...Ge.style,...xe}}),[U,g,te,xe]),Jt=A.useCallback((Ge={},mt=null)=>({...Ge,ref:ti(mt,Te),id:Ce,"data-disabled":uy(g),style:{...Ge.style,...it}}),[g,Ce,it]),rn=A.useCallback((Ge={},mt=null)=>({...Ge,ref:mt,style:{...Ge.style,...at}}),[at]),$e=A.useCallback((Ge={},mt=null)=>({...Ge,ref:ti(mt,Xe),role:"slider",tabIndex:ie?0:void 0,id:qe,"data-active":uy(X),"aria-valuetext":Wt,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":ee,"aria-orientation":d,"aria-disabled":K3(g),"aria-readonly":K3(S),"aria-label":M,"aria-labelledby":M?void 0:R,style:{...Ge.style,...ar(0)},onKeyDown:X3(Ge.onKeyDown,ln),onFocus:X3(Ge.onFocus,()=>oe(!0)),onBlur:X3(Ge.onBlur,()=>oe(!1))}),[ie,qe,X,Wt,n,r,ee,d,g,S,M,R,ar,ln]),an=A.useCallback((Ge,mt=null)=>{const Ft=!(Ge.valuer),In=ee>=Ge.value,Hn=P7(Ge.value,n,r),jt={position:"absolute",pointerEvents:"none",...lSe({orientation:d,vertical:{bottom:$?`${100-Hn}%`:`${Hn}%`},horizontal:{left:$?`${100-Hn}%`:`${Hn}%`}})};return{...Ge,ref:mt,role:"presentation","aria-hidden":!0,"data-disabled":uy(g),"data-invalid":uy(!Ft),"data-highlighted":uy(In),style:{...Ge.style,...jt}}},[g,$,r,n,d,ee]),Nn=A.useCallback((Ge={},mt=null)=>({...Ge,ref:mt,type:"hidden",value:ee,name:L}),[L,ee]);return{state:{value:ee,isFocused:te,isDragging:X},actions:wt,getRootProps:ot,getTrackProps:Jt,getInnerTrackProps:rn,getThumbProps:$e,getMarkerProps:an,getInputProps:Nn}}function lSe(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function uSe(e,t){return t"}),[dSe,aE]=Kr({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),XF=_t((e,t)=>{const n={orientation:"horizontal",...e},r=Xo("Slider",n),i=Si(n),{direction:a}=Sp();i.direction=a;const{getInputProps:o,getRootProps:s,...c}=sSe(i),d=s(),p=o({},t);return v.jsx(cSe,{value:c,children:v.jsx(dSe,{value:r,children:v.jsxs(ct.div,{...d,className:wS("chakra-slider",n.className),__css:r.container,children:[n.children,v.jsx("input",{...p})]})})})});XF.displayName="Slider";var QF=_t((e,t)=>{const{getThumbProps:n}=iE(),r=aE(),i=n(e,t);return v.jsx(ct.div,{...i,className:wS("chakra-slider__thumb",e.className),__css:r.thumb})});QF.displayName="SliderThumb";var ZF=_t((e,t)=>{const{getTrackProps:n}=iE(),r=aE(),i=n(e,t);return v.jsx(ct.div,{...i,className:wS("chakra-slider__track",e.className),__css:r.track})});ZF.displayName="SliderTrack";var JF=_t((e,t)=>{const{getInnerTrackProps:n}=iE(),r=aE(),i=n(e,t);return v.jsx(ct.div,{...i,className:wS("chakra-slider__filled-track",e.className),__css:r.filledTrack})});JF.displayName="SliderFilledTrack";var J3=_t((e,t)=>{const{getMarkerProps:n}=iE(),r=aE(),i=n(e,t);return v.jsx(ct.div,{...i,className:wS("chakra-slider__marker",e.className),__css:r.mark})});J3.displayName="SliderMark";var $F=_t(function(t,n){const r=Xo("Switch",t),{spacing:i="0.5rem",children:a,...o}=Si(t),{state:s,getInputProps:c,getCheckboxProps:d,getRootProps:p,getLabelProps:g}=_7(o),S=A.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),w=A.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),C=A.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return v.jsxs(ct.label,{...p(),className:cn("chakra-switch",t.className),__css:S,children:[v.jsx("input",{className:"chakra-switch__input",...c({},n)}),v.jsx(ct.span,{...d(),className:"chakra-switch__track",__css:w,children:v.jsx(ct.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":$n(s.isChecked),"data-hover":$n(s.isHovered)})}),a&&v.jsx(ct.span,{className:"chakra-switch__label",...g(),__css:C,children:a})]})});$F.displayName="Switch";var[fSe,hSe,pSe,mSe]=SP();function vSe(e){var t;const{defaultIndex:n,onChange:r,index:i,isManual:a,isLazy:o,lazyBehavior:s="unmount",orientation:c="horizontal",direction:d="ltr",...p}=e,[g,S]=A.useState(n??0),[w,C]=wP({defaultValue:n??0,value:i,onChange:r});A.useEffect(()=>{i!=null&&S(i)},[i]);const k=pSe(),P=A.useId();return{id:`tabs-${(t=e.id)!=null?t:P}`,selectedIndex:w,focusedIndex:g,setSelectedIndex:C,setFocusedIndex:S,isManual:a,isLazy:o,lazyBehavior:s,orientation:c,descendants:k,direction:d,htmlProps:p}}var[gSe,oE]=Kr({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function ySe(e){const{focusedIndex:t,orientation:n,direction:r}=oE(),i=hSe(),a=A.useCallback(o=>{const s=()=>{var M;const R=i.nextEnabled(t);R&&((M=R.node)==null||M.focus())},c=()=>{var M;const R=i.prevEnabled(t);R&&((M=R.node)==null||M.focus())},d=()=>{var M;const R=i.firstEnabled();R&&((M=R.node)==null||M.focus())},p=()=>{var M;const R=i.lastEnabled();R&&((M=R.node)==null||M.focus())},g=n==="horizontal",S=n==="vertical",w=o.key,C=r==="ltr"?"ArrowLeft":"ArrowRight",k=r==="ltr"?"ArrowRight":"ArrowLeft",D={[C]:()=>g&&c(),[k]:()=>g&&s(),ArrowDown:()=>S&&s(),ArrowUp:()=>S&&c(),Home:d,End:p}[w];D&&(o.preventDefault(),D(o))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:Zt(e.onKeyDown,a)}}function bSe(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:a,id:o,setFocusedIndex:s,selectedIndex:c}=oE(),{index:d,register:p}=mSe({disabled:t&&!n}),g=d===c,S=()=>{i(d)},w=()=>{s(d),!a&&!(t&&n)&&i(d)},C=FB({...r,ref:ti(p,e.ref),isDisabled:t,isFocusable:n,onClick:Zt(e.onClick,S)}),k="button";return{...C,id:eU(o,d),role:"tab",tabIndex:g?0:-1,type:k,"aria-selected":g,"aria-controls":tU(o,d),onFocus:t?void 0:Zt(e.onFocus,w)}}var[SSe,xSe]=Kr({});function wSe(e){const t=oE(),{id:n,selectedIndex:r}=t,a=kP(e.children).map((o,s)=>A.createElement(SSe,{key:s,value:{isSelected:s===r,id:tU(n,s),tabId:eU(n,s),selectedIndex:r}},o));return{...e,children:a}}function CSe(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=oE(),{isSelected:a,id:o,tabId:s}=xSe(),c=A.useRef(!1);a&&(c.current=!0);const d=T3({wasSelected:c.current,isSelected:a,enabled:r,mode:i});return{tabIndex:0,...n,children:d?t:null,role:"tabpanel","aria-labelledby":s,hidden:!a,id:o}}function eU(e,t){return`${e}--tab-${t}`}function tU(e,t){return`${e}--tabpanel-${t}`}var[ESe,sE]=Kr({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),nU=_t(function(t,n){const r=Xo("Tabs",t),{children:i,className:a,...o}=Si(t),{htmlProps:s,descendants:c,...d}=vSe(o),p=A.useMemo(()=>d,[d]),{isFitted:g,...S}=s;return v.jsx(fSe,{value:c,children:v.jsx(gSe,{value:p,children:v.jsx(ESe,{value:r,children:v.jsx(ct.div,{className:cn("chakra-tabs",a),ref:n,...S,__css:r.root,children:i})})})})});nU.displayName="Tabs";var rU=_t(function(t,n){const r=ySe({...t,ref:n}),a={display:"flex",...sE().tablist};return v.jsx(ct.div,{...r,className:cn("chakra-tabs__tablist",t.className),__css:a})});rU.displayName="TabList";var iU=_t(function(t,n){const r=CSe({...t,ref:n}),i=sE();return v.jsx(ct.div,{outline:"0",...r,className:cn("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});iU.displayName="TabPanel";var aU=_t(function(t,n){const r=wSe(t),i=sE();return v.jsx(ct.div,{...r,width:"100%",ref:n,className:cn("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});aU.displayName="TabPanels";var oU=_t(function(t,n){const r=sE(),i=bSe({...t,ref:n}),a={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return v.jsx(ct.button,{...i,className:cn("chakra-tabs__tab",t.className),__css:a})});oU.displayName="Tab";function _Se(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var TSe=["h","minH","height","minHeight"],$3=_t((e,t)=>{const n=Bu("Textarea",e),{className:r,rows:i,...a}=Si(e),o=AP(a),s=i?_Se(n,TSe):n;return v.jsx(ct.textarea,{ref:t,rows:i,...o,className:cn("chakra-textarea",r),__css:s})});$3.displayName="Textarea";var kSe={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]}}}},lE=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},eA=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function PSe(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:a,closeOnPointerDown:o=i,closeOnEsc:s=!0,onOpen:c,onClose:d,placement:p,id:g,isOpen:S,defaultIsOpen:w,arrowSize:C=10,arrowShadowColor:k,arrowPadding:P,modifiers:D,isDisabled:M,gutter:R,offset:L,direction:z,...U}=e,{isOpen:H,onOpen:q,onClose:J}=E3({isOpen:S,defaultIsOpen:w,onOpen:c,onClose:d}),{referenceRef:$,getPopperProps:K,getArrowInnerProps:fe,getArrowProps:X}=C3({enabled:H,placement:p,arrowPadding:P,modifiers:D,gutter:R,offset:L,direction:z}),G=A.useId(),oe=`tooltip-${g??G}`,ie=A.useRef(null),re=A.useRef(),le=A.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=void 0)},[]),ee=A.useRef(),de=A.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=void 0)},[]),Re=A.useCallback(()=>{de(),J()},[J,de]),Ae=ASe(ie,Re),_e=A.useCallback(()=>{if(!M&&!re.current){Ae();const Ce=eA(ie);re.current=Ce.setTimeout(q,t)}},[Ae,M,q,t]),Me=A.useCallback(()=>{le();const Ce=eA(ie);ee.current=Ce.setTimeout(Re,n)},[n,Re,le]),Te=A.useCallback(()=>{H&&r&&Me()},[r,Me,H]),Xe=A.useCallback(()=>{H&&o&&Me()},[o,Me,H]),Qe=A.useCallback(Ce=>{H&&Ce.key==="Escape"&&Me()},[H,Me]);Ev(()=>lE(ie),"keydown",s?Qe:void 0),Ev(()=>lE(ie),"scroll",()=>{H&&a&&Re()}),A.useEffect(()=>{M&&(le(),H&&J())},[M,H,J,le]),A.useEffect(()=>()=>{le(),de()},[le,de]),Ev(()=>ie.current,"pointerleave",Me);const vt=A.useCallback((Ce={},Lt=null)=>({...Ce,ref:ti(ie,Lt,$),onPointerEnter:Zt(Ce.onPointerEnter,wt=>{wt.pointerType!=="touch"&&_e()}),onClick:Zt(Ce.onClick,Te),onPointerDown:Zt(Ce.onPointerDown,Xe),onFocus:Zt(Ce.onFocus,_e),onBlur:Zt(Ce.onBlur,Me),"aria-describedby":H?oe:void 0}),[_e,Me,Xe,H,oe,Te,$]),St=A.useCallback((Ce={},Lt=null)=>K({...Ce,style:{...Ce.style,[$a.arrowSize.var]:C?`${C}px`:void 0,[$a.arrowShadowColor.var]:k}},Lt),[K,C,k]),qe=A.useCallback((Ce={},Lt=null)=>{const De={...Ce.style,position:"relative",transformOrigin:$a.transformOrigin.varRef};return{ref:Lt,...U,...Ce,id:oe,role:"tooltip",style:De}},[U,oe]);return{isOpen:H,show:_e,hide:Me,getTriggerProps:vt,getTooltipProps:qe,getTooltipPositionerProps:St,getArrowProps:X,getArrowInnerProps:fe}}var tA="chakra-ui:close-tooltip";function ASe(e,t){return A.useEffect(()=>{const n=lE(e);return n.addEventListener(tA,t),()=>n.removeEventListener(tA,t)},[t,e]),()=>{const n=lE(e),r=eA(e);n.dispatchEvent(new r.CustomEvent(tA))}}function OSe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function DSe(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var MSe=ct(Ld.div),so=_t((e,t)=>{var n,r;const i=Bu("Tooltip",e),a=Si(e),o=Sp(),{children:s,label:c,shouldWrapChildren:d,"aria-label":p,hasArrow:g,bg:S,portalProps:w,background:C,backgroundColor:k,bgColor:P,motionProps:D,...M}=a,R=(r=(n=C??k)!=null?n:S)!=null?r:P;if(R){i.bg=R;const K=jre(o,"colors",R);i[$a.arrowBg.var]=K}const L=PSe({...M,direction:o.direction}),z=typeof s=="string"||d;let U;if(z)U=v.jsx(ct.span,{display:"inline-block",tabIndex:0,...L.getTriggerProps(),children:s});else{const K=A.Children.only(s);U=A.cloneElement(K,L.getTriggerProps(K.props,K.ref))}const H=!!p,q=L.getTooltipProps({},t),J=H?OSe(q,["role","id"]):q,$=DSe(q,["role","id"]);return c?v.jsxs(v.Fragment,{children:[U,v.jsx(bv,{children:L.isOpen&&v.jsx(ov,{...w,children:v.jsx(ct.div,{...L.getTooltipPositionerProps(),__css:{zIndex:i.zIndex,pointerEvents:"none"},children:v.jsxs(MSe,{variants:kSe,initial:"exit",animate:"enter",exit:"exit",...D,...J,__css:i,children:[c,H&&v.jsx(ct.span,{srOnly:!0,...$,children:p}),g&&v.jsx(ct.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:v.jsx(ct.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]})})})})]}):v.jsx(v.Fragment,{children:s})});so.displayName="Tooltip";const sU=e=>{const{t}=ht(),{showText:n=!1,text:r=t("common.loadingInvokeAI")}=e;return v.jsxs(Fe,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",bg:"#121212",flexDirection:"column",rowGap:4,children:[v.jsx(z0,{color:"grey",w:"5rem",h:"5rem"}),n&&v.jsx(Yt,{color:"grey",fontWeight:"semibold",fontFamily:"'Inter', sans-serif",children:r})]})},jSe=A.lazy(()=>Promise.resolve().then(()=>AOe)),ISe=A.lazy(()=>Promise.resolve().then(()=>NMe));function RSe(){return v.jsx(A.StrictMode,{children:v.jsx(Hq,{store:PN,children:v.jsx(WM,{loading:v.jsx(sU,{}),persistor:AN,children:v.jsx(A.Suspense,{fallback:v.jsx(sU,{showText:!0}),children:v.jsx(ISe,{children:v.jsx(jSe,{})})})})})})}const nA=A.createContext(null),nt=Wq,we=Oq;let lU;const rA=()=>({setOpenUploader:e=>{e&&(lU=e)},openUploader:lU}),Na=Gt(e=>e.ui,e=>Nk[e.activeTab],{memoizeOptions:{equalityCheck:Je.isEqual}}),NSe=Gt(e=>e.ui,e=>e.activeTab,{memoizeOptions:{equalityCheck:Je.isEqual}}),Ov=Gt(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:Je.isEqual}}),uU=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),a=Na(i),o=new FormData;o.append("file",r,r.name),o.append("data",JSON.stringify({kind:"init"}));const c=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:o})).json(),d={uuid:b0(),category:"user",...c};t(r0({image:d,category:"user"})),a==="unifiedCanvas"?t(M2(d)):a==="img2img"&&t(a0(d))},iA=e=>{const{children:t}=e;return v.jsx(Fe,{sx:{width:"100%",height:"100%",bg:"base.850"},children:t})};function LSe(){const{t:e}=ht();return v.jsx(iA,{children:v.jsxs(Fe,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[v.jsx(Vu,{children:e("common.nodes")}),v.jsx(jn,{maxW:"50rem",gap:4,children:v.jsx(Yt,{children:e("common.nodesDesc")})})]})})}const zSe=()=>{const{t:e}=ht();return v.jsx(iA,{children:v.jsxs(Fe,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[v.jsx(Vu,{children:e("common.postProcessing")}),v.jsxs(jn,{maxW:"50rem",gap:4,children:[v.jsx(Yt,{children:e("common.postProcessDesc1")}),v.jsx(Yt,{children:e("common.postProcessDesc2")}),v.jsx(Yt,{children:e("common.postProcessDesc3")})]})]})})};function BSe(){const{t:e}=ht();return v.jsx(iA,{children:v.jsxs(Fe,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",w:"100%",h:"100%",gap:4,textAlign:"center"},children:[v.jsx(Vu,{children:e("common.training")}),v.jsxs(jn,{maxW:"50rem",gap:4,children:[v.jsx(Yt,{children:e("common.trainingDesc1")}),v.jsx(Yt,{children:e("common.trainingDesc2")})]})]})})}function FSe(e){const{i18n:t}=ht(),n=localStorage.getItem("i18nextLng");A.useEffect(()=>{e()},[e]),A.useEffect(()=>{t.on("languageChanged",()=>{e()})},[e,t,n])}const kt=_t((e,t)=>{const{tooltip:n="",tooltipProps:r,isChecked:i,...a}=e;return v.jsx(so,{label:n,hasArrow:!0,...r,...r!=null&&r.placement?{placement:r.placement}:{placement:"top"},children:v.jsx(Dp,{ref:t,"aria-checked":i!==void 0?i:void 0,...a})})}),mr=_t((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,isChecked:a,...o}=e;return v.jsx(so,{label:r,...i,children:v.jsx(xv,{ref:t,"aria-checked":a,...o,children:n})})}),Uc=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:i=!0,...a}=e;return v.jsxs(W3,{isLazy:i,...a,children:[v.jsx(V3,{children:t}),v.jsxs(Y3,{children:[r&&v.jsx(q3,{}),n]})]})},uE=Gt(e=>e.lightbox,e=>e,{memoizeOptions:{equalityCheck:Je.isEqual}}),xl=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:a,...o}=e;return v.jsxs(Or,{isDisabled:n,onClick:s=>{s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),s.nativeEvent.stopPropagation(),s.nativeEvent.cancelBubble=!0},children:[t&&v.jsx(Qr,{children:t}),v.jsx(so,{label:i,...a,children:v.jsx(HF,{...o,children:r.map(s=>typeof s=="string"||typeof s=="number"?v.jsx("option",{value:s,children:s},s):v.jsx("option",{value:s.value,children:s.key},s.value))})})]})};function USe(){const e=we(i=>i.postprocessing.facetoolType),t=nt(),{t:n}=ht(),r=i=>t(V2(i.target.value));return v.jsx(xl,{label:n("parameters.type"),validValues:uJ.concat(),value:e,onChange:r})}var cU={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dU=A.createContext&&A.createContext(cU),zp=globalThis&&globalThis.__assign||function(){return zp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{re(i)},[i]);const le=A.useMemo(()=>K!=null&&K.max?K.max:o,[o,K==null?void 0:K.max]),ee=_e=>{c(_e)},de=_e=>{_e.target.value===""&&(_e.target.value=String(a));const Me=Je.clamp(S?Math.floor(Number(_e.target.value)):Number(ie),a,le);c(Me)},Re=_e=>{re(_e)},Ae=()=>{M&&M()};return v.jsxs(Or,{sx:D?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:4,margin:0,padding:0}:{},...U,children:[v.jsx(Qr,{...H,mb:-1,children:r}),v.jsxs(Z0,{w:"100%",gap:2,alignItems:"center",children:[v.jsxs(XF,{"aria-label":r,value:i,min:a,max:o,step:s,onChange:ee,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:L,...oe,children:[p&&v.jsxs(v.Fragment,{children:[v.jsx(J3,{value:a,insetInlineStart:0,sx:{insetInlineStart:"unset !important"},...q,children:a}),v.jsx(J3,{value:o,insetInlineEnd:0,sx:{insetInlineStart:"unset !important"},...q,children:o})]}),v.jsx(ZF,{...J,children:v.jsx(JF,{})}),v.jsx(so,{hasArrow:!0,placement:"top",isOpen:t,label:`${i}${d}`,hidden:P,...G,children:v.jsx(QF,{...$})})]}),g&&v.jsxs(L3,{min:a,max:le,step:s,value:ie,onChange:Re,onBlur:de,isDisabled:z,...K,children:[v.jsx(B3,{readOnly:C,minWidth:w,...fe}),v.jsxs(z3,{...X,children:[v.jsx(U3,{onClick:()=>c(Number(ie))}),v.jsx(F3,{onClick:()=>c(Number(ie))})]})]}),k&&v.jsx(kt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:v.jsx(aA,{}),onClick:Ae,isDisabled:R,...te})]})]})}function XSe(){const e=we(i=>i.system.isGFPGANAvailable),t=we(i=>i.postprocessing.facetoolStrength),{t:n}=ht(),r=nt();return v.jsx(ni,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.strength"),step:.05,min:0,max:1,onChange:i=>r(H2(i)),handleReset:()=>r(H2(.75)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}function QSe(){const e=we(i=>i.system.isGFPGANAvailable),t=we(i=>i.postprocessing.codeformerFidelity),{t:n}=ht(),r=nt();return v.jsx(ni,{isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e,label:n("parameters.codeformerFidelity"),step:.05,min:0,max:1,onChange:i=>r(Ck(i)),handleReset:()=>r(Ck(1)),value:t,withReset:!0,withSliderMarks:!0,withInput:!0})}const oA=()=>{const e=we(t=>t.postprocessing.facetoolType);return v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(USe,{}),v.jsx(XSe,{}),e==="codeformer"&&v.jsx(QSe,{})]})};function ZSe(){const e=we(i=>i.system.isESRGANAvailable),t=we(i=>i.postprocessing.upscalingDenoising),{t:n}=ht(),r=nt();return v.jsx(ni,{label:n("parameters.denoisingStrength"),value:t,min:0,max:1,step:.01,onChange:i=>{r(Ek(i))},handleReset:()=>r(Ek(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function JSe(){const e=we(i=>i.system.isESRGANAvailable),t=we(i=>i.postprocessing.upscalingStrength),{t:n}=ht(),r=nt();return v.jsx(ni,{label:`${n("parameters.upscale")} ${n("parameters.strength")}`,value:t,min:0,max:1,step:.05,onChange:i=>r(_k(i)),handleReset:()=>r(_k(.75)),withSliderMarks:!0,withInput:!0,withReset:!0,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})}function $Se(){const e=we(a=>a.system.isESRGANAvailable),t=we(a=>a.postprocessing.upscalingLevel),{t:n}=ht(),r=nt(),i=a=>r(Hj(Number(a.target.value)));return v.jsx(xl,{isDisabled:!e,label:n("parameters.scale"),value:t,onChange:i,validValues:lJ})}const sA=()=>v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx($Se,{}),v.jsx(ZSe,{}),v.jsx(JSe,{})]}),lA=e=>e.postprocessing,zi=e=>e.system,exe=e=>e.system.toastQueue,pU=Gt(zi,e=>{const{model_list:t}=e,n=Je.reduce(t,(r,i,a)=>(i.status==="active"&&(r=a),r),"");return{...t[n],name:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),txe=Gt(zi,e=>{const{model_list:t}=e;return Je.pickBy(t,(r,i)=>{if(r.format==="diffusers")return{name:i,...r}})},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function uA(){return uA=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 uxe=function(t,n,r){r===void 0&&(r=!1);var i=n.alt,a=n.meta,o=n.mod,s=n.shift,c=n.ctrl,d=n.keys,p=t.key,g=t.code,S=t.ctrlKey,w=t.metaKey,C=t.shiftKey,k=t.altKey,P=Bp(g),D=p.toLowerCase();if(!r){if(i===!k&&D!=="alt"||s===!C&&D!=="shift")return!1;if(o){if(!w&&!S)return!1}else if(a===!w&&D!=="meta"||c===!S&&D!=="ctrl")return!1}return d&&d.length===1&&(d.includes(D)||d.includes(P))?!0:d?ixe(d):!d},cxe=A.createContext(void 0),dxe=function(){return A.useContext(cxe)};function bU(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&&bU(e[r],t[r])},!0):e===t}var fxe=A.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),hxe=function(){return A.useContext(fxe)};function pxe(e){var t=A.useRef(void 0);return bU(t.current,e)||(t.current=e),t.current}var SU=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},mxe=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Ot(e,t,n,r){var i=A.useRef(null),a=A.useRef(!1),o=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:void 0,c=A.useCallback(t,s??[]),d=A.useRef(c);s?d.current=c:d.current=t;var p=pxe(o),g=hxe(),S=g.enabledScopes,w=dxe();return mxe(function(){if(!((p==null?void 0:p.enabled)===!1||!lxe(S,p==null?void 0:p.scopes))){var C=function(M,R){var L;if(R===void 0&&(R=!1),!(sxe(M)&&!yU(M,p==null?void 0:p.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){SU(M);return}(L=M.target)!=null&&L.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||cA(e,p==null?void 0:p.splitKey).forEach(function(z){var U,H=dA(z,p==null?void 0:p.combinationKey);if(uxe(M,H,p==null?void 0:p.ignoreModifiers)||(U=H.keys)!=null&&U.includes("*")){if(R&&a.current)return;if(axe(M,H,p==null?void 0:p.preventDefault),!oxe(M,H,p==null?void 0:p.enabled)){SU(M);return}d.current(M,H),R||(a.current=!0)}})}},k=function(M){M.key!==void 0&&(vU(Bp(M.code)),((p==null?void 0:p.keydown)===void 0&&(p==null?void 0:p.keyup)!==!0||p!=null&&p.keydown)&&C(M))},P=function(M){M.key!==void 0&&(gU(Bp(M.code)),a.current=!1,p!=null&&p.keyup&&C(M,!0))};return(i.current||(o==null?void 0:o.document)||document).addEventListener("keyup",P),(i.current||(o==null?void 0:o.document)||document).addEventListener("keydown",k),w&&cA(e,p==null?void 0:p.splitKey).forEach(function(D){return w.addHotkey(dA(D,p==null?void 0:p.combinationKey))}),function(){(i.current||(o==null?void 0:o.document)||document).removeEventListener("keyup",P),(i.current||(o==null?void 0:o.document)||document).removeEventListener("keydown",k),w&&cA(e,p==null?void 0:p.splitKey).forEach(function(D){return w.removeHotkey(dA(D,p==null?void 0:p.combinationKey))})}}},[e,p,S]),i}function vxe(e){return Ht({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 gxe(e){return Ht({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 yxe(e){return Ht({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 bxe(e){return Ht({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 Sxe(e){return Ht({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 xxe(e){return Ht({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 wxe(e){return Ht({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 xU(e){return Ht({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 Cxe(e){return Ht({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 Exe(e){return Ht({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 cE(e){return Ht({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 wU(e){return Ht({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 cy(e){return Ht({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 CU(e){return Ht({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 _xe(e){return Ht({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 fA(e){return Ht({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 EU(e){return Ht({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 Txe(e){return Ht({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 kxe(e){return Ht({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 _U(e){return Ht({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 Pxe(e){return Ht({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 Axe(e){return Ht({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 TU(e){return Ht({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 Oxe(e){return Ht({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 Dxe(e){return Ht({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 Mxe(e){return Ht({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 jxe(e){return Ht({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 kU(e){return Ht({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 Ixe(e){return Ht({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 Rxe(e){return Ht({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 PU(e){return Ht({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 Nxe(e){return Ht({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 Lxe(e){return Ht({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 CS(e){return Ht({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 zxe(e){return Ht({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 Bxe(e){return Ht({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 Fxe(e){return Ht({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 hA(e){return Ht({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 Uxe(e){return Ht({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 Hxe(e){return Ht({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 Vxe(e){return Ht({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 AU(e){return Ht({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 pA(e){return Ht({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 Gxe(e){return Ht({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 Dv(e){return Ht({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 Wxe(e){return Ht({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 dE(e){return Ht({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 qxe(e){return Ht({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 mA(e){return Ht({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 xr=e=>e.canvas,fa=Gt([xr,Na,zi],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),OU=e=>e.canvas.layerState.objects.find(O2),fh=e=>e.gallery,Yxe=Gt([fh,uE,fa,Na],(e,t,n,r)=>{const{categories:i,currentCategory:a,currentImageUuid:o,shouldPinGallery:s,shouldShowGallery:c,galleryImageMinimumWidth:d,galleryImageObjectFit:p,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:S,galleryWidth:w,shouldUseSingleGalleryColumn:C}=e,{isLightboxOpen:k}=t;return{currentImageUuid:o,shouldPinGallery:s,shouldShowGallery:c,galleryImageMinimumWidth:d,galleryImageObjectFit:p,galleryGridTemplateColumns:C?"auto":`repeat(auto-fill, minmax(${d}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:S,images:i[a].images,areMoreImagesAvailable:i[a].areMoreImagesAvailable,currentCategory:a,galleryWidth:w,isLightboxOpen:k,isStaging:n,shouldEnableResize:!(k||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:C}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Kxe=Gt([fh,zi,uE,Na],(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:Je.isEqual}}),wl=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:a,...o}=e;return v.jsxs(Or,{isDisabled:n,width:r,display:"flex",gap:4,alignItems:"center",justifyContent:"space-between",...i,children:[v.jsx(Qr,{my:1,...a,children:t}),v.jsx($F,{...o})]})},Xxe=Gt(zi,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),fE=_t(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:a}=jp(),o=nt(),{shouldConfirmOnDelete:s,isConnected:c,isProcessing:d}=we(Xxe),p=A.useRef(null),g=C=>{C.stopPropagation(),s?i():S()},S=()=>{c&&!d&&e&&o(zee(e)),a()};Ot("delete",()=>{s?i():S()},[e,s,c,d]);const w=C=>o(BI(!C.target.checked));return v.jsxs(v.Fragment,{children:[A.cloneElement(t,{onClick:e?g:void 0,ref:n}),v.jsx(OF,{isOpen:r,leastDestructiveRef:p,onClose:a,children:v.jsx(ch,{children:v.jsxs(DF,{children:[v.jsx(uh,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),v.jsx(dh,{children:v.jsxs(Fe,{direction:"column",gap:5,children:[v.jsx(Yt,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),v.jsx(wl,{label:"Don't ask me again",isChecked:!s,onChange:w})]})}),v.jsxs(lh,{children:[v.jsx(mr,{ref:p,onClick:a,children:"Cancel"}),v.jsx(mr,{colorScheme:"error",onClick:S,ml:3,children:"Delete"})]})]})})})]})});fE.displayName="DeleteImageModal";const vA=()=>{const e=nt();return t=>{const n=typeof t=="string"?t:i0(t),[r,i]=mj(n);e(Ej(r)),e(_j(i))}},Qxe=Gt([zi,fh,lA,Ov,uE,Na],(e,t,n,r,i,a)=>{const{isProcessing:o,isConnected:s,isGFPGANAvailable:c,isESRGANAvailable:d}=e,{upscalingLevel:p,facetoolStrength:g}=n,{isLightboxOpen:S}=i,{shouldShowImageDetails:w}=r,{intermediateImage:C,currentImage:k}=t;return{isProcessing:o,isConnected:s,isGFPGANAvailable:c,isESRGANAvailable:d,upscalingLevel:p,facetoolStrength:g,shouldDisableToolbarButtons:Boolean(C)||!k,currentImage:k,shouldShowImageDetails:w,activeTabName:a,isLightboxOpen:S}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),DU=e=>{var K,fe,X,G,te,oe,ie,re;const t=nt(),{isProcessing:n,isConnected:r,isGFPGANAvailable:i,isESRGANAvailable:a,upscalingLevel:o,facetoolStrength:s,shouldDisableToolbarButtons:c,shouldShowImageDetails:d,currentImage:p,isLightboxOpen:g,activeTabName:S}=we(Qxe),w=oS(),{t:C}=ht(),k=vA(),P=()=>{p&&(g&&t(Xm(!1)),t(a0(p)),t(pl("img2img")))},D=async()=>{if(!p)return;const le=await fetch(p.url).then(de=>de.blob()),ee=[new ClipboardItem({[le.type]:le})];await navigator.clipboard.write(ee),w({title:C("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})},M=()=>{navigator.clipboard.writeText(p?window.location.toString()+p.url:"").then(()=>{w({title:C("toast.imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};Ot("shift+i",()=>{p?(P(),w({title:C("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):w({title:C("toast.imageNotLoaded"),description:C("toast.imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const R=()=>{var le,ee;p&&(p.metadata&&t(Sj(p.metadata)),((le=p.metadata)==null?void 0:le.image.type)==="img2img"?t(pl("img2img")):((ee=p.metadata)==null?void 0:ee.image.type)==="txt2img"&&t(pl("txt2img")))};Ot("a",()=>{var le,ee;["txt2img","img2img"].includes((ee=(le=p==null?void 0:p.metadata)==null?void 0:le.image)==null?void 0:ee.type)?(R(),w({title:C("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})):w({title:C("toast.parametersNotSet"),description:C("toast.parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const L=()=>{p!=null&&p.metadata&&t(qb(p.metadata.image.seed))};Ot("s",()=>{var le,ee;(ee=(le=p==null?void 0:p.metadata)==null?void 0:le.image)!=null&&ee.seed?(L(),w({title:C("toast.seedSet"),status:"success",duration:2500,isClosable:!0})):w({title:C("toast.seedNotSet"),description:C("toast.seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const z=A.useCallback(()=>{var le,ee,de,Re;(ee=(le=p==null?void 0:p.metadata)==null?void 0:le.image)!=null&&ee.prompt&&k((Re=(de=p==null?void 0:p.metadata)==null?void 0:de.image)==null?void 0:Re.prompt)},[(fe=(K=p==null?void 0:p.metadata)==null?void 0:K.image)==null?void 0:fe.prompt,k]);Ot("p",()=>{var le,ee;(ee=(le=p==null?void 0:p.metadata)==null?void 0:le.image)!=null&&ee.prompt?(z(),w({title:C("toast.promptSet"),status:"success",duration:2500,isClosable:!0})):w({title:C("toast.promptNotSet"),description:C("toast.promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[p]);const U=()=>{p&&t(Nee(p))};Ot("Shift+U",()=>{a&&!c&&r&&!n&&o?U():w({title:C("toast.upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[p,a,c,r,n,o]);const H=()=>{p&&t(Lee(p))};Ot("Shift+R",()=>{i&&!c&&r&&!n&&s?H():w({title:C("toast.faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[p,i,c,r,n,s]);const q=()=>t(YI(!d)),J=()=>{p&&(g&&t(Xm(!1)),t(M2(p)),t(Wo(!0)),S!=="unifiedCanvas"&&t(pl("unifiedCanvas")),w({title:C("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};Ot("i",()=>{p?q():w({title:C("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[p,d]);const $=()=>{t(Xm(!g))};return v.jsxs(Fe,{sx:{justifyContent:"center",alignItems:"center",columnGap:"0.5em"},...e,children:[v.jsxs(Io,{isAttached:!0,children:[v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{"aria-label":`${C("parameters.sendTo")}...`,icon:v.jsx(Vxe,{})}),children:v.jsxs(Fe,{sx:{flexDirection:"column",rowGap:2,w:52},children:[v.jsx(mr,{size:"sm",onClick:P,leftIcon:v.jsx(AU,{}),children:C("parameters.sendToImg2Img")}),v.jsx(mr,{size:"sm",onClick:J,leftIcon:v.jsx(AU,{}),children:C("parameters.sendToUnifiedCanvas")}),v.jsx(mr,{size:"sm",onClick:D,leftIcon:v.jsx(cy,{}),children:C("parameters.copyImage")}),v.jsx(mr,{size:"sm",onClick:M,leftIcon:v.jsx(cy,{}),children:C("parameters.copyImageToLink")}),v.jsx(_v,{download:!0,href:p==null?void 0:p.url,children:v.jsx(mr,{leftIcon:v.jsx(fA,{}),size:"sm",w:"100%",children:C("parameters.downloadImage")})})]})}),v.jsx(kt,{icon:v.jsx(kxe,{}),tooltip:g?`${C("parameters.closeViewer")} (Z)`:`${C("parameters.openInViewer")} (Z)`,"aria-label":g?`${C("parameters.closeViewer")} (Z)`:`${C("parameters.openInViewer")} (Z)`,isChecked:g,onClick:$})]}),v.jsxs(Io,{isAttached:!0,children:[v.jsx(kt,{icon:v.jsx(zxe,{}),tooltip:`${C("parameters.usePrompt")} (P)`,"aria-label":`${C("parameters.usePrompt")} (P)`,isDisabled:!((G=(X=p==null?void 0:p.metadata)==null?void 0:X.image)!=null&&G.prompt),onClick:z}),v.jsx(kt,{icon:v.jsx(Hxe,{}),tooltip:`${C("parameters.useSeed")} (S)`,"aria-label":`${C("parameters.useSeed")} (S)`,isDisabled:!((oe=(te=p==null?void 0:p.metadata)==null?void 0:te.image)!=null&&oe.seed),onClick:L}),v.jsx(kt,{icon:v.jsx(Cxe,{}),tooltip:`${C("parameters.useAll")} (A)`,"aria-label":`${C("parameters.useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes((re=(ie=p==null?void 0:p.metadata)==null?void 0:ie.image)==null?void 0:re.type),onClick:R})]}),v.jsxs(Io,{isAttached:!0,children:[v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{icon:v.jsx(Oxe,{}),"aria-label":C("parameters.restoreFaces")}),children:v.jsxs(Fe,{sx:{flexDirection:"column",rowGap:4},children:[v.jsx(oA,{}),v.jsx(mr,{isDisabled:!i||!p||!(r&&!n)||!s,onClick:H,children:C("parameters.restoreFaces")})]})}),v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{icon:v.jsx(Txe,{}),"aria-label":C("parameters.upscale")}),children:v.jsxs(Fe,{sx:{flexDirection:"column",gap:4},children:[v.jsx(sA,{}),v.jsx(mr,{isDisabled:!a||!p||!(r&&!n)||!o,onClick:U,children:C("parameters.upscaleImage")})]})})]}),v.jsx(Io,{isAttached:!0,children:v.jsx(kt,{icon:v.jsx(wU,{}),tooltip:`${C("parameters.info")} (I)`,"aria-label":`${C("parameters.info")} (I)`,isChecked:d,onClick:q})}),v.jsx(fE,{image:p,children:v.jsx(kt,{icon:v.jsx(Dv,{}),tooltip:`${C("parameters.deleteImage")} (Del)`,"aria-label":`${C("parameters.deleteImage")} (Del)`,isDisabled:!p||!r||n,colorScheme:"error"})})]})};var Zxe=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 a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},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)}}(),eo=globalThis&&globalThis.__assign||function(){return eo=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 a>"u"?void 0:Number(a),minHeight:typeof o>"u"?void 0:Number(o)}},i2e=["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"],NU="__resizable_base__",LU=function(e){e2e(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 a=r.window.document.createElement("div");return a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.transform="scale(0, 0)",a.style.left="0",a.style.flex="0 0 100%",a.classList?a.classList.add(NU):a.className+=NU,i.appendChild(a),a},r.removeBase=function(i){var a=r.parentNode;a&&a.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||t2e},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,a=this.resizable.offsetHeight,o=this.resizable.style.position;o!=="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:a,this.resizable.style.position=o}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 c=n.getParentSize(),d=Number(n.state[s].toString().replace("px","")),p=d/c[s]*100;return p+"%"}return gA(n.state[s])},a=r&&typeof r.width<"u"&&!this.state.isResizing?gA(r.width):i("width"),o=r&&typeof r.height<"u"&&!this.state.isResizing?gA(r.height):i("height");return{width:a,height:o}},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 a={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),a},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,a=this.state.direction,o=i&&dy("left",a),s=i&&dy("top",a),c,d;if(this.props.bounds==="parent"){var p=this.parentNode;p&&(c=o?this.resizableRight-this.parentLeft:p.offsetWidth+(this.parentLeft-this.resizableLeft),d=s?this.resizableBottom-this.parentTop:p.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,d=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(c=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),d=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(n=n&&n"u"?10:a.width,g=typeof i.width>"u"||i.width<0?n:i.width,S=typeof a.height>"u"?10:a.height,w=typeof i.height>"u"||i.height<0?r:i.height,C=c||0,k=d||0;if(s){var P=(S-C)*this.ratio+k,D=(w-C)*this.ratio+k,M=(p-k)/this.ratio+C,R=(g-k)/this.ratio+C,L=Math.max(p,P),z=Math.min(g,D),U=Math.max(S,M),H=Math.min(w,R);n=pE(n,L,z),r=pE(r,U,H)}else n=pE(n,p,g),r=pE(r,S,w);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 a=this.resizable.getBoundingClientRect(),o=a.left,s=a.top,c=a.right,d=a.bottom;this.resizableLeft=o,this.resizableRight=c,this.resizableTop=s,this.resizableBottom=d}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,a=0;if(n.nativeEvent&&n2e(n.nativeEvent)?(i=n.nativeEvent.clientX,a=n.nativeEvent.clientY):n.nativeEvent&&mE(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,a=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var o=this.props.onResizeStart(n,r,this.resizable);if(o===!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,c=this.window.getComputedStyle(this.resizable);if(c.flexBasis!=="auto"){var d=this.parentNode;if(d){var p=this.window.getComputedStyle(d).flexDirection;this.flexDir=p.startsWith("row")?"row":"column",s=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Vd(Vd({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&mE(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,a=i.maxWidth,o=i.maxHeight,s=i.minWidth,c=i.minHeight,d=mE(n)?n.touches[0].clientX:n.clientX,p=mE(n)?n.touches[0].clientY:n.clientY,g=this.state,S=g.direction,w=g.original,C=g.width,k=g.height,P=this.getParentSize(),D=r2e(P,this.window.innerWidth,this.window.innerHeight,a,o,s,c);a=D.maxWidth,o=D.maxHeight,s=D.minWidth,c=D.minHeight;var M=this.calculateNewSizeFromDirection(d,p),R=M.newHeight,L=M.newWidth,z=this.calculateNewMaxFromBoundary(a,o);this.props.snap&&this.props.snap.x&&(L=RU(L,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(R=RU(R,this.props.snap.y,this.props.snapGap));var U=this.calculateNewSizeFromAspectRatio(L,R,{width:z.maxWidth,height:z.maxHeight},{width:s,height:c});if(L=U.newWidth,R=U.newHeight,this.props.grid){var H=IU(L,this.props.grid[0]),q=IU(R,this.props.grid[1]),J=this.props.snapGap||0;L=J===0||Math.abs(H-L)<=J?H:L,R=J===0||Math.abs(q-R)<=J?q:R}var $={width:L-w.width,height:R-w.height};if(C&&typeof C=="string"){if(C.endsWith("%")){var K=L/P.width*100;L=K+"%"}else if(C.endsWith("vw")){var fe=L/this.window.innerWidth*100;L=fe+"vw"}else if(C.endsWith("vh")){var X=L/this.window.innerHeight*100;L=X+"vh"}}if(k&&typeof k=="string"){if(k.endsWith("%")){var K=R/P.height*100;R=K+"%"}else if(k.endsWith("vw")){var fe=R/this.window.innerWidth*100;R=fe+"vw"}else if(k.endsWith("vh")){var X=R/this.window.innerHeight*100;R=X+"vh"}}var G={width:this.createSizeForCssProperty(L,"width"),height:this.createSizeForCssProperty(R,"height")};this.flexDir==="row"?G.flexBasis=G.width:this.flexDir==="column"&&(G.flexBasis=G.height),Au.flushSync(function(){r.setState(G)}),this.props.onResize&&this.props.onResize(n,S,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,a=r.direction,o=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Vd(Vd({},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,a=r.handleStyles,o=r.handleClasses,s=r.handleWrapperStyle,c=r.handleWrapperClass,d=r.handleComponent;if(!i)return null;var p=Object.keys(i).map(function(g){return i[g]!==!1?gt.createElement($xe,{key:g,direction:g,onResizeStart:n.onResizeStart,replaceStyles:a&&a[g],className:o&&o[g]},d&&d[g]?d[g]:null):null});return gt.createElement("div",{className:c,style:s},p)},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(o,s){return i2e.indexOf(s)!==-1||(o[s]=n.props[s]),o},{}),i=Vd(Vd(Vd({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 a=this.props.as||"div";return gt.createElement(a,Vd({ref:this.ref,style:i,className:this.props.className},r),this.state.isResizing&>.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}(gt.PureComponent);const xi=e=>{const{label:t,...n}=e;return v.jsx(k7,{colorScheme:"accent",...n,children:t})};function zU(e){return Ht({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 BU(e){return Ht({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 a2e(e){return Ht({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 o2e(e){return Ht({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 s2e(e){return Ht({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 l2e(e){return Ht({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 u2e(e){return Ht({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 c2e(e){return Ht({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 FU(e){return Ht({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 d2e(e){return Ht({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 f2e(e){return Ht({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 yA(e){return Ht({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 h2e(e){return Ht({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 p2e(e){return Ht({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 m2e(e){return Ht({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 v2e(e){return Ht({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 g2e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function y2e(e,t){e.classList?e.classList.add(t):g2e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function UU(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function b2e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=UU(e.className,t):e.setAttribute("class",UU(e.className&&e.className.baseVal||"",t))}const HU={disabled:!1};var S2e=process.env.NODE_ENV!=="production"?pt.oneOfType([pt.number,pt.shape({enter:pt.number,exit:pt.number,appear:pt.number}).isRequired]):null,x2e=process.env.NODE_ENV!=="production"?pt.oneOfType([pt.string,pt.shape({enter:pt.string,exit:pt.string,active:pt.string}),pt.shape({enter:pt.string,enterDone:pt.string,enterActive:pt.string,exit:pt.string,exitDone:pt.string,exitActive:pt.string})]):null;const VU=A.createContext(null);var GU=function(t){return t.scrollTop},ES="unmounted",Mv="exited",jv="entering",fy="entered",bA="exiting",hh=function(e){QP(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var o=i,s=o&&!o.isMounting?r.enter:r.appear,c;return a.appearStatus=null,r.in?s?(c=Mv,a.appearStatus=jv):c=fy:r.unmountOnExit||r.mountOnEnter?c=ES:c=Mv,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===ES?{status:Mv}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==jv&&o!==fy&&(a=jv):(o===jv||o===fy)&&(a=bA)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===jv){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Au.findDOMNode(this);o&&GU(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Mv&&this.setState({status:ES})},n.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,c=this.props.nodeRef?[s]:[Au.findDOMNode(this),s],d=c[0],p=c[1],g=this.getTimeouts(),S=s?g.appear:g.enter;if(!i&&!o||HU.disabled){this.safeSetState({status:fy},function(){a.props.onEntered(d)});return}this.props.onEnter(d,p),this.safeSetState({status:jv},function(){a.props.onEntering(d,p),a.onTransitionEnd(S,function(){a.safeSetState({status:fy},function(){a.props.onEntered(d,p)})})})},n.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Au.findDOMNode(this);if(!a||HU.disabled){this.safeSetState({status:Mv},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:bA},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Mv},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:Au.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],d=c[0],p=c[1];this.props.addEndListener(d,p)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ES)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=OT(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return A.createElement(VU.Provider,{value:null},typeof o=="function"?o(i,s):A.cloneElement(A.Children.only(o),s))},t}(A.Component);hh.contextType=VU,hh.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:pt.shape({current:typeof Element>"u"?pt.any:function(e,t,n,r,i,a){var o=e[t];return pt.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:pt.oneOfType([pt.func.isRequired,pt.element.isRequired]).isRequired,in:pt.bool,mountOnEnter:pt.bool,unmountOnExit:pt.bool,appear:pt.bool,enter:pt.bool,exit:pt.bool,timeout:function(t){var n=S2e;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;ae.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,YU=A.memo(e=>{const t=nt(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:a,shouldUseSingleGalleryColumn:o}=we(Kxe),{image:s,isSelected:c}=e,{url:d,thumbnail:p,uuid:g,metadata:S}=s,[w,C]=A.useState(!1),k=oS(),{direction:P}=Sp(),{t:D}=ht(),M=vA(),R=()=>C(!0),L=()=>C(!1),z=()=>{var G,te,oe,ie;(te=(G=s.metadata)==null?void 0:G.image)!=null&&te.prompt&&M((ie=(oe=s.metadata)==null?void 0:oe.image)==null?void 0:ie.prompt),k({title:D("toast.promptSet"),status:"success",duration:2500,isClosable:!0})},U=()=>{s.metadata&&t(qb(s.metadata.image.seed)),k({title:D("toast.seedSet"),status:"success",duration:2500,isClosable:!0})},H=()=>{t(a0(s)),n!=="img2img"&&t(pl("img2img")),k({title:D("toast.sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},q=()=>{t(M2(s)),t(D2()),n!=="unifiedCanvas"&&t(pl("unifiedCanvas")),k({title:D("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},J=()=>{S&&t(Sj(S)),k({title:D("toast.parametersSet"),status:"success",duration:2500,isClosable:!0})},$=async()=>{var G;if((G=S==null?void 0:S.image)!=null&&G.init_image_path&&(await fetch(S.image.init_image_path)).ok){t(pl("img2img")),t(vX(S)),k({title:D("toast.initialImageSet"),status:"success",duration:2500,isClosable:!0});return}k({title:D("toast.initialImageNotSet"),description:D("toast.initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},K=()=>t(dj(s)),fe=G=>{G.dataTransfer.setData("invokeai/imageUuid",g),G.dataTransfer.effectAllowed="move"},X=()=>{t(dj(s)),t(Xm(!0))};return v.jsx(C2e,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>{var G,te,oe,ie,re,le,ee,de;return v.jsxs(A3,{children:[v.jsx(Hd,{onClickCapture:X,children:D("parameters.openInViewer")}),v.jsx(Hd,{onClickCapture:z,isDisabled:((te=(G=s==null?void 0:s.metadata)==null?void 0:G.image)==null?void 0:te.prompt)===void 0,children:D("parameters.usePrompt")}),v.jsx(Hd,{onClickCapture:U,isDisabled:((ie=(oe=s==null?void 0:s.metadata)==null?void 0:oe.image)==null?void 0:ie.seed)===void 0,children:D("parameters.useSeed")}),v.jsx(Hd,{onClickCapture:J,isDisabled:!["txt2img","img2img"].includes((le=(re=s==null?void 0:s.metadata)==null?void 0:re.image)==null?void 0:le.type),children:D("parameters.useAll")}),v.jsx(Hd,{onClickCapture:$,isDisabled:((de=(ee=s==null?void 0:s.metadata)==null?void 0:ee.image)==null?void 0:de.type)!=="img2img",children:D("parameters.useInitImg")}),v.jsx(Hd,{onClickCapture:H,children:D("parameters.sendToImg2Img")}),v.jsx(Hd,{onClickCapture:q,children:D("parameters.sendToUnifiedCanvas")}),v.jsx(Hd,{"data-warning":!0,children:v.jsx(fE,{image:s,children:v.jsx("p",{children:D("parameters.deleteImage")})})})]})},children:G=>v.jsxs(Bn,{position:"relative",onMouseOver:R,onMouseOut:L,userSelect:"none",draggable:!0,onDragStart:fe,ref:G,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:[v.jsx(sS,{objectFit:o?"contain":r,rounded:"md",src:p||d,loading:"lazy",sx:{position:"absolute",width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",top:"50%",transform:"translate(-50%,-50%)",...P==="rtl"?{insetInlineEnd:"50%"}:{insetInlineStart:"50%"}}}),v.jsx(Fe,{onClick:K,sx:{position:"absolute",top:"0",insetInlineStart:"0",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:c&&v.jsx(da,{as:cE,sx:{width:"50%",height:"50%",fill:"ok.500"}})}),w&&i>=64&&v.jsx(Bn,{sx:{position:"absolute",top:1,insetInlineEnd:1},children:v.jsx(fE,{image:s,children:v.jsx(kt,{"aria-label":D("parameters.deleteImage"),icon:v.jsx(Gxe,{}),size:"xs",fontSize:14,isDisabled:!a})})})]},g)})},E2e);YU.displayName="HoverableImage";const _2e="0px",wA="calc(70px + 1rem)",T2e=4,CA=1.5,k2e=`calc(100vw - ${_2e})`,P2e=`calc(100vh - ${CA*4}px)`,A2e=`calc(100vh - ${wA})`,KU=`calc(100vh - (${wA} + 6rem))`,O2e=`calc(100vh - (${wA} + 4.4rem))`,gE="22.5rem",IIe="",XU={"::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"},D2e={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"}},M2e=ct(LU,{shouldForwardProp:e=>!["sx"].includes(e)}),yE=320,QU=40,j2e={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}},ZU=400;function JU(){const e=nt(),{direction:t}=Sp(),{t:n}=ht(),{images:r,currentCategory:i,currentImageUuid:a,shouldPinGallery:o,shouldShowGallery:s,galleryImageMinimumWidth:c,galleryGridTemplateColumns:d,activeTabName:p,galleryImageObjectFit:g,shouldHoldGalleryOpen:S,shouldAutoSwitchToNewImages:w,areMoreImagesAvailable:C,galleryWidth:k,isLightboxOpen:P,isStaging:D,shouldEnableResize:M,shouldUseSingleGalleryColumn:R}=we(Yxe),{galleryMinWidth:L,galleryMaxWidth:z}=P?{galleryMinWidth:ZU,galleryMaxWidth:ZU}:j2e[p],[U,H]=A.useState(k>=yE),[q,J]=A.useState(!1),[$,K]=A.useState(0),fe=A.useRef(null),X=A.useRef(null),G=A.useRef(null);A.useEffect(()=>{H(k>=yE)},[k]);const te=()=>{!o&&e(Km(!0)),e(oX(!o)),e(Wo(!0))},oe=()=>{s?re():ie()},ie=()=>{e(Km(!0)),o&&e(Wo(!0))},re=A.useCallback(()=>{e(Km(!1)),e(lX(!1)),setTimeout(()=>o&&e(Wo(!0)),400)},[e,o]),le=()=>{e(g4(i))},ee=_e=>{e(Wb(_e))},de=()=>{S||(G.current=window.setTimeout(()=>re(),500))},Re=()=>{G.current&&window.clearTimeout(G.current)};Ot("g",()=>{oe()},[s,o]),Ot("left",()=>{e(hj())},{enabled:!D||p!=="unifiedCanvas"},[D]),Ot("right",()=>{e(fj())},{enabled:!D||p!=="unifiedCanvas"},[D]),Ot("shift+g",()=>{te()},[o]),Ot("esc",()=>{e(Km(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Ae=32;return Ot("shift+up",()=>{if(c<256){const _e=Je.clamp(c+Ae,32,256);e(Wb(_e))}},[c]),Ot("shift+down",()=>{if(c>32){const _e=Je.clamp(c-Ae,32,256);e(Wb(_e))}},[c]),A.useEffect(()=>{function _e(Me){!o&&fe.current&&!fe.current.contains(Me.target)&&re()}return document.addEventListener("mousedown",_e),()=>{document.removeEventListener("mousedown",_e)}},[re,o]),v.jsx(qU,{nodeRef:fe,in:s||S,unmountOnExit:!0,timeout:200,classNames:`${t}-image-gallery-css-transition`,children:v.jsxs(Bn,{className:`${t}-image-gallery-css-transition`,sx:o?{zIndex:1,insetInlineEnd:0}:{zIndex:100,position:"fixed",height:"100vh",top:0,insetInlineEnd:0},ref:fe,onMouseLeave:o?void 0:de,onMouseEnter:o?void 0:Re,onMouseOver:o?void 0:Re,children:[v.jsxs(M2e,{sx:{padding:4,display:"flex",flexDirection:"column",rowGap:4,borderRadius:o?"base":0,borderInlineStartWidth:5,bg:"base.850",borderColor:"base.700"},minWidth:L,maxWidth:o?z:window.innerWidth,"data-pinned":o,handleStyles:t==="rtl"?{right:{width:"15px"}}:{left:{width:"15px"}},enable:t==="rtl"?{right:M}:{left:M},size:{width:k,height:o?"100%":"100vh"},onResizeStart:(_e,Me,Te)=>{K(Te.clientHeight),Te.style.height=`${Te.clientHeight}px`,o&&(Te.style.position="fixed",Te.style.insetInlineEnd="1rem",J(!0))},onResizeStop:(_e,Me,Te,Xe)=>{const Qe=o?Je.clamp(Number(k)+Xe.width,L,Number(z)):Number(k)+Xe.width;e(cX(Qe)),Te.removeAttribute("data-resize-alert"),o&&(console.log("unpin"),Te.style.position="relative",Te.style.removeProperty("inset-inline-end"),Te.style.setProperty("height",o?"100%":"100vh"),J(!1),e(Wo(!0)))},onResize:(_e,Me,Te,Xe)=>{const Qe=Je.clamp(Number(k)+Xe.width,L,Number(o?z:.95*window.innerWidth));Qe>=yE&&!U?H(!0):QeQe-QU&&e(Wb(Qe-QU)),o&&(Qe>=z?Te.setAttribute("data-resize-alert","true"):Te.removeAttribute("data-resize-alert")),Te.style.height=`${$}px`},children:[v.jsxs(Fe,{alignItems:"center",gap:2,justifyContent:"space-between",children:[v.jsx(Io,{size:"sm",isAttached:!0,w:"max-content",justifyContent:"stretch",children:U?v.jsxs(v.Fragment,{children:[v.jsx(mr,{size:"sm",isChecked:i==="result",onClick:()=>e(z2("result")),flexGrow:1,children:n("gallery.generations")}),v.jsx(mr,{size:"sm",isChecked:i==="user",onClick:()=>e(z2("user")),flexGrow:1,children:n("gallery.uploads")})]}):v.jsxs(v.Fragment,{children:[v.jsx(kt,{"aria-label":n("gallery.showGenerations"),tooltip:n("gallery.showGenerations"),isChecked:i==="result",icon:v.jsx(Dxe,{}),onClick:()=>e(z2("result"))}),v.jsx(kt,{"aria-label":n("gallery.showUploads"),tooltip:n("gallery.showUploads"),isChecked:i==="user",icon:v.jsx(qxe,{}),onClick:()=>e(z2("user"))})]})}),v.jsxs(Fe,{gap:2,children:[v.jsx(Uc,{triggerComponent:v.jsx(kt,{size:"sm","aria-label":n("gallery.gallerySettings"),icon:v.jsx(mA,{})}),children:v.jsxs(Fe,{direction:"column",gap:2,children:[v.jsx(ni,{value:c,onChange:ee,min:32,max:256,hideTooltip:!0,label:n("gallery.galleryImageSize"),withReset:!0,handleReset:()=>e(Wb(64))}),v.jsx(xi,{label:n("gallery.maintainAspectRatio"),isChecked:g==="contain",onChange:()=>e(sX(g==="contain"?"cover":"contain"))}),v.jsx(xi,{label:n("gallery.autoSwitchNewImages"),isChecked:w,onChange:_e=>e(uX(_e.target.checked))}),v.jsx(xi,{label:n("gallery.singleColumnLayout"),isChecked:R,onChange:_e=>e(dX(_e.target.checked))})]})}),v.jsx(kt,{size:"sm","aria-label":n("gallery.pinGallery"),tooltip:`${n("gallery.pinGallery")} (Shift+G)`,onClick:te,icon:o?v.jsx(zU,{}):v.jsx(BU,{})})]})]}),v.jsx(Fe,{direction:"column",gap:2,h:o?KU:"100vh",maxH:o?KU:"100vh",overflowY:"scroll",ref:X,sx:{...XU},children:r.length||C?v.jsxs(v.Fragment,{children:[v.jsx(Hu,{gap:2,style:{gridTemplateColumns:d},children:r.map(_e=>{const{uuid:Me}=_e,Te=a===Me;return v.jsx(YU,{image:_e,isSelected:Te},Me)})}),v.jsx(mr,{onClick:le,isDisabled:!C,flexShrink:0,children:n(C?"gallery.loadMore":"gallery.allImagesLoaded")})]}):v.jsxs(Fe,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,padding:8,h:"100%",w:"100%",color:"base.500"},children:[v.jsx(da,{as:yA,sx:{w:16,h:16}}),v.jsx("p",{children:n("gallery.noImagesInGallery")})]})})]}),q&&v.jsx(Bn,{style:{width:`${k}px`,height:"100%"}})]})})}var I2e=vP({displayName:"EditIcon",path:v.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[v.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),v.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),$U=vP({displayName:"ExternalLinkIcon",path:v.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[v.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),v.jsx("path",{d:"M15 3h6v6"}),v.jsx("path",{d:"M10 14L21 3"})]})}),R2e=vP({displayName:"DeleteIcon",path:v.jsx("g",{fill:"currentColor",children:v.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 N2e(e){return Ht({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 ki=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:a=!1})=>v.jsxs(Fe,{gap:2,children:[n&&v.jsx(so,{label:`Recall ${e}`,children:v.jsx(Dp,{"aria-label":"Use this parameter",icon:v.jsx(N2e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),a&&v.jsx(so,{label:`Copy ${e}`,children:v.jsx(Dp,{"aria-label":`Copy ${e}`,icon:v.jsx(cy,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),v.jsxs(Fe,{direction:i?"column":"row",children:[v.jsxs(Yt,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?v.jsxs(_v,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",v.jsx($U,{mx:"2px"})]}):v.jsx(Yt,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),L2e=(e,t)=>e.image.uuid===t.image.uuid,EA=A.memo(({image:e,styleClass:t})=>{var $,K;const n=nt(),r=vA();Ot("esc",()=>{n(YI(!1))});const i=(($=e==null?void 0:e.metadata)==null?void 0:$.image)||{},a=e==null?void 0:e.dreamPrompt,{cfg_scale:o,fit:s,height:c,hires_fix:d,init_image_path:p,mask_image_path:g,orig_path:S,perlin:w,postprocessing:C,prompt:k,sampler:P,seamless:D,seed:M,steps:R,strength:L,threshold:z,type:U,variations:H,width:q}=i,J=JSON.stringify(e.metadata,null,2);return v.jsx(Bn,{className:t,sx:{position:"absolute",top:"0",width:"100%",borderRadius:"base",padding:4,overflow:"scroll",maxHeight:O2e,height:"100%",zIndex:"10",backdropFilter:"blur(10px)",bg:"blackAlpha.600"},children:v.jsxs(Fe,{gap:1,direction:"column",width:"100%",children:[v.jsxs(Fe,{gap:2,children:[v.jsx(Yt,{fontWeight:"semibold",children:"File:"}),v.jsxs(_v,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,v.jsx($U,{mx:"2px"})]})]}),Object.keys(i).length>0?v.jsxs(v.Fragment,{children:[U&&v.jsx(ki,{label:"Generation type",value:U}),((K=e.metadata)==null?void 0:K.model_weights)&&v.jsx(ki,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(U)&&v.jsx(ki,{label:"Original image",value:S}),k&&v.jsx(ki,{label:"Prompt",labelPosition:"top",value:typeof k=="string"?k:i0(k),onClick:()=>r(k)}),M!==void 0&&v.jsx(ki,{label:"Seed",value:M,onClick:()=>n(qb(M))}),z!==void 0&&v.jsx(ki,{label:"Noise Threshold",value:z,onClick:()=>n(wk(z))}),w!==void 0&&v.jsx(ki,{label:"Perlin Noise",value:w,onClick:()=>n(Sk(w))}),P&&v.jsx(ki,{label:"Sampler",value:P,onClick:()=>n(Tj(P))}),R&&v.jsx(ki,{label:"Steps",value:R,onClick:()=>n(xk(R))}),o!==void 0&&v.jsx(ki,{label:"CFG scale",value:o,onClick:()=>n(yk(o))}),H&&H.length>0&&v.jsx(ki,{label:"Seed-weight pairs",value:B2(H),onClick:()=>n(Mj(B2(H)))}),D&&v.jsx(ki,{label:"Seamless",value:D,onClick:()=>n(Pj(D))}),d&&v.jsx(ki,{label:"High Resolution Optimization",value:d,onClick:()=>n(Fj(d))}),q&&v.jsx(ki,{label:"Width",value:q,onClick:()=>n(U2(q))}),c&&v.jsx(ki,{label:"Height",value:c,onClick:()=>n(F2(c))}),p&&v.jsx(ki,{label:"Initial image",value:p,isLink:!0,onClick:()=>n(a0(p))}),g&&v.jsx(ki,{label:"Mask image",value:g,isLink:!0,onClick:()=>n(Cj(g))}),U==="img2img"&&L&&v.jsx(ki,{label:"Image to image strength",value:L,onClick:()=>n(bk(L))}),s&&v.jsx(ki,{label:"Image to image fit",value:s,onClick:()=>n(jj(s))}),C&&C.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(Vu,{size:"sm",children:"Postprocessing"}),C.map((fe,X)=>{if(fe.type==="esrgan"){const{scale:G,strength:te,denoise_str:oe}=fe;return v.jsxs(Fe,{pl:8,gap:1,direction:"column",children:[v.jsx(Yt,{size:"md",children:`${X+1}: Upscale (ESRGAN)`}),v.jsx(ki,{label:"Scale",value:G,onClick:()=>n(Hj(G))}),v.jsx(ki,{label:"Strength",value:te,onClick:()=>n(_k(te))}),oe!==void 0&&v.jsx(ki,{label:"Denoising strength",value:oe,onClick:()=>n(Ek(oe))})]},X)}else if(fe.type==="gfpgan"){const{strength:G}=fe;return v.jsxs(Fe,{pl:8,gap:1,direction:"column",children:[v.jsx(Yt,{size:"md",children:`${X+1}: Face restoration (GFPGAN)`}),v.jsx(ki,{label:"Strength",value:G,onClick:()=>{n(H2(G)),n(V2("gfpgan"))}})]},X)}else if(fe.type==="codeformer"){const{strength:G,fidelity:te}=fe;return v.jsxs(Fe,{pl:8,gap:1,direction:"column",children:[v.jsx(Yt,{size:"md",children:`${X+1}: Face restoration (Codeformer)`}),v.jsx(ki,{label:"Strength",value:G,onClick:()=>{n(H2(G)),n(V2("codeformer"))}}),te&&v.jsx(ki,{label:"Fidelity",value:te,onClick:()=>{n(Ck(te)),n(V2("codeformer"))}})]},X)}})]}),a&&v.jsx(ki,{withCopy:!0,label:"Dream Prompt",value:a}),v.jsxs(Fe,{gap:2,direction:"column",children:[v.jsxs(Fe,{gap:2,children:[v.jsx(so,{label:"Copy metadata JSON",children:v.jsx(Dp,{"aria-label":"Copy metadata JSON",icon:v.jsx(cy,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(J)})}),v.jsx(Yt,{fontWeight:"semibold",children:"Metadata JSON:"})]}),v.jsx(Bn,{sx:{mt:0,mr:2,mb:4,ml:2,padding:4,borderRadius:"base",overflowX:"scroll",wordBreak:"break-all",bg:"whiteAlpha.100"},children:v.jsx("pre",{children:J})})]})]}):v.jsx(zB,{width:"100%",pt:10,children:v.jsx(Yt,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},L2e);EA.displayName="ImageMetadataViewer";const eH={height:"100%",width:"15%",alignItems:"center",pointerEvents:"auto"},tH={color:"base.100"},z2e=Gt(fh,e=>{const{currentImage:t}=e,n=e.categories[t?t.category:"result"].images,r=n.findIndex(a=>{var o;return a.uuid===((o=e==null?void 0:e.currentImage)==null?void 0:o.uuid)}),i=n.length;return{isOnFirstImage:r===0,isOnLastImage:!isNaN(r)&&r===i-1}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),nH=()=>{const e=nt(),{isOnFirstImage:t,isOnLastImage:n}=we(z2e),[r,i]=A.useState(!1),a=()=>{i(!0)},o=()=>{i(!1)},s=()=>{e(hj())},c=()=>{e(fj())};return v.jsxs(Fe,{sx:{justifyContent:"space-between",zIndex:1,height:"100%",width:"100%",pointerEvents:"none"},children:[v.jsx(Hu,{sx:{...eH,justifyContent:"flex-start"},onMouseOver:a,onMouseOut:o,children:r&&!t&&v.jsx(Dp,{"aria-label":"Previous image",icon:v.jsx(bxe,{size:64}),variant:"unstyled",onClick:s,boxSize:16,sx:tH})}),v.jsx(Hu,{sx:{...eH,justifyContent:"flex-end"},onMouseOver:a,onMouseOut:o,children:r&&!n&&v.jsx(Dp,{"aria-label":"Next image",icon:v.jsx(Sxe,{size:64}),variant:"unstyled",onClick:c,boxSize:16,sx:tH})})]})};var Yu=function(e,t){return Number(e.toFixed(t))},B2e=function(e,t){return typeof e=="number"?e:t},$i=function(e,t,n){n&&typeof n=="function"&&n(e,t)},F2e=function(e){return-Math.cos(e*Math.PI)/2+.5},U2e=function(e){return e},H2e=function(e){return e*e},V2e=function(e){return e*(2-e)},G2e=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},W2e=function(e){return e*e*e},q2e=function(e){return--e*e*e+1},Y2e=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},K2e=function(e){return e*e*e*e},X2e=function(e){return 1- --e*e*e*e},Q2e=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},Z2e=function(e){return e*e*e*e*e},J2e=function(e){return 1+--e*e*e*e*e},$2e=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},rH={easeOut:F2e,linear:U2e,easeInQuad:H2e,easeOutQuad:V2e,easeInOutQuad:G2e,easeInCubic:W2e,easeOutCubic:q2e,easeInOutCubic:Y2e,easeInQuart:K2e,easeOutQuart:X2e,easeInOutQuart:Q2e,easeInQuint:Z2e,easeOutQuint:J2e,easeInOutQuint:$2e},iH=function(e){typeof e=="number"&&cancelAnimationFrame(e)},Gd=function(e){e.mounted&&(iH(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function aH(e,t,n,r){if(e.mounted){var i=new Date().getTime(),a=1;Gd(e),e.animation=function(){if(!e.mounted)return iH(e.animation);var o=new Date().getTime()-i,s=o/n,c=rH[t],d=c(s);o>=n?(r(a),e.animation=null):e.animation&&(r(d),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function ewe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r))}function Up(e,t,n,r){var i=ewe(t);if(!(!e.mounted||!i)){var a=e.setTransformState,o=e.transformState,s=o.scale,c=o.positionX,d=o.positionY,p=t.scale-s,g=t.positionX-c,S=t.positionY-d;n===0?a(t.scale,t.positionX,t.positionY):aH(e,r,n,function(w){var C=s+p*w,k=c+g*w,P=d+S*w;a(C,k,P)})}}function twe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,a=t.offsetWidth,o=t.offsetHeight,s=a*n,c=o*n,d=r-s,p=i-c;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:d,newContentHeight:c,newDiffHeight:p}}var nwe=function(e,t,n,r,i,a,o){var s=e>t?n*(o?1:.5):0,c=r>i?a*(o?1:.5):0,d=e-t-s,p=s,g=r-i-c,S=c;return{minPositionX:d,maxPositionX:p,minPositionY:g,maxPositionY:S}},_A=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 a=twe(n,r,t),o=a.wrapperWidth,s=a.wrapperHeight,c=a.newContentWidth,d=a.newDiffWidth,p=a.newContentHeight,g=a.newDiffHeight,S=nwe(o,c,d,s,p,g,Boolean(i));return S},TA=function(e,t,n,r){return r?en?Yu(n,2):Yu(e,2):Yu(e,2)},py=function(e,t){var n=_A(e,t);return e.bounds=n,n};function bE(e,t,n,r,i,a,o){var s=n.minPositionX,c=n.minPositionY,d=n.maxPositionX,p=n.maxPositionY,g=0,S=0;o&&(g=i,S=a);var w=TA(e,s-g,d+g,r),C=TA(t,c-S,p+S,r);return{x:w,y:C}}function SE(e,t,n,r,i,a){var o=e.transformState,s=o.scale,c=o.positionX,d=o.positionY,p=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:c,y:d};var g=c-t*p,S=d-n*p,w=bE(g,S,i,a,0,0,null);return w}function TS(e,t,n,r,i){var a=i?r:0,o=t-a;return!Number.isNaN(n)&&e>=n?n:!Number.isNaN(t)&&e<=o?o:e}var oH=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,a=t.target,o=i==null?void 0:i.contains(a),s=r&&a&&o;if(!s)return!1;var c=CE(a,n);return!c},sH=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,a=t&&n&&!i;return!!a},rwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var a=t.clientX,o=t.clientY;e.startCoords={x:a-r,y:o-i}},iwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,a=r.positionY;e.isPanning=!0;var o=n.length===1;if(o){var s=n[0].clientX,c=n[0].clientY;e.startCoords={x:s-i,y:c-a}}};function awe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,a=e.setup,o=a.disabled,s=a.limitToBounds,c=a.centerZoomedOut,d=e.wrapperComponent;if(!(o||!d||!e.bounds)){var p=e.bounds,g=p.maxPositionX,S=p.minPositionX,w=p.maxPositionY,C=p.minPositionY,k=n>g||nw||rg?d.offsetWidth:e.setup.minPositionX||0,M=r>w?d.offsetHeight:e.setup.minPositionY||0,R=SE(e,D,M,i,e.bounds,s||c),L=R.x,z=R.y;return{scale:i,positionX:k?L:n,positionY:P?z:r}}}function owe(e,t,n,r,i){var a=e.setup.limitToBounds,o=e.wrapperComponent,s=e.bounds,c=e.transformState,d=c.scale,p=c.positionX,g=c.positionY;if(!(o===null||s===null||t===p&&n===g)){var S=bE(t,n,s,a,r,i,o),w=S.x,C=S.y;e.setTransformState(d,w,C)}}var swe=function(e,t,n){var r=e.startCoords,i=e.transformState,a=e.setup.panning,o=a.lockAxisX,s=a.lockAxisY,c=i.positionX,d=i.positionY;if(!r)return{x:c,y:d};var p=t-r.x,g=n-r.y,S=o?c:p,w=s?d:g;return{x:S,y:w}},xE=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,a=n.minScale,o=n.disablePadding;return t>0&&i>=a&&!o?t:0},lwe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,a=e.transformState.scale,o=i.disabled,s=!o||a>1||!r||t;return!!s},uwe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,a=i.disabled,o=i.velocityAnimation,s=e.transformState.scale,c=o.disabled,d=!c||s>1||!a||t;return!(!d||!n||!r)};function cwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,a=n.sensitivity;return r?i*t*a:i}function lH(e,t,n,r,i,a,o,s,c,d){if(i){if(t>o&&n>o){var p=o+(e-o)*d;return p>c?c:pa?a:p}}return r?t:TA(e,a,o,i)}function dwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function fwe(e,t){var n=lwe(e);if(n){var r=e.lastMousePosition,i=e.velocityTime,a=e.setup,o=e.wrapperComponent,s=a.velocityAnimation.equalToMove,c=Date.now();if(r&&i&&o){var d=dwe(o,s),p=t.x-r.x,g=t.y-r.y,S=p/d,w=g/d,C=c-i,k=p*p+g*g,P=Math.sqrt(k)/C;e.velocity={velocityX:S,velocityY:w,total:P}}e.lastMousePosition=t,e.velocityTime=c}}function hwe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,a=uwe(e);if(!(!a||!t||!n||!i)){var o=t.velocityX,s=t.velocityY,c=t.total,d=n.maxPositionX,p=n.minPositionX,g=n.maxPositionY,S=n.minPositionY,w=r.limitToBounds,C=r.alignmentAnimation,k=r.zoomAnimation,P=r.panning,D=P.lockAxisY,M=P.lockAxisX,R=k.animationType,L=C.sizeX,z=C.sizeY,U=C.velocityAlignmentTime,H=U,q=cwe(e,c),J=Math.max(q,H),$=xE(e,L),K=xE(e,z),fe=$*i.offsetWidth/100,X=K*i.offsetHeight/100,G=d+fe,te=p-fe,oe=g+X,ie=S-X,re=e.transformState,le=new Date().getTime();aH(e,R,J,function(ee){var de=e.transformState,Re=de.scale,Ae=de.positionX,_e=de.positionY,Me=new Date().getTime()-le,Te=Me/H,Xe=rH[C.animationType],Qe=1-Xe(Math.min(1,Te)),vt=1-ee,St=Ae+o*vt,qe=_e+s*vt,Ce=lH(St,re.positionX,Ae,M,w,p,d,te,G,Qe),Lt=lH(qe,re.positionY,_e,D,w,S,g,ie,oe,Qe);(Ae!==St||_e!==qe)&&e.setTransformState(Re,Ce,Lt)})}}function uH(e,t){var n=e.transformState.scale;Gd(e),py(e,n),window.TouchEvent!==void 0&&t instanceof TouchEvent?iwe(e,t):rwe(e,t)}function cH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,a=i.disabled,o=i.sizeX,s=i.sizeY,c=i.animationTime,d=i.animationType,p=a||t.1&&g;S?hwe(e):cH(e)}}function kA(e,t,n,r){var i=e.setup,a=i.minScale,o=i.maxScale,s=i.limitToBounds,c=TS(Yu(t,2),a,o,0,!1),d=py(e,c),p=SE(e,n,r,c,d,s),g=p.x,S=p.y;return{scale:c,positionX:g,positionY:S}}function fH(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,a=e.setup,o=a.minScale,s=a.limitToBounds,c=a.zoomAnimation,d=c.disabled,p=c.animationTime,g=c.animationType,S=d||r>=o;if((r>=1||s)&&cH(e),!(S||!i||!e.mounted)){var w=t||i.offsetWidth/2,C=n||i.offsetHeight/2,k=kA(e,o,w,C);k&&Up(e,k,p,g)}}var Hp=function(){return Hp=Object.assign||function(t){for(var n,r=1,i=arguments.length;ro||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},Owe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,a=e.isInitialized,o=t.target,s=a&&!r&&o;if(!s)return!1;var c=CE(o,i);return!c},Dwe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},Mwe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,a=Yu(i[0].clientX-r.left,5),o=Yu(i[0].clientY-r.top,5),s=Yu(i[1].clientX-r.left,5),c=Yu(i[1].clientY-r.top,5);return{x:(a+s)/2/t,y:(o+c)/2/t}},xH=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))},jwe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,a=i.maxScale,o=i.minScale,s=i.zoomAnimation,c=i.disablePadding,d=s.size,p=s.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,S=g*n;return TS(Yu(S,2),o,a,d,!p&&!c)},Iwe=160,Rwe=100,Nwe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Gd(e),$i(ci(e),t,r),$i(ci(e),t,i))},Lwe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,a=e.contentComponent,o=e.setup,s=e.transformState,c=s.scale,d=o.limitToBounds,p=o.centerZoomedOut,g=o.zoomAnimation,S=o.wheel,w=o.disablePadding,C=g.size,k=g.disabled,P=S.step;if(!a)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var D=kwe(t,null),M=Pwe(e,D,P,!t.ctrlKey);if(c!==M){var R=py(e,M),L=SH(t,a,c),z=k||C===0||p||w,U=d&&z,H=SE(e,L.x,L.y,M,R,U),q=H.x,J=H.y;e.previousWheelEvent=t,e.setTransformState(M,q,J),$i(ci(e),t,r),$i(ci(e),t,i)}},zwe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;OA(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){e.mounted&&(fH(e,t.x,t.y),e.wheelAnimationTimer=null)},Rwe);var a=Awe(e,t);a&&(OA(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){e.mounted&&(e.wheelStopEventTimer=null,$i(ci(e),t,r),$i(ci(e),t,i))},Iwe))},Bwe=function(e,t){var n=xH(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Gd(e)},Fwe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,a=e.setup,o=a.limitToBounds,s=a.centerZoomedOut,c=a.zoomAnimation,d=c.disabled,p=c.size;if(!(r===null||!n)){var g=Mwe(t,i,n);if(!(!Number.isFinite(g.x)||!Number.isFinite(g.y))){var S=xH(t),w=jwe(e,S);if(w!==i){var C=py(e,w),k=d||p===0||s,P=o&&k,D=SE(e,g.x,g.y,w,C,P),M=D.x,R=D.y;e.pinchMidpoint=g,e.lastDistance=S,e.setTransformState(w,M,R)}}}},Uwe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,fH(e,t==null?void 0:t.x,t==null?void 0:t.y)},wH=function(e,t){var n=e.props.onZoomStop,r=e.setup.doubleClick.animationTime;OA(e.doubleClickStopEventTimer),e.doubleClickStopEventTimer=setTimeout(function(){e.doubleClickStopEventTimer=null,$i(ci(e),t,n)},r)},Hwe=function(e,t){var n=e.props,r=n.onZoomStart,i=n.onZoom,a=e.setup.doubleClick,o=a.animationTime,s=a.animationType;$i(ci(e),t,r),yH(e,o,s,function(){return $i(ci(e),t,i)}),wH(e,t)};function Vwe(e,t){var n=e.setup,r=e.doubleClickStopEventTimer,i=e.transformState,a=e.contentComponent,o=i.scale,s=e.props,c=s.onZoomStart,d=s.onZoom,p=n.doubleClick,g=p.disabled,S=p.mode,w=p.step,C=p.animationTime,k=p.animationType;if(!g&&!r){if(S==="reset")return Hwe(e,t);if(!a)return console.error("No ContentComponent found");var P=S==="zoomOut"?-1:1,D=vH(e,P,w);if(o!==D){$i(ci(e),t,c);var M=SH(t,a,o),R=kA(e,D,M.x,M.y);if(!R)return console.error("Error during zoom event. New transformation state was not calculated.");$i(ci(e),t,d),Up(e,R,C,k),wH(e,t)}}}var Gwe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,a=r.doubleClick,o=a.disabled,s=a.excluded,c=t.target,d=i==null?void 0:i.contains(c),p=n&&c&&d&&!o;if(!p)return!1;var g=CE(c,s);return!g},Wwe=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){py(n,n.transformState.scale),n.setup=mH(r)},this.initializeWindowEvents=function(){var r,i=AA(),a=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,o=a==null?void 0:a.defaultView;o==null||o.addEventListener("mousedown",n.onPanningStart,i),o==null||o.addEventListener("mousemove",n.onPanning,i),o==null||o.addEventListener("mouseup",n.onPanningStop,i),a==null||a.addEventListener("mouseleave",n.clearPanning,i),o==null||o.addEventListener("keyup",n.setKeyUnPressed,i),o==null||o.addEventListener("keydown",n.setKeyPressed,i)},this.cleanupWindowEvents=function(){var r,i,a=AA(),o=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,s=o==null?void 0:o.defaultView;s==null||s.removeEventListener("mousedown",n.onPanningStart,a),s==null||s.removeEventListener("mousemove",n.onPanning,a),s==null||s.removeEventListener("mouseup",n.onPanningStop,a),o==null||o.removeEventListener("mouseleave",n.clearPanning,a),s==null||s.removeEventListener("keyup",n.setKeyUnPressed,a),s==null||s.removeEventListener("keydown",n.setKeyPressed,a),document.removeEventListener("mouseleave",n.clearPanning,a),Gd(n),(i=n.observer)===null||i===void 0||i.disconnect()},this.handleInitializeWrapperEvents=function(r){var i=AA();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 a;n.setCenter(),(a=n.observer)===null||a===void 0||a.disconnect()}),n.observer.observe(r))},this.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var a=_we(n,r);if(a){var o=n.isPressingKeys(n.setup.wheel.activationKeys);o&&(Nwe(n,r),Lwe(n,r),zwe(n,r))}}},this.onPanningStart=function(r){var i=n.setup.disabled,a=n.props.onPanningStart;if(!i){var o=oH(n,r);if(o){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),Gd(n),uH(n,r),$i(ci(n),r,a))}}},this.onPanning=function(r){var i=n.setup.disabled,a=n.props.onPanning;if(!i){var o=sH(n);if(o){var s=n.isPressingKeys(n.setup.panning.activationKeys);s&&(r.preventDefault(),r.stopPropagation(),dH(n,r.clientX,r.clientY),$i(ci(n),r,a))}}},this.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(pwe(n),$i(ci(n),r,i))},this.onPinchStart=function(r){var i=n.setup.disabled,a=n.props,o=a.onPinchingStart,s=a.onZoomStart;if(!i){var c=Owe(n,r);c&&(Bwe(n,r),Gd(n),$i(ci(n),r,o),$i(ci(n),r,s))}},this.onPinch=function(r){var i=n.setup.disabled,a=n.props,o=a.onPinching,s=a.onZoom;if(!i){var c=Dwe(n);c&&(r.preventDefault(),r.stopPropagation(),Fwe(n,r),$i(ci(n),r,o),$i(ci(n),r,s))}},this.onPinchStop=function(r){var i=n.props,a=i.onPinchingStop,o=i.onZoomStop;n.pinchStartScale&&(Uwe(n),$i(ci(n),r,a),$i(ci(n),r,o))},this.onTouchPanningStart=function(r){var i=n.setup.disabled,a=n.props.onPanningStart;if(!i){var o=oH(n,r);if(o){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,Gd(n);var c=r.touches,d=c.length===1,p=c.length===2;d&&(Gd(n),uH(n,r),$i(ci(n),r,a)),p&&n.onPinchStart(r)}}}},this.onTouchPanning=function(r){var i=n.setup.disabled,a=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var o=sH(n);if(!o)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];dH(n,s.clientX,s.clientY),$i(ci(n),r,a)}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 a=Gwe(n,r);a&&Vwe(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,a){var o=n.props.onTransformed;if(!Number.isNaN(r)&&!Number.isNaN(i)&&!Number.isNaN(a)){r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=a;var s=ci(n);n.onChangeCallbacks.forEach(function(c){return c(s)}),$i(s,{scale:r,positionX:i,positionY:a},o),n.applyTransformation()}else console.error("Detected NaN set state values")},this.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=bH(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},this.handleTransformStyles=function(r,i,a){return n.props.customTransform?n.props.customTransform(r,i,a):Cwe(r,i,a)},this.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,a=r.positionX,o=r.positionY,s=n.handleTransformStyles(a,o,i);n.contentComponent.style.transform=s}},this.getContext=function(){return ci(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,py(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(i),n.initializeWindowEvents(),n.isInitialized=!0,$i(ci(n),void 0,n.props.onInit)},this.props=t,this.setup=mH(this.props),this.transformState=pH(this.props)}return e}(),EE=A.createContext(null),qwe=function(e,t){return typeof e=="function"?e(t):e},Ywe=A.forwardRef(function(e,t){var n=A.useState(0),r=n[1],i=e.children,a=A.useRef(new Wwe(e)).current,o=qwe(e.children,ci(a)),s=A.useCallback(function(){typeof i=="function"&&r(function(c){return c+1})},[i]);return A.useImperativeHandle(t,function(){return ci(a)},[a]),A.useEffect(function(){a.update(e)},[a,e]),A.useEffect(function(){return a.onChange(s)},[a,e,s]),A.createElement(EE.Provider,{value:a},o)});function Kwe(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 Xwe=`.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; } `,CH={wrapper:"transform-component-module_wrapper__7HFJe",content:"transform-component-module_content__uCDPE"};Kwe(Xwe);var Qwe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,a=i===void 0?"":i,o=e.wrapperStyle,s=e.contentStyle,c=e.wrapperProps,d=c===void 0?{}:c,p=e.contentProps,g=p===void 0?{}:p,S=A.useContext(EE).init,w=A.useRef(null),C=A.useRef(null);return A.useEffect(function(){var k=w.current,P=C.current;k!==null&&P!==null&&S&&S(k,P)},[]),A.createElement("div",Hp({},d,{ref:w,className:"react-transform-wrapper ".concat(CH.wrapper," ").concat(r),style:o}),A.createElement("div",Hp({},g,{ref:C,className:"react-transform-component ".concat(CH.content," ").concat(a),style:s}),t))},EH=function(){var e=A.useContext(EE),t=A.useState(ci(e||{})),n=t[0],r=t[1];if(!e)throw new Error("Transform context mus be placed inside TransformWrapper");return A.useEffect(function(){e.onChange(function(i){r(i)})},[e]),n};A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useContext(EE);return A.useEffect(function(){return r.onChange(function(i){if(n.current){var a=0,o=0;n.current.style.transform=r.handleTransformStyles(a,o,1/i.state.scale)}})},[r]),A.createElement("div",Hp({},e,{ref:Ewe([n,t])}))});const Zwe=()=>{const[e,t]=A.useState(0),[n,r]=A.useState(1),[i,a]=A.useState(1);return{rotation:e,scaleX:n,scaleY:i,flipHorizontally:()=>{r(n*-1)},flipVertically:()=>{a(i*-1)},rotateCounterClockwise:()=>{t(e===-270?0:e-90)},rotateClockwise:()=>{t(e===270?0:e+90)},reset:()=>{t(0),r(1),a(1)}}},Jwe=({flipHorizontally:e,flipVertically:t,rotateCounterClockwise:n,rotateClockwise:r,reset:i})=>{const{zoomIn:a,zoomOut:o,resetTransform:s}=EH();return v.jsxs(Io,{isAttached:!0,orientation:"vertical",children:[v.jsx(kt,{icon:v.jsx(YSe,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>a(),fontSize:20}),v.jsx(kt,{icon:v.jsx(KSe,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>o(),fontSize:20}),v.jsx(kt,{icon:v.jsx(WSe,{}),"aria-label":"Rotate Counter-Clockwise",tooltip:"Rotate Counter-Clockwise",onClick:n,fontSize:20}),v.jsx(kt,{icon:v.jsx(qSe,{}),"aria-label":"Rotate Clockwise",tooltip:"Rotate Clockwise",onClick:r,fontSize:20}),v.jsx(kt,{icon:v.jsx(FU,{}),"aria-label":"Flip Horizontally",tooltip:"Flip Horizontally",onClick:e,fontSize:20}),v.jsx(kt,{icon:v.jsx(FU,{style:{transform:"rotate(90deg)"}}),"aria-label":"Flip Vertically",tooltip:"Flip Vertically",onClick:t,fontSize:20}),v.jsx(kt,{icon:v.jsx(aA,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{s(),i()},fontSize:20})]})};function $we({image:e,alt:t,ref:n,styleClass:r,rotation:i,scaleX:a,scaleY:o}){const{centerView:s}=EH();return v.jsx(Qwe,{wrapperStyle:{width:"100%",height:"100%"},children:v.jsx("img",{style:{transform:`rotate(${i}deg) scaleX(${a}) scaleY(${o})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>s(1,0,"easeOut")})})}const eCe=Gt([fh,Ov],(e,t)=>{const{currentImage:n}=e,{shouldShowImageDetails:r}=t;return{viewerImageToDisplay:n,shouldShowImageDetails:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function tCe(){const e=nt(),t=we(S=>S.lightbox.isLightboxOpen),{rotation:n,scaleX:r,scaleY:i,flipHorizontally:a,flipVertically:o,rotateCounterClockwise:s,rotateClockwise:c,reset:d}=Zwe(),{viewerImageToDisplay:p,shouldShowImageDetails:g}=we(eCe);return Ot("Esc",()=>{t&&e(Xm(!1))},[t]),v.jsx(Ywe,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:v.jsxs(Bn,{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:[v.jsxs(Fe,{sx:{flexDir:"column",position:"absolute",top:4,insetInlineStart:4,gap:4,zIndex:3},children:[v.jsx(kt,{icon:v.jsx(GSe,{}),"aria-label":"Exit Viewer",onClick:()=>{e(Xm(!1))},fontSize:20}),v.jsx(Jwe,{flipHorizontally:a,flipVertically:o,rotateCounterClockwise:s,rotateClockwise:c,reset:d})]}),v.jsxs(Fe,{children:[v.jsxs(Hu,{sx:{overflow:"hidden",gridTemplateColumns:"auto max-content",placeItems:"center",width:"100vw",height:"100vh",bg:"base.850"},children:[p&&v.jsxs(v.Fragment,{children:[v.jsx($we,{rotation:n,scaleX:r,scaleY:i,image:p.url,styleClass:"lightbox-image"}),g&&v.jsx(EA,{image:p})]}),!g&&v.jsx(Bn,{sx:{position:"absolute",top:0,insetInlineStart:0,w:`calc(100vw - ${8*2*4}px)`,h:"100vh",mx:8,pointerEvents:"none"},children:v.jsx(nH,{})}),v.jsx(Bn,{sx:{position:"absolute",top:4},children:v.jsx(DU,{})})]}),v.jsx(JU,{})]})]})})}function nCe(e){const{menuType:t="icon",iconTooltip:n,buttonText:r,isLazy:i=!0,menuItems:a,menuProps:o,menuButtonProps:s,menuListProps:c,menuItemProps:d}=e,p=()=>{const g=[];return a.forEach((S,w)=>{g.push(v.jsx(Hd,{onClick:S.onClick,fontSize:"sm",...d,children:S.item},w))}),g};return v.jsx(P3,{...o,isLazy:i,children:({isOpen:g})=>v.jsxs(v.Fragment,{children:[v.jsx(O3,{as:t==="icon"?Dp:xv,tooltip:n,"aria-label":n,icon:g?v.jsx(m2e,{}):v.jsx(p2e,{}),paddingX:0,paddingY:t==="regular"?2:0,...s,children:t==="regular"&&r}),v.jsx(A3,{zIndex:15,padding:0,...c,children:p()})]})})}const rCe=Gt(zi,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:Je.isEqual}});function DA(e){const t=nt(),{btnGroupWidth:n="auto",...r}=e,{isProcessing:i,isConnected:a,isCancelable:o,currentIteration:s,totalIterations:c,cancelType:d,cancelAfter:p}=we(rCe),g=A.useCallback(()=>{t(Bee()),t(Rk(null))},[t]),{t:S}=ht(),w=p!==null;Ot("shift+x",()=>{(a||i)&&o&&g()},[a,i,o]),A.useEffect(()=>{p!==null&&pt(WI("immediate"))},{item:S("parameters.cancel.schedule"),onClick:()=>t(WI("scheduled"))}];return v.jsxs(Io,{isAttached:!0,width:n,children:[d==="immediate"?v.jsx(kt,{icon:v.jsx(v2e,{}),tooltip:S("parameters.cancel.immediate"),"aria-label":S("parameters.cancel.immediate"),isDisabled:!a||!i||!o,onClick:g,colorScheme:"error",...r}):v.jsx(kt,{icon:w?v.jsx(jC,{}):v.jsx(a2e,{}),tooltip:S(w?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),"aria-label":S(w?"parameters.cancel.isScheduled":"parameters.cancel.schedule"),isDisabled:!a||!i||!o||s===c,onClick:()=>{t(Rk(w?null:s))},colorScheme:"error",...r}),v.jsx(nCe,{menuItems:C,iconTooltip:S("parameters.cancel.setType"),menuButtonProps:{colorScheme:"error",minWidth:5}})]})}const MA=e=>e.generation;Gt(MA,({shouldRandomizeSeed:e,shouldGenerateVariations:t})=>e||t,{memoizeOptions:{resultEqualityCheck:Je.isEqual}});const _H=Gt([MA,zi,OU,Na],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:a,seedWeights:o,initialImage:s,seed:c}=e,{isProcessing:d,isConnected:p}=t;let g=!0;const S=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,S.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,S.push("No initial image selected")),d&&(g=!1,S.push("System Busy")),p||(g=!1,S.push("System Disconnected")),a&&(!(gk(o)||o==="")||c===-1)&&(g=!1,S.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:S}},{memoizeOptions:{equalityCheck:Je.isEqual,resultEqualityCheck:Je.isEqual}});function jA(e){const{iconButton:t=!1,...n}=e,r=nt(),{isReady:i}=we(_H),a=we(Na),o=()=>{r(v4(a))},{t:s}=ht();return Ot(["ctrl+enter","meta+enter"],()=>{r(yj()),r(v4(a))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,a]),v.jsx(Bn,{style:{flexGrow:4},children:t?v.jsx(kt,{"aria-label":s("parameters.invoke"),type:"submit",icon:v.jsx(Lxe,{}),isDisabled:!i,onClick:o,flexGrow:1,w:"100%",tooltip:s("parameters.invoke"),tooltipProps:{placement:"bottom"},colorScheme:"accent",...n}):v.jsx(mr,{"aria-label":s("parameters.invoke"),type:"submit",isDisabled:!i,onClick:o,flexGrow:1,w:"100%",colorScheme:"accent",fontWeight:700,...n,children:"Invoke"})})}const IA={borderStartStartRadius:0,borderEndStartRadius:0},RA=Gt([fh,Ov,Na],(e,t,n)=>{const{shouldPinParametersPanel:r,shouldShowParametersPanel:i,shouldHoldParametersPanelOpen:a,shouldUseCanvasBetaLayout:o}=t,{shouldShowGallery:s,shouldPinGallery:c,shouldHoldGalleryOpen:d}=e,p=o&&n==="unifiedCanvas",g=!p&&!(i||a&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),S=!(s||d&&!c)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinParametersPanel:r,shouldShowProcessButtons:!p&&(!r||!i),shouldShowParametersPanelButton:g,shouldShowParametersPanel:i,shouldShowGallery:s,shouldPinGallery:c,shouldShowGalleryButton:S}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),iCe=()=>{const e=nt(),{shouldShowParametersPanelButton:t,shouldShowProcessButtons:n,shouldPinParametersPanel:r}=we(RA),i=()=>{e(Zm(!0)),r&&setTimeout(()=>e(Wo(!0)),400)};return t?v.jsxs(Fe,{pos:"absolute",transform:"translate(0, -50%)",zIndex:20,minW:8,top:"50%",insetInlineStart:"4.5rem",direction:"column",gap:2,children:[v.jsx(kt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:i,sx:IA,children:v.jsx(pA,{})}),n&&v.jsxs(v.Fragment,{children:[v.jsx(jA,{iconButton:!0,sx:IA}),v.jsx(DA,{sx:IA})]})]}):null},aCe=Gt(fh,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),oCe=()=>{const{resultImages:e,userImages:t}=we(aCe);return n=>{const r=e.find(a=>a.uuid===n);if(r)return r;const i=t.find(a=>a.uuid===n);if(i)return i}},sCe=Gt([Ov,uE,Na],(e,t,n)=>{const{shouldPinParametersPanel:r}=e,{isLightboxOpen:i}=t;return{shouldPinParametersPanel:r,isLightboxOpen:i,activeTabName:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),NA=e=>{const t=nt(),{optionsPanel:n,children:r,...i}=e,{activeTabName:a,isLightboxOpen:o}=we(sCe),s=oCe(),c=d=>{const p=d.dataTransfer.getData("invokeai/imageUuid"),g=s(p);g&&(a==="img2img"?t(a0(g)):a==="unifiedCanvas"&&t(M2(g)))};return v.jsx(Bn,{...i,pos:"relative",w:"100%",h:"100%",children:v.jsxs(Fe,{gap:4,h:"100%",children:[n,v.jsx(Bn,{pos:"relative",w:"100%",h:"100%",onDrop:c,children:r}),!o&&v.jsx(JU,{})]})})},lCe=e=>{const{styleClass:t}=e,n=A.useContext(nA),r=()=>{n&&n()};return v.jsx(Fe,{sx:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},className:t,children:v.jsxs(Fe,{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:[v.jsx(da,{as:dE,boxSize:24}),v.jsx(Vu,{size:"md",children:"Click or Drag and Drop"})]})})},uCe=Gt([fh,Ov],(e,t)=>{const{currentImage:n,intermediateImage:r}=e,{shouldShowImageDetails:i}=t;return{imageToDisplay:r||n,isIntermediate:Boolean(r),shouldShowImageDetails:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function cCe(){const{shouldShowImageDetails:e,imageToDisplay:t,isIntermediate:n}=we(uCe);return v.jsxs(Fe,{sx:{position:"relative",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:[t&&v.jsx(sS,{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&&v.jsx(nH,{}),e&&t&&v.jsx(EA,{image:t,styleClass:"current-image-metadata"})]})}const dCe=Gt([fh],e=>{const{currentImage:t,intermediateImage:n}=e;return{hasAnImageToDisplay:t||n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),TH=()=>{const{hasAnImageToDisplay:e}=we(dCe);return v.jsx(Fe,{sx:{flexDirection:"column",height:"100%",width:"100%",rowGap:4,borderRadius:"base"},children:e?v.jsxs(v.Fragment,{children:[v.jsx(DU,{}),v.jsx(cCe,{})]}):v.jsx(Fe,{sx:{alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:v.jsx(da,{as:h2e,sx:{boxSize:24,color:"base.500"}})})})},fCe=()=>{const e=A.useContext(nA);return v.jsx(kt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:v.jsx(dE,{}),onClick:e||void 0})};function hCe(){const e=we(a=>a.generation.initialImage),{t}=ht(),n=nt(),r=oS(),i=()=>{r({title:t("toast.parametersFailed"),description:t("toast.parametersFailedDesc"),status:"error",isClosable:!0}),n(bj())};return v.jsxs(v.Fragment,{children:[v.jsxs(Fe,{sx:{alignItems:"center",justifyContent:"center",w:"100%",gap:4},children:[v.jsx(Yt,{sx:{fontSize:"lg"},variant:"subtext",children:t("parameters.initialImage")}),v.jsx(fCe,{})]}),e&&v.jsx(Fe,{sx:{position:"relative",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:v.jsx(sS,{sx:{fit:"contain",maxWidth:"100%",maxHeight:"100%",borderRadius:"base",objectFit:"contain",position:"absolute"},src:typeof e=="string"?e:e.url,onError:i})})]})}const kH={flexDirection:"column",height:"100%",width:"100%",gap:4,padding:4},pCe=()=>{const t=we(n=>n.generation.initialImage)?v.jsx(Fe,{flexDirection:"column",gap:4,w:"100%",h:"100%",children:v.jsx(hCe,{})}):v.jsx(lCe,{});return v.jsxs(Hu,{sx:{w:"100%",h:"100%",gridTemplateColumns:"1fr 1fr",borderRadius:"base",bg:"base.850"},children:[v.jsx(Fe,{sx:{...kH,paddingInlineEnd:2},children:t}),v.jsx(Fe,{sx:{...kH,paddingInlineStart:2},children:v.jsx(TH,{})})]})};var gs=(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))(gs||{});const mCe=()=>{const{t:e}=ht();return A.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])},vCe=e=>mCe()[e];function PH(){const e=we(i=>i.system.isGFPGANAvailable),t=we(i=>i.postprocessing.shouldRunFacetool),n=nt(),r=i=>n(CX(i.target.checked));return v.jsx(wl,{isDisabled:!e,isChecked:t,onChange:r})}const AH=()=>{const e=nt(),t=we(i=>i.generation.seamless),n=i=>e(Pj(i.target.checked)),{t:r}=ht();return v.jsx(wl,{label:r("parameters.seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})},gCe=()=>v.jsx(jn,{gap:2,alignItems:"stretch",children:v.jsx(AH,{})});function LA(){const e=we(a=>a.generation.horizontalSymmetrySteps),t=we(a=>a.generation.verticalSymmetrySteps),n=we(a=>a.generation.steps),r=nt(),{t:i}=ht();return v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(ni,{label:i("parameters.hSymmetryStep"),value:e,onChange:a=>r(Nj(a)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(Nj(0))}),v.jsx(ni,{label:i("parameters.vSymmetryStep"),value:t,onChange:a=>r(Lj(a)),min:0,max:n,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>r(Lj(0))})]})}function zA(){const e=we(n=>n.generation.shouldUseSymmetry),t=nt();return v.jsx(wl,{isChecked:e,onChange:n=>t(bX(n.target.checked))})}function yCe(){const e=nt(),t=we(r=>r.generation.perlin),{t:n}=ht();return v.jsx(ni,{label:n("parameters.perlinNoise"),min:0,max:1,step:.05,onChange:r=>e(Sk(r)),handleReset:()=>e(Sk(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}function bCe(){const e=nt(),{t}=ht(),n=we(i=>i.generation.shouldRandomizeSeed),r=i=>e(yX(i.target.checked));return v.jsx(wl,{label:t("parameters.randomizeSeed"),isChecked:n,onChange:r})}const OH=/^-?(0\.)?\.?$/,ph=e=>{const{label:t,isDisabled:n=!1,showStepper:r=!0,isInvalid:i,value:a,onChange:o,min:s,max:c,isInteger:d=!0,formControlProps:p,formLabelProps:g,numberInputFieldProps:S,numberInputStepperProps:w,tooltipProps:C,...k}=e,[P,D]=A.useState(String(a));A.useEffect(()=>{!P.match(OH)&&a!==Number(P)&&D(String(a))},[a,P]);const M=L=>{D(L),L.match(OH)||o(d?Math.floor(Number(L)):Number(L))},R=L=>{const z=Je.clamp(d?Math.floor(Number(L.target.value)):Number(L.target.value),s,c);D(String(z)),o(z)};return v.jsx(so,{...C,children:v.jsxs(Or,{isDisabled:n,isInvalid:i,...p,children:[t&&v.jsx(Qr,{...g,children:t}),v.jsxs(L3,{value:P,min:s,max:c,keepWithinRange:!0,clampValueOnBlur:!1,onChange:M,onBlur:R,...k,children:[v.jsx(B3,{...S}),r&&v.jsxs(z3,{children:[v.jsx(U3,{...w}),v.jsx(F3,{...w})]})]})]})})};function SCe(){const e=nt(),t=we(i=>i.generation.shouldRandomizeSeed),{t:n}=ht(),r=()=>e(qb(SN(Gk,Wk)));return v.jsx(xv,{size:"sm",isDisabled:t,onClick:r,padding:"0 1.5rem",children:v.jsx("p",{children:n("parameters.shuffle")})})}function xCe(){const e=we(o=>o.generation.seed),t=we(o=>o.generation.shouldRandomizeSeed),n=we(o=>o.generation.shouldGenerateVariations),{t:r}=ht(),i=nt(),a=o=>i(qb(o));return v.jsxs(Z0,{gap:2,children:[v.jsx(ph,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:Gk,max:Wk,isDisabled:t,isInvalid:e<0&&n,onChange:a,value:e,formControlProps:{display:"flex",alignItems:"center",gap:3}}),v.jsx(SCe,{})]})}function wCe(){const e=nt(),t=we(r=>r.generation.threshold),{t:n}=ht();return v.jsx(ni,{label:n("parameters.noiseThreshold"),min:0,max:20,step:.1,onChange:r=>e(wk(r)),handleReset:()=>e(wk(0)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0})}const BA=()=>v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(bCe,{}),v.jsx(xCe,{}),v.jsx(wCe,{}),v.jsx(yCe,{})]});function DH(){const e=we(i=>i.system.isESRGANAvailable),t=we(i=>i.postprocessing.shouldRunESRGAN),n=nt(),r=i=>n(wX(i.target.checked));return v.jsx(wl,{isDisabled:!e,isChecked:t,onChange:r})}function FA(){const e=we(r=>r.generation.shouldGenerateVariations),t=nt(),n=r=>t(gX(r.target.checked));return v.jsx(wl,{isChecked:e,width:"auto",onChange:n})}function wi(e){const{label:t="",isDisabled:n=!1,isInvalid:r,formControlProps:i,...a}=e;return v.jsxs(Or,{isInvalid:r,isDisabled:n,...i,children:[t!==""&&v.jsx(Qr,{children:t}),v.jsx(u3,{...a})]})}function CCe(){const e=we(a=>a.generation.seedWeights),t=we(a=>a.generation.shouldGenerateVariations),{t:n}=ht(),r=nt(),i=a=>r(Mj(a.target.value));return v.jsx(wi,{label:n("parameters.seedWeights"),value:e,isInvalid:t&&!(gk(e)||e===""),isDisabled:!t,onChange:i})}function ECe(){const e=we(i=>i.generation.variationAmount),t=we(i=>i.generation.shouldGenerateVariations),{t:n}=ht(),r=nt();return v.jsx(ni,{label:n("parameters.variationAmount"),value:e,step:.01,min:0,max:1,isSliderDisabled:!t,isInputDisabled:!t,isResetDisabled:!t,onChange:i=>r(Rj(i)),handleReset:()=>r(Rj(.1)),withInput:!0,withReset:!0,withSliderMarks:!0})}const UA=()=>v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(ECe,{}),v.jsx(CCe,{})]});function MH(){const e=nt(),t=we(a=>a.generation.cfgScale),n=we(a=>a.ui.shouldUseSliders),{t:r}=ht(),i=a=>e(yk(a));return n?v.jsx(ni,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:30,onChange:i,handleReset:()=>e(yk(7.5)),value:t,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0}):v.jsx(ph,{label:r("parameters.cfgScale"),step:.5,min:1.01,max:200,onChange:i,value:t,isInteger:!1,numberInputFieldProps:{textAlign:"center"}})}function jH(){const e=we(a=>a.generation.height),t=we(a=>a.ui.shouldUseSliders),n=we(Na),r=nt(),{t:i}=ht();return t?v.jsx(ni,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:i("parameters.height"),value:e,min:64,step:64,max:2048,onChange:a=>r(F2(a)),handleReset:()=>r(F2(512)),withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:15360}}):v.jsx(xl,{isDisabled:n==="unifiedCanvas",label:i("parameters.height"),value:e,flexGrow:1,onChange:a=>r(F2(Number(a.target.value))),validValues:sJ})}function IH(){const e=we(a=>a.generation.iterations),t=we(a=>a.ui.shouldUseSliders),n=nt(),{t:r}=ht(),i=a=>n(wj(a));return t?v.jsx(ni,{label:r("parameters.images"),step:1,min:1,max:16,onChange:i,handleReset:()=>n(wj(1)),value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:9999}}):v.jsx(ph,{label:r("parameters.images"),step:1,min:1,max:9999,onChange:i,value:e,numberInputFieldProps:{textAlign:"center"}})}function RH(){const e=we(a=>a.generation.sampler),t=we(pU),n=nt(),{t:r}=ht(),i=a=>n(Tj(a.target.value));return v.jsx(xl,{label:r("parameters.sampler"),value:e,onChange:i,validValues:t.format==="diffusers"?aJ:iJ,minWidth:36})}function NH(){const e=nt(),t=we(o=>o.generation.steps),n=we(o=>o.ui.shouldUseSliders),{t:r}=ht(),i=o=>{e(xk(o))},a=()=>{e(yj())};return n?v.jsx(ni,{label:r("parameters.steps"),min:1,step:1,onChange:i,handleReset:()=>e(xk(20)),value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:9999}}):v.jsx(ph,{label:r("parameters.steps"),min:1,max:9999,step:1,onChange:i,value:t,numberInputFieldProps:{textAlign:"center"},onBlur:a})}function LH(){const e=we(a=>a.generation.width),t=we(a=>a.ui.shouldUseSliders),n=we(Na),{t:r}=ht(),i=nt();return t?v.jsx(ni,{isSliderDisabled:n==="unifiedCanvas",isInputDisabled:n==="unifiedCanvas",isResetDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,min:64,step:64,max:2048,onChange:a=>i(U2(a)),handleReset:()=>i(U2(512)),withInput:!0,withReset:!0,withSliderMarks:!0,inputReadOnly:!0,sliderNumberInputProps:{max:15360}}):v.jsx(xl,{isDisabled:n==="unifiedCanvas",label:r("parameters.width"),value:e,flexGrow:1,onChange:a=>i(U2(Number(a.target.value))),validValues:oJ})}function HA(){return we(t=>t.ui.shouldUseSliders)?v.jsxs(jn,{gap:2,children:[v.jsx(IH,{}),v.jsx(NH,{}),v.jsx(MH,{}),v.jsx(LH,{}),v.jsx(jH,{}),v.jsx(RH,{})]}):v.jsxs(Fe,{rowGap:2,flexDirection:"column",children:[v.jsxs(Fe,{columnGap:1,children:[v.jsx(IH,{}),v.jsx(NH,{}),v.jsx(MH,{})]}),v.jsxs(Fe,{columnGap:1,children:[v.jsx(LH,{}),v.jsx(jH,{}),v.jsx(RH,{})]})]})}const _Ce=Gt(zi,e=>e.shouldDisplayGuides),TCe=({children:e,feature:t})=>{const n=we(_Ce),{text:r}=vCe(t);return n?v.jsxs(W3,{trigger:"hover",children:[v.jsx(V3,{children:v.jsx(Bn,{children:e})}),v.jsxs(Y3,{maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[v.jsx(q3,{}),v.jsx(NF,{children:r})]})]}):null},kCe=_t(({feature:e,icon:t=o2e},n)=>v.jsx(TCe,{feature:e,children:v.jsx(Bn,{ref:n,children:v.jsx(da,{marginBottom:"-.15rem",as:t})})}));function PCe(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return v.jsxs(U0,{children:[v.jsx(B0,{children:v.jsxs(Fe,{width:"100%",gap:2,align:"center",children:[v.jsx(Bn,{flexGrow:1,textAlign:"start",children:t}),i,n&&v.jsx(kCe,{feature:n}),v.jsx(F0,{})]})}),v.jsx(V0,{children:r})]})}const VA=e=>{const{accordionInfo:t}=e,n=we(o=>o.system.openAccordions),r=nt(),i=o=>r(XQ(o)),a=()=>{const o=[];return t&&Object.keys(t).forEach(s=>{const{header:c,feature:d,content:p,additionalHeaderComponents:g}=t[s];o.push(v.jsx(PCe,{header:c,feature:d,content:p,additionalHeaderComponents:g},s))}),o};return v.jsx(_P,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:i,children:a()})},ACe=Gt(lA,({shouldLoopback:e})=>e),OCe=()=>{const e=nt(),t=we(ACe),{t:n}=ht();return v.jsx(kt,{"aria-label":n("parameters.toggleLoopback"),tooltip:n("parameters.toggleLoopback"),isChecked:t,icon:v.jsx(Bxe,{}),onClick:()=>{e(xX(!t))}})},GA=()=>{const e=we(Na);return v.jsxs(Fe,{gap:2,children:[v.jsx(jA,{}),e==="img2img"&&v.jsx(OCe,{}),v.jsx(DA,{})]})},WA=()=>{const e=we(r=>r.generation.negativePrompt),t=nt(),{t:n}=ht();return v.jsx(Or,{children:v.jsx($3,{id:"negativePrompt",name:"negativePrompt",value:e,onChange:r=>t(_j(r.target.value)),placeholder:n("parameters.negativePrompts"),_focusVisible:{borderColor:"error.600"},fontSize:"sm"})})},DCe=Gt([e=>e.generation,Na],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),qA=()=>{const e=nt(),{prompt:t,activeTabName:n}=we(DCe),{isReady:r}=we(_H),i=A.useRef(null),{t:a}=ht(),o=c=>{e(Ej(c.target.value))};Ot("alt+a",()=>{var c;(c=i.current)==null||c.focus()},[]);const s=c=>{c.key==="Enter"&&c.shiftKey===!1&&r&&(c.preventDefault(),e(v4(n)))};return v.jsx(Bn,{children:v.jsx(Or,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:v.jsx($3,{id:"prompt",name:"prompt",placeholder:a("parameters.promptPlaceholder"),value:t,onChange:o,onKeyDown:s,resize:"vertical",ref:i,minH:40})})})},MCe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdMAAAHTCAYAAAB8/vKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFyWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZWRhMmIzZiwgMjAyMS8xMS8xNC0xMjozMDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjEgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMi0wOS0yMFQyMDo0NDoyNSsxMjowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjItMDktMjBUMjM6NDM6MjgrMTI6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjItMDktMjBUMjM6NDM6MjgrMTI6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc0ZmY2YTc5LWE0MzktOTk0Yi1hYWEyLWQwODBiMTM5Mjg1MyIgeG1wTU06RG9jdW1lbnRJRD0i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",zH=()=>{const e=we(t=>t.system.app_version);return v.jsxs(Fe,{alignItems:"center",gap:3,ps:1,children:[v.jsx(sS,{src:MCe,alt:"invoke-ai-logo",w:"32px",h:"32px"}),v.jsxs(Yt,{fontSize:"xl",children:["invoke ",v.jsx("strong",{children:"ai"})]}),v.jsx(Yt,{sx:{fontWeight:300,marginTop:1},variant:"subtext",children:e})]})},RIe="",jCe=Gt(Ov,e=>{const{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}=e;return{shouldShowParametersPanel:t,shouldHoldParametersPanelOpen:n,shouldPinParametersPanel:r,parametersPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),YA=e=>{const t=nt(),{direction:n}=Sp(),{shouldShowParametersPanel:r,shouldHoldParametersPanelOpen:i,shouldPinParametersPanel:a}=we(jCe),o=A.useRef(null),s=A.useRef(null),c=A.useRef(null),{children:d}=e,{t:p}=ht();Ot("o",()=>{t(Zm(!r)),a&&setTimeout(()=>t(Wo(!0)),400)},[r,a]),Ot("esc",()=>{t(Zm(!1))},{enabled:()=>!a,preventDefault:!0},[a]),Ot("shift+o",()=>{C(),t(Wo(!0))},[a]);const g=A.useCallback(()=>{a||(t(cZ(s.current?s.current.scrollTop:0)),t(Zm(!1)),t(dZ(!1)))},[t,a]),S=()=>{c.current=window.setTimeout(()=>g(),500)},w=()=>{c.current&&window.clearTimeout(c.current)},C=()=>{t(fZ(!a)),t(Wo(!0))};return A.useEffect(()=>{function k(P){o.current&&!o.current.contains(P.target)&&g()}return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[g]),v.jsx(qU,{nodeRef:o,in:r||i&&!a,unmountOnExit:!0,timeout:200,classNames:`${n}-parameters-panel-transition`,children:v.jsx(Bn,{className:`${n}-parameters-panel-transition`,tabIndex:1,ref:o,onMouseEnter:a?void 0:w,onMouseOver:a?void 0:w,sx:{borderInlineEndWidth:a?0:5,borderInlineEndStyle:"solid",bg:"base.900",borderColor:"base.700",height:A2e,width:gE,maxWidth:gE,flexShrink:0,position:"relative",overflowY:"scroll",overflowX:"hidden",...XU,...!a&&{zIndex:20,position:"fixed",top:0,insetInlineStart:0,width:`calc(${gE} + 2rem)`,maxWidth:`calc(${gE} + 2rem)`,height:"100%"}},children:v.jsx(Bn,{sx:{margin:!a&&4},children:v.jsxs(Fe,{ref:s,onMouseLeave:k=>{k.target!==s.current?w():!a&&S()},sx:{display:"flex",flexDirection:"column",rowGap:2,height:"100%"},children:[v.jsx(so,{label:p("common.pinOptionsPanel"),children:v.jsx(Bn,{onClick:C,sx:{position:"absolute",cursor:"pointer",padding:2,top:4,insetInlineEnd:4,zIndex:20,...a&&{top:0,insetInlineEnd:0}},children:v.jsx(da,{sx:{opacity:.2},as:a?zU:BU})})}),!a&&v.jsx(Bn,{sx:{pt:CA,pb:2},children:v.jsx(zH,{})}),d]})})})})};function ICe(){const e=nt(),t=we(i=>i.generation.shouldFitToWidthHeight),n=i=>e(jj(i.target.checked)),{t:r}=ht();return v.jsx(wl,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function BH(e){const{t}=ht(),{label:n=`${t("parameters.strength")}`}=e,r=we(s=>s.generation.img2imgStrength),i=nt(),a=s=>i(bk(s)),o=()=>{i(bk(.75))};return v.jsx(ni,{label:n,step:.01,min:.01,max:1,onChange:a,value:r,isInteger:!1,withInput:!0,withSliderMarks:!0,inputWidth:22,withReset:!0,handleReset:o})}function RCe(){const{t:e}=ht();return v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(BH,{label:e("parameters.img2imgStrength")}),v.jsx(ICe,{})]})}function NCe(){const{t:e}=ht(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:v.jsx(HA,{})},imageToImage:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:v.jsx(RCe,{})},seed:{header:`${e("parameters.seed")}`,feature:gs.SEED,content:v.jsx(BA,{})},variations:{header:`${e("parameters.variations")}`,feature:gs.VARIATIONS,content:v.jsx(UA,{}),additionalHeaderComponents:v.jsx(FA,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:gs.FACE_CORRECTION,content:v.jsx(oA,{}),additionalHeaderComponents:v.jsx(PH,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:gs.UPSCALE,content:v.jsx(sA,{}),additionalHeaderComponents:v.jsx(DH,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:v.jsx(LA,{}),additionalHeaderComponents:v.jsx(zA,{})},other:{header:`${e("parameters.otherOptions")}`,feature:gs.OTHER,content:v.jsx(gCe,{})}};return v.jsxs(YA,{children:[v.jsxs(Fe,{flexDir:"column",rowGap:2,children:[v.jsx(qA,{}),v.jsx(WA,{})]}),v.jsx(GA,{}),v.jsx(VA,{accordionInfo:t})]})}function LCe(){return v.jsx(NA,{optionsPanel:v.jsx(NCe,{}),children:v.jsx(pCe,{})})}const zCe=()=>v.jsx(Bn,{sx:{width:"100%",height:"100%",borderRadius:"base",bg:"base.850"},children:v.jsx(Fe,{sx:{p:4,width:"100%",height:"100%"},children:v.jsx(TH,{})})}),BCe=Gt([lA],({hiresFix:e,hiresStrength:t})=>({hiresFix:e,hiresStrength:t}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),FCe=()=>{const{hiresFix:e,hiresStrength:t}=we(BCe),n=nt(),{t:r}=ht(),i=o=>{n(Uj(o))},a=()=>{n(Uj(.75))};return v.jsx(ni,{label:r("parameters.hiresStrength"),step:.01,min:.01,max:.99,onChange:i,value:t,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:a,isSliderDisabled:!e,isInputDisabled:!e,isResetDisabled:!e})},UCe=()=>{const e=nt(),t=we(i=>i.postprocessing.hiresFix),{t:n}=ht(),r=i=>e(Fj(i.target.checked));return v.jsx(wl,{label:n("parameters.hiresOptim"),fontSize:"md",isChecked:t,onChange:r})},HCe=()=>v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(AH,{}),v.jsx(UCe,{}),v.jsx(FCe,{})]});function VCe(){const{t:e}=ht(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:v.jsx(HA,{})},seed:{header:`${e("parameters.seed")}`,feature:gs.SEED,content:v.jsx(BA,{})},variations:{header:`${e("parameters.variations")}`,feature:gs.VARIATIONS,content:v.jsx(UA,{}),additionalHeaderComponents:v.jsx(FA,{})},face_restore:{header:`${e("parameters.faceRestoration")}`,feature:gs.FACE_CORRECTION,content:v.jsx(oA,{}),additionalHeaderComponents:v.jsx(PH,{})},upscale:{header:`${e("parameters.upscaling")}`,feature:gs.UPSCALE,content:v.jsx(sA,{}),additionalHeaderComponents:v.jsx(DH,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:v.jsx(LA,{}),additionalHeaderComponents:v.jsx(zA,{})},other:{header:`${e("parameters.otherOptions")}`,feature:gs.OTHER,content:v.jsx(HCe,{})}};return v.jsxs(YA,{children:[v.jsxs(Fe,{flexDir:"column",rowGap:2,children:[v.jsx(qA,{}),v.jsx(WA,{})]}),v.jsx(GA,{}),v.jsx(VA,{accordionInfo:t})]})}function GCe(){return v.jsx(NA,{optionsPanel:v.jsx(VCe,{}),children:v.jsx(zCe,{})})}var KA={},WCe={get exports(){return KA},set exports(e){KA=e}},Iv={},qCe={get exports(){return Iv},set exports(e){Iv=e}},XA={};/** * @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. */var FH;function YCe(){return FH||(FH=1,function(e){function t(re,le){var ee=re.length;re.push(le);e:for(;0>>1,Re=re[de];if(0>>1;dei(Me,ee))Tei(Xe,Me)?(re[de]=Xe,re[Te]=ee,de=Te):(re[de]=Me,re[_e]=ee,de=_e);else if(Tei(Xe,ee))re[de]=Xe,re[Te]=ee,de=Te;else break e}}return le}function i(re,le){var ee=re.sortIndex-le.sortIndex;return ee!==0?ee:re.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],d=[],p=1,g=null,S=3,w=!1,C=!1,k=!1,P=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(re){for(var le=n(d);le!==null;){if(le.callback===null)r(d);else if(le.startTime<=re)r(d),le.sortIndex=le.expirationTime,t(c,le);else break;le=n(d)}}function L(re){if(k=!1,R(re),!C)if(n(c)!==null)C=!0,oe(z);else{var le=n(d);le!==null&&ie(L,le.startTime-re)}}function z(re,le){C=!1,k&&(k=!1,D(q),q=-1),w=!0;var ee=S;try{for(R(le),g=n(c);g!==null&&(!(g.expirationTime>le)||re&&!K());){var de=g.callback;if(typeof de=="function"){g.callback=null,S=g.priorityLevel;var Re=de(g.expirationTime<=le);le=e.unstable_now(),typeof Re=="function"?g.callback=Re:g===n(c)&&r(c),R(le)}else r(c);g=n(c)}if(g!==null)var Ae=!0;else{var _e=n(d);_e!==null&&ie(L,_e.startTime-le),Ae=!1}return Ae}finally{g=null,S=ee,w=!1}}var U=!1,H=null,q=-1,J=5,$=-1;function K(){return!(e.unstable_now()-$re||125de?(re.sortIndex=ee,t(d,re),n(c)===null&&re===n(d)&&(k?(D(q),q=-1):k=!0,ie(L,ee-de))):(re.sortIndex=Re,t(c,re),C||w||(C=!0,oe(z))),re},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(re){var le=S;return function(){var ee=S;S=le;try{return re.apply(this,arguments)}finally{S=ee}}}}(XA)),XA}var QA={};/** * @license React * scheduler.development.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 UH;function KCe(){return UH||(UH=1,function(e){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=!1,n=!1,r=5;function i(st,Ge){var mt=st.length;st.push(Ge),s(st,Ge,mt)}function a(st){return st.length===0?null:st[0]}function o(st){if(st.length===0)return null;var Ge=st[0],mt=st.pop();return mt!==Ge&&(st[0]=mt,c(st,mt,0)),Ge}function s(st,Ge,mt){for(var Ft=mt;Ft>0;){var In=Ft-1>>>1,Hn=st[In];if(d(Hn,Ge)>0)st[In]=Ge,st[Ft]=Hn,Ft=In;else return}}function c(st,Ge,mt){for(var Ft=mt,In=st.length,Hn=In>>>1;Ftmt&&(!st||ar()));){var Ft=X.callback;if(typeof Ft=="function"){X.callback=null,G=X.priorityLevel;var In=X.expirationTime<=mt,Hn=Ft(In);mt=e.unstable_now(),typeof Hn=="function"?X.callback=Hn:X===a($)&&o($),de(mt)}else o($);X=a($)}if(X!==null)return!0;var jt=a(K);return jt!==null&&rn(Re,jt.startTime-mt),!1}function Me(st,Ge){switch(st){case p:case g:case S:case w:case C:break;default:st=S}var mt=G;G=st;try{return Ge()}finally{G=mt}}function Te(st){var Ge;switch(G){case p:case g:case S:Ge=S;break;default:Ge=G;break}var mt=G;G=Ge;try{return st()}finally{G=mt}}function Xe(st){var Ge=G;return function(){var mt=G;G=Ge;try{return st.apply(this,arguments)}finally{G=mt}}}function Qe(st,Ge,mt){var Ft=e.unstable_now(),In;if(typeof mt=="object"&&mt!==null){var Hn=mt.delay;typeof Hn=="number"&&Hn>0?In=Ft+Hn:In=Ft}else In=Ft;var jt;switch(st){case p:jt=z;break;case g:jt=U;break;case C:jt=J;break;case w:jt=q;break;case S:default:jt=H;break}var zt=In+jt,vr={id:fe++,callback:Ge,priorityLevel:st,startTime:In,expirationTime:zt,sortIndex:-1};return In>Ft?(vr.sortIndex=In,i(K,vr),a($)===null&&vr===a(K)&&(ie?$e():ie=!0,rn(Re,In-Ft))):(vr.sortIndex=zt,i($,vr),!oe&&!te&&(oe=!0,Jt(Ae))),vr}function vt(){}function St(){!oe&&!te&&(oe=!0,Jt(Ae))}function qe(){return a($)}function Ce(st){st.callback=null}function Lt(){return G}var De=!1,wt=null,ln=-1,Wt=r,Rn=-1;function ar(){var st=e.unstable_now()-Rn;return!(st125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}st>0?Wt=Math.floor(1e3/st):Wt=r}var at=function(){if(wt!==null){var st=e.unstable_now();Rn=st;var Ge=!0,mt=!0;try{mt=wt(Ge,st)}finally{mt?bt():(De=!1,wt=null)}}else De=!1},bt;if(typeof ee=="function")bt=function(){ee(at)};else if(typeof MessageChannel<"u"){var Ve=new MessageChannel,ot=Ve.port2;Ve.port1.onmessage=at,bt=function(){ot.postMessage(null)}}else bt=function(){re(at,0)};function Jt(st){wt=st,De||(De=!0,bt())}function rn(st,Ge){ln=re(function(){st(e.unstable_now())},Ge)}function $e(){le(ln),ln=-1}var an=xe,Nn=null;e.unstable_IdlePriority=C,e.unstable_ImmediatePriority=p,e.unstable_LowPriority=w,e.unstable_NormalPriority=S,e.unstable_Profiling=Nn,e.unstable_UserBlockingPriority=g,e.unstable_cancelCallback=Ce,e.unstable_continueExecution=St,e.unstable_forceFrameRate=it,e.unstable_getCurrentPriorityLevel=Lt,e.unstable_getFirstCallbackNode=qe,e.unstable_next=Te,e.unstable_pauseExecution=vt,e.unstable_requestPaint=an,e.unstable_runWithPriority=Me,e.unstable_scheduleCallback=Qe,e.unstable_shouldYield=ar,e.unstable_wrapCallback=Xe,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(QA)),QA}(function(e){process.env.NODE_ENV==="production"?e.exports=YCe():e.exports=KCe()})(qCe);/** * @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 ZA,HH;function XCe(){return HH||(HH=1,ZA=function(t){var n={},r=A,i=Iv,a=Object.assign;function o(h){for(var m="https://reactjs.org/docs/error-decoder.html?invariant="+h,E=1;Eye||j[ne]!==B[ye]){var Ne=` `+j[ne].replace(" at new "," at ");return h.displayName&&Ne.includes("")&&(Ne=Ne.replace("",h.displayName)),Ne}while(1<=ne&&0<=ye);break}}}finally{iu=!1,Error.prepareStackTrace=E}return(h=h?h.displayName||h.name:"")?Qu(h):""}var yh=Object.prototype.hasOwnProperty,Kd=[],ou=-1;function Ys(h){return{current:h}}function Gn(h){0>ou||(h.current=Kd[ou],Kd[ou]=null,ou--)}function _r(h,m){ou++,Kd[ou]=h.current,h.current=m}var Ks={},ma=Ys(Ks),za=Ys(!1),Xs=Ks;function Zu(h,m){var E=h.type.contextTypes;if(!E)return Ks;var O=h.stateNode;if(O&&O.__reactInternalMemoizedUnmaskedChildContext===m)return O.__reactInternalMemoizedMaskedChildContext;var j={},B;for(B in E)j[B]=m[B];return O&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=m,h.__reactInternalMemoizedMaskedChildContext=j),j}function va(h){return h=h.childContextTypes,h!=null}function Cl(){Gn(za),Gn(ma)}function Xd(h,m,E){if(ma.current!==Ks)throw Error(o(168));_r(ma,m),_r(za,E)}function su(h,m,E){var O=h.stateNode;if(m=m.childContextTypes,typeof O.getChildContext!="function")return E;O=O.getChildContext();for(var j in O)if(!(j in m))throw Error(o(108,q(h)||"Unknown",j));return a({},E,O)}function El(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||Ks,Xs=ma.current,_r(ma,h),_r(za,za.current),!0}function Qd(h,m,E){var O=h.stateNode;if(!O)throw Error(o(169));E?(h=su(h,m,Xs),O.__reactInternalMemoizedMergedChildContext=h,Gn(za),Gn(ma),_r(ma,h)):Gn(za),_r(za,E)}var fo=Math.clz32?Math.clz32:bh,Zd=Math.log,Gc=Math.LN2;function bh(h){return h>>>=0,h===0?32:31-(Zd(h)/Gc|0)|0}var ta=64,ho=4194304;function ga(h){switch(h&-h){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 h&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function Wc(h,m){var E=h.pendingLanes;if(E===0)return 0;var O=0,j=h.suspendedLanes,B=h.pingedLanes,ne=E&268435455;if(ne!==0){var ye=ne&~j;ye!==0?O=ga(ye):(B&=ne,B!==0&&(O=ga(B)))}else ne=E&~j,ne!==0?O=ga(ne):B!==0&&(O=ga(B));if(O===0)return 0;if(m!==0&&m!==O&&!(m&j)&&(j=O&-O,B=m&-m,j>=B||j===16&&(B&4194240)!==0))return m;if(O&4&&(O|=E&16),m=h.entangledLanes,m!==0)for(h=h.entanglements,m&=O;0E;E++)m.push(h);return m}function po(h,m,E){h.pendingLanes|=m,m!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,m=31-fo(m),h[m]=E}function xh(h,m){var E=h.pendingLanes&~m;h.pendingLanes=m,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=m,h.mutableReadLanes&=m,h.entangledLanes&=m,m=h.entanglements;var O=h.eventTimes;for(h=h.expirationTimes;0>=ne,j-=ne,$o=1<<32-fo(m)+j|E<zn?(Mi=Sn,Sn=null):Mi=Sn.sibling;var Zn=Mt(Be,Sn,Ue[zn],It);if(Zn===null){Sn===null&&(Sn=Mi);break}h&&Sn&&Zn.alternate===null&&m(Be,Sn),be=B(Zn,be,zn),Cn===null?rt=Zn:Cn.sibling=Zn,Cn=Zn,Sn=Mi}if(zn===Ue.length)return E(Be,Sn),ii&&_l(Be,zn),rt;if(Sn===null){for(;znzn?(Mi=Sn,Sn=null):Mi=Sn.sibling;var as=Mt(Be,Sn,Zn.value,It);if(as===null){Sn===null&&(Sn=Mi);break}h&&Sn&&as.alternate===null&&m(Be,Sn),be=B(as,be,zn),Cn===null?rt=as:Cn.sibling=as,Cn=as,Sn=Mi}if(Zn.done)return E(Be,Sn),ii&&_l(Be,zn),rt;if(Sn===null){for(;!Zn.done;zn++,Zn=Ue.next())Zn=un(Be,Zn.value,It),Zn!==null&&(be=B(Zn,be,zn),Cn===null?rt=Zn:Cn.sibling=Zn,Cn=Zn);return ii&&_l(Be,zn),rt}for(Sn=O(Be,Sn);!Zn.done;zn++,Zn=Ue.next())Zn=si(Sn,Be,zn,Zn.value,It),Zn!==null&&(h&&Zn.alternate!==null&&Sn.delete(Zn.key===null?zn:Zn.key),be=B(Zn,be,zn),Cn===null?rt=Zn:Cn.sibling=Zn,Cn=Zn);return h&&Sn.forEach(function(ji){return m(Be,ji)}),ii&&_l(Be,zn),rt}function Cr(Be,be,Ue,It){if(typeof Ue=="object"&&Ue!==null&&Ue.type===p&&Ue.key===null&&(Ue=Ue.props.children),typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case c:e:{for(var rt=Ue.key,Cn=be;Cn!==null;){if(Cn.key===rt){if(rt=Ue.type,rt===p){if(Cn.tag===7){E(Be,Cn.sibling),be=j(Cn,Ue.props.children),be.return=Be,Be=be;break e}}else if(Cn.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===R&&om(rt)===Cn.type){E(Be,Cn.sibling),be=j(Cn,Ue.props),be.ref=Es(Be,Cn,Ue),be.return=Be,Be=be;break e}E(Be,Cn);break}else m(Be,Cn);Cn=Cn.sibling}Ue.type===p?(be=Su(Ue.props.children,Be.mode,It,Ue.key),be.return=Be,Be=be):(It=Tf(Ue.type,Ue.key,Ue.props,null,Be.mode,It),It.ref=Es(Be,be,Ue),It.return=Be,Be=It)}return ne(Be);case d:e:{for(Cn=Ue.key;be!==null;){if(be.key===Cn)if(be.tag===4&&be.stateNode.containerInfo===Ue.containerInfo&&be.stateNode.implementation===Ue.implementation){E(Be,be.sibling),be=j(be,Ue.children||[]),be.return=Be,Be=be;break e}else{E(Be,be);break}else m(Be,be);be=be.sibling}be=Ll(Ue,Be.mode,It),be.return=Be,Be=be}return ne(Be);case R:return Cn=Ue._init,Cr(Be,be,Cn(Ue._payload),It)}if(te(Ue))return Ur(Be,be,Ue,It);if(U(Ue))return or(Be,be,Ue,It);vo(Be,Ue)}return typeof Ue=="string"&&Ue!==""||typeof Ue=="number"?(Ue=""+Ue,be!==null&&be.tag===6?(E(Be,be.sibling),be=j(be,Ue),be.return=Be,Be=be):(E(Be,be),be=Pf(Ue,Be.mode,It),be.return=Be,Be=be),ne(Be)):E(Be,be)}return Cr}var cu=Jv(!0),_s=Jv(!1),Zc={},go=Ys(Zc),Oa=Ys(Zc),ge=Ys(Zc);function ze(h){if(h===Zc)throw Error(o(174));return h}function Pe(h,m){_r(ge,m),_r(Oa,h),_r(go,Zc),h=ie(m),Gn(go),_r(go,h)}function Rt(){Gn(go),Gn(Oa),Gn(ge)}function nn(h){var m=ze(ge.current),E=ze(go.current);m=re(E,h.type,m),E!==m&&(_r(Oa,h),_r(go,m))}function Un(h){Oa.current===h&&(Gn(go),Gn(Oa))}var gn=Ys(0);function yr(h){for(var m=h;m!==null;){if(m.tag===13){var E=m.memoizedState;if(E!==null&&(E=E.dehydrated,E===null||Xu(E)||Hc(E)))return m}else if(m.tag===19&&m.memoizedProps.revealOrder!==void 0){if(m.flags&128)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===h)break;for(;m.sibling===null;){if(m.return===null||m.return===h)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var Al=[];function sm(){for(var h=0;hE?E:4,h(!0);var O=du.transition;du.transition={};try{h(!1),m()}finally{tr=E,du.transition=O}}function nc(){return cr().memoizedState}function Rh(h,m,E){var O=Nr(h);if(E={lane:O,action:E,hasEagerState:!1,eagerState:null,next:null},ic(h))ac(m,E);else if(E=Kc(h,m,E,O),E!==null){var j=Ga();rs(E,h,O,j),oc(E,m,O)}}function rc(h,m,E){var O=Nr(h),j={lane:O,action:E,hasEagerState:!1,eagerState:null,next:null};if(ic(h))ac(m,j);else{var B=h.alternate;if(h.lanes===0&&(B===null||B.lanes===0)&&(B=m.lastRenderedReducer,B!==null))try{var ne=m.lastRenderedState,ye=B(ne,E);if(j.hasEagerState=!0,j.eagerState=ye,ae(ye,ne)){var Ne=m.interleaved;Ne===null?(j.next=j,uf(m)):(j.next=Ne.next,Ne.next=j),m.interleaved=j;return}}catch{}finally{}E=Kc(h,m,j,O),E!==null&&(j=Ga(),rs(E,h,O,j),oc(E,m,O))}}function ic(h){var m=h.alternate;return h===wr||m!==null&&m===wr}function ac(h,m){tc=hr=!0;var E=h.pending;E===null?m.next=m:(m.next=E.next,E.next=m),h.pending=m}function oc(h,m,E){if(E&4194240){var O=m.lanes;O&=h.pendingLanes,E|=O,m.lanes=E,qc(h,E)}}var zo={readContext:Fa,useCallback:Vi,useContext:Vi,useEffect:Vi,useImperativeHandle:Vi,useInsertionEffect:Vi,useLayoutEffect:Vi,useMemo:Vi,useReducer:Vi,useRef:Vi,useState:Vi,useDebugValue:Vi,useDeferredValue:Vi,useTransition:Vi,useMutableSource:Vi,useSyncExternalStore:Vi,useId:Vi,unstable_isNewReconciler:!1},eg={readContext:Fa,useCallback:function(h,m){return _n().memoizedState=[h,m===void 0?null:m],h},useContext:Fa,useEffect:ff,useImperativeHandle:function(h,m,E){return E=E!=null?E.concat([h]):null,tl(4194308,4,Oi.bind(null,m,h),E)},useLayoutEffect:function(h,m){return tl(4194308,4,h,m)},useInsertionEffect:function(h,m){return tl(4,2,h,m)},useMemo:function(h,m){var E=_n();return m=m===void 0?null:m,h=h(),E.memoizedState=[h,m],h},useReducer:function(h,m,E){var O=_n();return m=E!==void 0?E(m):m,O.memoizedState=O.baseState=m,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:m},O.queue=h,h=h.dispatch=Rh.bind(null,wr,h),[O.memoizedState,h]},useRef:function(h){var m=_n();return h={current:h},m.memoizedState=h},useState:Ol,useDebugValue:Mh,useDeferredValue:function(h){return _n().memoizedState=h},useTransition:function(){var h=Ol(!1),m=h[0];return h=Ih.bind(null,h[1]),_n().memoizedState=h,[m,h]},useMutableSource:function(){},useSyncExternalStore:function(h,m,E){var O=wr,j=_n();if(ii){if(E===void 0)throw Error(o(407));E=E()}else{if(E=m(),Da===null)throw Error(o(349));to&30||Dh(O,m,E)}j.memoizedState=E;var B={value:E,getSnapshot:m};return j.queue=B,ff(oi.bind(null,O,B,h),[h]),O.flags|=2048,el(9,tt.bind(null,O,B,E,m),void 0,null),E},useId:function(){var h=_n(),m=Da.identifierPrefix;if(ii){var E=Zs,O=$o;E=(O&~(1<<32-fo(O)-1)).toString(32)+E,m=":"+m+"R"+E,E=Jc++,0Gh&&(m.flags|=128,O=!0,bf(j,!1),m.lanes=4194304)}else{if(!O)if(h=yr(B),h!==null){if(m.flags|=128,O=!0,h=h.updateQueue,h!==null&&(m.updateQueue=h,m.flags|=4),bf(j,!0),j.tail===null&&j.tailMode==="hidden"&&!B.alternate&&!ii)return Ha(m),null}else 2*hi()-j.renderingStartTime>Gh&&E!==1073741824&&(m.flags|=128,O=!0,bf(j,!1),m.lanes=4194304);j.isBackwards?(B.sibling=m.child,m.child=B):(h=j.last,h!==null?h.sibling=B:m.child=B,j.last=B)}return j.tail!==null?(m=j.tail,j.rendering=m,j.tail=m.sibling,j.renderingStartTime=hi(),m.sibling=null,h=gn.current,_r(gn,O?h&1|2:h&1),m):(Ha(m),null);case 22:case 23:return Uo(),E=m.memoizedState!==null,h!==null&&h.memoizedState!==null!==E&&(m.flags|=8192),E&&m.mode&1?ns&1073741824&&(Ha(m),qe&&m.subtreeFlags&6&&(m.flags|=8192)):Ha(m),null;case 24:return null;case 25:return null}throw Error(o(156,m.tag))}function Uh(h,m){switch(rf(m),m.tag){case 1:return va(m.type)&&Cl(),h=m.flags,h&65536?(m.flags=h&-65537|128,m):null;case 3:return Rt(),Gn(za),Gn(ma),sm(),h=m.flags,h&65536&&!(h&128)?(m.flags=h&-65537|128,m):null;case 5:return Un(m),null;case 13:if(Gn(gn),h=m.memoizedState,h!==null&&h.dehydrated!==null){if(m.alternate===null)throw Error(o(340));of()}return h=m.flags,h&65536?(m.flags=h&-65537|128,m):null;case 19:return Gn(gn),null;case 4:return Rt(),null;case 10:return Ph(m.type._context),null;case 22:case 23:return Uo(),null;case 24:return null;default:return null}}var dc=!1,aa=!1,Dy=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function bo(h,m){var E=h.ref;if(E!==null)if(typeof E=="function")try{E(null)}catch(O){sr(h,m,O)}else E.current=null}function So(h,m,E){try{E()}catch(O){sr(h,m,O)}}var fc=!1;function fu(h,m){for(le(h.containerInfo),Vt=m;Vt!==null;)if(h=Vt,m=h.child,(h.subtreeFlags&1028)!==0&&m!==null)m.return=h,Vt=m;else for(;Vt!==null;){h=Vt;try{var E=h.alternate;if(h.flags&1024)switch(h.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var O=E.memoizedProps,j=E.memoizedState,B=h.stateNode,ne=B.getSnapshotBeforeUpdate(h.elementType===h.type?O:Js(h.type,O),j);B.__reactInternalSnapshotBeforeUpdate=ne}break;case 3:qe&&ri(h.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ye){sr(h,h.return,ye)}if(m=h.sibling,m!==null){m.return=h.return,Vt=m;break}Vt=h.return}return E=fc,fc=!1,E}function oa(h,m,E){var O=m.updateQueue;if(O=O!==null?O.lastEffect:null,O!==null){var j=O=O.next;do{if((j.tag&h)===h){var B=j.destroy;j.destroy=void 0,B!==void 0&&So(m,E,B)}j=j.next}while(j!==O)}}function Bo(h,m){if(m=m.updateQueue,m=m!==null?m.lastEffect:null,m!==null){var E=m=m.next;do{if((E.tag&h)===h){var O=E.create;E.destroy=O()}E=E.next}while(E!==m)}}function Wi(h){var m=h.ref;if(m!==null){var E=h.stateNode;switch(h.tag){case 5:h=oe(E);break;default:h=E}typeof m=="function"?m(h):m.current=h}}function ag(h){var m=h.alternate;m!==null&&(h.alternate=null,ag(m)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(m=h.stateNode,m!==null&&Wt(m)),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function Sf(h){return h.tag===5||h.tag===3||h.tag===4}function hu(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||Sf(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function Hh(h,m,E){var O=h.tag;if(O===5||O===6)h=h.stateNode,m?Ft(E,h,m):an(E,h);else if(O!==4&&(h=h.child,h!==null))for(Hh(h,m,E),h=h.sibling;h!==null;)Hh(h,m,E),h=h.sibling}function ym(h,m,E){var O=h.tag;if(O===5||O===6)h=h.stateNode,m?mt(E,h,m):$e(E,h);else if(O!==4&&(h=h.child,h!==null))for(ym(h,m,E),h=h.sibling;h!==null;)ym(h,m,E),h=h.sibling}var qi=null,rl=!1;function il(h,m,E){for(E=E.child;E!==null;)xa(h,m,E),E=E.sibling}function xa(h,m,E){if(nr&&typeof nr.onCommitFiberUnmount=="function")try{nr.onCommitFiberUnmount(Tr,E)}catch{}switch(E.tag){case 5:aa||bo(E,m);case 6:if(qe){var O=qi,j=rl;qi=null,il(h,m,E),qi=O,rl=j,qi!==null&&(rl?Hn(qi,E.stateNode):In(qi,E.stateNode))}else il(h,m,E);break;case 18:qe&&qi!==null&&(rl?fi(qi,E.stateNode):Mr(qi,E.stateNode));break;case 4:qe?(O=qi,j=rl,qi=E.stateNode.containerInfo,rl=!0,il(h,m,E),qi=O,rl=j):(Ce&&(O=E.stateNode.containerInfo,j=lo(O),uo(O,j)),il(h,m,E));break;case 0:case 11:case 14:case 15:if(!aa&&(O=E.updateQueue,O!==null&&(O=O.lastEffect,O!==null))){j=O=O.next;do{var B=j,ne=B.destroy;B=B.tag,ne!==void 0&&(B&2||B&4)&&So(E,m,ne),j=j.next}while(j!==O)}il(h,m,E);break;case 1:if(!aa&&(bo(E,m),O=E.stateNode,typeof O.componentWillUnmount=="function"))try{O.props=E.memoizedProps,O.state=E.memoizedState,O.componentWillUnmount()}catch(ye){sr(E,m,ye)}il(h,m,E);break;case 21:il(h,m,E);break;case 22:E.mode&1?(aa=(O=aa)||E.memoizedState!==null,il(h,m,E),aa=O):il(h,m,E);break;default:il(h,m,E)}}function Yi(h){var m=h.updateQueue;if(m!==null){h.updateQueue=null;var E=h.stateNode;E===null&&(E=h.stateNode=new Dy),m.forEach(function(O){var j=My.bind(null,h,O);E.has(O)||(E.add(O),O.then(j,j))})}}function xo(h,m){var E=m.deletions;if(E!==null)for(var O=0;O";case ts:return":has("+(sa(h)||"")+")";case Fo:return'[role="'+h.value+'"]';case bm:return'"'+h.value+'"';case xf:return'[data-testname="'+h.value+'"]';default:throw Error(o(365))}}function wf(h,m){var E=[];h=[h,0];for(var O=0;Oj&&(j=ne),O&=~B}if(O=j,O=hi()-O,O=(120>O?120:480>O?480:1080>O?1080:1920>O?1920:3e3>O?3e3:4320>O?4320:1960*GS(O/1960))-O,10h?16:h,tn===null)var O=!1;else{if(h=tn,tn=null,As=0,Qn&6)throw Error(o(331));var j=Qn;for(Qn|=4,Vt=h.current;Vt!==null;){var B=Vt,ne=B.child;if(Vt.flags&16){var ye=B.deletions;if(ye!==null){for(var Ne=0;Nehi()-cg?gc(h,0):ug|=E),Di(h,m)}function Rl(h,m){m===0&&(h.mode&1?(m=ho,ho<<=1,!(ho&130023424)&&(ho=4194304)):m=1);var E=Ga();h=Cs(h,m),h!==null&&(po(h,m,E),Di(h,E))}function bc(h){var m=h.memoizedState,E=0;m!==null&&(E=m.retryLane),Rl(h,E)}function My(h,m){var E=0;switch(h.tag){case 13:var O=h.stateNode,j=h.memoizedState;j!==null&&(E=j.retryLane);break;case 19:O=h.stateNode;break;default:throw Error(o(314))}O!==null&&O.delete(m),Rl(h,E)}var Em;Em=function(h,m,E){if(h!==null)if(h.memoizedProps!==m.pendingProps||za.current)Ua=!0;else{if(!(h.lanes&E)&&!(m.flags&128))return Ua=!1,vf(h,m,E);Ua=!!(h.flags&131072)}else Ua=!1,ii&&m.flags&1048576&&Kv(m,Hi,m.index);switch(m.lanes=0,m.tag){case 2:var O=m.type;ks(h,m),h=m.pendingProps;var j=Zu(m,ma.current);lf(m,E),j=mn(null,m,O,h,j,E);var B=Vn();return m.flags|=1,typeof j=="object"&&j!==null&&typeof j.render=="function"&&j.$$typeof===void 0?(m.tag=1,m.memoizedState=null,m.updateQueue=null,va(O)?(B=!0,El(m)):B=!1,m.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,rm(m),j.updater=$s,m.stateNode=j,j._reactInternals=m,Zv(m,O,h,E),m=es(null,m,O,!0,B,E)):(m.tag=0,ii&&B&&mo(m),Sa(null,m,j,E),m=m.child),m;case 16:O=m.elementType;e:{switch(ks(h,m),h=m.pendingProps,j=O._init,O=j(O._payload),m.type=O,j=m.tag=Kh(O),h=Js(O,h),j){case 0:m=zh(null,m,O,h,E);break e;case 1:m=Py(null,m,O,h,E);break e;case 11:m=Lh(null,m,O,h,E);break e;case 14:m=lc(null,m,O,Js(O.type,h),E);break e}throw Error(o(306,O,""))}return m;case 0:return O=m.type,j=m.pendingProps,j=m.elementType===O?j:Js(O,j),zh(h,m,O,j,E);case 1:return O=m.type,j=m.pendingProps,j=m.elementType===O?j:Js(O,j),Py(h,m,O,j,E);case 3:e:{if(rg(m),h===null)throw Error(o(387));O=m.pendingProps,B=m.memoizedState,j=B.element,Qv(h,m),cf(m,O,null,E);var ne=m.memoizedState;if(O=ne.element,Lt&&B.isDehydrated)if(B={element:O,isDehydrated:!1,cache:ne.cache,pendingSuspenseBoundaries:ne.pendingSuspenseBoundaries,transitions:ne.transitions},m.updateQueue.baseState=B,m.memoizedState=B,m.flags&256){j=sc(Error(o(423)),m),m=Ay(h,m,O,E,j);break e}else if(O!==j){j=sc(Error(o(424)),m),m=Ay(h,m,O,E,j);break e}else for(Lt&&(xs=Pt(m.stateNode.containerInfo),pi=m,ii=!0,No=null,ws=!1),E=_s(m,null,O,E),m.child=E;E;)E.flags=E.flags&-3|4096,E=E.sibling;else{if(of(),O===j){m=Gi(h,m,E);break e}Sa(h,m,O,E)}m=m.child}return m;case 5:return nn(m),h===null&&Eh(m),O=m.type,j=m.pendingProps,B=h!==null?h.memoizedProps:null,ne=j.children,Me(O,j)?ne=null:B!==null&&Me(O,B)&&(m.flags|=32),ky(h,m),Sa(h,m,ne,E),m.child;case 6:return h===null&&Eh(m),null;case 13:return Oy(h,m,E);case 4:return Pe(m,m.stateNode.containerInfo),O=m.pendingProps,h===null?m.child=cu(m,null,O,E):Sa(h,m,O,E),m.child;case 11:return O=m.type,j=m.pendingProps,j=m.elementType===O?j:Js(O,j),Lh(h,m,O,j,E);case 7:return Sa(h,m,m.pendingProps,E),m.child;case 8:return Sa(h,m,m.pendingProps.children,E),m.child;case 12:return Sa(h,m,m.pendingProps.children,E),m.child;case 10:e:{if(O=m.type._context,j=m.pendingProps,B=m.memoizedProps,ne=j.value,Cy(m,O,ne),B!==null)if(ae(B.value,ne)){if(B.children===j.children&&!za.current){m=Gi(h,m,E);break e}}else for(B=m.child,B!==null&&(B.return=m);B!==null;){var ye=B.dependencies;if(ye!==null){ne=B.child;for(var Ne=ye.firstContext;Ne!==null;){if(Ne.context===O){if(B.tag===1){Ne=Pl(-1,E&-E),Ne.tag=2;var xt=B.updateQueue;if(xt!==null){xt=xt.shared;var Kt=xt.pending;Kt===null?Ne.next=Ne:(Ne.next=Kt.next,Kt.next=Ne),xt.pending=Ne}}B.lanes|=E,Ne=B.alternate,Ne!==null&&(Ne.lanes|=E),Ah(B.return,E,m),ye.lanes|=E;break}Ne=Ne.next}}else if(B.tag===10)ne=B.type===m.type?null:B.child;else if(B.tag===18){if(ne=B.return,ne===null)throw Error(o(341));ne.lanes|=E,ye=ne.alternate,ye!==null&&(ye.lanes|=E),Ah(ne,E,m),ne=B.sibling}else ne=B.child;if(ne!==null)ne.return=B;else for(ne=B;ne!==null;){if(ne===m){ne=null;break}if(B=ne.sibling,B!==null){B.return=ne.return,ne=B;break}ne=ne.return}B=ne}Sa(h,m,j.children,E),m=m.child}return m;case 9:return j=m.type,O=m.pendingProps.children,lf(m,E),j=Fa(j),O=O(j),m.flags|=1,Sa(h,m,O,E),m.child;case 14:return O=m.type,j=Js(O,m.pendingProps),j=Js(O.type,j),lc(h,m,O,j,E);case 15:return _y(h,m,m.type,m.pendingProps,E);case 17:return O=m.type,j=m.pendingProps,j=m.elementType===O?j:Js(O,j),ks(h,m),m.tag=1,va(O)?(h=!0,El(m)):h=!1,lf(m,E),Ey(m,O,j),Zv(m,O,j,E),es(null,m,O,!0,h,E);case 19:return cc(h,m,E);case 22:return Ty(h,m,E)}throw Error(o(156,m.tag))};function Co(h,m){return tf(h,m)}function Nl(h,m,E,O){this.tag=h,this.key=E,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=O,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ds(h,m,E,O){return new Nl(h,m,E,O)}function _m(h){return h=h.prototype,!(!h||!h.isReactComponent)}function Kh(h){if(typeof h=="function")return _m(h)?1:0;if(h!=null){if(h=h.$$typeof,h===k)return 11;if(h===M)return 14}return 2}function Eo(h,m){var E=h.alternate;return E===null?(E=Ds(h.tag,m,h.key,h.mode),E.elementType=h.elementType,E.type=h.type,E.stateNode=h.stateNode,E.alternate=h,h.alternate=E):(E.pendingProps=m,E.type=h.type,E.flags=0,E.subtreeFlags=0,E.deletions=null),E.flags=h.flags&14680064,E.childLanes=h.childLanes,E.lanes=h.lanes,E.child=h.child,E.memoizedProps=h.memoizedProps,E.memoizedState=h.memoizedState,E.updateQueue=h.updateQueue,m=h.dependencies,E.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},E.sibling=h.sibling,E.index=h.index,E.ref=h.ref,E}function Tf(h,m,E,O,j,B){var ne=2;if(O=h,typeof h=="function")_m(h)&&(ne=1);else if(typeof h=="string")ne=5;else e:switch(h){case p:return Su(E.children,j,B,m);case g:ne=8,j|=8;break;case S:return h=Ds(12,E,m,j|2),h.elementType=S,h.lanes=B,h;case P:return h=Ds(13,E,m,j),h.elementType=P,h.lanes=B,h;case D:return h=Ds(19,E,m,j),h.elementType=D,h.lanes=B,h;case L:return kf(E,j,B,m);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case w:ne=10;break e;case C:ne=9;break e;case k:ne=11;break e;case M:ne=14;break e;case R:ne=16,O=null;break e}throw Error(o(130,h==null?h:typeof h,""))}return m=Ds(ne,E,m,j),m.elementType=h,m.type=O,m.lanes=B,m}function Su(h,m,E,O){return h=Ds(7,h,O,m),h.lanes=E,h}function kf(h,m,E,O){return h=Ds(22,h,O,m),h.elementType=L,h.lanes=E,h.stateNode={isHidden:!1},h}function Pf(h,m,E){return h=Ds(6,h,null,m),h.lanes=E,h}function Ll(h,m,E){return m=Ds(4,h.children!==null?h.children:[],h.key,m),m.lanes=E,m.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},m}function Xh(h,m,E,O,j){this.tag=m,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=vt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ef(0),this.expirationTimes=ef(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ef(0),this.identifierPrefix=O,this.onRecoverableError=j,Lt&&(this.mutableSourceEagerHydrationData=null)}function jy(h,m,E,O,j,B,ne,ye,Ne){return h=new Xh(h,m,E,ye,Ne),m===1?(m=1,B===!0&&(m|=8)):m=0,B=Ds(3,null,null,m),h.current=B,B.stateNode=h,B.memoizedState={element:O,isDehydrated:E,cache:null,transitions:null,pendingSuspenseBoundaries:null},rm(B),h}function hg(h){if(!h)return Ks;h=h._reactInternals;e:{if(J(h)!==h||h.tag!==1)throw Error(o(170));var m=h;do{switch(m.tag){case 3:m=m.stateNode.context;break e;case 1:if(va(m.type)){m=m.stateNode.__reactInternalMemoizedMergedChildContext;break e}}m=m.return}while(m!==null);throw Error(o(171))}if(h.tag===1){var E=h.type;if(va(E))return su(h,E,m)}return m}function pg(h){var m=h._reactInternals;if(m===void 0)throw typeof h.render=="function"?Error(o(188)):(h=Object.keys(h).join(","),Error(o(268,h)));return h=fe(m),h===null?null:h.stateNode}function Af(h,m){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var E=h.retryLane;h.retryLane=E!==0&&E=xt&&B>=un&&j<=Kt&&ne<=Mt){h.splice(m,1);break}else if(O!==xt||E.width!==Ne.width||Mtne){if(!(B!==un||E.height!==Ne.height||Ktj)){xt>O&&(Ne.width+=xt-O,Ne.x=O),KtB&&(Ne.height+=un-B,Ne.y=B),MtE&&(E=ne)),ne ")+` No matching component was found for: `)+h.join(" > ")}return null},n.getPublicRootInstance=function(h){if(h=h.current,!h.child)return null;switch(h.child.tag){case 5:return oe(h.child.stateNode);default:return h.child.stateNode}},n.injectIntoDevTools=function(h){if(h={bundleType:h.bundleType,version:h.version,rendererPackageName:h.rendererPackageName,rendererConfig:h.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:Tm,findFiberByHostInstance:h.findFiberByHostInstance||km,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")h=!1;else{var m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(m.isDisabled||!m.supportsFiber)h=!0;else{try{Tr=m.inject(h),nr=m}catch{}h=!!m.checkDCE}}return h},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(h,m,E,O){if(!xe)throw Error(o(363));h=lg(h,m);var j=rn(h,E,O).disconnect;return{disconnect:function(){j()}}},n.registerMutableSourceForHydration=function(h,m){var E=m._getVersion;E=E(m._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[m,E]:h.mutableSourceEagerHydrationData.push(m,E)},n.runWithPriority=function(h,m){var E=tr;try{return tr=h,m()}finally{tr=E}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(h,m,E,O){var j=m.current,B=Ga(),ne=Nr(j);return E=hg(E),m.context===null?m.context=E:m.pendingContext=E,m=Pl(B,ne),m.payload={element:h},O=O===void 0?null:O,O!==null&&(m.callback=O),h=ec(j,m,ne),h!==null&&(rs(h,j,ne,B),im(h,j,ne)),ne},n}),ZA}var _E={},QCe={get exports(){return _E},set exports(e){_E=e}};/** * @license React * react-reconciler.development.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 VH;function ZCe(){return VH||(VH=1,process.env.NODE_ENV!=="production"&&(QCe.exports=function(t){var n={},r=A,i=Iv,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,o=!1;function s(l){o=l}function c(l){if(!o){for(var u=arguments.length,b=new Array(u>1?u-1:0),x=1;x1?u-1:0),x=1;x=1&&me>=0&&W[ue]!==Q[me];)me--;for(;ue>=1&&me>=0;ue--,me--)if(W[ue]!==Q[me]){if(ue!==1||me!==1)do if(ue--,me--,me<0||W[ue]!==Q[me]){var Oe=` `+W[ue].replace(" at new "," at ");return l.displayName&&Oe.includes("")&&(Oe=Oe.replace("",l.displayName)),typeof l=="function"&&Xc.set(l,Oe),Oe}while(ue>=1&&me>=0);break}}}finally{df=!1,lu.current=I,im(),Error.prepareStackTrace=_}var He=l?l.displayName||l.name:"",Ze=He?uu(He):"";return typeof l=="function"&&Xc.set(l,Ze),Ze}function Ey(l,u,b){return Qc(l,!0)}function am(l,u,b){return Qc(l,!1)}function Zv(l){var u=l.prototype;return!!(u&&u.isReactComponent)}function Es(l,u,b){if(l==null)return"";if(typeof l=="function")return Qc(l,Zv(l));if(typeof l=="string")return uu(l);switch(l){case ar:return uu("Suspense");case xe:return uu("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case Rn:return am(l.render);case it:return Es(l.type,u,b);case at:{var x=l,_=x._payload,I=x._init;try{return Es(I(_),u,b)}catch{}}}return""}var vo=Object.prototype.hasOwnProperty,om={},Jv=a.ReactDebugCurrentFrame;function cu(l){if(l){var u=l._owner,b=Es(l.type,l._source,u?u.type:null);Jv.setExtraStackFrame(b)}else Jv.setExtraStackFrame(null)}function _s(l,u,b,x,_){{var I=Function.call.bind(vo);for(var F in l)if(I(l,F)){var W=void 0;try{if(typeof l[F]!="function"){var Q=Error((x||"React class")+": "+b+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Q.name="Invariant Violation",Q}W=l[F](u,F,x,b,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ue){W=ue}W&&!(W instanceof Error)&&(cu(_),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",x||"React class",b,F,typeof W),cu(null)),W instanceof Error&&!(W.message in om)&&(om[W.message]=!0,cu(_),d("Failed %s type: %s",b,W.message),cu(null))}}}var Zc=[],go;go=[];var Oa=-1;function ge(l){return{current:l}}function ze(l,u){if(Oa<0){d("Unexpected pop.");return}u!==go[Oa]&&d("Unexpected Fiber popped."),l.current=Zc[Oa],Zc[Oa]=null,go[Oa]=null,Oa--}function Pe(l,u,b){Oa++,Zc[Oa]=l.current,go[Oa]=b,l.current=u}var Rt;Rt={};var nn={};Object.freeze(nn);var Un=ge(nn),gn=ge(!1),yr=nn;function Al(l,u,b){return b&&to(u)?yr:Un.current}function sm(l,u,b){{var x=l.stateNode;x.__reactInternalMemoizedUnmaskedChildContext=u,x.__reactInternalMemoizedMaskedChildContext=b}}function ia(l,u){{var b=l.type,x=b.contextTypes;if(!x)return nn;var _=l.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===u)return _.__reactInternalMemoizedMaskedChildContext;var I={};for(var F in x)I[F]=u[F];{var W=jt(l)||"Unknown";_s(x,I,"context",W)}return _&&sm(l,u,I),I}}function du(){return gn.current}function to(l){{var u=l.childContextTypes;return u!=null}}function wr(l){ze(gn,l),ze(Un,l)}function mi(l){ze(gn,l),ze(Un,l)}function Ai(l,u,b){{if(Un.current!==nn)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Pe(Un,u,l),Pe(gn,b,l)}}function hr(l,u,b){{var x=l.stateNode,_=u.childContextTypes;if(typeof x.getChildContext!="function"){{var I=jt(l)||"Unknown";Rt[I]||(Rt[I]=!0,d("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",I,I))}return b}var F=x.getChildContext();for(var W in F)if(!(W in _))throw new Error((jt(l)||"Unknown")+'.getChildContext(): key "'+W+'" is not defined in childContextTypes.');{var Q=jt(l)||"Unknown";_s(_,F,"child context",Q)}return g({},b,F)}}function tc(l){{var u=l.stateNode,b=u&&u.__reactInternalMemoizedMergedChildContext||nn;return yr=Un.current,Pe(Un,b,l),Pe(gn,gn.current,l),!0}}function Jc(l,u,b){{var x=l.stateNode;if(!x)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(b){var _=hr(l,u,yr);x.__reactInternalMemoizedMergedChildContext=_,ze(gn,l),ze(Un,l),Pe(Un,_,l),Pe(gn,b,l)}else ze(gn,l),Pe(gn,b,l)}}function lm(l){{if(!pa(l)||l.tag!==H)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var u=l;do{switch(u.tag){case J:return u.stateNode.context;case H:{var b=u.type;if(to(b))return u.stateNode.__reactInternalMemoizedMergedChildContext;break}}u=u.return}while(u!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var Vi=0,um=1,mn=0,Vn=1,_n=2,cr=8,yo=16,$c=Math.clz32?Math.clz32:Oh,cm=Math.log,$v=Math.LN2;function Oh(l){var u=l>>>0;return u===0?32:31-(cm(u)/$v|0)|0}var Dh=31,tt=0,oi=0,dn=1,ed=2,Ol=4,el=8,Lo=16,tl=32,nl=4194240,ff=64,hf=128,dm=256,fm=512,Oi=1024,ya=2048,Mh=4096,hm=8192,jh=16384,pm=32768,Ih=65536,nc=131072,Rh=262144,rc=524288,ic=1048576,ac=2097152,oc=130023424,zo=4194304,eg=8388608,tg=16777216,ng=33554432,sc=67108864,mm=zo,Dl=134217728,pf=268435455,td=268435456,Y=536870912,ba=1073741824;function Nh(l){{if(l&dn)return"Sync";if(l&ed)return"InputContinuousHydration";if(l&Ol)return"InputContinuous";if(l&el)return"DefaultHydration";if(l&Lo)return"Default";if(l&tl)return"TransitionHydration";if(l&nl)return"Transition";if(l&oc)return"Retry";if(l&Dl)return"SelectiveHydration";if(l&td)return"IdleHydration";if(l&Y)return"Idle";if(l&ba)return"Offscreen"}}var Xn=-1,Wn=ff,Ua=zo;function Sa(l){switch(uc(l)){case dn:return dn;case ed:return ed;case Ol:return Ol;case el:return el;case Lo:return Lo;case tl:return tl;case ff:case hf:case dm:case fm:case Oi:case ya:case Mh:case hm:case jh:case pm:case Ih:case nc:case Rh:case rc:case ic:case ac:return l&nl;case zo:case eg:case tg:case ng:case sc:return l&oc;case Dl:return Dl;case td:return td;case Y:return Y;case ba:return ba;default:return d("Should have found matching lanes. This is a bug in React."),l}}function Lh(l,u){var b=l.pendingLanes;if(b===tt)return tt;var x=tt,_=l.suspendedLanes,I=l.pingedLanes,F=b&pf;if(F!==tt){var W=F&~_;if(W!==tt)x=Sa(W);else{var Q=F&I;Q!==tt&&(x=Sa(Q))}}else{var ue=b&~_;ue!==tt?x=Sa(ue):I!==tt&&(x=Sa(I))}if(x===tt)return tt;if(u!==tt&&u!==x&&(u&_)===tt){var me=uc(x),Oe=uc(u);if(me>=Oe||me===Lo&&(Oe&nl)!==tt)return u}(x&Ol)!==tt&&(x|=b&Lo);var He=l.entangledLanes;if(He!==tt)for(var Ze=l.entanglements,ut=x&He;ut>0;){var lt=cc(ut),sn=1<0;){var _=cc(u),I=1<<_,F=b[_];F>x&&(x=F),u&=~I}return x}function _y(l,u){switch(l){case dn:case ed:case Ol:return u+250;case el:case Lo:case tl:case ff:case hf:case dm:case fm:case Oi:case ya:case Mh:case hm:case jh:case pm:case Ih:case nc:case Rh:case rc:case ic:case ac:return u+5e3;case zo:case eg:case tg:case ng:case sc:return Xn;case Dl:case td:case Y:case ba:return Xn;default:return d("Should have found matching lanes. This is a bug in React."),Xn}}function Ty(l,u){for(var b=l.pendingLanes,x=l.suspendedLanes,_=l.pingedLanes,I=l.expirationTimes,F=b;F>0;){var W=cc(F),Q=1<0;){var _=cc(x),I=1<<_;b[_]=Xn,x&=~I}}function Ha(l,u,b){l.pingedLanes|=l.suspendedLanes&u}function VS(l,u){var b=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=tt,l.pingedLanes=tt,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u;for(var x=l.entanglements,_=l.eventTimes,I=l.expirationTimes,F=b;F>0;){var W=cc(F),Q=1<0;){var _=ks(b),I=1<<_,F=x[_];F.add(u),b&=~I}}function Dy(l,u){if(Fo)for(var b=l.pendingUpdatersLaneMap,x=l.memoizedUpdaters;u>0;){var _=ks(u),I=1<<_,F=b[_];F.size>0&&(F.forEach(function(W){var Q=W.alternate;(Q===null||!x.has(Q))&&x.add(W)}),F.clear()),u&=~I}}function Vt(l,u){return null}var bo=dn,So=Ol,fc=Lo,fu=Y,oa=oi;function Bo(){return oa}function Wi(l){oa=l}function ag(l,u){var b=oa;try{return oa=l,u()}finally{oa=b}}function Sf(l,u){return l!==0&&lu?l:u}function Hh(l,u){return l!==0&&l"u")return!1;var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled)return!0;if(!u.supportsFiber)return d("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{R&&(l=g({},l,{getLaneLabelMap:lg,injectProfilingHooks:wf})),Ki=u.inject(l),wa=u}catch(b){d("React instrumentation encountered an error: %s.",b)}return!!u.checkDCE}function bm(l,u){if(wa&&typeof wa.onScheduleFiberRoot=="function")try{wa.onScheduleFiberRoot(Ki,l,u)}catch(b){ts||(ts=!0,d("React instrumentation encountered an error: %s",b))}}function pu(l,u){if(wa&&typeof wa.onCommitFiberRoot=="function")try{var b=(l.current.flags&Yn)===Yn;if(L){var x;switch(u){case bo:x=xo;break;case So:x=Ps;break;case fc:x=Va;break;case fu:x=Vh;break;default:x=Va;break}wa.onCommitFiberRoot(Ki,l,x,b)}}catch(_){ts||(ts=!0,d("React instrumentation encountered an error: %s",_))}}function Sm(l){if(wa&&typeof wa.onPostCommitFiberRoot=="function")try{wa.onPostCommitFiberRoot(Ki,l)}catch(u){ts||(ts=!0,d("React instrumentation encountered an error: %s",u))}}function sg(l){if(wa&&typeof wa.onCommitFiberUnmount=="function")try{wa.onCommitFiberUnmount(Ki,l)}catch(u){ts||(ts=!0,d("React instrumentation encountered an error: %s",u))}}function sa(l){if(typeof hc=="function"&&(og(l),s(l)),wa&&typeof wa.setStrictMode=="function")try{wa.setStrictMode(Ki,l)}catch(u){ts||(ts=!0,d("React instrumentation encountered an error: %s",u))}}function wf(l){Dt=l}function lg(){{for(var l=new Map,u=1,b=0;b30){var ue=I-I%5,me=(1<>ue,Ze=I-ue,ut=Cm(u)+Ze,lt=W<0&&(Cn.forEach(function(He){l.add(jt(He)||"Component"),ji.add(He.type)}),Cn=[]);var u=new Set;Sn.length>0&&(Sn.forEach(function(He){u.add(jt(He)||"Component"),ji.add(He.type)}),Sn=[]);var b=new Set;zn.length>0&&(zn.forEach(function(He){b.add(jt(He)||"Component"),ji.add(He.type)}),zn=[]);var x=new Set;Mi.length>0&&(Mi.forEach(function(He){x.add(jt(He)||"Component"),ji.add(He.type)}),Mi=[]);var _=new Set;Zn.length>0&&(Zn.forEach(function(He){_.add(jt(He)||"Component"),ji.add(He.type)}),Zn=[]);var I=new Set;if(as.length>0&&(as.forEach(function(He){I.add(jt(He)||"Component"),ji.add(He.type)}),as=[]),u.size>0){var F=rt(u);d(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. Please update the following components: %s`,F)}if(x.size>0){var W=rt(x);d(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state Please update the following components: %s`,W)}if(I.size>0){var Q=rt(I);d(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. Please update the following components: %s`,Q)}if(l.size>0){var ue=rt(l);c(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: %s`,ue)}if(b.size>0){var me=rt(b);c(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: %s`,me)}if(_.size>0){var Oe=rt(_);c(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: %s`,Oe)}};var Iy=new Map,YE=new Set;Ue.recordLegacyContextWarning=function(l,u){var b=It(l);if(b===null){d("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!YE.has(l.type)){var x=Iy.get(b);(l.type.contextTypes!=null||l.type.childContextTypes!=null||u!==null&&typeof u.getChildContext=="function")&&(x===void 0&&(x=[],Iy.set(b,x)),x.push(l))}},Ue.flushLegacyContextWarning=function(){Iy.forEach(function(l,u){if(l.length!==0){var b=l[0],x=new Set;l.forEach(function(I){x.add(jt(I)||"Component"),YE.add(I.type)});var _=rt(x);try{Cr(b),d(`Legacy context API has been detected within a strict-mode tree. The old API will be supported in all 16.x releases, but applications using it should migrate to the new version. Please update the following components: %s Learn more about this warning here: https://reactjs.org/link/legacy-context`,_)}finally{or()}}})},Ue.discardPendingWarnings=function(){Cn=[],Sn=[],zn=[],Mi=[],Zn=[],as=[],Iy=new Map}}function WS(l){{var u=typeof Symbol=="function"&&Symbol.toStringTag,b=u&&l[Symbol.toStringTag]||l.constructor.name||"Object";return b}}function KE(l){try{return Ry(l),!1}catch{return!0}}function Ry(l){return""+l}function HO(l){if(KE(l))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",WS(l)),Ry(l)}function VO(l,u){if(KE(l))return d("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",u,WS(l)),Ry(l)}function xu(l,u){if(l&&l.defaultProps){var b=g({},u),x=l.defaultProps;for(var _ in x)b[_]===void 0&&(b[_]=x[_]);return b}return u}var zl=ge(null),Wa;Wa={};var Pm=null,Am=null,mg=null,Ny=!1;function Ly(){Pm=null,Am=null,mg=null,Ny=!1}function Om(){Ny=!0}function qS(){Ny=!1}function YS(l,u,b){Gc?(Pe(zl,u._currentValue,l),u._currentValue=b,u._currentRenderer!==void 0&&u._currentRenderer!==null&&u._currentRenderer!==Wa&&d("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer=Wa):(Pe(zl,u._currentValue2,l),u._currentValue2=b,u._currentRenderer2!==void 0&&u._currentRenderer2!==null&&u._currentRenderer2!==Wa&&d("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer2=Wa)}function KS(l,u){var b=zl.current;ze(zl,u),Gc?l._currentValue=b:l._currentValue2=b}function XS(l,u,b){for(var x=l;x!==null;){var _=x.alternate;if(vf(x.childLanes,u)?_!==null&&!vf(_.childLanes,u)&&(_.childLanes=Qt(_.childLanes,u)):(x.childLanes=Qt(x.childLanes,u),_!==null&&(_.childLanes=Qt(_.childLanes,u))),x===b)break;x=x.return}x!==b&&d("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function GO(l,u,b){WO(l,u,b)}function WO(l,u,b){var x=l.child;for(x!==null&&(x.return=l);x!==null;){var _=void 0,I=x.dependencies;if(I!==null){_=x.child;for(var F=I.firstContext;F!==null;){if(F.context===u){if(x.tag===H){var W=nd(b),Q=dd(Xn,W);Q.tag=By;var ue=x.updateQueue;if(ue!==null){var me=ue.shared,Oe=me.pending;Oe===null?Q.next=Q:(Q.next=Oe.next,Oe.next=Q),me.pending=Q}}x.lanes=Qt(x.lanes,b);var He=x.alternate;He!==null&&(He.lanes=Qt(He.lanes,b)),XS(x.return,b,l),I.lanes=Qt(I.lanes,b);break}F=F.next}}else if(x.tag===oe)_=x.type===l.type?null:x.child;else if(x.tag===_e){var Ze=x.return;if(Ze===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");Ze.lanes=Qt(Ze.lanes,b);var ut=Ze.alternate;ut!==null&&(ut.lanes=Qt(ut.lanes,b)),XS(Ze,b,l),_=x.sibling}else _=x.child;if(_!==null)_.return=x;else for(_=x;_!==null;){if(_===l){_=null;break}var lt=_.sibling;if(lt!==null){lt.return=_.return,_=lt;break}_=_.return}x=_}}function Qh(l,u){Pm=l,Am=null,mg=null;var b=l.dependencies;if(b!==null){var x=b.firstContext;x!==null&&(Gi(b.lanes,u)&&zg(),b.firstContext=null)}}function Ea(l){Ny&&d("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var u=Gc?l._currentValue:l._currentValue2;if(mg!==l){var b={context:l,memoizedValue:u,next:null};if(Am===null){if(Pm===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Am=b,Pm.dependencies={lanes:tt,firstContext:b}}else Am=Am.next=b}return u}var Zh=null;function vg(l){Zh===null?Zh=[l]:Zh.push(l)}function XE(){if(Zh!==null){for(var l=0;l from render. Or maybe you meant to call this function rather than return it.")}}function s_(l){var u=l._payload,b=l._init;return b(u)}function l_(l){function u(Ie,Ke){if(l){var je=Ie.deletions;je===null?(Ie.deletions=[Ke],Ie.flags|=ri):je.push(Ke)}}function b(Ie,Ke){if(!l)return null;for(var je=Ke;je!==null;)u(Ie,je),je=je.sibling;return null}function x(Ie,Ke){for(var je=new Map,Ct=Ke;Ct!==null;)Ct.key!==null?je.set(Ct.key,Ct):je.set(Ct.index,Ct),Ct=Ct.sibling;return je}function _(Ie,Ke){var je=Kg(Ie,Ke);return je.index=0,je.sibling=null,je}function I(Ie,Ke,je){if(Ie.index=je,!l)return Ie.flags|=dt,Ke;var Ct=Ie.alternate;if(Ct!==null){var en=Ct.index;return enyn?(ja=ur,ur=null):ja=ur.sibling;var Ls=He(Ie,ur,je[yn],Ct);if(Ls===null){ur===null&&(ur=ja);break}l&&ur&&Ls.alternate===null&&u(Ie,ur),Ti=I(Ls,Ti,yn),Pr===null?Mn=Ls:Pr.sibling=Ls,Pr=Ls,ur=ja}if(yn===je.length){if(b(Ie,ur),E()){var fs=yn;ol(Ie,fs)}return Mn}if(ur===null){for(;ynfs?(Pu=ja,ja=null):Pu=ja.sibling;var hl=He(Ie,ja,fl.value,Ct);if(hl===null){ja===null&&(ja=Pu);break}l&&ja&&hl.alternate===null&&u(Ie,ja),Ls=I(hl,Ls,fs),yn===null?Ti=hl:yn.sibling=hl,yn=hl,ja=Pu}if(fl.done){if(b(Ie,ja),E()){var zs=fs;ol(Ie,zs)}return Ti}if(ja===null){for(;!fl.done;fs++,fl=ur.next()){var ap=Oe(Ie,fl.value,Ct);ap!==null&&(Ls=I(ap,Ls,fs),yn===null?Ti=ap:yn.sibling=ap,yn=ap)}if(E()){var jb=fs;ol(Ie,jb)}return Ti}for(var y2=x(Ie,ja);!fl.done;fs++,fl=ur.next()){var Bf=Ze(y2,Ie,fs,fl.value,Ct);Bf!==null&&(l&&Bf.alternate!==null&&y2.delete(Bf.key===null?fs:Bf.key),Ls=I(Bf,Ls,fs),yn===null?Ti=Bf:yn.sibling=Bf,yn=Bf)}if(l&&y2.forEach(function(Vje){return u(Ie,Vje)}),E()){var Hje=fs;ol(Ie,Hje)}return Ti}function kn(Ie,Ke,je,Ct){if(Ke!==null&&Ke.tag===fe){b(Ie,Ke.sibling);var en=_(Ke,je);return en.return=Ie,en}b(Ie,Ke);var qt=SM(je,Ie.mode,Ct);return qt.return=Ie,qt}function vn(Ie,Ke,je,Ct){for(var en=je.key,qt=Ke;qt!==null;){if(qt.key===en){var pr=je.type;if(pr===Lt){if(qt.tag===X){b(Ie,qt.sibling);var Mn=_(qt,je.props.children);return Mn.return=Ie,Mn._debugSource=je._source,Mn._debugOwner=je._owner,Mn}}else if(qt.elementType===pr||LW(qt,je)||typeof pr=="object"&&pr!==null&&pr.$$typeof===at&&s_(pr)===qt.type){b(Ie,qt.sibling);var Pr=_(qt,je.props);return Pr.ref=bg(Ie,qt,je),Pr.return=Ie,Pr._debugSource=je._source,Pr._debugOwner=je._owner,Pr}b(Ie,qt);break}else u(Ie,qt);qt=qt.sibling}if(je.type===Lt){var ur=Um(je.props.children,Ie.mode,Ct,je.key);return ur.return=Ie,ur}else{var Ti=bM(je,Ie.mode,Ct);return Ti.ref=bg(Ie,Ke,je),Ti.return=Ie,Ti}}function ei(Ie,Ke,je,Ct){for(var en=je.key,qt=Ke;qt!==null;){if(qt.key===en)if(qt.tag===$&&qt.stateNode.containerInfo===je.containerInfo&&qt.stateNode.implementation===je.implementation){b(Ie,qt.sibling);var pr=_(qt,je.children||[]);return pr.return=Ie,pr}else{b(Ie,qt);break}else u(Ie,qt);qt=qt.sibling}var Mn=xM(je,Ie.mode,Ct);return Mn.return=Ie,Mn}function br(Ie,Ke,je,Ct){var en=typeof je=="object"&&je!==null&&je.type===Lt&&je.key===null;if(en&&(je=je.props.children),typeof je=="object"&&je!==null){switch(je.$$typeof){case qe:return F(vn(Ie,Ke,je,Ct));case Ce:return F(ei(Ie,Ke,je,Ct));case at:var qt=je._payload,pr=je._init;return br(Ie,Ke,pr(qt),Ct)}if(Gn(je))return lt(Ie,Ke,je,Ct);if(st(je))return sn(Ie,Ke,je,Ct);Xy(Ie,je)}return typeof je=="string"&&je!==""||typeof je=="number"?F(kn(Ie,Ke,""+je,Ct)):(typeof je=="function"&&Qy(Ie),b(Ie,Ke))}return br}var Mm=l_(!0),u_=l_(!1);function ZO(l,u){if(l!==null&&u.child!==l.child)throw new Error("Resuming work not yet implemented.");if(u.child!==null){var b=u.child,x=Kg(b,b.pendingProps);for(u.child=x,x.return=u;b.sibling!==null;)b=b.sibling,x=x.sibling=Kg(b,b.pendingProps),x.return=u;x.sibling=null}}function JO(l,u){for(var b=l.child;b!==null;)yje(b,u),b=b.sibling}var Jh={},fd=ge(Jh),Sg=ge(Jh),Zy=ge(Jh);function Jy(l){if(l===Jh)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return l}function mx(){var l=Jy(Zy.current);return l}function vx(l,u){Pe(Zy,u,l),Pe(Sg,l,l),Pe(fd,Jh,l);var b=Ks(u);ze(fd,l),Pe(fd,b,l)}function jm(l){ze(fd,l),ze(Sg,l),ze(Zy,l)}function xg(){var l=Jy(fd.current);return l}function c_(l){var u=Jy(Zy.current),b=Jy(fd.current),x=ma(b,l.type,u);b!==x&&(Pe(Sg,l,l),Pe(fd,x,l))}function $y(l){Sg.current===l&&(ze(fd,l),ze(Sg,l))}var $O=0,wg=1,d_=1,Cg=2,Cu=ge($O);function gx(l,u){return(l&u)!==0}function Im(l){return l&wg}function yx(l,u){return l&wg|u}function eD(l,u){return l|u}function Mf(l,u){Pe(Cu,u,l)}function Rm(l){ze(Cu,l)}function tD(l,u){var b=l.memoizedState;return b!==null?b.dehydrated!==null:(l.memoizedProps,!0)}function eb(l){for(var u=l;u!==null;){if(u.tag===le){var b=u.memoizedState;if(b!==null){var x=b.dehydrated;if(x===null||Zs(x)||_l(x))return u}}else if(u.tag===Me&&u.memoizedProps.revealOrder!==void 0){var _=(u.flags&Yn)!==zt;if(_)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)return null;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var js=0,qa=1,xc=2,Ya=4,_o=8,tb=[];function nb(){for(var l=0;l=iD)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");W+=1,Sx=!1,Ka=null,Xa=null,u.updateQueue=null,Eu=-1,Ut.current=Cc,F=b(x,_)}while(_g)}Ut.current=pb,u._debugHookTypes=Bl;var Q=Ka!==null&&Ka.next!==null;if($h=tt,Lr=null,Ka=null,Xa=null,Ye=null,Bl=null,Eu=-1,l!==null&&(l.flags&fi)!==(u.flags&fi)&&(l.mode&Vn)!==mn&&d("Internal React error: Expected static flag was missing. Please notify the React team."),rb=!1,Q)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return F}function Nm(){var l=Tg!==0;return Tg=0,l}function h_(l,u,b){u.updateQueue=l.updateQueue,(u.mode&yo)!==mn?u.flags&=~(Fn|An|La|hn):u.flags&=~(La|hn),l.lanes=Fh(l.lanes,b)}function p_(){if(Ut.current=pb,rb){for(var l=Lr.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}rb=!1}$h=tt,Lr=null,Ka=null,Xa=null,Bl=null,Eu=-1,Ye=null,Mx=!1,_g=!1,Tg=0}function sl(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xa===null?Lr.memoizedState=Xa=l:Xa=Xa.next=l,Xa}function os(){var l;if(Ka===null){var u=Lr.alternate;u!==null?l=u.memoizedState:l=null}else l=Ka.next;var b;if(Xa===null?b=Lr.memoizedState:b=Xa.next,b!==null)Xa=b,b=Xa.next,Ka=l;else{if(l===null)throw new Error("Rendered more hooks than during the previous render.");Ka=l;var x={memoizedState:Ka.memoizedState,baseState:Ka.baseState,baseQueue:Ka.baseQueue,queue:Ka.queue,next:null};Xa===null?Lr.memoizedState=Xa=x:Xa=Xa.next=x}return Xa}function m_(){return{lastEffect:null,stores:null}}function xx(l,u){return typeof u=="function"?u(l):u}function kg(l,u,b){var x=sl(),_;b!==void 0?_=b(u):_=u,x.memoizedState=x.baseState=_;var I={pending:null,interleaved:null,lanes:tt,dispatch:null,lastRenderedReducer:l,lastRenderedState:_};x.queue=I;var F=I.dispatch=T_.bind(null,Lr,I);return[x.memoizedState,F]}function ab(l,u,b){var x=os(),_=x.queue;if(_===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");_.lastRenderedReducer=l;var I=Ka,F=I.baseQueue,W=_.pending;if(W!==null){if(F!==null){var Q=F.next,ue=W.next;F.next=ue,W.next=Q}I.baseQueue!==F&&d("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),I.baseQueue=F=W,_.pending=null}if(F!==null){var me=F.next,Oe=I.baseState,He=null,Ze=null,ut=null,lt=me;do{var sn=lt.lane;if(vf($h,sn)){if(ut!==null){var vn={lane:oi,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null};ut=ut.next=vn}if(lt.hasEagerState)Oe=lt.eagerState;else{var ei=lt.action;Oe=l(Oe,ei)}}else{var kn={lane:sn,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null};ut===null?(Ze=ut=kn,He=Oe):ut=ut.next=kn,Lr.lanes=Qt(Lr.lanes,sn),m2(sn)}lt=lt.next}while(lt!==null&<!==me);ut===null?He=Oe:ut.next=Ze,tn(Oe,x.memoizedState)||zg(),x.memoizedState=Oe,x.baseState=He,x.baseQueue=ut,_.lastRenderedState=Oe}var br=_.interleaved;if(br!==null){var Ie=br;do{var Ke=Ie.lane;Lr.lanes=Qt(Lr.lanes,Ke),m2(Ke),Ie=Ie.next}while(Ie!==br)}else F===null&&(_.lanes=tt);var je=_.dispatch;return[x.memoizedState,je]}function wx(l,u,b){var x=os(),_=x.queue;if(_===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");_.lastRenderedReducer=l;var I=_.dispatch,F=_.pending,W=x.memoizedState;if(F!==null){_.pending=null;var Q=F.next,ue=Q;do{var me=ue.action;W=l(W,me),ue=ue.next}while(ue!==Q);tn(W,x.memoizedState)||zg(),x.memoizedState=W,x.baseQueue===null&&(x.baseState=W),_.lastRenderedState=W}return[W,I]}function rW(l,u,b){}function iW(l,u,b){}function Cx(l,u,b){var x=Lr,_=sl(),I,F=E();if(F){if(b===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");I=b(),hd||I!==b()&&(d("The result of getServerSnapshot should be cached to avoid an infinite loop"),hd=!0)}else{if(I=u(),!hd){var W=u();tn(I,W)||(d("The result of getSnapshot should be cached to avoid an infinite loop"),hd=!0)}var Q=gT();if(Q===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");mf(Q,$h)||v_(x,u,I)}_.memoizedState=I;var ue={value:I,getSnapshot:u};return _.queue=ue,ko(y_.bind(null,x,ue,l),[l]),x.flags|=La,Pg(qa|_o,g_.bind(null,x,ue,I,u),void 0,null),I}function ob(l,u,b){var x=Lr,_=os(),I=u();if(!hd){var F=u();tn(I,F)||(d("The result of getSnapshot should be cached to avoid an infinite loop"),hd=!0)}var W=_.memoizedState,Q=!tn(W,I);Q&&(_.memoizedState=I,zg());var ue=_.queue;if(_i(y_.bind(null,x,ue,l),[l]),ue.getSnapshot!==u||Q||Xa!==null&&Xa.memoizedState.tag&qa){x.flags|=La,Pg(qa|_o,g_.bind(null,x,ue,I,u),void 0,null);var me=gT();if(me===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");mf(me,$h)||v_(x,u,I)}return I}function v_(l,u,b){l.flags|=tu;var x={getSnapshot:u,value:b},_=Lr.updateQueue;if(_===null)_=m_(),Lr.updateQueue=_,_.stores=[x];else{var I=_.stores;I===null?_.stores=[x]:I.push(x)}}function g_(l,u,b,x){u.value=b,u.getSnapshot=x,b_(u)&&S_(l)}function y_(l,u,b){var x=function(){b_(u)&&S_(l)};return b(x)}function b_(l){var u=l.getSnapshot,b=l.value;try{var x=u();return!tn(b,x)}catch{return!0}}function S_(l){var u=Ho(l,dn);u!==null&&io(u,l,dn,Xn)}function sb(l){var u=sl();typeof l=="function"&&(l=l()),u.memoizedState=u.baseState=l;var b={pending:null,interleaved:null,lanes:tt,dispatch:null,lastRenderedReducer:xx,lastRenderedState:l};u.queue=b;var x=b.dispatch=hb.bind(null,Lr,b);return[u.memoizedState,x]}function Ex(l){return ab(xx)}function ll(l){return wx(xx)}function Pg(l,u,b,x){var _={tag:l,create:u,destroy:b,deps:x,next:null},I=Lr.updateQueue;if(I===null)I=m_(),Lr.updateQueue=I,I.lastEffect=_.next=_;else{var F=I.lastEffect;if(F===null)I.lastEffect=_.next=_;else{var W=F.next;F.next=_,_.next=W,I.lastEffect=_}}return _}function _x(l){var u=sl();{var b={current:l};return u.memoizedState=b,b}}function wc(l){var u=os();return u.memoizedState}function Dn(l,u,b,x){var _=sl(),I=x===void 0?null:x;Lr.flags|=l,_.memoizedState=Pg(qa|u,b,void 0,I)}function lb(l,u,b,x){var _=os(),I=x===void 0?null:x,F=void 0;if(Ka!==null){var W=Ka.memoizedState;if(F=W.destroy,I!==null){var Q=W.deps;if(ib(I,Q)){_.memoizedState=Pg(u,b,F,I);return}}}Lr.flags|=l,_.memoizedState=Pg(qa|u,b,F,I)}function ko(l,u){return(Lr.mode&yo)!==mn?Dn(Fn|La|er,_o,l,u):Dn(La|er,_o,l,u)}function _i(l,u){return lb(La,_o,l,u)}function Tx(l,u){return Dn(hn,xc,l,u)}function _u(l,u){return lb(hn,xc,l,u)}function kx(l,u){var b=hn;return b|=on,(Lr.mode&yo)!==mn&&(b|=An),Dn(b,Ya,l,u)}function ub(l,u){return lb(hn,Ya,l,u)}function x_(l,u){if(typeof u=="function"){var b=u,x=l();return b(x),function(){b(null)}}else if(u!=null){var _=u;_.hasOwnProperty("current")||d("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(_).join(", ")+"}");var I=l();return _.current=I,function(){_.current=null}}}function Px(l,u,b){typeof u!="function"&&d("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",u!==null?typeof u:"null");var x=b!=null?b.concat([l]):null,_=hn;return _|=on,(Lr.mode&yo)!==mn&&(_|=An),Dn(_,Ya,x_.bind(null,u,l),x)}function cb(l,u,b){typeof u!="function"&&d("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",u!==null?typeof u:"null");var x=b!=null?b.concat([l]):null;return lb(hn,Ya,x_.bind(null,u,l),x)}function Ax(l,u){}var db=Ax;function Tu(l,u){var b=sl(),x=u===void 0?null:u;return b.memoizedState=[l,x],l}function Ag(l,u){var b=os(),x=u===void 0?null:u,_=b.memoizedState;if(_!==null&&x!==null){var I=_[1];if(ib(x,I))return _[0]}return b.memoizedState=[l,x],l}function Lm(l,u){var b=sl(),x=u===void 0?null:u,_=l();return b.memoizedState=[_,x],_}function yi(l,u){var b=os(),x=u===void 0?null:u,_=b.memoizedState;if(_!==null&&x!==null){var I=_[1];if(ib(x,I))return _[0]}var F=l();return b.memoizedState=[F,x],F}function Ii(l){var u=sl();return u.memoizedState=l,l}function Ox(l){var u=os(),b=Ka,x=b.memoizedState;return C_(u,x,l)}function w_(l){var u=os();if(Ka===null)return u.memoizedState=l,l;var b=Ka.memoizedState;return C_(u,b,l)}function C_(l,u,b){var x=!Ay($h);if(x){if(!tn(b,u)){var _=Bh();Lr.lanes=Qt(Lr.lanes,_),m2(_),l.baseState=!0}return u}else return l.baseState&&(l.baseState=!1,zg()),l.memoizedState=b,b}function aD(l,u,b){var x=Bo();Wi(Sf(x,So)),l(!0);var _=Eg.transition;Eg.transition={};var I=Eg.transition;Eg.transition._updatedFibers=new Set;try{l(!1),u()}finally{if(Wi(x),Eg.transition=_,_===null&&I._updatedFibers){var F=I._updatedFibers.size;F>10&&c("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),I._updatedFibers.clear()}}}function Dx(){var l=sb(!1),u=l[0],b=l[1],x=aD.bind(null,b),_=sl();return _.memoizedState=x,[u,x]}function E_(){var l=Ex(),u=l[0],b=os(),x=b.memoizedState;return[u,x]}function __(){var l=ll(),u=l[0],b=os(),x=b.memoizedState;return[u,x]}var Mx=!1;function Og(){return Mx}function Dg(){var l=sl(),u=gT(),b=u.identifierPrefix,x;if(E()){var _=dg();x=":"+b+"R"+_;var I=Tg++;I>0&&(x+="H"+I.toString(32)),x+=":"}else{var F=rD++;x=":"+b+"r"+F.toString(32)+":"}return l.memoizedState=x,x}function fb(){var l=os(),u=l.memoizedState;return u}function T_(l,u,b){typeof arguments[3]=="function"&&d("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var x=Bm(l),_={lane:x,action:b,hasEagerState:!1,eagerState:null,next:null};if(Is(l))tp(u,_);else{var I=Dm(l,u,_,x);if(I!==null){var F=Ns();io(I,l,x,F),k_(I,u,x)}}P_(l,x)}function hb(l,u,b){typeof arguments[3]=="function"&&d("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var x=Bm(l),_={lane:x,action:b,hasEagerState:!1,eagerState:null,next:null};if(Is(l))tp(u,_);else{var I=l.alternate;if(l.lanes===tt&&(I===null||I.lanes===tt)){var F=u.lastRenderedReducer;if(F!==null){var W;W=Ut.current,Ut.current=Fl;try{var Q=u.lastRenderedState,ue=F(Q,b);if(_.hasEagerState=!0,_.eagerState=ue,tn(ue,Q)){QS(l,u,_,x);return}}catch{}finally{Ut.current=W}}}var me=Dm(l,u,_,x);if(me!==null){var Oe=Ns();io(me,l,x,Oe),k_(me,u,x)}}P_(l,x)}function Is(l){var u=l.alternate;return l===Lr||u!==null&&u===Lr}function tp(l,u){_g=rb=!0;var b=l.pending;b===null?u.next=u:(u.next=b.next,b.next=u),l.pending=u}function k_(l,u,b){if(Ts(b)){var x=u.lanes;x=gf(x,l.pendingLanes);var _=Qt(x,b);u.lanes=_,Uh(l,_)}}function P_(l,u,b){Ml(l,u)}var pb={readContext:Ea,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useInsertionEffect:To,useLayoutEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useMutableSource:To,useSyncExternalStore:To,useId:To,unstable_isNewReconciler:C},A_=null,O_=null,jx=null,Cc=null,xn=null,Fl=null,ss=null;{var mb=function(){d("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},Tn=function(){d("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};A_={readContext:function(l){return Ea(l)},useCallback:function(l,u){return Ye="useCallback",Er(),jf(u),Tu(l,u)},useContext:function(l){return Ye="useContext",Er(),Ea(l)},useEffect:function(l,u){return Ye="useEffect",Er(),jf(u),ko(l,u)},useImperativeHandle:function(l,u,b){return Ye="useImperativeHandle",Er(),jf(b),Px(l,u,b)},useInsertionEffect:function(l,u){return Ye="useInsertionEffect",Er(),jf(u),Tx(l,u)},useLayoutEffect:function(l,u){return Ye="useLayoutEffect",Er(),jf(u),kx(l,u)},useMemo:function(l,u){Ye="useMemo",Er(),jf(u);var b=Ut.current;Ut.current=xn;try{return Lm(l,u)}finally{Ut.current=b}},useReducer:function(l,u,b){Ye="useReducer",Er();var x=Ut.current;Ut.current=xn;try{return kg(l,u,b)}finally{Ut.current=x}},useRef:function(l){return Ye="useRef",Er(),_x(l)},useState:function(l){Ye="useState",Er();var u=Ut.current;Ut.current=xn;try{return sb(l)}finally{Ut.current=u}},useDebugValue:function(l,u){return Ye="useDebugValue",Er(),void 0},useDeferredValue:function(l){return Ye="useDeferredValue",Er(),Ii(l)},useTransition:function(){return Ye="useTransition",Er(),Dx()},useMutableSource:function(l,u,b){return Ye="useMutableSource",Er(),void 0},useSyncExternalStore:function(l,u,b){return Ye="useSyncExternalStore",Er(),Cx(l,u,b)},useId:function(){return Ye="useId",Er(),Dg()},unstable_isNewReconciler:C},O_={readContext:function(l){return Ea(l)},useCallback:function(l,u){return Ye="useCallback",At(),Tu(l,u)},useContext:function(l){return Ye="useContext",At(),Ea(l)},useEffect:function(l,u){return Ye="useEffect",At(),ko(l,u)},useImperativeHandle:function(l,u,b){return Ye="useImperativeHandle",At(),Px(l,u,b)},useInsertionEffect:function(l,u){return Ye="useInsertionEffect",At(),Tx(l,u)},useLayoutEffect:function(l,u){return Ye="useLayoutEffect",At(),kx(l,u)},useMemo:function(l,u){Ye="useMemo",At();var b=Ut.current;Ut.current=xn;try{return Lm(l,u)}finally{Ut.current=b}},useReducer:function(l,u,b){Ye="useReducer",At();var x=Ut.current;Ut.current=xn;try{return kg(l,u,b)}finally{Ut.current=x}},useRef:function(l){return Ye="useRef",At(),_x(l)},useState:function(l){Ye="useState",At();var u=Ut.current;Ut.current=xn;try{return sb(l)}finally{Ut.current=u}},useDebugValue:function(l,u){return Ye="useDebugValue",At(),void 0},useDeferredValue:function(l){return Ye="useDeferredValue",At(),Ii(l)},useTransition:function(){return Ye="useTransition",At(),Dx()},useMutableSource:function(l,u,b){return Ye="useMutableSource",At(),void 0},useSyncExternalStore:function(l,u,b){return Ye="useSyncExternalStore",At(),Cx(l,u,b)},useId:function(){return Ye="useId",At(),Dg()},unstable_isNewReconciler:C},jx={readContext:function(l){return Ea(l)},useCallback:function(l,u){return Ye="useCallback",At(),Ag(l,u)},useContext:function(l){return Ye="useContext",At(),Ea(l)},useEffect:function(l,u){return Ye="useEffect",At(),_i(l,u)},useImperativeHandle:function(l,u,b){return Ye="useImperativeHandle",At(),cb(l,u,b)},useInsertionEffect:function(l,u){return Ye="useInsertionEffect",At(),_u(l,u)},useLayoutEffect:function(l,u){return Ye="useLayoutEffect",At(),ub(l,u)},useMemo:function(l,u){Ye="useMemo",At();var b=Ut.current;Ut.current=Fl;try{return yi(l,u)}finally{Ut.current=b}},useReducer:function(l,u,b){Ye="useReducer",At();var x=Ut.current;Ut.current=Fl;try{return ab(l,u,b)}finally{Ut.current=x}},useRef:function(l){return Ye="useRef",At(),wc()},useState:function(l){Ye="useState",At();var u=Ut.current;Ut.current=Fl;try{return Ex(l)}finally{Ut.current=u}},useDebugValue:function(l,u){return Ye="useDebugValue",At(),db()},useDeferredValue:function(l){return Ye="useDeferredValue",At(),Ox(l)},useTransition:function(){return Ye="useTransition",At(),E_()},useMutableSource:function(l,u,b){return Ye="useMutableSource",At(),void 0},useSyncExternalStore:function(l,u,b){return Ye="useSyncExternalStore",At(),ob(l,u)},useId:function(){return Ye="useId",At(),fb()},unstable_isNewReconciler:C},Cc={readContext:function(l){return Ea(l)},useCallback:function(l,u){return Ye="useCallback",At(),Ag(l,u)},useContext:function(l){return Ye="useContext",At(),Ea(l)},useEffect:function(l,u){return Ye="useEffect",At(),_i(l,u)},useImperativeHandle:function(l,u,b){return Ye="useImperativeHandle",At(),cb(l,u,b)},useInsertionEffect:function(l,u){return Ye="useInsertionEffect",At(),_u(l,u)},useLayoutEffect:function(l,u){return Ye="useLayoutEffect",At(),ub(l,u)},useMemo:function(l,u){Ye="useMemo",At();var b=Ut.current;Ut.current=ss;try{return yi(l,u)}finally{Ut.current=b}},useReducer:function(l,u,b){Ye="useReducer",At();var x=Ut.current;Ut.current=ss;try{return wx(l,u,b)}finally{Ut.current=x}},useRef:function(l){return Ye="useRef",At(),wc()},useState:function(l){Ye="useState",At();var u=Ut.current;Ut.current=ss;try{return ll(l)}finally{Ut.current=u}},useDebugValue:function(l,u){return Ye="useDebugValue",At(),db()},useDeferredValue:function(l){return Ye="useDeferredValue",At(),w_(l)},useTransition:function(){return Ye="useTransition",At(),__()},useMutableSource:function(l,u,b){return Ye="useMutableSource",At(),void 0},useSyncExternalStore:function(l,u,b){return Ye="useSyncExternalStore",At(),ob(l,u)},useId:function(){return Ye="useId",At(),fb()},unstable_isNewReconciler:C},xn={readContext:function(l){return mb(),Ea(l)},useCallback:function(l,u){return Ye="useCallback",Tn(),Er(),Tu(l,u)},useContext:function(l){return Ye="useContext",Tn(),Er(),Ea(l)},useEffect:function(l,u){return Ye="useEffect",Tn(),Er(),ko(l,u)},useImperativeHandle:function(l,u,b){return Ye="useImperativeHandle",Tn(),Er(),Px(l,u,b)},useInsertionEffect:function(l,u){return Ye="useInsertionEffect",Tn(),Er(),Tx(l,u)},useLayoutEffect:function(l,u){return Ye="useLayoutEffect",Tn(),Er(),kx(l,u)},useMemo:function(l,u){Ye="useMemo",Tn(),Er();var b=Ut.current;Ut.current=xn;try{return Lm(l,u)}finally{Ut.current=b}},useReducer:function(l,u,b){Ye="useReducer",Tn(),Er();var x=Ut.current;Ut.current=xn;try{return kg(l,u,b)}finally{Ut.current=x}},useRef:function(l){return Ye="useRef",Tn(),Er(),_x(l)},useState:function(l){Ye="useState",Tn(),Er();var u=Ut.current;Ut.current=xn;try{return sb(l)}finally{Ut.current=u}},useDebugValue:function(l,u){return Ye="useDebugValue",Tn(),Er(),void 0},useDeferredValue:function(l){return Ye="useDeferredValue",Tn(),Er(),Ii(l)},useTransition:function(){return Ye="useTransition",Tn(),Er(),Dx()},useMutableSource:function(l,u,b){return Ye="useMutableSource",Tn(),Er(),void 0},useSyncExternalStore:function(l,u,b){return Ye="useSyncExternalStore",Tn(),Er(),Cx(l,u,b)},useId:function(){return Ye="useId",Tn(),Er(),Dg()},unstable_isNewReconciler:C},Fl={readContext:function(l){return mb(),Ea(l)},useCallback:function(l,u){return Ye="useCallback",Tn(),At(),Ag(l,u)},useContext:function(l){return Ye="useContext",Tn(),At(),Ea(l)},useEffect:function(l,u){return Ye="useEffect",Tn(),At(),_i(l,u)},useImperativeHandle:function(l,u,b){return Ye="useImperativeHandle",Tn(),At(),cb(l,u,b)},useInsertionEffect:function(l,u){return Ye="useInsertionEffect",Tn(),At(),_u(l,u)},useLayoutEffect:function(l,u){return Ye="useLayoutEffect",Tn(),At(),ub(l,u)},useMemo:function(l,u){Ye="useMemo",Tn(),At();var b=Ut.current;Ut.current=Fl;try{return yi(l,u)}finally{Ut.current=b}},useReducer:function(l,u,b){Ye="useReducer",Tn(),At();var x=Ut.current;Ut.current=Fl;try{return ab(l,u,b)}finally{Ut.current=x}},useRef:function(l){return Ye="useRef",Tn(),At(),wc()},useState:function(l){Ye="useState",Tn(),At();var u=Ut.current;Ut.current=Fl;try{return Ex(l)}finally{Ut.current=u}},useDebugValue:function(l,u){return Ye="useDebugValue",Tn(),At(),db()},useDeferredValue:function(l){return Ye="useDeferredValue",Tn(),At(),Ox(l)},useTransition:function(){return Ye="useTransition",Tn(),At(),E_()},useMutableSource:function(l,u,b){return Ye="useMutableSource",Tn(),At(),void 0},useSyncExternalStore:function(l,u,b){return Ye="useSyncExternalStore",Tn(),At(),ob(l,u)},useId:function(){return Ye="useId",Tn(),At(),fb()},unstable_isNewReconciler:C},ss={readContext:function(l){return mb(),Ea(l)},useCallback:function(l,u){return Ye="useCallback",Tn(),At(),Ag(l,u)},useContext:function(l){return Ye="useContext",Tn(),At(),Ea(l)},useEffect:function(l,u){return Ye="useEffect",Tn(),At(),_i(l,u)},useImperativeHandle:function(l,u,b){return Ye="useImperativeHandle",Tn(),At(),cb(l,u,b)},useInsertionEffect:function(l,u){return Ye="useInsertionEffect",Tn(),At(),_u(l,u)},useLayoutEffect:function(l,u){return Ye="useLayoutEffect",Tn(),At(),ub(l,u)},useMemo:function(l,u){Ye="useMemo",Tn(),At();var b=Ut.current;Ut.current=Fl;try{return yi(l,u)}finally{Ut.current=b}},useReducer:function(l,u,b){Ye="useReducer",Tn(),At();var x=Ut.current;Ut.current=Fl;try{return wx(l,u,b)}finally{Ut.current=x}},useRef:function(l){return Ye="useRef",Tn(),At(),wc()},useState:function(l){Ye="useState",Tn(),At();var u=Ut.current;Ut.current=Fl;try{return ll(l)}finally{Ut.current=u}},useDebugValue:function(l,u){return Ye="useDebugValue",Tn(),At(),db()},useDeferredValue:function(l){return Ye="useDeferredValue",Tn(),At(),w_(l)},useTransition:function(){return Ye="useTransition",Tn(),At(),__()},useMutableSource:function(l,u,b){return Ye="useMutableSource",Tn(),At(),void 0},useSyncExternalStore:function(l,u,b){return Ye="useSyncExternalStore",Tn(),At(),ob(l,u)},useId:function(){return Ye="useId",Tn(),At(),fb()},unstable_isNewReconciler:C}}var lr=i.unstable_now,D_=0,Mg=-1,If=-1,vb=-1,Ix=!1,gb=!1;function M_(){return Ix}function oD(){gb=!0}function sD(){Ix=!1,gb=!1}function lD(){Ix=gb,gb=!1}function j_(){return D_}function I_(){D_=lr()}function Rx(l){If=lr(),l.actualStartTime<0&&(l.actualStartTime=lr())}function R_(l){If=-1}function yb(l,u){if(If>=0){var b=lr()-If;l.actualDuration+=b,u&&(l.selfBaseDuration=b),If=-1}}function Ec(l){if(Mg>=0){var u=lr()-Mg;Mg=-1;for(var b=l.return;b!==null;){switch(b.tag){case J:var x=b.stateNode;x.effectDuration+=u;return;case re:var _=b.stateNode;_.effectDuration+=u;return}b=b.return}}}function jg(l){if(vb>=0){var u=lr()-vb;vb=-1;for(var b=l.return;b!==null;){switch(b.tag){case J:var x=b.stateNode;x!==null&&(x.passiveEffectDuration+=u);return;case re:var _=b.stateNode;_!==null&&(_.passiveEffectDuration+=u);return}b=b.return}}}function _c(){Mg=lr()}function Ig(){vb=lr()}function Nx(l){for(var u=l.child;u;)l.actualDuration+=u.actualDuration,u=u.sibling}function np(l,u){return{value:l,source:u,stack:xt(u),digest:null}}function Lx(l,u,b){return{value:l,source:null,stack:b??null,digest:u??null}}function no(l,u){return!0}function Vo(l,u){try{var b=no(l,u);if(b===!1)return;var x=u.value,_=u.source,I=u.stack,F=I!==null?I:"";if(x!=null&&x._suppressLogging){if(l.tag===H)return;console.error(x)}var W=_?jt(_):null,Q=W?"The above error occurred in the <"+W+"> component:":"The above error occurred in one of your React components:",ue;if(l.tag===J)ue=`Consider adding an error boundary to your tree to customize error handling behavior. Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var me=jt(l)||"Anonymous";ue="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+me+".")}var Oe=Q+` `+F+` `+(""+ue);console.error(Oe)}catch(He){setTimeout(function(){throw He})}}var uD=typeof WeakMap=="function"?WeakMap:Map;function N_(l,u,b){var x=dd(Xn,b);x.tag=Fy,x.payload={element:null};var _=u.value;return x.callback=function(){J6e(_),Vo(l,u)},x}function zx(l,u,b){var x=dd(Xn,b);x.tag=Fy;var _=l.type.getDerivedStateFromError;if(typeof _=="function"){var I=u.value;x.payload=function(){return _(I)},x.callback=function(){zW(l),Vo(l,u)}}var F=l.stateNode;return F!==null&&typeof F.componentDidCatch=="function"&&(x.callback=function(){zW(l),Vo(l,u),typeof _!="function"&&Q6e(this);var Q=u.value,ue=u.stack;this.componentDidCatch(Q,{componentStack:ue!==null?ue:""}),typeof _!="function"&&(Gi(l.lanes,dn)||d("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",jt(l)||"Unknown"))}),x}function Bx(l,u,b){var x=l.pingCache,_;if(x===null?(x=l.pingCache=new uD,_=new Set,x.set(u,_)):(_=x.get(u),_===void 0&&(_=new Set,x.set(u,_))),!_.has(b)){_.add(b);var I=$6e.bind(null,l,u,b);Fo&&v2(l,b),u.then(I,I)}}function cD(l,u,b,x){var _=l.updateQueue;if(_===null){var I=new Set;I.add(b),l.updateQueue=I}else _.add(b)}function dD(l,u){var b=l.tag;if((l.mode&Vn)===mn&&(b===U||b===ie||b===de)){var x=l.alternate;x?(l.updateQueue=x.updateQueue,l.memoizedState=x.memoizedState,l.lanes=x.lanes):(l.updateQueue=null,l.memoizedState=null)}}function L_(l){var u=l;do{if(u.tag===le&&tD(u))return u;u=u.return}while(u!==null);return null}function Fx(l,u,b,x,_){if((l.mode&Vn)===mn){if(l===u)l.flags|=di;else{if(l.flags|=Yn,b.flags|=pe,b.flags&=~(Xu|nu),b.tag===H){var I=b.alternate;if(I===null)b.tag=Ae;else{var F=dd(Xn,dn);F.tag=By,Df(b,F,dn)}}b.lanes=Qt(b.lanes,dn)}return l}return l.flags|=di,l.lanes=_,l}function fD(l,u,b,x,_){if(b.flags|=nu,Fo&&v2(l,_),x!==null&&typeof x=="object"&&typeof x.then=="function"){var I=x;dD(b),E()&&b.mode&Vn&&Em();var F=L_(u);if(F!==null){F.flags&=~Ro,Fx(F,u,b,l,_),F.mode&Vn&&Bx(l,I,_),cD(F,l,I);return}else{if(!Py(_)){Bx(l,I,_),lM();return}var W=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");x=W}}else if(E()&&b.mode&Vn){Em();var Q=L_(u);if(Q!==null){(Q.flags&di)===zt&&(Q.flags|=Ro),Fx(Q,u,b,l,_),O(np(x,b));return}}x=np(x,b),H6e(x);var ue=u;do{switch(ue.tag){case J:{var me=x;ue.flags|=di;var Oe=nd(_);ue.lanes=Qt(ue.lanes,Oe);var He=N_(ue,me,Oe);$S(ue,He);return}case H:var Ze=x,ut=ue.type,lt=ue.stateNode;if((ue.flags&Yn)===zt&&(typeof ut.getDerivedStateFromError=="function"||lt!==null&&typeof lt.componentDidCatch=="function"&&!AW(lt))){ue.flags|=di;var sn=nd(_);ue.lanes=Qt(ue.lanes,sn);var kn=zx(ue,Ze,sn);$S(ue,kn);return}break}ue=ue.return}while(ue!==null)}function hD(){return null}var Rg=a.ReactCurrentOwner,Ul=!1,bb,Ng,Ux,Hx,Vx,Hl,Gx,Sb;bb={},Ng={},Ux={},Hx={},Vx={},Hl=!1,Gx={},Sb={};function ls(l,u,b,x){l===null?u.child=u_(u,null,b,x):u.child=Mm(u,l.child,b,x)}function pD(l,u,b,x){u.child=Mm(u,l.child,null,x),u.child=Mm(u,null,b,x)}function z_(l,u,b,x,_){if(u.type!==u.elementType){var I=b.propTypes;I&&_s(I,x,"prop",Ft(b))}var F=b.render,W=u.ref,Q,ue;Qh(u,_),pc(u);{if(Rg.current=u,be(!0),Q=ep(l,u,F,x,W,_),ue=Nm(),u.mode&cr){sa(!0);try{Q=ep(l,u,F,x,W,_),ue=Nm()}finally{sa(!1)}}be(!1)}return Jr(),l!==null&&!Ul?(h_(l,u,_),pd(l,u,_)):(E()&&ue&&Il(u),u.flags|=vr,ls(l,u,Q,_),u.child)}function Wx(l,u,b,x,_){if(l===null){var I=b.type;if(vje(I)&&b.compare===null&&b.defaultProps===void 0){var F=I;return F=Mb(I),u.tag=de,u.type=F,Xx(u,I),qx(l,u,F,x,_)}{var W=I.propTypes;W&&_s(W,x,"prop",Ft(I))}var Q=yM(b.type,null,x,u,u.mode,_);return Q.ref=u.ref,Q.return=u,u.child=Q,Q}{var ue=b.type,me=ue.propTypes;me&&_s(me,x,"prop",Ft(ue))}var Oe=l.child,He=r2(l,_);if(!He){var Ze=Oe.memoizedProps,ut=b.compare;if(ut=ut!==null?ut:ye,ut(Ze,x)&&l.ref===u.ref)return pd(l,u,_)}u.flags|=vr;var lt=Kg(Oe,x);return lt.ref=u.ref,lt.return=u,u.child=lt,lt}function qx(l,u,b,x,_){if(u.type!==u.elementType){var I=u.elementType;if(I.$$typeof===at){var F=I,W=F._payload,Q=F._init;try{I=Q(W)}catch{I=null}var ue=I&&I.propTypes;ue&&_s(ue,x,"prop",Ft(I))}}if(l!==null){var me=l.memoizedProps;if(ye(me,x)&&l.ref===u.ref&&u.type===l.type)if(Ul=!1,u.pendingProps=x=me,r2(l,_))(l.flags&pe)!==zt&&(Ul=!0);else return u.lanes=l.lanes,pd(l,u,_)}return Yx(l,u,b,x,_)}function B_(l,u,b){var x=u.pendingProps,_=x.children,I=l!==null?l.memoizedState:null;if(x.mode==="hidden"||P)if((u.mode&Vn)===mn){var F={baseLanes:tt,cachePool:null,transitions:null};u.memoizedState=F,bT(u,b)}else if(Gi(b,ba)){var Oe={baseLanes:tt,cachePool:null,transitions:null};u.memoizedState=Oe;var He=I!==null?I.baseLanes:b;bT(u,He)}else{var W=null,Q;if(I!==null){var ue=I.baseLanes;Q=Qt(ue,b)}else Q=b;u.lanes=u.childLanes=ba;var me={baseLanes:Q,cachePool:W,transitions:null};return u.memoizedState=me,u.updateQueue=null,bT(u,Q),null}else{var Ze;I!==null?(Ze=Qt(I.baseLanes,b),u.memoizedState=null):Ze=b,bT(u,Ze)}return ls(l,u,_,b),u.child}function mD(l,u,b){var x=u.pendingProps;return ls(l,u,x,b),u.child}function vD(l,u,b){var x=u.pendingProps.children;return ls(l,u,x,b),u.child}function gD(l,u,b){{u.flags|=hn;{var x=u.stateNode;x.effectDuration=0,x.passiveEffectDuration=0}}var _=u.pendingProps,I=_.children;return ls(l,u,I,b),u.child}function F_(l,u){var b=u.ref;(l===null&&b!==null||l!==null&&l.ref!==b)&&(u.flags|=uo,u.flags|=Pt)}function Yx(l,u,b,x,_){if(u.type!==u.elementType){var I=b.propTypes;I&&_s(I,x,"prop",Ft(b))}var F;{var W=Al(u,b,!0);F=ia(u,W)}var Q,ue;Qh(u,_),pc(u);{if(Rg.current=u,be(!0),Q=ep(l,u,b,x,F,_),ue=Nm(),u.mode&cr){sa(!0);try{Q=ep(l,u,b,x,F,_),ue=Nm()}finally{sa(!1)}}be(!1)}return Jr(),l!==null&&!Ul?(h_(l,u,_),pd(l,u,_)):(E()&&ue&&Il(u),u.flags|=vr,ls(l,u,Q,_),u.child)}function U_(l,u,b,x,_){{switch(YW(u)){case!1:{var I=u.stateNode,F=u.type,W=new F(u.memoizedProps,I.context),Q=W.state;I.updater.enqueueSetState(I,Q,null);break}case!0:{u.flags|=Yn,u.flags|=di;var ue=new Error("Simulated error coming from DevTools"),me=nd(_);u.lanes=Qt(u.lanes,me);var Oe=zx(u,np(ue,u),me);$S(u,Oe);break}}if(u.type!==u.elementType){var He=b.propTypes;He&&_s(He,x,"prop",Ft(b))}}var Ze;to(b)?(Ze=!0,tc(u)):Ze=!1,Qh(u,_);var ut=u.stateNode,lt;ut===null?(Bg(l,u),Ky(u,b,x),ux(u,b,x,_),lt=!0):l===null?lt=XO(u,b,x,_):lt=QO(l,u,b,x,_);var sn=Kx(l,u,b,lt,Ze,_);{var kn=u.stateNode;lt&&kn.props!==x&&(Hl||d("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",jt(u)||"a component"),Hl=!0)}return sn}function Kx(l,u,b,x,_,I){F_(l,u);var F=(u.flags&Yn)!==zt;if(!x&&!F)return _&&Jc(u,b,!1),pd(l,u,I);var W=u.stateNode;Rg.current=u;var Q;if(F&&typeof b.getDerivedStateFromError!="function")Q=null,R_();else{pc(u);{if(be(!0),Q=W.render(),u.mode&cr){sa(!0);try{W.render()}finally{sa(!1)}}be(!1)}Jr()}return u.flags|=vr,l!==null&&F?pD(l,u,Q,I):ls(l,u,Q,I),u.memoizedState=W.state,_&&Jc(u,b,!0),u.child}function H_(l){var u=l.stateNode;u.pendingContext?Ai(l,u.pendingContext,u.pendingContext!==u.context):u.context&&Ai(l,u.context,!1),vx(l,u.containerInfo)}function yD(l,u,b){if(H_(u),l===null)throw new Error("Should have a current fiber. This is a bug in React.");var x=u.pendingProps,_=u.memoizedState,I=_.element;ZE(l,u),Gy(u,x,null,b);var F=u.memoizedState;u.stateNode;var W=F.element;if(ga&&_.isDehydrated){var Q={element:W,isDehydrated:!1,cache:F.cache,pendingSuspenseBoundaries:F.pendingSuspenseBoundaries,transitions:F.transitions},ue=u.updateQueue;if(ue.baseState=Q,u.memoizedState=Q,u.flags&Ro){var me=np(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),u);return V_(l,u,W,b,me)}else if(W!==I){var Oe=np(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),u);return V_(l,u,W,b,Oe)}else{Nl(u);var He=u_(u,null,W,b);u.child=He;for(var Ze=He;Ze;)Ze.flags=Ze.flags&~gr|Ui,Ze=Ze.sibling}}else{if(h(),W===I)return pd(l,u,b);ls(l,u,W,b)}return u.child}function V_(l,u,b,x,_){return h(),O(_),u.flags|=Ro,ls(l,u,b,x),u.child}function bD(l,u,b){c_(u),l===null&&Ll(u);var x=u.type,_=u.pendingProps,I=l!==null?l.memoizedProps:null,F=_.children,W=su(x,_);return W?F=null:I!==null&&su(x,I)&&(u.flags|=qs),F_(l,u),ls(l,u,F,b),u.child}function SD(l,u){return l===null&&Ll(u),null}function xD(l,u,b,x){Bg(l,u);var _=u.pendingProps,I=b,F=I._payload,W=I._init,Q=W(F);u.type=Q;var ue=u.tag=gje(Q),me=xu(Q,_),Oe;switch(ue){case U:return Xx(u,Q),u.type=Q=Mb(Q),Oe=Yx(null,u,Q,me,x),Oe;case H:return u.type=Q=fM(Q),Oe=U_(null,u,Q,me,x),Oe;case ie:return u.type=Q=hM(Q),Oe=z_(null,u,Q,me,x),Oe;case ee:{if(u.type!==u.elementType){var He=Q.propTypes;He&&_s(He,me,"prop",Ft(Q))}return Oe=Wx(null,u,Q,xu(Q.type,me),x),Oe}}var Ze="";throw Q!==null&&typeof Q=="object"&&Q.$$typeof===at&&(Ze=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+Q+". "+("Lazy element type must resolve to a class or function."+Ze))}function wD(l,u,b,x,_){Bg(l,u),u.tag=H;var I;return to(b)?(I=!0,tc(u)):I=!1,Qh(u,_),Ky(u,b,x),ux(u,b,x,_),Kx(null,u,b,!0,I,_)}function CD(l,u,b,x){Bg(l,u);var _=u.pendingProps,I;{var F=Al(u,b,!1);I=ia(u,F)}Qh(u,x);var W,Q;pc(u);{if(b.prototype&&typeof b.prototype.render=="function"){var ue=Ft(b)||"Unknown";bb[ue]||(d("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",ue,ue),bb[ue]=!0)}u.mode&cr&&Ue.recordLegacyContextWarning(u,null),be(!0),Rg.current=u,W=ep(null,u,b,_,I,x),Q=Nm(),be(!1)}if(Jr(),u.flags|=vr,typeof W=="object"&&W!==null&&typeof W.render=="function"&&W.$$typeof===void 0){var me=Ft(b)||"Unknown";Ng[me]||(d("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",me,me,me),Ng[me]=!0)}if(typeof W=="object"&&W!==null&&typeof W.render=="function"&&W.$$typeof===void 0){{var Oe=Ft(b)||"Unknown";Ng[Oe]||(d("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",Oe,Oe,Oe),Ng[Oe]=!0)}u.tag=H,u.memoizedState=null,u.updateQueue=null;var He=!1;return to(b)?(He=!0,tc(u)):He=!1,u.memoizedState=W.state!==null&&W.state!==void 0?W.state:null,JS(u),i_(u,W),ux(u,b,_,x),Kx(null,u,b,!0,He,x)}else{if(u.tag=U,u.mode&cr){sa(!0);try{W=ep(null,u,b,_,I,x),Q=Nm()}finally{sa(!1)}}return E()&&Q&&Il(u),ls(null,u,W,x),Xx(u,b),u.child}}function Xx(l,u){{if(u&&u.childContextTypes&&d("%s(...): childContextTypes cannot be defined on a function component.",u.displayName||u.name||"Component"),l.ref!==null){var b="",x=si();x&&(b+=` Check the render method of \``+x+"`.");var _=x||"",I=l._debugSource;I&&(_=I.fileName+":"+I.lineNumber),Vx[_]||(Vx[_]=!0,d("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",b))}if(typeof u.getDerivedStateFromProps=="function"){var F=Ft(u)||"Unknown";Hx[F]||(d("%s: Function components do not support getDerivedStateFromProps.",F),Hx[F]=!0)}if(typeof u.contextType=="object"&&u.contextType!==null){var W=Ft(u)||"Unknown";Ux[W]||(d("%s: Function components do not support contextType.",W),Ux[W]=!0)}}}var Qx={dehydrated:null,treeContext:null,retryLane:oi};function Zx(l){return{baseLanes:l,cachePool:hD(),transitions:null}}function ED(l,u){var b=null;return{baseLanes:Qt(l.baseLanes,u),cachePool:b,transitions:l.transitions}}function _D(l,u,b,x){if(u!==null){var _=u.memoizedState;if(_===null)return!1}return gx(l,Cg)}function TD(l,u){return Fh(l.childLanes,u)}function G_(l,u,b){var x=u.pendingProps;XW(u)&&(u.flags|=Yn);var _=Cu.current,I=!1,F=(u.flags&Yn)!==zt;if(F||_D(_,l)?(I=!0,u.flags&=~Yn):(l===null||l.memoizedState!==null)&&(_=eD(_,d_)),_=Im(_),Mf(u,_),l===null){Ll(u);var W=u.memoizedState;if(W!==null){var Q=W.dehydrated;if(Q!==null)return e2(u,Q)}var ue=x.children,me=x.fallback;if(I){var Oe=kD(u,ue,me,b),He=u.child;return He.memoizedState=Zx(b),u.memoizedState=Qx,Oe}else return Jx(u,ue)}else{var Ze=l.memoizedState;if(Ze!==null){var ut=Ze.dehydrated;if(ut!==null)return OD(l,u,F,x,ut,Ze,b)}if(I){var lt=x.fallback,sn=x.children,kn=PD(l,u,sn,lt,b),vn=u.child,ei=l.child.memoizedState;return vn.memoizedState=ei===null?Zx(b):ED(ei,b),vn.childLanes=TD(l,b),u.memoizedState=Qx,kn}else{var br=x.children,Ie=W_(l,u,br,b);return u.memoizedState=null,Ie}}}function Jx(l,u,b){var x=l.mode,_={mode:"visible",children:u},I=Lg(_,x);return I.return=l,l.child=I,I}function kD(l,u,b,x){var _=l.mode,I=l.child,F={mode:"hidden",children:u},W,Q;return(_&Vn)===mn&&I!==null?(W=I,W.childLanes=tt,W.pendingProps=F,l.mode&_n&&(W.actualDuration=0,W.actualStartTime=-1,W.selfBaseDuration=0,W.treeBaseDuration=0),Q=Um(b,_,x,null)):(W=Lg(F,_),Q=Um(b,_,x,null)),W.return=l,Q.return=l,W.sibling=Q,l.child=W,Q}function Lg(l,u,b){return FW(l,u,tt,null)}function $x(l,u){return Kg(l,u)}function W_(l,u,b,x){var _=l.child,I=_.sibling,F=$x(_,{mode:"visible",children:b});if((u.mode&Vn)===mn&&(F.lanes=x),F.return=u,F.sibling=null,I!==null){var W=u.deletions;W===null?(u.deletions=[I],u.flags|=ri):W.push(I)}return u.child=F,F}function PD(l,u,b,x,_){var I=u.mode,F=l.child,W=F.sibling,Q={mode:"hidden",children:b},ue;if((I&Vn)===mn&&u.child!==F){var me=u.child;ue=me,ue.childLanes=tt,ue.pendingProps=Q,u.mode&_n&&(ue.actualDuration=0,ue.actualStartTime=-1,ue.selfBaseDuration=F.selfBaseDuration,ue.treeBaseDuration=F.treeBaseDuration),u.deletions=null}else ue=$x(F,Q),ue.subtreeFlags=F.subtreeFlags&fi;var Oe;return W!==null?Oe=Kg(W,x):(Oe=Um(x,I,_,null),Oe.flags|=gr),Oe.return=u,ue.return=u,ue.sibling=Oe,u.child=ue,Oe}function xb(l,u,b,x){x!==null&&O(x),Mm(u,l.child,null,b);var _=u.pendingProps,I=_.children,F=Jx(u,I);return F.flags|=gr,u.memoizedState=null,F}function AD(l,u,b,x,_){var I=u.mode,F={mode:"visible",children:b},W=Lg(F,I),Q=Um(x,I,_,null);return Q.flags|=gr,W.return=u,Q.return=u,W.sibling=Q,u.child=W,(u.mode&Vn)!==mn&&Mm(u,l.child,null,_),Q}function e2(l,u,b){return(l.mode&Vn)===mn?(d("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, ).render(element) or remove the Suspense components from the server rendered components."),l.lanes=dn):_l(u)?l.lanes=el:l.lanes=ba,null}function OD(l,u,b,x,_,I,F){if(b)if(u.flags&Ro){u.flags&=~Ro;var Ie=Lx(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return xb(l,u,F,Ie)}else{if(u.memoizedState!==null)return u.child=l.child,u.flags|=Yn,null;var Ke=x.children,je=x.fallback,Ct=AD(l,u,Ke,je,F),en=u.child;return en.memoizedState=Zx(F),u.memoizedState=Qx,Ct}else{if(My(),(u.mode&Vn)===mn)return xb(l,u,F,null);if(_l(_)){var W,Q,ue;{var me=Kv(_);W=me.digest,Q=me.message,ue=me.stack}var Oe;Q?Oe=new Error(Q):Oe=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var He=Lx(Oe,W,ue);return xb(l,u,F,He)}var Ze=Gi(F,l.childLanes);if(Ul||Ze){var ut=gT();if(ut!==null){var lt=dc(ut,F);if(lt!==oi&<!==I.retryLane){I.retryLane=lt;var sn=Xn;Ho(l,lt),io(ut,l,lt,sn)}}lM();var kn=Lx(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return xb(l,u,F,kn)}else if(Zs(_)){u.flags|=Yn,u.child=l.child;var vn=eje.bind(null,l);return mo(_,vn),null}else{Ds(u,_,I.treeContext);var ei=x.children,br=Jx(u,ei);return br.flags|=Ui,br}}}function q_(l,u,b){l.lanes=Qt(l.lanes,u);var x=l.alternate;x!==null&&(x.lanes=Qt(x.lanes,u)),XS(l.return,u,b)}function DD(l,u,b){for(var x=u;x!==null;){if(x.tag===le){var _=x.memoizedState;_!==null&&q_(x,b,l)}else if(x.tag===Me)q_(x,b,l);else if(x.child!==null){x.child.return=x,x=x.child;continue}if(x===l)return;for(;x.sibling===null;){if(x.return===null||x.return===l)return;x=x.return}x.sibling.return=x.return,x=x.sibling}}function Rs(l){for(var u=l,b=null;u!==null;){var x=u.alternate;x!==null&&eb(x)===null&&(b=u),u=u.sibling}return b}function t2(l){if(l!==void 0&&l!=="forwards"&&l!=="backwards"&&l!=="together"&&!Gx[l])if(Gx[l]=!0,typeof l=="string")switch(l.toLowerCase()){case"together":case"forwards":case"backwards":{d('"%s" is not a valid value for revealOrder on . Use lowercase "%s" instead.',l,l.toLowerCase());break}case"forward":case"backward":{d('"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.',l,l.toLowerCase());break}default:d('"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?',l);break}else d('%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?',l)}function MD(l,u){l!==void 0&&!Sb[l]&&(l!=="collapsed"&&l!=="hidden"?(Sb[l]=!0,d('"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?',l)):u!=="forwards"&&u!=="backwards"&&(Sb[l]=!0,d(' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',l)))}function Y_(l,u){{var b=Gn(l),x=!b&&typeof st(l)=="function";if(b||x){var _=b?"array":"iterable";return d("A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ",_,u,_),!1}}return!0}function jD(l,u){if((u==="forwards"||u==="backwards")&&l!==void 0&&l!==null&&l!==!1)if(Gn(l)){for(var b=0;b. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',u)}}function n2(l,u,b,x,_){var I=l.memoizedState;I===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:x,tail:b,tailMode:_}:(I.isBackwards=u,I.rendering=null,I.renderingStartTime=0,I.last=x,I.tail=b,I.tailMode=_)}function wb(l,u,b){var x=u.pendingProps,_=x.revealOrder,I=x.tail,F=x.children;t2(_),MD(I,_),jD(F,_),ls(l,u,F,b);var W=Cu.current,Q=gx(W,Cg);if(Q)W=yx(W,Cg),u.flags|=Yn;else{var ue=l!==null&&(l.flags&Yn)!==zt;ue&&DD(u,u.child,b),W=Im(W)}if(Mf(u,W),(u.mode&Vn)===mn)u.memoizedState=null;else switch(_){case"forwards":{var me=Rs(u.child),Oe;me===null?(Oe=u.child,u.child=null):(Oe=me.sibling,me.sibling=null),n2(u,!1,Oe,me,I);break}case"backwards":{var He=null,Ze=u.child;for(u.child=null;Ze!==null;){var ut=Ze.alternate;if(ut!==null&&eb(ut)===null){u.child=Ze;break}var lt=Ze.sibling;Ze.sibling=He,He=Ze,Ze=lt}n2(u,!0,He,null,I);break}case"together":{n2(u,!1,null,null,void 0);break}default:u.memoizedState=null}return u.child}function ID(l,u,b){vx(u,u.stateNode.containerInfo);var x=u.pendingProps;return l===null?u.child=Mm(u,null,x,b):ls(l,u,x,b),u.child}var Cb=!1;function RD(l,u,b){var x=u.type,_=x._context,I=u.pendingProps,F=u.memoizedProps,W=I.value;{"value"in I||Cb||(Cb=!0,d("The `value` prop is required for the ``. Did you misspell it or forget to pass it?"));var Q=u.type.propTypes;Q&&_s(Q,I,"prop","Context.Provider")}if(YS(u,_,W),F!==null){var ue=F.value;if(tn(ue,W)){if(F.children===I.children&&!du())return pd(l,u,b)}else GO(u,_,b)}var me=I.children;return ls(l,u,me,b),u.child}var K_=!1;function ND(l,u,b){var x=u.type;x._context===void 0?x!==x.Consumer&&(K_||(K_=!0,d("Rendering directly is not supported and will be removed in a future major release. Did you mean to render instead?"))):x=x._context;var _=u.pendingProps,I=_.children;typeof I!="function"&&d("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Qh(u,b);var F=Ea(x);pc(u);var W;return Rg.current=u,be(!0),W=I(F),be(!1),Jr(),u.flags|=vr,ls(l,u,W,b),u.child}function zg(){Ul=!0}function Bg(l,u){(u.mode&Vn)===mn&&l!==null&&(l.alternate=null,u.alternate=null,u.flags|=gr)}function pd(l,u,b){return l!==null&&(u.dependencies=l.dependencies),R_(),m2(u.lanes),Gi(b,u.childLanes)?(ZO(l,u),u.child):null}function LD(l,u,b){{var x=u.return;if(x===null)throw new Error("Cannot swap the root fiber.");if(l.alternate=null,u.alternate=null,b.index=u.index,b.sibling=u.sibling,b.return=u.return,b.ref=u.ref,u===x.child)x.child=b;else{var _=x.child;if(_===null)throw new Error("Expected parent to have a child.");for(;_.sibling!==u;)if(_=_.sibling,_===null)throw new Error("Expected to find the previous sibling.");_.sibling=b}var I=x.deletions;return I===null?(x.deletions=[l],x.flags|=ri):I.push(l),b.flags|=gr,b}}function r2(l,u){var b=l.lanes;return!!Gi(b,u)}function i2(l,u,b){switch(u.tag){case J:H_(u),u.stateNode,h();break;case K:c_(u);break;case H:{var x=u.type;to(x)&&tc(u);break}case $:vx(u,u.stateNode.containerInfo);break;case oe:{var _=u.memoizedProps.value,I=u.type._context;YS(u,I,_);break}case re:{var F=Gi(b,u.childLanes);F&&(u.flags|=hn);{var W=u.stateNode;W.effectDuration=0,W.passiveEffectDuration=0}}break;case le:{var Q=u.memoizedState;if(Q!==null){if(Q.dehydrated!==null)return Mf(u,Im(Cu.current)),u.flags|=Yn,null;var ue=u.child,me=ue.childLanes;if(Gi(b,me))return G_(l,u,b);Mf(u,Im(Cu.current));var Oe=pd(l,u,b);return Oe!==null?Oe.sibling:null}else Mf(u,Im(Cu.current));break}case Me:{var He=(l.flags&Yn)!==zt,Ze=Gi(b,u.childLanes);if(He){if(Ze)return wb(l,u,b);u.flags|=Yn}var ut=u.memoizedState;if(ut!==null&&(ut.rendering=null,ut.tail=null,ut.lastEffect=null),Mf(u,Cu.current),Ze)break;return null}case Xe:case Qe:return u.lanes=tt,B_(l,u,b)}return pd(l,u,b)}function Eb(l,u,b){if(u._debugNeedsRemount&&l!==null)return LD(l,u,yM(u.type,u.key,u.pendingProps,u._debugOwner||null,u.mode,u.lanes));if(l!==null){var x=l.memoizedProps,_=u.pendingProps;if(x!==_||du()||u.type!==l.type)Ul=!0;else{var I=r2(l,b);if(!I&&(u.flags&Yn)===zt)return Ul=!1,i2(l,u,b);(l.flags&pe)!==zt?Ul=!0:Ul=!1}}else if(Ul=!1,E()&&gc(u)){var F=u.index,W=wm();cd(u,W,F)}switch(u.lanes=tt,u.tag){case q:return CD(l,u,u.type,b);case Re:{var Q=u.elementType;return xD(l,u,Q,b)}case U:{var ue=u.type,me=u.pendingProps,Oe=u.elementType===ue?me:xu(ue,me);return Yx(l,u,ue,Oe,b)}case H:{var He=u.type,Ze=u.pendingProps,ut=u.elementType===He?Ze:xu(He,Ze);return U_(l,u,He,ut,b)}case J:return yD(l,u,b);case K:return bD(l,u,b);case fe:return SD(l,u);case le:return G_(l,u,b);case $:return ID(l,u,b);case ie:{var lt=u.type,sn=u.pendingProps,kn=u.elementType===lt?sn:xu(lt,sn);return z_(l,u,lt,kn,b)}case X:return mD(l,u,b);case G:return vD(l,u,b);case re:return gD(l,u,b);case oe:return RD(l,u,b);case te:return ND(l,u,b);case ee:{var vn=u.type,ei=u.pendingProps,br=xu(vn,ei);if(u.type!==u.elementType){var Ie=vn.propTypes;Ie&&_s(Ie,br,"prop",Ft(vn))}return br=xu(vn.type,br),Wx(l,u,vn,br,b)}case de:return qx(l,u,u.type,u.pendingProps,b);case Ae:{var Ke=u.type,je=u.pendingProps,Ct=u.elementType===Ke?je:xu(Ke,je);return wD(l,u,Ke,Ct,b)}case Me:return wb(l,u,b);case Te:break;case Xe:return B_(l,u,b)}throw new Error("Unknown unit of work tag ("+u.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Tc(l){l.flags|=hn}function X_(l){l.flags|=uo,l.flags|=Pt}function Q_(l,u){var b=l!==null&&l.child===u.child;if(b)return!0;if((u.flags&ri)!==zt)return!1;for(var x=u.child;x!==null;){if((x.flags&Ei)!==zt||(x.subtreeFlags&Ei)!==zt)return!1;x=x.sibling}return!0}var Fg,Ug,_b,Tb;if(ta)Fg=function(l,u,b,x){for(var _=u.child;_!==null;){if(_.tag===K||_.tag===fe)va(l,_.stateNode);else if(_.tag!==$){if(_.child!==null){_.child.return=_,_=_.child;continue}}if(_===u)return;for(;_.sibling===null;){if(_.return===null||_.return===u)return;_=_.return}_.sibling.return=_.return,_=_.sibling}},Ug=function(l,u){},_b=function(l,u,b,x,_){var I=l.memoizedProps;if(I!==x){var F=u.stateNode,W=xg(),Q=Xd(F,b,I,x,_,W);u.updateQueue=Q,Q&&Tc(u)}},Tb=function(l,u,b,x){b!==x&&Tc(u)};else if(ho){Fg=function(l,u,b,x){for(var _=u.child;_!==null;){if(_.tag===K){var I=_.stateNode;if(b&&x){var F=_.memoizedProps,W=_.type;I=Hi(I,W,F,_)}va(l,I)}else if(_.tag===fe){var Q=_.stateNode;if(b&&x){var ue=_.memoizedProps;Q=kr(Q,ue,_)}va(l,Q)}else if(_.tag!==$){if(_.tag===Xe&&_.memoizedState!==null){var me=_.child;me!==null&&(me.return=_),Fg(l,_,!0,!0)}else if(_.child!==null){_.child.return=_,_=_.child;continue}}if(_=_,_===u)return;for(;_.sibling===null;){if(_.return===null||_.return===u)return;_=_.return}_.sibling.return=_.return,_=_.sibling}};var Z_=function(l,u,b,x){for(var _=u.child;_!==null;){if(_.tag===K){var I=_.stateNode;if(b&&x){var F=_.memoizedProps,W=_.type;I=Hi(I,W,F,_)}On(l,I)}else if(_.tag===fe){var Q=_.stateNode;if(b&&x){var ue=_.memoizedProps;Q=kr(Q,ue,_)}On(l,Q)}else if(_.tag!==$){if(_.tag===Xe&&_.memoizedState!==null){var me=_.child;me!==null&&(me.return=_),Z_(l,_,!0,!0)}else if(_.child!==null){_.child.return=_,_=_.child;continue}}if(_=_,_===u)return;for(;_.sibling===null;){if(_.return===null||_.return===u)return;_=_.return}_.sibling.return=_.return,_=_.sibling}};Ug=function(l,u){var b=u.stateNode,x=Q_(l,u);if(!x){var _=b.containerInfo,I=pn(_);Z_(I,u,!1,!1),b.pendingChildren=I,Tc(u),rr(_,I)}},_b=function(l,u,b,x,_){var I=l.stateNode,F=l.memoizedProps,W=Q_(l,u);if(W&&F===x){u.stateNode=I;return}var Q=u.stateNode,ue=xg(),me=null;if(F!==x&&(me=Xd(Q,b,F,x,_,ue)),W&&me===null){u.stateNode=I;return}var Oe=jr(I,me,b,F,x,u,W,Q);Cl(Oe,b,x,_,ue)&&Tc(u),u.stateNode=Oe,W?Tc(u):Fg(Oe,u,!1,!1)},Tb=function(l,u,b,x){if(b!==x){var _=mx(),I=xg();u.stateNode=El(x,_,I,u),Tc(u)}else u.stateNode=l.stateNode}}else Ug=function(l,u){},_b=function(l,u,b,x,_){},Tb=function(l,u,b,x){};function Hg(l,u){if(!E())switch(l.tailMode){case"hidden":{for(var b=l.tail,x=null;b!==null;)b.alternate!==null&&(x=b),b=b.sibling;x===null?l.tail=null:x.sibling=null;break}case"collapsed":{for(var _=l.tail,I=null;_!==null;)_.alternate!==null&&(I=_),_=_.sibling;I===null?!u&&l.tail!==null?l.tail.sibling=null:l.tail=null:I.sibling=null;break}}}function Po(l){var u=l.alternate!==null&&l.alternate.child===l.child,b=tt,x=zt;if(u){if((l.mode&_n)!==mn){for(var Q=l.selfBaseDuration,ue=l.child;ue!==null;)b=Qt(b,Qt(ue.lanes,ue.childLanes)),x|=ue.subtreeFlags&fi,x|=ue.flags&fi,Q+=ue.treeBaseDuration,ue=ue.sibling;l.treeBaseDuration=Q}else for(var me=l.child;me!==null;)b=Qt(b,Qt(me.lanes,me.childLanes)),x|=me.subtreeFlags&fi,x|=me.flags&fi,me.return=l,me=me.sibling;l.subtreeFlags|=x}else{if((l.mode&_n)!==mn){for(var _=l.actualDuration,I=l.selfBaseDuration,F=l.child;F!==null;)b=Qt(b,Qt(F.lanes,F.childLanes)),x|=F.subtreeFlags,x|=F.flags,_+=F.actualDuration,I+=F.treeBaseDuration,F=F.sibling;l.actualDuration=_,l.treeBaseDuration=I}else for(var W=l.child;W!==null;)b=Qt(b,Qt(W.lanes,W.childLanes)),x|=W.subtreeFlags,x|=W.flags,W.return=l,W=W.sibling;l.subtreeFlags|=x}return l.childLanes=b,u}function zD(l,u,b){if(Tm()&&(u.mode&Vn)!==mn&&(u.flags&Yn)===zt)return km(u),h(),u.flags|=Ro|nu|di,!1;var x=Sc(u);if(b!==null&&b.dehydrated!==null)if(l===null){if(!x)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(hg(u),Po(u),(u.mode&_n)!==mn){var _=b!==null;if(_){var I=u.child;I!==null&&(u.treeBaseDuration-=I.treeBaseDuration)}}return!1}else{if(h(),(u.flags&Yn)===zt&&(u.memoizedState=null),u.flags|=hn,Po(u),(u.mode&_n)!==mn){var F=b!==null;if(F){var W=u.child;W!==null&&(u.treeBaseDuration-=W.treeBaseDuration)}}return!1}else return m(),!0}function J_(l,u,b){var x=u.pendingProps;switch(Yh(u),u.tag){case q:case Re:case de:case U:case ie:case X:case G:case re:case te:case ee:return Po(u),null;case H:{var _=u.type;return to(_)&&wr(u),Po(u),null}case J:{var I=u.stateNode;if(jm(u),mi(u),nb(),I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),l===null||l.child===null){var F=Sc(u);if(F)Tc(u);else if(l!==null){var W=l.memoizedState;(!W.isDehydrated||(u.flags&Ro)!==zt)&&(u.flags|=Zo,m())}}return Ug(l,u),Po(u),null}case K:{$y(u);var Q=mx(),ue=u.type;if(l!==null&&u.stateNode!=null)_b(l,u,ue,x,Q),l.ref!==u.ref&&X_(u);else{if(!x){if(u.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Po(u),null}var me=xg(),Oe=Sc(u);if(Oe)Xh(u,Q,me)&&Tc(u);else{var He=Zu(ue,x,Q,me,u);Fg(He,u,!1,!1),u.stateNode=He,Cl(He,ue,x,Q,me)&&Tc(u)}u.ref!==null&&X_(u)}return Po(u),null}case fe:{var Ze=x;if(l&&u.stateNode!=null){var ut=l.memoizedProps;Tb(l,u,ut,Ze)}else{if(typeof Ze!="string"&&u.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var lt=mx(),sn=xg(),kn=Sc(u);kn?jy(u)&&Tc(u):u.stateNode=El(Ze,lt,sn,u)}return Po(u),null}case le:{Rm(u);var vn=u.memoizedState;if(l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){var ei=zD(l,u,vn);if(!ei)return u.flags&di?u:null}if((u.flags&Yn)!==zt)return u.lanes=b,(u.mode&_n)!==mn&&Nx(u),u;var br=vn!==null,Ie=l!==null&&l.memoizedState!==null;if(br!==Ie&&br){var Ke=u.child;if(Ke.flags|=Jo,(u.mode&Vn)!==mn){var je=l===null&&(u.memoizedProps.unstable_avoidThisFallback!==!0||!D);je||gx(Cu.current,d_)?U6e():lM()}}var Ct=u.updateQueue;if(Ct!==null&&(u.flags|=hn),Po(u),(u.mode&_n)!==mn&&br){var en=u.child;en!==null&&(u.treeBaseDuration-=en.treeBaseDuration)}return null}case $:return jm(u),Ug(l,u),l===null&&Yv(u.stateNode.containerInfo),Po(u),null;case oe:var qt=u.type._context;return KS(qt,u),Po(u),null;case Ae:{var pr=u.type;return to(pr)&&wr(u),Po(u),null}case Me:{Rm(u);var Mn=u.memoizedState;if(Mn===null)return Po(u),null;var Pr=(u.flags&Yn)!==zt,ur=Mn.rendering;if(ur===null)if(Pr)Hg(Mn,!1);else{var Ti=V6e()&&(l===null||(l.flags&Yn)===zt);if(!Ti)for(var yn=u.child;yn!==null;){var ja=eb(yn);if(ja!==null){Pr=!0,u.flags|=Yn,Hg(Mn,!1);var Ls=ja.updateQueue;return Ls!==null&&(u.updateQueue=Ls,u.flags|=hn),u.subtreeFlags=zt,JO(u,b),Mf(u,yx(Cu.current,Cg)),u.child}yn=yn.sibling}Mn.tail!==null&&Yi()>bW()&&(u.flags|=Yn,Pr=!0,Hg(Mn,!1),u.lanes=mm)}else{if(!Pr){var fs=eb(ur);if(fs!==null){u.flags|=Yn,Pr=!0;var Pu=fs.updateQueue;if(Pu!==null&&(u.updateQueue=Pu,u.flags|=hn),Hg(Mn,!0),Mn.tail===null&&Mn.tailMode==="hidden"&&!ur.alternate&&!E())return Po(u),null}else Yi()*2-Mn.renderingStartTime>bW()&&b!==ba&&(u.flags|=Yn,Pr=!0,Hg(Mn,!1),u.lanes=mm)}if(Mn.isBackwards)ur.sibling=u.child,u.child=ur;else{var fl=Mn.last;fl!==null?fl.sibling=ur:u.child=ur,Mn.last=ur}}if(Mn.tail!==null){var hl=Mn.tail;Mn.rendering=hl,Mn.tail=hl.sibling,Mn.renderingStartTime=Yi(),hl.sibling=null;var zs=Cu.current;return Pr?zs=yx(zs,Cg):zs=Im(zs),Mf(u,zs),hl}return Po(u),null}case Te:break;case Xe:case Qe:{sM(u);var ap=u.memoizedState,jb=ap!==null;if(l!==null){var y2=l.memoizedState,Bf=y2!==null;Bf!==jb&&!P&&(u.flags|=Jo)}return!jb||(u.mode&Vn)===mn?Po(u):Gi(Lf,ba)&&(Po(u),ta&&u.subtreeFlags&(gr|hn)&&(u.flags|=Jo)),null}case vt:return null;case St:return null}throw new Error("Unknown unit of work tag ("+u.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function BD(l,u,b){switch(Yh(u),u.tag){case H:{var x=u.type;to(x)&&wr(u);var _=u.flags;return _&di?(u.flags=_&~di|Yn,(u.mode&_n)!==mn&&Nx(u),u):null}case J:{u.stateNode,jm(u),mi(u),nb();var I=u.flags;return(I&di)!==zt&&(I&Yn)===zt?(u.flags=I&~di|Yn,u):null}case K:return $y(u),null;case le:{Rm(u);var F=u.memoizedState;if(F!==null&&F.dehydrated!==null){if(u.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");h()}var W=u.flags;return W&di?(u.flags=W&~di|Yn,(u.mode&_n)!==mn&&Nx(u),u):null}case Me:return Rm(u),null;case $:return jm(u),null;case oe:var Q=u.type._context;return KS(Q,u),null;case Xe:case Qe:return sM(u),null;case vt:return null;default:return null}}function $_(l,u,b){switch(Yh(u),u.tag){case H:{var x=u.type.childContextTypes;x!=null&&wr(u);break}case J:{u.stateNode,jm(u),mi(u),nb();break}case K:{$y(u);break}case $:jm(u);break;case le:Rm(u);break;case Me:Rm(u);break;case oe:var _=u.type._context;KS(_,u);break;case Xe:case Qe:sM(u);break}}function eT(l,u,b,x,_,I,F,W,Q){var ue=Array.prototype.slice.call(arguments,3);try{u.apply(b,ue)}catch(me){this.onError(me)}}var tT=eT;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var a2=document.createElement("react");tT=function(u,b,x,_,I,F,W,Q,ue){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var me=document.createEvent("Event"),Oe=!1,He=!0,Ze=window.event,ut=Object.getOwnPropertyDescriptor(window,"event");function lt(){a2.removeEventListener(Ke,kn,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Ze)}var sn=Array.prototype.slice.call(arguments,3);function kn(){Oe=!0,lt(),b.apply(x,sn),He=!1}var vn,ei=!1,br=!1;function Ie(je){if(vn=je.error,ei=!0,vn===null&&je.colno===0&&je.lineno===0&&(br=!0),je.defaultPrevented&&vn!=null&&typeof vn=="object")try{vn._suppressLogging=!0}catch{}}var Ke="react-"+(u||"invokeguardedcallback");if(window.addEventListener("error",Ie),a2.addEventListener(Ke,kn,!1),me.initEvent(Ke,!1,!1),a2.dispatchEvent(me),ut&&Object.defineProperty(window,"event",ut),Oe&&He&&(ei?br&&(vn=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):vn=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(vn)),window.removeEventListener("error",Ie),!Oe)return lt(),eT.apply(this,arguments)}}var FD=tT,Vg=!1,kb=null,UD={onError:function(l){Vg=!0,kb=l}};function f(l,u,b,x,_,I,F,W,Q){Vg=!1,kb=null,FD.apply(UD,arguments)}function y(){return Vg}function T(){if(Vg){var l=kb;return Vg=!1,kb=null,l}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var N=null;N=new Set;var V=!1,Z=!1,ce=typeof WeakSet=="function"?WeakSet:Set,se=null,Ee=null,We=null;function et(l){f(null,function(){throw l}),T()}var ft=function(l,u){if(u.props=l.memoizedProps,u.state=l.memoizedState,l.mode&_n)try{_c(),u.componentWillUnmount()}finally{Ec(l)}else u.componentWillUnmount()};function Nt(l,u){try{Go(Ya,l)}catch(b){li(l,u,b)}}function $t(l,u,b){try{ft(l,b)}catch(x){li(l,u,x)}}function wn(l,u,b){try{b.componentDidMount()}catch(x){li(l,u,x)}}function qn(l,u){try{aW(l)}catch(b){li(l,u,b)}}function fn(l,u){var b=l.ref;if(b!==null)if(typeof b=="function"){var x;try{if(L&&z&&l.mode&_n)try{_c(),x=b(null)}finally{Ec(l)}else x=b(null)}catch(_){li(l,u,_)}typeof x=="function"&&d("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",jt(l))}else b.current=null}function Jn(l,u,b){try{b()}catch(x){li(l,u,x)}}var dr=!1;function ul(l,u){za(l.containerInfo),se=u,us();var b=dr;return dr=!1,b}function us(){for(;se!==null;){var l=se,u=l.child;(l.subtreeFlags&Ln)!==zt&&u!==null?(u.return=l,se=u):cl()}}function cl(){for(;se!==null;){var l=se;Cr(l);try{_a(l)}catch(b){li(l,l.return,b)}or();var u=l.sibling;if(u!==null){u.return=l.return,se=u;return}se=l.return}}function _a(l){var u=l.alternate,b=l.flags;if((b&Zo)!==zt){switch(Cr(l),l.tag){case U:case ie:case de:break;case H:{if(u!==null){var x=u.memoizedProps,_=u.memoizedState,I=l.stateNode;l.type===l.elementType&&!Hl&&(I.props!==l.memoizedProps&&d("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",jt(l)||"instance"),I.state!==l.memoizedState&&d("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",jt(l)||"instance"));var F=I.getSnapshotBeforeUpdate(l.elementType===l.type?x:xu(l.type,x),_);{var W=N;F===void 0&&!W.has(l.type)&&(W.add(l.type),d("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",jt(l)))}I.__reactInternalSnapshotBeforeUpdate=F}break}case J:{if(ta){var Q=l.stateNode;Kn(Q.containerInfo)}break}case K:case fe:case $:case Ae:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}or()}}function Ta(l,u,b){var x=u.updateQueue,_=x!==null?x.lastEffect:null;if(_!==null){var I=_.next,F=I;do{if((F.tag&l)===l){var W=F.destroy;F.destroy=void 0,W!==void 0&&((l&_o)!==js?Xi(u):(l&Ya)!==js&&Qi(u),(l&xc)!==js&&g2(!0),Jn(u,b,W),(l&xc)!==js&&g2(!1),(l&_o)!==js?Ca():(l&Ya)!==js&&ad())}F=F.next}while(F!==I)}}function Go(l,u){var b=u.updateQueue,x=b!==null?b.lastEffect:null;if(x!==null){var _=x.next,I=_;do{if((I.tag&l)===l){(l&_o)!==js?Qn(u):(l&Ya)!==js&&ns(u);var F=I.create;(l&xc)!==js&&g2(!0),I.destroy=F(),(l&xc)!==js&&g2(!1),(l&_o)!==js?Da():(l&Ya)!==js&&mc();{var W=I.destroy;if(W!==void 0&&typeof W!="function"){var Q=void 0;(I.tag&Ya)!==zt?Q="useLayoutEffect":(I.tag&xc)!==zt?Q="useInsertionEffect":Q="useEffect";var ue=void 0;W===null?ue=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof W.then=="function"?ue=` It looks like you wrote `+Q+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately: `+Q+`(() => { async function fetchData() { // You can await here const response = await MyAPI.getData(someId); // ... } fetchData(); }, [someId]); // Or [] if effect doesn't need props or state Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:ue=" You returned: "+W,d("%s must not return anything besides a function, which is used for clean-up.%s",Q,ue)}}}I=I.next}while(I!==_)}}function nT(l,u){if((u.flags&hn)!==zt)switch(u.tag){case re:{var b=u.stateNode.passiveEffectDuration,x=u.memoizedProps,_=x.id,I=x.onPostCommit,F=j_(),W=u.alternate===null?"mount":"update";M_()&&(W="nested-update"),typeof I=="function"&&I(_,W,b,F);var Q=u.return;e:for(;Q!==null;){switch(Q.tag){case J:var ue=Q.stateNode;ue.passiveEffectDuration+=b;break e;case re:var me=Q.stateNode;me.passiveEffectDuration+=b;break e}Q=Q.return}break}}}function LMe(l,u,b,x){if((b.flags&Dr)!==zt)switch(b.tag){case U:case ie:case de:{if(!Z)if(b.mode&_n)try{_c(),Go(Ya|qa,b)}finally{Ec(b)}else Go(Ya|qa,b);break}case H:{var _=b.stateNode;if(b.flags&hn&&!Z)if(u===null)if(b.type===b.elementType&&!Hl&&(_.props!==b.memoizedProps&&d("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",jt(b)||"instance"),_.state!==b.memoizedState&&d("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",jt(b)||"instance")),b.mode&_n)try{_c(),_.componentDidMount()}finally{Ec(b)}else _.componentDidMount();else{var I=b.elementType===b.type?u.memoizedProps:xu(b.type,u.memoizedProps),F=u.memoizedState;if(b.type===b.elementType&&!Hl&&(_.props!==b.memoizedProps&&d("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",jt(b)||"instance"),_.state!==b.memoizedState&&d("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",jt(b)||"instance")),b.mode&_n)try{_c(),_.componentDidUpdate(I,F,_.__reactInternalSnapshotBeforeUpdate)}finally{Ec(b)}else _.componentDidUpdate(I,F,_.__reactInternalSnapshotBeforeUpdate)}var W=b.updateQueue;W!==null&&(b.type===b.elementType&&!Hl&&(_.props!==b.memoizedProps&&d("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",jt(b)||"instance"),_.state!==b.memoizedState&&d("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",jt(b)||"instance")),$E(b,W,_));break}case J:{var Q=b.updateQueue;if(Q!==null){var ue=null;if(b.child!==null)switch(b.child.tag){case K:ue=_r(b.child.stateNode);break;case H:ue=b.child.stateNode;break}$E(b,Q,ue)}break}case K:{var me=b.stateNode;if(u===null&&b.flags&hn){var Oe=b.type,He=b.memoizedProps;Zp(me,Oe,He,b)}break}case fe:break;case $:break;case re:{{var Ze=b.memoizedProps,ut=Ze.onCommit,lt=Ze.onRender,sn=b.stateNode.effectDuration,kn=j_(),vn=u===null?"mount":"update";M_()&&(vn="nested-update"),typeof lt=="function"&<(b.memoizedProps.id,vn,b.actualDuration,b.treeBaseDuration,b.actualStartTime,kn);{typeof ut=="function"&&ut(b.memoizedProps.id,vn,sn,kn),K6e(b);var ei=b.return;e:for(;ei!==null;){switch(ei.tag){case J:var br=ei.stateNode;br.effectDuration+=sn;break e;case re:var Ie=ei.stateNode;Ie.effectDuration+=sn;break e}ei=ei.return}}}break}case le:{qMe(l,b);break}case Me:case Ae:case Te:case Xe:case Qe:case St:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Z||b.flags&uo&&aW(b)}function zMe(l){switch(l.tag){case U:case ie:case de:{if(l.mode&_n)try{_c(),Nt(l,l.return)}finally{Ec(l)}else Nt(l,l.return);break}case H:{var u=l.stateNode;typeof u.componentDidMount=="function"&&wn(l,l.return,u),qn(l,l.return);break}case K:{qn(l,l.return);break}}}function BMe(l,u){var b=null;if(ta)for(var x=l;;){if(x.tag===K){if(b===null){b=x;try{var _=x.stateNode;u?ae(_):Le(x.stateNode,x.memoizedProps)}catch(F){li(l,l.return,F)}}}else if(x.tag===fe){if(b===null)try{var I=x.stateNode;u?ve(I):Bt(I,x.memoizedProps)}catch(F){li(l,l.return,F)}}else if(!((x.tag===Xe||x.tag===Qe)&&x.memoizedState!==null&&x!==l)){if(x.child!==null){x.child.return=x,x=x.child;continue}}if(x===l)return;for(;x.sibling===null;){if(x.return===null||x.return===l)return;b===x&&(b=null),x=x.return}b===x&&(b=null),x.sibling.return=x.return,x=x.sibling}}function aW(l){var u=l.ref;if(u!==null){var b=l.stateNode,x;switch(l.tag){case K:x=_r(b);break;default:x=b}if(typeof u=="function"){var _;if(l.mode&_n)try{_c(),_=u(x)}finally{Ec(l)}else _=u(x);typeof _=="function"&&d("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",jt(l))}else u.hasOwnProperty("current")||d("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",jt(l)),u.current=x}}function FMe(l){var u=l.alternate;u!==null&&(u.return=null),l.return=null}function oW(l){var u=l.alternate;u!==null&&(l.alternate=null,oW(u));{if(l.child=null,l.deletions=null,l.sibling=null,l.tag===K){var b=l.stateNode;b!==null&&$d(b)}l.stateNode=null,l._debugOwner=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}}function UMe(l){if(ho){var u=l.stateNode,b=u.containerInfo,x=pn(b);na(b,x)}}function HMe(l){for(var u=l.return;u!==null;){if(sW(u))return u;u=u.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function sW(l){return l.tag===K||l.tag===J||l.tag===$}function lW(l){var u=l;e:for(;;){for(;u.sibling===null;){if(u.return===null||sW(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==K&&u.tag!==fe&&u.tag!==_e;){if(u.flags&gr||u.child===null||u.tag===$)continue e;u.child.return=u,u=u.child}if(!(u.flags&gr))return u.stateNode}}function VMe(l){if(ta){var u=HMe(l);switch(u.tag){case K:{var b=u.stateNode;u.flags&qs&&(em(b),u.flags&=~qs);var x=lW(l);VD(l,x,b);break}case J:case $:{var _=u.stateNode.containerInfo,I=lW(l);HD(l,I,_);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function HD(l,u,b){var x=l.tag,_=x===K||x===fe;if(_){var I=l.stateNode;u?Tr(b,I,u):hi(b,I)}else if(x!==$){var F=l.child;if(F!==null){HD(F,u,b);for(var W=F.sibling;W!==null;)HD(W,u,b),W=W.sibling}}}function VD(l,u,b){var x=l.tag,_=x===K||x===fe;if(_){var I=l.stateNode;u?Jp(b,I,u):Qs(b,I)}else if(x!==$){var F=l.child;if(F!==null){VD(F,u,b);for(var W=F.sibling;W!==null;)VD(W,u,b),W=W.sibling}}}var cs=null,md=!1;function GMe(l,u,b){if(ta){var x=u;e:for(;x!==null;){switch(x.tag){case K:{cs=x.stateNode,md=!1;break e}case J:{cs=x.stateNode.containerInfo,md=!0;break e}case $:{cs=x.stateNode.containerInfo,md=!0;break e}}x=x.return}if(cs===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");GD(l,u,b),cs=null,md=!1}else GD(l,u,b);FMe(b)}function Rf(l,u,b){for(var x=b.child;x!==null;)GD(l,u,x),x=x.sibling}function GD(l,u,b){switch(sg(b),b.tag){case K:Z||fn(b,u);case fe:{if(ta){var x=cs,_=md;cs=null,Rf(l,u,b),cs=x,md=_,cs!==null&&(md?$p(cs,b.stateNode):nr(cs,b.stateNode))}else Rf(l,u,b);return}case _e:{ta&&cs!==null&&(md?af(cs,b.stateNode):Sy(cs,b.stateNode));return}case $:{if(ta){var I=cs,F=md;cs=b.stateNode.containerInfo,md=!0,Rf(l,u,b),cs=I,md=F}else UMe(b),Rf(l,u,b);return}case U:case ie:case ee:case de:{if(!Z){var W=b.updateQueue;if(W!==null){var Q=W.lastEffect;if(Q!==null){var ue=Q.next,me=ue;do{var Oe=me,He=Oe.destroy,Ze=Oe.tag;He!==void 0&&((Ze&xc)!==js?Jn(b,u,He):(Ze&Ya)!==js&&(Qi(b),b.mode&_n?(_c(),Jn(b,u,He),Ec(b)):Jn(b,u,He),ad())),me=me.next}while(me!==ue)}}}Rf(l,u,b);return}case H:{if(!Z){fn(b,u);var ut=b.stateNode;typeof ut.componentWillUnmount=="function"&&$t(b,u,ut)}Rf(l,u,b);return}case Te:{Rf(l,u,b);return}case Xe:{if(b.mode&Vn){var lt=Z;Z=lt||b.memoizedState!==null,Rf(l,u,b),Z=lt}else Rf(l,u,b);break}default:{Rf(l,u,b);return}}}function WMe(l){l.memoizedState}function qMe(l,u){if(ga){var b=u.memoizedState;if(b===null){var x=u.alternate;if(x!==null){var _=x.memoizedState;if(_!==null){var I=_.dehydrated;I!==null&&Eh(I)}}}}}function uW(l){var u=l.updateQueue;if(u!==null){l.updateQueue=null;var b=l.stateNode;b===null&&(b=l.stateNode=new ce),u.forEach(function(x){var _=tje.bind(null,l,x);if(!b.has(x)){if(b.add(x),Fo)if(Ee!==null&&We!==null)v2(We,Ee);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");x.then(_,_)}})}}function YMe(l,u,b){Ee=b,We=l,Cr(u),cW(u,l),Cr(u),Ee=null,We=null}function vd(l,u,b){var x=u.deletions;if(x!==null)for(var _=0;_=0)return!0}break;case oT:if(l.tag===K){var _=l.memoizedProps["data-testname"];if(typeof _=="string"&&_.toLowerCase()===u.value.toLowerCase())return!0}break;default:throw new Error("Invalid selector type specified.")}return!1}function KD(l){switch(l.$$typeof){case rT:var u=Ft(l.value)||"Unknown";return"<"+u+">";case iT:return":has("+(KD(l)||"")+")";case aT:return'[role="'+l.value+'"]';case sT:return'"'+l.value+'"';case oT:return'[data-testname="'+l.value+'"]';default:throw new Error("Invalid selector type specified.")}}function pW(l,u){for(var b=[],x=[l,0],_=0;_x&&(x=Q)),Q ")+` `)+`No matching component was found for: `+(" "+Oe.join(" > "))}return null}function b6e(l,u){if(!po)throw new Error("Test selector API is not supported by this renderer.");for(var b=lT(l,u),x=[],_=0;_0;I--)for(var F=x[I],W=F.x,Q=W+F.width,ue=F.y,me=ue+F.height,Oe=I-1;Oe>=0;Oe--)if(I!==Oe){var He=x[Oe],Ze=He.x,ut=Ze+He.width,lt=He.y,sn=lt+He.height;if(W>=Ze&&ue>=lt&&Q<=ut&&me<=sn){x.splice(I,1);break}else if(W===Ze&&F.width===He.width&&!(snme)){lt>ue&&(He.height+=lt-ue,He.y=ue),snQ)){Ze>W&&(He.width+=Ze-W,He.x=W),ut=0&&uT.splice(me,1),F()}}}var C6e=a.ReactCurrentActQueue;function E6e(l){{var u=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,b=typeof jest<"u";return bh&&b&&u!==!1}}function mW(){{var l=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!l&&C6e.current!==null&&d("The current testing environment is not configured to support act(...)"),l}}var _6e=Math.ceil,XD=a.ReactCurrentDispatcher,QD=a.ReactCurrentOwner,ka=a.ReactCurrentBatchConfig,gd=a.ReactCurrentActQueue,ro=0,ZD=1,ds=2,kc=4,rp=0,s2=1,Gg=2,cT=3,l2=4,vW=5,JD=6,ir=ro,dl=null,Pa=null,Ao=tt,Lf=tt,$D=ge(tt),Oo=rp,u2=null,dT=tt,c2=tt,fT=tt,d2=null,Vl=null,eM=0,gW=500,yW=1/0,T6e=500,ip=null;function Pb(){yW=Yi()+T6e}function bW(){return yW}var hT=!1,tM=null,Ab=null,Wg=!1,zm=null,f2=tt,nM=[],rM=null,k6e=50,h2=0,iM=null,aM=!1,pT=!1,P6e=50,Ob=0,mT=null,p2=Xn,vT=tt,SW=!1;function gT(){return dl}function Ns(){return(ir&(ds|kc))!==ro?Yi():(p2!==Xn||(p2=Yi()),p2)}function Bm(l){var u=l.mode;if((u&Vn)===mn)return dn;if((ir&ds)!==ro&&Ao!==tt)return nd(Ao);var b=ne()!==B;if(b){if(ka.transition!==null){var x=ka.transition;x._updatedFibers||(x._updatedFibers=new Set),x._updatedFibers.add(l)}return vT===oi&&(vT=Bh()),vT}var _=Bo();if(_!==oi)return _;var I=Jd();return I}function A6e(l){var u=l.mode;return(u&Vn)===mn?dn:HS()}function io(l,u,b,x){rje(),SW&&d("useInsertionEffect must not schedule updates."),aM&&(pT=!0),rd(l,b,x),(ir&ds)!==tt&&l===dl?oje(u):(Fo&&aa(l,u,b),sje(u),l===dl&&((ir&ds)===ro&&(c2=Qt(c2,b)),Oo===l2&&Fm(l,Ao)),Gl(l,x),b===dn&&ir===ro&&(u.mode&Vn)===mn&&!gd.isBatchingLegacy&&(Pb(),Ga()))}function O6e(l,u,b){var x=l.current;x.lanes=u,rd(l,u,b),Gl(l,b)}function D6e(l){return(ir&ds)!==ro}function Gl(l,u){var b=l.callbackNode;Ty(l,u);var x=Lh(l,l===dl?Ao:tt);if(x===tt){b!==null&&RW(b),l.callbackNode=null,l.callbackPriority=oi;return}var _=uc(x),I=l.callbackPriority;if(I===_&&!(gd.current!==null&&b!==dM)){b==null&&I!==dn&&d("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}b!=null&&RW(b);var F;if(_===dn)l.tag===Vi?(gd.isBatchingLegacy!==null&&(gd.didScheduleLegacyUpdate=!0),xm(CW.bind(null,l))):_f(CW.bind(null,l)),Sh?gd.current!==null?gd.current.push(Nr):ef(function(){(ir&(ds|kc))===ro&&Nr()}):CT(xo,Nr),F=null;else{var W;switch(ym(x)){case bo:W=xo;break;case So:W=Ps;break;case fc:W=Va;break;case fu:W=Vh;break;default:W=Va;break}F=CT(W,xW.bind(null,l))}l.callbackPriority=_,l.callbackNode=F}function xW(l,u){if(sD(),p2=Xn,vT=tt,(ir&(ds|kc))!==ro)throw new Error("Should not already be working.");var b=l.callbackNode,x=zf();if(x&&l.callbackNode!==b)return null;var _=Lh(l,l===dl?Ao:tt);if(_===tt)return null;var I=!mf(l,_)&&!Oy(l,_)&&!u,F=I?W6e(l,_):ST(l,_);if(F!==rp){if(F===Gg){var W=zh(l);W!==tt&&(_=W,F=oM(l,W))}if(F===s2){var Q=u2;throw qg(l,tt),Fm(l,_),Gl(l,Yi()),Q}if(F===JD)Fm(l,_);else{var ue=!mf(l,_),me=l.current.alternate;if(ue&&!j6e(me)){if(F=ST(l,_),F===Gg){var Oe=zh(l);Oe!==tt&&(_=Oe,F=oM(l,Oe))}if(F===s2){var He=u2;throw qg(l,tt),Fm(l,_),Gl(l,Yi()),He}}l.finishedWork=me,l.finishedLanes=_,M6e(l,F,_)}}return Gl(l,Yi()),l.callbackNode===b?xW.bind(null,l):null}function oM(l,u){var b=d2;if(rs(l)){var x=qg(l,u);x.flags|=Ro,lf(l.containerInfo)}var _=ST(l,u);if(_!==Gg){var I=Vl;Vl=b,I!==null&&wW(I)}return _}function wW(l){Vl===null?Vl=l:Vl.push.apply(Vl,l)}function M6e(l,u,b){switch(u){case rp:case s2:throw new Error("Root did not complete. This is a bug in React.");case Gg:{Yg(l,Vl,ip);break}case cT:{if(Fm(l,b),rg(b)&&!NW()){var x=eM+gW-Yi();if(x>10){var _=Lh(l,tt);if(_!==tt)break;var I=l.suspendedLanes;if(!vf(I,b)){Ns(),Ha(l,I);break}l.timeoutHandle=Qd(Yg.bind(null,l,Vl,ip),x);break}}Yg(l,Vl,ip);break}case l2:{if(Fm(l,b),ig(b))break;if(!NW()){var F=lc(l,b),W=F,Q=Yi()-W,ue=nje(Q)-Q;if(ue>10){l.timeoutHandle=Qd(Yg.bind(null,l,Vl,ip),ue);break}}Yg(l,Vl,ip);break}case vW:{Yg(l,Vl,ip);break}default:throw new Error("Unknown root exit status.")}}function j6e(l){for(var u=l;;){if(u.flags&tu){var b=u.updateQueue;if(b!==null){var x=b.stores;if(x!==null)for(var _=0;_0&&(v2(l,Ao),_.clear()),Dy(l,u)}ip=Vt(),qg(l,u)}Gh(u);do try{G6e();break}catch(I){EW(l,I)}while(!0);if(Ly(),ir=b,TW(x),Pa!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return vu(),dl=null,Ao=tt,Oo}function G6e(){for(;Pa!==null;)kW(Pa)}function W6e(l,u){var b=ir;ir|=ds;var x=_W();if(dl!==l||Ao!==u){if(Fo){var _=l.memoizedUpdaters;_.size>0&&(v2(l,Ao),_.clear()),Dy(l,u)}ip=Vt(),Pb(),qg(l,u)}Gh(u);do try{q6e();break}catch(I){EW(l,I)}while(!0);return Ly(),TW(x),ir=b,Pa!==null?(mu(),rp):(vu(),dl=null,Ao=tt,Oo)}function q6e(){for(;Pa!==null&&!il();)kW(Pa)}function kW(l){var u=l.alternate;Cr(l);var b;(l.mode&_n)!==mn?(Rx(l),b=uM(u,l,Lf),yb(l,!0)):b=uM(u,l,Lf),or(),l.memoizedProps=l.pendingProps,b===null?PW(l):Pa=b,QD.current=null}function PW(l){var u=l;do{var b=u.alternate,x=u.return;if((u.flags&nu)===zt){Cr(u);var _=void 0;if((u.mode&_n)===mn?_=J_(b,u,Lf):(Rx(u),_=J_(b,u,Lf),yb(u,!1)),or(),_!==null){Pa=_;return}}else{var I=BD(b,u);if(I!==null){I.flags&=Hc,Pa=I;return}if((u.mode&_n)!==mn){yb(u,!1);for(var F=u.actualDuration,W=u.child;W!==null;)F+=W.actualDuration,W=W.sibling;u.actualDuration=F}if(x!==null)x.flags|=nu,x.subtreeFlags=zt,x.deletions=null;else{Oo=JD,Pa=null;return}}var Q=u.sibling;if(Q!==null){Pa=Q;return}u=x,Pa=u}while(u!==null);Oo===rp&&(Oo=vW)}function Yg(l,u,b){var x=Bo(),_=ka.transition;try{ka.transition=null,Wi(bo),Y6e(l,u,b,x)}finally{ka.transition=_,Wi(x)}return null}function Y6e(l,u,b,x){do zf();while(zm!==null);if(ije(),(ir&(ds|kc))!==ro)throw new Error("Should not already be working.");var _=l.finishedWork,I=l.finishedLanes;if(GS(I),_===null)return id(),null;if(I===tt&&d("root.finishedLanes should not be empty during a commit. This is a bug in React."),l.finishedWork=null,l.finishedLanes=tt,_===l.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");l.callbackNode=null,l.callbackPriority=oi;var F=Qt(_.lanes,_.childLanes);VS(l,F),l===dl&&(dl=null,Pa=null,Ao=tt),((_.subtreeFlags&Mr)!==zt||(_.flags&Mr)!==zt)&&(Wg||(Wg=!0,rM=b,CT(Va,function(){return zf(),null})));var W=(_.subtreeFlags&(Ln|Ei|Dr|Mr))!==zt,Q=(_.flags&(Ln|Ei|Dr|Mr))!==zt;if(W||Q){var ue=ka.transition;ka.transition=null;var me=Bo();Wi(bo);var Oe=ir;ir|=kc,QD.current=null,ul(l,_),I_(),YMe(l,_,I),Xs(l.containerInfo),l.current=_,ug(I),KMe(_,l,I),Cf(),xa(),ir=Oe,Wi(me),ka.transition=ue}else l.current=_,I_();var He=Wg;if(Wg?(Wg=!1,zm=l,f2=I):(Ob=0,mT=null),F=l.pendingLanes,F===tt&&(Ab=null),He||MW(l.current,!1),pu(_.stateNode,x),Fo&&l.memoizedUpdaters.clear(),x6e(),Gl(l,Yi()),u!==null)for(var Ze=l.onRecoverableError,ut=0;utk6e)throw h2=0,iM=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Ob>P6e&&(Ob=0,mT=null,d("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function ije(){Ue.flushLegacyContextWarning(),Ue.flushPendingUnsafeLifecycleWarnings()}function MW(l,u){Cr(l),xT(l,An,c6e),u&&xT(l,Fn,d6e),xT(l,An,l6e),u&&xT(l,Fn,u6e),or()}function xT(l,u,b){for(var x=l,_=null;x!==null;){var I=x.subtreeFlags&u;x!==_&&x.child!==null&&I!==zt?x=x.child:((x.flags&u)!==zt&&b(x),x.sibling!==null?x=x.sibling:x=_=x.return)}}var wT=null;function jW(l){{if((ir&ds)!==ro||!(l.mode&Vn))return;var u=l.tag;if(u!==q&&u!==J&&u!==H&&u!==U&&u!==ie&&u!==ee&&u!==de)return;var b=jt(l)||"ReactComponent";if(wT!==null){if(wT.has(b))return;wT.add(b)}else wT=new Set([b]);var x=un;try{Cr(l),d("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{x?Cr(l):or()}}}var uM;{var aje=null;uM=function(l,u,b){var x=UW(aje,u);try{return Eb(l,u,b)}catch(I){if(Co()||I!==null&&typeof I=="object"&&typeof I.then=="function")throw I;if(Ly(),p_(),$_(l,u),UW(u,x),u.mode&_n&&Rx(u),f(null,Eb,null,l,u,b),y()){var _=T();typeof _=="object"&&_!==null&&_._suppressLogging&&typeof I=="object"&&I!==null&&!I._suppressLogging&&(I._suppressLogging=!0)}throw I}}}var IW=!1,cM;cM=new Set;function oje(l){if(Mt&&!Og())switch(l.tag){case U:case ie:case de:{var u=Pa&&jt(Pa)||"Unknown",b=u;if(!cM.has(b)){cM.add(b);var x=jt(l)||"Unknown";d("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",x,u,u)}break}case H:{IW||(d("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),IW=!0);break}}}function v2(l,u){if(Fo){var b=l.memoizedUpdaters;b.forEach(function(x){aa(l,x,u)})}}var dM={};function CT(l,u){{var b=gd.current;return b!==null?(b.push(u),dM):qi(l,u)}}function RW(l){if(l!==dM)return rl(l)}function NW(){return gd.current!==null}function sje(l){{if(l.mode&Vn){if(!mW())return}else if(!E6e()||ir!==ro||l.tag!==U&&l.tag!==ie&&l.tag!==de)return;if(gd.current===null){var u=un;try{Cr(l),d(`An update to %s inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,jt(l))}finally{u?Cr(l):or()}}}}function lje(l){l.tag!==Vi&&mW()&&gd.current===null&&d(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...). When testing, code that resolves suspended data should be wrapped into act(...): act(() => { /* finish loading suspended data */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function g2(l){SW=l}var Pc=null,Db=null,uje=function(l){Pc=l};function Mb(l){{if(Pc===null)return l;var u=Pc(l);return u===void 0?l:u.current}}function fM(l){return Mb(l)}function hM(l){{if(Pc===null)return l;var u=Pc(l);if(u===void 0){if(l!=null&&typeof l.render=="function"){var b=Mb(l.render);if(l.render!==b){var x={$$typeof:Rn,render:b};return l.displayName!==void 0&&(x.displayName=l.displayName),x}}return l}return u.current}}function LW(l,u){{if(Pc===null)return!1;var b=l.elementType,x=u.type,_=!1,I=typeof x=="object"&&x!==null?x.$$typeof:null;switch(l.tag){case H:{typeof x=="function"&&(_=!0);break}case U:{(typeof x=="function"||I===at)&&(_=!0);break}case ie:{(I===Rn||I===at)&&(_=!0);break}case ee:case de:{(I===it||I===at)&&(_=!0);break}default:return!1}if(_){var F=Pc(b);if(F!==void 0&&F===Pc(x))return!0}return!1}}function zW(l){{if(Pc===null||typeof WeakSet!="function")return;Db===null&&(Db=new WeakSet),Db.add(l)}}var cje=function(l,u){{if(Pc===null)return;var b=u.staleFamilies,x=u.updatedFamilies;zf(),yT(function(){pM(l.current,x,b)})}},dje=function(l,u){{if(l.context!==nn)return;zf(),yT(function(){GW(u,l,null,null)})}};function pM(l,u,b){{var x=l.alternate,_=l.child,I=l.sibling,F=l.tag,W=l.type,Q=null;switch(F){case U:case de:case H:Q=W;break;case ie:Q=W.render;break}if(Pc===null)throw new Error("Expected resolveFamily to be set during hot reload.");var ue=!1,me=!1;if(Q!==null){var Oe=Pc(Q);Oe!==void 0&&(b.has(Oe)?me=!0:u.has(Oe)&&(F===H?me=!0:ue=!0))}if(Db!==null&&(Db.has(l)||x!==null&&Db.has(x))&&(me=!0),me&&(l._debugNeedsRemount=!0),me||ue){var He=Ho(l,dn);He!==null&&io(He,l,dn,Xn)}_!==null&&!me&&pM(_,u,b),I!==null&&pM(I,u,b)}}var fje=function(l,u){{var b=new Set,x=new Set(u.map(function(_){return _.current}));return mM(l.current,x,b),b}};function mM(l,u,b){{var x=l.child,_=l.sibling,I=l.tag,F=l.type,W=null;switch(I){case U:case de:case H:W=F;break;case ie:W=F.render;break}var Q=!1;W!==null&&u.has(W)&&(Q=!0),Q?hje(l,b):x!==null&&mM(x,u,b),_!==null&&mM(_,u,b)}}function hje(l,u){{var b=pje(l,u);if(b)return;for(var x=l;;){switch(x.tag){case K:u.add(x.stateNode);return;case $:u.add(x.stateNode.containerInfo);return;case J:u.add(x.stateNode.containerInfo);return}if(x.return===null)throw new Error("Expected to reach root first.");x=x.return}}}function pje(l,u){for(var b=l,x=!1;;){if(b.tag===K)x=!0,u.add(b.stateNode);else if(b.child!==null){b.child.return=b,b=b.child;continue}if(b===l)return x;for(;b.sibling===null;){if(b.return===null||b.return===l)return x;b=b.return}b.sibling.return=b.return,b=b.sibling}return!1}var vM;{vM=!1;try{var BW=Object.preventExtensions({})}catch{vM=!0}}function mje(l,u,b,x){this.tag=l,this.key=b,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=u,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=x,this.flags=zt,this.subtreeFlags=zt,this.deletions=null,this.lanes=tt,this.childLanes=tt,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!vM&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var ku=function(l,u,b,x){return new mje(l,u,b,x)};function gM(l){var u=l.prototype;return!!(u&&u.isReactComponent)}function vje(l){return typeof l=="function"&&!gM(l)&&l.defaultProps===void 0}function gje(l){if(typeof l=="function")return gM(l)?H:U;if(l!=null){var u=l.$$typeof;if(u===Rn)return ie;if(u===it)return ee}return q}function Kg(l,u){var b=l.alternate;b===null?(b=ku(l.tag,u,l.key,l.mode),b.elementType=l.elementType,b.type=l.type,b.stateNode=l.stateNode,b._debugSource=l._debugSource,b._debugOwner=l._debugOwner,b._debugHookTypes=l._debugHookTypes,b.alternate=l,l.alternate=b):(b.pendingProps=u,b.type=l.type,b.flags=zt,b.subtreeFlags=zt,b.deletions=null,b.actualDuration=0,b.actualStartTime=-1),b.flags=l.flags&fi,b.childLanes=l.childLanes,b.lanes=l.lanes,b.child=l.child,b.memoizedProps=l.memoizedProps,b.memoizedState=l.memoizedState,b.updateQueue=l.updateQueue;var x=l.dependencies;switch(b.dependencies=x===null?null:{lanes:x.lanes,firstContext:x.firstContext},b.sibling=l.sibling,b.index=l.index,b.ref=l.ref,b.selfBaseDuration=l.selfBaseDuration,b.treeBaseDuration=l.treeBaseDuration,b._debugNeedsRemount=l._debugNeedsRemount,b.tag){case q:case U:case de:b.type=Mb(l.type);break;case H:b.type=fM(l.type);break;case ie:b.type=hM(l.type);break}return b}function yje(l,u){l.flags&=fi|gr;var b=l.alternate;if(b===null)l.childLanes=tt,l.lanes=u,l.child=null,l.subtreeFlags=zt,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null,l.selfBaseDuration=0,l.treeBaseDuration=0;else{l.childLanes=b.childLanes,l.lanes=b.lanes,l.child=b.child,l.subtreeFlags=zt,l.deletions=null,l.memoizedProps=b.memoizedProps,l.memoizedState=b.memoizedState,l.updateQueue=b.updateQueue,l.type=b.type;var x=b.dependencies;l.dependencies=x===null?null:{lanes:x.lanes,firstContext:x.firstContext},l.selfBaseDuration=b.selfBaseDuration,l.treeBaseDuration=b.treeBaseDuration}return l}function bje(l,u,b){var x;return l===um?(x=Vn,u===!0&&(x|=cr,x|=yo)):x=mn,Fo&&(x|=_n),ku(J,null,null,x)}function yM(l,u,b,x,_,I){var F=q,W=l;if(typeof l=="function")gM(l)?(F=H,W=fM(W)):W=Mb(W);else if(typeof l=="string")F=K;else{e:switch(l){case Lt:return Um(b.children,_,I,u);case De:F=G,_|=cr,(_&Vn)!==mn&&(_|=yo);break;case wt:return Sje(b,_,I,u);case ar:return xje(b,_,I,u);case xe:return wje(b,_,I,u);case ot:return FW(b,_,I,u);case Jt:case bt:case rn:case $e:case Ve:default:{if(typeof l=="object"&&l!==null)switch(l.$$typeof){case ln:F=oe;break e;case Wt:F=te;break e;case Rn:F=ie,W=hM(W);break e;case it:F=ee;break e;case at:F=Re,W=null;break e}var Q="";{(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(Q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ue=x?jt(x):null;ue&&(Q+=` Check the render method of \``+ue+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(l==null?l:typeof l)+"."+Q))}}}var me=ku(F,b,u,_);return me.elementType=l,me.type=W,me.lanes=I,me._debugOwner=x,me}function bM(l,u,b){var x=null;x=l._owner;var _=l.type,I=l.key,F=l.props,W=yM(_,I,F,x,u,b);return W._debugSource=l._source,W._debugOwner=l._owner,W}function Um(l,u,b,x){var _=ku(X,l,x,u);return _.lanes=b,_}function Sje(l,u,b,x){typeof l.id!="string"&&d('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof l.id);var _=ku(re,l,x,u|_n);return _.elementType=wt,_.lanes=b,_.stateNode={effectDuration:0,passiveEffectDuration:0},_}function xje(l,u,b,x){var _=ku(le,l,x,u);return _.elementType=ar,_.lanes=b,_}function wje(l,u,b,x){var _=ku(Me,l,x,u);return _.elementType=xe,_.lanes=b,_}function FW(l,u,b,x){var _=ku(Xe,l,x,u);_.elementType=ot,_.lanes=b;var I={isHidden:!1};return _.stateNode=I,_}function SM(l,u,b){var x=ku(fe,l,null,u);return x.lanes=b,x}function Cje(){var l=ku(K,null,null,mn);return l.elementType="DELETED",l}function Eje(l){var u=ku(_e,null,null,mn);return u.stateNode=l,u}function xM(l,u,b){var x=l.children!==null?l.children:[],_=ku($,x,l.key,u);return _.lanes=b,_.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},_}function UW(l,u){return l===null&&(l=ku(q,null,null,mn)),l.tag=u.tag,l.key=u.key,l.elementType=u.elementType,l.type=u.type,l.stateNode=u.stateNode,l.return=u.return,l.child=u.child,l.sibling=u.sibling,l.index=u.index,l.ref=u.ref,l.pendingProps=u.pendingProps,l.memoizedProps=u.memoizedProps,l.updateQueue=u.updateQueue,l.memoizedState=u.memoizedState,l.dependencies=u.dependencies,l.mode=u.mode,l.flags=u.flags,l.subtreeFlags=u.subtreeFlags,l.deletions=u.deletions,l.lanes=u.lanes,l.childLanes=u.childLanes,l.alternate=u.alternate,l.actualDuration=u.actualDuration,l.actualStartTime=u.actualStartTime,l.selfBaseDuration=u.selfBaseDuration,l.treeBaseDuration=u.treeBaseDuration,l._debugSource=u._debugSource,l._debugOwner=u._debugOwner,l._debugNeedsRemount=u._debugNeedsRemount,l._debugHookTypes=u._debugHookTypes,l}function _je(l,u,b,x,_){this.tag=u,this.containerInfo=l,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Zd,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=oi,this.eventTimes=yf(tt),this.expirationTimes=yf(Xn),this.pendingLanes=tt,this.suspendedLanes=tt,this.pingedLanes=tt,this.expiredLanes=tt,this.mutableReadLanes=tt,this.finishedLanes=tt,this.entangledLanes=tt,this.entanglements=yf(tt),this.identifierPrefix=x,this.onRecoverableError=_,ga&&(this.mutableSourceEagerHydrationData=null),this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var I=this.pendingUpdatersLaneMap=[],F=0;F3&&arguments[3]!==void 0?arguments[3]:null;return HO(x),{$$typeof:Ce,key:x==null?null:""+x,children:l,containerInfo:u,implementation:b}}var wM,CM;wM=!1,CM={};function VW(l){if(!l)return nn;var u=S(l),b=lm(u);if(u.tag===H){var x=u.type;if(to(x))return hr(u,x,b)}return b}function Pje(l){var u=S(l);if(u===void 0){if(typeof l.render=="function")throw new Error("Unable to find node on an unmounted component.");var b=Object.keys(l).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+b)}var x=au(u);return x===null?null:x.stateNode}function Aje(l,u){{var b=S(l);if(b===void 0){if(typeof l.render=="function")throw new Error("Unable to find node on an unmounted component.");var x=Object.keys(l).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+x)}var _=au(b);if(_===null)return null;if(_.mode&cr){var I=jt(b)||"Component";if(!CM[I]){CM[I]=!0;var F=un;try{Cr(_),b.mode&cr?d("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",u,u,I):d("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",u,u,I)}finally{F?Cr(F):or()}}}return _.stateNode}}function Oje(l,u,b,x,_,I,F,W){var Q=!1,ue=null;return HW(l,u,Q,ue,b,x,_,I,F)}function Dje(l,u,b,x,_,I,F,W,Q,ue){var me=!0,Oe=HW(b,x,me,l,_,I,F,W,Q);Oe.context=VW(null);var He=Oe.current,Ze=Ns(),ut=Bm(He),lt=dd(Ze,ut);return lt.callback=u??null,Df(He,lt,ut),O6e(Oe,ut,Ze),Oe}function GW(l,u,b,x){bm(u,l);var _=u.current,I=Ns(),F=Bm(_);Wh(F);var W=VW(b);u.context===null?u.context=W:u.pendingContext=W,Mt&&un!==null&&!wM&&(wM=!0,d(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Check the render method of %s.`,jt(un)||"Unknown"));var Q=dd(I,F);Q.payload={element:l},x=x===void 0?null:x,x!==null&&(typeof x!="function"&&d("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",x),Q.callback=x);var ue=Df(_,Q,F);return ue!==null&&(io(ue,_,F,I),Vy(ue,_,F)),F}function Mje(l){var u=l.current;if(!u.child)return null;switch(u.child.tag){case K:return _r(u.child.stateNode);default:return u.child.stateNode}}function jje(l){switch(l.tag){case J:{var u=l.stateNode;if(rs(u)){var b=ky(u);I6e(u,b)}break}case le:{yT(function(){var _=Ho(l,dn);if(_!==null){var I=Ns();io(_,l,dn,I)}});var x=dn;ET(l,x);break}}}function WW(l,u){var b=l.memoizedState;b!==null&&b.dehydrated!==null&&(b.retryLane=gm(b.retryLane,u))}function ET(l,u){WW(l,u);var b=l.alternate;b&&WW(b,u)}function Ije(l){if(l.tag===le){var u=dn,b=Ho(l,u);if(b!==null){var x=Ns();io(b,l,u,x)}ET(l,u)}}function Rje(l){if(l.tag===le){var u=Dl,b=Ho(l,u);if(b!==null){var x=Ns();io(b,l,u,x)}ET(l,u)}}function Nje(l){if(l.tag===le){var u=Bm(l),b=Ho(l,u);if(b!==null){var x=Ns();io(b,l,u,x)}ET(l,u)}}function Lje(l){var u=Kd(l);return u===null?null:u.stateNode}var qW=function(l){return null};function YW(l){return qW(l)}var KW=function(l){return!1};function XW(l){return KW(l)}var QW=null,ZW=null,JW=null,$W=null,eq=null,tq=null,nq=null,rq=null,iq=null;{var aq=function(l,u,b){var x=u[b],_=Gn(l)?l.slice():g({},l);return b+1===u.length?(Gn(_)?_.splice(x,1):delete _[x],_):(_[x]=aq(l[x],u,b+1),_)},oq=function(l,u){return aq(l,u,0)},sq=function(l,u,b,x){var _=u[x],I=Gn(l)?l.slice():g({},l);if(x+1===u.length){var F=b[x];I[F]=I[_],Gn(I)?I.splice(_,1):delete I[_]}else I[_]=sq(l[_],u,b,x+1);return I},lq=function(l,u,b){if(u.length!==b.length){c("copyWithRename() expects paths of the same length");return}else for(var x=0;x=u.length)return x;var _=u[b],I=Gn(l)?l.slice():g({},l);return I[_]=uq(l[_],u,b+1,x),I},cq=function(l,u,b){return uq(l,u,0,b)},EM=function(l,u){for(var b=l.memoizedState;b!==null&&u>0;)b=b.next,u--;return b};QW=function(l,u,b,x){var _=EM(l,u);if(_!==null){var I=cq(_.memoizedState,b,x);_.memoizedState=I,_.baseState=I,l.memoizedProps=g({},l.memoizedProps);var F=Ho(l,dn);F!==null&&io(F,l,dn,Xn)}},ZW=function(l,u,b){var x=EM(l,u);if(x!==null){var _=oq(x.memoizedState,b);x.memoizedState=_,x.baseState=_,l.memoizedProps=g({},l.memoizedProps);var I=Ho(l,dn);I!==null&&io(I,l,dn,Xn)}},JW=function(l,u,b,x){var _=EM(l,u);if(_!==null){var I=lq(_.memoizedState,b,x);_.memoizedState=I,_.baseState=I,l.memoizedProps=g({},l.memoizedProps);var F=Ho(l,dn);F!==null&&io(F,l,dn,Xn)}},$W=function(l,u,b){l.pendingProps=cq(l.memoizedProps,u,b),l.alternate&&(l.alternate.pendingProps=l.pendingProps);var x=Ho(l,dn);x!==null&&io(x,l,dn,Xn)},eq=function(l,u){l.pendingProps=oq(l.memoizedProps,u),l.alternate&&(l.alternate.pendingProps=l.pendingProps);var b=Ho(l,dn);b!==null&&io(b,l,dn,Xn)},tq=function(l,u,b){l.pendingProps=lq(l.memoizedProps,u,b),l.alternate&&(l.alternate.pendingProps=l.pendingProps);var x=Ho(l,dn);x!==null&&io(x,l,dn,Xn)},nq=function(l){var u=Ho(l,dn);u!==null&&io(u,l,dn,Xn)},rq=function(l){qW=l},iq=function(l){KW=l}}function zje(l){var u=au(l);return u===null?null:u.stateNode}function Bje(l){return null}function Fje(){return un}function Uje(l){var u=l.findFiberByHostInstance,b=a.ReactCurrentDispatcher;return xf({bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:QW,overrideHookStateDeletePath:ZW,overrideHookStateRenamePath:JW,overrideProps:$W,overridePropsDeletePath:eq,overridePropsRenamePath:tq,setErrorHandler:rq,setSuspenseHandler:iq,scheduleUpdate:nq,currentDispatcherRef:b,findHostInstanceByFiber:zje,findFiberByHostInstance:u||Bje,findHostInstancesForRefresh:fje,scheduleRefresh:cje,scheduleRoot:dje,setRefreshHandler:uje,getCurrentFiber:Fje,reconcilerVersion:Tje})}return n.attemptContinuousHydration=Rje,n.attemptDiscreteHydration=Ije,n.attemptHydrationAtCurrentPriority=Nje,n.attemptSynchronousHydration=jje,n.batchedUpdates=N6e,n.createComponentSelector=f6e,n.createContainer=Oje,n.createHasPseudoClassSelector=h6e,n.createHydrationContainer=Dje,n.createPortal=kje,n.createRoleSelector=p6e,n.createTestNameSelector=v6e,n.createTextSelector=m6e,n.deferredUpdates=R6e,n.discreteUpdates=L6e,n.findAllNodes=lT,n.findBoundingRects=b6e,n.findHostInstance=Pje,n.findHostInstanceWithNoPortals=Lje,n.findHostInstanceWithWarning=Aje,n.flushControlled=B6e,n.flushPassiveEffects=zf,n.flushSync=yT,n.focusWithin=S6e,n.getCurrentUpdatePriority=Bo,n.getFindAllNodesFailureDescription=y6e,n.getPublicRootInstance=Mje,n.injectIntoDevTools=Uje,n.isAlreadyRendering=z6e,n.observeVisibleRects=w6e,n.registerMutableSourceForHydration=nD,n.runWithPriority=ag,n.shouldError=YW,n.shouldSuspend=XW,n.updateContainer=GW,n})),_E}(function(e){process.env.NODE_ENV==="production"?e.exports=XCe():e.exports=ZCe()})(WCe);const JCe=pq(KA);var TE={},$Ce={get exports(){return TE},set exports(e){TE=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. */var GH;function eEe(){return GH||(GH=1,Vp.ConcurrentRoot=1,Vp.ContinuousEventPriority=4,Vp.DefaultEventPriority=16,Vp.DiscreteEventPriority=1,Vp.IdleEventPriority=536870912,Vp.LegacyRoot=0),Vp}var Gp={};/** * @license React * react-reconciler-constants.development.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 WH;function tEe(){return WH||(WH=1,process.env.NODE_ENV!=="production"&&function(){var e=1,t=4,n=16,r=536870912,i=e,a=t,o=n,s=r,c=0,d=1;Gp.ConcurrentRoot=d,Gp.ContinuousEventPriority=a,Gp.DefaultEventPriority=o,Gp.DiscreteEventPriority=i,Gp.IdleEventPriority=s,Gp.LegacyRoot=c}()),Gp}(function(e){process.env.NODE_ENV==="production"?e.exports=eEe():e.exports=tEe()})($Ce);const qH={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let YH=!1,KH=!1;const JA=".react-konva-event",nEe=`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 `,rEe=`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 `,iEe={};function kE(e,t,n=iEe){if(!YH&&"zIndex"in t&&(console.warn(rEe),YH=!0),!KH&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(nEe),KH=!0)}for(var a in n)if(!qH[a]){var o=a.slice(0,2)==="on",s=n[a]!==t[a];if(o&&s){var c=a.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[a])}var d=!t.hasOwnProperty(a);d&&e.setAttr(a,void 0)}var p=t._useStrictMode,g={},S=!1;const w={};for(var a in t)if(!qH[a]){var o=a.slice(0,2)==="on",C=n[a]!==t[a];if(o&&C){var c=a.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),t[a]&&(w[c]=t[a])}!o&&(t[a]!==n[a]||p&&t[a]!==e.getAttr(a))&&(S=!0,g[a]=t[a])}S&&(e.setAttrs(g),Wp(e));for(var c in w)e.on(c+JA,w[c])}function Wp(e){if(!Xt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const XH={},aEe={};tv.Node.prototype._applyProps=kE;function oEe(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),Wp(e)}function sEe(e,t,n){let r=tv[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=tv.Group);const i={},a={};for(var o in t){var s=o.slice(0,2)==="on";s?a[o]=t[o]:i[o]=t[o]}const c=new r(i);return kE(c,a),c}function lEe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function uEe(e,t,n){return!1}function cEe(e){return e}function dEe(){return null}function fEe(){return null}function hEe(e,t,n,r){return aEe}function pEe(){}function mEe(e){}function vEe(e,t){return!1}function gEe(){return XH}function yEe(){return XH}const bEe=setTimeout,SEe=clearTimeout,xEe=-1;function wEe(e,t){return!1}const CEe=!1,EEe=!0,_Ee=!0;function TEe(e,t){t.parent===e?t.moveToTop():e.add(t),Wp(e)}function kEe(e,t){t.parent===e?t.moveToTop():e.add(t),Wp(e)}function QH(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Wp(e)}function PEe(e,t,n){QH(e,t,n)}function AEe(e,t){t.destroy(),t.off(JA),Wp(e)}function OEe(e,t){t.destroy(),t.off(JA),Wp(e)}function DEe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function MEe(e,t,n){}function jEe(e,t,n,r,i){kE(e,i,r)}function IEe(e){e.hide(),Wp(e)}function REe(e){}function NEe(e,t){(t.visible==null||t.visible)&&e.show()}function LEe(e,t){}function zEe(e){}function BEe(){}const FEe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:TEe,appendChildToContainer:kEe,appendInitialChild:oEe,cancelTimeout:SEe,clearContainer:zEe,commitMount:MEe,commitTextUpdate:DEe,commitUpdate:jEe,createInstance:sEe,createTextInstance:lEe,detachDeletedInstance:BEe,finalizeInitialChildren:uEe,getChildHostContext:yEe,getCurrentEventPriority:()=>TE.DefaultEventPriority,getPublicInstance:cEe,getRootHostContext:gEe,hideInstance:IEe,hideTextInstance:REe,idlePriority:Iv.unstable_IdlePriority,insertBefore:QH,insertInContainerBefore:PEe,isPrimaryRenderer:CEe,noTimeout:xEe,now:Iv.unstable_now,prepareForCommit:dEe,preparePortalMount:fEe,prepareUpdate:hEe,removeChild:AEe,removeChildFromContainer:OEe,resetAfterCommit:pEe,resetTextContent:mEe,run:Iv.unstable_runWithPriority,scheduleTimeout:bEe,shouldDeprioritizeSubtree:vEe,shouldSetTextContent:wEe,supportsMutation:_Ee,unhideInstance:NEe,unhideTextInstance:LEe,warnsIfNotActing:EEe},Symbol.toStringTag,{value:"Module"}));var UEe=Object.defineProperty,HEe=Object.defineProperties,VEe=Object.getOwnPropertyDescriptors,ZH=Object.getOwnPropertySymbols,GEe=Object.prototype.hasOwnProperty,WEe=Object.prototype.propertyIsEnumerable,JH=(e,t,n)=>t in e?UEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$H=(e,t)=>{for(var n in t||(t={}))GEe.call(t,n)&&JH(e,n,t[n]);if(ZH)for(var n of ZH(t))WEe.call(t,n)&&JH(e,n,t[n]);return e},qEe=(e,t)=>HEe(e,VEe(t));function eV(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=eV(r,t,n);if(i)return i;r=t?null:r.sibling}}function tV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const $A=tV(gt.createContext(null));class nV extends gt.Component{render(){return gt.createElement($A.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:YEe,ReactCurrentDispatcher:KEe}=gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function XEe(){const e=gt.useContext($A);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=gt.useId();return gt.useMemo(()=>{var r;return(r=YEe.current)!=null?r:eV(e,!1,i=>{let a=i.memoizedState;for(;a;){if(a.memoizedState===t)return!0;a=a.next}})},[e,t])}function QEe(){var e,t;const n=XEe(),[r]=gt.useState(()=>new Map);r.clear();let i=n;for(;i;){const a=(e=i.type)==null?void 0:e._context;a&&a!==$A&&!r.has(a)&&r.set(a,(t=KEe.current)==null?void 0:t.readContext(tV(a))),i=i.return}return gt.useMemo(()=>Array.from(r.keys()).reduce((a,o)=>s=>gt.createElement(a,null,gt.createElement(o.Provider,qEe($H({},s),{value:r.get(o)}))),a=>gt.createElement(nV,$H({},a))),[r])}function ZEe(e){const t=A.useRef();return A.useLayoutEffect(()=>{t.current=e}),t.current}const JEe=e=>{const t=A.useRef(),n=A.useRef(),r=A.useRef(),i=ZEe(e),a=QEe(),o=s=>{const{forwardedRef:c}=e;c&&(typeof c=="function"?c(s):c.current=s)};return A.useLayoutEffect(()=>(n.current=new tv.Stage({width:e.width,height:e.height,container:t.current}),o(n.current),r.current=AS.createContainer(n.current,TE.LegacyRoot,!1,null),AS.updateContainer(A.createElement(a,{},e.children),r.current),()=>{tv.isBrowser&&(o(null),AS.updateContainer(null,r.current,null),n.current.destroy())}),[]),A.useLayoutEffect(()=>{o(n.current),kE(n.current,e,i),AS.updateContainer(A.createElement(a,{},e.children),r.current,null)}),A.createElement("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},PS="Layer",mh="Group",vh="Rect",Rv="Circle",PE="Line",rV="Image",$Ee="Transformer",AS=JCe(FEe);AS.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:process.env.NODE_ENV!=="production"?1:0,version:A.version,rendererPackageName:"react-konva"});const e_e=A.forwardRef((e,t)=>A.createElement(nV,{},A.createElement(JEe,{...e,forwardedRef:t}))),t_e=Gt([xr,fa],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),n_e=()=>{const e=nt(),{tool:t,isStaging:n,isMovingBoundingBox:r}=we(t_e);return{handleDragStart:A.useCallback(()=>{(t==="move"||n)&&!r&&e(I2(!0))},[e,r,n,t]),handleDragMove:A.useCallback(i=>{if(!((t==="move"||n)&&!r))return;const a={x:i.target.x(),y:i.target.y()};e(sj(a))},[e,r,n,t]),handleDragEnd:A.useCallback(()=>{(t==="move"||n)&&!r&&e(I2(!1))},[e,r,n,t])}},r_e=Gt([xr,Na,fa],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:i,shouldShowBoundingBox:a,tool:o,isMaskEnabled:s,shouldSnapToGrid:c}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:i,shouldShowBoundingBox:a,tool:o,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:c}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),i_e=()=>{const e=nt(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:i,isMaskEnabled:a,shouldSnapToGrid:o}=we(r_e),s=A.useRef(null),c=bN(),d=()=>e(dk());Ot(["shift+c"],()=>{d()},{enabled:()=>!i,preventDefault:!0},[]);const p=()=>e(Gb(!a));Ot(["h"],()=>{p()},{enabled:()=>!i,preventDefault:!0},[a]),Ot(["n"],()=>{e(N2(!o))},{enabled:!0,preventDefault:!0},[o]),Ot("esc",()=>{e(qK())},{enabled:()=>!0,preventDefault:!0}),Ot("shift+h",()=>{e($K(!n))},{enabled:()=>!i,preventDefault:!0},[t,n]),Ot(["space"],g=>{g.repeat||(c==null||c.container().focus(),r!=="move"&&(s.current=r,e(Sd("move"))),r==="move"&&s.current&&s.current!=="move"&&(e(Sd(s.current)),s.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,s])},eO=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}},iV=()=>{const e=nt(),t=Mc(),n=bN();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=y0.pixelRatio,[a,o,s,c]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(QK({r:a,g:o,b:s,a:c}))},commitColorUnderCursor:()=>{e(BK())}}},a_e=Gt([Na,xr,fa],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),o_e=e=>{const t=nt(),{tool:n,isStaging:r}=we(a_e),{commitColorUnderCursor:i}=iV();return A.useCallback(a=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(I2(!0));return}if(n==="colorPicker"){i();return}const o=eO(e.current);o&&(a.evt.preventDefault(),t(Z6(!0)),t(zK([o.x,o.y])))},[e,n,r,t,i])},s_e=Gt([Na,xr,fa],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),l_e=(e,t,n)=>{const r=nt(),{isDrawing:i,tool:a,isStaging:o}=we(s_e),{updateColorUnderCursor:s}=iV();return A.useCallback(()=>{if(!e.current)return;const c=eO(e.current);if(c){if(r(ZK(c)),n.current=c,a==="colorPicker"){s();return}!i||a==="move"||o||(t.current=!0,r(K6([c.x,c.y])))}},[t,r,i,o,n,e,a,s])},u_e=()=>{const e=nt();return A.useCallback(()=>{e(HK())},[e])},c_e=Gt([Na,xr,fa],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),d_e=(e,t)=>{const n=nt(),{tool:r,isDrawing:i,isStaging:a}=we(c_e);return A.useCallback(()=>{if(r==="move"||a){n(I2(!1));return}if(!t.current&&i&&e.current){const o=eO(e.current);if(!o)return;n(K6([o.x,o.y]))}else t.current=!1;n(Z6(!1))},[t,n,i,a,e,r])},f_e=Gt([xr],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),h_e=e=>{const t=nt(),{isMoveStageKeyHeld:n,stageScale:r}=we(f_e);return A.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const a=e.current.getPointerPosition();if(!a)return;const o={x:(a.x-e.current.x())/r,y:(a.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const c=Je.clamp(r*PK**s,AK,OK),d={x:a.x-o.x*c,y:a.y-o.y*c};t(tX(c)),t(sj(d))},[e,n,r,t])},p_e=Gt(xr,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,shouldDarkenOutsideBoundingBox:a,stageCoordinates:o}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:a,stageCoordinates:o,stageDimensions:r,stageScale:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),m_e=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:i,stageScale:a}=we(p_e);return v.jsxs(mh,{children:[v.jsx(vh,{offsetX:r.x/a,offsetY:r.y/a,height:i.height/a,width:i.width/a,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),v.jsx(vh,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},v_e=Gt([xr],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),g_e={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)"},y_e=()=>{const e=we(s=>s.ui.currentTheme),{stageScale:t,stageCoordinates:n,stageDimensions:r}=we(v_e),[i,a]=A.useState([]),o=A.useCallback(s=>s/t,[t]);return A.useLayoutEffect(()=>{const s=g_e[e],{width:c,height:d}=r,{x:p,y:g}=n,S={x1:0,y1:0,x2:c,y2:d,offset:{x:o(p),y:o(g)}},w={x:Math.ceil(o(p)/64)*64,y:Math.ceil(o(g)/64)*64},C={x1:-w.x,y1:-w.y,x2:o(c)-w.x+64,y2:o(d)-w.y+64},P={x1:Math.min(S.x1,C.x1),y1:Math.min(S.y1,C.y1),x2:Math.max(S.x2,C.x2),y2:Math.max(S.y2,C.y2)},D=P.x2-P.x1,M=P.y2-P.y1,R=Math.round(D/64)+1,L=Math.round(M/64)+1,z=Je.range(0,R).map(H=>v.jsx(PE,{x:P.x1+H*64,y:P.y1,points:[0,0,0,M],stroke:s,strokeWidth:1},`x_${H}`)),U=Je.range(0,L).map(H=>v.jsx(PE,{x:P.x1,y:P.y1+H*64,points:[0,0,D,0],stroke:s,strokeWidth:1},`y_${H}`));a(z.concat(U))},[t,n,r,e,o]),v.jsx(mh,{children:i})},b_e=Gt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),S_e=e=>{const{...t}=e,n=we(b_e),[r,i]=A.useState(null);if(A.useEffect(()=>{if(!n)return;const d=new Image;d.onload=()=>{i(d)},d.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:a,y:o,width:s,height:c}}=n;return r?v.jsx(rV,{x:a,y:o,width:s,height:c,image:r,listening:!1,...t}):null},Nv=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},x_e=Gt(xr,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:Nv(t)}}),aV=e=>`data:image/svg+xml;utf8, `.replaceAll("black",e),w_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:a}=we(x_e),[o,s]=A.useState(null),[c,d]=A.useState(0),p=A.useRef(null),g=A.useCallback(()=>{d(c+1),setTimeout(g,500)},[c]);return A.useEffect(()=>{if(o)return;const S=new Image;S.onload=()=>{s(S)},S.src=aV(n)},[o,n]),A.useEffect(()=>{o&&(o.src=aV(n))},[o,n]),A.useEffect(()=>{const S=setInterval(()=>d(w=>(w+1)%5),50);return()=>clearInterval(S)},[]),!o||!Je.isNumber(r.x)||!Je.isNumber(r.y)||!Je.isNumber(a)||!Je.isNumber(i.width)||!Je.isNumber(i.height)?null:v.jsx(vh,{ref:p,offsetX:r.x/a,offsetY:r.y/a,height:i.height/a,width:i.width/a,fillPatternImage:o,fillPatternOffsetY:Je.isNumber(c)?c:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/a,y:1/a},listening:!0,globalCompositeOperation:"source-in",...t})},C_e=Gt([xr],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),E_e=e=>{const{...t}=e,{objects:n}=we(C_e);return v.jsx(mh,{listening:!1,...t,children:n.filter(ck).map((r,i)=>v.jsx(PE,{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 Lv=A,__e=function(t,n,r){const i=Lv.useRef("loading"),a=Lv.useRef(),[o,s]=Lv.useState(0),c=Lv.useRef(),d=Lv.useRef(),p=Lv.useRef();return(c.current!==t||d.current!==n||p.current!==r)&&(i.current="loading",a.current=void 0,c.current=t,d.current=n,p.current=r),Lv.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function S(){i.current="loaded",a.current=g,s(Math.random())}function w(){i.current="failed",a.current=void 0,s(Math.random())}return g.addEventListener("load",S),g.addEventListener("error",w),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",S),g.removeEventListener("error",w)}},[t,n,r]),[a.current,i.current]};const oV=e=>{const{url:t,x:n,y:r}=e,[i]=__e(t);return v.jsx(rV,{x:n,y:r,image:i,listening:!1})},T_e=Gt([xr],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),k_e=()=>{const{objects:e}=we(T_e);return e?v.jsx(mh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(O2(t))return v.jsx(oV,{x:t.x,y:t.y,url:t.image.url},n);if(jK(t)){const r=v.jsx(PE,{points:t.points,stroke:t.color?Nv(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?v.jsx(mh,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(IK(t))return v.jsx(vh,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Nv(t.color)},n);if(RK(t))return v.jsx(vh,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},P_e=Gt([xr],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i,boundingBoxCoordinates:{x:a,y:o},boundingBoxDimensions:{width:s,height:c}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:a,y:o,width:s,height:c}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),A_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:a,y:o,width:s,height:c}=we(P_e);return v.jsxs(mh,{...t,children:[r&&n&&v.jsx(oV,{url:n.image.url,x:a,y:o}),i&&v.jsxs(mh,{children:[v.jsx(vh,{x:a,y:o,width:s,height:c,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),v.jsx(vh,{x:a,y:o,width:s,height:c,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},O_e=Gt([xr],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:Je.isEqual}}),D_e=()=>{const e=nt(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=we(O_e),{t:a}=ht(),o=A.useCallback(()=>{e(oj(!0))},[e]),s=A.useCallback(()=>{e(oj(!1))},[e]);Ot(["left"],()=>{c()},{enabled:()=>!0,preventDefault:!0}),Ot(["right"],()=>{d()},{enabled:()=>!0,preventDefault:!0}),Ot(["enter"],()=>{p()},{enabled:()=>!0,preventDefault:!0});const c=()=>e(GK()),d=()=>e(VK()),p=()=>e(FK());return r?v.jsx(Fe,{pos:"absolute",bottom:4,w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:s,children:v.jsxs(Io,{isAttached:!0,children:[v.jsx(kt,{tooltip:`${a("unifiedCanvas.previous")} (Left)`,"aria-label":`${a("unifiedCanvas.previous")} (Left)`,icon:v.jsx(xxe,{}),onClick:c,colorScheme:"accent",isDisabled:t}),v.jsx(kt,{tooltip:`${a("unifiedCanvas.next")} (Right)`,"aria-label":`${a("unifiedCanvas.next")} (Right)`,icon:v.jsx(wxe,{}),onClick:d,colorScheme:"accent",isDisabled:n}),v.jsx(kt,{tooltip:`${a("unifiedCanvas.accept")} (Enter)`,"aria-label":`${a("unifiedCanvas.accept")} (Enter)`,icon:v.jsx(cE,{}),onClick:p,colorScheme:"accent"}),v.jsx(kt,{tooltip:a("unifiedCanvas.showHide"),"aria-label":a("unifiedCanvas.showHide"),"data-alert":!i,icon:i?v.jsx(Axe,{}):v.jsx(Pxe,{}),onClick:()=>e(eX(!i)),colorScheme:"accent"}),v.jsx(kt,{tooltip:a("unifiedCanvas.saveToGallery"),"aria-label":a("unifiedCanvas.saveToGallery"),icon:v.jsx(hA,{}),onClick:()=>e(Gee(r.image.url)),colorScheme:"accent"}),v.jsx(kt,{tooltip:a("unifiedCanvas.discardAll"),"aria-label":a("unifiedCanvas.discardAll"),icon:v.jsx(CS,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(UK()),colorScheme:"error",fontSize:20})]})}):null},my=e=>Math.round(e*100)/100,M_e=Gt([xr],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${my(n)}, ${my(r)})`}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function j_e(){const{cursorCoordinatesString:e}=we(M_e),{t}=ht();return v.jsx(Bn,{children:`${t("unifiedCanvas.cursorPosition")}: ${e}`})}const tO="var(--invokeai-colors-warning-500)",I_e=Gt([xr],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:a,height:o},scaledBoundingBoxDimensions:{width:s,height:c},boundingBoxCoordinates:{x:d,y:p},stageScale:g,shouldShowCanvasDebugInfo:S,layer:w,boundingBoxScaleMethod:C,shouldPreserveMaskedArea:k}=e;let P="inherit";return(C==="none"&&(a<512||o<512)||C==="manual"&&s*c<512*512)&&(P=tO),{activeLayerColor:w==="mask"?tO:"inherit",activeLayerString:w.charAt(0).toUpperCase()+w.slice(1),boundingBoxColor:P,boundingBoxCoordinatesString:`(${my(d)}, ${my(p)})`,boundingBoxDimensionsString:`${a}×${o}`,scaledBoundingBoxDimensionsString:`${s}×${c}`,canvasCoordinatesString:`${my(r)}×${my(i)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:S,shouldShowBoundingBox:C!=="auto",shouldShowScaledBoundingBox:C!=="none",shouldPreserveMaskedArea:k}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),R_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:a,shouldShowScaledBoundingBox:o,canvasCoordinatesString:s,canvasDimensionsString:c,canvasScaleString:d,shouldShowCanvasDebugInfo:p,shouldShowBoundingBox:g,shouldPreserveMaskedArea:S}=we(I_e),{t:w}=ht();return v.jsxs(Fe,{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:[v.jsx(Bn,{style:{color:e},children:`${w("unifiedCanvas.activeLayer")}: ${t}`}),v.jsx(Bn,{children:`${w("unifiedCanvas.canvasScale")}: ${d}%`}),S&&v.jsx(Bn,{style:{color:tO},children:"Preserve Masked Area: On"}),g&&v.jsx(Bn,{style:{color:n},children:`${w("unifiedCanvas.boundingBox")}: ${i}`}),o&&v.jsx(Bn,{style:{color:n},children:`${w("unifiedCanvas.scaledBoundingBox")}: ${a}`}),p&&v.jsxs(v.Fragment,{children:[v.jsx(Bn,{children:`${w("unifiedCanvas.boundingBoxPosition")}: ${r}`}),v.jsx(Bn,{children:`${w("unifiedCanvas.canvasDimensions")}: ${c}`}),v.jsx(Bn,{children:`${w("unifiedCanvas.canvasPosition")}: ${s}`}),v.jsx(j_e,{})]})]})},N_e=Gt(xr,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:i,isTransformingBoundingBox:a,isMovingBoundingBox:o,tool:s,shouldSnapToGrid:c}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:i,isMovingBoundingBox:o,isTransformingBoundingBox:a,stageScale:r,shouldSnapToGrid:c,tool:s,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),L_e=e=>{const{...t}=e,n=nt(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:a,isMovingBoundingBox:o,isTransformingBoundingBox:s,stageScale:c,shouldSnapToGrid:d,tool:p,hitStrokeWidth:g}=we(N_e),S=A.useRef(null),w=A.useRef(null),[C,k]=A.useState(!1);A.useEffect(()=>{var fe;!S.current||!w.current||(S.current.nodes([w.current]),(fe=S.current.getLayer())==null||fe.batchDraw())},[]);const P=64*c,D=A.useCallback(fe=>{if(!d){n(hk({x:Math.floor(fe.target.x()),y:Math.floor(fe.target.y())}));return}const X=fe.target.x(),G=fe.target.y(),te=bd(X,64),oe=bd(G,64);fe.target.x(te),fe.target.y(oe),n(hk({x:te,y:oe}))},[n,d]),M=A.useCallback(()=>{if(!w.current)return;const fe=w.current,X=fe.scaleX(),G=fe.scaleY(),te=Math.round(fe.width()*X),oe=Math.round(fe.height()*G),ie=Math.round(fe.x()),re=Math.round(fe.y());n(Vb({width:te,height:oe})),n(hk({x:d?cp(ie,64):ie,y:d?cp(re,64):re})),fe.scaleX(1),fe.scaleY(1)},[n,d]),R=A.useCallback((fe,X,G)=>{const te=fe.x%P,oe=fe.y%P;return{x:cp(X.x,P)+te,y:cp(X.y,P)+oe}},[P]),L=()=>{n(mk(!0))},z=()=>{n(mk(!1)),n(pk(!1)),n(j2(!1)),k(!1)},U=()=>{n(pk(!0))},H=()=>{n(mk(!1)),n(pk(!1)),n(j2(!1)),k(!1)},q=()=>{k(!0)},J=()=>{!s&&!o&&k(!1)},$=()=>{n(j2(!0))},K=()=>{n(j2(!1))};return v.jsxs(mh,{...t,children:[v.jsx(vh,{height:i.height,width:i.width,x:r.x,y:r.y,onMouseEnter:$,onMouseOver:$,onMouseLeave:K,onMouseOut:K}),v.jsx(vh,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:g,listening:!a&&p==="move",onDragStart:U,onDragEnd:H,onDragMove:D,onMouseDown:U,onMouseOut:J,onMouseOver:q,onMouseEnter:q,onMouseUp:H,onTransform:M,onTransformEnd:z,ref:w,stroke:C?"rgba(255,255,255,0.7)":"white",strokeWidth:(C?8:1)/c,width:i.width,x:r.x,y:r.y}),v.jsx($Ee,{anchorCornerRadius:3,anchorDragBoundFunc:R,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:!a&&p==="move",onDragStart:U,onDragEnd:H,onMouseDown:L,onMouseUp:z,onTransformEnd:z,ref:S,rotateEnabled:!1})]})},z_e=Gt(xr,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:i,brushColor:a,tool:o,layer:s,shouldShowBrush:c,isMovingBoundingBox:d,isTransformingBoundingBox:p,stageScale:g,stageDimensions:S,boundingBoxCoordinates:w,boundingBoxDimensions:C,shouldRestrictStrokesToBox:k}=e,P=k?{clipX:w.x,clipY:w.y,clipWidth:C.width,clipHeight:C.height}:{};return{cursorPosition:t,brushX:t?t.x:S.width/2,brushY:t?t.y:S.height/2,radius:n/2,colorPickerOuterRadius:H6/g,colorPickerInnerRadius:(H6-uk+1)/g,maskColorString:Nv({...i,a:.5}),brushColorString:Nv(a),colorPickerColorString:Nv(r),tool:o,layer:s,shouldShowBrush:c,shouldDrawBrushPreview:!(d||p||!t)&&c,strokeWidth:1.5/g,dotRadius:1.5/g,clip:P}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),B_e=e=>{const{...t}=e,{brushX:n,brushY:r,radius:i,maskColorString:a,tool:o,layer:s,shouldDrawBrushPreview:c,dotRadius:d,strokeWidth:p,brushColorString:g,colorPickerColorString:S,colorPickerInnerRadius:w,colorPickerOuterRadius:C,clip:k}=we(z_e);return c?v.jsxs(mh,{listening:!1,...k,...t,children:[o==="colorPicker"?v.jsxs(v.Fragment,{children:[v.jsx(Rv,{x:n,y:r,radius:C,stroke:g,strokeWidth:uk,strokeScaleEnabled:!1}),v.jsx(Rv,{x:n,y:r,radius:w,stroke:S,strokeWidth:uk,strokeScaleEnabled:!1})]}):v.jsxs(v.Fragment,{children:[v.jsx(Rv,{x:n,y:r,radius:i,fill:s==="mask"?a:g,globalCompositeOperation:o==="eraser"?"destination-out":"source-out"}),v.jsx(Rv,{x:n,y:r,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:p*2,strokeEnabled:!0,listening:!1}),v.jsx(Rv,{x:n,y:r,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:p,strokeEnabled:!0,listening:!1})]}),v.jsx(Rv,{x:n,y:r,radius:d*2,fill:"rgba(255,255,255,0.4)",listening:!1}),v.jsx(Rv,{x:n,y:r,radius:d,fill:"rgba(0,0,0,1)",listening:!1})]}):null},F_e=Gt([xr,fa],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:a,isMouseOverBoundingBox:o,isMovingBoundingBox:s,stageDimensions:c,stageCoordinates:d,tool:p,isMovingStage:g,shouldShowIntermediates:S,shouldShowGrid:w,shouldRestrictStrokesToBox:C}=e;let k="none";return p==="move"||t?g?k="grabbing":k="grab":a?k=void 0:C&&!o&&(k="default"),{isMaskEnabled:n,isModifyingBoundingBox:a||s,shouldShowBoundingBox:i,shouldShowGrid:w,stageCoordinates:d,stageCursor:k,stageDimensions:c,stageScale:r,tool:p,isStaging:t,shouldShowIntermediates:S}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),U_e=ct(e_e,{shouldForwardProp:e=>!["sx"].includes(e)}),sV=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:a,stageDimensions:o,stageScale:s,tool:c,isStaging:d,shouldShowIntermediates:p}=we(F_e);i_e();const g=A.useRef(null),S=A.useRef(null),w=A.useCallback(J=>{Cee(J),g.current=J},[]),C=A.useCallback(J=>{wee(J),S.current=J},[]),k=A.useRef({x:0,y:0}),P=A.useRef(!1),D=h_e(g),M=o_e(g),R=d_e(g,P),L=l_e(g,P,k),z=u_e(),{handleDragStart:U,handleDragMove:H,handleDragEnd:q}=n_e();return v.jsx(Fe,{sx:{position:"relative",height:"100%",width:"100%",borderRadius:"base"},children:v.jsxs(Bn,{sx:{position:"relative"},children:[v.jsxs(U_e,{tabIndex:-1,ref:w,sx:{outline:"none",overflow:"hidden",cursor:a||void 0,canvas:{outline:"none"}},x:i.x,y:i.y,width:o.width,height:o.height,scale:{x:s,y:s},onTouchStart:M,onTouchMove:L,onTouchEnd:R,onMouseDown:M,onMouseLeave:z,onMouseMove:L,onMouseUp:R,onDragStart:U,onDragMove:H,onDragEnd:q,onContextMenu:J=>J.evt.preventDefault(),onWheel:D,draggable:(c==="move"||d)&&!t,children:[v.jsx(PS,{id:"grid",visible:r,children:v.jsx(y_e,{})}),v.jsx(PS,{id:"base",ref:C,listening:!1,imageSmoothingEnabled:!1,children:v.jsx(k_e,{})}),v.jsxs(PS,{id:"mask",visible:e,listening:!1,children:[v.jsx(E_e,{visible:!0,listening:!1}),v.jsx(w_e,{listening:!1})]}),v.jsx(PS,{children:v.jsx(m_e,{})}),v.jsxs(PS,{id:"preview",imageSmoothingEnabled:!1,children:[!d&&v.jsx(B_e,{visible:c!=="move",listening:!1}),v.jsx(A_e,{visible:d}),p&&v.jsx(S_e,{}),v.jsx(L_e,{visible:n&&!d})]})]}),v.jsx(R_e,{}),v.jsx(D_e,{})]})})},H_e=Gt(xr,OU,Na,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),lV=()=>{const e=nt(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=we(H_e),a=A.useRef(null);return A.useLayoutEffect(()=>{window.setTimeout(()=>{if(!a.current)return;const{clientWidth:o,clientHeight:s}=a.current;e(XK({width:o,height:s})),e(i?YK():D2()),e(Wo(!1))},0)},[e,r,t,n,i]),v.jsx(Fe,{ref:a,sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,width:"100%",height:"100%"},children:v.jsx(z0,{thickness:"2px",speed:"1s",size:"xl"})})},V_e=Gt([xr,Na,zi],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function uV(){const e=nt(),{canRedo:t,activeTabName:n}=we(V_e),{t:r}=ht(),i=()=>{e(WK())};return Ot(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{i()},{enabled:()=>t,preventDefault:!0},[n,t]),v.jsx(kt,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:v.jsx(Fxe,{}),onClick:i,isDisabled:!t})}const G_e=Gt([xr,Na,zi],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function cV(){const e=nt(),{t}=ht(),{canUndo:n,activeTabName:r}=we(G_e),i=()=>{e(nX())};return Ot(["meta+z","ctrl+z"],()=>{i()},{enabled:()=>n,preventDefault:!0},[r,n]),v.jsx(kt,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:v.jsx(Wxe,{}),onClick:i,isDisabled:!n})}const W_e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const a=i.getContext("2d");a&&(a.drawImage(r,0,0),i.toBlob(o=>{o&&navigator.clipboard.write([new ClipboardItem({[o.type]:o})])}),i.remove(),r.remove())}),r.src=e},q_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},Y_e=(e,t,n,r)=>{const i=e.scale(),a=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:o,y:s,width:c,height:d}=e.getClientRect(),p=r?{x:r.x+n.x,y:r.y+n.y,width:r.width,height:r.height}:{x:o,y:s,width:c,height:d},g=e.toDataURL(p);return e.scale(i),{dataURL:g,boundingBox:{x:a.x,y:a.y,width:c,height:d}}},K_e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},qp=(e=K_e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:a,shouldDownload:o,shouldCopy:s,shouldSetAsInitialImage:c}=e;t(sZ("Exporting Image")),t(hp(!1));const d=n(),{stageScale:p,boundingBoxCoordinates:g,boundingBoxDimensions:S,stageCoordinates:w}=d.canvas,C=Mc();if(!C){t(ql(!1)),t(hp(!0));return}const{dataURL:k,boundingBox:P}=Y_e(C,p,w,i?{...g,...S}:void 0);if(!k){t(ql(!1)),t(hp(!0));return}const D=new FormData;D.append("data",JSON.stringify({dataURL:k,filename:"merged_canvas.png",kind:a?"result":"temp",cropVisible:r}));const R=await(await fetch(`${window.location.origin}/upload`,{method:"POST",body:D})).json(),{url:L,width:z,height:U}=R,H={uuid:b0(),category:a?"result":"user",...R};o&&(q_e(L),t(qf({title:En.t("toast.downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),s&&(W_e(L,z,U),t(qf({title:En.t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0}))),a&&(t(r0({image:H,category:"result"})),t(qf({title:En.t("toast.imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),c&&(t(JK({kind:"image",layer:"base",...P,image:H})),t(qf({title:En.t("toast.canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(ql(!1)),t(Qm(En.t("common.statusConnected"))),t(hp(!0))};function X_e(){const e=we(fa),t=Mc(),n=we(s=>s.system.isProcessing),r=we(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=nt(),{t:a}=ht();Ot(["meta+c","ctrl+c"],()=>{o()},{enabled:()=>!e,preventDefault:!0},[t,n]);const o=()=>{i(qp({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return v.jsx(kt,{"aria-label":`${a("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${a("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:v.jsx(cy,{}),onClick:o,isDisabled:e})}function Q_e(){const e=nt(),{t}=ht(),n=Mc(),r=we(fa),i=we(s=>s.system.isProcessing),a=we(s=>s.canvas.shouldCropToBoundingBoxOnSave);Ot(["shift+d"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n,i]);const o=()=>{e(qp({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return v.jsx(kt,{"aria-label":`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:v.jsx(fA,{}),onClick:o,isDisabled:r})}function Z_e(){const e=we(fa),{openUploader:t}=rA(),{t:n}=ht();return v.jsx(kt,{"aria-label":n("common.upload"),tooltip:n("common.upload"),icon:v.jsx(dE,{}),onClick:t,isDisabled:e})}const J_e=Gt([xr,fa],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function $_e(){const e=nt(),{t}=ht(),{layer:n,isMaskEnabled:r,isStaging:i}=we(J_e),a=()=>{e(R2(n==="mask"?"base":"mask"))};Ot(["q"],()=>{a()},{enabled:()=>!i,preventDefault:!0},[n]);const o=s=>{const c=s.target.value;e(R2(c)),c==="mask"&&!r&&e(Gb(!0))};return v.jsx(xl,{tooltip:`${t("unifiedCanvas.layer")} (Q)`,"aria-label":`${t("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:G6,onChange:o,isDisabled:i})}function eTe(){const e=nt(),{t}=ht(),n=Mc(),r=we(fa),i=we(o=>o.system.isProcessing);Ot(["shift+m"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n,i]);const a=()=>{e(qp({cropVisible:!1,shouldSetAsInitialImage:!0}))};return v.jsx(kt,{"aria-label":`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:v.jsx(kU,{}),onClick:a,isDisabled:r})}function tTe(){const e=we(a=>a.canvas.tool),t=we(fa),n=nt(),{t:r}=ht();Ot(["v"],()=>{i()},{enabled:()=>!t,preventDefault:!0},[]);const i=()=>n(Sd("move"));return v.jsx(kt,{"aria-label":`${r("unifiedCanvas.move")} (V)`,tooltip:`${r("unifiedCanvas.move")} (V)`,icon:v.jsx(xU,{}),isChecked:e==="move"||t,onClick:i})}function nTe(){const e=we(i=>i.ui.shouldPinParametersPanel),t=nt(),{t:n}=ht(),r=()=>{t(Zm(!0)),e&&setTimeout(()=>t(Wo(!0)),400)};return v.jsxs(Fe,{flexDirection:"column",gap:2,children:[v.jsx(kt,{tooltip:`${n("parameters.showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("parameters.showOptionsPanel"),onClick:r,children:v.jsx(pA,{})}),v.jsx(Fe,{children:v.jsx(jA,{iconButton:!0})}),v.jsx(Fe,{children:v.jsx(DA,{width:"100%",height:"40px",btnGroupWidth:"100%"})})]})}function rTe(){const e=nt(),{t}=ht(),n=we(fa),r=()=>{e(fk()),e(D2())};return v.jsx(kt,{"aria-label":t("unifiedCanvas.clearCanvas"),tooltip:t("unifiedCanvas.clearCanvas"),icon:v.jsx(Dv,{}),onClick:r,isDisabled:n,colorScheme:"error"})}function dV(e,t,n=250){const[r,i]=A.useState(0);return A.useEffect(()=>{const a=setTimeout(()=>{r===1&&e(),i(0)},n);return r===2&&t(),()=>clearTimeout(a)},[r,e,t,n]),()=>i(a=>a+1)}function iTe(){const e=Mc(),t=nt(),{t:n}=ht();Ot(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[e]);const r=dV(()=>i(!1),()=>i(!0)),i=(a=!1)=>{const o=Mc();if(!o)return;const s=o.getClientRect({skipTransform:!0});t(Q6({contentRect:s,shouldScaleTo1:a}))};return v.jsx(kt,{"aria-label":`${n("unifiedCanvas.resetView")} (R)`,tooltip:`${n("unifiedCanvas.resetView")} (R)`,icon:v.jsx(CU,{}),onClick:r})}function aTe(){const e=we(fa),t=Mc(),n=we(s=>s.system.isProcessing),r=we(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=nt(),{t:a}=ht();Ot(["shift+s"],()=>{o()},{enabled:()=>!e,preventDefault:!0},[t,n]);const o=()=>{i(qp({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return v.jsx(kt,{"aria-label":`${a("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${a("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:v.jsx(hA,{}),onClick:o,isDisabled:e})}const oTe=Gt([xr,fa,zi],(e,t,n)=>{const{isProcessing:r}=n,{tool:i}=e;return{tool:i,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),sTe=()=>{const e=nt(),{t}=ht(),{tool:n,isStaging:r}=we(oTe);Ot(["b"],()=>{i()},{enabled:()=>!r,preventDefault:!0},[]),Ot(["e"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n]),Ot(["c"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n]),Ot(["shift+f"],()=>{s()},{enabled:()=>!r,preventDefault:!0}),Ot(["delete","backspace"],()=>{c()},{enabled:()=>!r,preventDefault:!0});const i=()=>e(Sd("brush")),a=()=>e(Sd("eraser")),o=()=>e(Sd("colorPicker")),s=()=>e(Y6()),c=()=>e(q6());return v.jsxs(Fe,{flexDirection:"column",gap:2,children:[v.jsxs(Io,{children:[v.jsx(kt,{"aria-label":`${t("unifiedCanvas.brush")} (B)`,tooltip:`${t("unifiedCanvas.brush")} (B)`,icon:v.jsx(PU,{}),isChecked:n==="brush"&&!r,onClick:i,isDisabled:r}),v.jsx(kt,{"aria-label":`${t("unifiedCanvas.eraser")} (E)`,tooltip:`${t("unifiedCanvas.eraser")} (B)`,icon:v.jsx(EU,{}),isChecked:n==="eraser"&&!r,isDisabled:r,onClick:a})]}),v.jsxs(Io,{children:[v.jsx(kt,{"aria-label":`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:v.jsx(TU,{}),isDisabled:r,onClick:s}),v.jsx(kt,{"aria-label":`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:v.jsx(CS,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:c})]}),v.jsx(kt,{"aria-label":`${t("unifiedCanvas.colorPicker")} (C)`,tooltip:`${t("unifiedCanvas.colorPicker")} (C)`,icon:v.jsx(_U,{}),isChecked:n==="colorPicker"&&!r,isDisabled:r,onClick:o,width:"max-content"})]})},AE=_t((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:a,children:o,title:s,triggerComponent:c}=e,{isOpen:d,onOpen:p,onClose:g}=jp(),S=A.useRef(null),w=()=>{r(),g()},C=()=>{a&&a(),g()};return v.jsxs(v.Fragment,{children:[A.cloneElement(c,{onClick:p,ref:t}),v.jsx(OF,{isOpen:d,leastDestructiveRef:S,onClose:g,children:v.jsx(ch,{children:v.jsxs(DF,{children:[v.jsx(uh,{fontSize:"lg",fontWeight:"bold",children:s}),v.jsx(dh,{children:o}),v.jsxs(lh,{children:[v.jsx(mr,{ref:S,onClick:C,children:i}),v.jsx(mr,{colorScheme:"error",onClick:w,ml:3,children:n})]})]})})})]})}),fV=()=>{const e=we(fa),t=nt(),{t:n}=ht(),r=()=>{t(Wee()),t(fk()),t(X6())};return v.jsxs(AE,{title:n("unifiedCanvas.emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.emptyFolder"),triggerComponent:v.jsx(mr,{leftIcon:v.jsx(Dv,{}),size:"sm",isDisabled:e,children:n("unifiedCanvas.emptyTempImageFolder")}),children:[v.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderMessage")}),v.jsx("br",{}),v.jsx("p",{children:n("unifiedCanvas.emptyTempImagesFolderConfirm")})]})},hV=()=>{const e=we(fa),t=nt(),{t:n}=ht();return v.jsxs(AE,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:()=>t(X6()),acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:v.jsx(mr,{size:"sm",leftIcon:v.jsx(Dv,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[v.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),v.jsx("br",{}),v.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},lTe=Gt([xr],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),uTe=()=>{const e=nt(),{t}=ht(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:i,shouldShowIntermediates:a}=we(lTe);return v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{tooltip:t("unifiedCanvas.canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedCanvas.canvasSettings"),icon:v.jsx(mA,{})}),children:v.jsxs(Fe,{direction:"column",gap:2,children:[v.jsx(xi,{label:t("unifiedCanvas.showIntermediates"),isChecked:a,onChange:o=>e(aj(o.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:o=>e($6(o.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:o=>e(ej(o.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:i,onChange:o=>e(rj(o.target.checked))}),v.jsx(hV,{}),v.jsx(fV,{})]})})},cTe=()=>{const e=we(t=>t.ui.shouldShowParametersPanel);return v.jsxs(Fe,{flexDirection:"column",rowGap:2,children:[v.jsx($_e,{}),v.jsx(sTe,{}),v.jsxs(Fe,{gap:2,children:[v.jsx(tTe,{}),v.jsx(iTe,{})]}),v.jsxs(Fe,{columnGap:2,children:[v.jsx(eTe,{}),v.jsx(aTe,{})]}),v.jsxs(Fe,{columnGap:2,children:[v.jsx(X_e,{}),v.jsx(Q_e,{})]}),v.jsxs(Fe,{gap:2,children:[v.jsx(cV,{}),v.jsx(uV,{})]}),v.jsxs(Fe,{gap:2,children:[v.jsx(Z_e,{}),v.jsx(rTe,{})]}),v.jsx(uTe,{}),!e&&v.jsx(nTe,{})]})};function dTe(){const e=nt(),t=we(i=>i.canvas.brushSize),{t:n}=ht(),r=we(fa);return Ot(["BracketLeft"],()=>{e(n0(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),Ot(["BracketRight"],()=>{e(n0(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),v.jsx(ni,{label:n("unifiedCanvas.brushSize"),value:t,withInput:!0,onChange:i=>e(n0(i)),sliderNumberInputProps:{max:500},inputReadOnly:!1,isCompact:!0})}function OE(){return(OE=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function nO(e){var t=A.useRef(e),n=A.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var vy=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?a(mV(i.current,P,s.current)):k(!1)},C=function(){return k(!1)};function k(P){var D=c.current,M=rO(i.current),R=P?M.addEventListener:M.removeEventListener;R(D?"touchmove":"mousemove",w),R(D?"touchend":"mouseup",C)}return[function(P){var D=P.nativeEvent,M=i.current;if(M&&(vV(D),!function(L,z){return z&&!OS(L)}(D,c.current)&&M)){if(OS(D)){c.current=!0;var R=D.changedTouches||[];R.length&&(s.current=R[0].identifier)}M.focus(),a(mV(M,D,s.current)),k(!0)}},function(P){var D=P.which||P.keyCode;D<37||D>40||(P.preventDefault(),o({left:D===39?.05:D===37?-.05:0,top:D===40?.05:D===38?-.05:0}))},k]},[o,a]),p=d[0],g=d[1],S=d[2];return A.useEffect(function(){return S},[S]),A.createElement("div",OE({},r,{onTouchStart:p,onMouseDown:p,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"}))}),DE=function(e){return e.filter(Boolean).join(" ")},aO=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,a=DE(["react-colorful__pointer",e.className]);return A.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},A.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Ws=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Ws(e.h),s:Ws(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Ws(i/2),a:Ws(r,2)}},oO=function(e){var t=gV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},sO=function(e){var t=gV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},fTe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),d=a%6;return{r:Ws(255*[r,s,o,o,c,r][d]),g:Ws(255*[c,r,r,s,o,o][d]),b:Ws(255*[o,o,c,r,r,s][d]),a:Ws(i,2)}},hTe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:Ws(60*(s<0?s+6:s)),s:Ws(a?o/a*100:0),v:Ws(a/255*100),a:i}},pTe=A.memo(function(e){var t=e.hue,n=e.onChange,r=DE(["react-colorful__hue",e.className]);return A.createElement("div",{className:r},A.createElement(iO,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:vy(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Ws(t),"aria-valuemax":"360","aria-valuemin":"0"},A.createElement(aO,{className:"react-colorful__hue-pointer",left:t/360,color:oO({h:t,s:100,v:100,a:1})})))}),mTe=A.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:oO({h:t.h,s:100,v:100,a:1})};return A.createElement("div",{className:"react-colorful__saturation",style:r},A.createElement(iO,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:vy(t.s+100*i.left,0,100),v:vy(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Ws(t.s)+"%, Brightness "+Ws(t.v)+"%"},A.createElement(aO,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:oO(t)})))}),yV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function vTe(e,t,n){var r=nO(n),i=A.useState(function(){return e.toHsva(t)}),a=i[0],o=i[1],s=A.useRef({color:t,hsva:a});A.useEffect(function(){if(!e.equal(t,s.current.color)){var d=e.toHsva(t);s.current={hsva:d,color:t},o(d)}},[t,e]),A.useEffect(function(){var d;yV(a,s.current.hsva)||e.equal(d=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:d},r(d))},[a,e,r]);var c=A.useCallback(function(d){o(function(p){return Object.assign({},p,d)})},[]);return[a,c]}var gTe=typeof window<"u"?A.useLayoutEffect:A.useEffect,yTe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},bV=new Map,bTe=function(e){gTe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!bV.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}`,bV.set(t,n);var r=yTe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},STe=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+sO(Object.assign({},n,{a:0}))+", "+sO(Object.assign({},n,{a:1}))+")"},a=DE(["react-colorful__alpha",t]),o=Ws(100*n.a);return A.createElement("div",{className:a},A.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),A.createElement(iO,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:vy(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":o+"%","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":"100"},A.createElement(aO,{className:"react-colorful__alpha-pointer",left:n.a,color:sO(n)})))},xTe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,a=e.onChange,o=pV(e,["className","colorModel","color","onChange"]),s=A.useRef(null);bTe(s);var c=vTe(n,i,a),d=c[0],p=c[1],g=DE(["react-colorful",t]);return A.createElement("div",OE({},o,{ref:s,className:g}),A.createElement(mTe,{hsva:d,onChange:p}),A.createElement(pTe,{hue:d.h,onChange:p}),A.createElement(STe,{hsva:d,onChange:p,className:"react-colorful__last-control"}))},wTe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:hTe,fromHsva:fTe,equal:yV},CTe=function(e){return A.createElement(xTe,OE({},e,{colorModel:wTe}))};const ETe=ct(CTe,{baseStyle:{paddingInline:4},shouldForwardProp:e=>!["pickerColor"].includes(e)}),lO={width:6,height:6,borderColor:"base.100"},ME=e=>{const{styleClass:t="",...n}=e;return v.jsx(ETe,{sx:{".react-colorful__hue-pointer":lO,".react-colorful__saturation-pointer":lO,".react-colorful__alpha-pointer":lO},className:t,...n})},_Te=Gt([xr,fa],(e,t)=>{const{brushColor:n,maskColor:r,layer:i}=e;return{brushColor:n,maskColor:r,layer:i,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function TTe(){const e=nt(),{brushColor:t,maskColor:n,layer:r,isStaging:i}=we(_Te),a=()=>{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 Ot(["shift+BracketLeft"],()=>{e(t0({...t,a:Je.clamp(t.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),Ot(["shift+BracketRight"],()=>{e(t0({...t,a:Je.clamp(t.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(Bn,{sx:{width:7,height:7,minWidth:7,minHeight:7,borderRadius:"full",bg:a(),cursor:"pointer"}}),children:v.jsxs(Fe,{minWidth:60,direction:"column",gap:4,width:"100%",children:[r==="base"&&v.jsx(ME,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:t,onChange:o=>e(t0(o))}),r==="mask"&&v.jsx(ME,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:n,onChange:o=>e(J6(o))})]})})}function SV(){return v.jsxs(Fe,{columnGap:4,alignItems:"center",children:[v.jsx(dTe,{}),v.jsx(TTe,{})]})}function kTe(){const e=nt(),t=we(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=ht();return v.jsx(xi,{label:n("unifiedCanvas.betaLimitToBox"),isChecked:t,onChange:r=>e(lj(r.target.checked))})}function PTe(){return v.jsxs(Fe,{gap:4,alignItems:"center",children:[v.jsx(SV,{}),v.jsx(kTe,{})]})}function ATe(){const e=nt(),{t}=ht(),n=()=>e(dk());return v.jsx(mr,{size:"sm",leftIcon:v.jsx(Dv,{}),onClick:n,tooltip:`${t("unifiedCanvas.clearMask")} (Shift+C)`,children:t("unifiedCanvas.betaClear")})}function OTe(){const e=we(i=>i.canvas.isMaskEnabled),t=nt(),{t:n}=ht(),r=()=>t(Gb(!e));return v.jsx(xi,{label:`${n("unifiedCanvas.enableMask")} (H)`,isChecked:e,onChange:r})}function DTe(){const e=nt(),{t}=ht(),n=we(r=>r.canvas.shouldPreserveMaskedArea);return v.jsx(xi,{label:t("unifiedCanvas.betaPreserveMasked"),isChecked:n,onChange:r=>e(nj(r.target.checked))})}function MTe(){return v.jsxs(Fe,{gap:4,alignItems:"center",children:[v.jsx(SV,{}),v.jsx(OTe,{}),v.jsx(DTe,{}),v.jsx(ATe,{})]})}function jTe(){const e=we(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=nt(),{t:n}=ht();return v.jsx(xi,{label:n("unifiedCanvas.betaDarkenOutside"),isChecked:e,onChange:r=>t(tj(r.target.checked))})}function ITe(){const e=we(r=>r.canvas.shouldShowGrid),t=nt(),{t:n}=ht();return v.jsx(xi,{label:n("unifiedCanvas.showGrid"),isChecked:e,onChange:r=>t(ij(r.target.checked))})}function RTe(){const e=we(i=>i.canvas.shouldSnapToGrid),t=nt(),{t:n}=ht(),r=i=>t(N2(i.target.checked));return v.jsx(xi,{label:`${n("unifiedCanvas.snapToGrid")} (N)`,isChecked:e,onChange:r})}function NTe(){return v.jsxs(Fe,{alignItems:"center",gap:4,children:[v.jsx(ITe,{}),v.jsx(RTe,{}),v.jsx(jTe,{})]})}const LTe=Gt([xr],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function zTe(){const{tool:e,layer:t}=we(LTe);return v.jsxs(Fe,{height:8,minHeight:8,maxHeight:8,alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&v.jsx(PTe,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&v.jsx(MTe,{}),e=="move"&&v.jsx(NTe,{})]})}const BTe=Gt([xr],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),FTe=()=>{const e=nt(),{doesCanvasNeedScaling:t}=we(BTe);return A.useLayoutEffect(()=>{e(Wo(!0));const n=Je.debounce(()=>{e(Wo(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),v.jsx(Bn,{sx:{width:"100%",height:"100%",borderRadius:"base",bg:"base.850"},children:v.jsxs(Fe,{flexDirection:"row",width:"100%",height:"100%",columnGap:4,padding:4,children:[v.jsx(cTe,{}),v.jsxs(Fe,{width:"100%",height:"100%",flexDirection:"column",rowGap:4,children:[v.jsx(zTe,{}),t?v.jsx(lV,{}):v.jsx(sV,{})]})]})})},UTe=Gt([xr,fa],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:i,shouldPreserveMaskedArea:a}=e;return{layer:r,maskColor:n,maskColorString:Nv(n),isMaskEnabled:i,shouldPreserveMaskedArea:a,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),HTe=()=>{const e=nt(),{t}=ht(),{layer:n,maskColor:r,isMaskEnabled:i,shouldPreserveMaskedArea:a,isStaging:o}=we(UTe);Ot(["q"],()=>{s()},{enabled:()=>!o,preventDefault:!0},[n]),Ot(["shift+c"],()=>{c()},{enabled:()=>!o,preventDefault:!0},[]),Ot(["h"],()=>{d()},{enabled:()=>!o,preventDefault:!0},[i]);const s=()=>{e(R2(n==="mask"?"base":"mask"))},c=()=>e(dk()),d=()=>e(Gb(!i));return v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(Io,{children:v.jsx(kt,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:v.jsx(Ixe,{}),isChecked:n==="mask",isDisabled:o})}),children:v.jsxs(Fe,{direction:"column",gap:2,children:[v.jsx(xi,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:i,onChange:d}),v.jsx(xi,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:a,onChange:p=>e(nj(p.target.checked))}),v.jsx(ME,{sx:{paddingTop:2,paddingBottom:2},pickerColor:r,onChange:p=>e(J6(p))}),v.jsxs(mr,{size:"sm",leftIcon:v.jsx(Dv,{}),onClick:c,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},VTe=Gt([xr],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:a,shouldShowIntermediates:o,shouldSnapToGrid:s,shouldRestrictStrokesToBox:c}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:a,shouldShowIntermediates:o,shouldSnapToGrid:s,shouldRestrictStrokesToBox:c}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),GTe=()=>{const e=nt(),{t}=ht(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:i,shouldShowCanvasDebugInfo:a,shouldShowGrid:o,shouldShowIntermediates:s,shouldSnapToGrid:c,shouldRestrictStrokesToBox:d}=we(VTe);Ot(["n"],()=>{e(N2(!c))},{enabled:!0,preventDefault:!0},[c]);const p=g=>e(N2(g.target.checked));return v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:v.jsx(mA,{})}),children:v.jsxs(Fe,{direction:"column",gap:2,children:[v.jsx(xi,{label:t("unifiedCanvas.showIntermediates"),isChecked:s,onChange:g=>e(aj(g.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.showGrid"),isChecked:o,onChange:g=>e(ij(g.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.snapToGrid"),isChecked:c,onChange:p}),v.jsx(xi,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:i,onChange:g=>e(tj(g.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:g=>e($6(g.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:g=>e(ej(g.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:d,onChange:g=>e(lj(g.target.checked))}),v.jsx(xi,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:a,onChange:g=>e(rj(g.target.checked))}),v.jsx(hV,{}),v.jsx(fV,{})]})})},WTe=Gt([xr,fa,zi],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:a,brushSize:o}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:a,brushSize:o}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),qTe=()=>{const e=nt(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=we(WTe),{t:a}=ht();Ot(["b"],()=>{o()},{enabled:()=>!i,preventDefault:!0},[]),Ot(["e"],()=>{s()},{enabled:()=>!i,preventDefault:!0},[t]),Ot(["c"],()=>{c()},{enabled:()=>!i,preventDefault:!0},[t]),Ot(["shift+f"],()=>{d()},{enabled:()=>!i,preventDefault:!0}),Ot(["delete","backspace"],()=>{p()},{enabled:()=>!i,preventDefault:!0}),Ot(["BracketLeft"],()=>{e(n0(Math.max(r-5,5)))},{enabled:()=>!i,preventDefault:!0},[r]),Ot(["BracketRight"],()=>{e(n0(Math.min(r+5,500)))},{enabled:()=>!i,preventDefault:!0},[r]),Ot(["shift+BracketLeft"],()=>{e(t0({...n,a:Je.clamp(n.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]),Ot(["shift+BracketRight"],()=>{e(t0({...n,a:Je.clamp(n.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]);const o=()=>e(Sd("brush")),s=()=>e(Sd("eraser")),c=()=>e(Sd("colorPicker")),d=()=>e(Y6()),p=()=>e(q6());return v.jsxs(Io,{isAttached:!0,children:[v.jsx(kt,{"aria-label":`${a("unifiedCanvas.brush")} (B)`,tooltip:`${a("unifiedCanvas.brush")} (B)`,icon:v.jsx(PU,{}),isChecked:t==="brush"&&!i,onClick:o,isDisabled:i}),v.jsx(kt,{"aria-label":`${a("unifiedCanvas.eraser")} (E)`,tooltip:`${a("unifiedCanvas.eraser")} (E)`,icon:v.jsx(EU,{}),isChecked:t==="eraser"&&!i,isDisabled:i,onClick:s}),v.jsx(kt,{"aria-label":`${a("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${a("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:v.jsx(TU,{}),isDisabled:i,onClick:d}),v.jsx(kt,{"aria-label":`${a("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${a("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:v.jsx(CS,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:p}),v.jsx(kt,{"aria-label":`${a("unifiedCanvas.colorPicker")} (C)`,tooltip:`${a("unifiedCanvas.colorPicker")} (C)`,icon:v.jsx(_U,{}),isChecked:t==="colorPicker"&&!i,isDisabled:i,onClick:c}),v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{"aria-label":a("unifiedCanvas.brushOptions"),tooltip:a("unifiedCanvas.brushOptions"),icon:v.jsx(pA,{})}),children:v.jsxs(Fe,{minWidth:60,direction:"column",gap:4,width:"100%",children:[v.jsx(Fe,{gap:4,justifyContent:"space-between",children:v.jsx(ni,{label:a("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:g=>e(n0(g)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),v.jsx(ME,{sx:{width:"100%",paddingTop:2,paddingBottom:2},pickerColor:n,onChange:g=>e(t0(g))})]})})]})},YTe=Gt([zi,xr,fa],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:a,layer:o,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:o,shouldCropToBoundingBoxOnSave:a}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),KTe=()=>{const e=nt(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:a,shouldCropToBoundingBoxOnSave:o}=we(YTe),s=Mc(),{t:c}=ht(),{openUploader:d}=rA();Ot(["v"],()=>{p()},{enabled:()=>!n,preventDefault:!0},[]),Ot(["r"],()=>{S()},{enabled:()=>!0,preventDefault:!0},[s]),Ot(["shift+m"],()=>{C()},{enabled:()=>!n,preventDefault:!0},[s,t]),Ot(["shift+s"],()=>{k()},{enabled:()=>!n,preventDefault:!0},[s,t]),Ot(["meta+c","ctrl+c"],()=>{P()},{enabled:()=>!n,preventDefault:!0},[s,t]),Ot(["shift+d"],()=>{D()},{enabled:()=>!n,preventDefault:!0},[s,t]);const p=()=>e(Sd("move")),g=dV(()=>S(!1),()=>S(!0)),S=(R=!1)=>{const L=Mc();if(!L)return;const z=L.getClientRect({skipTransform:!0});e(Q6({contentRect:z,shouldScaleTo1:R}))},w=()=>{e(fk()),e(D2())},C=()=>{e(qp({cropVisible:!1,shouldSetAsInitialImage:!0}))},k=()=>{e(qp({cropVisible:!o,cropToBoundingBox:o,shouldSaveToGallery:!0}))},P=()=>{e(qp({cropVisible:!o,cropToBoundingBox:o,shouldCopy:!0}))},D=()=>{e(qp({cropVisible:!o,cropToBoundingBox:o,shouldDownload:!0}))},M=R=>{const L=R.target.value;e(R2(L)),L==="mask"&&!r&&e(Gb(!0))};return v.jsxs(Fe,{sx:{alignItems:"center",gap:2},children:[v.jsx(xl,{tooltip:`${c("unifiedCanvas.layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:G6,onChange:M,isDisabled:n}),v.jsx(HTe,{}),v.jsx(qTe,{}),v.jsxs(Io,{isAttached:!0,children:[v.jsx(kt,{"aria-label":`${c("unifiedCanvas.move")} (V)`,tooltip:`${c("unifiedCanvas.move")} (V)`,icon:v.jsx(xU,{}),isChecked:a==="move"||n,onClick:p}),v.jsx(kt,{"aria-label":`${c("unifiedCanvas.resetView")} (R)`,tooltip:`${c("unifiedCanvas.resetView")} (R)`,icon:v.jsx(CU,{}),onClick:g})]}),v.jsxs(Io,{isAttached:!0,children:[v.jsx(kt,{"aria-label":`${c("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${c("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:v.jsx(kU,{}),onClick:C,isDisabled:n}),v.jsx(kt,{"aria-label":`${c("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${c("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:v.jsx(hA,{}),onClick:k,isDisabled:n}),v.jsx(kt,{"aria-label":`${c("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${c("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:v.jsx(cy,{}),onClick:P,isDisabled:n}),v.jsx(kt,{"aria-label":`${c("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${c("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:v.jsx(fA,{}),onClick:D,isDisabled:n})]}),v.jsxs(Io,{isAttached:!0,children:[v.jsx(cV,{}),v.jsx(uV,{})]}),v.jsxs(Io,{isAttached:!0,children:[v.jsx(kt,{"aria-label":`${c("common.upload")}`,tooltip:`${c("common.upload")}`,icon:v.jsx(dE,{}),onClick:d,isDisabled:n}),v.jsx(kt,{"aria-label":`${c("unifiedCanvas.clearCanvas")}`,tooltip:`${c("unifiedCanvas.clearCanvas")}`,icon:v.jsx(Dv,{}),onClick:w,colorScheme:"error",isDisabled:n})]}),v.jsx(Io,{isAttached:!0,children:v.jsx(GTe,{})})]})},XTe=Gt([xr],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),QTe=()=>{const e=nt(),{doesCanvasNeedScaling:t}=we(XTe);return A.useLayoutEffect(()=>{e(Wo(!0));const n=Je.debounce(()=>{e(Wo(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),v.jsx(Bn,{sx:{width:"100%",height:"100%",padding:4,borderRadius:"base",bg:"base.850"},children:v.jsxs(Fe,{sx:{flexDirection:"column",alignItems:"center",gap:4,width:"100%",height:"100%"},children:[v.jsx(KTe,{}),v.jsx(Fe,{sx:{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,width:"100%",height:"100%"},children:t?v.jsx(lV,{}):v.jsx(sV,{})})]})})},ZTe=Gt(xr,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),JTe=()=>{const e=nt(),{boundingBoxDimensions:t}=we(ZTe),{t:n}=ht(),r=s=>{e(Vb({...t,width:Math.floor(s)}))},i=s=>{e(Vb({...t,height:Math.floor(s)}))},a=()=>{e(Vb({...t,width:Math.floor(512)}))},o=()=>{e(Vb({...t,height:Math.floor(512)}))};return v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(ni,{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:a}),v.jsx(ni,{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:o})]})},$Te=Gt([MA,zi,xr],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:a}=t,{boundingBoxScaleMethod:o,scaledBoundingBoxDimensions:s}=n;return{boundingBoxScale:o,scaledBoundingBoxDimensions:s,tileSize:r,infillMethod:i,availableInfillMethods:a,isManual:o==="manual"}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),eke=()=>{const e=nt(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:i,isManual:a,scaledBoundingBoxDimensions:o}=we($Te),{t:s}=ht(),c=w=>{e(L2({...o,width:Math.floor(w)}))},d=w=>{e(L2({...o,height:Math.floor(w)}))},p=()=>{e(L2({...o,width:Math.floor(512)}))},g=()=>{e(L2({...o,height:Math.floor(512)}))},S=w=>{e(KK(w.target.value))};return v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(xl,{label:s("parameters.scaleBeforeProcessing"),validValues:MK,value:i,onChange:S}),v.jsx(ni,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:s("parameters.scaledWidth"),min:64,max:1024,step:64,value:o.width,onChange:c,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:p}),v.jsx(ni,{isInputDisabled:!a,isResetDisabled:!a,isSliderDisabled:!a,label:s("parameters.scaledHeight"),min:64,max:1024,step:64,value:o.height,onChange:d,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,inputReadOnly:!0,withReset:!0,handleReset:g}),v.jsx(xl,{label:s("parameters.infillMethod"),value:n,validValues:r,onChange:w=>e(xj(w.target.value))}),v.jsx(ni,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",label:s("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:w=>{e(Ij(w))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(Ij(32))}})]})};function tke(){const e=nt(),t=we(r=>r.generation.seamBlur),{t:n}=ht();return v.jsx(ni,{label:n("parameters.seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r=>{e(kj(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(kj(16))}})}function nke(){const e=nt(),{t}=ht(),n=we(r=>r.generation.seamSize);return v.jsx(ni,{label:t("parameters.seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:n,onChange:r=>{e(Aj(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>e(Aj(96))})}function rke(){const{t:e}=ht(),t=we(r=>r.generation.seamSteps),n=nt();return v.jsx(ni,{label:e("parameters.seamSteps"),min:1,max:100,sliderNumberInputProps:{max:999},value:t,onChange:r=>{n(Oj(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{n(Oj(30))}})}function ike(){const e=nt(),{t}=ht(),n=we(r=>r.generation.seamStrength);return v.jsx(ni,{label:t("parameters.seamStrength"),min:.01,max:.99,step:.01,value:n,onChange:r=>{e(Dj(r))},withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:()=>{e(Dj(.7))}})}const ake=()=>v.jsxs(jn,{gap:2,alignItems:"stretch",children:[v.jsx(nke,{}),v.jsx(tke,{}),v.jsx(ike,{}),v.jsx(rke,{})]});function oke(){const{t:e}=ht(),t={general:{header:`${e("parameters.general")}`,feature:void 0,content:v.jsx(HA,{})},unifiedCanvasImg2Img:{header:`${e("parameters.imageToImage")}`,feature:void 0,content:v.jsx(BH,{label:e("parameters.img2imgStrength")})},seed:{header:`${e("parameters.seed")}`,feature:gs.SEED,content:v.jsx(BA,{})},boundingBox:{header:`${e("parameters.boundingBoxHeader")}`,feature:gs.BOUNDING_BOX,content:v.jsx(JTe,{})},seamCorrection:{header:`${e("parameters.seamCorrectionHeader")}`,feature:gs.SEAM_CORRECTION,content:v.jsx(ake,{})},infillAndScaling:{header:`${e("parameters.infillScalingHeader")}`,feature:gs.INFILL_AND_SCALING,content:v.jsx(eke,{})},variations:{header:`${e("parameters.variations")}`,feature:gs.VARIATIONS,content:v.jsx(UA,{}),additionalHeaderComponents:v.jsx(FA,{})},symmetry:{header:`${e("parameters.symmetry")}`,content:v.jsx(LA,{}),additionalHeaderComponents:v.jsx(zA,{})}};return v.jsxs(YA,{children:[v.jsxs(Fe,{flexDir:"column",rowGap:2,children:[v.jsx(qA,{}),v.jsx(WA,{})]}),v.jsx(GA,{}),v.jsx(VA,{accordionInfo:t})]})}function ske(){const e=we(t=>t.ui.shouldUseCanvasBetaLayout);return v.jsx(NA,{optionsPanel:v.jsx(oke,{}),children:e?v.jsx(FTe,{}):v.jsx(QTe,{})})}const eu={txt2img:{title:v.jsx(da,{as:l2e,boxSize:6}),workarea:v.jsx(GCe,{}),tooltip:"Text To Image"},img2img:{title:v.jsx(da,{as:yA,boxSize:6}),workarea:v.jsx(LCe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:v.jsx(da,{as:d2e,boxSize:6}),workarea:v.jsx(ske,{}),tooltip:"Unified Canvas"},nodes:{title:v.jsx(da,{as:u2e,boxSize:6}),workarea:v.jsx(LSe,{}),tooltip:"Nodes"},postprocess:{title:v.jsx(da,{as:f2e,boxSize:6}),workarea:v.jsx(zSe,{}),tooltip:"Post Processing"},training:{title:v.jsx(da,{as:c2e,boxSize:6}),workarea:v.jsx(BSe,{}),tooltip:"Training"}};function lke(){eu.txt2img.tooltip=En.t("common.text2img"),eu.img2img.tooltip=En.t("common.img2img"),eu.unifiedCanvas.tooltip=En.t("common.unifiedCanvas"),eu.nodes.tooltip=En.t("common.nodes"),eu.postprocess.tooltip=En.t("common.postProcessing"),eu.training.tooltip=En.t("common.training")}function uke(){const e=we(NSe),t=we(d=>d.lightbox.isLightboxOpen),{shouldShowGallery:n,shouldShowParametersPanel:r,shouldPinGallery:i,shouldPinParametersPanel:a}=we(RA);FSe(lke);const o=nt();Ot("1",()=>{o(pl(0))}),Ot("2",()=>{o(pl(1))}),Ot("3",()=>{o(pl(2))}),Ot("4",()=>{o(pl(3))}),Ot("5",()=>{o(pl(4))}),Ot("6",()=>{o(pl(5))}),Ot("z",()=>{o(Xm(!t))},[t]),Ot("f",()=>{n||r?(o(Zm(!1)),o(Km(!1))):(o(Zm(!0)),o(Km(!0))),(i||a)&&setTimeout(()=>o(Wo(!0)),400)},[n,r]);const s=()=>{const d=[];return Object.keys(eu).forEach(p=>{d.push(v.jsx(so,{hasArrow:!0,label:eu[p].tooltip,placement:"end",children:v.jsxs(oU,{children:[v.jsx(S7,{children:eu[p].tooltip}),eu[p].title]})},p))}),d},c=()=>{const d=[];return Object.keys(eu).forEach(p=>{d.push(v.jsx(iU,{children:eu[p].workarea},p))}),d};return v.jsxs(nU,{isLazy:!0,defaultIndex:e,index:e,onChange:d=>{o(pl(d))},children:[v.jsx(rU,{children:s()}),v.jsx(aU,{children:t?v.jsx(tCe,{}):c()})]})}var cke=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 DS(e,t){var n=dke(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 dke(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=cke.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var fke=[".DS_Store","Thumbs.db"];function hke(e){return W0(this,void 0,void 0,function(){return q0(this,function(t){return jE(e)&&pke(e.dataTransfer)?[2,yke(e.dataTransfer,e.type)]:mke(e)?[2,vke(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,gke(e)]:[2,[]]})})}function pke(e){return jE(e)}function mke(e){return jE(e)&&jE(e.target)}function jE(e){return typeof e=="object"&&e!==null}function vke(e){return uO(e.target.files).map(function(t){return DS(t)})}function gke(e){return W0(this,void 0,void 0,function(){var t;return q0(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 DS(r)})]}})})}function yke(e,t){return W0(this,void 0,void 0,function(){var n,r;return q0(this,function(i){switch(i.label){case 0:return e.items?(n=uO(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(bke))]):[3,2];case 1:return r=i.sent(),[2,xV(wV(r))];case 2:return[2,xV(uO(e.files).map(function(a){return DS(a)}))]}})})}function xV(e){return e.filter(function(t){return fke.indexOf(t.name)===-1})}function uO(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,OV(n)];if(e.sizen)return[!1,OV(n)]}return[!0,null]}function zv(e){return e!=null}function Rke(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(c){var d=MV(c,n),p=MS(d,1),g=p[0],S=jV(c,r,i),w=MS(S,1),C=w[0],k=s?s(c):null;return g&&C&&!k})}function IE(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function RE(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 IV(e){e.preventDefault()}function Nke(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Lke(e){return e.indexOf("Edge/")!==-1}function zke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Nke(e)||Lke(e)}function Wd(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),o=1;oe.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 t4e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var pO=A.forwardRef(function(e,t){var n=e.children,r=NE(e,Gke),i=FV(r),a=i.open,o=NE(i,Wke);return A.useImperativeHandle(t,function(){return{open:a}},[a]),A.createElement(A.Fragment,null,n(ha(ha({},o),{},{open:a})))});pO.displayName="Dropzone";var BV={disabled:!1,getFilesFromEvent:hke,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};pO.defaultProps=BV,pO.propTypes={children:pt.func,accept:pt.objectOf(pt.arrayOf(pt.string)),multiple:pt.bool,preventDropOnDocument:pt.bool,noClick:pt.bool,noKeyboard:pt.bool,noDrag:pt.bool,noDragEventsBubbling:pt.bool,minSize:pt.number,maxSize:pt.number,maxFiles:pt.number,disabled:pt.bool,getFilesFromEvent:pt.func,onFileDialogCancel:pt.func,onFileDialogOpen:pt.func,useFsAccessApi:pt.bool,autoFocus:pt.bool,onDragEnter:pt.func,onDragLeave:pt.func,onDragOver:pt.func,onDrop:pt.func,onDropAccepted:pt.func,onDropRejected:pt.func,onError:pt.func,validator:pt.func};var mO={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function FV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ha(ha({},BV),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,d=t.onDragEnter,p=t.onDragLeave,g=t.onDragOver,S=t.onDrop,w=t.onDropAccepted,C=t.onDropRejected,k=t.onFileDialogCancel,P=t.onFileDialogOpen,D=t.useFsAccessApi,M=t.autoFocus,R=t.preventDropOnDocument,L=t.noClick,z=t.noKeyboard,U=t.noDrag,H=t.noDragEventsBubbling,q=t.onError,J=t.validator,$=A.useMemo(function(){return Uke(n)},[n]),K=A.useMemo(function(){return Fke(n)},[n]),fe=A.useMemo(function(){return typeof P=="function"?P:UV},[P]),X=A.useMemo(function(){return typeof k=="function"?k:UV},[k]),G=A.useRef(null),te=A.useRef(null),oe=A.useReducer(n4e,mO),ie=dO(oe,2),re=ie[0],le=ie[1],ee=re.isFocused,de=re.isFileDialogActive,Re=A.useRef(typeof window<"u"&&window.isSecureContext&&D&&Bke()),Ae=function(){!Re.current&&de&&setTimeout(function(){if(te.current){var ot=te.current.files;ot.length||(le({type:"closeDialog"}),X())}},300)};A.useEffect(function(){return window.addEventListener("focus",Ae,!1),function(){window.removeEventListener("focus",Ae,!1)}},[te,de,X,Re]);var _e=A.useRef([]),Me=function(ot){G.current&&G.current.contains(ot.target)||(ot.preventDefault(),_e.current=[])};A.useEffect(function(){return R&&(document.addEventListener("dragover",IV,!1),document.addEventListener("drop",Me,!1)),function(){R&&(document.removeEventListener("dragover",IV),document.removeEventListener("drop",Me))}},[G,R]),A.useEffect(function(){return!r&&M&&G.current&&G.current.focus(),function(){}},[G,M,r]);var Te=A.useCallback(function(Ve){q?q(Ve):console.error(Ve)},[q]),Xe=A.useCallback(function(Ve){Ve.preventDefault(),Ve.persist(),xe(Ve),_e.current=[].concat(Kke(_e.current),[Ve.target]),RE(Ve)&&Promise.resolve(i(Ve)).then(function(ot){if(!(IE(Ve)&&!H)){var Jt=ot.length,rn=Jt>0&&Rke({files:ot,accept:$,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:J}),$e=Jt>0&&!rn;le({isDragAccept:rn,isDragReject:$e,isDragActive:!0,type:"setDraggedFiles"}),d&&d(Ve)}}).catch(function(ot){return Te(ot)})},[i,d,Te,H,$,o,a,s,c,J]),Qe=A.useCallback(function(Ve){Ve.preventDefault(),Ve.persist(),xe(Ve);var ot=RE(Ve);if(ot&&Ve.dataTransfer)try{Ve.dataTransfer.dropEffect="copy"}catch{}return ot&&g&&g(Ve),!1},[g,H]),vt=A.useCallback(function(Ve){Ve.preventDefault(),Ve.persist(),xe(Ve);var ot=_e.current.filter(function(rn){return G.current&&G.current.contains(rn)}),Jt=ot.indexOf(Ve.target);Jt!==-1&&ot.splice(Jt,1),_e.current=ot,!(ot.length>0)&&(le({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),RE(Ve)&&p&&p(Ve))},[G,p,H]),St=A.useCallback(function(Ve,ot){var Jt=[],rn=[];Ve.forEach(function($e){var an=MV($e,$),Nn=dO(an,2),st=Nn[0],Ge=Nn[1],mt=jV($e,o,a),Ft=dO(mt,2),In=Ft[0],Hn=Ft[1],jt=J?J($e):null;if(st&&In&&!jt)Jt.push($e);else{var zt=[Ge,Hn];jt&&(zt=zt.concat(jt)),rn.push({file:$e,errors:zt.filter(function(vr){return vr})})}}),(!s&&Jt.length>1||s&&c>=1&&Jt.length>c)&&(Jt.forEach(function($e){rn.push({file:$e,errors:[Ike]})}),Jt.splice(0)),le({acceptedFiles:Jt,fileRejections:rn,type:"setFiles"}),S&&S(Jt,rn,ot),rn.length>0&&C&&C(rn,ot),Jt.length>0&&w&&w(Jt,ot)},[le,s,$,o,a,c,S,w,C,J]),qe=A.useCallback(function(Ve){Ve.preventDefault(),Ve.persist(),xe(Ve),_e.current=[],RE(Ve)&&Promise.resolve(i(Ve)).then(function(ot){IE(Ve)&&!H||St(ot,Ve)}).catch(function(ot){return Te(ot)}),le({type:"reset"})},[i,St,Te,H]),Ce=A.useCallback(function(){if(Re.current){le({type:"openDialog"}),fe();var Ve={multiple:s,types:K};window.showOpenFilePicker(Ve).then(function(ot){return i(ot)}).then(function(ot){St(ot,null),le({type:"closeDialog"})}).catch(function(ot){Hke(ot)?(X(ot),le({type:"closeDialog"})):Vke(ot)?(Re.current=!1,te.current?(te.current.value=null,te.current.click()):Te(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."))):Te(ot)});return}te.current&&(le({type:"openDialog"}),fe(),te.current.value=null,te.current.click())},[le,fe,X,D,St,Te,K,s]),Lt=A.useCallback(function(Ve){!G.current||!G.current.isEqualNode(Ve.target)||(Ve.key===" "||Ve.key==="Enter"||Ve.keyCode===32||Ve.keyCode===13)&&(Ve.preventDefault(),Ce())},[G,Ce]),De=A.useCallback(function(){le({type:"focus"})},[]),wt=A.useCallback(function(){le({type:"blur"})},[]),ln=A.useCallback(function(){L||(zke()?setTimeout(Ce,0):Ce())},[L,Ce]),Wt=function(ot){return r?null:ot},Rn=function(ot){return z?null:Wt(ot)},ar=function(ot){return U?null:Wt(ot)},xe=function(ot){H&&ot.stopPropagation()},it=A.useMemo(function(){return function(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ot=Ve.refKey,Jt=ot===void 0?"ref":ot,rn=Ve.role,$e=Ve.onKeyDown,an=Ve.onFocus,Nn=Ve.onBlur,st=Ve.onClick,Ge=Ve.onDragEnter,mt=Ve.onDragOver,Ft=Ve.onDragLeave,In=Ve.onDrop,Hn=NE(Ve,qke);return ha(ha(hO({onKeyDown:Rn(Wd($e,Lt)),onFocus:Rn(Wd(an,De)),onBlur:Rn(Wd(Nn,wt)),onClick:Wt(Wd(st,ln)),onDragEnter:ar(Wd(Ge,Xe)),onDragOver:ar(Wd(mt,Qe)),onDragLeave:ar(Wd(Ft,vt)),onDrop:ar(Wd(In,qe)),role:typeof rn=="string"&&rn!==""?rn:"presentation"},Jt,G),!r&&!z?{tabIndex:0}:{}),Hn)}},[G,Lt,De,wt,ln,Xe,Qe,vt,qe,z,U,r]),at=A.useCallback(function(Ve){Ve.stopPropagation()},[]),bt=A.useMemo(function(){return function(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ot=Ve.refKey,Jt=ot===void 0?"ref":ot,rn=Ve.onChange,$e=Ve.onClick,an=NE(Ve,Yke),Nn=hO({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:Wt(Wd(rn,qe)),onClick:Wt(Wd($e,at)),tabIndex:-1},Jt,te);return ha(ha({},Nn),an)}},[te,n,s,qe,r]);return ha(ha({},re),{},{isFocused:ee&&!r,getRootProps:it,getInputProps:bt,rootRef:G,inputRef:te,open:Wt(Ce)})}function n4e(e,t){switch(t.type){case"focus":return ha(ha({},e),{},{isFocused:!0});case"blur":return ha(ha({},e),{},{isFocused:!1});case"openDialog":return ha(ha({},mO),{},{isFileDialogActive:!0});case"closeDialog":return ha(ha({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ha(ha({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ha(ha({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ha({},mO);default:return e}}function UV(){}const r4e=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return Ot("esc",()=>{i(!1)}),v.jsx(Bn,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"100vw",height:"100vh",zIndex:999,backdropFilter:"blur(20px)"},children:v.jsx(Fe,{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?v.jsxs(Vu,{size:"lg",children:["Upload Image",r]}):v.jsxs(v.Fragment,{children:[v.jsx(Vu,{size:"lg",children:"Invalid Upload"}),v.jsx(Vu,{size:"md",children:"Must be single JPEG or PNG image"})]})})})},i4e=e=>{const{children:t}=e,n=nt(),r=we(Na),i=oS({}),{t:a}=ht(),[o,s]=A.useState(!1),{setOpenUploader:c}=rA(),d=A.useCallback(R=>{s(!0);const L=R.errors.reduce((z,U)=>`${z} ${U.message}`,"");i({title:a("toast.uploadFailed"),description:L,status:"error",isClosable:!0})},[a,i]),p=A.useCallback(async R=>{n(uU({imageFile:R}))},[n]),g=A.useCallback((R,L)=>{L.forEach(z=>{d(z)}),R.forEach(z=>{p(z)})},[p,d]),{getRootProps:S,getInputProps:w,isDragAccept:C,isDragReject:k,isDragActive:P,open:D}=FV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:g,onDragOver:()=>s(!0),maxFiles:1});c(D),A.useEffect(()=>{const R=L=>{var q;const z=(q=L.clipboardData)==null?void 0:q.items;if(!z)return;const U=[];for(const J of z)J.kind==="file"&&["image/png","image/jpg"].includes(J.type)&&U.push(J);if(!U.length)return;if(L.stopImmediatePropagation(),U.length>1){i({description:a("toast.uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const H=U[0].getAsFile();if(!H){i({description:a("toast.uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(uU({imageFile:H}))};return document.addEventListener("paste",R),()=>{document.removeEventListener("paste",R)}},[a,n,i,r]);const M=["img2img","unifiedCanvas"].includes(r)?` to ${eu[r].tooltip}`:"";return v.jsx(nA.Provider,{value:D,children:v.jsxs(Bn,{...S({style:{}}),onKeyDown:R=>{R.key},children:[v.jsx("input",{...w()}),t,P&&o&&v.jsx(r4e,{isDragAccept:C,isDragReject:k,overlaySecondaryText:M,setIsHandlingUpload:s})]})})},a4e=Gt(zi,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),o4e=Gt(zi,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),s4e=()=>{const e=nt(),t=we(a4e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=we(o4e),[a,o]=A.useState(!0),s=A.useRef(null);A.useLayoutEffect(()=>{s.current!==null&&a&&(s.current.scrollTop=s.current.scrollHeight)},[a,t,n]);const c=()=>{e(UI()),e(Ik(!n))};Ot("`",()=>{e(Ik(!n))},[n]),Ot("esc",()=>{e(Ik(!1))});const d=()=>{s.current&&a&&s.current.scrollTop{const{timestamp:S,message:w,level:C}=p,k=C==="info"?"base":C;return v.jsxs(Fe,{sx:{gap:2,color:`${k}.300`},children:[v.jsxs(Yt,{fontWeight:"600",children:[S,":"]}),v.jsx(Yt,{wordBreak:"break-all",children:w})]},g)})})}),n&&v.jsx(so,{hasArrow:!0,label:a?"Autoscroll On":"Autoscroll Off",children:v.jsx(kt,{size:"sm","aria-label":"Toggle autoscroll",icon:v.jsx(yxe,{}),onClick:()=>o(!a),isChecked:a,sx:{position:"fixed",insetInlineStart:2,bottom:12,zIndex:"10000"}})}),v.jsx(so,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:v.jsx(kt,{size:"sm","aria-label":"Toggle Log Viewer",icon:n?v.jsx(Rxe,{}):v.jsx(wU,{}),onClick:c,sx:{position:"fixed",insetInlineStart:2,bottom:2,zIndex:"10000"},colorScheme:r||!i?"error":"base"})})]})},l4e=Gt(zi,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),u4e=()=>{const{t:e}=ht(),{isProcessing:t,currentStep:n,totalSteps:r,currentStatusHasSteps:i}=we(l4e),a=n?Math.round(n*100/r):0;return v.jsx(zF,{value:a,"aria-label":e("accessibility.invokeProgressBar"),isIndeterminate:t&&!i,height:CA,zIndex:99})};function c4e(e){const{title:t,hotkey:n,description:r}=e;return v.jsxs(Hu,{sx:{gridTemplateColumns:"auto max-content",justifyContent:"space-between",alignItems:"center"},children:[v.jsxs(Hu,{children:[v.jsx(Yt,{fontWeight:600,children:t}),r&&v.jsx(Yt,{sx:{fontSize:"sm"},variant:"subtext",children:r})]}),v.jsx(Bn,{sx:{fontSize:"sm",fontWeight:600,px:2,py:1},children:n})]})}function d4e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=jp(),{t:i}=ht(),a=[{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:"`"}],o=[{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"}],c=[{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"}],d=p=>v.jsx(Fe,{flexDir:"column",gap:4,children:p.map((g,S)=>v.jsxs(Fe,{flexDir:"column",px:2,gap:4,children:[v.jsx(c4e,{title:g.title,description:g.desc,hotkey:g.hotkey}),S-1}function Y4e(e,t){var n=this.__data__,r=zE(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function gh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=ePe}var tPe="[object Arguments]",nPe="[object Array]",rPe="[object Boolean]",iPe="[object Date]",aPe="[object Error]",oPe="[object Function]",sPe="[object Map]",lPe="[object Number]",uPe="[object Object]",cPe="[object RegExp]",dPe="[object Set]",fPe="[object String]",hPe="[object WeakMap]",pPe="[object ArrayBuffer]",mPe="[object DataView]",vPe="[object Float32Array]",gPe="[object Float64Array]",yPe="[object Int8Array]",bPe="[object Int16Array]",SPe="[object Int32Array]",xPe="[object Uint8Array]",wPe="[object Uint8ClampedArray]",CPe="[object Uint16Array]",EPe="[object Uint32Array]",Bi={};Bi[vPe]=Bi[gPe]=Bi[yPe]=Bi[bPe]=Bi[SPe]=Bi[xPe]=Bi[wPe]=Bi[CPe]=Bi[EPe]=!0,Bi[tPe]=Bi[nPe]=Bi[pPe]=Bi[rPe]=Bi[mPe]=Bi[iPe]=Bi[aPe]=Bi[oPe]=Bi[sPe]=Bi[lPe]=Bi[uPe]=Bi[cPe]=Bi[dPe]=Bi[fPe]=Bi[hPe]=!1;function _Pe(e){return Fv(e)&&lG(e.length)&&!!Bi[Bv(e)]}function SO(e){return function(t){return e(t)}}var uG=typeof exports=="object"&&exports&&!exports.nodeType&&exports,BS=uG&&typeof module=="object"&&module&&!module.nodeType&&module,TPe=BS&&BS.exports===uG,xO=TPe&&GV.process,kPe=function(){try{var e=BS&&BS.require&&BS.require("util").types;return e||xO&&xO.binding&&xO.binding("util")}catch{}}();const yy=kPe;var cG=yy&&yy.isTypedArray,PPe=cG?SO(cG):_Pe;const APe=PPe;var OPe=Object.prototype,DPe=OPe.hasOwnProperty;function dG(e,t){var n=zS(e),r=!n&&W5e(e),i=!n&&!r&&sG(e),a=!n&&!r&&!i&&APe(e),o=n||r||i||a,s=o?F5e(e.length,String):[],c=s.length;for(var d in e)(t||DPe.call(e,d))&&!(o&&(d=="length"||i&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||$5e(d,c)))&&s.push(d);return s}var MPe=Object.prototype;function wO(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||MPe;return e===n}var jPe=YV(Object.keys,Object);const IPe=jPe;var RPe=Object.prototype,NPe=RPe.hasOwnProperty;function LPe(e){if(!wO(e))return IPe(e);var t=[];for(var n in Object(e))NPe.call(e,n)&&n!="constructor"&&t.push(n);return t}function fG(e){return e!=null&&lG(e.length)&&!ZV(e)}function CO(e){return fG(e)?dG(e):LPe(e)}function zPe(e,t){return e&&FE(t,CO(t),e)}function BPe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var FPe=Object.prototype,UPe=FPe.hasOwnProperty;function HPe(e){if(!RS(e))return BPe(e);var t=wO(e),n=[];for(var r in e)r=="constructor"&&(t||!UPe.call(e,r))||n.push(r);return n}function EO(e){return fG(e)?dG(e,!0):HPe(e)}function VPe(e,t){return e&&FE(t,EO(t),e)}var hG=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pG=hG&&typeof module=="object"&&module&&!module.nodeType&&module,GPe=pG&&pG.exports===hG,mG=GPe?qd.Buffer:void 0,vG=mG?mG.allocUnsafe:void 0;function WPe(e,t){if(t)return e.slice();var n=e.length,r=vG?vG(n):new e.constructor(n);return e.copy(r),r}function gG(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[i]=e[i]);return n}function VG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var GG=function(t){return Array.isArray(t)&&t.length===0},bs=function(t){return typeof t=="function"},UE=function(t){return t!==null&&typeof t=="object"},HAe=function(t){return String(Math.floor(Number(t)))===t},IO=function(t){return Object.prototype.toString.call(t)==="[object String]"},RO=function(t){return A.Children.count(t)===0},NO=function(t){return UE(t)&&bs(t.then)};function VAe(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 Qo(e,t,n,r){r===void 0&&(r=0);for(var i=HG(t);e&&r=0?[]:{}}}return(a===0?e:i)[o[a]]===n?e:(n===void 0?delete i[o[a]]:i[o[a]]=n,a===0&&n===void 0&&delete r[o[a]],r)}function WG(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,a=Object.keys(e);i component."):ys(!1)),e}function WAe(e,t){switch(t.type){case"SET_VALUES":return Ci({},e,{values:t.payload});case"SET_TOUCHED":return Ci({},e,{touched:t.payload});case"SET_ERRORS":return Yp(e.errors,t.payload)?e:Ci({},e,{errors:t.payload});case"SET_STATUS":return Ci({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ci({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ci({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ci({},e,{values:Yd(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ci({},e,{touched:Yd(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ci({},e,{errors:Yd(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ci({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ci({},e,{touched:WG(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ci({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ci({},e,{isSubmitting:!1});default:return e}}var qv={},VE={};function qAe(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,a=e.validateOnMount,o=a===void 0?!1:a,s=e.isInitialValid,c=e.enableReinitialize,d=c===void 0?!1:c,p=e.onSubmit,g=Wv(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),S=Ci({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:p},g),w=A.useRef(S.initialValues),C=A.useRef(S.initialErrors||qv),k=A.useRef(S.initialTouched||VE),P=A.useRef(S.initialStatus),D=A.useRef(!1),M=A.useRef({});process.env.NODE_ENV!=="production"&&A.useEffect(function(){typeof s>"u"||(process.env.NODE_ENV!=="production"?ys(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):ys(!1))},[]),A.useEffect(function(){return D.current=!0,function(){D.current=!1}},[]);var R=A.useReducer(WAe,{values:S.initialValues,errors:S.initialErrors||qv,touched:S.initialTouched||VE,status:S.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),L=R[0],z=R[1],U=A.useCallback(function(xe,it){return new Promise(function(at,bt){var Ve=S.validate(xe,it);Ve==null?at(qv):NO(Ve)?Ve.then(function(ot){at(ot||qv)},function(ot){process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in ",ot),bt(ot)}):at(Ve)})},[S.validate]),H=A.useCallback(function(xe,it){var at=S.validationSchema,bt=bs(at)?at(it):at,Ve=it&&bt.validateAt?bt.validateAt(it,xe):KAe(xe,bt);return new Promise(function(ot,Jt){Ve.then(function(){ot(qv)},function(rn){rn.name==="ValidationError"?ot(YAe(rn)):(process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in ",rn),Jt(rn))})})},[S.validationSchema]),q=A.useCallback(function(xe,it){return new Promise(function(at){return at(M.current[xe].validate(it))})},[]),J=A.useCallback(function(xe){var it=Object.keys(M.current).filter(function(bt){return bs(M.current[bt].validate)}),at=it.length>0?it.map(function(bt){return q(bt,Qo(xe,bt))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(at).then(function(bt){return bt.reduce(function(Ve,ot,Jt){return ot==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||ot&&(Ve=Yd(Ve,it[Jt],ot)),Ve},{})})},[q]),$=A.useCallback(function(xe){return Promise.all([J(xe),S.validationSchema?H(xe):{},S.validate?U(xe):{}]).then(function(it){var at=it[0],bt=it[1],Ve=it[2],ot=gO.all([at,bt,Ve],{arrayMerge:XAe});return ot})},[S.validate,S.validationSchema,J,U,H]),K=Ku(function(xe){return xe===void 0&&(xe=L.values),z({type:"SET_ISVALIDATING",payload:!0}),$(xe).then(function(it){return D.current&&(z({type:"SET_ISVALIDATING",payload:!1}),z({type:"SET_ERRORS",payload:it})),it})});A.useEffect(function(){o&&D.current===!0&&Yp(w.current,S.initialValues)&&K(w.current)},[o,K]);var fe=A.useCallback(function(xe){var it=xe&&xe.values?xe.values:w.current,at=xe&&xe.errors?xe.errors:C.current?C.current:S.initialErrors||{},bt=xe&&xe.touched?xe.touched:k.current?k.current:S.initialTouched||{},Ve=xe&&xe.status?xe.status:P.current?P.current:S.initialStatus;w.current=it,C.current=at,k.current=bt,P.current=Ve;var ot=function(){z({type:"RESET_FORM",payload:{isSubmitting:!!xe&&!!xe.isSubmitting,errors:at,touched:bt,status:Ve,values:it,isValidating:!!xe&&!!xe.isValidating,submitCount:xe&&xe.submitCount&&typeof xe.submitCount=="number"?xe.submitCount:0}})};if(S.onReset){var Jt=S.onReset(L.values,qe);NO(Jt)?Jt.then(ot):ot()}else ot()},[S.initialErrors,S.initialStatus,S.initialTouched]);A.useEffect(function(){D.current===!0&&!Yp(w.current,S.initialValues)&&(d&&(w.current=S.initialValues,fe()),o&&K(w.current))},[d,S.initialValues,fe,o,K]),A.useEffect(function(){d&&D.current===!0&&!Yp(C.current,S.initialErrors)&&(C.current=S.initialErrors||qv,z({type:"SET_ERRORS",payload:S.initialErrors||qv}))},[d,S.initialErrors]),A.useEffect(function(){d&&D.current===!0&&!Yp(k.current,S.initialTouched)&&(k.current=S.initialTouched||VE,z({type:"SET_TOUCHED",payload:S.initialTouched||VE}))},[d,S.initialTouched]),A.useEffect(function(){d&&D.current===!0&&!Yp(P.current,S.initialStatus)&&(P.current=S.initialStatus,z({type:"SET_STATUS",payload:S.initialStatus}))},[d,S.initialStatus,S.initialTouched]);var X=Ku(function(xe){if(M.current[xe]&&bs(M.current[xe].validate)){var it=Qo(L.values,xe),at=M.current[xe].validate(it);return NO(at)?(z({type:"SET_ISVALIDATING",payload:!0}),at.then(function(bt){return bt}).then(function(bt){z({type:"SET_FIELD_ERROR",payload:{field:xe,value:bt}}),z({type:"SET_ISVALIDATING",payload:!1})})):(z({type:"SET_FIELD_ERROR",payload:{field:xe,value:at}}),Promise.resolve(at))}else if(S.validationSchema)return z({type:"SET_ISVALIDATING",payload:!0}),H(L.values,xe).then(function(bt){return bt}).then(function(bt){z({type:"SET_FIELD_ERROR",payload:{field:xe,value:bt[xe]}}),z({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),G=A.useCallback(function(xe,it){var at=it.validate;M.current[xe]={validate:at}},[]),te=A.useCallback(function(xe){delete M.current[xe]},[]),oe=Ku(function(xe,it){z({type:"SET_TOUCHED",payload:xe});var at=it===void 0?i:it;return at?K(L.values):Promise.resolve()}),ie=A.useCallback(function(xe){z({type:"SET_ERRORS",payload:xe})},[]),re=Ku(function(xe,it){var at=bs(xe)?xe(L.values):xe;z({type:"SET_VALUES",payload:at});var bt=it===void 0?n:it;return bt?K(at):Promise.resolve()}),le=A.useCallback(function(xe,it){z({type:"SET_FIELD_ERROR",payload:{field:xe,value:it}})},[]),ee=Ku(function(xe,it,at){z({type:"SET_FIELD_VALUE",payload:{field:xe,value:it}});var bt=at===void 0?n:at;return bt?K(Yd(L.values,xe,it)):Promise.resolve()}),de=A.useCallback(function(xe,it){var at=it,bt=xe,Ve;if(!IO(xe)){xe.persist&&xe.persist();var ot=xe.target?xe.target:xe.currentTarget,Jt=ot.type,rn=ot.name,$e=ot.id,an=ot.value,Nn=ot.checked,st=ot.outerHTML,Ge=ot.options,mt=ot.multiple;at=it||rn||$e,!at&&process.env.NODE_ENV!=="production"&&YG({htmlContent:st,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),bt=/number|range/.test(Jt)?(Ve=parseFloat(an),isNaN(Ve)?"":Ve):/checkbox/.test(Jt)?ZAe(Qo(L.values,at),Nn,an):Ge&&mt?QAe(Ge):an}at&&ee(at,bt)},[ee,L.values]),Re=Ku(function(xe){if(IO(xe))return function(it){return de(it,xe)};de(xe)}),Ae=Ku(function(xe,it,at){it===void 0&&(it=!0),z({type:"SET_FIELD_TOUCHED",payload:{field:xe,value:it}});var bt=at===void 0?i:at;return bt?K(L.values):Promise.resolve()}),_e=A.useCallback(function(xe,it){xe.persist&&xe.persist();var at=xe.target,bt=at.name,Ve=at.id,ot=at.outerHTML,Jt=it||bt||Ve;!Jt&&process.env.NODE_ENV!=="production"&&YG({htmlContent:ot,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),Ae(Jt,!0)},[Ae]),Me=Ku(function(xe){if(IO(xe))return function(it){return _e(it,xe)};_e(xe)}),Te=A.useCallback(function(xe){bs(xe)?z({type:"SET_FORMIK_STATE",payload:xe}):z({type:"SET_FORMIK_STATE",payload:function(){return xe}})},[]),Xe=A.useCallback(function(xe){z({type:"SET_STATUS",payload:xe})},[]),Qe=A.useCallback(function(xe){z({type:"SET_ISSUBMITTING",payload:xe})},[]),vt=Ku(function(){return z({type:"SUBMIT_ATTEMPT"}),K().then(function(xe){var it=xe instanceof Error,at=!it&&Object.keys(xe).length===0;if(at){var bt;try{if(bt=Ce(),bt===void 0)return}catch(Ve){throw Ve}return Promise.resolve(bt).then(function(Ve){return D.current&&z({type:"SUBMIT_SUCCESS"}),Ve}).catch(function(Ve){if(D.current)throw z({type:"SUBMIT_FAILURE"}),Ve})}else if(D.current&&(z({type:"SUBMIT_FAILURE"}),it))throw xe})}),St=Ku(function(xe){if(xe&&xe.preventDefault&&bs(xe.preventDefault)&&xe.preventDefault(),xe&&xe.stopPropagation&&bs(xe.stopPropagation)&&xe.stopPropagation(),process.env.NODE_ENV!=="production"&&typeof document<"u"){var it=VAe();it!==null&&it instanceof HTMLButtonElement&&(it.attributes&&it.attributes.getNamedItem("type")||(process.env.NODE_ENV!=="production"?ys(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):ys(!1)))}vt().catch(function(at){console.warn("Warning: An unhandled error was caught from submitForm()",at)})}),qe={resetForm:fe,validateForm:K,validateField:X,setErrors:ie,setFieldError:le,setFieldTouched:Ae,setFieldValue:ee,setStatus:Xe,setSubmitting:Qe,setTouched:oe,setValues:re,setFormikState:Te,submitForm:vt},Ce=Ku(function(){return p(L.values,qe)}),Lt=Ku(function(xe){xe&&xe.preventDefault&&bs(xe.preventDefault)&&xe.preventDefault(),xe&&xe.stopPropagation&&bs(xe.stopPropagation)&&xe.stopPropagation(),fe()}),De=A.useCallback(function(xe){return{value:Qo(L.values,xe),error:Qo(L.errors,xe),touched:!!Qo(L.touched,xe),initialValue:Qo(w.current,xe),initialTouched:!!Qo(k.current,xe),initialError:Qo(C.current,xe)}},[L.errors,L.touched,L.values]),wt=A.useCallback(function(xe){return{setValue:function(at,bt){return ee(xe,at,bt)},setTouched:function(at,bt){return Ae(xe,at,bt)},setError:function(at){return le(xe,at)}}},[ee,Ae,le]),ln=A.useCallback(function(xe){var it=UE(xe),at=it?xe.name:xe,bt=Qo(L.values,at),Ve={name:at,value:bt,onChange:Re,onBlur:Me};if(it){var ot=xe.type,Jt=xe.value,rn=xe.as,$e=xe.multiple;ot==="checkbox"?Jt===void 0?Ve.checked=!!bt:(Ve.checked=!!(Array.isArray(bt)&&~bt.indexOf(Jt)),Ve.value=Jt):ot==="radio"?(Ve.checked=bt===Jt,Ve.value=Jt):rn==="select"&&$e&&(Ve.value=Ve.value||[],Ve.multiple=!0)}return Ve},[Me,Re,L.values]),Wt=A.useMemo(function(){return!Yp(w.current,L.values)},[w.current,L.values]),Rn=A.useMemo(function(){return typeof s<"u"?Wt?L.errors&&Object.keys(L.errors).length===0:s!==!1&&bs(s)?s(S):s:L.errors&&Object.keys(L.errors).length===0},[s,Wt,L.errors,S]),ar=Ci({},L,{initialValues:w.current,initialErrors:C.current,initialTouched:k.current,initialStatus:P.current,handleBlur:Me,handleChange:Re,handleReset:Lt,handleSubmit:St,resetForm:fe,setErrors:ie,setFormikState:Te,setFieldTouched:Ae,setFieldValue:ee,setFieldError:le,setStatus:Xe,setSubmitting:Qe,setTouched:oe,setValues:re,submitForm:vt,validateForm:K,validateField:X,isValid:Rn,dirty:Wt,unregisterField:te,registerField:G,getFieldProps:ln,getFieldMeta:De,getFieldHelpers:wt,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return ar}function US(e){var t=qAe(e),n=e.component,r=e.children,i=e.render,a=e.innerRef;return A.useImperativeHandle(a,function(){return t}),process.env.NODE_ENV!=="production"&&A.useEffect(function(){e.render&&(process.env.NODE_ENV!=="production"?ys(!1," has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace ...} /> with {(props) => ...}"):ys(!1))},[]),A.createElement(GAe,{value:t},n?A.createElement(n,t):i?i(t):r?bs(r)?r(t):RO(r)?null:A.Children.only(r):null)}function YG(e){var t=e.htmlContent,n=e.documentationAnchorLink,r=e.handlerName;console.warn("Warning: Formik called `"+r+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+` Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+n+` `)}function YAe(e){var t={};if(e.inner){if(e.inner.length===0)return Yd(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var a;if(n){if(r>=i.length)break;a=i[r++]}else{if(r=i.next(),r.done)break;a=r.value}var o=a;Qo(t,o.path)||(t=Yd(t,o.path,o.message))}}return t}function KAe(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r={});var i=LO(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function LO(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||XV(i)?LO(i):i!==""?i:void 0}):XV(e[r])?t[r]=LO(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function XAe(e,t,n){var r=e.slice();return t.forEach(function(a,o){if(typeof r[o]>"u"){var s=n.clone!==!1,c=s&&n.isMergeableObject(a);r[o]=c?gO(Array.isArray(a)?[]:{},a,n):a}else n.isMergeableObject(a)?r[o]=gO(e[o],a,n):e.indexOf(a)===-1&&r.push(a)}),r}function QAe(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function ZAe(e,t,n){if(typeof e=="boolean")return Boolean(t);var r=[],i=!1,a=-1;if(Array.isArray(e))r=e,a=e.indexOf(n),i=a>=0;else if(!n||n=="true"||n=="false")return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,a).concat(r.slice(a+1)):r}var JAe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect;function Ku(e){var t=A.useRef(e);return JAe(function(){t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace ...} /> with {({field, form, meta}) => ...}'):ys(!1)),a&&i&&bs(i)&&(process.env.NODE_ENV!=="production"?ys(!1,"You should not use and as a function in the same component; will be ignored."):ys(!1)),o&&i&&bs(i)&&(process.env.NODE_ENV!=="production"?ys(!1,"You should not use and as a function in the same component; will be ignored."):ys(!1)),r&&i&&!RO(i)&&(process.env.NODE_ENV!=="production"?ys(!1,"You should not use and in the same component; will be ignored"):ys(!1))},[]);var p=d.registerField,g=d.unregisterField;A.useEffect(function(){return p(n,{validate:t}),function(){g(n)}},[p,g,n,t]);var S=d.getFieldProps(Ci({name:n},s)),w=d.getFieldMeta(n),C={field:S,form:d};if(r)return r(Ci({},C,{meta:w}));if(bs(i))return i(Ci({},C,{meta:w}));if(o){if(typeof o=="string"){var k=s.innerRef,P=Wv(s,["innerRef"]);return A.createElement(o,Ci({ref:k},S,P),i)}return A.createElement(o,Ci({field:S,form:d},s),i)}var D=a||"input";if(typeof D=="string"){var M=s.innerRef,R=Wv(s,["innerRef"]);return A.createElement(D,Ci({ref:M},S,R),i)}return A.createElement(D,Ci({},S,s),i)}var $Ae=A.forwardRef(function(e,t){var n=e.action,r=Wv(e,["action"]),i=n??"#",a=qG(),o=a.handleReset,s=a.handleSubmit;return A.createElement("form",Object.assign({onSubmit:s,ref:t,onReset:o,action:i},r))});$Ae.displayName="Form";var eOe=function(t,n,r){var i=by(t),a=i[n];return i.splice(n,1),i.splice(r,0,a),i},tOe=function(t,n,r){var i=by(t),a=i[n];return i[n]=i[r],i[r]=a,i},zO=function(t,n,r){var i=by(t);return i.splice(n,0,r),i},nOe=function(t,n,r){var i=by(t);return i[n]=r,i},by=function(t){if(t){if(Array.isArray(t))return[].concat(t);var n=Object.keys(t).map(function(r){return parseInt(r)}).reduce(function(r,i){return i>r?i:r},0);return Array.from(Ci({},t,{length:n+1}))}else return[]},rOe=function(e){UAe(t,e);function t(r){var i;return i=e.call(this,r)||this,i.updateArrayField=function(a,o,s){var c=i.props,d=c.name,p=c.formik.setFormikState;p(function(g){var S=typeof s=="function"?s:a,w=typeof o=="function"?o:a,C=Yd(g.values,d,a(Qo(g.values,d))),k=s?S(Qo(g.errors,d)):void 0,P=o?w(Qo(g.touched,d)):void 0;return GG(k)&&(k=void 0),GG(P)&&(P=void 0),Ci({},g,{values:C,errors:s?Yd(g.errors,d,k):g.errors,touched:o?Yd(g.touched,d,P):g.touched})})},i.push=function(a){return i.updateArrayField(function(o){return[].concat(by(o),[FAe(a)])},!1,!1)},i.handlePush=function(a){return function(){return i.push(a)}},i.swap=function(a,o){return i.updateArrayField(function(s){return tOe(s,a,o)},!0,!0)},i.handleSwap=function(a,o){return function(){return i.swap(a,o)}},i.move=function(a,o){return i.updateArrayField(function(s){return eOe(s,a,o)},!0,!0)},i.handleMove=function(a,o){return function(){return i.move(a,o)}},i.insert=function(a,o){return i.updateArrayField(function(s){return zO(s,a,o)},function(s){return zO(s,a,null)},function(s){return zO(s,a,null)})},i.handleInsert=function(a,o){return function(){return i.insert(a,o)}},i.replace=function(a,o){return i.updateArrayField(function(s){return nOe(s,a,o)},!1,!1)},i.handleReplace=function(a,o){return function(){return i.replace(a,o)}},i.unshift=function(a){var o=-1;return i.updateArrayField(function(s){var c=s?[a].concat(s):[a];return o<0&&(o=c.length),c},function(s){var c=s?[null].concat(s):[null];return o<0&&(o=c.length),c},function(s){var c=s?[null].concat(s):[null];return o<0&&(o=c.length),c}),o},i.handleUnshift=function(a){return function(){return i.unshift(a)}},i.handleRemove=function(a){return function(){return i.remove(a)}},i.handlePop=function(){return function(){return i.pop()}},i.remove=i.remove.bind(VG(i)),i.pop=i.pop.bind(VG(i)),i}var n=t.prototype;return n.componentDidUpdate=function(i){this.props.validateOnChange&&this.props.formik.validateOnChange&&!Yp(Qo(i.formik.values,i.name),Qo(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(i){var a;return this.updateArrayField(function(o){var s=o?by(o):[];return a||(a=s[i]),bs(s.splice)&&s.splice(i,1),s},!0,!0),a},n.pop=function(){var i;return this.updateArrayField(function(a){var o=a;return i||(i=o&&o.pop&&o.pop()),o},!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},a=this.props,o=a.component,s=a.render,c=a.children,d=a.name,p=a.formik,g=Wv(p,["validate","validationSchema"]),S=Ci({},i,{form:g,name:d});return o?A.createElement(o,S):s?s(S):c?typeof c=="function"?c(S):RO(c)?null:A.Children.only(c):null},t}(A.Component);rOe.defaultProps={validateOnChange:!0};function iOe(e){const{model:t}=e,r=we(C=>C.system.model_list)[t],i=nt(),{t:a}=ht(),o=we(C=>C.system.isProcessing),s=we(C=>C.system.isConnected),[c,d]=A.useState("same"),[p,g]=A.useState("");A.useEffect(()=>{d("same")},[t]);const S=()=>{d("same")},w=()=>{i(Hee({model_name:t,save_location:c,custom_location:c==="custom"&&p!==""?p:null}))};return v.jsxs(AE,{title:`${a("modelManager.convert")} ${t}`,acceptCallback:w,cancelCallback:S,acceptButtonText:`${a("modelManager.convert")}`,triggerComponent:v.jsxs(mr,{size:"sm","aria-label":a("modelManager.convertToDiffusers"),isDisabled:r.status==="active"||o||!s,className:" modal-close-btn",marginInlineEnd:8,children:["🧨 ",a("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[v.jsxs(Fe,{flexDirection:"column",rowGap:4,children:[v.jsx(Yt,{children:a("modelManager.convertToDiffusersHelpText1")}),v.jsxs(jB,{children:[v.jsx(dS,{children:a("modelManager.convertToDiffusersHelpText2")}),v.jsx(dS,{children:a("modelManager.convertToDiffusersHelpText3")}),v.jsx(dS,{children:a("modelManager.convertToDiffusersHelpText4")}),v.jsx(dS,{children:a("modelManager.convertToDiffusersHelpText5")})]}),v.jsx(Yt,{children:a("modelManager.convertToDiffusersHelpText6")})]}),v.jsxs(Fe,{flexDir:"column",gap:4,children:[v.jsxs(Fe,{marginTop:4,flexDir:"column",gap:2,children:[v.jsx(Yt,{fontWeight:"600",children:a("modelManager.convertToDiffusersSaveLocation")}),v.jsx(xS,{value:c,onChange:C=>d(C),children:v.jsxs(Fe,{gap:4,children:[v.jsx(Gs,{value:"same",children:v.jsx(so,{label:"Save converted model in the same folder",children:a("modelManager.sameFolder")})}),v.jsx(Gs,{value:"root",children:v.jsx(so,{label:"Save converted model in the InvokeAI root folder",children:a("modelManager.invokeRoot")})}),v.jsx(Gs,{value:"custom",children:v.jsx(so,{label:"Save converted model in a custom folder",children:a("modelManager.custom")})})]})})]}),c==="custom"&&v.jsxs(Fe,{flexDirection:"column",rowGap:2,children:[v.jsx(Yt,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:a("modelManager.customSaveLocation")}),v.jsx(wi,{value:p,onChange:C=>{C.target.value!==""&&g(C.target.value)},width:"full"})]})]})]})}const aOe=Gt([zi],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),KG=64,XG=2048;function oOe(){const{openModel:e,model_list:t}=we(aOe),n=we(c=>c.system.isProcessing),r=nt(),{t:i}=ht(),[a,o]=A.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1,format:"ckpt"});A.useEffect(()=>{var c,d,p,g,S,w,C;if(e){const k=Je.pickBy(t,(P,D)=>Je.isEqual(D,e));o({name:e,description:(c=k[e])==null?void 0:c.description,config:(d=k[e])==null?void 0:d.config,weights:(p=k[e])==null?void 0:p.weights,vae:(g=k[e])==null?void 0:g.vae,width:(S=k[e])==null?void 0:S.width,height:(w=k[e])==null?void 0:w.height,default:(C=k[e])==null?void 0:C.default,format:"ckpt"})}},[t,e]);const s=c=>{r(v1({...c,width:Number(c.width),height:Number(c.height)}))};return e?v.jsxs(Fe,{flexDirection:"column",rowGap:4,width:"100%",children:[v.jsxs(Fe,{alignItems:"center",gap:4,justifyContent:"space-between",children:[v.jsx(Yt,{fontSize:"lg",fontWeight:"bold",children:e}),v.jsx(iOe,{model:e})]}),v.jsx(Fe,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingInlineEnd:8,children:v.jsx(US,{enableReinitialize:!0,initialValues:a,onSubmit:s,children:({handleSubmit:c,errors:d,touched:p})=>v.jsx("form",{onSubmit:c,children:v.jsxs(jn,{rowGap:2,alignItems:"start",children:[v.jsxs(Or,{isInvalid:!!d.description&&p.description,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"description",fontSize:"sm",children:i("modelManager.description")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"description",name:"description",type:"text",width:"full"}),d.description&&p.description?v.jsx(Li,{children:d.description}):v.jsx(Ni,{margin:0,children:i("modelManager.descriptionValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!d.config&&p.config,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"config",fontSize:"sm",children:i("modelManager.config")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"config",name:"config",type:"text",width:"full"}),d.config&&p.config?v.jsx(Li,{children:d.config}):v.jsx(Ni,{margin:0,children:i("modelManager.configValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!d.weights&&p.weights,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"config",fontSize:"sm",children:i("modelManager.modelLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"weights",name:"weights",type:"text",width:"full"}),d.weights&&p.weights?v.jsx(Li,{children:d.weights}):v.jsx(Ni,{margin:0,children:i("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!d.vae&&p.vae,children:[v.jsx(Qr,{htmlFor:"vae",fontSize:"sm",children:i("modelManager.vaeLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"vae",name:"vae",type:"text",width:"full"}),d.vae&&p.vae?v.jsx(Li,{children:d.vae}):v.jsx(Ni,{margin:0,children:i("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(Z0,{width:"100%",children:[v.jsxs(Or,{isInvalid:!!d.width&&p.width,children:[v.jsx(Qr,{htmlFor:"width",fontSize:"sm",children:i("modelManager.width")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{id:"width",name:"width",children:({field:g,form:S})=>v.jsx(ph,{id:"width",name:"width",min:KG,max:XG,step:64,value:S.values.width,onChange:w=>S.setFieldValue(g.name,Number(w))})}),d.width&&p.width?v.jsx(Li,{children:d.width}):v.jsx(Ni,{margin:0,children:i("modelManager.widthValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!d.height&&p.height,children:[v.jsx(Qr,{htmlFor:"height",fontSize:"sm",children:i("modelManager.height")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{id:"height",name:"height",children:({field:g,form:S})=>v.jsx(ph,{id:"height",name:"height",min:KG,max:XG,step:64,value:S.values.height,onChange:w=>S.setFieldValue(g.name,Number(w))})}),d.height&&p.height?v.jsx(Li,{children:d.height}):v.jsx(Ni,{margin:0,children:i("modelManager.heightValidationMsg")})]})]})]}),v.jsx(mr,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelManager.updateModel")})]})})})})]}):v.jsx(Fe,{sx:{width:"100%",justifyContent:"center",alignItems:"center",borderRadius:"base",bg:"base.900"},children:v.jsx(Yt,{fontWeight:500,children:"Pick A Model To Edit"})})}const sOe=Gt([zi],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function lOe(){const{openModel:e,model_list:t}=we(sOe),n=we(c=>c.system.isProcessing),r=nt(),{t:i}=ht(),[a,o]=A.useState({name:"",description:"",repo_id:"",path:"",vae:{repo_id:"",path:""},default:!1,format:"diffusers"});A.useEffect(()=>{var c,d,p,g,S,w,C,k,P,D,M,R,L,z,U,H;if(e){const q=Je.pickBy(t,(J,$)=>Je.isEqual($,e));o({name:e,description:(c=q[e])==null?void 0:c.description,path:(d=q[e])!=null&&d.path&&((p=q[e])==null?void 0:p.path)!=="None"?(g=q[e])==null?void 0:g.path:"",repo_id:(S=q[e])!=null&&S.repo_id&&((w=q[e])==null?void 0:w.repo_id)!=="None"?(C=q[e])==null?void 0:C.repo_id:"",vae:{repo_id:(P=(k=q[e])==null?void 0:k.vae)!=null&&P.repo_id?(M=(D=q[e])==null?void 0:D.vae)==null?void 0:M.repo_id:"",path:(L=(R=q[e])==null?void 0:R.vae)!=null&&L.path?(U=(z=q[e])==null?void 0:z.vae)==null?void 0:U.path:""},default:(H=q[e])==null?void 0:H.default,format:"diffusers"})}},[t,e]);const s=c=>{const d=c;c.path===""&&delete d.path,c.repo_id===""&&delete d.repo_id,c.vae.path===""&&delete d.vae.path,c.vae.repo_id===""&&delete d.vae.repo_id,r(v1(c))};return e?v.jsxs(Fe,{flexDirection:"column",rowGap:4,width:"100%",children:[v.jsx(Fe,{alignItems:"center",children:v.jsx(Yt,{fontSize:"lg",fontWeight:"bold",children:e})}),v.jsx(Fe,{flexDirection:"column",overflowY:"scroll",paddingInlineEnd:8,children:v.jsx(US,{enableReinitialize:!0,initialValues:a,onSubmit:s,children:({handleSubmit:c,errors:d,touched:p})=>{var g,S,w,C,k,P,D,M,R,L;return v.jsx("form",{onSubmit:c,children:v.jsxs(jn,{rowGap:2,alignItems:"start",children:[v.jsxs(Or,{isInvalid:!!d.description&&p.description,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"description",fontSize:"sm",children:i("modelManager.description")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"description",name:"description",type:"text",width:"full"}),d.description&&p.description?v.jsx(Li,{children:d.description}):v.jsx(Ni,{margin:0,children:i("modelManager.descriptionValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!d.path&&p.path,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"path",fontSize:"sm",children:i("modelManager.modelLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"path",name:"path",type:"text",width:"full"}),d.path&&p.path?v.jsx(Li,{children:d.path}):v.jsx(Ni,{margin:0,children:i("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!d.repo_id&&p.repo_id,children:[v.jsx(Qr,{htmlFor:"repo_id",fontSize:"sm",children:i("modelManager.repo_id")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"repo_id",name:"repo_id",type:"text",width:"full"}),d.repo_id&&p.repo_id?v.jsx(Li,{children:d.repo_id}):v.jsx(Ni,{margin:0,children:i("modelManager.repoIDValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!((g=d.vae)!=null&&g.path)&&((S=p.vae)==null?void 0:S.path),children:[v.jsx(Qr,{htmlFor:"vae.path",fontSize:"sm",children:i("modelManager.vaeLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"vae.path",name:"vae.path",type:"text",width:"full"}),(w=d.vae)!=null&&w.path&&((C=p.vae)!=null&&C.path)?v.jsx(Li,{children:(k=d.vae)==null?void 0:k.path}):v.jsx(Ni,{margin:0,children:i("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!((P=d.vae)!=null&&P.repo_id)&&((D=p.vae)==null?void 0:D.repo_id),children:[v.jsx(Qr,{htmlFor:"vae.repo_id",fontSize:"sm",children:i("modelManager.vaeRepoID")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"full"}),(M=d.vae)!=null&&M.repo_id&&((R=p.vae)!=null&&R.repo_id)?v.jsx(Li,{children:(L=d.vae)==null?void 0:L.repo_id}):v.jsx(Ni,{margin:0,children:i("modelManager.vaeRepoIDValidationMsg")})]})]}),v.jsx(mr,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelManager.updateModel")})]})})}})})]}):v.jsx(Fe,{sx:{width:"100%",justifyContent:"center",alignItems:"center",borderRadius:"base",bg:"base.900"},children:v.jsx(Yt,{fontWeight:"500",children:"Pick A Model To Edit"})})}const QG=Gt([zi],e=>{const{model_list:t}=e,n=[];return Je.forEach(t,r=>{n.push(r.weights)}),n});function ZG({model:e,modelsToAdd:t,setModelsToAdd:n}){const{t:r}=ht(),i=we(QG),a=o=>{t.includes(o.target.value)?n(Je.remove(t,s=>s!==o.target.value)):n([...t,o.target.value])};return v.jsx(jn,{children:v.jsxs(Fe,{flexDirection:"column",gap:2,backgroundColor:t.includes(e.name)?"accent.650":"base.800",paddingX:4,paddingY:2,borderRadius:4,children:[v.jsxs(Fe,{gap:4,children:[v.jsx(xi,{value:e.name,label:v.jsx(Yt,{fontWeight:500,children:e.name}),isChecked:t.includes(e.name),isDisabled:i.includes(e.location),onChange:a}),i.includes(e.location)&&v.jsx(LB,{colorScheme:"accent",children:r("modelManager.modelExists")})]}),v.jsx(Yt,{fontStyle:"italic",variant:"subtext",children:e.location})]})})}function uOe(){const e=nt(),{t}=ht(),n=we(R=>R.system.searchFolder),r=we(R=>R.system.foundModels),i=we(QG),a=we(R=>R.ui.shouldShowExistingModelsInSearch),o=we(R=>R.system.isProcessing),[s,c]=A.useState([]),[d,p]=A.useState("v1"),[g,S]=A.useState(""),w=()=>{e(HI(null)),e(VI(null)),c([])},C=R=>{e(_N(R.checkpointFolder))},k=()=>{c([]),r&&r.forEach(R=>{i.includes(R.location)||c(L=>[...L,R.name])})},P=()=>{c([])},D=()=>{const R=r==null?void 0:r.filter(z=>s.includes(z.name)),L={v1:"configs/stable-diffusion/v1-inference.yaml",v2_base:"configs/stable-diffusion/v2-inference-v.yaml",v2_768:"configs/stable-diffusion/v2-inference-v.yaml",inpainting:"configs/stable-diffusion/v1-inpainting-inference.yaml",custom:g};R==null||R.forEach(z=>{const U={name:z.name,description:"",config:L[d],weights:z.location,vae:"",width:512,height:512,default:!1,format:"ckpt"};e(v1(U))}),c([])},M=()=>{const R=[],L=[];return r&&r.forEach((z,U)=>{i.includes(z.location)?L.push(v.jsx(ZG,{model:z,modelsToAdd:s,setModelsToAdd:c},U)):R.push(v.jsx(ZG,{model:z,modelsToAdd:s,setModelsToAdd:c},U))}),v.jsxs(v.Fragment,{children:[R,a&&L]})};return v.jsxs(v.Fragment,{children:[n?v.jsxs(Fe,{sx:{padding:4,gap:2,position:"relative",borderRadius:"base",alignItems:"center",w:"full",bg:"base.900"},children:[v.jsxs(Fe,{sx:{flexDir:"column",gap:2},children:[v.jsx(Yt,{sx:{fontWeight:500,fontSize:"sm"},variant:"subtext",children:t("modelManager.checkpointFolder")}),v.jsx(Yt,{sx:{fontWeight:500,fontSize:"sm"},children:n})]}),v.jsx(BC,{}),v.jsx(kt,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:v.jsx(aA,{}),fontSize:18,disabled:o,onClick:()=>e(_N(n))}),v.jsx(kt,{"aria-label":t("modelManager.clearCheckpointFolder"),icon:v.jsx(CS,{style:{transform:"rotate(45deg)"}}),onClick:w})]}):v.jsx(US,{initialValues:{checkpointFolder:""},onSubmit:R=>{C(R)},children:({handleSubmit:R})=>v.jsx("form",{onSubmit:R,children:v.jsxs(Z0,{columnGap:2,alignItems:"flex-end",width:"100%",children:[v.jsx(Or,{isRequired:!0,width:"lg",children:v.jsx(Fi,{as:wi,id:"checkpointFolder",name:"checkpointFolder",type:"text",size:"md",label:t("modelManager.checkpointFolder")})}),v.jsx(mr,{leftIcon:v.jsx(Uxe,{}),"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),type:"submit",disabled:o,paddingX:10,children:t("modelManager.findModels")})]})})}),r&&v.jsxs(Fe,{flexDirection:"column",rowGap:4,width:"full",children:[v.jsxs(Fe,{justifyContent:"space-between",alignItems:"center",children:[v.jsxs("p",{children:[t("modelManager.modelsFound"),": ",r.length]}),v.jsxs("p",{children:[t("modelManager.selected"),": ",s.length]})]}),v.jsxs(Fe,{columnGap:2,justifyContent:"space-between",children:[v.jsxs(Fe,{columnGap:2,children:[v.jsx(mr,{isDisabled:s.length===r.length,onClick:k,children:t("modelManager.selectAll")}),v.jsx(mr,{isDisabled:s.length===0,onClick:P,children:t("modelManager.deselectAll")}),v.jsx(xi,{label:t("modelManager.showExisting"),isChecked:a,onChange:()=>e(pZ(!a))})]}),v.jsx(mr,{isDisabled:s.length===0,onClick:D,colorScheme:"accent",children:t("modelManager.addSelected")})]}),v.jsxs(Fe,{sx:{flexDirection:"column",padding:4,rowGap:4,borderRadius:"base",width:"full",bg:"base.900"},children:[v.jsxs(Fe,{gap:4,children:[v.jsx(Yt,{fontWeight:500,variant:"subtext",children:t("modelManager.pickModelType")}),v.jsx(xS,{value:d,onChange:R=>p(R),defaultValue:"v1",name:"model_type",children:v.jsxs(Fe,{gap:4,children:[v.jsx(Gs,{value:"v1",children:v.jsx(Yt,{fontSize:"sm",children:t("modelManager.v1")})}),v.jsx(Gs,{value:"v2_base",children:v.jsx(Yt,{fontSize:"sm",children:t("modelManager.v2_base")})}),v.jsx(Gs,{value:"v2_768",children:v.jsx(Yt,{fontSize:"sm",children:t("modelManager.v2_768")})}),v.jsx(Gs,{value:"inpainting",children:v.jsx(Yt,{fontSize:"sm",children:t("modelManager.inpainting")})}),v.jsx(Gs,{value:"custom",children:v.jsx(Yt,{fontSize:"sm",children:t("modelManager.customConfig")})})]})})]}),d==="custom"&&v.jsxs(Fe,{flexDirection:"column",rowGap:2,children:[v.jsx(Yt,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:t("modelManager.pathToCustomConfig")}),v.jsx(wi,{value:g,onChange:R=>{R.target.value!==""&&S(R.target.value)},width:"full"})]})]}),v.jsx(Fe,{flexDirection:"column",maxHeight:72,overflowY:"scroll",borderRadius:"sm",paddingInlineEnd:4,gap:2,children:r.length>0?M():v.jsx(Yt,{fontWeight:"500",padding:2,borderRadius:"sm",textAlign:"center",variant:"subtext",children:t("modelManager.noModelsFound")})})]})]})}const JG=64,$G=2048;function cOe(){const e=nt(),{t}=ht(),n=we(d=>d.system.isProcessing);function r(d){return/\s/.test(d)}function i(d){let p;return r(d)&&(p=t("modelManager.cannotUseSpaces")),p}const a={name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,format:"ckpt",default:!1},o=d=>{e(v1(d)),e(Jm(null))},[s,c]=A.useState(!1);return v.jsxs(jn,{gap:2,alignItems:"flex-start",children:[v.jsx(kt,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Jm(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",insetInlineEnd:12,top:3,icon:v.jsx(hU,{})}),v.jsx(uOe,{}),v.jsx(xi,{label:t("modelManager.addManually"),isChecked:s,onChange:()=>c(!s)}),s&&v.jsx(US,{initialValues:a,onSubmit:o,children:({handleSubmit:d,errors:p,touched:g})=>v.jsx("form",{onSubmit:d,children:v.jsxs(jn,{rowGap:2,children:[v.jsx(Yt,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:t("modelManager.manual")}),v.jsxs(Or,{isInvalid:!!p.name&&g.name,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"name",name:"name",type:"text",validate:i,width:"2xl"}),p.name&&g.name?v.jsx(Li,{children:p.name}):v.jsx(Ni,{margin:0,children:t("modelManager.nameValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!p.description&&g.description,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"description",name:"description",type:"text",width:"2xl"}),p.description&&g.description?v.jsx(Li,{children:p.description}):v.jsx(Ni,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!p.config&&g.config,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"config",fontSize:"sm",children:t("modelManager.config")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"config",name:"config",type:"text",width:"2xl"}),p.config&&g.config?v.jsx(Li,{children:p.config}):v.jsx(Ni,{margin:0,children:t("modelManager.configValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!p.weights&&g.weights,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"config",fontSize:"sm",children:t("modelManager.modelLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"weights",name:"weights",type:"text",width:"2xl"}),p.weights&&g.weights?v.jsx(Li,{children:p.weights}):v.jsx(Ni,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!p.vae&&g.vae,children:[v.jsx(Qr,{htmlFor:"vae",fontSize:"sm",children:t("modelManager.vaeLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"vae",name:"vae",type:"text",width:"2xl"}),p.vae&&g.vae?v.jsx(Li,{children:p.vae}):v.jsx(Ni,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(Z0,{width:"100%",children:[v.jsxs(Or,{isInvalid:!!p.width&&g.width,children:[v.jsx(Qr,{htmlFor:"width",fontSize:"sm",children:t("modelManager.width")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{id:"width",name:"width",children:({field:S,form:w})=>v.jsx(ph,{id:"width",name:"width",min:JG,max:$G,step:64,width:"90%",value:w.values.width,onChange:C=>w.setFieldValue(S.name,Number(C))})}),p.width&&g.width?v.jsx(Li,{children:p.width}):v.jsx(Ni,{margin:0,children:t("modelManager.widthValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!p.height&&g.height,children:[v.jsx(Qr,{htmlFor:"height",fontSize:"sm",children:t("modelManager.height")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{id:"height",name:"height",children:({field:S,form:w})=>v.jsx(ph,{id:"height",name:"height",min:JG,max:$G,width:"90%",step:64,value:w.values.height,onChange:C=>w.setFieldValue(S.name,Number(C))})}),p.height&&g.height?v.jsx(Li,{children:p.height}):v.jsx(Ni,{margin:0,children:t("modelManager.heightValidationMsg")})]})]})]}),v.jsx(mr,{type:"submit",className:"modal-close-btn",isLoading:n,children:t("modelManager.addModel")})]})})})]})}function GE({children:e}){return v.jsx(Fe,{sx:{flexDirection:"column",padding:4,rowGap:4,borderRadius:"base",width:"full",bg:"base.900"},children:e})}function dOe(){const e=nt(),{t}=ht(),n=we(s=>s.system.isProcessing);function r(s){return/\s/.test(s)}function i(s){let c;return r(s)&&(c=t("modelManager.cannotUseSpaces")),c}const a={name:"",description:"",repo_id:"",path:"",format:"diffusers",default:!1,vae:{repo_id:"",path:""}},o=s=>{const c=s;s.path===""&&delete c.path,s.repo_id===""&&delete c.repo_id,s.vae.path===""&&delete c.vae.path,s.vae.repo_id===""&&delete c.vae.repo_id,e(v1(c)),e(Jm(null))};return v.jsxs(Fe,{children:[v.jsx(kt,{"aria-label":t("common.back"),tooltip:t("common.back"),onClick:()=>e(Jm(null)),width:"max-content",position:"absolute",zIndex:1,size:"sm",insetInlineEnd:12,top:3,icon:v.jsx(hU,{})}),v.jsx(US,{initialValues:a,onSubmit:o,children:({handleSubmit:s,errors:c,touched:d})=>{var p,g,S,w,C,k,P,D,M,R;return v.jsx("form",{onSubmit:s,children:v.jsxs(jn,{rowGap:2,children:[v.jsx(GE,{children:v.jsxs(Or,{isInvalid:!!c.name&&d.name,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"name",fontSize:"sm",children:t("modelManager.name")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"name",name:"name",type:"text",validate:i,width:"2xl",isRequired:!0}),c.name&&d.name?v.jsx(Li,{children:c.name}):v.jsx(Ni,{margin:0,children:t("modelManager.nameValidationMsg")})]})]})}),v.jsx(GE,{children:v.jsxs(Or,{isInvalid:!!c.description&&d.description,isRequired:!0,children:[v.jsx(Qr,{htmlFor:"description",fontSize:"sm",children:t("modelManager.description")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"description",name:"description",type:"text",width:"2xl",isRequired:!0}),c.description&&d.description?v.jsx(Li,{children:c.description}):v.jsx(Ni,{margin:0,children:t("modelManager.descriptionValidationMsg")})]})]})}),v.jsxs(GE,{children:[v.jsx(Yt,{fontWeight:"bold",fontSize:"sm",children:t("modelManager.formMessageDiffusersModelLocation")}),v.jsx(Yt,{sx:{fontSize:"sm",fontStyle:"italic"},variant:"subtext",children:t("modelManager.formMessageDiffusersModelLocationDesc")}),v.jsxs(Or,{isInvalid:!!c.path&&d.path,children:[v.jsx(Qr,{htmlFor:"path",fontSize:"sm",children:t("modelManager.modelLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"path",name:"path",type:"text",width:"2xl"}),c.path&&d.path?v.jsx(Li,{children:c.path}):v.jsx(Ni,{margin:0,children:t("modelManager.modelLocationValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!c.repo_id&&d.repo_id,children:[v.jsx(Qr,{htmlFor:"repo_id",fontSize:"sm",children:t("modelManager.repo_id")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"repo_id",name:"repo_id",type:"text",width:"2xl"}),c.repo_id&&d.repo_id?v.jsx(Li,{children:c.repo_id}):v.jsx(Ni,{margin:0,children:t("modelManager.repoIDValidationMsg")})]})]})]}),v.jsxs(GE,{children:[v.jsx(Yt,{fontWeight:"bold",children:t("modelManager.formMessageDiffusersVAELocation")}),v.jsx(Yt,{sx:{fontSize:"sm",fontStyle:"italic"},variant:"subtext",children:t("modelManager.formMessageDiffusersVAELocationDesc")}),v.jsxs(Or,{isInvalid:!!((p=c.vae)!=null&&p.path)&&((g=d.vae)==null?void 0:g.path),children:[v.jsx(Qr,{htmlFor:"vae.path",fontSize:"sm",children:t("modelManager.vaeLocation")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"vae.path",name:"vae.path",type:"text",width:"2xl"}),(S=c.vae)!=null&&S.path&&((w=d.vae)!=null&&w.path)?v.jsx(Li,{children:(C=c.vae)==null?void 0:C.path}):v.jsx(Ni,{margin:0,children:t("modelManager.vaeLocationValidationMsg")})]})]}),v.jsxs(Or,{isInvalid:!!((k=c.vae)!=null&&k.repo_id)&&((P=d.vae)==null?void 0:P.repo_id),children:[v.jsx(Qr,{htmlFor:"vae.repo_id",fontSize:"sm",children:t("modelManager.vaeRepoID")}),v.jsxs(jn,{alignItems:"start",children:[v.jsx(Fi,{as:wi,id:"vae.repo_id",name:"vae.repo_id",type:"text",width:"2xl"}),(D=c.vae)!=null&&D.repo_id&&((M=d.vae)!=null&&M.repo_id)?v.jsx(Li,{children:(R=c.vae)==null?void 0:R.repo_id}):v.jsx(Ni,{margin:0,children:t("modelManager.vaeRepoIDValidationMsg")})]})]})]}),v.jsx(mr,{type:"submit",isLoading:n,children:t("modelManager.addModel")})]})})}})]})}function eW({text:e,onClick:t}){return v.jsx(Fe,{position:"relative",width:"50%",height:40,justifyContent:"center",alignItems:"center",onClick:t,as:xv,children:v.jsx(Yt,{fontWeight:"bold",children:e})})}function fOe(){const{isOpen:e,onOpen:t,onClose:n}=jp(),r=we(s=>s.ui.addNewModelUIOption),i=nt(),{t:a}=ht(),o=()=>{n(),i(Jm(null))};return v.jsxs(v.Fragment,{children:[v.jsx(mr,{"aria-label":a("modelManager.addNewModel"),tooltip:a("modelManager.addNewModel"),onClick:t,size:"sm",children:v.jsxs(Fe,{columnGap:2,alignItems:"center",children:[v.jsx(CS,{}),a("modelManager.addNew")]})}),v.jsxs(Np,{isOpen:e,onClose:o,size:"3xl",closeOnOverlayClick:!1,children:[v.jsx(ch,{}),v.jsxs(Lp,{margin:"auto",paddingInlineEnd:4,children:[v.jsx(uh,{children:a("modelManager.addNewModel")}),v.jsx(sy,{}),v.jsxs(dh,{children:[r==null&&v.jsxs(Fe,{columnGap:4,children:[v.jsx(eW,{text:a("modelManager.addCheckpointModel"),onClick:()=>i(Jm("ckpt"))}),v.jsx(eW,{text:a("modelManager.addDiffuserModel"),onClick:()=>i(Jm("diffusers"))})]}),r=="ckpt"&&v.jsx(cOe,{}),r=="diffusers"&&v.jsx(dOe,{})]}),v.jsx(lh,{})]})]})]})}function WE(e){const{isProcessing:t,isConnected:n}=we(w=>w.system),r=we(w=>w.system.openModel),{t:i}=ht(),a=nt(),{name:o,status:s,description:c}=e,d=()=>{a(TN(o))},p=()=>{a(GI(o))},g=()=>{a(Uee(o)),a(GI(null))},S=()=>{switch(s){case"active":return"ok.500";case"cached":return"warning.500";case"not loaded":return"inherit"}};return v.jsxs(Fe,{alignItems:"center",p:2,borderRadius:"base",sx:o===r?{bg:"accent.750",_hover:{bg:"accent.750"}}:{_hover:{bg:"base.750"}},children:[v.jsx(Bn,{onClick:p,cursor:"pointer",children:v.jsx(so,{label:c,hasArrow:!0,placement:"bottom",children:v.jsx(Yt,{fontWeight:"600",children:o})})}),v.jsx(BC,{onClick:p,cursor:"pointer"}),v.jsxs(Fe,{gap:2,alignItems:"center",children:[v.jsx(Yt,{color:S(),children:s}),v.jsx(xv,{size:"sm",onClick:d,isDisabled:s==="active"||t||!n,children:i("modelManager.load")}),v.jsx(kt,{icon:v.jsx(I2e,{}),size:"sm",onClick:p,"aria-label":"Modify Config",isDisabled:s==="active"||t||!n}),v.jsx(AE,{title:i("modelManager.deleteModel"),acceptCallback:g,acceptButtonText:i("modelManager.delete"),triggerComponent:v.jsx(kt,{icon:v.jsx(R2e,{}),size:"sm","aria-label":i("modelManager.deleteConfig"),isDisabled:s==="active"||t||!n,colorScheme:"error"}),children:v.jsxs(Fe,{rowGap:4,flexDirection:"column",children:[v.jsx("p",{style:{fontWeight:"bold"},children:i("modelManager.deleteMsg1")}),v.jsx("p",{children:i("modelManager.deleteMsg2")})]})})]})]})}function hOe(){const e=nt(),{isOpen:t,onOpen:n,onClose:r}=jp(),i=we(txe),{t:a}=ht(),[o,s]=A.useState(Object.keys(i)[0]),[c,d]=A.useState(Object.keys(i)[1]),[p,g]=A.useState("none"),[S,w]=A.useState(""),[C,k]=A.useState(.5),[P,D]=A.useState("weighted_sum"),[M,R]=A.useState("root"),[L,z]=A.useState(""),[U,H]=A.useState(!1),q=Object.keys(i).filter(X=>X!==c&&X!==p),J=Object.keys(i).filter(X=>X!==o&&X!==p),$=[{key:a("modelManager.none"),value:"none"},...Object.keys(i).filter(X=>X!==o&&X!==c).map(X=>({key:X,value:X}))],K=we(X=>X.system.isProcessing),fe=()=>{let X=[o,c,p];X=X.filter(te=>te!=="none");const G={models_to_merge:X,merged_model_name:S!==""?S:X.join("-"),alpha:C,interp:P,model_merge_save_path:M==="root"?null:L,force:U};e(Vee(G))};return v.jsxs(v.Fragment,{children:[v.jsx(mr,{onClick:n,size:"sm",children:v.jsx(Fe,{columnGap:2,alignItems:"center",children:a("modelManager.mergeModels")})}),v.jsxs(Np,{isOpen:t,onClose:r,size:"4xl",closeOnOverlayClick:!1,children:[v.jsx(ch,{}),v.jsxs(Lp,{fontFamily:"Inter",margin:"auto",paddingInlineEnd:4,children:[v.jsx(uh,{children:a("modelManager.mergeModels")}),v.jsx(sy,{}),v.jsx(dh,{children:v.jsxs(Fe,{flexDirection:"column",rowGap:4,children:[v.jsxs(Fe,{sx:{flexDirection:"column",marginBottom:4,padding:4,borderRadius:"base",rowGap:1,bg:"base.900"},children:[v.jsx(Yt,{children:a("modelManager.modelMergeHeaderHelp1")}),v.jsx(Yt,{fontSize:"sm",variant:"subtext",children:a("modelManager.modelMergeHeaderHelp2")})]}),v.jsxs(Fe,{columnGap:4,children:[v.jsx(xl,{label:a("modelManager.modelOne"),validValues:q,onChange:X=>s(X.target.value)}),v.jsx(xl,{label:a("modelManager.modelTwo"),validValues:J,onChange:X=>d(X.target.value)}),v.jsx(xl,{label:a("modelManager.modelThree"),validValues:$,onChange:X=>{X.target.value!=="none"?(g(X.target.value),D("add_difference")):(g("none"),D("weighted_sum"))}})]}),v.jsx(wi,{label:a("modelManager.mergedModelName"),value:S,onChange:X=>w(X.target.value)}),v.jsxs(Fe,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[v.jsx(ni,{label:a("modelManager.alpha"),min:.01,max:.99,step:.01,value:C,onChange:X=>k(X),withInput:!0,withReset:!0,handleReset:()=>k(.5),withSliderMarks:!0}),v.jsx(Yt,{variant:"subtext",fontSize:"sm",children:a("modelManager.modelMergeAlphaHelp")})]}),v.jsxs(Fe,{sx:{padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[v.jsx(Yt,{fontWeight:500,fontSize:"sm",variant:"subtext",children:a("modelManager.interpolationType")}),v.jsx(xS,{value:P,onChange:X=>D(X),children:v.jsx(Fe,{columnGap:4,children:p==="none"?v.jsxs(v.Fragment,{children:[v.jsx(Gs,{value:"weighted_sum",children:v.jsx(Yt,{fontSize:"sm",children:a("modelManager.weightedSum")})}),v.jsx(Gs,{value:"sigmoid",children:v.jsx(Yt,{fontSize:"sm",children:a("modelManager.sigmoid")})}),v.jsx(Gs,{value:"inv_sigmoid",children:v.jsx(Yt,{fontSize:"sm",children:a("modelManager.inverseSigmoid")})})]}):v.jsx(Gs,{value:"add_difference",children:v.jsx(so,{label:a("modelManager.modelMergeInterpAddDifferenceHelp"),children:v.jsx(Yt,{fontSize:"sm",children:a("modelManager.addDifference")})})})})})]}),v.jsxs(Fe,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.900"},children:[v.jsxs(Fe,{columnGap:4,children:[v.jsx(Yt,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:a("modelManager.mergedModelSaveLocation")}),v.jsx(xS,{value:M,onChange:X=>R(X),children:v.jsxs(Fe,{columnGap:4,children:[v.jsx(Gs,{value:"root",children:v.jsx(Yt,{fontSize:"sm",children:a("modelManager.invokeAIFolder")})}),v.jsx(Gs,{value:"custom",children:v.jsx(Yt,{fontSize:"sm",children:a("modelManager.custom")})})]})})]}),M==="custom"&&v.jsx(wi,{label:a("modelManager.mergedModelCustomSaveLocation"),value:L,onChange:X=>z(X.target.value)})]}),v.jsx(xi,{label:a("modelManager.ignoreMismatch"),isChecked:U,onChange:X=>H(X.target.checked),fontWeight:"500"}),v.jsx(mr,{onClick:fe,isLoading:K,isDisabled:M==="custom"&&L==="",children:a("modelManager.merge")})]})}),v.jsx(lh,{})]})]})]})}const pOe=Gt(zi,e=>Je.map(e.model_list,(n,r)=>({name:r,...n})),{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function BO({label:e,isActive:t,onClick:n}){return v.jsx(mr,{onClick:n,isActive:t,sx:{_active:{bg:"accent.750"}},size:"sm",children:e})}const mOe=()=>{const e=we(pOe),[t,n]=A.useState(!1);A.useEffect(()=>{const S=setTimeout(()=>{n(!0)},200);return()=>clearTimeout(S)},[]);const[r,i]=A.useState(""),[a,o]=A.useState("all"),[s,c]=A.useTransition(),{t:d}=ht(),p=S=>{c(()=>{i(S.target.value)})},g=A.useMemo(()=>{const S=[],w=[],C=[],k=[];return e.forEach((P,D)=>{P.name.toLowerCase().includes(r.toLowerCase())&&(C.push(v.jsx(WE,{name:P.name,status:P.status,description:P.description},D)),P.format===a&&k.push(v.jsx(WE,{name:P.name,status:P.status,description:P.description},D))),P.format!=="diffusers"?S.push(v.jsx(WE,{name:P.name,status:P.status,description:P.description},D)):w.push(v.jsx(WE,{name:P.name,status:P.status,description:P.description},D))}),r!==""?a==="all"?v.jsx(Bn,{marginTop:4,children:C}):v.jsx(Bn,{marginTop:4,children:k}):v.jsxs(Fe,{flexDirection:"column",rowGap:6,children:[a==="all"&&v.jsxs(v.Fragment,{children:[v.jsxs(Bn,{children:[v.jsx(Yt,{sx:{fontWeight:"500",py:2,px:4,my:4,mx:0,borderRadius:"base",width:"max-content",fontSize:"sm",bg:"base.750"},children:d("modelManager.checkpointModels")}),S]}),v.jsxs(Bn,{children:[v.jsx(Yt,{sx:{fontWeight:"500",py:2,px:4,mb:4,borderRadius:"base",width:"max-content",fontSize:"sm",bg:"base.750"},children:d("modelManager.diffusersModels")}),w]})]}),a==="ckpt"&&v.jsx(Fe,{flexDirection:"column",marginTop:4,children:S}),a==="diffusers"&&v.jsx(Fe,{flexDirection:"column",marginTop:4,children:w})]})},[e,r,d,a]);return v.jsxs(Fe,{flexDirection:"column",rowGap:4,width:"50%",minWidth:"50%",children:[v.jsxs(Fe,{justifyContent:"space-between",alignItems:"center",gap:2,children:[v.jsx(Vu,{size:"md",children:d("modelManager.availableModels")}),v.jsx(BC,{}),v.jsx(fOe,{}),v.jsx(hOe,{})]}),v.jsx(wi,{onChange:p,label:d("modelManager.search")}),v.jsxs(Fe,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-240,overflow:"scroll",paddingInlineEnd:4,children:[v.jsxs(Fe,{columnGap:2,children:[v.jsx(BO,{label:d("modelManager.allModels"),onClick:()=>o("all"),isActive:a==="all"}),v.jsx(BO,{label:d("modelManager.checkpointModels"),onClick:()=>o("ckpt"),isActive:a==="ckpt"}),v.jsx(BO,{label:d("modelManager.diffusersModels"),onClick:()=>o("diffusers"),isActive:a==="diffusers"})]}),t?g:v.jsx(Fe,{width:"100%",minHeight:96,justifyContent:"center",alignItems:"center",children:v.jsx(z0,{})})]})]})};function vOe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=jp(),i=we(s=>s.system.model_list),a=we(s=>s.system.openModel),{t:o}=ht();return v.jsxs(v.Fragment,{children:[A.cloneElement(e,{onClick:n}),v.jsxs(Np,{isOpen:t,onClose:r,size:"full",children:[v.jsx(ch,{}),v.jsxs(Lp,{children:[v.jsx(sy,{}),v.jsx(uh,{children:o("modelManager.modelManager")}),v.jsx(dh,{children:v.jsxs(Fe,{width:"100%",columnGap:8,children:[v.jsx(mOe,{}),a&&i[a].format==="diffusers"?v.jsx(lOe,{}):v.jsx(oOe,{})]})}),v.jsx(lh,{})]})]})]})}const gOe=Gt([zi],e=>{const{isProcessing:t,model_list:n}=e;return{models:Je.map(n,(i,a)=>a),isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),yOe=()=>{const e=nt(),{t}=ht(),{models:n,isProcessing:r}=we(gOe),i=we(pU),a=o=>{e(TN(o.target.value))};return v.jsx(Fe,{style:{paddingInlineStart:1.5},children:v.jsx(xl,{style:{fontSize:"sm"},"aria-label":t("accessibility.modelSelect"),tooltip:i.description,isDisabled:r,value:i.name,validValues:n,onChange:a})})},bOe=Gt([zi,Ov],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:a,saveIntermediatesInterval:o,enableImageDebugging:s}=e,{shouldUseCanvasBetaLayout:c,shouldUseSliders:d}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:Je.map(a,(p,g)=>g),saveIntermediatesInterval:o,enableImageDebugging:s,shouldUseCanvasBetaLayout:c,shouldUseSliders:d}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),FO={flexDirection:"column",gap:2,p:4,bg:"base.900"},SOe=({children:e})=>{const t=nt(),{t:n}=ht(),r=we(R=>R.generation.steps),{isOpen:i,onOpen:a,onClose:o}=jp(),{isOpen:s,onOpen:c,onClose:d}=jp(),{shouldDisplayInProgressType:p,shouldConfirmOnDelete:g,shouldDisplayGuides:S,saveIntermediatesInterval:w,enableImageDebugging:C,shouldUseCanvasBetaLayout:k,shouldUseSliders:P}=we(bOe),D=()=>{AN.purge().then(()=>{o(),c()})},M=R=>{R>r&&(R=r),R<1&&(R=1),t(rZ(R))};return v.jsxs(v.Fragment,{children:[A.cloneElement(e,{onClick:a}),v.jsxs(Np,{isOpen:i,onClose:o,size:"xl",children:[v.jsx(ch,{}),v.jsxs(Lp,{paddingInlineEnd:4,children:[v.jsx(uh,{children:n("common.settingsLabel")}),v.jsx(sy,{}),v.jsx(dh,{children:v.jsxs(Hu,{gap:4,children:[v.jsxs(Fe,{sx:FO,children:[v.jsx(xl,{label:n("settings.displayInProgress"),validValues:cJ,value:p,onChange:R=>t(KQ(R.target.value))}),p==="full-res"&&v.jsx(ph,{label:n("settings.saveSteps"),min:1,max:r,step:1,onChange:M,value:w,width:"auto",textAlign:"center"}),v.jsx(wl,{label:n("settings.confirmOnDelete"),isChecked:g,onChange:R=>t(BI(R.target.checked))}),v.jsx(wl,{label:n("settings.displayHelpIcons"),isChecked:S,onChange:R=>t(JQ(R.target.checked))}),v.jsx(wl,{label:n("settings.useCanvasBeta"),isChecked:k,onChange:R=>t(hZ(R.target.checked))}),v.jsx(wl,{label:n("settings.useSlidersForAll"),isChecked:P,onChange:R=>t(mZ(R.target.checked))})]}),v.jsxs(Fe,{sx:FO,children:[v.jsx(Vu,{size:"sm",style:{fontWeight:"bold"},children:"Developer"}),v.jsx(wl,{label:n("settings.enableImageDebugging"),isChecked:C,onChange:R=>t(iZ(R.target.checked))})]}),v.jsxs(Fe,{sx:FO,children:[v.jsx(Vu,{size:"sm",children:n("settings.resetWebUI")}),v.jsx(mr,{colorScheme:"error",onClick:D,children:n("settings.resetWebUI")}),v.jsx(Yt,{children:n("settings.resetWebUIDesc1")}),v.jsx(Yt,{children:n("settings.resetWebUIDesc2")})]})]})}),v.jsx(lh,{children:v.jsx(mr,{onClick:o,children:n("common.close")})})]})]}),v.jsxs(Np,{closeOnOverlayClick:!1,isOpen:s,onClose:d,isCentered:!0,children:[v.jsx(ch,{backdropFilter:"blur(40px)"}),v.jsxs(Lp,{children:[v.jsx(uh,{}),v.jsx(dh,{children:v.jsx(Fe,{justifyContent:"center",children:v.jsx(Yt,{fontSize:"lg",children:v.jsx(Yt,{children:n("settings.resetComplete")})})})}),v.jsx(lh,{})]})]})]})},xOe=Gt(zi,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),wOe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:a,wasErrorSeen:o}=we(xOe),s=nt(),{t:c}=ht();let d;e&&!a?d="ok":d="error";let p=i;t&&(d="working"),p&&t&&r>1&&(p=`${c(p)} (${n}/${r})`);const g=a&&!o?"Click to clear, check logs for details":void 0,S=a&&!o?"pointer":"initial",w=()=>{(a||!o)&&s(UI())};return v.jsx(so,{label:g,children:v.jsx(Yt,{cursor:S,onClick:w,sx:{fontSize:"xs",fontWeight:"600",color:`${d}.400`},children:c(p)})})};function COe(){const{t:e}=ht(),t=nt(),n=we(o=>o.ui.currentTheme),r={dark:e("common.darkTheme"),light:e("common.lightTheme"),green:e("common.greenTheme"),ocean:e("common.oceanTheme")},i=o=>{t(uZ(o))},a=()=>{const o=[];return Object.keys(r).forEach(s=>{o.push(v.jsx(mr,{sx:{width:24},isChecked:n===s,leftIcon:n===s?v.jsx(cE,{}):void 0,size:"sm",onClick:()=>i(s),children:r[s]},s))}),o};return v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{"aria-label":e("common.themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:v.jsx(Nxe,{})}),children:v.jsx(jn,{align:"stretch",children:a()})})}function EOe(){const{t:e,i18n:t}=ht(),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 i=[];return Object.keys(n).forEach(a=>{i.push(v.jsx(mr,{isChecked:localStorage.getItem("i18nextLng")===a,leftIcon:localStorage.getItem("i18nextLng")===a?v.jsx(cE,{}):void 0,onClick:()=>t.changeLanguage(a),"aria-label":n[a],size:"sm",minWidth:"200px",children:n[a]},a))}),i};return v.jsx(Uc,{trigger:"hover",triggerComponent:v.jsx(kt,{"aria-label":e("common.languagePickerLabel"),tooltip:e("common.languagePickerLabel"),icon:v.jsx(jxe,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:v.jsx(jn,{children:r()})})}const _Oe=()=>{const{t:e}=ht();return v.jsxs(Hu,{gridTemplateColumns:"auto max-content",children:[v.jsx(zH,{}),v.jsxs(Fe,{alignItems:"center",gap:2,children:[v.jsx(wOe,{}),v.jsx(yOe,{}),v.jsx(vOe,{children:v.jsx(kt,{"aria-label":e("modelManager.modelManager"),tooltip:e("modelManager.modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:v.jsx(_xe,{})})}),v.jsx(d4e,{children:v.jsx(kt,{"aria-label":e("common.hotkeysLabel"),tooltip:e("common.hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:v.jsx(Mxe,{})})}),v.jsx(COe,{}),v.jsx(EOe,{}),v.jsx(kt,{"aria-label":e("common.reportBugLabel"),tooltip:e("common.reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:v.jsx(_v,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:v.jsx(Exe,{})})}),v.jsx(kt,{"aria-label":e("common.githubLabel"),tooltip:e("common.githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:v.jsx(_v,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:v.jsx(gxe,{})})}),v.jsx(kt,{"aria-label":e("common.discordLabel"),tooltip:e("common.discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:v.jsx(_v,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:v.jsx(vxe,{})})}),v.jsx(SOe,{children:v.jsx(kt,{"aria-label":e("common.settingsLabel"),tooltip:e("common.settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:v.jsx(s2e,{})})})]})]})};function TOe(){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 kOe=()=>{const e=nt(),t=we(exe),n=oS();A.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(oZ())},[e,n,t])},POe=()=>{const e=nt(),{shouldShowGalleryButton:t,shouldPinGallery:n}=we(RA),r=()=>{e(Km(!0)),n&&e(Wo(!0))};return t?v.jsx(kt,{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:v.jsx(yA,{})}):null};TOe();const AOe=Object.freeze(Object.defineProperty({__proto__:null,default:()=>(kOe(),v.jsxs(Hu,{w:"100vw",h:"100vh",children:[v.jsxs(i4e,{children:[v.jsx(u4e,{}),v.jsxs(Hu,{gap:4,p:T2e,gridAutoRows:"min-content auto",w:k2e,h:P2e,children:[v.jsx(_Oe,{}),v.jsx(uke,{})]}),v.jsx(Bn,{children:v.jsx(s4e,{})})]}),v.jsx(iCe,{}),v.jsx(POe,{})]}))},Symbol.toStringTag,{value:"Module"}));function ea(e,t,n=!1){e=String(e),t=String(t);const r=Array.from({length:21},(s,c)=>c*50),i=["0","5","10","15","20","25","30","35","40","45","50","55","59","64","68","73","77","82","86","95","100"],a={},o={};return r.forEach((s,c)=>{a[s]=`hsl(${e}, ${t}%, ${i[r.length-1-c]}%)`,o[s]=`hsl(${e}, ${t}%, ${i[c]}%)`}),n?o:a}const tW={base:ea(225,15),accent:ea(250,50),working:ea(47,67),warning:ea(28,75),ok:ea(113,70),error:ea(0,76)};function Zr(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(...p){r();for(const g of p)t[g]=c(g);return Zr(e,t)}function a(...p){for(const g of p)g in t||(t[g]=c(g));return Zr(e,t)}function o(){return Object.fromEntries(Object.entries(t).map(([g,S])=>[g,S.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,S])=>[g,S.className]))}function c(p){const w=`chakra-${(["container","root"].includes(p??"")?[e]:[e,p]).filter(Boolean).join("__")}`;return{className:w,selector:`.${w}`,toString:()=>p}}return{parts:i,toPart:c,extend:a,selectors:o,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var OOe=Zr("accordion").parts("root","container","button","panel").extend("icon");Zr("alert").parts("title","description","container").extend("icon","spinner"),Zr("avatar").parts("label","badge","container").extend("excessLabel","group"),Zr("breadcrumb").parts("link","item","container").extend("separator"),Zr("button").parts();var DOe=Zr("checkbox").parts("control","icon","container").extend("label");Zr("progress").parts("track","filledTrack").extend("label"),Zr("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Zr("editable").parts("preview","input","textarea"),Zr("form").parts("container","requiredIndicator","helperText"),Zr("formError").parts("text","icon");var MOe=Zr("input").parts("addon","field","element");Zr("list").parts("container","item","icon");var jOe=Zr("menu").parts("button","list","item").extend("groupTitle","command","divider"),IOe=Zr("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),ROe=Zr("numberinput").parts("root","field","stepperGroup","stepper");Zr("pininput").parts("field");var NOe=Zr("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),LOe=Zr("progress").parts("label","filledTrack","track");Zr("radio").parts("container","control","label");var zOe=Zr("select").parts("field","icon"),BOe=Zr("slider").parts("container","track","thumb","filledTrack","mark");Zr("stat").parts("container","label","helpText","number","icon");var FOe=Zr("switch").parts("container","track","thumb");Zr("table").parts("table","thead","tbody","tr","th","td","tfoot","caption");var UOe=Zr("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator");Zr("tag").parts("container","label","closeButton"),Zr("card").parts("container","header","body","footer");const{definePartsStyle:HOe,defineMultiStyleConfig:VOe}=fr(OOe.keys),GOe={border:"none",pt:2},WOe=e=>{const{colorScheme:t}=e;return{fontWeight:"600",fontSize:"sm",border:"none",borderRadius:"base",bg:`${t}.800`,color:"base.100",_hover:{bg:`${t}.700`},_expanded:{bg:`${t}.750`,borderBottomRadius:"none",_hover:{bg:`${t}.700`}}}},qOe=e=>{const{colorScheme:t}=e;return{bg:`${t}.800`,borderRadius:"base",borderTopRadius:"none",p:4}},YOe={},KOe=HOe(e=>({container:GOe,button:WOe(e),panel:qOe(e),icon:YOe})),XOe=VOe({variants:{invokeAI:KOe},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),QOe=e=>{const{colorScheme:t}=e,n={bg:`${t}.600`,color:`${t}.100`,svg:{fill:`${t}.100`}};return{bg:`${t}.700`,color:`${t}.100`,borderRadius:"base",svg:{fill:`${t}.100`},_disabled:n,_hover:{bg:`${t}.650`,color:`${t}.50`,svg:{fill:`${t}.50`},_disabled:n},_checked:{bg:"accent.700",color:"accent.100",svg:{fill:"accent.100"},_disabled:n,_hover:{bg:"accent.600",color:"accent.50",svg:{fill:"accent.50"},_disabled:n}}}},ZOe={variants:{invokeAI:QOe},defaultProps:{variant:"invokeAI",colorScheme:"base"}},{definePartsStyle:JOe,defineMultiStyleConfig:$Oe}=fr(DOe.keys),eDe=e=>{const{colorScheme:t}=e;return{_checked:{bg:`${t}.200`,borderColor:`${t}.200`,color:"base.900",_hover:{bg:`${t}.300`,borderColor:`${t}.300`},_disabled:{borderColor:"transparent",bg:"whiteAlpha.300",color:"whiteAlpha.500"}},_indeterminate:{bg:`${t}.200`,borderColor:`${t}.200`,color:"base.900"},_disabled:{bg:"whiteAlpha.100",borderColor:"transparent"},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:"red.300"}}},tDe=JOe(e=>({control:eDe(e)})),nDe=$Oe({variants:{invokeAI:tDe},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),rDe=e=>({fontSize:"sm",marginEnd:0,mb:1,fontWeight:"400",transitionProperty:"common",transitionDuration:"normal",whiteSpace:"nowrap",_disabled:{opacity:.4},color:"base.300"}),iDe={variants:{invokeAI:rDe},defaultProps:{variant:"invokeAI"}},qE=e=>({outline:"none",borderWidth:2,borderStyle:"solid",borderColor:"base.800",bg:"base.900",borderRadius:"base",color:"base.100",boxShadow:"none",_hover:{borderColor:"base.600"},_focus:{borderColor:"accent.700",boxShadow:"none",_hover:{borderColor:"accent.600"}},_invalid:{borderColor:"error.700",boxShadow:"none",_hover:{borderColor:"error.600"}},_disabled:{borderColor:"base.700",bg:"base.700",color:"base.400",_hover:{borderColor:"base.700"}},_placeholder:{color:"base.400"}}),{definePartsStyle:aDe,defineMultiStyleConfig:oDe}=fr(MOe.keys),sDe=aDe(e=>({field:qE()})),lDe=oDe({variants:{invokeAI:sDe},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:uDe,defineMultiStyleConfig:cDe}=fr(jOe.keys),dDe=uDe({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"}}}),fDe=cDe({variants:{invokeAI:dDe},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:hDe,definePartsStyle:pDe}=fr(IOe.keys),mDe={bg:"blackAlpha.600"},vDe={},gDe=e=>({bg:"base.850",maxH:"80vh"}),yDe=e=>({fontWeight:"600",fontSize:"lg",color:"base.200"}),bDe={},SDe={overflowY:"scroll"},xDe={},wDe=pDe(e=>({overlay:mDe,dialogContainer:vDe,dialog:gDe(e),header:yDe(e),closeButton:bDe,body:SDe,footer:xDe})),CDe=hDe({variants:{invokeAI:wDe},defaultProps:{variant:"invokeAI",size:"lg"}}),{defineMultiStyleConfig:EDe,definePartsStyle:_De}=fr(ROe.keys),TDe=e=>({height:8}),kDe=e=>({border:"none",fontWeight:"600",height:"auto",py:1,ps:2,pe:6,...qE()}),PDe=e=>({display:"flex"}),ADe=e=>({border:"none",px:2,py:0,mx:-2,my:0,svg:{color:"base.300",width:2.5,height:2.5,_hover:{color:"base.50"}}}),ODe=_De(e=>({root:TDe(e),field:kDe(e),stepperGroup:PDe(e),stepper:ADe(e)})),DDe=EDe({variants:{invokeAI:ODe},defaultProps:{size:"sm",variant:"invokeAI"}});function MDe(e){return!Number.isInteger(parseFloat(e.toString()))}function jDe(e,t="-"){return e.replace(/\s+/g,t)}function nW(e){const t=jDe(e.toString());return t.includes("\\.")?e:MDe(e)?t.replace(".","\\."):e}function IDe(e,t=""){return[t,nW(e)].filter(Boolean).join("-")}function RDe(e,t){return`var(${nW(e)}${t?`, ${t}`:""})`}function NDe(e,t=""){return`--${IDe(e,t)}`}function UO(e,t){const n=NDe(e,t==null?void 0:t.prefix);return{variable:n,reference:RDe(n,LDe(t==null?void 0:t.fallback))}}function LDe(e){return typeof e=="string"?e:e==null?void 0:e.reference}const{defineMultiStyleConfig:zDe,definePartsStyle:BDe}=fr(NOe.keys),FDe=UO("popper-bg"),UDe=UO("popper-arrow-bg"),HDe=UO("popper-arrow-shadow-color"),VDe=e=>({[UDe.variable]:"colors.base.800",[FDe.variable]:"colors.base.800",[HDe.variable]:"colors.base.600",minW:"unset",width:"unset",p:4,borderWidth:"2px",borderStyle:"solid",borderColor:"base.600",bg:"base.800"}),GDe=BDe(e=>({content:VDe(e)})),WDe=zDe({variants:{invokeAI:GDe},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:qDe,definePartsStyle:YDe}=fr(LOe.keys),KDe=e=>({bg:"accent.600",transition:"width 0.2s ease-in-out",_indeterminate:{bgGradient:"linear(to-r, transparent 0%, accent.600 50%, transparent 100%);"}}),XDe=e=>({bg:"base.800"}),QDe=YDe(e=>({filledTrack:KDe(e),track:XDe(e)})),ZDe=qDe({variants:{invokeAI:QDe},defaultProps:{variant:"invokeAI"}}),{definePartsStyle:JDe,defineMultiStyleConfig:$De}=fr(zOe.keys),eMe=e=>({color:"base.300"}),tMe=e=>({fontWeight:"600",...qE()}),nMe=JDe(e=>({field:tMe(e),icon:eMe(e)})),rMe=$De({variants:{invokeAI:nMe},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:iMe,defineMultiStyleConfig:aMe}=fr(BOe.keys),oMe=e=>({bg:"base.400",h:1.5}),sMe=e=>{const{colorScheme:t}=e;return{bg:`${t}.600`,h:1.5}},lMe=e=>({w:2,h:4}),uMe=e=>({fontSize:"xs",fontWeight:"500",color:"base.200",mt:2,insetInlineStart:"unset"}),cMe=iMe(e=>({track:oMe(e),filledTrack:sMe(e),thumb:lMe(e),mark:uMe(e)})),dMe=aMe({variants:{invokeAI:cMe},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:fMe,definePartsStyle:hMe}=fr(FOe.keys),pMe=e=>{const{colorScheme:t}=e;return{bg:"base.600",_focusVisible:{boxShadow:"none"},_checked:{bg:`${t}.600`}}},mMe=e=>{const{colorScheme:t}=e;return{bg:`${t}.50`}},vMe=hMe(e=>({container:{},track:pMe(e),thumb:mMe(e)})),gMe=fMe({variants:{invokeAI:vMe},defaultProps:{size:"md",variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:yMe,definePartsStyle:bMe}=fr(UOe.keys),SMe=e=>({display:"flex",columnGap:4}),xMe=e=>({}),wMe=e=>({display:"flex",flexDirection:"column",gap:1,color:"base.700",button:{fontSize:"sm",padding:2,borderRadius:"base",_selected:{bg:"accent.700",color:"accent.100",_hover:{bg:"accent.600",color:"accent.50"}},_hover:{bg:"base.600",color:"base.50"}}}),CMe=e=>({padding:0,height:"100%"}),EMe=bMe(e=>({root:SMe(e),tab:xMe(e),tablist:wMe(e),tabpanel:CMe(e)})),_Me=yMe({variants:{invokeAI:EMe},defaultProps:{variant:"invokeAI"}}),TMe=e=>({color:"base.400"}),kMe={variants:{subtext:TMe}},PMe=e=>qE(),AMe={variants:{invokeAI:PMe},defaultProps:{size:"md",variant:"invokeAI"}},OMe={config:{cssVarPrefix:"invokeai"},styles:{global:e=>({body:{bg:"base.900",color:"base.50",overflow:"hidden"},...D2e})},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:{...tW},components:{Button:ZOe,Input:lDe,Textarea:AMe,Tabs:_Me,Progress:ZDe,Accordion:XOe,FormLabel:iDe,Switch:gMe,NumberInput:DDe,Select:rMe,Slider:dMe,Popover:WDe,Modal:CDe,Checkbox:nDe,Menu:fDe,Text:kMe}},DMe={base:ea(223,10),accent:ea(155,80),working:ea(47,68),warning:ea(28,75),ok:ea(122,49),error:ea(0,50)},MMe={base:ea(223,10,!0),accent:ea(40,80,!0),working:ea(47,68,!0),warning:ea(28,75,!0),ok:ea(122,49,!0),error:ea(0,50,!0)},jMe={base:ea(220,30),accent:ea(210,80),working:ea(47,68),warning:ea(28,75),ok:ea(122,49),error:ea(0,100)},IMe={dark:tW,light:MMe,green:DMe,ocean:jMe};function RMe({children:e}){const{i18n:t}=ht(),n=we(a=>a.ui.currentTheme),r=t.dir(),i=$ue({...OMe,colors:IMe[n],direction:r});return A.useEffect(()=>{document.body.dir=r},[r]),v.jsx(Cme,{theme:i,children:e})}const NMe=Object.freeze(Object.defineProperty({__proto__:null,default:RMe},Symbol.toStringTag,{value:"Module"}));return RSe});