treege 1.5.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +27 -3
  2. package/dist/features/Treege/Treege.d.ts +1 -1
  3. package/dist/features/Treege/components/Forms/AssignValueToChildren/AssignValueToChildren.d.ts +10 -0
  4. package/dist/features/Treege/components/Forms/AssignValueToChildren/Examples/ObjectMappingExample.d.ts +2 -0
  5. package/dist/features/Treege/components/Forms/FormTreeCardMutation/FormTreeCardMutation.d.ts +3 -1
  6. package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +20 -9
  7. package/dist/features/Treege/components/Forms/ReceiveValueFromAncestor.d.ts +11 -0
  8. package/dist/features/Treege/components/TreeGrid/useTreeGrid.d.ts +2 -0
  9. package/dist/features/Treege/context/TreegeProvider.d.ts +80 -2
  10. package/dist/hooks/useTreegeContext/useTreegeContext.d.ts +1 -1
  11. package/dist/locales/en/form-en.d.ts +17 -2
  12. package/dist/locales/fr/form-fr.d.ts +19 -4
  13. package/dist/main.d.ts +2 -2
  14. package/dist/main.js +6075 -5414
  15. package/dist/main.umd.cjs +55 -46
  16. package/dist/utils/tree/appendNode/appendNode.d.ts +2 -2
  17. package/dist/utils/tree/getAllAncestorFromTree/getAllAncestorFromTree.d.ts +12 -0
  18. package/dist/utils/tree/index.d.ts +2 -3
  19. package/dist/utils/tree/removeNode/test/mock.d.ts +3 -1
  20. package/package.json +10 -10
  21. package/dist/features/Treege/components/Feedback/DynamicSelectWarning/DynamicSelectWarning.d.ts +0 -5
  22. package/dist/features/Treege/components/Feedback/DynamicSelectWarning/index.d.ts +0 -3
  23. package/dist/features/Treege/components/Feedback/EndPointWarning/index.d.ts +0 -3
  24. package/dist/features/Treege/components/Inputs/DynamicSelectFieldFromTree/DynamicSelectFieldFromTree.d.ts +0 -8
  25. package/dist/features/Treege/components/Inputs/DynamicSelectFieldFromTree/index.d.ts +0 -3
  26. package/dist/features/Treege/components/Inputs/FieldSelectAutocompleteCreatable/index.d.ts +0 -3
  27. package/dist/features/Treege/context/TreegeContext.d.ts +0 -81
  28. package/dist/features/Treege/index.d.ts +0 -2
  29. package/dist/utils/tree/getAllAncestorNamesFromTree/getAllAncestorNamesFromTree.d.ts +0 -8
  30. package/dist/utils/tree/getAllNamesFromTree/getAllNamesFromTree.d.ts +0 -7
  31. package/dist/utils/tree/getAllNamesFromTree/test/mock.d.ts +0 -11
  32. /package/dist/features/Treege/components/Feedback/{EndPointWarning/EndPointWarning.d.ts → EndPointWarning.d.ts} +0 -0
  33. /package/dist/features/Treege/components/Inputs/{FieldSelectAutocompleteCreatable/FieldSelectAutocompleteCreatable.d.ts → FieldSelectAutocompleteCreatable.d.ts} +0 -0
  34. /package/dist/utils/tree/{getAllAncestorNamesFromTree → getAllAncestorFromTree}/test/mock.d.ts +0 -0
package/dist/main.umd.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(Me,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("@tanstack/react-query"),require("axios"),require("@tracktor/design-system"),require("react-d3-tree"),require("react-i18next"),require("@codemirror/lang-json"),require("@uiw/codemirror-theme-dracula"),require("@uiw/react-codemirror"),require("i18next"),require("i18next-browser-languagedetector")):typeof define=="function"&&define.amd?define(["exports","react","@tanstack/react-query","axios","@tracktor/design-system","react-d3-tree","react-i18next","@codemirror/lang-json","@uiw/codemirror-theme-dracula","@uiw/react-codemirror","i18next","i18next-browser-languagedetector"],_):(Me=typeof globalThis<"u"?globalThis:Me||self,_(Me.treege={},Me.React,Me.reactQuery,Me.axios,Me.tracktorDesignSystem,Me.ReactD3Tree,Me.reactI18next,Me.codemirrorLangJson,Me.codemirrorThemeDracula,Me.reactCodemirror,Me.i18next,Me.i18nextBrowserLanguageDetector))})(this,function(Me,_,Dt,It,p,Vi,Pe,qi,zi,Ni,Ht,Ui){"use strict";function Wi(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)}const q=Wi(_);function Yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ut(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var En={exports:{}},er={};/**
1
+ (function(Fe,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react"),require("@tanstack/react-query"),require("axios"),require("@tracktor/design-system"),require("react-d3-tree"),require("react-i18next"),require("@codemirror/lang-json"),require("@uiw/codemirror-theme-dracula"),require("@uiw/react-codemirror"),require("@mui/icons-material"),require("i18next"),require("i18next-browser-languagedetector")):typeof define=="function"&&define.amd?define(["exports","react","@tanstack/react-query","axios","@tracktor/design-system","react-d3-tree","react-i18next","@codemirror/lang-json","@uiw/codemirror-theme-dracula","@uiw/react-codemirror","@mui/icons-material","i18next","i18next-browser-languagedetector"],k):(Fe=typeof globalThis<"u"?globalThis:Fe||self,k(Fe.treege={},Fe.React,Fe.reactQuery,Fe.axios,Fe.tracktorDesignSystem,Fe.ReactD3Tree,Fe.reactI18next,Fe.codemirrorLangJson,Fe.codemirrorThemeDracula,Fe.reactCodemirror,Fe.iconsMaterial,Fe.i18next,Fe.i18nextBrowserLanguageDetector))})(this,function(Fe,k,Gt,Kt,d,Ks,Le,Js,Qs,Xs,$a,fr,Zs){"use strict";function Hs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const re=Hs(k);function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function el(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var nn={exports:{}},pr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Na;function Ki(){if(Na)return er;Na=1;var e=_,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(l,c,f){var h,m={},b=null,g=null;f!==void 0&&(b=""+f),c.key!==void 0&&(b=""+c.key),c.ref!==void 0&&(g=c.ref);for(h in c)r.call(c,h)&&!o.hasOwnProperty(h)&&(m[h]=c[h]);if(l&&l.defaultProps)for(h in c=l.defaultProps,c)m[h]===void 0&&(m[h]=c[h]);return{$$typeof:t,type:l,key:b,ref:g,props:m,_owner:a.current}}return er.Fragment=n,er.jsx=s,er.jsxs=s,er}var tr={};/**
9
+ */var Pa;function tl(){if(Pa)return pr;Pa=1;var e=k,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,f,p){var b,m={},g=null,y=null;p!==void 0&&(g=""+p),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(y=f.ref);for(b in f)n.call(f,b)&&!a.hasOwnProperty(b)&&(m[b]=f[b]);if(s&&s.defaultProps)for(b in f=s.defaultProps,f)m[b]===void 0&&(m[b]=f[b]);return{$$typeof:t,type:s,key:g,ref:y,props:m,_owner:o.current}}return pr.Fragment=r,pr.jsx=i,pr.jsxs=i,pr}var hr={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,74 +14,75 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ua;function Gi(){return Ua||(Ua=1,process.env.NODE_ENV!=="production"&&function(){var e=_,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),v=Symbol.iterator,u="@@iterator";function y(d){if(d===null||typeof d!="object")return null;var T=v&&d[v]||d[u];return typeof T=="function"?T:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(d){{for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];k("error",d,R)}}function k(d,T,R){{var I=w.ReactDebugCurrentFrame,Z=I.getStackAddendum();Z!==""&&(T+="%s",R=R.concat([Z]));var oe=R.map(function(J){return String(J)});oe.unshift("Warning: "+T),Function.prototype.apply.call(console[d],console,oe)}}var M=!1,x=!1,A=!1,F=!1,be=!1,Ie;Ie=Symbol.for("react.module.reference");function ee(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===o||be||d===a||d===f||d===h||F||d===g||M||x||A||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===m||d.$$typeof===s||d.$$typeof===l||d.$$typeof===c||d.$$typeof===Ie||d.getModuleId!==void 0))}function te(d,T,R){var I=d.displayName;if(I)return I;var Z=T.displayName||T.name||"";return Z!==""?R+"("+Z+")":R}function he(d){return d.displayName||"Context"}function de(d){if(d==null)return null;if(typeof d.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case a:return"StrictMode";case f:return"Suspense";case h:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case l:var T=d;return he(T)+".Consumer";case s:var R=d;return he(R._context)+".Provider";case c:return te(d,d.render,"ForwardRef");case m:var I=d.displayName||null;return I!==null?I:de(d.type)||"Memo";case b:{var Z=d,oe=Z._payload,J=Z._init;try{return de(J(oe))}catch{return null}}}return null}var se=Object.assign,Be=0,Te,ce,Ve,rt,E,S,z;function N(){}N.__reactDisabledLog=!0;function P(){{if(Be===0){Te=console.log,ce=console.info,Ve=console.warn,rt=console.error,E=console.group,S=console.groupCollapsed,z=console.groupEnd;var d={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}Be++}}function Y(){{if(Be--,Be===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:se({},d,{value:Te}),info:se({},d,{value:ce}),warn:se({},d,{value:Ve}),error:se({},d,{value:rt}),group:se({},d,{value:E}),groupCollapsed:se({},d,{value:S}),groupEnd:se({},d,{value:z})})}Be<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var D=w.ReactCurrentDispatcher,V;function B(d,T,R){{if(V===void 0)try{throw Error()}catch(Z){var I=Z.stack.trim().match(/\n( *(at )?)/);V=I&&I[1]||""}return`
18
- `+V+d}}var G=!1,U;{var je=typeof WeakMap=="function"?WeakMap:Map;U=new je}function O(d,T){if(!d||G)return"";{var R=U.get(d);if(R!==void 0)return R}var I;G=!0;var Z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=D.current,D.current=null,P();try{if(T){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(Fe){I=Fe}Reflect.construct(d,[],J)}else{try{J.call()}catch(Fe){I=Fe}d.call(J.prototype)}}else{try{throw Error()}catch(Fe){I=Fe}d()}}catch(Fe){if(Fe&&I&&typeof Fe.stack=="string"){for(var K=Fe.stack.split(`
19
- `),Ae=I.stack.split(`
20
- `),me=K.length-1,ve=Ae.length-1;me>=1&&ve>=0&&K[me]!==Ae[ve];)ve--;for(;me>=1&&ve>=0;me--,ve--)if(K[me]!==Ae[ve]){if(me!==1||ve!==1)do if(me--,ve--,ve<0||K[me]!==Ae[ve]){var ze=`
21
- `+K[me].replace(" at new "," at ");return d.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",d.displayName)),typeof d=="function"&&U.set(d,ze),ze}while(me>=1&&ve>=0);break}}}finally{G=!1,D.current=oe,Y(),Error.prepareStackTrace=Z}var bt=d?d.displayName||d.name:"",lt=bt?B(bt):"";return typeof d=="function"&&U.set(d,lt),lt}function ke(d,T,R){return O(d,!1)}function et(d){var T=d.prototype;return!!(T&&T.isReactComponent)}function Ue(d,T,R){if(d==null)return"";if(typeof d=="function")return O(d,et(d));if(typeof d=="string")return B(d);switch(d){case f:return B("Suspense");case h:return B("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case c:return ke(d.render);case m:return Ue(d.type,T,R);case b:{var I=d,Z=I._payload,oe=I._init;try{return Ue(oe(Z),T,R)}catch{}}}return""}var We=Object.prototype.hasOwnProperty,jt={},Jt=w.ReactDebugCurrentFrame;function tt(d){if(d){var T=d._owner,R=Ue(d.type,d._source,T?T.type:null);Jt.setExtraStackFrame(R)}else Jt.setExtraStackFrame(null)}function St(d,T,R,I,Z){{var oe=Function.call.bind(We);for(var J in d)if(oe(d,J)){var K=void 0;try{if(typeof d[J]!="function"){var Ae=Error((I||"React class")+": "+R+" type `"+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[J]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ae.name="Invariant Violation",Ae}K=d[J](T,J,I,R,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(me){K=me}K&&!(K instanceof Error)&&(tt(Z),j("%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).",I||"React class",R,J,typeof K),tt(null)),K instanceof Error&&!(K.message in jt)&&(jt[K.message]=!0,tt(Z),j("Failed %s type: %s",R,K.message),tt(null))}}}var mr=Array.isArray;function dt(d){return mr(d)}function br(d){{var T=typeof Symbol=="function"&&Symbol.toStringTag,R=T&&d[Symbol.toStringTag]||d.constructor.name||"Object";return R}}function kt(d){try{return ft(d),!1}catch{return!0}}function ft(d){return""+d}function $t(d){if(kt(d))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",br(d)),ft(d)}var Xt=w.ReactCurrentOwner,Mt={key:!0,ref:!0,__self:!0,__source:!0},Pt,pt;function vr(d){if(We.call(d,"ref")){var T=Object.getOwnPropertyDescriptor(d,"ref").get;if(T&&T.isReactWarning)return!1}return d.ref!==void 0}function Ot(d){if(We.call(d,"key")){var T=Object.getOwnPropertyDescriptor(d,"key").get;if(T&&T.isReactWarning)return!1}return d.key!==void 0}function gr(d,T){typeof d.ref=="string"&&Xt.current}function yr(d,T){{var R=function(){Pt||(Pt=!0,j("%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)",T))};R.isReactWarning=!0,Object.defineProperty(d,"key",{get:R,configurable:!0})}}function xr(d,T){{var R=function(){pt||(pt=!0,j("%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)",T))};R.isReactWarning=!0,Object.defineProperty(d,"ref",{get:R,configurable:!0})}}var Cr=function(d,T,R,I,Z,oe,J){var K={$$typeof:t,type:d,key:T,ref:R,props:J,_owner:oe};return K._store={},Object.defineProperty(K._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(K,"_self",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.defineProperty(K,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.freeze&&(Object.freeze(K.props),Object.freeze(K)),K};function _e(d,T,R,I,Z){{var oe,J={},K=null,Ae=null;R!==void 0&&($t(R),K=""+R),Ot(T)&&($t(T.key),K=""+T.key),vr(T)&&(Ae=T.ref,gr(T,Z));for(oe in T)We.call(T,oe)&&!Mt.hasOwnProperty(oe)&&(J[oe]=T[oe]);if(d&&d.defaultProps){var me=d.defaultProps;for(oe in me)J[oe]===void 0&&(J[oe]=me[oe])}if(K||Ae){var ve=typeof d=="function"?d.displayName||d.name||"Unknown":d;K&&yr(J,ve),Ae&&xr(J,ve)}return Cr(d,K,Ae,Z,I,Xt.current,J)}}var ht=w.ReactCurrentOwner,qe=w.ReactDebugCurrentFrame;function Je(d){if(d){var T=d._owner,R=Ue(d.type,d._source,T?T.type:null);qe.setExtraStackFrame(R)}else qe.setExtraStackFrame(null)}var mt;mt=!1;function Tr(d){return typeof d=="object"&&d!==null&&d.$$typeof===t}function un(){{if(ht.current){var d=de(ht.current.type);if(d)return`
17
+ */var Ma;function rl(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&function(){var e=k,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),v=Symbol.iterator,c="@@iterator";function T(h){if(h===null||typeof h!="object")return null;var R=v&&h[v]||h[c];return typeof R=="function"?R:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(h){{for(var R=arguments.length,M=new Array(R>1?R-1:0),q=1;q<R;q++)M[q-1]=arguments[q];_("error",h,M)}}function _(h,R,M){{var q=w.ReactDebugCurrentFrame,ae=q.getStackAddendum();ae!==""&&(R+="%s",M=M.concat([ae]));var ue=M.map(function(H){return String(H)});ue.unshift("Warning: "+R),Function.prototype.apply.call(console[h],console,ue)}}var O=!1,C=!1,I=!1,D=!1,se=!1,ee;ee=Symbol.for("react.module.reference");function u(h){return!!(typeof h=="string"||typeof h=="function"||h===n||h===a||se||h===o||h===p||h===b||D||h===y||O||C||I||typeof h=="object"&&h!==null&&(h.$$typeof===g||h.$$typeof===m||h.$$typeof===i||h.$$typeof===s||h.$$typeof===f||h.$$typeof===ee||h.getModuleId!==void 0))}function $(h,R,M){var q=h.displayName;if(q)return q;var ae=R.displayName||R.name||"";return ae!==""?M+"("+ae+")":M}function V(h){return h.displayName||"Context"}function F(h){if(h==null)return null;if(typeof h.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case b:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case s:var R=h;return V(R)+".Consumer";case i:var M=h;return V(M._context)+".Provider";case f:return $(h,h.render,"ForwardRef");case m:var q=h.displayName||null;return q!==null?q:F(h.type)||"Memo";case g:{var ae=h,ue=ae._payload,H=ae._init;try{return F(H(ue))}catch{return null}}}return null}var te=Object.assign,ge=0,ve,De,Ie,Je,S,P,Y;function W(){}W.__reactDisabledLog=!0;function z(){{if(ge===0){ve=console.log,De=console.info,Ie=console.warn,Je=console.error,S=console.group,P=console.groupCollapsed,Y=console.groupEnd;var h={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}ge++}}function Q(){{if(ge--,ge===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},h,{value:ve}),info:te({},h,{value:De}),warn:te({},h,{value:Ie}),error:te({},h,{value:Je}),group:te({},h,{value:S}),groupCollapsed:te({},h,{value:P}),groupEnd:te({},h,{value:Y})})}ge<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var L=w.ReactCurrentDispatcher,U;function G(h,R,M){{if(U===void 0)try{throw Error()}catch(ae){var q=ae.stack.trim().match(/\n( *(at )?)/);U=q&&q[1]||""}return`
18
+ `+U+h}}var K=!1,J;{var Ce=typeof WeakMap=="function"?WeakMap:Map;J=new Ce}function A(h,R){if(!h||K)return"";{var M=J.get(h);if(M!==void 0)return M}var q;K=!0;var ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ue;ue=L.current,L.current=null,z();try{if(R){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(ze){q=ze}Reflect.construct(h,[],H)}else{try{H.call()}catch(ze){q=ze}h.call(H.prototype)}}else{try{throw Error()}catch(ze){q=ze}h()}}catch(ze){if(ze&&q&&typeof ze.stack=="string"){for(var Z=ze.stack.split(`
19
+ `),Ne=q.stack.split(`
20
+ `),Te=Z.length-1,ke=Ne.length-1;Te>=1&&ke>=0&&Z[Te]!==Ne[ke];)ke--;for(;Te>=1&&ke>=0;Te--,ke--)if(Z[Te]!==Ne[ke]){if(Te!==1||ke!==1)do if(Te--,ke--,ke<0||Z[Te]!==Ne[ke]){var Ye=`
21
+ `+Z[Te].replace(" at new "," at ");return h.displayName&&Ye.includes("<anonymous>")&&(Ye=Ye.replace("<anonymous>",h.displayName)),typeof h=="function"&&J.set(h,Ye),Ye}while(Te>=1&&ke>=0);break}}}finally{K=!1,L.current=ue,Q(),Error.prepareStackTrace=ae}var kt=h?h.displayName||h.name:"",yt=kt?G(kt):"";return typeof h=="function"&&J.set(h,yt),yt}function Ve(h,R,M){return A(h,!1)}function He(h){var R=h.prototype;return!!(R&&R.isReactComponent)}function at(h,R,M){if(h==null)return"";if(typeof h=="function")return A(h,He(h));if(typeof h=="string")return G(h);switch(h){case p:return G("Suspense");case b:return G("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case f:return Ve(h.render);case m:return at(h.type,R,M);case g:{var q=h,ae=q._payload,ue=q._init;try{return at(ue(ae),R,M)}catch{}}}return""}var et=Object.prototype.hasOwnProperty,wt={},ir=w.ReactDebugCurrentFrame;function ot(h){if(h){var R=h._owner,M=at(h.type,h._source,R?R.type:null);ir.setExtraStackFrame(M)}else ir.setExtraStackFrame(null)}function Lt(h,R,M,q,ae){{var ue=Function.call.bind(et);for(var H in h)if(ue(h,H)){var Z=void 0;try{if(typeof h[H]!="function"){var Ne=Error((q||"React class")+": "+M+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ne.name="Invariant Violation",Ne}Z=h[H](R,H,q,M,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Te){Z=Te}Z&&!(Z instanceof Error)&&(ot(ae),j("%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).",q||"React class",M,H,typeof Z),ot(null)),Z instanceof Error&&!(Z.message in wt)&&(wt[Z.message]=!0,ot(ae),j("Failed %s type: %s",M,Z.message),ot(null))}}}var bt=Array.isArray;function Et(h){return bt(h)}function It(h){{var R=typeof Symbol=="function"&&Symbol.toStringTag,M=R&&h[Symbol.toStringTag]||h.constructor.name||"Object";return M}}function sr(h){try{return gt(h),!1}catch{return!0}}function gt(h){return""+h}function lr(h){if(sr(h))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",It(h)),gt(h)}var cr=w.ReactCurrentOwner,ur={key:!0,ref:!0,__self:!0,__source:!0},Ft,it;function st(h){if(et.call(h,"ref")){var R=Object.getOwnPropertyDescriptor(h,"ref").get;if(R&&R.isReactWarning)return!1}return h.ref!==void 0}function vt(h){if(et.call(h,"key")){var R=Object.getOwnPropertyDescriptor(h,"key").get;if(R&&R.isReactWarning)return!1}return h.key!==void 0}function Jr(h,R){typeof h.ref=="string"&&cr.current}function Fn(h,R){{var M=function(){Ft||(Ft=!0,j("%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)",R))};M.isReactWarning=!0,Object.defineProperty(h,"key",{get:M,configurable:!0})}}function qt(h,R){{var M=function(){it||(it=!0,j("%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)",R))};M.isReactWarning=!0,Object.defineProperty(h,"ref",{get:M,configurable:!0})}}var Qr=function(h,R,M,q,ae,ue,H){var Z={$$typeof:t,type:h,key:R,ref:M,props:H,_owner:ue};return Z._store={},Object.defineProperty(Z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:q}),Object.defineProperty(Z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.freeze&&(Object.freeze(Z.props),Object.freeze(Z)),Z};function Nt(h,R,M,q,ae){{var ue,H={},Z=null,Ne=null;M!==void 0&&(lr(M),Z=""+M),vt(R)&&(lr(R.key),Z=""+R.key),st(R)&&(Ne=R.ref,Jr(R,ae));for(ue in R)et.call(R,ue)&&!ur.hasOwnProperty(ue)&&(H[ue]=R[ue]);if(h&&h.defaultProps){var Te=h.defaultProps;for(ue in Te)H[ue]===void 0&&(H[ue]=Te[ue])}if(Z||Ne){var ke=typeof h=="function"?h.displayName||h.name||"Unknown":h;Z&&Fn(H,ke),Ne&&qt(H,ke)}return Qr(h,Z,Ne,ae,q,cr.current,H)}}var Rt=w.ReactCurrentOwner,Bt=w.ReactDebugCurrentFrame;function lt(h){if(h){var R=h._owner,M=at(h.type,h._source,R?R.type:null);Bt.setExtraStackFrame(M)}else Bt.setExtraStackFrame(null)}var zt;zt=!1;function jt(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function pe(){{if(Rt.current){var h=F(Rt.current.type);if(h)return`
22
22
 
23
- Check the render method of \``+d+"`."}return""}}function Ia(d){return""}var cn={};function Fa(d){{var T=un();if(!T){var R=typeof d=="string"?d:d.displayName||d.name;R&&(T=`
23
+ Check the render method of \``+h+"`."}return""}}function Ut(h){return""}var We={};function Wt(h){{var R=pe();if(!R){var M=typeof h=="string"?h:h.displayName||h.name;M&&(R=`
24
24
 
25
- Check the top-level render call using <`+R+">.")}return T}}function dn(d,T){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var R=Fa(T);if(cn[R])return;cn[R]=!0;var I="";d&&d._owner&&d._owner!==ht.current&&(I=" It was passed a child from "+de(d._owner.type)+"."),Je(d),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R,I),Je(null)}}function fn(d,T){{if(typeof d!="object")return;if(dt(d))for(var R=0;R<d.length;R++){var I=d[R];Tr(I)&&dn(I,T)}else if(Tr(d))d._store&&(d._store.validated=!0);else if(d){var Z=y(d);if(typeof Z=="function"&&Z!==d.entries)for(var oe=Z.call(d),J;!(J=oe.next()).done;)Tr(J.value)&&dn(J.value,T)}}}function La(d){{var T=d.type;if(T==null||typeof T=="string")return;var R;if(typeof T=="function")R=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===c||T.$$typeof===m))R=T.propTypes;else return;if(R){var I=de(T);St(R,d.props,"prop",I,d)}else if(T.PropTypes!==void 0&&!mt){mt=!0;var Z=de(T);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Z||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ba(d){{for(var T=Object.keys(d.props),R=0;R<T.length;R++){var I=T[R];if(I!=="children"&&I!=="key"){Je(d),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I),Je(null);break}}d.ref!==null&&(Je(d),j("Invalid attribute `ref` supplied to `React.Fragment`."),Je(null))}}var pn={};function hn(d,T,R,I,Z,oe){{var J=ee(d);if(!J){var K="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(K+=" 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 Ae=Ia();Ae?K+=Ae:K+=un();var me;d===null?me="null":dt(d)?me="array":d!==void 0&&d.$$typeof===t?(me="<"+(de(d.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):me=typeof d,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",me,K)}var ve=_e(d,T,R,Z,oe);if(ve==null)return ve;if(J){var ze=T.children;if(ze!==void 0)if(I)if(dt(ze)){for(var bt=0;bt<ze.length;bt++)fn(ze[bt],d);Object.freeze&&Object.freeze(ze)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else fn(ze,d)}if(We.call(T,"key")){var lt=de(d),Fe=Object.keys(T).filter(function(vn){return vn!=="key"}),Zt=Fe.length>0?"{key: someKey, "+Fe.join(": ..., ")+": ...}":"{key: someKey}";if(!pn[lt+Zt]){var bn=Fe.length>0?"{"+Fe.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+M+">.")}return R}}function Vt(h,R){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var M=Wt(R);if(We[M])return;We[M]=!0;var q="";h&&h._owner&&h._owner!==Rt.current&&(q=" It was passed a child from "+F(h._owner.type)+"."),lt(h),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',M,q),lt(null)}}function St(h,R){{if(typeof h!="object")return;if(Et(h))for(var M=0;M<h.length;M++){var q=h[M];jt(q)&&Vt(q,R)}else if(jt(h))h._store&&(h._store.validated=!0);else if(h){var ae=T(h);if(typeof ae=="function"&&ae!==h.entries)for(var ue=ae.call(h),H;!(H=ue.next()).done;)jt(H.value)&&Vt(H.value,R)}}}function tt(h){{var R=h.type;if(R==null||typeof R=="string")return;var M;if(typeof R=="function")M=R.propTypes;else if(typeof R=="object"&&(R.$$typeof===f||R.$$typeof===m))M=R.propTypes;else return;if(M){var q=F(R);Lt(M,h.props,"prop",q,h)}else if(R.PropTypes!==void 0&&!zt){zt=!0;var ae=F(R);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ae||"Unknown")}typeof R.getDefaultProps=="function"&&!R.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(h){{for(var R=Object.keys(h.props),M=0;M<R.length;M++){var q=R[M];if(q!=="children"&&q!=="key"){lt(h),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",q),lt(null);break}}h.ref!==null&&(lt(h),j("Invalid attribute `ref` supplied to `React.Fragment`."),lt(null))}}var Bn={};function Vn(h,R,M,q,ae,ue){{var H=u(h);if(!H){var Z="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(Z+=" 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 Ne=Ut();Ne?Z+=Ne:Z+=pe();var Te;h===null?Te="null":Et(h)?Te="array":h!==void 0&&h.$$typeof===t?(Te="<"+(F(h.type)||"Unknown")+" />",Z=" Did you accidentally export a JSX literal instead of a component?"):Te=typeof h,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Te,Z)}var ke=Nt(h,R,M,ae,ue);if(ke==null)return ke;if(H){var Ye=R.children;if(Ye!==void 0)if(q)if(Et(Ye)){for(var kt=0;kt<Ye.length;kt++)St(Ye[kt],h);Object.freeze&&Object.freeze(Ye)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else St(Ye,h)}if(et.call(R,"key")){var yt=F(h),ze=Object.keys(R).filter(function(Oa){return Oa!=="key"}),Xr=ze.length>0?"{key: someKey, "+ze.join(": ..., ")+": ...}":"{key: someKey}";if(!Bn[yt+Xr]){var _a=ze.length>0?"{"+ze.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Zt,lt,bn,lt),pn[lt+Zt]=!0}}return d===r?Ba(ve):La(ve),ve}}function Va(d,T,R){return hn(d,T,R,!0)}function qa(d,T,R){return hn(d,T,R,!1)}var za=qa,mn=Va;tr.Fragment=r,tr.jsx=za,tr.jsxs=mn}()),tr}process.env.NODE_ENV==="production"?En.exports=Ki():En.exports=Gi();var i=En.exports;const ue={background:"#0a1929",borderBlue:"#0f353e",borderGrey:"rgba(255, 255, 255, 0.1)",grey500:"#868c95",primary:"#0ed3b4",secondary:"#007ef6",tertiary:"#0f353e"},Ji={components:{MuiButton:{styleOverrides:{root:({ownerState:e})=>({...e.color==="primary"&&e.variant==="contained"&&{color:`${ue.tertiary} !important`},...e.disabled&&e.variant==="contained"&&{color:"white"}})}}},palette:{background:{default:ue.background,paper:ue.background},mode:"dark",primary:{main:ue.primary},secondary:{main:ue.secondary}}},Xi=({children:e})=>i.jsxs(i.Fragment,{children:[i.jsx(p.GlobalStyles,{styles:{"*":{scrollbarColor:"rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05)",scrollbarWidth:"thin"},"*::-webkit-scrollbar":{height:6,width:6},"*::-webkit-scrollbar-button":{height:0,width:0},"*::-webkit-scrollbar-corner":{background:"transparent"},"*::-webkit-scrollbar-thumb":{backgroundColor:"rgba(255, 255, 255, 0.2)",border:0,borderRadius:10},"*::-webkit-scrollbar-track":{background:"rgba(255, 255, 255, 0.05)"},"html, body, #root":{height:"100%"}}}),i.jsx(p.ThemeProvider,{theme:Ji,children:e})]}),Zi=new Dt.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),Qi={authToken:void 0},Hi=_.createContext(Qi),el=({children:e,authToken:t})=>{const n=_.useMemo(()=>({authToken:t}),[t]);return i.jsx(Hi.Provider,{value:n,children:e})},Wa={dispatchSnackbar:()=>null,snackbar:{open:!1}},Ya=_.createContext(Wa),Sr={closeSnackbar:"closeSnackbar",openSnackbar:"openSnackbar"},tl=(e,t="success")=>({message:e,severity:t,type:Sr.openSnackbar}),Ka=()=>({type:Sr.closeSnackbar}),rl=(e,t)=>{switch(t.type){case Sr.openSnackbar:{const{message:n,severity:r}=t;return{message:n,open:!0,severity:r}}case Sr.closeSnackbar:return{...e,open:!1};default:throw new Error}},nl={snackbarAlert:{width:"100%"}},al=({children:e})=>{const[t,n]=_.useReducer(rl,Wa.snackbar),{message:r,open:a,severity:o}=t,s=6e3,l=()=>n(Ka()),c=_.useMemo(()=>({dispatchSnackbar:n,snackbar:t}),[t,n]);return i.jsxs(Ya.Provider,{value:c,children:[i.jsx(p.Snackbar,{open:a,autoHideDuration:s,onClose:l,anchorOrigin:{horizontal:"center",vertical:"bottom"},children:i.jsx(p.Alert,{onClose:l,severity:o,sx:nl.snackbarAlert,variant:"filled",children:r})}),e]})},ol="data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",sl=()=>i.jsx("img",{src:ol,alt:"Treege",height:30,width:"auto"}),il=()=>{const[e,t]=_.useState({x:0,y:0}),[n,r]=_.useState({height:0,width:0}),a=_.useCallback(o=>{if(!o)return null;const{width:s,height:l}=o.getBoundingClientRect();return r({height:l,width:s}),t({x:s/2,y:l/2}),o},[]);return{dimensions:n,refContainer:a,translate:e}},Ga=({color:e,height:t=20,width:n=20})=>i.jsxs("svg",{focusable:"false",x:"0px",y:"0px",viewBox:"0 0 24 24",color:e,height:t,width:n,children:[i.jsx("path",{fill:"currentColor",d:`M19.1,18H14v2c0,1.1-0.9,2-2,2s-2-0.9-2-2v-2H4.9c-0.8,0-1.3-0.9-0.8-1.5L7,12l0,0c-0.8,0-1.3-0.9-0.8-1.6l5-7.2
31
- c0.4-0.6,1.2-0.6,1.6,0l0.6,0.9c-0.8,0.8-1.2,2-1.2,3.2c0,2.6,2.1,4.7,4.7,4.7H17l3,4.5C20.4,17.1,19.9,18,19.1,18z`}),i.jsx("path",{fill:"currentColor",d:`M20.6,7.3c0,0.4-0.4,0.8-0.8,0.8h-2.1v2.1c0,0.4-0.4,0.8-0.8,0.8s-0.8-0.4-0.8-0.8V8.1H14c-0.5,0-0.8-0.4-0.8-0.8
32
- c0-0.5,0.4-0.8,0.8-0.8h2.1V4.4c0-0.5,0.4-0.8,0.8-0.8s0.8,0.4,0.8,0.8v2.1h2.1C20.3,6.5,20.6,6.8,20.6,7.3z`})]}),Ye={backendConfig:{baseUrl:"",endpoints:{workflow:"/v1/workflow",workflows:"/v1/workflows"}},currentHierarchyPointNode:null,currentTree:{errorName:"",id:"",name:""},dispatchTree:()=>null,modalOpen:null,setCurrentHierarchyPointNode:()=>null,setCurrentTree:()=>null,setModalOpen:()=>null,setTreeModalOpen:()=>null,setTreePath:()=>null,tree:null,treeModalOpen:!1,treePath:[],version:""},Ja=_.createContext(Ye),Re=()=>_.useContext(Ja),ll=()=>{const{setModalOpen:e}=Re();return{handleClick:()=>e("add")}},ul=()=>{const{t:e}=Pe.useTranslation("button"),{handleClick:t}=ll();return i.jsx(p.Box,{alignItems:"center",justifyContent:"center",display:"flex",height:"100%",children:i.jsx(p.Button,{onClick:t,size:"medium",variant:"contained",startIcon:i.jsx(Ga,{}),children:e("createTree",{ns:"button"})})})},kr=(e,t)=>{const{backendConfig:n}=Re(),{endpoints:r}=n||{},{workflow:a=""}=r||{};return Dt.useQuery({enabled:!!e,queryFn:async({signal:o})=>{const{data:s}=await It.get(`${a}?id=${e}`,{signal:o});return s},queryKey:["workflow",e],...t})},wn={container:{height:"100%",width:"100%"},progressContainer:{alignItems:"center",display:"flex",height:"100%",justifyContent:"center"},treeLink:{stroke:`${ue.borderGrey} !important`}},Xa="tree-link",cl=({data:e,renderCustomNodeElement:t,nodeSize:n={x:300,y:300}})=>{const{dimensions:r,refContainer:a,translate:o}=il(),{currentTree:s}=Re(),{isLoading:l,data:c}=kr(s.id);return!e&&!s.id||c&&!e?i.jsx(ul,{}):s.id&&!e||l?i.jsx(p.Box,{sx:wn.progressContainer,children:i.jsx(p.CircularProgress,{})}):i.jsxs("div",{style:wn.container,ref:a,children:[i.jsx(p.GlobalStyles,{styles:{[`.${Xa}`]:wn.treeLink}}),i.jsx(Vi,{data:e,orientation:"vertical",translate:o,dimensions:r,renderCustomNodeElement:t,pathFunc:"diagonal",pathClassFunc:()=>Xa,nodeSize:n})]})},Za=_.memo(cl),dl=()=>({formatJSON:t=>JSON.stringify(t??{},null,2)}),Qa={fullHeight:{height:"100%"}},fl=({value:e,onChange:t})=>{const{formatJSON:n}=dl();return i.jsxs("div",{style:Qa.fullHeight,children:[i.jsx(p.GlobalStyles,{styles:{".cm-activeLine.cm-line, .cm-gutterElement.cm-activeLineGutter":{backgroundColor:"transparent"}}}),i.jsx(Ni,{editable:!0,value:n(e),extensions:[qi.json()],theme:zi.dracula,height:"100%",style:Qa.fullHeight,onChange:t})]})};var jn={},Ha={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ha);var fe=Ha.exports,On={};function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},re.apply(null,arguments)}function xt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function eo(e){if(q.isValidElement(e)||!xt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=eo(e[n])}),t}function nt(e,t,n={clone:!0}){const r=n.clone?re({},e):e;return xt(e)&&xt(t)&&Object.keys(t).forEach(a=>{q.isValidElement(t[a])?r[a]=t[a]:xt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&xt(e[a])?r[a]=nt(e[a],t[a],n):n.clone?r[a]=xt(t[a])?eo(t[a]):t[a]:r[a]=t[a]}),r}const pl=Object.freeze(Object.defineProperty({__proto__:null,default:nt,isPlainObject:xt},Symbol.toStringTag,{value:"Module"}));var Rn={exports:{}},$r={exports:{}},ne={};/** @license React v16.13.1
33
- * react-is.production.min.js
30
+ <%s key={someKey} {...props} />`,Xr,yt,_a,yt),Bn[yt+Xr]=!0}}return h===n?dr(ke):tt(ke),ke}}function Ra(h,R,M){return Vn(h,R,M,!0)}function ja(h,R,M){return Vn(h,R,M,!1)}var Sa=ja,ka=Ra;hr.Fragment=n,hr.jsx=Sa,hr.jsxs=ka}()),hr}var Da;function Re(){return Da||(Da=1,process.env.NODE_ENV==="production"?nn.exports=tl():nn.exports=rl()),nn.exports}var l=Re();const he={background:"#0a1929",borderBlue:"#0f353e",borderGrey:"rgba(255, 255, 255, 0.1)",grey500:"#868c95",primary:"#0ed3b4",secondary:"#007ef6",tertiary:"#0f353e"},nl={components:{MuiButton:{styleOverrides:{root:({ownerState:e})=>({...e.color==="primary"&&e.variant==="contained"&&{color:`${he.tertiary} !important`},...e.disabled&&e.variant==="contained"&&{color:"white"}})}}},palette:{background:{default:he.background,paper:he.background},mode:"dark",primary:{main:he.primary},secondary:{main:he.secondary}}},al=({children:e})=>l.jsxs(l.Fragment,{children:[l.jsx(d.GlobalStyles,{styles:{"*":{scrollbarColor:"rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05)",scrollbarWidth:"thin"},"*::-webkit-scrollbar":{height:6,width:6},"*::-webkit-scrollbar-button":{height:0,width:0},"*::-webkit-scrollbar-corner":{background:"transparent"},"*::-webkit-scrollbar-thumb":{backgroundColor:"rgba(255, 255, 255, 0.2)",border:0,borderRadius:10},"*::-webkit-scrollbar-track":{background:"rgba(255, 255, 255, 0.05)"},"html, body, #root":{height:"100%"}}}),l.jsx(d.ThemeProvider,{theme:nl,children:e})]}),ol=new Gt.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),il={authToken:void 0},sl=k.createContext(il),ll=({children:e,authToken:t})=>{const r=k.useMemo(()=>({authToken:t}),[t]);return l.jsx(sl.Provider,{value:r,children:e})},Ia={dispatchSnackbar:()=>null,snackbar:{open:!1}},Fa=k.createContext(Ia),an={closeSnackbar:"closeSnackbar",openSnackbar:"openSnackbar"},cl=(e,t="success")=>({message:e,severity:t,type:an.openSnackbar}),Ba=()=>({type:an.closeSnackbar}),ul=(e,t)=>{switch(t.type){case an.openSnackbar:{const{message:r,severity:n}=t;return{message:r,open:!0,severity:n}}case an.closeSnackbar:return{...e,open:!1};default:throw new Error}},dl={snackbarAlert:{width:"100%"}},fl=({children:e})=>{const[t,r]=k.useReducer(ul,Ia.snackbar),{message:n,open:o,severity:a}=t,i=6e3,s=()=>r(Ba()),f=k.useMemo(()=>({dispatchSnackbar:r,snackbar:t}),[t,r]);return l.jsxs(Fa.Provider,{value:f,children:[l.jsx(d.Snackbar,{open:o,autoHideDuration:i,onClose:s,anchorOrigin:{horizontal:"center",vertical:"bottom"},children:l.jsx(d.Alert,{onClose:s,severity:a,sx:dl.snackbarAlert,variant:"filled",children:n})}),e]})},pl="data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",hl=()=>l.jsx("img",{src:pl,alt:"Treege",height:30,width:"auto"}),ml=()=>{const[e,t]=k.useState({x:0,y:0}),[r,n]=k.useState({height:0,width:0}),o=k.useCallback(a=>{if(!a)return null;const{width:i,height:s}=a.getBoundingClientRect();return n({height:s,width:i}),t({x:i/2,y:s/2}),a},[]);return{dimensions:r,refContainer:o,translate:e}},Va=({color:e,height:t=20,width:r=20})=>l.jsxs("svg",{focusable:"false",x:"0px",y:"0px",viewBox:"0 0 24 24",color:e,height:t,width:r,children:[l.jsx("path",{fill:"currentColor",d:`M19.1,18H14v2c0,1.1-0.9,2-2,2s-2-0.9-2-2v-2H4.9c-0.8,0-1.3-0.9-0.8-1.5L7,12l0,0c-0.8,0-1.3-0.9-0.8-1.6l5-7.2
31
+ c0.4-0.6,1.2-0.6,1.6,0l0.6,0.9c-0.8,0.8-1.2,2-1.2,3.2c0,2.6,2.1,4.7,4.7,4.7H17l3,4.5C20.4,17.1,19.9,18,19.1,18z`}),l.jsx("path",{fill:"currentColor",d:`M20.6,7.3c0,0.4-0.4,0.8-0.8,0.8h-2.1v2.1c0,0.4-0.4,0.8-0.8,0.8s-0.8-0.4-0.8-0.8V8.1H14c-0.5,0-0.8-0.4-0.8-0.8
32
+ c0-0.5,0.4-0.8,0.8-0.8h2.1V4.4c0-0.5,0.4-0.8,0.8-0.8s0.8,0.4,0.8,0.8v2.1h2.1C20.3,6.5,20.6,6.8,20.6,7.3z`})]}),on=(e,t)=>{if(!e)return null;if(e.uuid===t)return e;const r=e.children||[];for(let n=0;n<r.length;n+=1){const o=r[n],a=on(o,t);if(a)return a}return null},Jt=(e,t)=>{var a,i,s,f,p;if(!e)return null;if(!t)return e;if(((a=e.attributes)==null?void 0:a.treePath)===t)return((i=e.attributes)==null?void 0:i.tree)||null;let r=null;const n=(s=e.attributes)==null?void 0:s.tree,o=(f=e.children)==null?void 0:f.length;if(n&&(r=Jt((p=e.attributes)==null?void 0:p.tree,t)),o){const{children:b}=e;for(let m=0;m<b.length;m+=1){const g=b[m];if(r!==null)return r;r=Jt(g,t)}}return r},sn=(e,t,r)=>{const n=Jt(e,t);return on(n,r)},bl=(e,t)=>{if(!e)return null;const{attributes:r}=t,n=r.isDecision;return Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!1}}),n?(Object.defineProperty(e,"children",{value:[{...t,attributes:{...r,isLeaf:!1}}]}),null):(Object.defineProperty(e,"children",{value:[{...t,attributes:{...r,isLeaf:!e.children.length}}]}),null)},gl=({tree:e,path:t,uuid:r,child:n})=>{var f;const{attributes:o,children:a}=n;if(!e)return a.length?{...n}:{...n,attributes:{...o,isLeaf:!0,isRoot:!0}};const i=structuredClone(e),s=sn(i,t,r);return bl(s,{...n,...!o.isDecision&&{children:[...((f=sn(e,t,r))==null?void 0:f.children)||[]]}}),i},La=(e,t,r=null)=>{if(!e)return null;if(e.uuid===t)return r;const n=e.children||[];for(let o=0;o<n.length;o+=1){const a=n[o],i=La(a,t,e);if(i!==null)return i}return null},vl=(e,t)=>!e||!t?null:e.attributes.isDecision||t.attributes.isDecision?(Object.defineProperty(e,"children",{value:[...e.children.filter(r=>r.uuid!==t.uuid)]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!e.children.length}}),null):(Object.defineProperty(e,"children",{value:[...e.children.filter(r=>r.uuid!==t.uuid),...t.children]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!t.children.length}}),null),yl=(e,t,r)=>{const n=Jt(e,t);return La(n,r)},qa=(e,t)=>{var o,a,i;const r={...e.attributes};((o=r.defaultValueFromAncestor)==null?void 0:o.uuid)===t&&delete r.defaultValueFromAncestor,(a=r.route)!=null&&a.params&&(r.route={...r.route,params:r.route.params.filter(s=>s.ancestorUuid!==t)});const n=((i=e.children)==null?void 0:i.map(s=>qa(s,t)))||[];return{...e,attributes:r,children:n}},xl=({tree:e,path:t,uuid:r})=>{const n=structuredClone(e),o=sn(n,t,r),a=yl(n,t,r);return vl(a,o),qa(n,r)},Cl=(e,t)=>{if(!e)return null;const r=t.attributes.isDecision,n=e.attributes.isDecision,o=e.attributes.depth===0,a={value:t.uuid},i=n||r,s=i?{value:[...t.children]}:{value:[...e.children]},f=i?{value:{...t.attributes,...o&&{isRoot:!0},isLeaf:!t.children.length||!r}}:{value:{...t.attributes,...o&&{isRoot:!0},isLeaf:!e.children.length}};return Object.defineProperties(e,{attributes:f,children:s,uuid:a}),null},Tl=({tree:e,path:t,uuid:r,children:n})=>{const o=structuredClone(e),a=sn(o,t,r);return Cl(a,n),o},wl=(e,t,r)=>{if(!e||!t)return[];const n=[],o=a=>{var p;const{attributes:i,uuid:s}=a;return n.push({name:i==null?void 0:i.name,uuid:s}),s===t||(((p=a.children)==null?void 0:p.some(b=>o(b)))??!1)?!0:(n.pop(),!1)};return o(e),r?n.filter(a=>a.uuid!==r):n},ut={appendTreeCard:"appendTreeCard",deleteTreeCard:"deleteTreeCard",replaceTreeCard:"replaceTreeCard",resetTree:"resetTree",setTree:"setTree"},El=(e,t,r)=>({children:r,path:e,type:ut.appendTreeCard,uuid:t}),Rl=(e,t,r)=>({children:r,path:e,type:ut.replaceTreeCard,uuid:t}),jl=(e,t)=>({path:e,type:ut.deleteTreeCard,uuid:t}),Na=()=>({type:ut.resetTree}),Un=e=>({tree:e,type:ut.setTree}),Sl=(e,t)=>{switch(t.type){case ut.appendTreeCard:{const{uuid:r,path:n,children:o}=t;return gl({child:o,path:n,tree:e,uuid:r})}case ut.deleteTreeCard:{const{path:r,uuid:n}=t;return xl({path:r,tree:e,uuid:n})}case ut.replaceTreeCard:{const{uuid:r,path:n,children:o}=t;return Tl({children:o,path:n,tree:e,uuid:r})}case ut.resetTree:return null;case ut.setTree:return t.tree;default:throw new Error}},ln=(e,t)=>{const{backendConfig:r}=Pe(),{endpoints:n}=r||{},{workflow:o=""}=n||{};return Gt.useQuery({enabled:!!e,queryFn:async({signal:a})=>{const{data:i}=await Kt.get(`${o}?id=${e}`,{signal:a});return i},queryKey:["workflow",e],...t})},kl="2.0.0",dt={backendConfig:{baseUrl:"",endpoints:{workflow:"/v1/workflow",workflows:"/v1/workflows"}},currentHierarchyPointNode:null,currentTree:{errorName:"",id:"",name:""},dispatchTree:()=>null,modalOpen:null,setCurrentHierarchyPointNode:()=>null,setCurrentTree:()=>null,setModalOpen:()=>null,setTreeModalOpen:()=>null,setTreePath:()=>null,tree:null,treeModalOpen:!1,treePath:[],version:""},Wn=k.createContext(dt),_l=({children:e,initialTree:t,initialTreeId:r,backendConfig:n})=>{const{data:o}=ln(r,{enabled:!!r}),[a,i]=k.useState(dt.currentHierarchyPointNode),[s,f]=k.useState(dt.modalOpen),[p,b]=k.useState(dt.treeModalOpen),[m,g]=k.useState(dt.treePath),[y,v]=k.useReducer(Sl,t||dt.tree),[c,T]=k.useState(r?{...dt.currentTree,id:r}:dt.currentTree);k.useEffect(()=>{o&&(T({id:o.id,name:o.label}),v(Un(o.workflow||null)))},[o]);const w=k.useMemo(()=>{var j;return{backendConfig:{...dt.backendConfig,...n,endpoints:{...(j=dt.backendConfig)==null?void 0:j.endpoints,...n==null?void 0:n.endpoints}},currentHierarchyPointNode:a,currentTree:c,dispatchTree:v,modalOpen:s,setCurrentHierarchyPointNode:i,setCurrentTree:T,setModalOpen:f,setTreeModalOpen:b,setTreePath:g,tree:y,treeModalOpen:p,treePath:m,version:kl}},[n,a,c,s,y,p,m]);return l.jsx(Wn.Provider,{value:w,children:e})},Pe=()=>{if(!Wn)throw new Error("useTreegeContext must be used within a TreegeProvider");return k.useContext(Wn)},Ol=()=>{const{setModalOpen:e}=Pe();return{handleClick:()=>e("add")}},Al=()=>{const{t:e}=Le.useTranslation("button"),{handleClick:t}=Ol();return l.jsx(d.Box,{alignItems:"center",justifyContent:"center",display:"flex",height:"100%",children:l.jsx(d.Button,{onClick:t,size:"medium",variant:"contained",startIcon:l.jsx(Va,{}),children:e("createTree",{ns:"button"})})})},Yn={container:{height:"100%",width:"100%"},progressContainer:{alignItems:"center",display:"flex",height:"100%",justifyContent:"center"},treeLink:{stroke:`${he.borderGrey} !important`}},za="tree-link",$l=({data:e,renderCustomNodeElement:t,nodeSize:r={x:300,y:300}})=>{const{dimensions:n,refContainer:o,translate:a}=ml(),{currentTree:i}=Pe(),{isLoading:s,data:f}=ln(i.id);return!e&&!i.id||f&&!e?l.jsx(Al,{}):i.id&&!e||s?l.jsx(d.Box,{sx:Yn.progressContainer,children:l.jsx(d.CircularProgress,{})}):l.jsxs("div",{style:Yn.container,ref:o,children:[l.jsx(d.GlobalStyles,{styles:{[`.${za}`]:Yn.treeLink}}),l.jsx(Ks,{data:e,orientation:"vertical",translate:a,dimensions:n,renderCustomNodeElement:t,pathFunc:"diagonal",pathClassFunc:()=>za,nodeSize:r})]})},Ua=k.memo($l),Pl=()=>({formatJSON:t=>JSON.stringify(t??{},null,2)}),Wa={fullHeight:{height:"100%"}},Ml=({value:e,onChange:t})=>{const{formatJSON:r}=Pl();return l.jsxs("div",{style:Wa.fullHeight,children:[l.jsx(d.GlobalStyles,{styles:{".cm-activeLine.cm-line, .cm-gutterElement.cm-activeLineGutter":{backgroundColor:"transparent"}}}),l.jsx(Xs,{editable:!0,value:r(e),extensions:[Js.json()],theme:Qs.dracula,height:"100%",style:Wa.fullHeight,onChange:t})]})};var mr={},Gn={exports:{}},Ya;function _e(){return Ya||(Ya=1,function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Gn)),Gn.exports}var Kn={},cn={exports:{}},de={};/**
33
+ * @license React
34
+ * react-is.production.js
34
35
  *
35
- * Copyright (c) Facebook, Inc. and its affiliates.
36
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
36
37
  *
37
38
  * This source code is licensed under the MIT license found in the
38
39
  * LICENSE file in the root directory of this source tree.
39
- */var to;function hl(){if(to)return ne;to=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,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function k(x){if(typeof x=="object"&&x!==null){var A=x.$$typeof;switch(A){case t:switch(x=x.type,x){case c:case f:case r:case o:case a:case m:return x;default:switch(x=x&&x.$$typeof,x){case l:case h:case v:case g:case s:return x;default:return A}}case n:return A}}}function M(x){return k(x)===f}return ne.AsyncMode=c,ne.ConcurrentMode=f,ne.ContextConsumer=l,ne.ContextProvider=s,ne.Element=t,ne.ForwardRef=h,ne.Fragment=r,ne.Lazy=v,ne.Memo=g,ne.Portal=n,ne.Profiler=o,ne.StrictMode=a,ne.Suspense=m,ne.isAsyncMode=function(x){return M(x)||k(x)===c},ne.isConcurrentMode=M,ne.isContextConsumer=function(x){return k(x)===l},ne.isContextProvider=function(x){return k(x)===s},ne.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},ne.isForwardRef=function(x){return k(x)===h},ne.isFragment=function(x){return k(x)===r},ne.isLazy=function(x){return k(x)===v},ne.isMemo=function(x){return k(x)===g},ne.isPortal=function(x){return k(x)===n},ne.isProfiler=function(x){return k(x)===o},ne.isStrictMode=function(x){return k(x)===a},ne.isSuspense=function(x){return k(x)===m},ne.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===f||x===o||x===a||x===m||x===b||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===g||x.$$typeof===s||x.$$typeof===l||x.$$typeof===h||x.$$typeof===y||x.$$typeof===w||x.$$typeof===j||x.$$typeof===u)},ne.typeOf=k,ne}var ae={};/** @license React v16.13.1
40
+ */var Ga;function Dl(){if(Ga)return de;Ga=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.for("react.client.reference");function v(c){if(typeof c=="object"&&c!==null){var T=c.$$typeof;switch(T){case e:switch(c=c.type,c){case r:case o:case n:case f:case p:return c;default:switch(c=c&&c.$$typeof,c){case i:case s:case m:case b:return c;case a:return c;default:return T}}case t:return T}}}return de.ContextConsumer=a,de.ContextProvider=i,de.Element=e,de.ForwardRef=s,de.Fragment=r,de.Lazy=m,de.Memo=b,de.Portal=t,de.Profiler=o,de.StrictMode=n,de.Suspense=f,de.SuspenseList=p,de.isContextConsumer=function(c){return v(c)===a},de.isContextProvider=function(c){return v(c)===i},de.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},de.isForwardRef=function(c){return v(c)===s},de.isFragment=function(c){return v(c)===r},de.isLazy=function(c){return v(c)===m},de.isMemo=function(c){return v(c)===b},de.isPortal=function(c){return v(c)===t},de.isProfiler=function(c){return v(c)===o},de.isStrictMode=function(c){return v(c)===n},de.isSuspense=function(c){return v(c)===f},de.isSuspenseList=function(c){return v(c)===p},de.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===o||c===n||c===f||c===p||c===g||typeof c=="object"&&c!==null&&(c.$$typeof===m||c.$$typeof===b||c.$$typeof===i||c.$$typeof===a||c.$$typeof===s||c.$$typeof===y||c.getModuleId!==void 0)},de.typeOf=v,de}var fe={};/**
41
+ * @license React
40
42
  * react-is.development.js
41
43
  *
42
- * Copyright (c) Facebook, Inc. and its affiliates.
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
43
45
  *
44
46
  * This source code is licensed under the MIT license found in the
45
47
  * LICENSE file in the root directory of this source tree.
46
- */var ro;function ml(){return ro||(ro=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,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function k(O){return typeof O=="string"||typeof O=="function"||O===r||O===f||O===o||O===a||O===m||O===b||typeof O=="object"&&O!==null&&(O.$$typeof===v||O.$$typeof===g||O.$$typeof===s||O.$$typeof===l||O.$$typeof===h||O.$$typeof===y||O.$$typeof===w||O.$$typeof===j||O.$$typeof===u)}function M(O){if(typeof O=="object"&&O!==null){var ke=O.$$typeof;switch(ke){case t:var et=O.type;switch(et){case c:case f:case r:case o:case a:case m:return et;default:var Ue=et&&et.$$typeof;switch(Ue){case l:case h:case v:case g:case s:return Ue;default:return ke}}case n:return ke}}}var x=c,A=f,F=l,be=s,Ie=t,ee=h,te=r,he=v,de=g,se=n,Be=o,Te=a,ce=m,Ve=!1;function rt(O){return Ve||(Ve=!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.")),E(O)||M(O)===c}function E(O){return M(O)===f}function S(O){return M(O)===l}function z(O){return M(O)===s}function N(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function P(O){return M(O)===h}function Y(O){return M(O)===r}function D(O){return M(O)===v}function V(O){return M(O)===g}function B(O){return M(O)===n}function G(O){return M(O)===o}function U(O){return M(O)===a}function je(O){return M(O)===m}ae.AsyncMode=x,ae.ConcurrentMode=A,ae.ContextConsumer=F,ae.ContextProvider=be,ae.Element=Ie,ae.ForwardRef=ee,ae.Fragment=te,ae.Lazy=he,ae.Memo=de,ae.Portal=se,ae.Profiler=Be,ae.StrictMode=Te,ae.Suspense=ce,ae.isAsyncMode=rt,ae.isConcurrentMode=E,ae.isContextConsumer=S,ae.isContextProvider=z,ae.isElement=N,ae.isForwardRef=P,ae.isFragment=Y,ae.isLazy=D,ae.isMemo=V,ae.isPortal=B,ae.isProfiler=G,ae.isStrictMode=U,ae.isSuspense=je,ae.isValidElementType=k,ae.typeOf=M}()),ae}var no;function Sn(){return no||(no=1,process.env.NODE_ENV==="production"?$r.exports=hl():$r.exports=ml()),$r.exports}/*
47
- object-assign
48
- (c) Sindre Sorhus
49
- @license MIT
50
- */var kn,ao;function bl(){if(ao)return kn;ao=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function a(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(c.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(h){f[h]=h}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return kn=a()?Object.assign:function(o,s){for(var l,c=r(o),f,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var m in l)t.call(l,m)&&(c[m]=l[m]);if(e){f=e(l);for(var b=0;b<f.length;b++)n.call(l,f[b])&&(c[f[b]]=l[f[b]])}}return c},kn}var $n,oo;function Mn(){if(oo)return $n;oo=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $n=e,$n}var Pn,so;function io(){return so||(so=1,Pn=Function.call.bind(Object.prototype.hasOwnProperty)),Pn}var An,lo;function vl(){if(lo)return An;lo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Mn(),n={},r=io();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(o,s,l,c,f){if(process.env.NODE_ENV!=="production"){for(var h in o)if(r(o,h)){var m;try{if(typeof o[h]!="function"){var b=Error((c||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}m=o[h](s,h,c,l,null,t)}catch(v){m=v}if(m&&!(m instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var g=f?f():"";e("Failed "+l+" type: "+m.message+(g??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},An=a,An}var Dn,uo;function gl(){if(uo)return Dn;uo=1;var e=Sn(),t=bl(),n=Mn(),r=io(),a=vl(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Dn=function(l,c){var f=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function m(E){var S=E&&(f&&E[f]||E[h]);if(typeof S=="function")return S}var b="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:j(),arrayOf:k,element:M(),elementType:x(),instanceOf:A,node:ee(),objectOf:be,oneOf:F,oneOfType:Ie,shape:he,exact:de};function v(E,S){return E===S?E!==0||1/E===1/S:E!==E&&S!==S}function u(E,S){this.message=E,this.data=S&&typeof S=="object"?S:{},this.stack=""}u.prototype=Error.prototype;function y(E){if(process.env.NODE_ENV!=="production")var S={},z=0;function N(Y,D,V,B,G,U,je){if(B=B||b,U=U||V,je!==n){if(c){var O=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 O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=B+":"+V;!S[ke]&&z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+U+"` prop on `"+B+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),S[ke]=!0,z++)}}return D[V]==null?Y?D[V]===null?new u("The "+G+" `"+U+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new u("The "+G+" `"+U+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:E(D,V,B,G,U)}var P=N.bind(null,!1);return P.isRequired=N.bind(null,!0),P}function w(E){function S(z,N,P,Y,D,V){var B=z[N],G=Te(B);if(G!==E){var U=ce(B);return new u("Invalid "+Y+" `"+D+"` of type "+("`"+U+"` supplied to `"+P+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return y(S)}function j(){return y(s)}function k(E){function S(z,N,P,Y,D){if(typeof E!="function")return new u("Property `"+D+"` of component `"+P+"` has invalid PropType notation inside arrayOf.");var V=z[N];if(!Array.isArray(V)){var B=Te(V);return new u("Invalid "+Y+" `"+D+"` of type "+("`"+B+"` supplied to `"+P+"`, expected an array."))}for(var G=0;G<V.length;G++){var U=E(V,G,P,Y,D+"["+G+"]",n);if(U instanceof Error)return U}return null}return y(S)}function M(){function E(S,z,N,P,Y){var D=S[z];if(!l(D)){var V=Te(D);return new u("Invalid "+P+" `"+Y+"` of type "+("`"+V+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return y(E)}function x(){function E(S,z,N,P,Y){var D=S[z];if(!e.isValidElementType(D)){var V=Te(D);return new u("Invalid "+P+" `"+Y+"` of type "+("`"+V+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return y(E)}function A(E){function S(z,N,P,Y,D){if(!(z[N]instanceof E)){var V=E.name||b,B=rt(z[N]);return new u("Invalid "+Y+" `"+D+"` of type "+("`"+B+"` supplied to `"+P+"`, expected ")+("instance of `"+V+"`."))}return null}return y(S)}function F(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function S(z,N,P,Y,D){for(var V=z[N],B=0;B<E.length;B++)if(v(V,E[B]))return null;var G=JSON.stringify(E,function(je,O){var ke=ce(O);return ke==="symbol"?String(O):O});return new u("Invalid "+Y+" `"+D+"` of value `"+String(V)+"` "+("supplied to `"+P+"`, expected one of "+G+"."))}return y(S)}function be(E){function S(z,N,P,Y,D){if(typeof E!="function")return new u("Property `"+D+"` of component `"+P+"` has invalid PropType notation inside objectOf.");var V=z[N],B=Te(V);if(B!=="object")return new u("Invalid "+Y+" `"+D+"` of type "+("`"+B+"` supplied to `"+P+"`, expected an object."));for(var G in V)if(r(V,G)){var U=E(V,G,P,Y,D+"."+G,n);if(U instanceof Error)return U}return null}return y(S)}function Ie(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var S=0;S<E.length;S++){var z=E[S];if(typeof z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ve(z)+" at index "+S+"."),s}function N(P,Y,D,V,B){for(var G=[],U=0;U<E.length;U++){var je=E[U],O=je(P,Y,D,V,B,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&G.push(O.data.expectedType)}var ke=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new u("Invalid "+V+" `"+B+"` supplied to "+("`"+D+"`"+ke+"."))}return y(N)}function ee(){function E(S,z,N,P,Y){return se(S[z])?null:new u("Invalid "+P+" `"+Y+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return y(E)}function te(E,S,z,N,P){return new u((E||"React class")+": "+S+" type `"+z+"."+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+P+"`.")}function he(E){function S(z,N,P,Y,D){var V=z[N],B=Te(V);if(B!=="object")return new u("Invalid "+Y+" `"+D+"` of type `"+B+"` "+("supplied to `"+P+"`, expected `object`."));for(var G in E){var U=E[G];if(typeof U!="function")return te(P,Y,D,G,ce(U));var je=U(V,G,P,Y,D+"."+G,n);if(je)return je}return null}return y(S)}function de(E){function S(z,N,P,Y,D){var V=z[N],B=Te(V);if(B!=="object")return new u("Invalid "+Y+" `"+D+"` of type `"+B+"` "+("supplied to `"+P+"`, expected `object`."));var G=t({},z[N],E);for(var U in G){var je=E[U];if(r(E,U)&&typeof je!="function")return te(P,Y,D,U,ce(je));if(!je)return new u("Invalid "+Y+" `"+D+"` key `"+U+"` supplied to `"+P+"`.\nBad object: "+JSON.stringify(z[N],null," ")+`
51
- Valid keys: `+JSON.stringify(Object.keys(E),null," "));var O=je(V,U,P,Y,D+"."+U,n);if(O)return O}return null}return y(S)}function se(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(se);if(E===null||l(E))return!0;var S=m(E);if(S){var z=S.call(E),N;if(S!==E.entries){for(;!(N=z.next()).done;)if(!se(N.value))return!1}else for(;!(N=z.next()).done;){var P=N.value;if(P&&!se(P[1]))return!1}}else return!1;return!0;default:return!1}}function Be(E,S){return E==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function Te(E){var S=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":Be(S,E)?"symbol":S}function ce(E){if(typeof E>"u"||E===null)return""+E;var S=Te(E);if(S==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return S}function Ve(E){var S=ce(E);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function rt(E){return!E.constructor||!E.constructor.name?b:E.constructor.name}return g.checkPropTypes=a,g.resetWarningCache=a.resetWarningCache,g.PropTypes=g,g},Dn}var In,co;function yl(){if(co)return In;co=1;var e=Mn();function t(){}function n(){}return n.resetWarningCache=t,In=function(){function r(s,l,c,f,h,m){if(m!==e){var b=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 b.name="Invariant Violation",b}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},In}if(process.env.NODE_ENV!=="production"){var xl=Sn(),Cl=!0;Rn.exports=gl()(xl.isElement,Cl)}else Rn.exports=yl()();var Tl=Rn.exports;const W=Yi(Tl);function rr(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const _l=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"}));var Fn={exports:{}},ie={};/**
52
- * @license React
53
- * react-is.production.js
48
+ */var Ka;function Il(){return Ka||(Ka=1,process.env.NODE_ENV!=="production"&&function(){function e(c){if(typeof c=="object"&&c!==null){var T=c.$$typeof;switch(T){case t:switch(c=c.type,c){case n:case a:case o:case p:case b:return c;default:switch(c=c&&c.$$typeof,c){case s:case f:case g:case m:return c;case i:return c;default:return T}}case r:return T}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),v=Symbol.for("react.client.reference");fe.ContextConsumer=i,fe.ContextProvider=s,fe.Element=t,fe.ForwardRef=f,fe.Fragment=n,fe.Lazy=g,fe.Memo=m,fe.Portal=r,fe.Profiler=a,fe.StrictMode=o,fe.Suspense=p,fe.SuspenseList=b,fe.isContextConsumer=function(c){return e(c)===i},fe.isContextProvider=function(c){return e(c)===s},fe.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},fe.isForwardRef=function(c){return e(c)===f},fe.isFragment=function(c){return e(c)===n},fe.isLazy=function(c){return e(c)===g},fe.isMemo=function(c){return e(c)===m},fe.isPortal=function(c){return e(c)===r},fe.isProfiler=function(c){return e(c)===a},fe.isStrictMode=function(c){return e(c)===o},fe.isSuspense=function(c){return e(c)===p},fe.isSuspenseList=function(c){return e(c)===b},fe.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===n||c===a||c===o||c===p||c===b||c===y||typeof c=="object"&&c!==null&&(c.$$typeof===g||c.$$typeof===m||c.$$typeof===s||c.$$typeof===i||c.$$typeof===f||c.$$typeof===v||c.getModuleId!==void 0)},fe.typeOf=e}()),fe}var Ja;function Fl(){return Ja||(Ja=1,process.env.NODE_ENV==="production"?cn.exports=Dl():cn.exports=Il()),cn.exports}var un=Fl();function xt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Qa(e){if(re.isValidElement(e)||un.isValidElementType(e)||!xt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Qa(e[r])}),t}function Qe(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return xt(e)&&xt(t)&&Object.keys(t).forEach(o=>{re.isValidElement(t[o])||un.isValidElementType(t[o])?n[o]=t[o]:xt(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&xt(e[o])?n[o]=Qe(e[o],t[o],r):r.clone?n[o]=xt(t[o])?Qa(t[o]):t[o]:n[o]=t[o]}),n}var dn={exports:{}},fn={exports:{}},le={};/** @license React v16.13.1
49
+ * react-is.production.min.js
54
50
  *
55
- * Copyright (c) Meta Platforms, Inc. and affiliates.
51
+ * Copyright (c) Facebook, Inc. and its affiliates.
56
52
  *
57
53
  * This source code is licensed under the MIT license found in the
58
54
  * LICENSE file in the root directory of this source tree.
59
- */var fo;function El(){if(fo)return ie;fo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),g=Symbol.for("react.client.reference");function v(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case e:switch(u=u.type,u){case n:case a:case r:case c:case f:return u;default:switch(u=u&&u.$$typeof,u){case s:case l:case m:case h:return u;case o:return u;default:return y}}case t:return y}}}return ie.ContextConsumer=o,ie.ContextProvider=s,ie.Element=e,ie.ForwardRef=l,ie.Fragment=n,ie.Lazy=m,ie.Memo=h,ie.Portal=t,ie.Profiler=a,ie.StrictMode=r,ie.Suspense=c,ie.SuspenseList=f,ie.isContextConsumer=function(u){return v(u)===o},ie.isContextProvider=function(u){return v(u)===s},ie.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===e},ie.isForwardRef=function(u){return v(u)===l},ie.isFragment=function(u){return v(u)===n},ie.isLazy=function(u){return v(u)===m},ie.isMemo=function(u){return v(u)===h},ie.isPortal=function(u){return v(u)===t},ie.isProfiler=function(u){return v(u)===a},ie.isStrictMode=function(u){return v(u)===r},ie.isSuspense=function(u){return v(u)===c},ie.isSuspenseList=function(u){return v(u)===f},ie.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===n||u===a||u===r||u===c||u===f||u===b||typeof u=="object"&&u!==null&&(u.$$typeof===m||u.$$typeof===h||u.$$typeof===s||u.$$typeof===o||u.$$typeof===l||u.$$typeof===g||u.getModuleId!==void 0)},ie.typeOf=v,ie}var le={};/**
60
- * @license React
55
+ */var Xa;function Bl(){if(Xa)return le;Xa=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,b=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function _(C){if(typeof C=="object"&&C!==null){var I=C.$$typeof;switch(I){case t:switch(C=C.type,C){case f:case p:case n:case a:case o:case m:return C;default:switch(C=C&&C.$$typeof,C){case s:case b:case v:case y:case i:return C;default:return I}}case r:return I}}}function O(C){return _(C)===p}return le.AsyncMode=f,le.ConcurrentMode=p,le.ContextConsumer=s,le.ContextProvider=i,le.Element=t,le.ForwardRef=b,le.Fragment=n,le.Lazy=v,le.Memo=y,le.Portal=r,le.Profiler=a,le.StrictMode=o,le.Suspense=m,le.isAsyncMode=function(C){return O(C)||_(C)===f},le.isConcurrentMode=O,le.isContextConsumer=function(C){return _(C)===s},le.isContextProvider=function(C){return _(C)===i},le.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},le.isForwardRef=function(C){return _(C)===b},le.isFragment=function(C){return _(C)===n},le.isLazy=function(C){return _(C)===v},le.isMemo=function(C){return _(C)===y},le.isPortal=function(C){return _(C)===r},le.isProfiler=function(C){return _(C)===a},le.isStrictMode=function(C){return _(C)===o},le.isSuspense=function(C){return _(C)===m},le.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===p||C===a||C===o||C===m||C===g||typeof C=="object"&&C!==null&&(C.$$typeof===v||C.$$typeof===y||C.$$typeof===i||C.$$typeof===s||C.$$typeof===b||C.$$typeof===T||C.$$typeof===w||C.$$typeof===j||C.$$typeof===c)},le.typeOf=_,le}var ce={};/** @license React v16.13.1
61
56
  * react-is.development.js
62
57
  *
63
- * Copyright (c) Meta Platforms, Inc. and affiliates.
58
+ * Copyright (c) Facebook, Inc. and its affiliates.
64
59
  *
65
60
  * This source code is licensed under the MIT license found in the
66
61
  * LICENSE file in the root directory of this source tree.
67
- */var po;function wl(){return po||(po=1,process.env.NODE_ENV!=="production"&&function(){function e(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case t:switch(u=u.type,u){case r:case o:case a:case f:case h:return u;default:switch(u=u&&u.$$typeof,u){case l:case c:case b:case m:return u;case s:return u;default:return y}}case n:return y}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),v=Symbol.for("react.client.reference");le.ContextConsumer=s,le.ContextProvider=l,le.Element=t,le.ForwardRef=c,le.Fragment=r,le.Lazy=b,le.Memo=m,le.Portal=n,le.Profiler=o,le.StrictMode=a,le.Suspense=f,le.SuspenseList=h,le.isContextConsumer=function(u){return e(u)===s},le.isContextProvider=function(u){return e(u)===l},le.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===t},le.isForwardRef=function(u){return e(u)===c},le.isFragment=function(u){return e(u)===r},le.isLazy=function(u){return e(u)===b},le.isMemo=function(u){return e(u)===m},le.isPortal=function(u){return e(u)===n},le.isProfiler=function(u){return e(u)===o},le.isStrictMode=function(u){return e(u)===a},le.isSuspense=function(u){return e(u)===f},le.isSuspenseList=function(u){return e(u)===h},le.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===r||u===o||u===a||u===f||u===h||u===g||typeof u=="object"&&u!==null&&(u.$$typeof===b||u.$$typeof===m||u.$$typeof===l||u.$$typeof===s||u.$$typeof===c||u.$$typeof===v||u.getModuleId!==void 0)},le.typeOf=e}()),le}process.env.NODE_ENV==="production"?Fn.exports=El():Fn.exports=wl();var ho=Fn.exports;const jl=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function mo(e){const t=`${e}`.match(jl);return t&&t[1]||""}function bo(e,t=""){return e.displayName||e.name||mo(e)||t}function vo(e,t,n){const r=bo(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Ol(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return bo(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ho.ForwardRef:return vo(e,e.render,"ForwardRef");case ho.Memo:return vo(e,e.type,"memo");default:return}}}const Rl=Object.freeze(Object.defineProperty({__proto__:null,default:Ol,getFunctionName:mo},Symbol.toStringTag,{value:"Module"}));function Ct(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":rr(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Sl=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function kl(...e){return e.reduce((t,n)=>n==null?t:function(...a){t.apply(this,a),n.apply(this,a)},()=>{})}function $l(e,t=166){let n;function r(...a){const o=()=>{e.apply(this,a)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function Ml(e,t){return process.env.NODE_ENV==="production"?()=>null:(n,r,a,o,s)=>{const l=a||"<<anonymous>>",c=s||r;return typeof n[r]<"u"?new Error(`The ${o} \`${c}\` of \`${l}\` is deprecated. ${t}`):null}}function Pl(e,t){var n,r;return q.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function go(e){return e&&e.ownerDocument||document}function Al(e){return go(e).defaultView||window}function Dl(e,t){if(process.env.NODE_ENV==="production")return()=>null;const n=t?re({},t.propTypes):null;return a=>(o,s,l,c,f,...h)=>{const m=f||s,b=n==null?void 0:n[m];if(b){const g=b(o,s,l,c,f,...h);if(g)return g}return typeof o[s]<"u"&&!o[a]?new Error(`The prop \`${m}\` of \`${e}\` can only be used together with the \`${a}\` prop.`):null}}function yo(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const xo=typeof window<"u"?q.useLayoutEffect:q.useEffect;let Co=0;function Il(e){const[t,n]=q.useState(e),r=e||t;return q.useEffect(()=>{t==null&&(Co+=1,n(`mui-${Co}`))},[t]),r}const To=q.useId;function Fl(e){if(To!==void 0){const t=To();return e??t}return Il(e)}function Ll(e,t,n,r,a){if(process.env.NODE_ENV==="production")return null;const o=a||t;return typeof e[t]<"u"?new Error(`The prop \`${o}\` is not supported. Please remove it.`):null}function Bl({controlled:e,default:t,name:n,state:r="value"}){const{current:a}=q.useRef(e!==void 0),[o,s]=q.useState(t),l=a?e:o;if(process.env.NODE_ENV!=="production"){q.useEffect(()=>{a!==(e!==void 0)&&console.error([`MUI: A component is changing the ${a?"":"un"}controlled ${r} state of ${n} to be ${a?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
68
- `))},[r,n,e]);const{current:f}=q.useRef(t);q.useEffect(()=>{!a&&!Object.is(f,t)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
69
- `))},[JSON.stringify(t)])}const c=q.useCallback(f=>{a||s(f)},[]);return[l,c]}function Vl(e){const t=q.useRef(e);return xo(()=>{t.current=e}),q.useRef((...n)=>(0,t.current)(...n)).current}function ql(...e){return q.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{yo(n,t)})},e)}class Ln{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Ln}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let Mr=!0,Bn=!1;const zl=new Ln,Nl={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ul(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&Nl[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Wl(e){e.metaKey||e.altKey||e.ctrlKey||(Mr=!0)}function Vn(){Mr=!1}function Yl(){this.visibilityState==="hidden"&&Bn&&(Mr=!0)}function Kl(e){e.addEventListener("keydown",Wl,!0),e.addEventListener("mousedown",Vn,!0),e.addEventListener("pointerdown",Vn,!0),e.addEventListener("touchstart",Vn,!0),e.addEventListener("visibilitychange",Yl,!0)}function Gl(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Mr||Ul(t)}function Jl(){const e=q.useCallback(a=>{a!=null&&Kl(a.ownerDocument)},[]),t=q.useRef(!1);function n(){return t.current?(Bn=!0,zl.start(100,()=>{Bn=!1}),t.current=!1,!0):!1}function r(a){return Gl(a)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function qn(e,t){const n=re({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=re({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const a=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=a:!a||!Object.keys(a)?n[r]=o:(n[r]=re({},o),Object.keys(a).forEach(s=>{n[r][s]=qn(a[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Xl(e,t,n=void 0){const r={};return Object.keys(e).forEach(a=>{r[a]=e[a].reduce((o,s)=>{if(s){const l=t(s);l!==""&&o.push(l),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const _o=e=>e,Eo=(()=>{let e=_o;return{configure(t){e=t},generate(t){return e(t)},reset(){e=_o}}})(),Zl={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function zn(e,t,n="Mui"){const r=Zl[t];return r?`${n}-${r}`:`${Eo.generate(e)}-${t}`}function Ql(e,t,n="Mui"){const r={};return t.forEach(a=>{r[a]=zn(e,a,n)}),r}function Hl(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const eu=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"}));function Tt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=wo(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tu(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=wo(e))&&(r&&(r+=" "),r+=t);return r}const ru=q.createContext(void 0);process.env.NODE_ENV!=="production"&&(W.node,W.object);function nu(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const a=t.components[n];return a.defaultProps?qn(a.defaultProps,r):!a.styleOverrides&&!a.variants?qn(a,r):r}function au({props:e,name:t}){const n=q.useContext(ru);return nu({props:e,name:t,theme:{components:n}})}process.env.NODE_ENV!=="production"&&(W.node,W.object.isRequired);function ou(e){return au(e)}var nr={},Nn={exports:{}},jo;function Oo(){return jo||(jo=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var o in a)({}).hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Nn)),Nn.exports}var Un={exports:{}},Ro;function su(){return Ro||(Ro=1,function(e){function t(n,r){if(n==null)return{};var a={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(r.indexOf(o)!==-1)continue;a[o]=n[o]}return a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Un)),Un.exports}function iu(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function lu(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var uu=function(){function e(n){var r=this;this._insertTag=function(a){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,o),r.tags.push(a)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(lu(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var o=iu(a);try{o.insertRule(r,o.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var a;return(a=r.parentNode)==null?void 0:a.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Le="-ms-",Pr="-moz-",Q="-webkit-",So="comm",Wn="rule",Yn="decl",cu="@import",ko="@keyframes",du="@layer",fu=Math.abs,Ar=String.fromCharCode,pu=Object.assign;function hu(e,t){return De(e,0)^45?(((t<<2^De(e,0))<<2^De(e,1))<<2^De(e,2))<<2^De(e,3):0}function $o(e){return e.trim()}function mu(e,t){return(e=t.exec(e))?e[0]:e}function H(e,t,n){return e.replace(t,n)}function Kn(e,t){return e.indexOf(t)}function De(e,t){return e.charCodeAt(t)|0}function ar(e,t,n){return e.slice(t,n)}function at(e){return e.length}function Gn(e){return e.length}function Dr(e,t){return t.push(e),e}function bu(e,t){return e.map(t).join("")}var Ir=1,Ft=1,Mo=0,Ne=0,Oe=0,Lt="";function Fr(e,t,n,r,a,o,s){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:Ir,column:Ft,length:s,return:""}}function or(e,t){return pu(Fr("",null,null,"",null,null,0),e,{length:-e.length},t)}function vu(){return Oe}function gu(){return Oe=Ne>0?De(Lt,--Ne):0,Ft--,Oe===10&&(Ft=1,Ir--),Oe}function Ke(){return Oe=Ne<Mo?De(Lt,Ne++):0,Ft++,Oe===10&&(Ft=1,Ir++),Oe}function ot(){return De(Lt,Ne)}function Lr(){return Ne}function sr(e,t){return ar(Lt,e,t)}function ir(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Po(e){return Ir=Ft=1,Mo=at(Lt=e),Ne=0,[]}function Ao(e){return Lt="",e}function Br(e){return $o(sr(Ne-1,Jn(e===91?e+2:e===40?e+1:e)))}function yu(e){for(;(Oe=ot())&&Oe<33;)Ke();return ir(e)>2||ir(Oe)>3?"":" "}function xu(e,t){for(;--t&&Ke()&&!(Oe<48||Oe>102||Oe>57&&Oe<65||Oe>70&&Oe<97););return sr(e,Lr()+(t<6&&ot()==32&&Ke()==32))}function Jn(e){for(;Ke();)switch(Oe){case e:return Ne;case 34:case 39:e!==34&&e!==39&&Jn(Oe);break;case 40:e===41&&Jn(e);break;case 92:Ke();break}return Ne}function Cu(e,t){for(;Ke()&&e+Oe!==57;)if(e+Oe===84&&ot()===47)break;return"/*"+sr(t,Ne-1)+"*"+Ar(e===47?e:Ke())}function Tu(e){for(;!ir(ot());)Ke();return sr(e,Ne)}function _u(e){return Ao(Vr("",null,null,null,[""],e=Po(e),0,[0],e))}function Vr(e,t,n,r,a,o,s,l,c){for(var f=0,h=0,m=s,b=0,g=0,v=0,u=1,y=1,w=1,j=0,k="",M=a,x=o,A=r,F=k;y;)switch(v=j,j=Ke()){case 40:if(v!=108&&De(F,m-1)==58){Kn(F+=H(Br(j),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:F+=Br(j);break;case 9:case 10:case 13:case 32:F+=yu(v);break;case 92:F+=xu(Lr()-1,7);continue;case 47:switch(ot()){case 42:case 47:Dr(Eu(Cu(Ke(),Lr()),t,n),c);break;default:F+="/"}break;case 123*u:l[f++]=at(F)*w;case 125*u:case 59:case 0:switch(j){case 0:case 125:y=0;case 59+h:w==-1&&(F=H(F,/\f/g,"")),g>0&&at(F)-m&&Dr(g>32?Io(F+";",r,n,m-1):Io(H(F," ","")+";",r,n,m-2),c);break;case 59:F+=";";default:if(Dr(A=Do(F,t,n,f,h,a,l,k,M=[],x=[],m),o),j===123)if(h===0)Vr(F,t,A,A,M,o,m,l,x);else switch(b===99&&De(F,3)===110?100:b){case 100:case 108:case 109:case 115:Vr(e,A,A,r&&Dr(Do(e,A,A,0,0,a,l,k,a,M=[],m),x),a,x,m,l,r?M:x);break;default:Vr(F,A,A,A,[""],x,0,l,x)}}f=h=g=0,u=w=1,k=F="",m=s;break;case 58:m=1+at(F),g=v;default:if(u<1){if(j==123)--u;else if(j==125&&u++==0&&gu()==125)continue}switch(F+=Ar(j),j*u){case 38:w=h>0?1:(F+="\f",-1);break;case 44:l[f++]=(at(F)-1)*w,w=1;break;case 64:ot()===45&&(F+=Br(Ke())),b=ot(),h=m=at(k=F+=Tu(Lr())),j++;break;case 45:v===45&&at(F)==2&&(u=0)}}return o}function Do(e,t,n,r,a,o,s,l,c,f,h){for(var m=a-1,b=a===0?o:[""],g=Gn(b),v=0,u=0,y=0;v<r;++v)for(var w=0,j=ar(e,m+1,m=fu(u=s[v])),k=e;w<g;++w)(k=$o(u>0?b[w]+" "+j:H(j,/&\f/g,b[w])))&&(c[y++]=k);return Fr(e,t,n,a===0?Wn:l,c,f,h)}function Eu(e,t,n){return Fr(e,t,n,So,Ar(vu()),ar(e,2,-2),0)}function Io(e,t,n,r){return Fr(e,t,n,Yn,ar(e,0,r),ar(e,r+1,-1),r)}function Bt(e,t){for(var n="",r=Gn(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function wu(e,t,n,r){switch(e.type){case du:if(e.children.length)break;case cu:case Yn:return e.return=e.return||e.value;case So:return"";case ko:return e.return=e.value+"{"+Bt(e.children,r)+"}";case Wn:e.value=e.props.join(",")}return at(n=Bt(e.children,r))?e.return=e.value+"{"+n+"}":""}function ju(e){var t=Gn(e);return function(n,r,a,o){for(var s="",l=0;l<t;l++)s+=e[l](n,r,a,o)||"";return s}}function Ou(e){return function(t){t.root||(t=t.return)&&e(t)}}function Fo(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ru=function(t,n,r){for(var a=0,o=0;a=o,o=ot(),a===38&&o===12&&(n[r]=1),!ir(o);)Ke();return sr(t,Ne)},Su=function(t,n){var r=-1,a=44;do switch(ir(a)){case 0:a===38&&ot()===12&&(n[r]=1),t[r]+=Ru(Ne-1,n,r);break;case 2:t[r]+=Br(a);break;case 4:if(a===44){t[++r]=ot()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ar(a)}while(a=Ke());return t},ku=function(t,n){return Ao(Su(Po(t),n))},Lo=new WeakMap,$u=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,a=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Lo.get(r))&&!a){Lo.set(t,!0);for(var o=[],s=ku(n,o),l=r.props,c=0,f=0;c<s.length;c++)for(var h=0;h<l.length;h++,f++)t.props[f]=o[c]?s[c].replace(/&\f/g,l[h]):l[h]+" "+s[c]}}},Mu=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Bo(e,t){switch(hu(e,t)){case 5103:return Q+"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 Q+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Q+e+Pr+e+Le+e+e;case 6828:case 4268:return Q+e+Le+e+e;case 6165:return Q+e+Le+"flex-"+e+e;case 5187:return Q+e+H(e,/(\w+).+(:[^]+)/,Q+"box-$1$2"+Le+"flex-$1$2")+e;case 5443:return Q+e+Le+"flex-item-"+H(e,/flex-|-self/,"")+e;case 4675:return Q+e+Le+"flex-line-pack"+H(e,/align-content|flex-|-self/,"")+e;case 5548:return Q+e+Le+H(e,"shrink","negative")+e;case 5292:return Q+e+Le+H(e,"basis","preferred-size")+e;case 6060:return Q+"box-"+H(e,"-grow","")+Q+e+Le+H(e,"grow","positive")+e;case 4554:return Q+H(e,/([^-])(transform)/g,"$1"+Q+"$2")+e;case 6187:return H(H(H(e,/(zoom-|grab)/,Q+"$1"),/(image-set)/,Q+"$1"),e,"")+e;case 5495:case 3959:return H(e,/(image-set\([^]*)/,Q+"$1$`$1");case 4968:return H(H(e,/(.+:)(flex-)?(.*)/,Q+"box-pack:$3"+Le+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Q+e+e;case 4095:case 3583:case 4068:case 2532:return H(e,/(.+)-inline(.+)/,Q+"$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(at(e)-1-t>6)switch(De(e,t+1)){case 109:if(De(e,t+4)!==45)break;case 102:return H(e,/(.+:)(.+)-([^]+)/,"$1"+Q+"$2-$3$1"+Pr+(De(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Kn(e,"stretch")?Bo(H(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(De(e,t+1)!==115)break;case 6444:switch(De(e,at(e)-3-(~Kn(e,"!important")&&10))){case 107:return H(e,":",":"+Q)+e;case 101:return H(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Q+(De(e,14)===45?"inline-":"")+"box$3$1"+Q+"$2$3$1"+Le+"$2box$3")+e}break;case 5936:switch(De(e,t+11)){case 114:return Q+e+Le+H(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Q+e+Le+H(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Q+e+Le+H(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Q+e+Le+e+e}return e}var Pu=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case Yn:t.return=Bo(t.value,t.length);break;case ko:return Bt([or(t,{value:H(t.value,"@","@"+Q)})],a);case Wn:if(t.length)return bu(t.props,function(o){switch(mu(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Bt([or(t,{props:[H(o,/:(read-\w+)/,":"+Pr+"$1")]})],a);case"::placeholder":return Bt([or(t,{props:[H(o,/:(plac\w+)/,":"+Q+"input-$1")]}),or(t,{props:[H(o,/:(plac\w+)/,":"+Pr+"$1")]}),or(t,{props:[H(o,/:(plac\w+)/,Le+"input-$1")]})],a)}return""})}},Au=[Pu],Vo=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(u){var y=u.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(u),u.setAttribute("data-s",""))})}var a=t.stylisPlugins||Au,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(u){for(var y=u.getAttribute("data-emotion").split(" "),w=1;w<y.length;w++)o[y[w]]=!0;l.push(u)});var c,f=[$u,Mu];{var h,m=[wu,Ou(function(u){h.insert(u)})],b=ju(f.concat(a,m)),g=function(y){return Bt(_u(y),b)};c=function(y,w,j,k){h=j,g(y?y+"{"+w.styles+"}":w.styles),k&&(v.inserted[w.name]=!0)}}var v={key:n,sheet:new uu({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return v.sheet.hydrate(l),v},qo=Sn(),Du={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Iu={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zo={};zo[qo.ForwardRef]=Du,zo[qo.Memo]=Iu;var Fu=!0;function No(e,t,n){var r="";return n.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(r+=a+" ")}),r}var Xn=function(t,n,r){var a=t.key+"-"+n.name;(r===!1||Fu===!1)&&t.registered[a]===void 0&&(t.registered[a]=n.styles)},Zn=function(t,n,r){Xn(t,n,r);var a=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Lu(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=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(a){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 Bu={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale: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},Vu=/[A-Z]|^ms/g,qu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Uo=function(t){return t.charCodeAt(1)===45},Wo=function(t){return t!=null&&typeof t!="boolean"},Qn=Fo(function(e){return Uo(e)?e:e.replace(Vu,"-$&").toLowerCase()}),Yo=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(qu,function(r,a,o){return st={name:a,styles:o,next:st},a})}return Bu[t]!==1&&!Uo(t)&&typeof n=="number"&&n!==0?n+"px":n};function lr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var a=n;if(a.anim===1)return st={name:a.name,styles:a.styles,next:st},a.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)st={name:s.name,styles:s.styles,next:st},s=s.next;var l=o.styles+";";return l}return zu(e,t,n)}case"function":{if(e!==void 0){var c=st,f=n(e);return st=c,lr(e,t,f)}break}}var h=n;if(t==null)return h;var m=t[h];return m!==void 0?m:h}function zu(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=lr(e,t,n[a])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?r+=o+"{"+t[l]+"}":Wo(l)&&(r+=Qn(o)+":"+Yo(o,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)Wo(s[c])&&(r+=Qn(o)+":"+Yo(o,s[c])+";");else{var f=lr(e,t,s);switch(o){case"animation":case"animationName":{r+=Qn(o)+":"+f+";";break}default:r+=o+"{"+f+"}"}}}return r}var Ko=/label:\s*([^\s;{]+)\s*(;|$)/g,st;function qr(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,a="";st=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,a+=lr(n,t,o);else{var s=o;a+=s[0]}for(var l=1;l<e.length;l++)if(a+=lr(n,t,e[l]),r){var c=o;a+=c[l]}Ko.lastIndex=0;for(var f="",h;(h=Ko.exec(a))!==null;)f+="-"+h[1];var m=Lu(a)+f;return{name:m,styles:a,next:st}}var Nu=function(t){return t()},Go=q.useInsertionEffect?q.useInsertionEffect:!1,Jo=Go||Nu,Xo=Go||q.useLayoutEffect,Zo=q.createContext(typeof HTMLElement<"u"?Vo({key:"css"}):null),Uu=Zo.Provider,Hn=function(t){return _.forwardRef(function(n,r){var a=_.useContext(Zo);return t(n,a,r)})},zr=q.createContext({}),ea={}.hasOwnProperty,ta="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Wu=function(t,n){var r={};for(var a in n)ea.call(n,a)&&(r[a]=n[a]);return r[ta]=t,r},Yu=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Xn(n,r,a),Jo(function(){return Zn(n,r,a)}),null},Ku=Hn(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[ta],o=[r],s="";typeof e.className=="string"?s=No(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var l=qr(o,void 0,q.useContext(zr));s+=t.key+"-"+l.name;var c={};for(var f in e)ea.call(e,f)&&f!=="css"&&f!==ta&&(c[f]=e[f]);return c.className=s,n&&(c.ref=n),q.createElement(q.Fragment,null,q.createElement(Yu,{cache:t,serialized:l,isStringTag:typeof a=="string"}),q.createElement(a,c))}),Gu=Ku;Oo();var Qo=function(t,n){var r=arguments;if(n==null||!ea.call(n,"css"))return q.createElement.apply(void 0,r);var a=r.length,o=new Array(a);o[0]=Gu,o[1]=Wu(t,n);for(var s=2;s<a;s++)o[s]=r[s];return q.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Qo||(Qo={}));var Ju=Hn(function(e,t){var n=e.styles,r=qr([n],void 0,q.useContext(zr)),a=q.useRef();return Xo(function(){var o=t.key+"-global",s=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",o),s.hydrate([c])),a.current=[s,l],function(){s.flush()}},[t]),Xo(function(){var o=a.current,s=o[0],l=o[1];if(l){o[1]=!1;return}if(r.next!==void 0&&Zn(t,r.next,!0),s.tags.length){var c=s.tags[s.tags.length-1].nextElementSibling;s.before=c,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function Ho(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qr(t)}function Xu(){var e=Ho.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Zu=/^((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|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|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)-.*))$/,Qu=Fo(function(e){return Zu.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Hu=Qu,ec=function(t){return t!=="theme"},es=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Hu:ec},ts=function(t,n,r){var a;if(n){var o=n.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof a!="function"&&r&&(a=t.__emotion_forwardProp),a},tc=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Xn(n,r,a),Jo(function(){return Zn(n,r,a)}),null},rc=function e(t,n){var r=t.__emotion_real===t,a=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var l=ts(t,n,r),c=l||es(a),f=!c("as");return function(){var h=arguments,m=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&m.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)m.push.apply(m,h);else{var b=h[0];m.push(b[0]);for(var g=h.length,v=1;v<g;v++)m.push(h[v],b[v])}var u=Hn(function(y,w,j){var k=f&&y.as||a,M="",x=[],A=y;if(y.theme==null){A={};for(var F in y)A[F]=y[F];A.theme=q.useContext(zr)}typeof y.className=="string"?M=No(w.registered,x,y.className):y.className!=null&&(M=y.className+" ");var be=qr(m.concat(x),w.registered,A);M+=w.key+"-"+be.name,s!==void 0&&(M+=" "+s);var Ie=f&&l===void 0?es(k):c,ee={};for(var te in y)f&&te==="as"||Ie(te)&&(ee[te]=y[te]);return ee.className=M,j&&(ee.ref=j),q.createElement(q.Fragment,null,q.createElement(tc,{cache:w,serialized:be,isStringTag:typeof k=="string"}),q.createElement(k,ee))});return u.displayName=o!==void 0?o:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",u.defaultProps=t.defaultProps,u.__emotion_real=u,u.__emotion_base=a,u.__emotion_styles=m,u.__emotion_forwardProp=l,Object.defineProperty(u,"toString",{value:function(){return"."+s}}),u.withComponent=function(y,w){var j=e(y,re({},n,w,{shouldForwardProp:ts(u,w,!0)}));return j.apply(void 0,m)},u}},nc=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ra=rc.bind(null);nc.forEach(function(e){ra[e]=ra(e)});let na;typeof document=="object"&&(na=Vo({key:"css",prepend:!0}));function rs(e){const{injectFirst:t,children:n}=e;return t&&na?i.jsx(Uu,{value:na,children:n}):n}process.env.NODE_ENV!=="production"&&(rs.propTypes={children:W.node,injectFirst:W.bool});function ac(e){return e==null||Object.keys(e).length===0}function ns(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?a=>t(ac(a)?n:a):t;return i.jsx(Ju,{styles:r})}process.env.NODE_ENV!=="production"&&(ns.propTypes={defaultTheme:W.object,styles:W.oneOfType([W.array,W.string,W.object,W.func])});/**
70
- * @mui/styled-engine v5.16.14
62
+ */var Za;function Vl(){return Za||(Za=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,b=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,c=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function _(A){return typeof A=="string"||typeof A=="function"||A===n||A===p||A===a||A===o||A===m||A===g||typeof A=="object"&&A!==null&&(A.$$typeof===v||A.$$typeof===y||A.$$typeof===i||A.$$typeof===s||A.$$typeof===b||A.$$typeof===T||A.$$typeof===w||A.$$typeof===j||A.$$typeof===c)}function O(A){if(typeof A=="object"&&A!==null){var Ve=A.$$typeof;switch(Ve){case t:var He=A.type;switch(He){case f:case p:case n:case a:case o:case m:return He;default:var at=He&&He.$$typeof;switch(at){case s:case b:case v:case y:case i:return at;default:return Ve}}case r:return Ve}}}var C=f,I=p,D=s,se=i,ee=t,u=b,$=n,V=v,F=y,te=r,ge=a,ve=o,De=m,Ie=!1;function Je(A){return Ie||(Ie=!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.")),S(A)||O(A)===f}function S(A){return O(A)===p}function P(A){return O(A)===s}function Y(A){return O(A)===i}function W(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function z(A){return O(A)===b}function Q(A){return O(A)===n}function L(A){return O(A)===v}function U(A){return O(A)===y}function G(A){return O(A)===r}function K(A){return O(A)===a}function J(A){return O(A)===o}function Ce(A){return O(A)===m}ce.AsyncMode=C,ce.ConcurrentMode=I,ce.ContextConsumer=D,ce.ContextProvider=se,ce.Element=ee,ce.ForwardRef=u,ce.Fragment=$,ce.Lazy=V,ce.Memo=F,ce.Portal=te,ce.Profiler=ge,ce.StrictMode=ve,ce.Suspense=De,ce.isAsyncMode=Je,ce.isConcurrentMode=S,ce.isContextConsumer=P,ce.isContextProvider=Y,ce.isElement=W,ce.isForwardRef=z,ce.isFragment=Q,ce.isLazy=L,ce.isMemo=U,ce.isPortal=G,ce.isProfiler=K,ce.isStrictMode=J,ce.isSuspense=Ce,ce.isValidElementType=_,ce.typeOf=O}()),ce}var Ha;function eo(){return Ha||(Ha=1,process.env.NODE_ENV==="production"?fn.exports=Bl():fn.exports=Vl()),fn.exports}/*
63
+ object-assign
64
+ (c) Sindre Sorhus
65
+ @license MIT
66
+ */var Jn,to;function Ll(){if(to)return Jn;to=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},s=0;s<10;s++)i["_"+String.fromCharCode(s)]=s;var f=Object.getOwnPropertyNames(i).map(function(b){return i[b]});if(f.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(b){p[b]=b}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jn=o()?Object.assign:function(a,i){for(var s,f=n(a),p,b=1;b<arguments.length;b++){s=Object(arguments[b]);for(var m in s)t.call(s,m)&&(f[m]=s[m]);if(e){p=e(s);for(var g=0;g<p.length;g++)r.call(s,p[g])&&(f[p[g]]=s[p[g]])}}return f},Jn}var Qn,ro;function Xn(){if(ro)return Qn;ro=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qn=e,Qn}var Zn,no;function ao(){return no||(no=1,Zn=Function.call.bind(Object.prototype.hasOwnProperty)),Zn}var Hn,oo;function ql(){if(oo)return Hn;oo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Xn(),r={},n=ao();e=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(a,i,s,f,p){if(process.env.NODE_ENV!=="production"){for(var b in a)if(n(a,b)){var m;try{if(typeof a[b]!="function"){var g=Error((f||"React class")+": "+s+" type `"+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}m=a[b](i,b,f,s,null,t)}catch(v){m=v}if(m&&!(m instanceof Error)&&e((f||"React class")+": type specification of "+s+" `"+b+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in r)){r[m.message]=!0;var y=p?p():"";e("Failed "+s+" type: "+m.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Hn=o,Hn}var ea,io;function Nl(){if(io)return ea;io=1;var e=eo(),t=Ll(),r=Xn(),n=ao(),o=ql(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var f="Warning: "+s;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function i(){return null}return ea=function(s,f){var p=typeof Symbol=="function"&&Symbol.iterator,b="@@iterator";function m(S){var P=S&&(p&&S[p]||S[b]);if(typeof P=="function")return P}var g="<<anonymous>>",y={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:j(),arrayOf:_,element:O(),elementType:C(),instanceOf:I,node:u(),objectOf:se,oneOf:D,oneOfType:ee,shape:V,exact:F};function v(S,P){return S===P?S!==0||1/S===1/P:S!==S&&P!==P}function c(S,P){this.message=S,this.data=P&&typeof P=="object"?P:{},this.stack=""}c.prototype=Error.prototype;function T(S){if(process.env.NODE_ENV!=="production")var P={},Y=0;function W(Q,L,U,G,K,J,Ce){if(G=G||g,J=J||U,Ce!==r){if(f){var A=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 A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ve=G+":"+U;!P[Ve]&&Y<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),P[Ve]=!0,Y++)}}return L[U]==null?Q?L[U]===null?new c("The "+K+" `"+J+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new c("The "+K+" `"+J+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:S(L,U,G,K,J)}var z=W.bind(null,!1);return z.isRequired=W.bind(null,!0),z}function w(S){function P(Y,W,z,Q,L,U){var G=Y[W],K=ve(G);if(K!==S){var J=De(G);return new c("Invalid "+Q+" `"+L+"` of type "+("`"+J+"` supplied to `"+z+"`, expected ")+("`"+S+"`."),{expectedType:S})}return null}return T(P)}function j(){return T(i)}function _(S){function P(Y,W,z,Q,L){if(typeof S!="function")return new c("Property `"+L+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var U=Y[W];if(!Array.isArray(U)){var G=ve(U);return new c("Invalid "+Q+" `"+L+"` of type "+("`"+G+"` supplied to `"+z+"`, expected an array."))}for(var K=0;K<U.length;K++){var J=S(U,K,z,Q,L+"["+K+"]",r);if(J instanceof Error)return J}return null}return T(P)}function O(){function S(P,Y,W,z,Q){var L=P[Y];if(!s(L)){var U=ve(L);return new c("Invalid "+z+" `"+Q+"` of type "+("`"+U+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return T(S)}function C(){function S(P,Y,W,z,Q){var L=P[Y];if(!e.isValidElementType(L)){var U=ve(L);return new c("Invalid "+z+" `"+Q+"` of type "+("`"+U+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return T(S)}function I(S){function P(Y,W,z,Q,L){if(!(Y[W]instanceof S)){var U=S.name||g,G=Je(Y[W]);return new c("Invalid "+Q+" `"+L+"` of type "+("`"+G+"` supplied to `"+z+"`, expected ")+("instance of `"+U+"`."))}return null}return T(P)}function D(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&(arguments.length>1?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.")),i;function P(Y,W,z,Q,L){for(var U=Y[W],G=0;G<S.length;G++)if(v(U,S[G]))return null;var K=JSON.stringify(S,function(Ce,A){var Ve=De(A);return Ve==="symbol"?String(A):A});return new c("Invalid "+Q+" `"+L+"` of value `"+String(U)+"` "+("supplied to `"+z+"`, expected one of "+K+"."))}return T(P)}function se(S){function P(Y,W,z,Q,L){if(typeof S!="function")return new c("Property `"+L+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var U=Y[W],G=ve(U);if(G!=="object")return new c("Invalid "+Q+" `"+L+"` of type "+("`"+G+"` supplied to `"+z+"`, expected an object."));for(var K in U)if(n(U,K)){var J=S(U,K,z,Q,L+"."+K,r);if(J instanceof Error)return J}return null}return T(P)}function ee(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var P=0;P<S.length;P++){var Y=S[P];if(typeof Y!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ie(Y)+" at index "+P+"."),i}function W(z,Q,L,U,G){for(var K=[],J=0;J<S.length;J++){var Ce=S[J],A=Ce(z,Q,L,U,G,r);if(A==null)return null;A.data&&n(A.data,"expectedType")&&K.push(A.data.expectedType)}var Ve=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new c("Invalid "+U+" `"+G+"` supplied to "+("`"+L+"`"+Ve+"."))}return T(W)}function u(){function S(P,Y,W,z,Q){return te(P[Y])?null:new c("Invalid "+z+" `"+Q+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return T(S)}function $(S,P,Y,W,z){return new c((S||"React class")+": "+P+" type `"+Y+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function V(S){function P(Y,W,z,Q,L){var U=Y[W],G=ve(U);if(G!=="object")return new c("Invalid "+Q+" `"+L+"` of type `"+G+"` "+("supplied to `"+z+"`, expected `object`."));for(var K in S){var J=S[K];if(typeof J!="function")return $(z,Q,L,K,De(J));var Ce=J(U,K,z,Q,L+"."+K,r);if(Ce)return Ce}return null}return T(P)}function F(S){function P(Y,W,z,Q,L){var U=Y[W],G=ve(U);if(G!=="object")return new c("Invalid "+Q+" `"+L+"` of type `"+G+"` "+("supplied to `"+z+"`, expected `object`."));var K=t({},Y[W],S);for(var J in K){var Ce=S[J];if(n(S,J)&&typeof Ce!="function")return $(z,Q,L,J,De(Ce));if(!Ce)return new c("Invalid "+Q+" `"+L+"` key `"+J+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(Y[W],null," ")+`
67
+ Valid keys: `+JSON.stringify(Object.keys(S),null," "));var A=Ce(U,J,z,Q,L+"."+J,r);if(A)return A}return null}return T(P)}function te(S){switch(typeof S){case"number":case"string":case"undefined":return!0;case"boolean":return!S;case"object":if(Array.isArray(S))return S.every(te);if(S===null||s(S))return!0;var P=m(S);if(P){var Y=P.call(S),W;if(P!==S.entries){for(;!(W=Y.next()).done;)if(!te(W.value))return!1}else for(;!(W=Y.next()).done;){var z=W.value;if(z&&!te(z[1]))return!1}}else return!1;return!0;default:return!1}}function ge(S,P){return S==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function ve(S){var P=typeof S;return Array.isArray(S)?"array":S instanceof RegExp?"object":ge(P,S)?"symbol":P}function De(S){if(typeof S>"u"||S===null)return""+S;var P=ve(S);if(P==="object"){if(S instanceof Date)return"date";if(S instanceof RegExp)return"regexp"}return P}function Ie(S){var P=De(S);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function Je(S){return!S.constructor||!S.constructor.name?g:S.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},ea}var ta,so;function zl(){if(so)return ta;so=1;var e=Xn();function t(){}function r(){}return r.resetWarningCache=t,ta=function(){function n(i,s,f,p,b,m){if(m!==e){var g=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 g.name="Invariant Violation",g}}n.isRequired=n;function o(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},ta}var lo;function Ul(){if(lo)return dn.exports;if(lo=1,process.env.NODE_ENV!=="production"){var e=eo(),t=!0;dn.exports=Nl()(e.isElement,t)}else dn.exports=zl()();return dn.exports}var Wl=Ul();const ne=Ee(Wl);function At(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function co(e,t=""){return e.displayName||e.name||t}function uo(e,t,r){const n=co(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Yl(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return co(e,"Component");if(typeof e=="object")switch(e.$$typeof){case un.ForwardRef:return uo(e,e.render,"ForwardRef");case un.Memo:return uo(e,e.type,"memo");default:return}}}function $t(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":At(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gl(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function Kl(e,t=166){let r;function n(...o){const a=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(a,t)}return n.clear=()=>{clearTimeout(r)},n}function Jl(e,t){return process.env.NODE_ENV==="production"?()=>null:(r,n,o,a,i)=>{const s=o||"<<anonymous>>",f=i||n;return typeof r[n]<"u"?new Error(`The ${a} \`${f}\` of \`${s}\` is deprecated. ${t}`):null}}function Ql(e,t){var r,n,o;return re.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(n=(r=e.type)==null?void 0:r._payload)==null?void 0:n.value)==null?void 0:o.muiName))!==-1}function fo(e){return e&&e.ownerDocument||document}function Xl(e){return fo(e).defaultView||window}function Zl(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?{...t.propTypes}:null;return o=>(a,i,s,f,p,...b)=>{const m=p||i,g=r==null?void 0:r[m];if(g){const y=g(a,i,s,f,p,...b);if(y)return y}return typeof a[i]<"u"&&!a[o]?new Error(`The prop \`${m}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function Hl(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const po=typeof window<"u"?re.useLayoutEffect:re.useEffect;let ho=0;function ec(e){const[t,r]=re.useState(e),n=e||t;return re.useEffect(()=>{t==null&&(ho+=1,r(`mui-${ho}`))},[t]),n}const mo={...re}.useId;function tc(e){if(mo!==void 0){const t=mo();return e??t}return ec(e)}function rc(e,t,r,n,o){if(process.env.NODE_ENV==="production")return null;const a=o||t;return typeof e[t]<"u"?new Error(`The prop \`${a}\` is not supported. Please remove it.`):null}function nc({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=re.useRef(e!==void 0),[a,i]=re.useState(t),s=o?e:a;if(process.env.NODE_ENV!=="production"){re.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${n} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
68
+ `))},[n,r,e]);const{current:p}=re.useRef(t);re.useEffect(()=>{!o&&!Object.is(p,t)&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
69
+ `))},[JSON.stringify(t)])}const f=re.useCallback(p=>{o||i(p)},[]);return[s,f]}function ac(e){const t=re.useRef(e);return po(()=>{t.current=e}),re.useRef((...r)=>(0,t.current)(...r)).current}function oc(...e){const t=re.useRef(void 0),r=re.useCallback(n=>{const o=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const i=a,s=i(n);return typeof s=="function"?s:()=>{i(null)}}return a.current=n,()=>{a.current=null}});return()=>{o.forEach(a=>a==null?void 0:a())}},e);return re.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function ra(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=n;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const a=e[o],i=t[o];if(!i)r[o]=a||{};else if(!a)r[o]=i;else{r[o]={...i};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const f=s;r[o][f]=ra(a[f],i[f])}}}else r[o]===void 0&&(r[o]=e[o])}return r}function ic(e,t,r=void 0){const n={};for(const o in e){const a=e[o];let i="",s=!0;for(let f=0;f<a.length;f+=1){const p=a[f];p&&(i+=(s===!0?"":" ")+t(p),s=!1,r&&r[p]&&(i+=" "+r[p]))}n[o]=i}return n}const bo=e=>e,go=(()=>{let e=bo;return{configure(t){e=t},generate(t){return e(t)},reset(){e=bo}}})(),sc={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function na(e,t,r="Mui"){const n=sc[t];return n?`${r}-${n}`:`${go.generate(e)}-${t}`}function lc(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=na(e,o,r)}),n}function cc(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function vo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=vo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function uc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=vo(e))&&(n&&(n+=" "),n+=t);return n}function br(e,t){return t?Qe(e,t,{clone:!1}):e}const Pt=process.env.NODE_ENV!=="production"?ne.oneOfType([ne.number,ne.string,ne.object,ne.array]):{};function dc(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{var i,s;const a=/min-width:\s*([0-9.]+)/;return+(((i=n.match(a))==null?void 0:i[1])||0)-+(((s=o.match(a))==null?void 0:s[1])||0)});return r.length?r.reduce((n,o)=>{const a=t[o];return delete n[o],n[o]=a,n},{...t}):t}function fc(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function pc(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
70
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:At(18,`(${t})`));return null}const[,n,o]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(a)}function hc(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function r(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const f=t(e.breakpoints.not(...s),i);return f.includes("not all and")?f.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):f}}const n={},o=a=>(r(n,a),n);return r(o),{...e,containerQueries:o}}const pn={xs:0,sm:600,md:900,lg:1200,xl:1536},yo={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${pn[e]}px)`},mc={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:pn[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Ct(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||yo;return t.reduce((i,s,f)=>(i[a.up(a.keys[f])]=r(t[f]),i),{})}if(typeof t=="object"){const a=n.breakpoints||yo;return Object.keys(t).reduce((i,s)=>{if(fc(a.keys,s)){const f=pc(n.containerQueries?n:mc,s);f&&(i[f]=r(t[s],s))}else if(Object.keys(a.values||pn).includes(s)){const f=a.up(s);i[f]=r(t[s],s)}else{const f=s;i[f]=t[f]}return i},{})}return r(t)}function bc(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const a=e.up(o);return n[a]={},n},{}))||{}}function gc(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function hn(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function mn(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=hn(e,r)||n,t&&(o=t(o,n,e)),o}function Oe(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],f=i.theme,p=hn(f,n)||{};return Ct(i,s,m=>{let g=mn(p,o,m);return m===g&&typeof m=="string"&&(g=mn(p,o,`${t}${m==="default"?"":$t(m)}`,m)),r===!1?g:{[r]:g}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:Pt}:{},a.filterProps=[t],a}function vc(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const yc={m:"margin",p:"padding"},xc={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},xo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Cc=vc(e=>{if(e.length>2)if(xo[e])e=xo[e];else return[e];const[t,r]=e.split(""),n=yc[t],o=xc[r]||"";return Array.isArray(o)?o.map(a=>n+a):[n+o]}),bn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],gn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Tc=[...bn,...gn];function gr(e,t,r,n){const o=hn(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${a}.`),typeof o=="string"?`calc(${a} * ${o})`:o*a):Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>o.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${i} > ${o.length-1}, you need to add the missing values.`].join(`
71
+ `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
72
+ `)));const s=o[i];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
73
+ `)),()=>{})}function aa(e){return gr(e,"spacing",8,"spacing")}function vr(e,t){return typeof t=="string"||t==null?t:e(t)}function wc(e,t){return r=>e.reduce((n,o)=>(n[o]=vr(t,r),n),{})}function Ec(e,t,r,n){if(!t.includes(r))return null;const o=Cc(r),a=wc(o,n),i=e[r];return Ct(e,i,a)}function Co(e,t){const r=aa(e.theme);return Object.keys(e).map(n=>Ec(e,t,n,r)).reduce(br,{})}function je(e){return Co(e,bn)}je.propTypes=process.env.NODE_ENV!=="production"?bn.reduce((e,t)=>(e[t]=Pt,e),{}):{},je.filterProps=bn;function Se(e){return Co(e,gn)}Se.propTypes=process.env.NODE_ENV!=="production"?gn.reduce((e,t)=>(e[t]=Pt,e),{}):{},Se.filterProps=gn,process.env.NODE_ENV!=="production"&&Tc.reduce((e,t)=>(e[t]=Pt,e),{});function vn(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(a=>{n[a]=o}),n),{}),r=n=>Object.keys(n).reduce((o,a)=>t[a]?br(o,t[a](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function rt(e){return typeof e!="number"?e:`${e}px solid`}function nt(e,t){return Oe({prop:e,themeKey:"borders",transform:t})}const Rc=nt("border",rt),jc=nt("borderTop",rt),Sc=nt("borderRight",rt),kc=nt("borderBottom",rt),_c=nt("borderLeft",rt),Oc=nt("borderColor"),Ac=nt("borderTopColor"),$c=nt("borderRightColor"),Pc=nt("borderBottomColor"),Mc=nt("borderLeftColor"),Dc=nt("outline",rt),Ic=nt("outlineColor"),yn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=gr(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:vr(t,n)});return Ct(e,e.borderRadius,r)}return null};yn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Pt}:{},yn.filterProps=["borderRadius"],vn(Rc,jc,Sc,kc,_c,Oc,Ac,$c,Pc,Mc,yn,Dc,Ic);const xn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=gr(e.theme,"spacing",8,"gap"),r=n=>({gap:vr(t,n)});return Ct(e,e.gap,r)}return null};xn.propTypes=process.env.NODE_ENV!=="production"?{gap:Pt}:{},xn.filterProps=["gap"];const Cn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=gr(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:vr(t,n)});return Ct(e,e.columnGap,r)}return null};Cn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Pt}:{},Cn.filterProps=["columnGap"];const Tn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=gr(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:vr(t,n)});return Ct(e,e.rowGap,r)}return null};Tn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Pt}:{},Tn.filterProps=["rowGap"];const Fc=Oe({prop:"gridColumn"}),Bc=Oe({prop:"gridRow"}),Vc=Oe({prop:"gridAutoFlow"}),Lc=Oe({prop:"gridAutoColumns"}),qc=Oe({prop:"gridAutoRows"}),Nc=Oe({prop:"gridTemplateColumns"}),zc=Oe({prop:"gridTemplateRows"}),Uc=Oe({prop:"gridTemplateAreas"}),Wc=Oe({prop:"gridArea"});vn(xn,Cn,Tn,Fc,Bc,Vc,Lc,qc,Nc,zc,Uc,Wc);function Qt(e,t){return t==="grey"?t:e}const Yc=Oe({prop:"color",themeKey:"palette",transform:Qt}),Gc=Oe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Qt}),Kc=Oe({prop:"backgroundColor",themeKey:"palette",transform:Qt});vn(Yc,Gc,Kc);function Xe(e){return e<=1&&e!==0?`${e*100}%`:e}const Jc=Oe({prop:"width",transform:Xe}),oa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,a,i,s,f;const n=((i=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:i[r])||pn[r];return n?((f=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:f.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Xe(r)}};return Ct(e,e.maxWidth,t)}return null};oa.filterProps=["maxWidth"];const Qc=Oe({prop:"minWidth",transform:Xe}),Xc=Oe({prop:"height",transform:Xe}),Zc=Oe({prop:"maxHeight",transform:Xe}),Hc=Oe({prop:"minHeight",transform:Xe});Oe({prop:"size",cssProperty:"width",transform:Xe}),Oe({prop:"size",cssProperty:"height",transform:Xe});const eu=Oe({prop:"boxSizing"});vn(Jc,oa,Qc,Xc,Zc,Hc,eu);const wn={border:{themeKey:"borders",transform:rt},borderTop:{themeKey:"borders",transform:rt},borderRight:{themeKey:"borders",transform:rt},borderBottom:{themeKey:"borders",transform:rt},borderLeft:{themeKey:"borders",transform:rt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:rt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:yn},color:{themeKey:"palette",transform:Qt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Qt},backgroundColor:{themeKey:"palette",transform:Qt},p:{style:Se},pt:{style:Se},pr:{style:Se},pb:{style:Se},pl:{style:Se},px:{style:Se},py:{style:Se},padding:{style:Se},paddingTop:{style:Se},paddingRight:{style:Se},paddingBottom:{style:Se},paddingLeft:{style:Se},paddingX:{style:Se},paddingY:{style:Se},paddingInline:{style:Se},paddingInlineStart:{style:Se},paddingInlineEnd:{style:Se},paddingBlock:{style:Se},paddingBlockStart:{style:Se},paddingBlockEnd:{style:Se},m:{style:je},mt:{style:je},mr:{style:je},mb:{style:je},ml:{style:je},mx:{style:je},my:{style:je},margin:{style:je},marginTop:{style:je},marginRight:{style:je},marginBottom:{style:je},marginLeft:{style:je},marginX:{style:je},marginY:{style:je},marginInline:{style:je},marginInlineStart:{style:je},marginInlineEnd:{style:je},marginBlock:{style:je},marginBlockStart:{style:je},marginBlockEnd:{style:je},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xn},rowGap:{style:Tn},columnGap:{style:Cn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Xe},maxWidth:{style:oa},minWidth:{transform:Xe},height:{transform:Xe},maxHeight:{transform:Xe},minHeight:{transform:Xe},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function tu(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function ru(e,t){return typeof e=="function"?e(t):e}function nu(){function e(r,n,o,a){const i={[r]:n,theme:o},s=a[r];if(!s)return{[r]:n};const{cssProperty:f=r,themeKey:p,transform:b,style:m}=s;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const g=hn(o,p)||{};return m?m(i):Ct(i,n,v=>{let c=mn(g,b,v);return v===c&&typeof v=="string"&&(c=mn(g,b,`${r}${v==="default"?"":$t(v)}`,v)),f===!1?c:{[f]:c}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const a=o.unstable_sxConfig??wn;function i(s){let f=s;if(typeof s=="function")f=s(o);else if(typeof s!="object")return s;if(!f)return null;const p=bc(o.breakpoints),b=Object.keys(p);let m=p;return Object.keys(f).forEach(g=>{const y=ru(f[g],o);if(y!=null)if(typeof y=="object")if(a[g])m=br(m,e(g,y,o,a));else{const v=Ct({theme:o},y,c=>({[g]:c}));tu(v,y)?m[g]=t({sx:y,theme:o}):m=br(m,v)}else m=br(m,e(g,y,o,a))}),dc(o,gc(b,m))}return Array.isArray(n)?n.map(i):i(n)}return t}const Xt=nu();Xt.filterProps=["sx"];function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ia.apply(null,arguments)}function au(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ou(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var iu=function(){function e(r){var n=this;this._insertTag=function(o){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,a),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ou(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=au(o);try{a.insertRule(n,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Ue="-ms-",En="-moz-",oe="-webkit-",To="comm",sa="rule",la="decl",su="@import",wo="@keyframes",lu="@layer",cu=Math.abs,Rn=String.fromCharCode,uu=Object.assign;function du(e,t){return qe(e,0)^45?(((t<<2^qe(e,0))<<2^qe(e,1))<<2^qe(e,2))<<2^qe(e,3):0}function Eo(e){return e.trim()}function fu(e,t){return(e=t.exec(e))?e[0]:e}function ie(e,t,r){return e.replace(t,r)}function ca(e,t){return e.indexOf(t)}function qe(e,t){return e.charCodeAt(t)|0}function yr(e,t,r){return e.slice(t,r)}function ft(e){return e.length}function ua(e){return e.length}function jn(e,t){return t.push(e),e}function pu(e,t){return e.map(t).join("")}var Sn=1,Zt=1,Ro=0,Ke=0,Me=0,Ht="";function kn(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Sn,column:Zt,length:i,return:""}}function xr(e,t){return uu(kn("",null,null,"",null,null,0),e,{length:-e.length},t)}function hu(){return Me}function mu(){return Me=Ke>0?qe(Ht,--Ke):0,Zt--,Me===10&&(Zt=1,Sn--),Me}function Ze(){return Me=Ke<Ro?qe(Ht,Ke++):0,Zt++,Me===10&&(Zt=1,Sn++),Me}function pt(){return qe(Ht,Ke)}function _n(){return Ke}function Cr(e,t){return yr(Ht,e,t)}function Tr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function jo(e){return Sn=Zt=1,Ro=ft(Ht=e),Ke=0,[]}function So(e){return Ht="",e}function On(e){return Eo(Cr(Ke-1,da(e===91?e+2:e===40?e+1:e)))}function bu(e){for(;(Me=pt())&&Me<33;)Ze();return Tr(e)>2||Tr(Me)>3?"":" "}function gu(e,t){for(;--t&&Ze()&&!(Me<48||Me>102||Me>57&&Me<65||Me>70&&Me<97););return Cr(e,_n()+(t<6&&pt()==32&&Ze()==32))}function da(e){for(;Ze();)switch(Me){case e:return Ke;case 34:case 39:e!==34&&e!==39&&da(Me);break;case 40:e===41&&da(e);break;case 92:Ze();break}return Ke}function vu(e,t){for(;Ze()&&e+Me!==57;)if(e+Me===84&&pt()===47)break;return"/*"+Cr(t,Ke-1)+"*"+Rn(e===47?e:Ze())}function yu(e){for(;!Tr(pt());)Ze();return Cr(e,Ke)}function xu(e){return So(An("",null,null,null,[""],e=jo(e),0,[0],e))}function An(e,t,r,n,o,a,i,s,f){for(var p=0,b=0,m=i,g=0,y=0,v=0,c=1,T=1,w=1,j=0,_="",O=o,C=a,I=n,D=_;T;)switch(v=j,j=Ze()){case 40:if(v!=108&&qe(D,m-1)==58){ca(D+=ie(On(j),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=On(j);break;case 9:case 10:case 13:case 32:D+=bu(v);break;case 92:D+=gu(_n()-1,7);continue;case 47:switch(pt()){case 42:case 47:jn(Cu(vu(Ze(),_n()),t,r),f);break;default:D+="/"}break;case 123*c:s[p++]=ft(D)*w;case 125*c:case 59:case 0:switch(j){case 0:case 125:T=0;case 59+b:w==-1&&(D=ie(D,/\f/g,"")),y>0&&ft(D)-m&&jn(y>32?_o(D+";",n,r,m-1):_o(ie(D," ","")+";",n,r,m-2),f);break;case 59:D+=";";default:if(jn(I=ko(D,t,r,p,b,o,s,_,O=[],C=[],m),a),j===123)if(b===0)An(D,t,I,I,O,a,m,s,C);else switch(g===99&&qe(D,3)===110?100:g){case 100:case 108:case 109:case 115:An(e,I,I,n&&jn(ko(e,I,I,0,0,o,s,_,o,O=[],m),C),o,C,m,s,n?O:C);break;default:An(D,I,I,I,[""],C,0,s,C)}}p=b=y=0,c=w=1,_=D="",m=i;break;case 58:m=1+ft(D),y=v;default:if(c<1){if(j==123)--c;else if(j==125&&c++==0&&mu()==125)continue}switch(D+=Rn(j),j*c){case 38:w=b>0?1:(D+="\f",-1);break;case 44:s[p++]=(ft(D)-1)*w,w=1;break;case 64:pt()===45&&(D+=On(Ze())),g=pt(),b=m=ft(_=D+=yu(_n())),j++;break;case 45:v===45&&ft(D)==2&&(c=0)}}return a}function ko(e,t,r,n,o,a,i,s,f,p,b){for(var m=o-1,g=o===0?a:[""],y=ua(g),v=0,c=0,T=0;v<n;++v)for(var w=0,j=yr(e,m+1,m=cu(c=i[v])),_=e;w<y;++w)(_=Eo(c>0?g[w]+" "+j:ie(j,/&\f/g,g[w])))&&(f[T++]=_);return kn(e,t,r,o===0?sa:s,f,p,b)}function Cu(e,t,r){return kn(e,t,r,To,Rn(hu()),yr(e,2,-2),0)}function _o(e,t,r,n){return kn(e,t,r,la,yr(e,0,n),yr(e,n+1,-1),n)}function er(e,t){for(var r="",n=ua(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Tu(e,t,r,n){switch(e.type){case lu:if(e.children.length)break;case su:case la:return e.return=e.return||e.value;case To:return"";case wo:return e.return=e.value+"{"+er(e.children,n)+"}";case sa:e.value=e.props.join(",")}return ft(r=er(e.children,n))?e.return=e.value+"{"+r+"}":""}function wu(e){var t=ua(e);return function(r,n,o,a){for(var i="",s=0;s<t;s++)i+=e[s](r,n,o,a)||"";return i}}function Eu(e){return function(t){t.root||(t=t.return)&&e(t)}}function Oo(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ru=function(t,r,n){for(var o=0,a=0;o=a,a=pt(),o===38&&a===12&&(r[n]=1),!Tr(a);)Ze();return Cr(t,Ke)},ju=function(t,r){var n=-1,o=44;do switch(Tr(o)){case 0:o===38&&pt()===12&&(r[n]=1),t[n]+=Ru(Ke-1,r,n);break;case 2:t[n]+=On(o);break;case 4:if(o===44){t[++n]=pt()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Rn(o)}while(o=Ze());return t},Su=function(t,r){return So(ju(jo(t),r))},Ao=new WeakMap,ku=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Ao.get(n))&&!o){Ao.set(t,!0);for(var a=[],i=Su(r,a),s=n.props,f=0,p=0;f<i.length;f++)for(var b=0;b<s.length;b++,p++)t.props[p]=a[f]?i[f].replace(/&\f/g,s[b]):s[b]+" "+i[f]}}},_u=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function $o(e,t){switch(du(e,t)){case 5103:return oe+"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 oe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return oe+e+En+e+Ue+e+e;case 6828:case 4268:return oe+e+Ue+e+e;case 6165:return oe+e+Ue+"flex-"+e+e;case 5187:return oe+e+ie(e,/(\w+).+(:[^]+)/,oe+"box-$1$2"+Ue+"flex-$1$2")+e;case 5443:return oe+e+Ue+"flex-item-"+ie(e,/flex-|-self/,"")+e;case 4675:return oe+e+Ue+"flex-line-pack"+ie(e,/align-content|flex-|-self/,"")+e;case 5548:return oe+e+Ue+ie(e,"shrink","negative")+e;case 5292:return oe+e+Ue+ie(e,"basis","preferred-size")+e;case 6060:return oe+"box-"+ie(e,"-grow","")+oe+e+Ue+ie(e,"grow","positive")+e;case 4554:return oe+ie(e,/([^-])(transform)/g,"$1"+oe+"$2")+e;case 6187:return ie(ie(ie(e,/(zoom-|grab)/,oe+"$1"),/(image-set)/,oe+"$1"),e,"")+e;case 5495:case 3959:return ie(e,/(image-set\([^]*)/,oe+"$1$`$1");case 4968:return ie(ie(e,/(.+:)(flex-)?(.*)/,oe+"box-pack:$3"+Ue+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+oe+e+e;case 4095:case 3583:case 4068:case 2532:return ie(e,/(.+)-inline(.+)/,oe+"$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(ft(e)-1-t>6)switch(qe(e,t+1)){case 109:if(qe(e,t+4)!==45)break;case 102:return ie(e,/(.+:)(.+)-([^]+)/,"$1"+oe+"$2-$3$1"+En+(qe(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ca(e,"stretch")?$o(ie(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qe(e,t+1)!==115)break;case 6444:switch(qe(e,ft(e)-3-(~ca(e,"!important")&&10))){case 107:return ie(e,":",":"+oe)+e;case 101:return ie(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+oe+(qe(e,14)===45?"inline-":"")+"box$3$1"+oe+"$2$3$1"+Ue+"$2box$3")+e}break;case 5936:switch(qe(e,t+11)){case 114:return oe+e+Ue+ie(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return oe+e+Ue+ie(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return oe+e+Ue+ie(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return oe+e+Ue+e+e}return e}var Ou=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case la:t.return=$o(t.value,t.length);break;case wo:return er([xr(t,{value:ie(t.value,"@","@"+oe)})],o);case sa:if(t.length)return pu(t.props,function(a){switch(fu(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return er([xr(t,{props:[ie(a,/:(read-\w+)/,":"+En+"$1")]})],o);case"::placeholder":return er([xr(t,{props:[ie(a,/:(plac\w+)/,":"+oe+"input-$1")]}),xr(t,{props:[ie(a,/:(plac\w+)/,":"+En+"$1")]}),xr(t,{props:[ie(a,/:(plac\w+)/,Ue+"input-$1")]})],o)}return""})}},Au=[Ou],$u=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(c){var T=c.getAttribute("data-emotion");T.indexOf(" ")!==-1&&(document.head.appendChild(c),c.setAttribute("data-s",""))})}var o=t.stylisPlugins||Au,a={},i,s=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(c){for(var T=c.getAttribute("data-emotion").split(" "),w=1;w<T.length;w++)a[T[w]]=!0;s.push(c)});var f,p=[ku,_u];{var b,m=[Tu,Eu(function(c){b.insert(c)})],g=wu(p.concat(o,m)),y=function(T){return er(xu(T),g)};f=function(T,w,j,_){b=j,y(T?T+"{"+w.styles+"}":w.styles),_&&(v.inserted[w.name]=!0)}}var v={key:r,sheet:new iu({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:f};return v.sheet.hydrate(s),v},Pu=!0;function Mu(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Po=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Pu===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Du=function(t,r,n){Po(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function Iu(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&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 Fu={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale: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},Bu=/[A-Z]|^ms/g,Vu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mo=function(t){return t.charCodeAt(1)===45},Do=function(t){return t!=null&&typeof t!="boolean"},fa=Oo(function(e){return Mo(e)?e:e.replace(Bu,"-$&").toLowerCase()}),Io=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Vu,function(n,o,a){return ht={name:o,styles:a,next:ht},o})}return Fu[t]!==1&&!Mo(t)&&typeof r=="number"&&r!==0?r+"px":r};function wr(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return ht={name:o.name,styles:o.styles,next:ht},o.name;var a=r;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)ht={name:i.name,styles:i.styles,next:ht},i=i.next;var s=a.styles+";";return s}return Lu(e,t,r)}case"function":{if(e!==void 0){var f=ht,p=r(e);return ht=f,wr(e,t,p)}break}}var b=r;if(t==null)return b;var m=t[b];return m!==void 0?m:b}function Lu(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=wr(e,t,r[o])+";";else for(var a in r){var i=r[a];if(typeof i!="object"){var s=i;t!=null&&t[s]!==void 0?n+=a+"{"+t[s]+"}":Do(s)&&(n+=fa(a)+":"+Io(a,s)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var f=0;f<i.length;f++)Do(i[f])&&(n+=fa(a)+":"+Io(a,i[f])+";");else{var p=wr(e,t,i);switch(a){case"animation":case"animationName":{n+=fa(a)+":"+p+";";break}default:n+=a+"{"+p+"}"}}}return n}var Fo=/label:\s*([^\s;{]+)\s*(;|$)/g,ht;function Bo(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";ht=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,o+=wr(r,t,a);else{var i=a;o+=i[0]}for(var s=1;s<e.length;s++)if(o+=wr(r,t,e[s]),n){var f=a;o+=f[s]}Fo.lastIndex=0;for(var p="",b;(b=Fo.exec(o))!==null;)p+="-"+b[1];var m=Iu(o)+p;return{name:m,styles:o,next:ht}}var qu=function(t){return t()},Nu=re.useInsertionEffect?re.useInsertionEffect:!1,zu=Nu||qu,Vo=re.createContext(typeof HTMLElement<"u"?$u({key:"css"}):null);Vo.Provider;var Uu=function(t){return k.forwardRef(function(r,n){var o=k.useContext(Vo);return t(r,o,n)})},Wu=re.createContext({}),Yu=/^((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|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|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)-.*))$/,Gu=Oo(function(e){return Yu.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ku=Gu,Ju=function(t){return t!=="theme"},Lo=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ku:Ju},qo=function(t,r,n){var o;if(r){var a=r.shouldForwardProp;o=t.__emotion_forwardProp&&a?function(i){return t.__emotion_forwardProp(i)&&a(i)}:a}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},Qu=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Po(r,n,o),zu(function(){return Du(r,n,o)}),null},Xu=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,a,i;r!==void 0&&(a=r.label,i=r.target);var s=qo(t,r,n),f=s||Lo(o),p=!f("as");return function(){var b=arguments,m=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&m.push("label:"+a+";"),b[0]==null||b[0].raw===void 0)m.push.apply(m,b);else{var g=b[0];m.push(g[0]);for(var y=b.length,v=1;v<y;v++)m.push(b[v],g[v])}var c=Uu(function(T,w,j){var _=p&&T.as||o,O="",C=[],I=T;if(T.theme==null){I={};for(var D in T)I[D]=T[D];I.theme=re.useContext(Wu)}typeof T.className=="string"?O=Mu(w.registered,C,T.className):T.className!=null&&(O=T.className+" ");var se=Bo(m.concat(C),w.registered,I);O+=w.key+"-"+se.name,i!==void 0&&(O+=" "+i);var ee=p&&s===void 0?Lo(_):f,u={};for(var $ in T)p&&$==="as"||ee($)&&(u[$]=T[$]);return u.className=O,j&&(u.ref=j),re.createElement(re.Fragment,null,re.createElement(Qu,{cache:w,serialized:se,isStringTag:typeof _=="string"}),re.createElement(_,u))});return c.displayName=a!==void 0?a:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",c.defaultProps=t.defaultProps,c.__emotion_real=c,c.__emotion_base=o,c.__emotion_styles=m,c.__emotion_forwardProp=s,Object.defineProperty(c,"toString",{value:function(){return"."+i}}),c.withComponent=function(T,w){var j=e(T,ia({},r,w,{shouldForwardProp:qo(c,w,!0)}));return j.apply(void 0,m)},c}},Zu=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],pa=Xu.bind(null);Zu.forEach(function(e){pa[e]=pa(e)});/**
74
+ * @mui/styled-engine v6.4.11
71
75
  *
72
76
  * @license MIT
73
77
  * This source code is licensed under the MIT license found in the
74
78
  * LICENSE file in the root directory of this source tree.
75
- */function oc(e,t){const n=ra(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const a=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
76
- `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),n(...r)}:n}const sc=ut(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:ns,StyledEngineProvider:rs,ThemeContext:zr,css:Ho,default:oc,internal_processStyles:(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},keyframes:Xu},Symbol.toStringTag,{value:"Module"}))),ic=ut(pl),lc=ut(Sl),uc=ut(Rl),cc=["values","unit","step"],dc=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>re({},n,{[r.key]:r.val}),{})};function as(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,a=Tt(e,cc),o=dc(t),s=Object.keys(o);function l(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n})`}function c(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-r/100}${n})`}function f(b,g){const v=s.indexOf(g);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n}) and (max-width:${(v!==-1&&typeof t[s[v]]=="number"?t[s[v]]:g)-r/100}${n})`}function h(b){return s.indexOf(b)+1<s.length?f(b,s[s.indexOf(b)+1]):l(b)}function m(b){const g=s.indexOf(b);return g===0?l(s[1]):g===s.length-1?c(s[g]):f(b,s[s.indexOf(b)+1]).replace("@media","@media not all and")}return re({keys:s,values:o,up:l,down:c,between:f,only:h,not:m,unit:n},a)}const fc={borderRadius:4},_t=process.env.NODE_ENV!=="production"?W.oneOfType([W.number,W.string,W.object,W.array]):{};function ur(e,t){return t?nt(e,t,{clone:!1}):e}const aa={xs:0,sm:600,md:900,lg:1200,xl:1536},os={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${aa[e]}px)`};function ct(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||os;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||os;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||aa).indexOf(l)!==-1){const c=o.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function pc(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,a)=>{const o=e.up(a);return r[o]={},r},{}))||{}}function hc(e,t){return e.reduce((n,r)=>{const a=n[r];return(!a||Object.keys(a).length===0)&&delete n[r],n},t)}function Nr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function Ur(e,t,n,r=n){let a;return typeof e=="function"?a=e(n):Array.isArray(e)?a=e[n]||r:a=Nr(e,n)||r,t&&(a=t(a,r,e)),a}function Ee(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:a}=e,o=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,f=Nr(c,r)||{};return ct(s,l,m=>{let b=Ur(f,a,m);return m===b&&typeof m=="string"&&(b=Ur(f,a,`${t}${m==="default"?"":Ct(m)}`,m)),n===!1?b:{[n]:b}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:_t}:{},o.filterProps=[t],o}function mc(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const bc={m:"margin",p:"padding"},vc={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ss={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},gc=mc(e=>{if(e.length>2)if(ss[e])e=ss[e];else return[e];const[t,n]=e.split(""),r=bc[t],a=vc[n]||"";return Array.isArray(a)?a.map(o=>r+o):[r+a]}),Wr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Yr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],yc=[...Wr,...Yr];function cr(e,t,n,r){var a;const o=(a=Nr(e,t,!1))!=null?a:n;return typeof o=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),o*s):Array.isArray(o)?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
77
- `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
78
- `))),o[s]):typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
79
- `)),()=>{})}function is(e){return cr(e,"spacing",8,"spacing")}function dr(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function xc(e,t){return n=>e.reduce((r,a)=>(r[a]=dr(t,n),r),{})}function Cc(e,t,n,r){if(t.indexOf(n)===-1)return null;const a=gc(n),o=xc(a,r),s=e[n];return ct(e,s,o)}function ls(e,t){const n=is(e.theme);return Object.keys(e).map(r=>Cc(e,t,r,n)).reduce(ur,{})}function ye(e){return ls(e,Wr)}ye.propTypes=process.env.NODE_ENV!=="production"?Wr.reduce((e,t)=>(e[t]=_t,e),{}):{},ye.filterProps=Wr;function xe(e){return ls(e,Yr)}xe.propTypes=process.env.NODE_ENV!=="production"?Yr.reduce((e,t)=>(e[t]=_t,e),{}):{},xe.filterProps=Yr,process.env.NODE_ENV!=="production"&&yc.reduce((e,t)=>(e[t]=_t,e),{});function Tc(e=8){if(e.mui)return e;const t=is({spacing:e}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function Kr(...e){const t=e.reduce((r,a)=>(a.filterProps.forEach(o=>{r[o]=a}),r),{}),n=r=>Object.keys(r).reduce((a,o)=>t[o]?ur(a,t[o](r)):a,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,a)=>Object.assign(r,a.propTypes),{}):{},n.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),n}function Xe(e){return typeof e!="number"?e:`${e}px solid`}function Ze(e,t){return Ee({prop:e,themeKey:"borders",transform:t})}const _c=Ze("border",Xe),Ec=Ze("borderTop",Xe),wc=Ze("borderRight",Xe),jc=Ze("borderBottom",Xe),Oc=Ze("borderLeft",Xe),Rc=Ze("borderColor"),Sc=Ze("borderTopColor"),kc=Ze("borderRightColor"),$c=Ze("borderBottomColor"),Mc=Ze("borderLeftColor"),Pc=Ze("outline",Xe),Ac=Ze("outlineColor"),Gr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=cr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:dr(t,r)});return ct(e,e.borderRadius,n)}return null};Gr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:_t}:{},Gr.filterProps=["borderRadius"],Kr(_c,Ec,wc,jc,Oc,Rc,Sc,kc,$c,Mc,Gr,Pc,Ac);const Jr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=cr(e.theme,"spacing",8,"gap"),n=r=>({gap:dr(t,r)});return ct(e,e.gap,n)}return null};Jr.propTypes=process.env.NODE_ENV!=="production"?{gap:_t}:{},Jr.filterProps=["gap"];const Xr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=cr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:dr(t,r)});return ct(e,e.columnGap,n)}return null};Xr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:_t}:{},Xr.filterProps=["columnGap"];const Zr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=cr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:dr(t,r)});return ct(e,e.rowGap,n)}return null};Zr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:_t}:{},Zr.filterProps=["rowGap"];const Dc=Ee({prop:"gridColumn"}),Ic=Ee({prop:"gridRow"}),Fc=Ee({prop:"gridAutoFlow"}),Lc=Ee({prop:"gridAutoColumns"}),Bc=Ee({prop:"gridAutoRows"}),Vc=Ee({prop:"gridTemplateColumns"}),qc=Ee({prop:"gridTemplateRows"}),zc=Ee({prop:"gridTemplateAreas"}),Nc=Ee({prop:"gridArea"});Kr(Jr,Xr,Zr,Dc,Ic,Fc,Lc,Bc,Vc,qc,zc,Nc);function Vt(e,t){return t==="grey"?t:e}const Uc=Ee({prop:"color",themeKey:"palette",transform:Vt}),Wc=Ee({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Vt}),Yc=Ee({prop:"backgroundColor",themeKey:"palette",transform:Vt});Kr(Uc,Wc,Yc);function Ge(e){return e<=1&&e!==0?`${e*100}%`:e}const Kc=Ee({prop:"width",transform:Ge}),oa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,a;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||aa[n];return o?((a=e.theme)==null||(a=a.breakpoints)==null?void 0:a.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ge(n)}};return ct(e,e.maxWidth,t)}return null};oa.filterProps=["maxWidth"];const Gc=Ee({prop:"minWidth",transform:Ge}),Jc=Ee({prop:"height",transform:Ge}),Xc=Ee({prop:"maxHeight",transform:Ge}),Zc=Ee({prop:"minHeight",transform:Ge});Ee({prop:"size",cssProperty:"width",transform:Ge}),Ee({prop:"size",cssProperty:"height",transform:Ge});const Qc=Ee({prop:"boxSizing"});Kr(Kc,oa,Gc,Jc,Xc,Zc,Qc);const fr={border:{themeKey:"borders",transform:Xe},borderTop:{themeKey:"borders",transform:Xe},borderRight:{themeKey:"borders",transform:Xe},borderBottom:{themeKey:"borders",transform:Xe},borderLeft:{themeKey:"borders",transform:Xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Gr},color:{themeKey:"palette",transform:Vt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Vt},backgroundColor:{themeKey:"palette",transform:Vt},p:{style:xe},pt:{style:xe},pr:{style:xe},pb:{style:xe},pl:{style:xe},px:{style:xe},py:{style:xe},padding:{style:xe},paddingTop:{style:xe},paddingRight:{style:xe},paddingBottom:{style:xe},paddingLeft:{style:xe},paddingX:{style:xe},paddingY:{style:xe},paddingInline:{style:xe},paddingInlineStart:{style:xe},paddingInlineEnd:{style:xe},paddingBlock:{style:xe},paddingBlockStart:{style:xe},paddingBlockEnd:{style:xe},m:{style:ye},mt:{style:ye},mr:{style:ye},mb:{style:ye},ml:{style:ye},mx:{style:ye},my:{style:ye},margin:{style:ye},marginTop:{style:ye},marginRight:{style:ye},marginBottom:{style:ye},marginLeft:{style:ye},marginX:{style:ye},marginY:{style:ye},marginInline:{style:ye},marginInlineStart:{style:ye},marginInlineEnd:{style:ye},marginBlock:{style:ye},marginBlockStart:{style:ye},marginBlockEnd:{style:ye},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Jr},rowGap:{style:Zr},columnGap:{style:Xr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ge},maxWidth:{style:oa},minWidth:{transform:Ge},height:{transform:Ge},maxHeight:{transform:Ge},minHeight:{transform:Ge},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Hc(...e){const t=e.reduce((r,a)=>r.concat(Object.keys(a)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function ed(e,t){return typeof e=="function"?e(t):e}function us(){function e(n,r,a,o){const s={[n]:r,theme:a},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:f,transform:h,style:m}=l;if(r==null)return null;if(f==="typography"&&r==="inherit")return{[n]:r};const b=Nr(a,f)||{};return m?m(s):ct(s,r,v=>{let u=Ur(b,h,v);return v===u&&typeof v=="string"&&(u=Ur(b,h,`${n}${v==="default"?"":Ct(v)}`,v)),c===!1?u:{[c]:u}})}function t(n){var r;const{sx:a,theme:o={}}=n||{};if(!a)return null;const s=(r=o.unstable_sxConfig)!=null?r:fr;function l(c){let f=c;if(typeof c=="function")f=c(o);else if(typeof c!="object")return c;if(!f)return null;const h=pc(o.breakpoints),m=Object.keys(h);let b=h;return Object.keys(f).forEach(g=>{const v=ed(f[g],o);if(v!=null)if(typeof v=="object")if(s[g])b=ur(b,e(g,v,o,s));else{const u=ct({theme:o},v,y=>({[g]:y}));Hc(u,v)?b[g]=t({sx:v,theme:o}):b=ur(b,u)}else b=ur(b,e(g,v,o,s))}),hc(m,b)}return Array.isArray(a)?a.map(l):l(a)}return t}const Qr=us();Qr.filterProps=["sx"];function cs(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const td=["breakpoints","palette","spacing","shape"];function ds(e={},...t){const{breakpoints:n={},palette:r={},spacing:a,shape:o={}}=e,s=Tt(e,td),l=as(n),c=Tc(a);let f=nt({breakpoints:l,direction:"ltr",components:{},palette:re({mode:"light"},r),spacing:c,shape:re({},fc,o)},s);return f.applyStyles=cs,f=t.reduce((h,m)=>nt(h,m),f),f.unstable_sxConfig=re({},fr,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(m){return Qr({sx:m,theme:this})},f}const rd=ut(Object.freeze(Object.defineProperty({__proto__:null,default:ds,private_createBreakpoints:as,unstable_applyStyles:cs},Symbol.toStringTag,{value:"Module"}))),nd=["sx"],ad=e=>{var t,n;const r={systemProps:{},otherProps:{}},a=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:fr;return Object.keys(e).forEach(o=>{a[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function od(e){const{sx:t}=e,n=Tt(e,nd),{systemProps:r,otherProps:a}=ad(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return xt(l)?re({},r,l):r}:o=re({},r,t),re({},a,{sx:o})}const sd=ut(Object.freeze(Object.defineProperty({__proto__:null,default:Qr,extendSxProp:od,unstable_createStyleFunctionSx:us,unstable_defaultSxConfig:fr},Symbol.toStringTag,{value:"Module"})));var qt=fe;Object.defineProperty(nr,"__esModule",{value:!0});var id=nr.default=Cd;nr.shouldForwardProp=Hr,nr.systemDefaultTheme=void 0;var Qe=qt(Oo()),sa=qt(su()),fs=bd(sc),ld=ic,ud=qt(lc),cd=qt(uc),dd=qt(rd),fd=qt(sd);const pd=["ownerState"],hd=["variants"],md=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ps(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(ps=function(r){return r?n:t})(e)}function bd(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=ps(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function vd(e){return Object.keys(e).length===0}function gd(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Hr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const yd=nr.systemDefaultTheme=(0,dd.default)(),hs=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function en({defaultTheme:e,theme:t,themeId:n}){return vd(t)?e:t[n]||t}function xd(e){return e?(t,n)=>n[e]:null}function tn(e,t){let{ownerState:n}=t,r=(0,sa.default)(t,pd);const a=typeof e=="function"?e((0,Qe.default)({ownerState:n},r)):e;if(Array.isArray(a))return a.flatMap(o=>tn(o,(0,Qe.default)({ownerState:n},r)));if(a&&typeof a=="object"&&Array.isArray(a.variants)){const{variants:o=[]}=a;let l=(0,sa.default)(a,hd);return o.forEach(c=>{let f=!0;typeof c.props=="function"?f=c.props((0,Qe.default)({ownerState:n},r,n)):Object.keys(c.props).forEach(h=>{(n==null?void 0:n[h])!==c.props[h]&&r[h]!==c.props[h]&&(f=!1)}),f&&(Array.isArray(l)||(l=[l]),l.push(typeof c.style=="function"?c.style((0,Qe.default)({ownerState:n},r,n)):c.style))}),l}return a}function Cd(e={}){const{themeId:t,defaultTheme:n=yd,rootShouldForwardProp:r=Hr,slotShouldForwardProp:a=Hr}=e,o=s=>(0,fd.default)((0,Qe.default)({},s,{theme:en((0,Qe.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,l={})=>{(0,fs.internal_processStyles)(s,x=>x.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:f,skipVariantsResolver:h,skipSx:m,overridesResolver:b=xd(hs(f))}=l,g=(0,sa.default)(l,md),v=h!==void 0?h:f&&f!=="Root"&&f!=="root"||!1,u=m||!1;let y;process.env.NODE_ENV!=="production"&&c&&(y=`${c}-${hs(f||"Root")}`);let w=Hr;f==="Root"||f==="root"?w=r:f?w=a:gd(s)&&(w=void 0);const j=(0,fs.default)(s,(0,Qe.default)({shouldForwardProp:w,label:y},g)),k=x=>typeof x=="function"&&x.__emotion_real!==x||(0,ld.isPlainObject)(x)?A=>tn(x,(0,Qe.default)({},A,{theme:en({theme:A.theme,defaultTheme:n,themeId:t})})):x,M=(x,...A)=>{let F=k(x);const be=A?A.map(k):[];c&&b&&be.push(te=>{const he=en((0,Qe.default)({},te,{defaultTheme:n,themeId:t}));if(!he.components||!he.components[c]||!he.components[c].styleOverrides)return null;const de=he.components[c].styleOverrides,se={};return Object.entries(de).forEach(([Be,Te])=>{se[Be]=tn(Te,(0,Qe.default)({},te,{theme:he}))}),b(te,se)}),c&&!v&&be.push(te=>{var he;const de=en((0,Qe.default)({},te,{defaultTheme:n,themeId:t})),se=de==null||(he=de.components)==null||(he=he[c])==null?void 0:he.variants;return tn({variants:se},(0,Qe.default)({},te,{theme:de}))}),u||be.push(o);const Ie=be.length-A.length;if(Array.isArray(x)&&Ie>0){const te=new Array(Ie).fill("");F=[...x,...te],F.raw=[...x.raw,...te]}const ee=j(F,...be);if(process.env.NODE_ENV!=="production"){let te;c&&(te=`${c}${(0,ud.default)(f||"")}`),te===void 0&&(te=`Styled(${(0,cd.default)(s)})`),ee.displayName=te}return s.muiName&&(ee.muiName=s.muiName),ee};return j.withConfig&&(M.withConfig=j.withConfig),M}}function Td(e,t){return re({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var we={};const _d=ut(_l),Ed=ut(eu);var ms=fe;Object.defineProperty(we,"__esModule",{value:!0}),we.alpha=Cs,we.blend=Id,we.colorChannel=void 0;var wd=we.darken=la;we.decomposeColor=He,we.emphasize=Ts;var bs=we.getContrastRatio=$d;we.getLuminance=rn,we.hexToRgb=gs,we.hslToRgb=xs;var jd=we.lighten=ua;we.private_safeAlpha=Md,we.private_safeColorChannel=void 0,we.private_safeDarken=Pd,we.private_safeEmphasize=Dd,we.private_safeLighten=Ad,we.recomposeColor=zt,we.rgbToHex=kd;var vs=ms(_d),Od=ms(Ed);function ia(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),(0,Od.default)(e,t,n)}function gs(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,a)=>a<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Rd(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function He(e){if(e.type)return e;if(e.charAt(0)==="#")return He(gs(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
80
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,vs.default)(9,e));let r=e.substring(t+1,e.length-1),a;if(n==="color"){if(r=r.split(" "),a=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(a)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${a}\` color space.
81
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,vs.default)(10,a))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:a}}const ys=e=>{const t=He(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};we.colorChannel=ys;const Sd=(e,t)=>{try{return ys(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};we.private_safeColorChannel=Sd;function zt(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((a,o)=>o<3?parseInt(a,10):a):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function kd(e){if(e.indexOf("#")===0)return e;const{values:t}=He(e);return`#${t.map((n,r)=>Rd(r===3?Math.round(255*n):n)).join("")}`}function xs(e){e=He(e);const{values:t}=e,n=t[0],r=t[1]/100,a=t[2]/100,o=r*Math.min(a,1-a),s=(f,h=(f+n/30)%12)=>a-o*Math.max(Math.min(h-3,9-h,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),zt({type:l,values:c})}function rn(e){e=He(e);let t=e.type==="hsl"||e.type==="hsla"?He(xs(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function $d(e,t){const n=rn(e),r=rn(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Cs(e,t){return e=He(e),t=ia(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,zt(e)}function Md(e,t,n){try{return Cs(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function la(e,t){if(e=He(e),t=ia(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return zt(e)}function Pd(e,t,n){try{return la(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function ua(e,t){if(e=He(e),t=ia(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return zt(e)}function Ad(e,t,n){try{return ua(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Ts(e,t=.15){return rn(e)>.5?la(e,t):ua(e,t)}function Dd(e,t,n){try{return Ts(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Id(e,t,n,r=1){const a=(c,f)=>Math.round((c**(1/r)*(1-n)+f**(1/r)*n)**r),o=He(e),s=He(t),l=[a(o.values[0],s.values[0]),a(o.values[1],s.values[1]),a(o.values[2],s.values[2])];return zt({type:"rgb",values:l})}const pr={black:"#000",white:"#fff"},Fd={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Nt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ut={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},hr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Wt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Yt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Kt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Ld=["mode","contrastThreshold","tonalOffset"],_s={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pr.white,default:pr.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},ca={text:{primary:pr.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pr.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Es(e,t,n,r){const a=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=jd(e.main,a):t==="dark"&&(e.dark=wd(e.main,o)))}function Bd(e="light"){return e==="dark"?{main:Wt[200],light:Wt[50],dark:Wt[400]}:{main:Wt[700],light:Wt[400],dark:Wt[800]}}function Vd(e="light"){return e==="dark"?{main:Nt[200],light:Nt[50],dark:Nt[400]}:{main:Nt[500],light:Nt[300],dark:Nt[700]}}function qd(e="light"){return e==="dark"?{main:Ut[500],light:Ut[300],dark:Ut[700]}:{main:Ut[700],light:Ut[400],dark:Ut[800]}}function zd(e="light"){return e==="dark"?{main:Yt[400],light:Yt[300],dark:Yt[700]}:{main:Yt[700],light:Yt[500],dark:Yt[900]}}function Nd(e="light"){return e==="dark"?{main:Kt[400],light:Kt[300],dark:Kt[700]}:{main:Kt[800],light:Kt[500],dark:Kt[900]}}function Ud(e="light"){return e==="dark"?{main:hr[400],light:hr[300],dark:hr[700]}:{main:"#ed6c02",light:hr[500],dark:hr[900]}}function Wd(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,a=Tt(e,Ld),o=e.primary||Bd(t),s=e.secondary||Vd(t),l=e.error||qd(t),c=e.info||zd(t),f=e.success||Nd(t),h=e.warning||Ud(t);function m(u){const y=bs(u,ca.text.primary)>=n?ca.text.primary:_s.text.primary;if(process.env.NODE_ENV!=="production"){const w=bs(u,y);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${y} on ${u}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
82
- `))}return y}const b=({color:u,name:y,mainShade:w=500,lightShade:j=300,darkShade:k=700})=>{if(u=re({},u),!u.main&&u[w]&&(u.main=u[w]),!u.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
83
- The color object needs to have a \`main\` property or a \`${w}\` property.`:rr(11,y?` (${y})`:"",w));if(typeof u.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
84
- \`color.main\` should be a string, but \`${JSON.stringify(u.main)}\` was provided instead.
79
+ */function Hu(e,t){const r=pa(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
80
+ `)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function ed(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const No=[];function zo(e){return No[0]=e,Bo(No)}const td=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function rd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,a=td(t),i=Object.keys(a);function s(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r})`}function f(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-n/100}${r})`}function p(g,y){const v=i.indexOf(y);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r}) and (max-width:${(v!==-1&&typeof t[i[v]]=="number"?t[i[v]]:y)-n/100}${r})`}function b(g){return i.indexOf(g)+1<i.length?p(g,i[i.indexOf(g)+1]):s(g)}function m(g){const y=i.indexOf(g);return y===0?s(i[1]):y===i.length-1?f(i[y]):p(g,i[i.indexOf(g)+1]).replace("@media","@media not all and")}return{keys:i,values:a,up:s,down:f,between:p,only:b,not:m,unit:r,...o}}const nd={borderRadius:4};function Uo(e=8,t=aa({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const i=t(a);return typeof i=="number"?`${i}px`:i}).join(" "));return r.mui=!0,r}function ad(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function Wo(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:a={},...i}=e,s=rd(r),f=Uo(o);let p=Qe({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:f,shape:{...nd,...a}},i);return p=hc(p),p.applyStyles=ad,p=t.reduce((b,m)=>Qe(b,m),p),p.unstable_sxConfig={...wn,...i==null?void 0:i.unstable_sxConfig},p.unstable_sx=function(m){return Xt({sx:m,theme:this})},p}function Yo(e){const{variants:t,...r}=e,n={variants:t,style:zo(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=zo(o.style))}),n}const od=Wo();function ha(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function id(e){return e?(t,r)=>r[e]:null}function sd(e,t,r){e.theme=dd(e.theme)?r:e.theme[t]||e.theme}function $n(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>$n(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...a}=r;n=a}return Go(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Go(e,t,r=[]){var o;let n;e:for(let a=0;a<t.length;a+=1){const i=t[a];if(typeof i.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!i.props(n))continue}else for(const s in i.props)if(e[s]!==i.props[s]&&((o=e.ownerState)==null?void 0:o[s])!==i.props[s])continue e;typeof i.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(i.style(n))):r.push(i.style)}return r}function ld(e={}){const{themeId:t,defaultTheme:r=od,rootShouldForwardProp:n=ha,slotShouldForwardProp:o=ha}=e;function a(s){sd(s,t,r)}return(s,f={})=>{ed(s,C=>C.filter(I=>I!==Xt));const{name:p,slot:b,skipVariantsResolver:m,skipSx:g,overridesResolver:y=id(Ko(b)),...v}=f,c=m!==void 0?m:b&&b!=="Root"&&b!=="root"||!1,T=g||!1;let w=ha;b==="Root"||b==="root"?w=n:b?w=o:fd(s)&&(w=void 0);const j=Hu(s,{shouldForwardProp:w,label:ud(p,b),...v}),_=C=>{if(typeof C=="function"&&C.__emotion_real!==C)return function(D){return $n(D,C)};if(xt(C)){const I=Yo(C);return I.variants?function(se){return $n(se,I)}:I.style}return C},O=(...C)=>{const I=[],D=C.map(_),se=[];if(I.push(a),p&&y&&se.push(function(V){var ve,De;const te=(De=(ve=V.theme.components)==null?void 0:ve[p])==null?void 0:De.styleOverrides;if(!te)return null;const ge={};for(const Ie in te)ge[Ie]=$n(V,te[Ie]);return y(V,ge)}),p&&!c&&se.push(function(V){var ge,ve;const F=V.theme,te=(ve=(ge=F==null?void 0:F.components)==null?void 0:ge[p])==null?void 0:ve.variants;return te?Go(V,te):null}),T||se.push(Xt),Array.isArray(D[0])){const $=D.shift(),V=new Array(I.length).fill(""),F=new Array(se.length).fill("");let te;te=[...V,...$,...F],te.raw=[...V,...$.raw,...F],I.unshift(te)}const ee=[...I,...D,...se],u=j(...ee);return s.muiName&&(u.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(u.displayName=cd(p,b,s)),u};return j.withConfig&&(O.withConfig=j.withConfig),O}}function cd(e,t,r){return e?`${e}${$t(t||"")}`:`Styled(${Yl(r)})`}function ud(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Ko(t||"Root")}`),r}function dd(e){for(const t in e)return!1;return!0}function fd(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ko(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ma(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),cc(e,t,r)}function pd(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Mt(e){if(e.type)return e;if(e.charAt(0)==="#")return Mt(pd(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
81
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:At(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
82
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:At(10,o))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:o}}const hd=e=>{const t=Mt(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Er=(e,t)=>{try{return hd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Pn(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,a)=>a<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Jo(e){e=Mt(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,a=n*Math.min(o,1-o),i=(p,b=(p+r/30)%12)=>o-a*Math.max(Math.min(b-3,9-b,1),-1);let s="rgb";const f=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(s+="a",f.push(t[3])),Pn({type:s,values:f})}function ba(e){e=Mt(e);let t=e.type==="hsl"||e.type==="hsla"?Mt(Jo(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Qo(e,t){const r=ba(e),n=ba(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function md(e,t){return e=Mt(e),t=ma(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Pn(e)}function Mn(e,t,r){try{return md(e,t)}catch{return e}}function ga(e,t){if(e=Mt(e),t=ma(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Pn(e)}function me(e,t,r){try{return ga(e,t)}catch{return e}}function va(e,t){if(e=Mt(e),t=ma(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Pn(e)}function be(e,t,r){try{return va(e,t)}catch{return e}}function bd(e,t=.15){return ba(e)>.5?ga(e,t):va(e,t)}function Dn(e,t,r){try{return bd(e,t)}catch{return e}}const gd=re.createContext(void 0);process.env.NODE_ENV!=="production"&&(ne.node,ne.object);function vd(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?ra(o.defaultProps,n):!o.styleOverrides&&!o.variants?ra(o,n):n}function yd({props:e,name:t}){const r=re.useContext(gd);return vd({props:e,name:t,theme:{components:r}})}const Xo={theme:void 0};function xd(e){let t,r;return function(o){let a=t;return(a===void 0||o.theme!==r)&&(Xo.theme=o.theme,a=Yo(e(Xo)),t=a,r=o.theme),a}}function Cd(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const Zo=(e,t,r,n=[])=>{let o=e;t.forEach((a,i)=>{i===t.length-1?Array.isArray(o)?o[Number(a)]=r:o&&typeof o=="object"&&(o[a]=r):o&&typeof o=="object"&&(o[a]||(o[a]=n.includes(a)?[]:{}),o=o[a])})},Td=(e,t,r)=>{function n(o,a=[],i=[]){Object.entries(o).forEach(([s,f])=>{(!r||r&&!r([...a,s]))&&f!=null&&(typeof f=="object"&&Object.keys(f).length>0?n(f,[...a,s],Array.isArray(f)?[...i,s]:i):t([...a,s],f,i))})}n(e)},wd=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function ya(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},a={},i={};return Td(e,(s,f,p)=>{if((typeof f=="string"||typeof f=="number")&&(!n||!n(s,f))){const b=`--${r?`${r}-`:""}${s.join("-")}`,m=wd(s,f);Object.assign(o,{[b]:m}),Zo(a,s,`var(${b})`,p),Zo(i,s,`var(${b}, ${m})`,p)}},s=>s[0]==="vars"),{css:o,vars:a,varsWithDefaults:i}}function Ed(e,t={}){const{getSelector:r=T,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:a={},components:i,defaultColorScheme:s="light",...f}=e,{vars:p,css:b,varsWithDefaults:m}=ya(f,t);let g=m;const y={},{[s]:v,...c}=a;if(Object.entries(c||{}).forEach(([_,O])=>{const{vars:C,css:I,varsWithDefaults:D}=ya(O,t);g=Qe(g,D),y[_]={css:I,vars:C}}),v){const{css:_,vars:O,varsWithDefaults:C}=ya(v,t);g=Qe(g,C),y[s]={css:_,vars:O}}function T(_,O){var I,D;let C=o;if(o==="class"&&(C=".%s"),o==="data"&&(C="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(C=`[${o}="%s"]`),_){if(C==="media")return e.defaultColorScheme===_?":root":{[`@media (prefers-color-scheme: ${((D=(I=a[_])==null?void 0:I.palette)==null?void 0:D.mode)||_})`]:{":root":O}};if(C)return e.defaultColorScheme===_?`:root, ${C.replace("%s",String(_))}`:C.replace("%s",String(_))}return":root"}return{vars:g,generateThemeVars:()=>{let _={...p};return Object.entries(y).forEach(([,{vars:O}])=>{_=Qe(_,O)}),_},generateStyleSheets:()=>{var se,ee;const _=[],O=e.defaultColorScheme||"light";function C(u,$){Object.keys($).length&&_.push(typeof u=="string"?{[u]:{...$}}:u)}C(r(void 0,{...b}),b);const{[O]:I,...D}=y;if(I){const{css:u}=I,$=(ee=(se=a[O])==null?void 0:se.palette)==null?void 0:ee.mode,V=!n&&$?{colorScheme:$,...u}:{...u};C(r(O,{...V}),V)}return Object.entries(D).forEach(([u,{css:$}])=>{var te,ge;const V=(ge=(te=a[u])==null?void 0:te.palette)==null?void 0:ge.mode,F=!n&&V?{colorScheme:V,...$}:{...$};C(r(u,{...F}),F)}),_}}}function Rd(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Rr={black:"#000",white:"#fff"},jd={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},tr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},rr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},jr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},nr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ar={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},or={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Ho(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Rr.white,default:Rr.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Sd=Ho();function ei(){return{text:{primary:Rr.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Rr.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ti=ei();function ri(e,t,r,n){const o=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=va(e.main,o):t==="dark"&&(e.dark=ga(e.main,a)))}function kd(e="light"){return e==="dark"?{main:nr[200],light:nr[50],dark:nr[400]}:{main:nr[700],light:nr[400],dark:nr[800]}}function _d(e="light"){return e==="dark"?{main:tr[200],light:tr[50],dark:tr[400]}:{main:tr[500],light:tr[300],dark:tr[700]}}function Od(e="light"){return e==="dark"?{main:rr[500],light:rr[300],dark:rr[700]}:{main:rr[700],light:rr[400],dark:rr[800]}}function Ad(e="light"){return e==="dark"?{main:ar[400],light:ar[300],dark:ar[700]}:{main:ar[700],light:ar[500],dark:ar[900]}}function $d(e="light"){return e==="dark"?{main:or[400],light:or[300],dark:or[700]}:{main:or[800],light:or[500],dark:or[900]}}function Pd(e="light"){return e==="dark"?{main:jr[400],light:jr[300],dark:jr[700]}:{main:"#ed6c02",light:jr[500],dark:jr[900]}}function xa(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,a=e.primary||kd(t),i=e.secondary||_d(t),s=e.error||Od(t),f=e.info||Ad(t),p=e.success||$d(t),b=e.warning||Pd(t);function m(c){const T=Qo(c,ti.text.primary)>=r?ti.text.primary:Sd.text.primary;if(process.env.NODE_ENV!=="production"){const w=Qo(c,T);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${T} on ${c}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
83
+ `))}return T}const g=({color:c,name:T,mainShade:w=500,lightShade:j=300,darkShade:_=700})=>{if(c={...c},!c.main&&c[w]&&(c.main=c[w]),!c.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
84
+ The color object needs to have a \`main\` property or a \`${w}\` property.`:At(11,T?` (${T})`:"",w));if(typeof c.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
85
+ \`color.main\` should be a string, but \`${JSON.stringify(c.main)}\` was provided instead.
85
86
 
86
87
  Did you intend to use one of the following approaches?
87
88
 
@@ -93,7 +94,15 @@ const theme1 = createTheme({ palette: {
93
94
 
94
95
  const theme2 = createTheme({ palette: {
95
96
  primary: { main: green[500] },
96
- } });`:rr(12,y?` (${y})`:"",JSON.stringify(u.main)));return Es(u,"light",j,r),Es(u,"dark",k,r),u.contrastText||(u.contrastText=m(u.main)),u},g={dark:ca,light:_s};return process.env.NODE_ENV!=="production"&&(g[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),nt(re({common:re({},pr),mode:t,primary:b({color:o,name:"primary"}),secondary:b({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:l,name:"error"}),warning:b({color:h,name:"warning"}),info:b({color:c,name:"info"}),success:b({color:f,name:"success"}),grey:Fd,contrastThreshold:n,getContrastText:m,augmentColor:b,tonalOffset:r},g[t]),a)}const Yd=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Kd(e){return Math.round(e*1e5)/1e5}const ws={textTransform:"uppercase"},js='"Roboto", "Helvetica", "Arial", sans-serif';function Gd(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=js,fontSize:a=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:f=16,allVariants:h,pxToRem:m}=n,b=Tt(n,Yd);process.env.NODE_ENV!=="production"&&(typeof a!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const g=a/14,v=m||(w=>`${w/f*g}rem`),u=(w,j,k,M,x)=>re({fontFamily:r,fontWeight:w,fontSize:v(j),lineHeight:k},r===js?{letterSpacing:`${Kd(M/j)}em`}:{},x,h),y={h1:u(o,96,1.167,-1.5),h2:u(o,60,1.2,-.5),h3:u(s,48,1.167,0),h4:u(s,34,1.235,.25),h5:u(s,24,1.334,0),h6:u(l,20,1.6,.15),subtitle1:u(s,16,1.75,.15),subtitle2:u(l,14,1.57,.1),body1:u(s,16,1.5,.15),body2:u(s,14,1.43,.15),button:u(l,14,1.75,.4,ws),caption:u(s,12,1.66,.4),overline:u(s,12,2.66,1,ws),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return nt(re({htmlFontSize:f,pxToRem:v,fontFamily:r,fontSize:a,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},y),b,{clone:!1})}const Jd=.2,Xd=.14,Zd=.12;function pe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Jd})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Xd})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Zd})`].join(",")}const Qd=["none",pe(0,2,1,-1,0,1,1,0,0,1,3,0),pe(0,3,1,-2,0,2,2,0,0,1,5,0),pe(0,3,3,-2,0,3,4,0,0,1,8,0),pe(0,2,4,-1,0,4,5,0,0,1,10,0),pe(0,3,5,-1,0,5,8,0,0,1,14,0),pe(0,3,5,-1,0,6,10,0,0,1,18,0),pe(0,4,5,-2,0,7,10,1,0,2,16,1),pe(0,5,5,-3,0,8,10,1,0,3,14,2),pe(0,5,6,-3,0,9,12,1,0,3,16,2),pe(0,6,6,-3,0,10,14,1,0,4,18,3),pe(0,6,7,-4,0,11,15,1,0,4,20,3),pe(0,7,8,-4,0,12,17,2,0,5,22,4),pe(0,7,8,-4,0,13,19,2,0,5,24,4),pe(0,7,9,-4,0,14,21,2,0,5,26,4),pe(0,8,9,-5,0,15,22,2,0,6,28,5),pe(0,8,10,-5,0,16,24,2,0,6,30,5),pe(0,8,11,-5,0,17,26,2,0,6,32,5),pe(0,9,11,-5,0,18,28,2,0,7,34,6),pe(0,9,12,-6,0,19,29,2,0,7,36,6),pe(0,10,13,-6,0,20,31,3,0,8,38,7),pe(0,10,13,-6,0,21,33,3,0,8,40,7),pe(0,10,14,-6,0,22,35,3,0,8,42,7),pe(0,11,14,-7,0,23,36,3,0,9,44,8),pe(0,11,15,-7,0,24,38,3,0,9,46,8)],Hd=["duration","easing","delay"],ef={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},tf={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Os(e){return`${Math.round(e)}ms`}function rf(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function nf(e){const t=re({},ef,e.easing),n=re({},tf,e.duration);return re({getAutoHeightDuration:rf,create:(a=["all"],o={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=o,f=Tt(o,Hd);if(process.env.NODE_ENV!=="production"){const h=b=>typeof b=="string",m=b=>!isNaN(parseFloat(b));!h(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(s)&&!h(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),h(l)||console.error('MUI: Argument "easing" must be a string.'),!m(c)&&!h(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
97
- `)),Object.keys(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(h=>`${h} ${typeof s=="string"?s:Os(s)} ${l} ${typeof c=="string"?c:Os(c)}`).join(",")}},e,{easing:t,duration:n})}const af={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},of=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function sf(e={},...t){const{mixins:n={},palette:r={},transitions:a={},typography:o={}}=e,s=Tt(e,of);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":rr(18));const l=Wd(r),c=ds(e);let f=nt(c,{mixins:Td(c.breakpoints,n),palette:l,shadows:Qd.slice(),typography:Gd(l,o),transitions:nf(a),zIndex:re({},af)});if(f=nt(f,s),f=t.reduce((h,m)=>nt(h,m),f),process.env.NODE_ENV!=="production"){const h=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(b,g)=>{let v;for(v in b){const u=b[v];if(h.indexOf(v)!==-1&&Object.keys(u).length>0){if(process.env.NODE_ENV!=="production"){const y=zn("",v);console.error([`MUI: The \`${g}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(b,null,2),"",`Instead, you need to use the '&.${y}' syntax:`,JSON.stringify({root:{[`&.${y}`]:u}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
98
- `))}b[v]={}}}};Object.keys(f.components).forEach(b=>{const g=f.components[b].styleOverrides;g&&b.indexOf("Mui")===0&&m(g,b)})}return f.unstable_sxConfig=re({},fr,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(m){return Qr({sx:m,theme:this})},f}const lf=sf(),uf="$$material";function cf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const df=id({themeId:uf,defaultTheme:lf,rootShouldForwardProp:e=>cf(e)&&e!=="classes"});function ff(e){return zn("MuiSvgIcon",e)}Ql("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const pf=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],hf=e=>{const{color:t,fontSize:n,classes:r}=e,a={root:["root",t!=="inherit"&&`color${Ct(t)}`,`fontSize${Ct(n)}`]};return Xl(a,ff,r)},mf=df("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ct(n.color)}`],t[`fontSize${Ct(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,a,o,s,l,c,f,h,m,b,g,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(a=e.transitions)==null||(a=a.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((f=e.typography)==null||(h=f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}[t.fontSize],color:(m=(b=(e.vars||e).palette)==null||(b=b[t.color])==null?void 0:b.main)!=null?m:{action:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),nn=q.forwardRef(function(t,n){const r=ou({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:m,viewBox:b="0 0 24 24"}=r,g=Tt(r,pf),v=q.isValidElement(a)&&a.type==="svg",u=re({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:b,hasSvgAsChild:v}),y={};h||(y.viewBox=b);const w=hf(u);return i.jsxs(mf,re({as:l,className:tu(w.root,o),focusable:"false",color:f,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n},y,g,v&&a.props,{ownerState:u,children:[v?a.props.children:a,m?i.jsx("title",{children:m}):null]}))});process.env.NODE_ENV!=="production"&&(nn.propTypes={children:W.node,classes:W.object,className:W.string,color:W.oneOfType([W.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),W.string]),component:W.elementType,fontSize:W.oneOfType([W.oneOf(["inherit","large","medium","small"]),W.string]),htmlColor:W.string,inheritViewBox:W.bool,shapeRendering:W.string,sx:W.oneOfType([W.arrayOf(W.oneOfType([W.func,W.object,W.bool])),W.func,W.object]),titleAccess:W.string,viewBox:W.string}),nn.muiName="SvgIcon";function bf(e,t){function n(r,a){return i.jsx(nn,re({"data-testid":`${t}Icon`,ref:a},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=nn.muiName,q.memo(q.forwardRef(n))}const vf=ut(Object.freeze(Object.defineProperty({__proto__:null,capitalize:Ct,createChainedFunction:kl,createSvgIcon:bf,debounce:$l,deprecatedPropType:Ml,isMuiElement:Pl,ownerDocument:go,ownerWindow:Al,requirePropFactory:Dl,setRef:yo,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
99
- `)),Eo.configure(e)}},unstable_useEnhancedEffect:xo,unstable_useId:Fl,unsupportedProp:Ll,useControlled:Bl,useEventCallback:Vl,useForkRef:ql,useIsFocusVisible:Jl},Symbol.toStringTag,{value:"Module"})));var Rs;function Ce(){return Rs||(Rs=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=vf}(On)),On}var gf=fe;Object.defineProperty(jn,"__esModule",{value:!0});var Ss=jn.default=void 0,yf=gf(Ce()),xf=i;Ss=jn.default=(0,yf.default)((0,xf.jsx)("path",{d:"M15 1H4c-1.1 0-2 .9-2 2v13c0 .55.45 1 1 1s1-.45 1-1V4c0-.55.45-1 1-1h10c.55 0 1-.45 1-1s-.45-1-1-1m.59 4.59 4.83 4.83c.37.37.58.88.58 1.41V21c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h6.17c.53 0 1.04.21 1.42.59M15 12h4.5L14 6.5V11c0 .55.45 1 1 1"}),"FileCopyRounded");var da={},Cf=fe;Object.defineProperty(da,"__esModule",{value:!0});var ks=da.default=void 0,Tf=Cf(Ce()),_f=i;ks=da.default=(0,Tf.default)((0,_f.jsx)("path",{d:"M6.56 7.98C6.1 7.52 5.31 7.6 5 8.17c-.28.51-.5 1.03-.67 1.58-.19.63.31 1.25.96 1.25h.01c.43 0 .82-.28.94-.7.12-.4.28-.79.48-1.17.22-.37.15-.84-.16-1.15M5.31 13h-.02c-.65 0-1.15.62-.96 1.25.16.54.38 1.07.66 1.58.31.57 1.11.66 1.57.2.3-.31.38-.77.17-1.15-.2-.37-.36-.76-.48-1.16-.12-.44-.51-.72-.94-.72m2.85 6.02c.51.28 1.04.5 1.59.66.62.18 1.24-.32 1.24-.96v-.03c0-.43-.28-.82-.7-.94-.4-.12-.78-.28-1.15-.48-.38-.21-.86-.14-1.16.17l-.03.03c-.45.45-.36 1.24.21 1.55M13 4.07v-.66c0-.89-1.08-1.34-1.71-.71L9.17 4.83c-.4.4-.4 1.04 0 1.43l2.13 2.08c.63.62 1.7.17 1.7-.72V6.09c2.84.48 5 2.94 5 5.91 0 2.73-1.82 5.02-4.32 5.75-.41.12-.68.51-.68.94v.02c0 .65.61 1.14 1.23.96C17.57 18.71 20 15.64 20 12c0-4.08-3.05-7.44-7-7.93"}),"RotateLeftRounded");var fa={},Ef=fe;Object.defineProperty(fa,"__esModule",{value:!0});var $s=fa.default=void 0,wf=Ef(Ce()),jf=i;$s=fa.default=(0,wf.default)((0,jf.jsx)("path",{d:"M17.59 3.59c-.38-.38-.89-.59-1.42-.59H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.83c0-.53-.21-1.04-.59-1.41zM12 19c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2"}),"SaveRounded");var pa={},Of=fe;Object.defineProperty(pa,"__esModule",{value:!0});var Ms=pa.default=void 0,Rf=Of(Ce()),Sf=i;Ms=pa.default=(0,Rf.default)((0,Sf.jsx)("path",{d:"M18 2h-7.17c-.53 0-1.04.21-1.42.59L4.59 7.41C4.21 7.79 4 8.3 4 8.83V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-6.35 14.65-2.79-2.79c-.32-.32-.1-.86.35-.86H11v-2.99c0-.55.44-.99.99-1 .56-.01 1.01.44 1.01 1V13h1.79c.45 0 .67.54.35.85l-2.79 2.79c-.19.2-.51.2-.7.01"}),"SimCardDownloadRounded");const Ps=(e,t)=>{if(!e)return null;if(e.uuid===t)return e;const n=e.children||[];for(let r=0;r<n.length;r+=1){const a=n[r],o=Ps(a,t);if(o)return o}return null},Gt=(e,t)=>{var o,s,l,c,f;if(!e)return null;if(!t)return e;if(((o=e.attributes)==null?void 0:o.treePath)===t)return((s=e.attributes)==null?void 0:s.tree)||null;let n=null;const r=(l=e.attributes)==null?void 0:l.tree,a=(c=e.children)==null?void 0:c.length;if(r&&(n=Gt((f=e.attributes)==null?void 0:f.tree,t)),a){const{children:h}=e;for(let m=0;m<h.length;m+=1){const b=h[m];if(n!==null)return n;n=Gt(b,t)}}return n},an=(e,t,n)=>{const r=Gt(e,t);return Ps(r,n)},kf=(e,t)=>{if(!e)return null;const{attributes:n}=t,r=n.isDecision;return Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!1}}),r?(Object.defineProperty(e,"children",{value:[{...t,attributes:{...n,isLeaf:!1}}]}),null):(Object.defineProperty(e,"children",{value:[{...t,attributes:{...n,isLeaf:!e.children.length}}]}),null)},$f=({tree:e,path:t,uuid:n,child:r})=>{var c;const{attributes:a,children:o}=r;if(!e)return o.length?{...r}:{...r,attributes:{...a,isLeaf:!0,isRoot:!0}};const s=structuredClone(e),l=an(s,t,n);return kf(l,{...r,...!a.isDecision&&{children:[...((c=an(e,t,n))==null?void 0:c.children)||[]]}}),s},As=(e,t,n=null)=>{if(!e)return null;if(e.uuid===t)return n;const r=e.children||[];for(let a=0;a<r.length;a+=1){const o=r[a],s=As(o,t,e);if(s!==null)return s}return null},Mf=(e,t)=>!e||!t?null:e.attributes.isDecision||t.attributes.isDecision?(Object.defineProperty(e,"children",{value:[...e.children.filter(n=>n.uuid!==t.uuid)]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!e.children.length}}),null):(Object.defineProperty(e,"children",{value:[...e.children.filter(n=>n.uuid!==t.uuid),...t.children]}),Object.defineProperty(e,"attributes",{value:{...e.attributes,isLeaf:!t.children.length}}),null),Pf=(e,t,n)=>{const r=Gt(e,t);return As(r,n)},Af=({tree:e,path:t,uuid:n})=>{const r=structuredClone(e),a=an(r,t,n),o=Pf(r,t,n);return Mf(o,a),r},Df=(e,t)=>{if(!e)return null;const n=t.attributes.isDecision,r=e.attributes.isDecision,a=e.attributes.depth===0,o={value:t.uuid},s=r||n,l=s?{value:[...t.children]}:{value:[...e.children]},c=s?{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!t.children.length||!n}}:{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!e.children.length}};return Object.defineProperties(e,{attributes:c,children:l,uuid:o}),null},If=({tree:e,path:t,uuid:n,children:r})=>{const a=structuredClone(e),o=an(a,t,n);return Df(o,r),a},Ff=(e,t)=>{if(!e)return[];const n=[],r=a=>{var o,s;if((o=a.attributes)!=null&&o.name&&n.push((s=a==null?void 0:a.attributes)==null?void 0:s.name),(a==null?void 0:a.uuid)!==t&&a.children.length){const{children:l}=a;for(let c=0;c<l.length;c+=1)r(l[c])}};return r(e),[...new Set(n)]},it={appendTreeCard:"appendTreeCard",deleteTreeCard:"deleteTreeCard",replaceTreeCard:"replaceTreeCard",resetTree:"resetTree",setTree:"setTree"},Lf=(e,t,n)=>({children:n,path:e,type:it.appendTreeCard,uuid:t}),Bf=(e,t,n)=>({children:n,path:e,type:it.replaceTreeCard,uuid:t}),Vf=(e,t)=>({path:e,type:it.deleteTreeCard,uuid:t}),Ds=()=>({type:it.resetTree}),ha=e=>({tree:e,type:it.setTree}),qf=(e,t)=>{switch(t.type){case it.appendTreeCard:{const{uuid:n,path:r,children:a}=t;return $f({child:a,path:r,tree:e,uuid:n})}case it.deleteTreeCard:{const{path:n,uuid:r}=t;return Af({path:n,tree:e,uuid:r})}case it.replaceTreeCard:{const{uuid:n,path:r,children:a}=t;return If({children:a,path:r,tree:e,uuid:n})}case it.resetTree:return null;case it.setTree:return t.tree;default:throw new Error}},zf=()=>{const{backendConfig:e}=Re(),{endpoints:t}=e||{},{workflow:n=""}=t||{};return Dt.useMutation({mutationFn:async r=>{const{data:a}=await It.patch(n,r);return a},mutationKey:["patchWorkflow"]})},Nf=()=>{const{backendConfig:e}=Re(),{endpoints:t}=e||{},{workflow:n=""}=t||{};return Dt.useMutation({mutationFn:async r=>{const{data:a}=await It.post(n,r);return a},mutationKey:["postWorkflow"]})},Uf=()=>{const{t:e}=Pe.useTranslation(["snackMessage"]),{openSnackbar:t}=p.useSnackbar(),{setCurrentTree:n,currentTree:r,tree:a,dispatchTree:o}=Re(),[s,l]=_.useState(!1),{version:c}=Re(),{mutate:f}=Nf(),{mutate:h}=zf(),m=j=>JSON.stringify(j,null,2),b=j=>`data:text/json;charset=utf-8,${encodeURIComponent(m(j))}`,g=j=>()=>{navigator.clipboard.writeText(m(j)).then(),t({message:e("success.copyToClipboard",{ns:"snackMessage"})})},v=()=>{l(!1)};return{copyToClipboard:g,formatJSON:m,getDownloadLink:b,handleClose:v,handleOpen:()=>{l(!0)},handleResetTree:()=>{o(Ds()),v()},handleSubmit:()=>{const{name:j,id:k}=r;if(!j){n(M=>({...M,errorName:"Champs Requis"}));return}if(a){if(k){h({id:k,label:j,version:c,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}});return}f({label:j,version:c,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}})}},openModal:s}},Wf=({downloadedFileName:e="export",value:t})=>{const{t:n}=Pe.useTranslation(),{getDownloadLink:r,handleSubmit:a,handleClose:o,handleOpen:s,handleResetTree:l,copyToClipboard:c,openModal:f}=Uf(),{currentTree:h,backendConfig:m,tree:b}=Re(),{id:g}=h;return i.jsxs(p.Stack,{direction:"row",spacing:1,justifyContent:"center",children:[i.jsx(p.Tooltip,{title:n("resetTree",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{disabled:!b,onClick:s,color:"warning",children:i.jsx(ks,{})})})}),i.jsx(p.Divider,{orientation:"vertical",flexItem:!0}),i.jsx(p.Tooltip,{title:n("copyToClipboard",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{href:"",download:`${e}.json`,disabled:!t,onClick:c(t),children:i.jsx(Ss,{})})})}),i.jsx(p.Tooltip,{title:n("downloadJSONFile",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{href:r(t),download:`${e}.json`,disabled:!t,children:i.jsx(Ms,{})})})}),i.jsx(p.Tooltip,{title:g?n("update",{ns:"button"}):n("save",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(p.Box,{children:i.jsx(p.IconButton,{onClick:a,disabled:!t||!(m!=null&&m.baseUrl),children:i.jsx($s,{})})})}),i.jsxs(p.Dialog,{maxWidth:"xs",fullWidth:!0,open:f,onClose:o,children:[i.jsx(p.DialogTitle,{variant:"h3",children:n("resetTree",{ns:"button"})}),i.jsx(p.DialogContent,{children:i.jsx(p.DialogContentText,{children:n("resetTreeContent",{ns:"modal"})})}),i.jsxs(p.DialogActions,{children:[i.jsx(p.Button,{onClick:o,children:n("close",{ns:"button"})}),i.jsx(p.Button,{variant:"contained",color:"warning",onClick:l,children:n("reset",{ns:"button"})})]})]})]})},Yf={box:{backgroundColor:ue.background,border:`solid 1px ${ue.borderBlue}`}},Is=({children:e,description:t,open:n,onClose:r,title:a})=>i.jsx(p.Dialog,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",scroll:"body",maxWidth:"sm",fullWidth:!0,children:i.jsxs(p.Box,{sx:Yf.box,p:4,children:[i.jsx("h3",{children:a}),i.jsx("p",{children:t}),e]})});var ma={},Kf=fe;Object.defineProperty(ma,"__esModule",{value:!0});var Fs=ma.default=void 0,Gf=Kf(Ce()),Jf=i;Fs=ma.default=(0,Gf.default)((0,Jf.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded");const on={container:{display:"flex",flexDirection:"column",height:"100%",margin:1},main:{border:`solid 1px ${ue.borderBlue}`,height:" 100%",margin:1},toolbar:{backgroundColor:ue.background,boxShadow:"none",display:"flex",padding:"0 ! important"},toolbarBox:{backgroundColor:ue.tertiary,border:`solid 1px ${ue.primary}`,margin:1,paddingX:2,paddingY:1,width:"100%"}},Xf=({children:e,appear:t,in:n,onEnter:r,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:c},f)=>i.jsx(p.Slide,{direction:"up",ref:f,appear:t,in:n,onEnter:r,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:c,children:e}),Zf=_.forwardRef(Xf),Qf=({children:e,open:t,onClose:n,title:r})=>i.jsx(p.Dialog,{PaperProps:{sx:{backgroundColor:ue.background,backgroundImage:"none"}},open:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",fullScreen:!0,TransitionComponent:Zf,children:i.jsxs(p.Box,{sx:on.container,children:[i.jsx(p.AppBar,{position:"sticky",elevation:0,children:i.jsx(p.Toolbar,{sx:on.toolbar,children:i.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:on.toolbarBox,children:[i.jsx(p.Typography,{variant:"h5",children:i.jsx("strong",{children:r})}),i.jsx(p.IconButton,{edge:"end",color:"inherit",onClick:n,"aria-label":"close",children:i.jsx(Fs,{})})]})})}),i.jsx(p.Box,{sx:on.main,children:e})]})}),Hf={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:0}},e0=({children:e})=>i.jsx(p.Box,{p:2,role:"group",sx:Hf.box,children:e}),t0={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:0}},r0=({children:e})=>i.jsx(p.Box,{sx:t0.box,padding:2,component:"header",children:e}),n0={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:1}},a0=({children:e})=>i.jsx(p.Box,{sx:n0.box,component:"main",role:"tree",children:e}),Ls={stack:{width:"100%"}},o0=({children:e})=>{const t=_.Children.toArray(e);return i.jsxs(p.Grid,{container:!0,padding:1,flexWrap:"nowrap",height:"100%",role:"treegrid",children:[i.jsx(p.Grid,{item:!0,xs:9,padding:1,display:"flex",children:i.jsxs(p.Stack,{sx:Ls.stack,spacing:2,children:[t[0],t[1]]})}),i.jsx(p.Grid,{item:!0,xs:3,padding:1,display:"flex",children:i.jsxs(p.Stack,{sx:Ls.stack,spacing:2,children:[t[2],t[3]]})})]})},s0={box:{border:`solid 1px ${ue.borderBlue}`,flexGrow:1,overflow:"auto"}},i0=({children:e})=>i.jsx(p.Box,{sx:s0.box,component:"aside",children:e}),l0=()=>{const{dispatchTree:e,setModalOpen:t,currentHierarchyPointNode:n,treePath:r}=Re();return{handleSubmit:o=>{var c,f;o.preventDefault();const s=((c=n==null?void 0:n.data)==null?void 0:c.uuid)||"",l=((f=r==null?void 0:r.at(-1))==null?void 0:f.path)||"";e(Vf(l,s)),t(null)}}},u0=({onClose:e})=>{const{t}=Pe.useTranslation(),{handleSubmit:n}=l0();return i.jsx("form",{onSubmit:n,children:i.jsxs(p.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:[i.jsx(p.Button,{variant:"text",onClick:e,children:t("cancel")}),i.jsx(p.Button,{variant:"contained",color:"error",type:"submit",children:t("remove")})]})})};var ba={},c0=fe;Object.defineProperty(ba,"__esModule",{value:!0});var va=ba.default=void 0,d0=c0(Ce()),f0=i;va=ba.default=(0,d0.default)((0,f0.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddCircleRounded");var ga={},p0=fe;Object.defineProperty(ga,"__esModule",{value:!0});var Bs=ga.default=void 0,h0=p0(Ce()),m0=i;Bs=ga.default=(0,h0.default)((0,m0.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");var ya={},b0=fe;Object.defineProperty(ya,"__esModule",{value:!0});var Vs=ya.default=void 0,v0=b0(Ce()),g0=i;Vs=ya.default=(0,v0.default)((0,g0.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var xa={},y0=fe;Object.defineProperty(xa,"__esModule",{value:!0});var Ca=xa.default=void 0,x0=y0(Ce()),C0=i;Ca=xa.default=(0,x0.default)((0,C0.jsx)("path",{d:"M17 7h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c1.65 0 3 1.35 3 3s-1.35 3-3 3h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c2.76 0 5-2.24 5-5s-2.24-5-5-5m-9 5c0 .55.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1H9c-.55 0-1 .45-1 1m2 3H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h3c.55 0 1-.45 1-1s-.45-1-1-1H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h3c.55 0 1-.45 1-1s-.45-1-1-1"}),"LinkRounded");var Ta={},T0=fe;Object.defineProperty(Ta,"__esModule",{value:!0});var qs=Ta.default=void 0,_0=T0(Ce()),E0=i;qs=Ta.default=(0,_0.default)((0,E0.jsx)("path",{d:"M7.92 7.54c-.8-.34-1.14-1.33-.66-2.05C8.23 4.05 9.85 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.15.27-.24.49-.3.94-.09.73-.69 1.3-1.43 1.3-.87 0-1.58-.75-1.48-1.62.06-.51.18-1.04.46-1.54.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.17 0-1.93.61-2.4 1.34-.35.57-1.08.75-1.69.5M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMarkRounded");var _a={},w0=fe;Object.defineProperty(_a,"__esModule",{value:!0});var Ea=_a.default=void 0,j0=w0(Ce()),O0=i;Ea=_a.default=(0,j0.default)((0,O0.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1"}),"RemoveCircleRounded");const sn={container:{backgroundColor:"#282c34",borderRadius:.5,color:"#abb2bf",display:"inline-block",lineHeight:1.5,marginBottom:.2,paddingX:.5,paddingY:.2,width:"fit-content"},property:{color:"#56b6c2"},type:{color:"#c678dd"}},R0=({value:e})=>{const{t}=Pe.useTranslation(["translation","form"]);return i.jsx(p.Alert,{severity:"warning",variant:"outlined",children:i.jsxs(p.Typography,{component:"div",variant:"body2",gutterBottom:!0,sx:{lineHeight:2},children:[t("form:warningApiSelect.url")," ",t("form:warningApiSelect.warning")," ",t("form:warningApiSelect.response"),i.jsxs(p.Box,{sx:sn.container,children:["https://api.example.com/","{{",i.jsx(p.Box,{component:"span",sx:sn.type,children:e||"value"}),i.jsx(p.Box,{component:"span",sx:sn.property,children:": string"}),"}}","/endpoint ",i.jsx(p.Box,{component:"span",sx:sn.property})]})]})})},Et={container:{backgroundColor:"#282c34",borderRadius:.5,color:"#abb2bf",display:"inline-block",lineHeight:1.5,marginBottom:.2,paddingX:.5,paddingY:.2,width:"fit-content"},property:{color:"#56b6c2"},type:{color:"#c678dd"}},S0=({endPoint:e})=>{const{t}=Pe.useTranslation(["translation","form"]),{url:n,searchKey:r}=e,a=`${n}?${r}`;return i.jsx(p.Alert,{severity:"warning",variant:"outlined",children:i.jsxs(p.Typography,{component:"div",variant:"body2",gutterBottom:!0,sx:{lineHeight:2},children:[t("form:warningApiAutocomplete.url")," ",n&&i.jsxs(i.Fragment,{children:[i.jsx(p.Box,{component:"span",sx:Et.container,children:a})," "]}),t("form:warningApiAutocomplete.response"),i.jsxs(p.Box,{sx:Et.container,children:["{ ",i.jsx(p.Box,{component:"span",sx:Et.property,children:"label"}),":"," ",i.jsx(p.Box,{component:"span",sx:Et.type,children:"string"}),";"," ",i.jsx(p.Box,{component:"span",sx:Et.property,children:"value"}),":"," ",i.jsx(p.Box,{component:"span",sx:Et.type,children:"string"}),";"," ",i.jsx(p.Box,{component:"span",sx:Et.property,children:"img"}),i.jsx(p.Box,{component:"span",className:"semicolon",children:"?"}),":"," ",i.jsx(p.Box,{component:"span",sx:Et.type,children:"string"}),"; }"]})]})})};var wa={},k0=fe;Object.defineProperty(wa,"__esModule",{value:!0});var zs=wa.default=void 0,$0=k0(Ce()),M0=i;zs=wa.default=(0,$0.default)((0,M0.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded");const Ns=()=>{const{dispatchSnackbar:e}=_.useContext(Ya);return{close:()=>e(Ka()),open:(r,a="success")=>e(tl(r,a))}},P0=e=>{const{backendConfig:t}=Re(),{endpoints:n}=t||{},{workflows:r=""}=n||{};return Dt.useQuery({queryFn:async({signal:a})=>{const{data:o}=await It.get(r,{signal:a});return o},queryKey:["workflows"],...e})},A0=({isControlled:e,fetchWorkflowsOnOpen:t})=>{const{t:n}=Pe.useTranslation("snackMessage"),{open:r}=Ns(),{currentTree:a,setCurrentTree:o,dispatchTree:s}=Re(),[l,c]=_.useState(""),f=!!l&&!e&&l!==a.id,{data:h,isError:m}=kr(l,{enabled:f}),{data:b,isLoading:g,refetch:v}=P0({enabled:!t}),u=_.useCallback(async({target:w})=>{var k;const{value:j}=w;if(j==="add-new-tree"){c(""),o({name:""}),s(Ds());return}c(j),o({id:j,name:(k=b==null?void 0:b.find(M=>M.id===j))==null?void 0:k.label})},[s,o,b]),y=_.useCallback(async()=>{if(t)try{await v(),a.id&&!l&&c(a.id)}catch{r(n("error.fetchTree",{ns:"snackMessage"}),"error")}},[t,v,a.id,l,r,n]);return _.useEffect(()=>{if(h&&l!==a.id){const{id:w,label:j,workflow:k}=h;o({id:w,name:j}),s(ha(k))}},[a.id,s,e,o,l,h]),_.useEffect(()=>{m&&r(n("error.fetchTree",{ns:"snackMessage"}),"error")},[m,r,n]),{currentTree:a,fetchWorkflowSuggestions:v,handleChangeTree:u,handleOnOpen:y,setTreeSelected:c,treeSelected:l,workflowsSuggestions:b,workflowsSuggestionsLoading:g}},Us={formControl:{flex:1},select:{".MuiOutlinedInput-notchedOutline":{border:0,paddingLeft:5},".MuiSelect-select":{opacity:0,width:0},boxShadow:"none"}},Ws=({arrowOnly:e,required:t,size:n,showBtnAddNewTree:r,onChange:a,value:o,fetchWorkflowsOnOpen:s})=>{const{t:l}=Pe.useTranslation("form"),c=_.useMemo(()=>!!a,[a]),{handleChangeTree:f,handleOnOpen:h,workflowsSuggestions:m,workflowsSuggestionsLoading:b,treeSelected:g}=A0({fetchWorkflowsOnOpen:s,isControlled:c});return i.jsxs(p.FormControl,{size:n,required:t,sx:Us.formControl,children:[!e&&i.jsx(p.InputLabel,{children:l("tree",{ns:"form"})}),i.jsxs(p.Select,{value:c?o:g,id:"tree-select",onChange:v=>c?a==null?void 0:a(v):f(v),sx:e?Us.select:void 0,label:l("tree",{ns:"form"}),onOpen:h,children:[(o&&b||b)&&i.jsx(p.MenuItem,{value:o,children:i.jsx(p.Skeleton,{width:"100%"})}),m==null?void 0:m.map(({label:v,id:u})=>i.jsx(p.MenuItem,{value:u,children:v},u)),r&&i.jsx(p.MenuItem,{disabled:!0,children:i.jsx(p.Box,{sx:{height:1,width:"100%"},children:i.jsx(p.Divider,{})})}),r&&i.jsxs(p.MenuItem,{value:"add-new-tree",children:[i.jsx(p.Typography,{mr:1,children:l("newTree",{ns:"form"})}),i.jsx(zs,{color:"primary"})]})]})]})},D0=({id:e,helperText:t,hiddenValue:n,isHiddenField:r,isTreeField:a,treeSelected:o,handleChangeTreeSelect:s,handleChangeHelperText:l,handleChangeHiddenValue:c})=>{const{t:f}=Pe.useTranslation(["translation","form"]);return a?i.jsx(Ws,{required:!0,value:o,onChange:s}):r?i.jsx(p.TextField,{required:!0,size:"small",id:e,sx:{flex:1},label:f("hiddenValue",{ns:"form"}),onChange:c,value:n}):i.jsx(p.TextField,{sx:{flex:1},label:f("helperText",{ns:"form"}),size:"small",onChange:l,value:t})},wt=[{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"text"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"number"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"email"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"file"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"password"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"tel"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"address"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"url"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"date"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dateRange"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"time"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"timeRange"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"switch"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"checkbox"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"hidden"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"tree"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"radio"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"select"},{initialQueryEnable:!0,isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"autocomplete"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dynamicSelect"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"title"}],I0=()=>{const e=Date.now(),t=performance.now();return`${e}${Math.random().toString(36).substring(2,9)}${t}`},F0=()=>{var Z,oe,J,K,Ae,me,ve,ze,bt,lt,Fe,Zt,bn,vn,ui,ci,di,fi,pi,hi,mi,bi,vi,gi,yi,xi,Ci,Ti,_i,Ei,wi,ji,Oi,Ri;const e=I0(),t=_.useMemo(()=>[{id:"0",label:"",message:"",value:""}],[]),{dispatchTree:n,currentHierarchyPointNode:r,modalOpen:a,treePath:o,setModalOpen:s}=Re(),{open:l}=Ns(),{t:c}=Pe.useTranslation(["translation","form"]),f=r!=null&&r.data&&((Z=r==null?void 0:r.data)!=null&&Z.attributes)&&"isMultiple"in r.data.attributes?!!r.data.attributes.isMultiple:null,[h,m]=_.useState(t),[b,g]=_.useState(""),[v,u]=_.useState(""),[y,w]=_.useState(""),[j,k]=_.useState(!1),[M,x]=_.useState(!1),[A,F]=_.useState(!1),[be,Ie]=_.useState(!1),[ee,te]=_.useState("text"),[he,de]=_.useState(null),[se,Be]=_.useState(null),[Te,ce]=_.useState({url:""}),[Ve,rt]=_.useState(""),[E,S]=_.useState(""),[z,N]=_.useState({off:"",on:""}),[P,Y]=_.useState(!1),[D,V]=_.useState(!1),[B,G]=_.useState(""),[U,je]=_.useState(""),O=a==="edit",ke=ee==="tree",et=ee==="hidden",Ue=ee==="autocomplete",We=ee==="dateRange",jt=ee==="dynamicSelect",Jt=wt.some(C=>C.type===ee&&(C==null?void 0:C.isBooleanField)),tt=wt.some(C=>C.type===ee&&(C==null?void 0:C.isDecisionField)),St=wt.some(C=>C.type===ee&&(C==null?void 0:C.isRequiredDisabled)),mr=wt.some(C=>C.type===ee&&(C==null?void 0:C.isRepeatableDisabled)),dt=wt.some(C=>C.type===ee&&(C==null?void 0:C.isPatternEnabled)),br=((J=(oe=r==null?void 0:r.data)==null?void 0:oe.attributes)==null?void 0:J.isLeaf)??!0,kt=wt.some(C=>C.type===ee&&"isMultiple"in C),ft=_.useCallback(C=>!tt&&C>0,[tt]),{refetch:$t,isLoading:Xt}=kr(Ve,{enabled:!1}),Mt=_.useMemo(()=>[{label:c("form:number"),value:"^\\d+$"},{label:c("form:letter"),value:"^[A-Za-zÀ-ÖØ-öø-ÿ' -]+$"},{label:c("form:numberAndLetter"),value:"^[A-Za-z0-9]+$"},{label:c("form:cardNumber"),value:"^\\d{16}$"},{label:c("form:type.date"),value:"\\d{4}-\\d{2}-\\d{2}"}],[c]),Pt=_.useCallback(C=>$=>{m(L=>L.map(X=>{const{id:ge}=X;return $.target.dataset.id===ge?{...X,id:ge,[C]:$.target.value}:{...X}}))},[]),pt=_.useCallback((C,$)=>{typeof $=="string"?de($):$&&$.inputValue?de($.inputValue):de(null)},[]),vr=_.useCallback((C,$)=>{ce(L=>({...L,url:L.url?L.url.replace(/{{[^{}]+}}/,`{{${$||""}}}`):`https://example.com/{{${$||""}}}`})),Be($??null)},[]),Ot=_.useCallback(({target:C})=>{g(C.value)},[]),gr=_.useCallback(({target:C})=>{u(C.value)},[]),yr=_.useCallback(({target:C})=>{w(C.value)},[]),xr=_.useCallback(({target:C})=>{ce($=>({...$,url:C.value}))},[]),Cr=_.useCallback(({target:C})=>{const $=C.value;if($.includes("{{}}")){const L=$.replace("{{}}",`{{${se||""}}}`);ce(X=>({...X,url:L}))}else if($.includes("{{")){const L=$.replace(/{{[^{}]+}}/,`{{${se||""}}}`);ce(X=>({...X,url:L}))}else ce(L=>({...L,url:$}))},[se]),_e=_.useCallback(({target:C})=>{ce($=>({...$,searchKey:C.value}))},[]),ht=_.useCallback((C,$)=>{ce(L=>{const X={...L.pathKey,[C]:$.target.value};if($.target.value===""&&C in X){const{pathKey:ge,...$e}=L;return{...$e}}return{...L,pathKey:X}})},[ce]),qe=_.useCallback((C,$,L)=>{ce(X=>{const ge=[...X.params??[]];return ge[C]={...ge[C],[$]:L.target.value},{...X,params:ge}})},[ce]),Je=_.useCallback((C,$)=>{G($)},[]),mt=_.useCallback(({target:C})=>{je(C.value)},[]),Tr=_.useCallback(({target:C})=>{Ie(C.checked)},[]),un=_.useCallback(({target:C})=>{x(C.checked)},[]),Ia=_.useCallback(({target:C})=>{V(C.checked)},[]),cn=_.useCallback(({target:C})=>{F(C.checked)},[]),Fa=_.useCallback(({target:C})=>{k(C.checked)},[]),dn=_.useCallback(({target:C})=>{Y(C.checked)},[]),fn=_.useCallback((C,$)=>{te($.type),F(!1),x(!1),Y(!1),k(!1)},[]),La=_.useCallback(({target:C})=>{rt(C.value)},[]),Ba=_.useCallback(C=>({target:$})=>{N(L=>({...L,[C]:$.value}))},[]),pn=_.useCallback(({target:C})=>{S(C.value)},[]),hn=_.useCallback(()=>{m(C=>{const $=Number(C[C.length-1].id),L=String($+1);return[...C,{...t[0],id:L}]})},[t]),Va=_.useCallback(()=>{ce(C=>{var ge,$e;const $=Number((($e=(ge=C.params)==null?void 0:ge[C.params.length-1])==null?void 0:$e.id)||0),L=String($+1),X=[...C.params||[],{id:L,key:"",value:""}];return{...C,params:X}})},[]),qa=_.useCallback(({currentTarget:C})=>{m($=>$.filter(({id:L})=>C.value!==L))},[]),za=_.useCallback(C=>{const $=C.currentTarget.value;ce(L=>{const X=(L.params??[]).filter(({id:$e})=>$e!==$),ge=X.length>0?X:void 0;return{...L,params:ge}})},[]),mn=_.useCallback((C,$)=>{var X,ge,$e;const L=($e=(ge=(X=C==null?void 0:C.children)==null?void 0:X[$])==null?void 0:ge.data)==null?void 0:$e.children;return L?L.map(({uuid:vt,attributes:gt,children:Rt})=>({attributes:gt,children:Rt,uuid:vt})):[]},[]),d=_.useCallback(C=>{var $;return A?($=h==null?void 0:h.filter((L,X)=>!ft(X)))==null?void 0:$.map(({message:L,value:X,label:ge},$e)=>{const vt=`${e}:${X}`,gt=mn(r,$e);return{attributes:{depth:C+1,label:ge,name:`${y}:${X}`,value:X,...L&&{message:L},...gt.length===0&&{isLeaf:!0}},children:gt,uuid:vt}}):[]},[r,ft,mn,A,y,e,h]),T=_.useCallback(C=>C.map(({message:$,...L})=>({...L,...$&&{message:$}})),[]),R=_.useCallback((C,$,L)=>{var X;if(C&&(!$||L))try{return $t()}catch{l(c("error.fetchTree",{ns:"snackMessage"}),"error")}return C&&$&&!L?{data:{workflow:(X=r==null?void 0:r.data.attributes)==null?void 0:X.tree},isError:null}:{data:null,isError:null}},[(K=r==null?void 0:r.data.attributes)==null?void 0:K.tree,$t,l,c]),I=_.useCallback(async C=>{var Er,wr,jr,Or;C.preventDefault();const{on:$,off:L}=z,X=((Er=r==null?void 0:r.data)==null?void 0:Er.uuid)||"",ge=(r==null?void 0:r.depth)||0,$e=a==="edit",vt=ge+($e||r===null?0:1),gt=d(vt),Rt=(wr=o==null?void 0:o.at(-1))==null?void 0:wr.path,gn=o.length?`${Rt}/${e}`:`/${e}`,yn=((Or=(jr=r==null?void 0:r.data.attributes)==null?void 0:jr.tree)==null?void 0:Or.treeId)!==Ve,{data:Qt,isError:xn}=await R(ke,$e,yn);if(xn)return;const _r={attributes:{depth:vt,name:y,type:ee,...v&&{label:v},...Ue&&{route:Te},...jt&&{route:Te},...E&&{helperText:E},...A&&{isDecision:A},...M&&{required:M},...j&&We&&{isDisabledPast:j},...P&&{repeatable:P},...et&&{hiddenValue:b},...he&&{tag:he},...se&&{parentRef:se},...be&&kt&&{isMultiple:be},...D&&{initialQuery:D},...tt&&!A&&{values:T(h)},...(L||$)&&{messages:{...L&&{off:L},...$&&{on:$}}},...B&&{pattern:typeof B=="object"?B.value:B},...U&&{patternMessage:U},...ke&&{tree:{...Qt==null?void 0:Qt.workflow,treeId:Ve},treePath:gn}},children:gt,uuid:$e?X:e};n($e?Bf(Rt||"",X,_r):Lf(Rt||null,X,_r)),s(null)},[r,n,d,T,R,E,b,D,Ue,We,A,tt,j,jt,et,be,kt,ke,v,z,a,y,se,B,U,P,M,Te,s,he,o,Ve,ee,e,h]);return _.useEffect(()=>{var C,$,L,X,ge,$e,vt,gt,Rt,gn,yn,Qt,xn,_r,Er,wr,jr,Or,Si,ki,$i,Mi,Pi,Ai,Di;if(a==="edit"){const Cn=(($=(C=r==null?void 0:r.data)==null?void 0:C.attributes)==null?void 0:$.values)||((ge=(X=(L=r==null?void 0:r.data)==null?void 0:L.children)==null?void 0:X.filter(({attributes:yt})=>!(yt!=null&&yt.type)))==null?void 0:ge.map(({attributes:yt},At)=>{const{label:Tn,value:_n,message:Rr}=yt||{};return{id:String(At),label:String(Tn),value:String(_n),...Rr&&{message:String(Rr)}}}));de((($e=r==null?void 0:r.data.attributes)==null?void 0:$e.tag)||null),te(((vt=r==null?void 0:r.data.attributes)==null?void 0:vt.type)||"text"),S(((gt=r==null?void 0:r.data.attributes)==null?void 0:gt.helperText)||""),x(((Rt=r==null?void 0:r.data.attributes)==null?void 0:Rt.required)||!1),k(((gn=r==null?void 0:r.data.attributes)==null?void 0:gn.isDisabledPast)||!1),u(((yn=r==null?void 0:r.data.attributes)==null?void 0:yn.label)||""),w(((Qt=r==null?void 0:r.data.attributes)==null?void 0:Qt.name)||""),F(((xn=r==null?void 0:r.data.attributes)==null?void 0:xn.isDecision)||!1),m(Cn!=null&&Cn.length?Cn:t),rt(((Er=(_r=r==null?void 0:r.data.attributes)==null?void 0:_r.tree)==null?void 0:Er.treeId)||""),Y(((wr=r==null?void 0:r.data.attributes)==null?void 0:wr.repeatable)||!1),g(((jr=r==null?void 0:r.data.attributes)==null?void 0:jr.hiddenValue)||""),Be(((Or=r==null?void 0:r.data.attributes)==null?void 0:Or.parentRef)||null),G(Mt.find(({value:yt})=>{var At;return yt===((At=r==null?void 0:r.data.attributes)==null?void 0:At.pattern)})||((Si=r==null?void 0:r.data.attributes)==null?void 0:Si.pattern)||""),je(((ki=r==null?void 0:r.data.attributes)==null?void 0:ki.patternMessage)||""),N({off:((Mi=($i=r==null?void 0:r.data.attributes)==null?void 0:$i.messages)==null?void 0:Mi.off)||"",on:((Ai=(Pi=r==null?void 0:r.data.attributes)==null?void 0:Pi.messages)==null?void 0:Ai.on)||""}),ce(yt=>{var At,Tn,_n,Rr,Ii,Fi,Li,Bi;return{...yt,params:(Tn=(At=r==null?void 0:r.data.attributes)==null?void 0:At.route)==null?void 0:Tn.params,pathKey:(Rr=(_n=r==null?void 0:r.data.attributes)==null?void 0:_n.route)==null?void 0:Rr.pathKey,searchKey:(Fi=(Ii=r==null?void 0:r.data.attributes)==null?void 0:Ii.route)==null?void 0:Fi.searchKey,url:((Bi=(Li=r==null?void 0:r.data.attributes)==null?void 0:Li.route)==null?void 0:Bi.url)||""}}),Ie(f||!1),V(((Di=r==null?void 0:r.data.attributes)==null?void 0:Di.initialQuery)||!1)}},[(Ae=r==null?void 0:r.data.attributes)==null?void 0:Ae.helperText,(me=r==null?void 0:r.data.attributes)==null?void 0:me.hiddenValue,(ve=r==null?void 0:r.data.attributes)==null?void 0:ve.initialQuery,(ze=r==null?void 0:r.data.attributes)==null?void 0:ze.isDecision,(bt=r==null?void 0:r.data.attributes)==null?void 0:bt.isDisabledPast,(lt=r==null?void 0:r.data.attributes)==null?void 0:lt.label,(Zt=(Fe=r==null?void 0:r.data.attributes)==null?void 0:Fe.messages)==null?void 0:Zt.off,(vn=(bn=r==null?void 0:r.data.attributes)==null?void 0:bn.messages)==null?void 0:vn.on,(ui=r==null?void 0:r.data.attributes)==null?void 0:ui.name,(ci=r==null?void 0:r.data.attributes)==null?void 0:ci.parentRef,(di=r==null?void 0:r.data.attributes)==null?void 0:di.pattern,(fi=r==null?void 0:r.data.attributes)==null?void 0:fi.patternMessage,(pi=r==null?void 0:r.data.attributes)==null?void 0:pi.repeatable,(hi=r==null?void 0:r.data.attributes)==null?void 0:hi.required,(bi=(mi=r==null?void 0:r.data.attributes)==null?void 0:mi.route)==null?void 0:bi.params,(gi=(vi=r==null?void 0:r.data.attributes)==null?void 0:vi.route)==null?void 0:gi.pathKey,(xi=(yi=r==null?void 0:r.data.attributes)==null?void 0:yi.route)==null?void 0:xi.searchKey,(Ti=(Ci=r==null?void 0:r.data.attributes)==null?void 0:Ci.route)==null?void 0:Ti.url,(_i=r==null?void 0:r.data.attributes)==null?void 0:_i.tag,(wi=(Ei=r==null?void 0:r.data.attributes)==null?void 0:Ei.tree)==null?void 0:wi.treeId,(ji=r==null?void 0:r.data.attributes)==null?void 0:ji.type,(Oi=r==null?void 0:r.data.attributes)==null?void 0:Oi.values,(Ri=r==null?void 0:r.data)==null?void 0:Ri.children,t,f,a,Mt]),{getDisabledValueField:ft,handleAddParams:Va,handleAddValue:hn,handleChangeHelperText:pn,handleChangeHiddenValue:Ot,handleChangeInitialQuery:Ia,handleChangeIsDecisionField:cn,handleChangeIsDisabledPast:Fa,handleChangeLabel:gr,handleChangeMessage:Ba,handleChangeMultiple:Tr,handleChangeName:yr,handleChangeParam:qe,handleChangeParentRef:vr,handleChangePath:ht,handleChangePattern:Je,handleChangePatternMessage:mt,handleChangeRepeatable:dn,handleChangeRequired:un,handleChangeSearchKey:_e,handleChangeTag:pt,handleChangeTreeSelect:La,handleChangeType:fn,handleChangeUrl:xr,handleChangeUrlSelect:Cr,handleDeleteParam:za,handleDeleteValue:qa,handlePresetValues:Pt,handleSubmit:I,helperText:E,hiddenValue:b,initialQuery:D,isAutocomplete:Ue,isBooleanField:Jt,isDateRangePicker:We,isDecision:A,isDecisionField:tt,isDisabledPast:j,isDynamicSelect:jt,isEditModal:O,isHiddenField:et,isLeaf:br,isMultiple:be,isMultiplePossible:kt,isPatternEnabled:dt,isRepeatableDisabled:mr,isRequiredDisabled:St,isTreeField:ke,isWorkflowLoading:Xt,label:v,messages:z,name:y,parentRef:se,pattern:B,patternMessage:U,patternOptions:Mt,repeatable:P,required:M,route:Te,tag:he,treeSelected:Ve,type:ee,uuid:e,values:h}},L0=e=>{const{backendConfig:t}=Re(),n=wt.filter(a=>!(a.type==="tree"&&!(t!=null&&t.baseUrl)))||[];return{currentValue:n.find(a=>a.type===e)||wt[0],options:n}},B0=({id:e,onChange:t,value:n,sx:r})=>{const{t:a}=Pe.useTranslation(["translation","form"]),{currentValue:o,options:s}=L0(n);return i.jsx(p.Autocomplete,{disableClearable:!0,fullWidth:!0,size:"small",id:e,sx:r,options:s,value:o,onChange:t,getOptionLabel:l=>a(`form:type.${l.type}`),renderInput:l=>i.jsx(p.TextField,{...l,required:!0,size:"small",label:a("type")}),renderOption:(l,c)=>i.jsxs(p.MenuItem,{...l,children:[a(`form:type.${c.type}`),c.isDecisionField&&i.jsx(p.Chip,{label:a("decisionField",{ns:"form"}),size:"small",color:"info",sx:{marginLeft:1}})]})})},V0=({id:e,value:t,onChange:n})=>{var g;const[r,a]=_.useState(t||""),{t:o}=Pe.useTranslation(["form"]),{tree:s,treePath:l,currentHierarchyPointNode:c}=Re(),{uuid:f}=(c==null?void 0:c.data)||{},h=Gt(s,(g=l==null?void 0:l.at(-1))==null?void 0:g.path),m=Ff(h,f),b=v=>{const u=v.target.value;a(u),n==null||n(v,u)};return i.jsxs(p.FormControl,{sx:{flex:1.5},required:!0,children:[i.jsx(p.InputLabel,{children:o("form:ancestor")}),i.jsx(p.Select,{id:e,variant:"outlined",size:"small",sx:{flex:2},value:r,label:o("form:ancestor"),onChange:b,MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:m.length?m.map((v,u)=>{const y=`${v}-${u}`;return i.jsx(p.MenuItem,{value:v,children:v},y)}):i.jsx(p.MenuItem,{disabled:!0,value:"",children:o("form:noAncestorFound")})})]})},q0=e=>{if(!e)return[];const t=new Set,n=r=>{var a,o;if((a=r==null?void 0:r.attributes)!=null&&a.tag&&t.add(r.attributes.tag),(o=r==null?void 0:r.children)!=null&&o.length){const{children:s}=r;for(let l=0;l<s.length;l+=1)n(s[l])}};return n(e),[...t]},z0=p.createFilterOptions(),N0=({id:e,value:t,onChange:n})=>{const{t:r}=Pe.useTranslation(["translation","form"]),{tree:a}=Re(),o=q0(a).reduce((s,l)=>[...s,{inputValue:l,label:l}],[]);return i.jsx(p.Autocomplete,{freeSolo:!0,fullWidth:!0,id:e,sx:{flex:1},size:"small",value:t,onChange:n,filterOptions:(s,l)=>{const c=z0(s,l),{inputValue:f}=l,h=s.some(m=>typeof m!="string"&&f===m.label);return f!==""&&!h&&c.push({inputValue:f,label:`${r("add")} "${f}"`}),c},getOptionLabel:s=>typeof s=="string"?s:s.inputValue?s.inputValue:s.label,renderOption:(s,l)=>i.jsx("li",{...s,children:typeof l!="string"&&l.label}),renderInput:s=>i.jsx(p.TextField,{...s,label:r("tag")}),options:o})},Ys={marginRight:"-20px !important",minWidth:"auto !important"},ln={iconButton:Ys,iconButtonDelete:{...Ys,"&:before":{borderRadius:"50%",content:'""',height:20,position:"absolute",width:20,zIndex:-1},backgroundColor:ue.background,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}},U0=({onClose:e})=>{const{t}=Pe.useTranslation(["translation","form"]),{patternOptions:n,values:r,required:a,tag:o,type:s,helperText:l,label:c,name:f,hiddenValue:h,isBooleanField:m,isDisabledPast:b,handleChangeIsDisabledPast:g,isDecision:v,isEditModal:u,isDecisionField:y,isHiddenField:w,isRequiredDisabled:j,isRepeatableDisabled:k,isAutocomplete:M,isDateRangePicker:x,isDynamicSelect:A,isTreeField:F,treeSelected:be,isWorkflowLoading:Ie,repeatable:ee,isLeaf:te,isMultiplePossible:he,isPatternEnabled:de,isMultiple:se,initialQuery:Be,handleChangeTreeSelect:Te,handleChangeHelperText:ce,handleChangeRequired:Ve,handleChangeName:rt,handleChangeType:E,handleChangeIsDecisionField:S,handleDeleteValue:z,handleDeleteParam:N,handleChangeMessage:P,handleSubmit:Y,handleAddValue:D,handleAddParams:V,handleChangeLabel:B,handleChangeRepeatable:G,handleChangeHiddenValue:U,handleChangeTag:je,handleChangeSearchKey:O,handleChangeUrl:ke,handleChangeUrlSelect:et,handleChangeParam:Ue,handleChangePath:We,handleChangeMultiple:jt,handleChangeParentRef:Jt,handleChangeInitialQuery:tt,parentRef:St,route:mr,handlePresetValues:dt,patternMessage:br,pattern:kt,handleChangePattern:ft,handleChangePatternMessage:$t,messages:{on:Xt,off:Mt}}=F0(),{searchKey:Pt,url:pt,pathKey:vr,params:Ot}=mr||{},{object:gr="",label:yr="",value:xr="",image:Cr=""}=vr||{};return i.jsxs("form",{onSubmit:Y,children:[i.jsx(B0,{id:"type",value:s,onChange:E,sx:{marginBottom:1}}),i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(p.TextField,{autoComplete:"off",id:"name",label:t("name"),sx:{flex:1},onChange:rt,value:f,size:"small",required:!0}),i.jsx(p.TextField,{id:"label",sx:{flex:1},label:t("label",{ns:"form"}),onChange:B,value:c,size:"small"})]}),i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[s!=="title"&&i.jsx(N0,{id:"tag",value:o,onChange:je}),i.jsx(D0,{id:"helperText",helperText:l,hiddenValue:h,isHiddenField:w,isTreeField:F,treeSelected:be,handleChangeTreeSelect:Te,handleChangeHelperText:ce,handleChangeHiddenValue:U})]}),de&&i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(p.Autocomplete,{freeSolo:!0,id:"patternMessage",size:"small",sx:{flex:1},onChange:ft,onInputChange:ft,value:kt,options:n,renderInput:_e=>i.jsx(p.TextField,{..._e,label:t("form:pattern")})}),i.jsx(p.TextField,{id:"patternMessage",label:t("form:patternMessage"),sx:{flex:1},onChange:$t,value:br,size:"small"})]}),M&&i.jsx(p.Stack,{spacing:1,paddingY:1,children:i.jsxs(p.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(p.TextField,{id:"url",size:"small",sx:{flex:3},InputProps:{startAdornment:i.jsx(p.InputAdornment,{position:"start",children:i.jsx(Ca,{})})},placeholder:"https://api.fr/enpoint",type:"url",label:t("form:apiRoute"),onChange:ke,value:pt,required:!0}),i.jsx(qs,{}),i.jsx(p.TextField,{id:"searchKey",size:"small",InputLabelProps:{shrink:!0},sx:{flex:1},placeholder:t("form:searchKeyPlaceholder"),type:"text",label:t("form:key"),onChange:O,value:Pt})]})}),A&&i.jsxs(p.Stack,{spacing:1,paddingY:1,children:[i.jsx("h4",{children:t("form:urlConstruction")}),i.jsxs(p.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(V0,{id:"parentRef",value:St,onChange:Jt}),i.jsx(Bs,{}),i.jsx(p.TextField,{id:"urlSelect",size:"small",sx:{flex:3},InputProps:{startAdornment:i.jsx(p.InputAdornment,{position:"start",children:i.jsx(Ca,{})})},placeholder:`https://api.fr/{{${St||""}}}/enpoint`,type:"url",label:t("form:apiRoute"),onChange:et,value:pt})]}),pt&&i.jsx(R0,{value:St})]}),(M||A)&&i.jsxs(p.Stack,{spacing:1,paddingY:1,children:[i.jsxs(p.Accordion,{elevation:0,square:!0,children:[i.jsx(p.AccordionSummary,{expandIcon:i.jsx(Vs,{}),"aria-controls":"panel-content",sx:{"& .MuiAccordionSummary-content":{flexGrow:0},display:"inline-flex",justifyContent:"flex-start",padding:0},children:i.jsx(p.Typography,{sx:{textDecoration:"underline"},children:t("form:dataMapping")})}),i.jsxs(p.Stack,{spacing:1,paddingY:1,children:[i.jsxs(p.Stack,{spacing:1,sx:{pb:1},direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(p.TextField,{id:"objectArrayPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Object Array Path",value:gr,onChange:_e=>We("object",_e),placeholder:"elements.features[]",type:"text"}),i.jsx(p.TextField,{id:"labelPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Label Path",value:yr,onChange:_e=>We("label",_e),placeholder:"client.name",type:"text"})]}),i.jsxs(p.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[i.jsx(p.TextField,{id:"valuePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Value Path",value:xr,onChange:_e=>We("value",_e),placeholder:"client.id",type:"text"}),i.jsx(p.TextField,{id:"imagePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Image Path",value:Cr,onChange:_e=>We("image",_e),placeholder:"client.src.profile",type:"text"})]}),i.jsx(S0,{endPoint:{searchKey:Pt||"",url:pt||""}})]})]}),i.jsxs(p.Stack,{children:[i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},position:"relative",alignItems:{sm:"center",xs:"flex-start"},children:[i.jsx("h4",{children:t("form:additionalParams")}),i.jsx(p.Box,{justifyContent:"flex-end",children:i.jsx(p.IconButton,{color:"success",sx:ln.iconButton,onClick:V,children:i.jsx(va,{})})})]}),Ot==null?void 0:Ot.map(({id:_e,key:ht,value:qe},Je)=>i.jsxs(p.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[i.jsx(p.TextField,{id:`param-key-${_e}`,label:"Key",size:"small",sx:{flex:1},onChange:mt=>Ue(Je,"key",mt),value:ht,inputProps:{"data-id":_e}}),i.jsx(p.TextField,{id:`param-value-${_e}`,label:t("value",{ns:"form"}),size:"small",sx:{flex:1},onChange:mt=>Ue(Je,"value",mt),value:qe,inputProps:{"data-id":_e}}),Ot.length>0&&i.jsx(p.IconButton,{color:"warning",sx:ln.iconButtonDelete,value:_e,onClick:N,children:i.jsx(Ea,{})})]},_e))]})]}),m&&i.jsxs(p.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(p.TextField,{id:"onMessage",size:"small",sx:{flex:1},label:t("onMessage",{ns:"form"}),onChange:P("on"),value:Xt}),i.jsx(p.TextField,{id:"offMessage",size:"small",sx:{flex:1},label:t("offMessage",{ns:"form"}),onChange:P("off"),value:Mt})]}),i.jsx(p.Stack,{paddingY:1,children:i.jsxs(p.FormGroup,{children:[he&&i.jsx(p.FormControlLabel,{control:i.jsx(p.Checkbox,{checked:se,onChange:jt}),label:t("multiple")}),M&&i.jsx(p.FormControlLabel,{control:i.jsx(p.Checkbox,{id:"isInitialQuery",checked:Be,onChange:tt}),label:t("initialQueryEnable")}),i.jsx(p.FormControlLabel,{disabled:j,control:i.jsx(p.Checkbox,{id:"isRequired",checked:a,onChange:Ve}),label:t("required")}),i.jsx(p.FormControlLabel,{disabled:k,control:i.jsx(p.Checkbox,{id:"isRepeatable",checked:ee,onChange:G}),label:t("repeatable",{ns:"form"})}),(te||u)&&i.jsx(p.FormControlLabel,{disabled:!y,control:i.jsx(p.Checkbox,{id:"isDecision",checked:v,onChange:S}),label:t("decisionField",{ns:"form"})}),x&&i.jsx(p.FormControlLabel,{control:i.jsx(p.Checkbox,{id:"disabledPast",checked:b,onChange:g}),label:t("disabledPast",{ns:"form"})})]})}),y&&i.jsxs(i.Fragment,{children:[i.jsx("h4",{children:t("values")}),r==null?void 0:r.map(({value:_e,label:ht,id:qe,message:Je})=>i.jsxs(p.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[i.jsx(p.TextField,{id:`decision-label-${qe}`,label:t("label",{ns:"form"}),size:"small",sx:{flex:1},onChange:dt("label"),value:ht,inputProps:{"data-id":qe},required:!0}),i.jsx(p.TextField,{id:`decision-value-${qe}`,label:t("value",{ns:"form"}),size:"small",sx:{flex:1},onChange:dt("value"),value:_e,inputProps:{"data-id":qe},required:!0}),i.jsx(p.TextField,{id:`decision-message-${qe}`,label:t("message",{ns:"form"}),size:"small",sx:{flex:1},onChange:dt("message"),value:Je,inputProps:{"data-id":qe}}),r.length>1&&i.jsx(p.IconButton,{color:"warning",sx:ln.iconButtonDelete,value:qe,onClick:z,children:i.jsx(Ea,{})})]},qe))]}),y&&i.jsx(p.Box,{justifyContent:"flex-end",display:"flex",children:i.jsx(p.IconButton,{color:"success",sx:ln.iconButton,onClick:D,children:i.jsx(va,{})})}),i.jsxs(p.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",paddingTop:3,children:[i.jsx(p.Button,{variant:"text",onClick:e,children:t("cancel")}),i.jsx(p.Button,{variant:"contained",type:"submit",disabled:Ie,isLoading:Ie,loadingIndicator:i.jsx(p.CircularProgress,{size:14}),children:t("validate")})]})]})};var ja={},W0=fe;Object.defineProperty(ja,"__esModule",{value:!0});var Ks=ja.default=void 0,Y0=W0(Ce()),K0=i;Ks=ja.default=(0,Y0.default)((0,K0.jsx)("path",{d:"M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2v-4c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1h-1.01c-.54 0-.99-.45-.99-.99V8h2v1c0 1.1.9 2 2 2"}),"AccountTreeRounded");var Oa={},G0=fe;Object.defineProperty(Oa,"__esModule",{value:!0});var Gs=Oa.default=void 0,J0=G0(Ce()),X0=i;Gs=Oa.default=(0,J0.default)((0,X0.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-3 10h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddBoxRounded");var Ra={},Z0=fe;Object.defineProperty(Ra,"__esModule",{value:!0});var Js=Ra.default=void 0,Q0=Z0(Ce()),H0=i;Js=Ra.default=(0,Q0.default)((0,H0.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2zM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1m6.5-5-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1z"}),"DeleteOutlineRounded");var Sa={},ep=fe;Object.defineProperty(Sa,"__esModule",{value:!0});var Xs=Sa.default=void 0,tp=ep(Ce()),rp=i;Xs=Sa.default=(0,tp.default)((0,rp.jsx)("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded");var ka={},np=fe;Object.defineProperty(ka,"__esModule",{value:!0});var Zs=ka.default=void 0,ap=np(Ce()),op=i;Zs=ka.default=(0,ap.default)((0,op.jsx)("path",{d:"M12 3c-4.8 0-9 3.86-9 9 0 2.12.74 4.07 1.97 5.61l-1.68 1.68c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l1.68-1.68C7.93 20.26 9.88 21 12 21c2.3 0 4.61-.88 6.36-2.64C20.12 16.61 21 14.3 21 12V5c0-1.1-.9-2-2-2zm3.83 9.26-5.16 4.63c-.16.15-.41.14-.56-.01-.14-.14-.16-.36-.04-.52l2.44-3.33-4.05-.4c-.44-.04-.63-.59-.3-.89l5.16-4.63c.16-.15.41-.14.56.01.14.14.16.36.04.52l-2.44 3.33 4.05.4c.45.04.63.59.3.89"}),"EnergySavingsLeafRounded");var $a={},sp=fe;Object.defineProperty($a,"__esModule",{value:!0});var Qs=$a.default=void 0,ip=sp(Ce()),Hs=i;Qs=$a.default=(0,ip.default)([(0,Hs.jsx)("path",{d:"M14.14 12h-.06c.81 0 1.28-.91.82-1.57L9.82 3.17c-.4-.57-1.24-.57-1.64 0L3.1 10.43c-.46.66.01 1.57.82 1.57h-.06L.99 16.46c-.43.66.05 1.54.84 1.54H7v2c0 1.1.9 2 2 2s2-.9 2-2v-2h5.17c.79 0 1.27-.88.84-1.54z"},"0"),(0,Hs.jsx)("path",{d:"M23.01 16.46 20.14 12h-.06c.81 0 1.28-.91.82-1.57l-5.08-7.26c-.4-.57-1.24-.57-1.64 0l-1.57 2.24 3.11 4.44c.43.61.48 1.41.14 2.07-.08.16-.18.3-.3.43l2.29 3.57c.4.62.42 1.4.07 2.04-.01.02-.02.03-.03.04h4.28c.79 0 1.27-.88.84-1.54M13 20c0 1.1.9 2 2 2s2-.9 2-2v-1h-4z"},"1")],"ForestRounded");var Ma={},lp=fe;Object.defineProperty(Ma,"__esModule",{value:!0});var ei=Ma.default=void 0,up=lp(Ce()),cp=i;ei=Ma.default=(0,up.default)((0,cp.jsx)("path",{d:"M12 4V2.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V6c3.31 0 6 2.69 6 6 0 .79-.15 1.56-.44 2.25-.15.36-.04.77.23 1.04.51.51 1.37.33 1.64-.34.37-.91.57-1.91.57-2.95 0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-.79.15-1.56.44-2.25.15-.36.04-.77-.23-1.04-.51-.51-1.37-.33-1.64.34C4.2 9.96 4 10.96 4 12c0 4.42 3.58 8 8 8v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36z"}),"LoopRounded");var Pa={},dp=fe;Object.defineProperty(Pa,"__esModule",{value:!0});var ti=Pa.default=void 0,fp=dp(Ce()),pp=i;ti=Pa.default=(0,fp.default)((0,pp.jsx)("path",{d:"M16.96 12h.08c.81 0 1.28-.91.82-1.57l-5.08-7.25c-.4-.57-1.24-.57-1.64 0L6.1 10.43c-.46.66.02 1.57.83 1.57h.04l-2.9 4.46c-.44.66.04 1.54.84 1.54h5.08v2.02c0 1.09.89 1.98 1.98 1.98 1.09 0 1.98-.89 1.98-1.98V18h5.15c.8 0 1.28-.89.83-1.55z"}),"ParkRounded");var Aa={},hp=fe;Object.defineProperty(Aa,"__esModule",{value:!0});var ri=Aa.default=void 0,mp=hp(Ce()),bp=i;ri=Aa.default=(0,mp.default)((0,bp.jsx)("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded");var Da={},vp=fe;Object.defineProperty(Da,"__esModule",{value:!0});var ni=Da.default=void 0,gp=vp(Ce()),yp=i;ni=Da.default=(0,gp.default)((0,yp.jsx)("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded");const ai={400:"#8d6e63",700:"#5d4037"},Se={actionButton:{minWidth:"auto !important"},containerField:{background:ue.background,border:`solid 1px ${ue.primary}`,borderRadius:"1rem"},containerHidden:{background:ue.background,border:`solid 1px ${ue.borderGrey}`,borderRadius:"1rem"},containerTitle:{background:ai[700],border:`solid 1px ${ai[400]}`,borderRadius:"1rem"},containerTree:{background:ue.tertiary,border:`solid 1px ${ue.primary}`,borderRadius:"1rem"},containerValue:{background:ue.background,border:`solid 1px ${ue.secondary}`,borderRadius:"1rem"},icon:{color:ue.grey500},nodeSvg:{stroke:"transparent !important"},stepChip:{fontSize:".7rem !important",fontWeight:"bold",height:"20px !important"},title:{display:"-webkit-box",margin:0,overflow:"hidden",textAlign:"right",textOverflow:"ellipsis",webkitBoxOrient:"vertical",webkitLineClamp:2}},xp=e=>{const t=!!e,n=e==="tree",r=e==="hidden";return e==="title"?Se.containerTitle:r?Se.containerHidden:n?Se.containerTree:t?Se.containerField:Se.containerValue},Cp=({nodeDatum:e,onAddChildren:t,onEditChildren:n,onDeleteChildren:r,onOpenTreeModal:a,hierarchyPointNode:o,size:s=220})=>{var F;const{t:l}=Pe.useTranslation(["translation","form"]),{attributes:c}=e||{},{isRoot:f,isLeaf:h,required:m,isDecision:b,step:g,type:v,label:u,repeatable:y,tag:w}=c||{},j=!!v,k=v==="tree",M=v==="hidden",x=!j,A=!f&&!h;return i.jsxs("g",{children:[i.jsx(p.GlobalStyles,{styles:{".rd3t-node svg":Se.nodeSvg}}),i.jsx(p.Box,{component:"foreignObject",height:s,width:s,x:`-${s/2}`,y:`-${s/2}`,sx:xp(v),children:i.jsxs(p.Box,{flex:1,display:"flex",p:2,height:"100%",flexDirection:"column",justifyContent:"space-between",children:[i.jsxs(p.Stack,{alignItems:"flex-end",spacing:.5,children:[j&&i.jsxs(p.Stack,{direction:"row",spacing:1,alignItems:"center",children:[g&&i.jsx(p.Tooltip,{title:`${l("step",{ns:"form"})} ${(F=e==null?void 0:e.attributes)==null?void 0:F.step}`,placement:"left",arrow:!0,children:i.jsx(p.Chip,{color:"primary",size:"small",label:g,sx:Se.stepChip})}),i.jsx(p.Typography,{variant:"subtitle2",sx:Se.title,children:i.jsx("strong",{children:u})})]}),j&&i.jsx(p.Chip,{color:"info",size:"small",label:l(`type.${v}`,{ns:"form"})}),w&&i.jsx(p.Chip,{variant:"outlined",color:"warning",size:"small",label:w}),m&&i.jsx(p.Stack,{direction:"row",spacing:.5,children:m&&i.jsx(p.Typography,{variant:"body2",sx:{color:({palette:be})=>be.error.main},children:l("required")})}),i.jsx(p.Stack,{spacing:.5,alignItems:"flex-end",children:x&&i.jsx(p.Typography,{variant:"subtitle2",sx:Se.title,children:i.jsx("strong",{children:u})})}),i.jsxs(p.Stack,{paddingTop:.5,spacing:.5,direction:"row",children:[y&&i.jsx(p.Tooltip,{title:l("isARepeatable"),placement:"bottom",arrow:!0,children:i.jsx(ei,{style:Se.icon})}),h&&i.jsx(p.Tooltip,{title:l("isALeaf"),placement:"bottom",arrow:!0,children:i.jsx(Zs,{style:Se.icon})}),M&&i.jsx(p.Tooltip,{title:l("isAHidden"),placement:"bottom",arrow:!0,children:i.jsx(ri,{style:Se.icon})}),f&&i.jsx(p.Tooltip,{title:l("isTheRoot"),placement:"bottom",arrow:!0,children:i.jsx(ti,{style:Se.icon})}),A&&i.jsx(p.Tooltip,{title:l("isABranch"),placement:"bottom",arrow:!0,children:i.jsx(Ks,{style:Se.icon})}),k&&i.jsx(p.Tooltip,{title:l("isATree"),placement:"bottom",arrow:!0,children:i.jsx(Qs,{style:Se.icon})})]})]}),i.jsxs(p.Stack,{direction:"row",justifyContent:"flex-end",spacing:0,alignSelf:"flex-end",children:[!f&&i.jsx(p.Tooltip,{title:l("remove"),arrow:!0,children:i.jsx(p.Button,{variant:"text",sx:Se.actionButton,size:"small",color:"error",onClick:()=>r==null?void 0:r(o),children:i.jsx(Js,{})})}),!x&&i.jsx(p.Tooltip,{title:l("edit"),arrow:!0,children:i.jsx(p.Button,{variant:"text",color:"secondary",sx:Se.actionButton,size:"small",onClick:()=>n==null?void 0:n(o),children:i.jsx(Xs,{})})}),!b&&i.jsx(p.Tooltip,{title:l("add"),arrow:!0,children:i.jsx(p.Button,{variant:"text",color:"success",sx:Se.actionButton,size:"small",onClick:()=>t==null?void 0:t(o),children:i.jsx(Gs,{})})}),k&&i.jsx(p.Tooltip,{title:l("show"),arrow:!0,children:i.jsx(p.Button,{variant:"text",color:"info",sx:Se.actionButton,size:"small",onClick:()=>a==null?void 0:a(o),children:i.jsx(ni,{})})})]})]})})]})},Tp=_.memo(Cp),oi=()=>{const{setModalOpen:e,setCurrentHierarchyPointNode:t,setTreeModalOpen:n,setTreePath:r}=Re();return{handleAddChildren:f=>{t(f),e("add")},handleCloseTreeModal:()=>{r([]),n(!1)},handleDeleteChildren:f=>{t(f),e("delete")},handleEditChildren:f=>{t(f),e("edit")},handleOpenTreeModal:f=>{var m,b,g;const h={label:((m=f==null?void 0:f.data.attributes)==null?void 0:m.label)||"",path:((g=(b=f==null?void 0:f.data)==null?void 0:b.attributes)==null?void 0:g.treePath)||""};r(v=>[...v,h]),n(!0)}}},_p=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>{const{handleDeleteChildren:l,handleEditChildren:c,handleAddChildren:f,handleOpenTreeModal:h}=oi();return i.jsx(Tp,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o,onAddChildren:f,onOpenTreeModal:h,onDeleteChildren:l,onEditChildren:c})},si=({nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>i.jsx(_p,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:n,onNodeClick:r,onNodeMouseOver:a,onNodeMouseOut:o}),Ep=()=>{const{t:e}=Pe.useTranslation(["modal","snackMessage"]),{currentHierarchyPointNode:t,modalOpen:n,setModalOpen:r,dispatchTree:a}=Re(),o=n==="edit";return{closeModal:()=>{r(null)},getTitleModalDelete:()=>{var u;const{label:g,name:v}=((u=t==null?void 0:t.data)==null?void 0:u.attributes)||{};return e("deleteTitle",{name:g||v,ns:"modal"})},getTitleModalMutation:()=>{var y;const{label:g,name:v}=((y=t==null?void 0:t.data)==null?void 0:y.attributes)||{};return o?e(o?"editTitle":"addTitle",{name:g||v,ns:"modal"}):e("addFirstTitle",{ns:"modal"})},handleChangeTree:g=>{try{a(ha(JSON.parse(g)))}catch{return!1}},isDeleteModal:n==="delete",isModalMutationOpen:o||n==="add"}},wp=()=>{const{currentTree:e,setCurrentTree:t,tree:n}=Re(),{name:r,errorName:a,id:o}=e;return{disabled:!!e.id&&!n,errorName:a,handleChangeName:c=>{const{value:f}=c.target;if(!f){t(h=>({...h,errorName:"Champs requis",name:c.target.value}));return}t(h=>({...h,errorName:"",name:c.target.value}))},id:o,name:r}},jp=()=>{const{t:e}=Pe.useTranslation("form"),{name:t,handleChangeName:n,errorName:r,disabled:a}=wp();return i.jsx(p.TextField,{required:!0,label:e("treeName",{ns:"form"}),size:"small",onChange:n,value:t,error:!!r,disabled:a})},Op=()=>{const{tree:e,treeModalOpen:t,treePath:n,backendConfig:r}=Re(),{handleCloseTreeModal:a}=oi(),{getTitleModalMutation:o,closeModal:s,getTitleModalDelete:l,isModalMutationOpen:c,isDeleteModal:f,handleChangeTree:h}=Ep(),m=n==null?void 0:n.at(-1),b=m==null?void 0:m.path,g=m==null?void 0:m.label,v=Gt(e,b);return i.jsxs(i.Fragment,{children:[i.jsxs(o0,{children:[i.jsx(r0,{children:i.jsxs(p.Stack,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[i.jsx(sl,{}),!!(r!=null&&r.baseUrl)&&i.jsxs(p.Stack,{direction:"row",alignItems:"center",spacing:2,children:[i.jsx(jp,{}),i.jsx(Ws,{size:"small",arrowOnly:!0,showBtnAddNewTree:!0,fetchWorkflowsOnOpen:!0})]})]})}),i.jsx(a0,{children:i.jsx(Za,{data:e,renderCustomNodeElement:si})}),i.jsx(i0,{children:i.jsx(fl,{value:e,onChange:h})}),i.jsx(e0,{children:i.jsx(Wf,{value:e})})]}),i.jsx(Is,{open:c,onClose:s,title:o(),children:i.jsx(U0,{onClose:s})}),i.jsx(Is,{open:f,onClose:s,title:l(),children:i.jsx(u0,{onClose:s})}),i.jsx(Qf,{open:t,onClose:a,title:g,children:i.jsx(Za,{data:v,renderCustomNodeElement:si})})]})},Rp="1.5.0",Sp=({children:e,initialTree:t,initialTreeId:n,backendConfig:r})=>{const[a,o]=_.useState(Ye.currentHierarchyPointNode),[s,l]=_.useState(Ye.modalOpen),[c,f]=_.useState(Ye.treeModalOpen),[h,m]=_.useState(Ye.treePath),[b,g]=_.useReducer(qf,t||Ye.tree),[v,u]=_.useState(n?{...Ye.currentTree,id:n}:Ye.currentTree),{data:y}=kr(n,{enabled:!!n});_.useEffect(()=>{y&&(u({id:y.id,name:y.label}),g(ha(y.workflow||null)))},[y]);const w=_.useMemo(()=>{var j,k;return{backendConfig:{...Ye.backendConfig,...r,baseUrl:((j=Ye==null?void 0:Ye.backendConfig)==null?void 0:j.baseUrl)||"",endpoints:{...(k=Ye.backendConfig)==null?void 0:k.endpoints,...r==null?void 0:r.endpoints}},currentHierarchyPointNode:a,currentTree:v,dispatchTree:g,modalOpen:s,setCurrentHierarchyPointNode:o,setCurrentTree:u,setModalOpen:l,setTreeModalOpen:f,setTreePath:m,tree:b,treeModalOpen:c,treePath:h,version:Rp}},[r,a,v,s,b,c,h]);return i.jsx(Ja.Provider,{value:w,children:e})},kp={close:"Close",copyToClipboard:"Copy tree to clipboard",createTree:"Create Tree",downloadJSONFile:"Download JSON File",reset:"Reset",resetTree:"Reset tree",save:"Save",update:"Update"},$p={error:{fetchTree:"An error has occurred. Please try again",saveTree:"An error has occurred. Please try again",updateTree:"An error has occurred. Please try again"},success:{copyToClipboard:"Copied to clipboard",saveTree:"Tree registered",updateTree:"Tree updated"}},Mp={add:"Add",cancel:"Cancel",disabled:"Disabled",edit:"Edit",initialQueryEnable:"Enable initial API call",isABranch:"Is a branch",isAHidden:"Is a hidden field",isALeaf:"Is a leaf",isARepeatable:"Is a repeatable",isATree:"Is a tree",isTheRoot:"Is the root",label:"Label",multiple:"Multiple",name:"Name",parentRef:"Parent element",remove:"Remove",required:"Required",save:"Save",show:"Show",tag:"Tag",type:"Type",uuid:"UUID",validate:"Validate",value:"Value",values:"Values"},Pp={close:"Fermer",copyToClipboard:"Copier l'arbre dans le presse-papiers",createTree:"Créer un arbre",downloadJSONFile:"Télécharger le fichier JSON",reset:"Réinitialiser",resetTree:"Réinitialiser l'arbre",save:"Enregistrer",update:"Modifier"},ii={additionalParams:"Paramètres additionnels",ancestor:"Ancêtre",apiRoute:"Api route",cardNumber:"Numéro de carte",dataMapping:"Mapping de données",decisionField:"Champs de décision",disabledPast:"Passé désactivé",email:"Email",firstNameAndLastName:"Prénom et nom",helperText:"Texte d'information",hiddenValue:"Valeur caché",key:"Clé",label:"Label",letter:"Lettre",message:"Message",mustBeUnique:"Doit être unique",newTree:"Nouvel arbre",noAncestorFound:"Aucun parent trouvé",number:"Chiffre",numberAndLetter:"Chiffre et lettre",offMessage:"Message (désactiver)",onMessage:"Message (activer)",pattern:"Expression régulière",patternMessage:"Message d'aide invalide",phoneNumber:"Numéro de téléphone",repeatable:"Répétable",searchKeyPlaceholder:"text",staticFields:"Champs statiques",step:"Étape",tree:"Arbre",treeName:"Nom de l'arbre",type:{address:"Adresse",autocomplete:"Autocomplétion",checkbox:"Case à cocher",date:"Date",dateRange:"Plage de dates",dynamicSelect:"Sélection dynamique",email:"Email",file:"Fichier",hidden:"Champs caché",number:"Nombre",password:"Mot de passe",radio:"Radio",select:"Select",switch:"Switch",tel:"Téléphone",text:"Texte",time:"Temps",timeRange:"Plage de temps",title:"Titre",tree:"Arbre",url:"URL"},url:"URL",urlConstruction:"Construction de l'URL",value:"Valeur",values:"Valeurs",warningApiAutocomplete:{response:"dois avoir comme réponse",url:"La route de l'API"},warningApiSelect:{response:"à l'emplacement de votre variable.",url:"Pour intégrer automatiquement la valeur du parent dans l'URL",warning:"placez {{}}"}},li={addFirstTitle:"Ajouter un champ",addTitle:"Ajouter un champ à « {{name}} »",deleteTitle:"Voulez vraiment supprimer « {{name}} »",editTitle:"Éditer le champ « {{name}} »",resetTreeContent:"Êtes-vous sûr de vouloir réinitialiser l'arbre ?",saveTree:"Enregistrer l'arbre"},Ap={error:{fetchTree:"Une erreur est survenue veuillez réessayer",saveTree:"Une erreur est survenue veuillez réessayer",updateTree:"Une erreur est survenue veuillez réessayer"},success:{copyToClipboard:"Copié dans le presse-papiers",saveTree:"Arbre enregistré",updateTree:"Arbre mis à jour"}},Dp={add:"Ajouter",cancel:"Annuler",disabled:"Désactivé",edit:"Éditer",initialQueryEnable:"Activer un appel API intiale",isABranch:"Est une branche",isAHidden:"Est un champs caché",isALeaf:"Est une feuille",isARepeatable:"Est répétable",isATree:"Est un arbre",isTheRoot:"Est la racine",label:"Label",multiple:"Multiple",name:"Nom",parentRef:"Element parent",remove:"Supprimer",required:"Requis",save:"Enregistrer",show:"Afficher",tag:"Tag",type:"Type",uuid:"UUID",validate:"Valider",value:"Valeur",values:"Valeurs"};Ht.use(Ui).use(Pe.initReactI18next).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:{en:{button:kp,form:ii,modal:li,snackMessage:$p,translation:Mp},fr:{button:Pp,form:ii,modal:li,snackMessage:Ap,translation:Dp}},returnNull:!1}).then(()=>{document.documentElement.lang!==Ht.resolvedLanguage&&Ht.resolvedLanguage&&document.documentElement.setAttribute("lang",Ht.resolvedLanguage)}),Ht.on("languageChanged",e=>{document.documentElement.setAttribute("lang",e)});const Ip=({initialTree:e,initialTreeId:t,backendConfig:n})=>(_.useLayoutEffect(()=>{It.defaults.baseURL=n==null?void 0:n.baseUrl,n!=null&&n.authToken&&(It.defaults.headers.common.Authorization=`Bearer ${n==null?void 0:n.authToken}`)},[n==null?void 0:n.authToken,n==null?void 0:n.baseUrl]),i.jsx(Dt.QueryClientProvider,{client:Zi,children:i.jsx(el,{authToken:n==null?void 0:n.authToken,children:i.jsx(Sp,{backendConfig:n,initialTree:e,initialTreeId:t,children:i.jsx(Xi,{children:i.jsx(al,{children:i.jsx(Op,{})})})})})}));Me.TreePlusIcon=Ga,Me.Treege=Ip,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})});
97
+ } });`:At(12,T?` (${T})`:"",JSON.stringify(c.main)));return ri(c,"light",j,n),ri(c,"dark",_,n),c.contrastText||(c.contrastText=m(c.main)),c};let y;return t==="light"?y=Ho():t==="dark"&&(y=ei()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Qe({common:{...Rr},mode:t,primary:g({color:a,name:"primary"}),secondary:g({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:s,name:"error"}),warning:g({color:b,name:"warning"}),info:g({color:f,name:"info"}),success:g({color:p,name:"success"}),grey:jd,contrastThreshold:r,getContrastText:m,augmentColor:g,tonalOffset:n,...y},o)}function Md(e){const t={};return Object.entries(e).forEach(n=>{const[o,a]=n;typeof a=="object"&&(t[o]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Dd(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Id(e){return Math.round(e*1e5)/1e5}const ni={textTransform:"uppercase"},ai='"Roboto", "Helvetica", "Arial", sans-serif';function Fd(e,t){const{fontFamily:r=ai,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:i=500,fontWeightBold:s=700,htmlFontSize:f=16,allVariants:p,pxToRem:b,...m}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const g=n/14,y=b||(T=>`${T/f*g}rem`),v=(T,w,j,_,O)=>({fontFamily:r,fontWeight:T,fontSize:y(w),lineHeight:j,...r===ai?{letterSpacing:`${Id(_/w)}em`}:{},...O,...p}),c={h1:v(o,96,1.167,-1.5),h2:v(o,60,1.2,-.5),h3:v(a,48,1.167,0),h4:v(a,34,1.235,.25),h5:v(a,24,1.334,0),h6:v(i,20,1.6,.15),subtitle1:v(a,16,1.75,.15),subtitle2:v(i,14,1.57,.1),body1:v(a,16,1.5,.15),body2:v(a,14,1.43,.15),button:v(i,14,1.75,.4,ni),caption:v(a,12,1.66,.4),overline:v(a,12,2.66,1,ni),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qe({htmlFontSize:f,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:i,fontWeightBold:s,...c},m,{clone:!1})}const Bd=.2,Vd=.14,Ld=.12;function xe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Bd})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Vd})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ld})`].join(",")}const qd=["none",xe(0,2,1,-1,0,1,1,0,0,1,3,0),xe(0,3,1,-2,0,2,2,0,0,1,5,0),xe(0,3,3,-2,0,3,4,0,0,1,8,0),xe(0,2,4,-1,0,4,5,0,0,1,10,0),xe(0,3,5,-1,0,5,8,0,0,1,14,0),xe(0,3,5,-1,0,6,10,0,0,1,18,0),xe(0,4,5,-2,0,7,10,1,0,2,16,1),xe(0,5,5,-3,0,8,10,1,0,3,14,2),xe(0,5,6,-3,0,9,12,1,0,3,16,2),xe(0,6,6,-3,0,10,14,1,0,4,18,3),xe(0,6,7,-4,0,11,15,1,0,4,20,3),xe(0,7,8,-4,0,12,17,2,0,5,22,4),xe(0,7,8,-4,0,13,19,2,0,5,24,4),xe(0,7,9,-4,0,14,21,2,0,5,26,4),xe(0,8,9,-5,0,15,22,2,0,6,28,5),xe(0,8,10,-5,0,16,24,2,0,6,30,5),xe(0,8,11,-5,0,17,26,2,0,6,32,5),xe(0,9,11,-5,0,18,28,2,0,7,34,6),xe(0,9,12,-6,0,19,29,2,0,7,36,6),xe(0,10,13,-6,0,20,31,3,0,8,38,7),xe(0,10,13,-6,0,21,33,3,0,8,40,7),xe(0,10,14,-6,0,22,35,3,0,8,42,7),xe(0,11,14,-7,0,23,36,3,0,9,44,8),xe(0,11,15,-7,0,24,38,3,0,9,46,8)],Nd={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},zd={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function oi(e){return`${Math.round(e)}ms`}function Ud(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Wd(e){const t={...Nd,...e.easing},r={...zd,...e.duration};return{getAutoHeightDuration:Ud,create:(o=["all"],a={})=>{const{duration:i=r.standard,easing:s=t.easeInOut,delay:f=0,...p}=a;if(process.env.NODE_ENV!=="production"){const b=g=>typeof g=="string",m=g=>!Number.isNaN(parseFloat(g));!b(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(i)&&!b(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),b(s)||console.error('MUI: Argument "easing" must be a string.'),!m(f)&&!b(f)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
98
+ `)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(b=>`${b} ${typeof i=="string"?i:oi(i)} ${s} ${typeof f=="string"?f:oi(f)}`).join(",")},...e,easing:t,duration:r}}const Yd={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Gd(e){return xt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function ii(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let a=0;a<o.length;a++){const[i,s]=o[a];!Gd(s)||i.startsWith("unstable_")?delete n[i]:xt(s)&&(n[i]={...s},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
99
+
100
+ const theme = ${JSON.stringify(t,null,2)};
101
+
102
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
103
+ theme.transitions = createTransitions(theme.transitions || {});
104
+
105
+ export default theme;`}function Ca(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:a={},transitions:i={},typography:s={},shape:f,...p}=e;if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":At(20));const b=xa(a),m=Wo(e);let g=Qe(m,{mixins:Dd(m.breakpoints,n),palette:b,shadows:qd.slice(),typography:Fd(b,s),transitions:Wd(i),zIndex:{...Yd}});if(g=Qe(g,p),g=t.reduce((y,v)=>Qe(y,v),g),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],v=(c,T)=>{let w;for(w in c){const j=c[w];if(y.includes(w)&&Object.keys(j).length>0){if(process.env.NODE_ENV!=="production"){const _=na("",w);console.error([`MUI: The \`${T}\` component increases the CSS specificity of the \`${w}\` internal state.`,"You can not override it like this: ",JSON.stringify(c,null,2),"",`Instead, you need to use the '&.${_}' syntax:`,JSON.stringify({root:{[`&.${_}`]:j}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
106
+ `))}c[w]={}}}};Object.keys(g.components).forEach(c=>{const T=g.components[c].styleOverrides;T&&c.startsWith("Mui")&&v(T,c)})}return g.unstable_sxConfig={...wn,...p==null?void 0:p.unstable_sxConfig},g.unstable_sx=function(v){return Xt({sx:v,theme:this})},g.toRuntimeSource=ii,g}function Kd(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Jd=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Kd(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function si(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function li(e){return e==="dark"?Jd:[]}function Qd(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,a=xa(t);return{palette:a,opacity:{...si(a.mode),...r},overlays:n||li(a.mode),...o}}function Xd(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Zd=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Hd=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let a=o;if(o==="class"&&(a=".%s"),o==="data"&&(a="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(a=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return Zd(e.cssVarPrefix).forEach(s=>{i[s]=r[s],delete r[s]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:i}}:a?{[a.replace("%s",t)]:i,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...i}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function ef(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function x(e,t,r){!e[t]&&r&&(e[t]=r)}function Sr(e){return typeof e!="string"||!e.startsWith("hsl")?e:Jo(e)}function Tt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Er(Sr(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
107
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function tf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const mt=e=>{try{return e()}catch{}},rf=(e="mui")=>Cd(e);function Ta(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=Qd({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:a,...i}=Ca({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...si(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||li(o)},i}function nf(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:i=Xd,colorSchemeSelector:s=r.light&&r.dark?"media":void 0,rootSelector:f=":root",...p}=e,b=Object.keys(r)[0],m=n||(r.light&&b!=="light"?"light":b),g=rf(a),{[m]:y,light:v,dark:c,...T}=r,w={...T};let j=y;if((m==="dark"&&!("dark"in r)||m==="light"&&!("light"in r))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:At(21,m));const _=Ta(w,j,p,m);v&&!w.light&&Ta(w,v,void 0,"light"),c&&!w.dark&&Ta(w,c,void 0,"dark");let O={defaultColorScheme:m,..._,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:f,getCssVar:g,colorSchemes:w,font:{...Md(_.typography),..._.font},spacing:tf(p.spacing)};Object.keys(O.colorSchemes).forEach(ee=>{const u=O.colorSchemes[ee].palette,$=V=>{const F=V.split("-"),te=F[1],ge=F[2];return g(V,u[te][ge])};if(u.mode==="light"&&(x(u.common,"background","#fff"),x(u.common,"onBackground","#000")),u.mode==="dark"&&(x(u.common,"background","#000"),x(u.common,"onBackground","#fff")),ef(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){x(u.Alert,"errorColor",me(u.error.light,.6)),x(u.Alert,"infoColor",me(u.info.light,.6)),x(u.Alert,"successColor",me(u.success.light,.6)),x(u.Alert,"warningColor",me(u.warning.light,.6)),x(u.Alert,"errorFilledBg",$("palette-error-main")),x(u.Alert,"infoFilledBg",$("palette-info-main")),x(u.Alert,"successFilledBg",$("palette-success-main")),x(u.Alert,"warningFilledBg",$("palette-warning-main")),x(u.Alert,"errorFilledColor",mt(()=>u.getContrastText(u.error.main))),x(u.Alert,"infoFilledColor",mt(()=>u.getContrastText(u.info.main))),x(u.Alert,"successFilledColor",mt(()=>u.getContrastText(u.success.main))),x(u.Alert,"warningFilledColor",mt(()=>u.getContrastText(u.warning.main))),x(u.Alert,"errorStandardBg",be(u.error.light,.9)),x(u.Alert,"infoStandardBg",be(u.info.light,.9)),x(u.Alert,"successStandardBg",be(u.success.light,.9)),x(u.Alert,"warningStandardBg",be(u.warning.light,.9)),x(u.Alert,"errorIconColor",$("palette-error-main")),x(u.Alert,"infoIconColor",$("palette-info-main")),x(u.Alert,"successIconColor",$("palette-success-main")),x(u.Alert,"warningIconColor",$("palette-warning-main")),x(u.AppBar,"defaultBg",$("palette-grey-100")),x(u.Avatar,"defaultBg",$("palette-grey-400")),x(u.Button,"inheritContainedBg",$("palette-grey-300")),x(u.Button,"inheritContainedHoverBg",$("palette-grey-A100")),x(u.Chip,"defaultBorder",$("palette-grey-400")),x(u.Chip,"defaultAvatarColor",$("palette-grey-700")),x(u.Chip,"defaultIconColor",$("palette-grey-700")),x(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),x(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),x(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),x(u.LinearProgress,"primaryBg",be(u.primary.main,.62)),x(u.LinearProgress,"secondaryBg",be(u.secondary.main,.62)),x(u.LinearProgress,"errorBg",be(u.error.main,.62)),x(u.LinearProgress,"infoBg",be(u.info.main,.62)),x(u.LinearProgress,"successBg",be(u.success.main,.62)),x(u.LinearProgress,"warningBg",be(u.warning.main,.62)),x(u.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),x(u.Slider,"primaryTrack",be(u.primary.main,.62)),x(u.Slider,"secondaryTrack",be(u.secondary.main,.62)),x(u.Slider,"errorTrack",be(u.error.main,.62)),x(u.Slider,"infoTrack",be(u.info.main,.62)),x(u.Slider,"successTrack",be(u.success.main,.62)),x(u.Slider,"warningTrack",be(u.warning.main,.62));const V=Dn(u.background.default,.8);x(u.SnackbarContent,"bg",V),x(u.SnackbarContent,"color",mt(()=>u.getContrastText(V))),x(u.SpeedDialAction,"fabHoverBg",Dn(u.background.paper,.15)),x(u.StepConnector,"border",$("palette-grey-400")),x(u.StepContent,"border",$("palette-grey-400")),x(u.Switch,"defaultColor",$("palette-common-white")),x(u.Switch,"defaultDisabledColor",$("palette-grey-100")),x(u.Switch,"primaryDisabledColor",be(u.primary.main,.62)),x(u.Switch,"secondaryDisabledColor",be(u.secondary.main,.62)),x(u.Switch,"errorDisabledColor",be(u.error.main,.62)),x(u.Switch,"infoDisabledColor",be(u.info.main,.62)),x(u.Switch,"successDisabledColor",be(u.success.main,.62)),x(u.Switch,"warningDisabledColor",be(u.warning.main,.62)),x(u.TableCell,"border",be(Mn(u.divider,1),.88)),x(u.Tooltip,"bg",Mn(u.grey[700],.92))}if(u.mode==="dark"){x(u.Alert,"errorColor",be(u.error.light,.6)),x(u.Alert,"infoColor",be(u.info.light,.6)),x(u.Alert,"successColor",be(u.success.light,.6)),x(u.Alert,"warningColor",be(u.warning.light,.6)),x(u.Alert,"errorFilledBg",$("palette-error-dark")),x(u.Alert,"infoFilledBg",$("palette-info-dark")),x(u.Alert,"successFilledBg",$("palette-success-dark")),x(u.Alert,"warningFilledBg",$("palette-warning-dark")),x(u.Alert,"errorFilledColor",mt(()=>u.getContrastText(u.error.dark))),x(u.Alert,"infoFilledColor",mt(()=>u.getContrastText(u.info.dark))),x(u.Alert,"successFilledColor",mt(()=>u.getContrastText(u.success.dark))),x(u.Alert,"warningFilledColor",mt(()=>u.getContrastText(u.warning.dark))),x(u.Alert,"errorStandardBg",me(u.error.light,.9)),x(u.Alert,"infoStandardBg",me(u.info.light,.9)),x(u.Alert,"successStandardBg",me(u.success.light,.9)),x(u.Alert,"warningStandardBg",me(u.warning.light,.9)),x(u.Alert,"errorIconColor",$("palette-error-main")),x(u.Alert,"infoIconColor",$("palette-info-main")),x(u.Alert,"successIconColor",$("palette-success-main")),x(u.Alert,"warningIconColor",$("palette-warning-main")),x(u.AppBar,"defaultBg",$("palette-grey-900")),x(u.AppBar,"darkBg",$("palette-background-paper")),x(u.AppBar,"darkColor",$("palette-text-primary")),x(u.Avatar,"defaultBg",$("palette-grey-600")),x(u.Button,"inheritContainedBg",$("palette-grey-800")),x(u.Button,"inheritContainedHoverBg",$("palette-grey-700")),x(u.Chip,"defaultBorder",$("palette-grey-700")),x(u.Chip,"defaultAvatarColor",$("palette-grey-300")),x(u.Chip,"defaultIconColor",$("palette-grey-300")),x(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),x(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),x(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),x(u.LinearProgress,"primaryBg",me(u.primary.main,.5)),x(u.LinearProgress,"secondaryBg",me(u.secondary.main,.5)),x(u.LinearProgress,"errorBg",me(u.error.main,.5)),x(u.LinearProgress,"infoBg",me(u.info.main,.5)),x(u.LinearProgress,"successBg",me(u.success.main,.5)),x(u.LinearProgress,"warningBg",me(u.warning.main,.5)),x(u.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),x(u.Slider,"primaryTrack",me(u.primary.main,.5)),x(u.Slider,"secondaryTrack",me(u.secondary.main,.5)),x(u.Slider,"errorTrack",me(u.error.main,.5)),x(u.Slider,"infoTrack",me(u.info.main,.5)),x(u.Slider,"successTrack",me(u.success.main,.5)),x(u.Slider,"warningTrack",me(u.warning.main,.5));const V=Dn(u.background.default,.98);x(u.SnackbarContent,"bg",V),x(u.SnackbarContent,"color",mt(()=>u.getContrastText(V))),x(u.SpeedDialAction,"fabHoverBg",Dn(u.background.paper,.15)),x(u.StepConnector,"border",$("palette-grey-600")),x(u.StepContent,"border",$("palette-grey-600")),x(u.Switch,"defaultColor",$("palette-grey-300")),x(u.Switch,"defaultDisabledColor",$("palette-grey-600")),x(u.Switch,"primaryDisabledColor",me(u.primary.main,.55)),x(u.Switch,"secondaryDisabledColor",me(u.secondary.main,.55)),x(u.Switch,"errorDisabledColor",me(u.error.main,.55)),x(u.Switch,"infoDisabledColor",me(u.info.main,.55)),x(u.Switch,"successDisabledColor",me(u.success.main,.55)),x(u.Switch,"warningDisabledColor",me(u.warning.main,.55)),x(u.TableCell,"border",me(Mn(u.divider,1),.68)),x(u.Tooltip,"bg",Mn(u.grey[700],.92))}Tt(u.background,"default"),Tt(u.background,"paper"),Tt(u.common,"background"),Tt(u.common,"onBackground"),Tt(u,"divider"),Object.keys(u).forEach(V=>{const F=u[V];V!=="tonalOffset"&&F&&typeof F=="object"&&(F.main&&x(u[V],"mainChannel",Er(Sr(F.main))),F.light&&x(u[V],"lightChannel",Er(Sr(F.light))),F.dark&&x(u[V],"darkChannel",Er(Sr(F.dark))),F.contrastText&&x(u[V],"contrastTextChannel",Er(Sr(F.contrastText))),V==="text"&&(Tt(u[V],"primary"),Tt(u[V],"secondary")),V==="action"&&(F.active&&Tt(u[V],"active"),F.selected&&Tt(u[V],"selected")))})}),O=t.reduce((ee,u)=>Qe(ee,u),O);const C={prefix:a,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:Hd(O)},{vars:I,generateThemeVars:D,generateStyleSheets:se}=Ed(O,C);return O.vars=I,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([ee,u])=>{O[ee]=u}),O.generateThemeVars=D,O.generateStyleSheets=se,O.generateSpacing=function(){return Uo(p.spacing,aa(this))},O.getColorSchemeSelector=Rd(s),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=i,O.unstable_sxConfig={...wn,...p==null?void 0:p.unstable_sxConfig},O.unstable_sx=function(u){return Xt({sx:u,theme:this})},O.toRuntimeSource=ii,O}function ci(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:xa({...r===!0?{}:r.palette,mode:t})})}function af(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...i}=e,s=a||"light",f=o==null?void 0:o[s],p={...o,...r?{[s]:{...typeof f!="boolean"&&f,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Ca(e,...t);let b=r;"palette"in e||p[s]&&(p[s]!==!0?b=p[s].palette:s==="dark"&&(b={mode:"dark"}));const m=Ca({...e,palette:b},...t);return m.defaultColorScheme=s,m.colorSchemes=p,m.palette.mode==="light"&&(m.colorSchemes.light={...p.light!==!0&&p.light,palette:m.palette},ci(m,"dark",p.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:m.palette},ci(m,"light",p.light)),m}return!r&&!("light"in p)&&s==="light"&&(p.light=!0),nf({...i,colorSchemes:p,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const of=af(),sf="$$material";function lf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cf=ld({themeId:sf,defaultTheme:of,rootShouldForwardProp:e=>lf(e)&&e!=="classes"}),ui=xd;process.env.NODE_ENV!=="production"&&(ne.node,ne.object.isRequired);function uf(e){return yd(e)}function df(e){return na("MuiSvgIcon",e)}lc("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ff=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${$t(t)}`,`fontSize${$t(r)}`]};return ic(o,df,n)},pf=cf("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${$t(r.color)}`],t[`fontSize${$t(r.fontSize)}`]]}})(ui(({theme:e})=>{var t,r,n,o,a,i,s,f,p,b,m,g,y,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:c=>!c.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((i=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:i.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((f=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:f.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((b=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:b.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,c])=>c&&c.main).map(([c])=>{var T,w;return{props:{color:c},style:{color:(w=(T=(e.vars??e).palette)==null?void 0:T[c])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(g=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:v.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),kr=re.forwardRef(function(t,r){const n=uf({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:i="inherit",component:s="svg",fontSize:f="medium",htmlColor:p,inheritViewBox:b=!1,titleAccess:m,viewBox:g="0 0 24 24",...y}=n,v=re.isValidElement(o)&&o.type==="svg",c={...n,color:i,component:s,fontSize:f,instanceFontSize:t.fontSize,inheritViewBox:b,viewBox:g,hasSvgAsChild:v},T={};b||(T.viewBox=g);const w=ff(c);return l.jsxs(pf,{as:s,className:uc(w.root,a),focusable:"false",color:p,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:r,...T,...y,...v&&o.props,ownerState:c,children:[v?o.props.children:o,m?l.jsx("title",{children:m}):null]})});process.env.NODE_ENV!=="production"&&(kr.propTypes={children:ne.node,classes:ne.object,className:ne.string,color:ne.oneOfType([ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ne.string]),component:ne.elementType,fontSize:ne.oneOfType([ne.oneOf(["inherit","large","medium","small"]),ne.string]),htmlColor:ne.string,inheritViewBox:ne.bool,shapeRendering:ne.string,sx:ne.oneOfType([ne.arrayOf(ne.oneOfType([ne.func,ne.object,ne.bool])),ne.func,ne.object]),titleAccess:ne.string,viewBox:ne.string}),kr&&(kr.muiName="SvgIcon");function hf(e,t){function r(n,o){return l.jsx(kr,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=kr.muiName,re.memo(re.forwardRef(r))}const mf=el(Object.freeze(Object.defineProperty({__proto__:null,capitalize:$t,createChainedFunction:Gl,createSvgIcon:hf,debounce:Kl,deprecatedPropType:Jl,isMuiElement:Ql,ownerDocument:fo,ownerWindow:Xl,requirePropFactory:Zl,setRef:Hl,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
108
+ `)),go.configure(e)}},unstable_memoTheme:ui,unstable_useEnhancedEffect:po,unstable_useId:tc,unsupportedProp:rc,useControlled:nc,useEventCallback:ac,useForkRef:oc},Symbol.toStringTag,{value:"Module"})));var di;function Ae(){return di||(di=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=mf}(Kn)),Kn}var fi;function bf(){if(fi)return mr;fi=1;var e=_e();Object.defineProperty(mr,"__esModule",{value:!0}),mr.default=void 0;var t=e(Ae()),r=Re();return mr.default=(0,t.default)((0,r.jsx)("path",{d:"M15 1H4c-1.1 0-2 .9-2 2v13c0 .55.45 1 1 1s1-.45 1-1V4c0-.55.45-1 1-1h10c.55 0 1-.45 1-1s-.45-1-1-1m.59 4.59 4.83 4.83c.37.37.58.88.58 1.41V21c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h6.17c.53 0 1.04.21 1.42.59M15 12h4.5L14 6.5V11c0 .55.45 1 1 1"}),"FileCopyRounded"),mr}var gf=bf();const vf=Ee(gf);var _r={},pi;function yf(){if(pi)return _r;pi=1;var e=_e();Object.defineProperty(_r,"__esModule",{value:!0}),_r.default=void 0;var t=e(Ae()),r=Re();return _r.default=(0,t.default)((0,r.jsx)("path",{d:"M6.56 7.98C6.1 7.52 5.31 7.6 5 8.17c-.28.51-.5 1.03-.67 1.58-.19.63.31 1.25.96 1.25h.01c.43 0 .82-.28.94-.7.12-.4.28-.79.48-1.17.22-.37.15-.84-.16-1.15M5.31 13h-.02c-.65 0-1.15.62-.96 1.25.16.54.38 1.07.66 1.58.31.57 1.11.66 1.57.2.3-.31.38-.77.17-1.15-.2-.37-.36-.76-.48-1.16-.12-.44-.51-.72-.94-.72m2.85 6.02c.51.28 1.04.5 1.59.66.62.18 1.24-.32 1.24-.96v-.03c0-.43-.28-.82-.7-.94-.4-.12-.78-.28-1.15-.48-.38-.21-.86-.14-1.16.17l-.03.03c-.45.45-.36 1.24.21 1.55M13 4.07v-.66c0-.89-1.08-1.34-1.71-.71L9.17 4.83c-.4.4-.4 1.04 0 1.43l2.13 2.08c.63.62 1.7.17 1.7-.72V6.09c2.84.48 5 2.94 5 5.91 0 2.73-1.82 5.02-4.32 5.75-.41.12-.68.51-.68.94v.02c0 .65.61 1.14 1.23.96C17.57 18.71 20 15.64 20 12c0-4.08-3.05-7.44-7-7.93"}),"RotateLeftRounded"),_r}var xf=yf();const Cf=Ee(xf);var Or={},hi;function Tf(){if(hi)return Or;hi=1;var e=_e();Object.defineProperty(Or,"__esModule",{value:!0}),Or.default=void 0;var t=e(Ae()),r=Re();return Or.default=(0,t.default)((0,r.jsx)("path",{d:"M17.59 3.59c-.38-.38-.89-.59-1.42-.59H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7.83c0-.53-.21-1.04-.59-1.41zM12 19c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m1-10H7c-1.1 0-2-.9-2-2s.9-2 2-2h6c1.1 0 2 .9 2 2s-.9 2-2 2"}),"SaveRounded"),Or}var wf=Tf();const Ef=Ee(wf);var Ar={},mi;function Rf(){if(mi)return Ar;mi=1;var e=_e();Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.default=void 0;var t=e(Ae()),r=Re();return Ar.default=(0,t.default)((0,r.jsx)("path",{d:"M18 2h-7.17c-.53 0-1.04.21-1.42.59L4.59 7.41C4.21 7.79 4 8.3 4 8.83V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-6.35 14.65-2.79-2.79c-.32-.32-.1-.86.35-.86H11v-2.99c0-.55.44-.99.99-1 .56-.01 1.01.44 1.01 1V13h1.79c.45 0 .67.54.35.85l-2.79 2.79c-.19.2-.51.2-.7.01"}),"SimCardDownloadRounded"),Ar}var jf=Rf();const Sf=Ee(jf),kf=()=>{const{backendConfig:e}=Pe(),{endpoints:t}=e||{},{workflow:r=""}=t||{};return Gt.useMutation({mutationFn:async n=>{const{data:o}=await Kt.patch(r,n);return o},mutationKey:["patchWorkflow"]})},_f=()=>{const{backendConfig:e}=Pe(),{endpoints:t}=e||{},{workflow:r=""}=t||{};return Gt.useMutation({mutationFn:async n=>{const{data:o}=await Kt.post(r,n);return o},mutationKey:["postWorkflow"]})},Of=()=>{const{t:e}=Le.useTranslation(["snackMessage"]),{openSnackbar:t}=d.useSnackbar(),{setCurrentTree:r,currentTree:n,tree:o,dispatchTree:a}=Pe(),[i,s]=k.useState(!1),{version:f}=Pe(),{mutate:p}=_f(),{mutate:b}=kf(),m=j=>JSON.stringify(j,null,2),g=j=>`data:text/json;charset=utf-8,${encodeURIComponent(m(j))}`,y=j=>()=>{navigator.clipboard.writeText(m(j)).then(),t({message:e("success.copyToClipboard",{ns:"snackMessage"})})},v=()=>{s(!1)};return{copyToClipboard:y,formatJSON:m,getDownloadLink:g,handleClose:v,handleOpen:()=>{s(!0)},handleResetTree:()=>{a(Na()),v()},handleSubmit:()=>{const{name:j,id:_}=n;if(!j){r(O=>({...O,errorName:"Champs Requis"}));return}if(o){if(_){b({id:_,label:j,version:f,workflow:o},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}});return}p({label:j,version:f,workflow:o},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}})}},openModal:i}},Af=({downloadedFileName:e="export",value:t})=>{const{t:r}=Le.useTranslation(),{getDownloadLink:n,handleSubmit:o,handleClose:a,handleOpen:i,handleResetTree:s,copyToClipboard:f,openModal:p}=Of(),{currentTree:b,backendConfig:m,tree:g}=Pe(),{id:y}=b;return l.jsxs(d.Stack,{direction:"row",spacing:1,justifyContent:"center",children:[l.jsx(d.Tooltip,{title:r("resetTree",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:l.jsx(d.Box,{children:l.jsx(d.IconButton,{disabled:!g,onClick:i,color:"warning",children:l.jsx(Cf,{})})})}),l.jsx(d.Divider,{orientation:"vertical",flexItem:!0}),l.jsx(d.Tooltip,{title:r("copyToClipboard",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:l.jsx(d.Box,{children:l.jsx(d.IconButton,{href:"",download:`${e}.json`,disabled:!t,onClick:f(t),children:l.jsx(vf,{})})})}),l.jsx(d.Tooltip,{title:r("downloadJSONFile",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:l.jsx(d.Box,{children:l.jsx(d.IconButton,{href:n(t),download:`${e}.json`,disabled:!t,children:l.jsx(Sf,{})})})}),l.jsx(d.Tooltip,{title:y?r("update",{ns:"button"}):r("save",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:l.jsx(d.Box,{children:l.jsx(d.IconButton,{onClick:o,disabled:!t||!(m!=null&&m.baseUrl),children:l.jsx(Ef,{})})})}),l.jsxs(d.Dialog,{maxWidth:"xs",fullWidth:!0,open:p,onClose:a,children:[l.jsx(d.DialogTitle,{variant:"h3",children:r("resetTree",{ns:"button"})}),l.jsx(d.DialogContent,{children:l.jsx(d.DialogContentText,{children:r("resetTreeContent",{ns:"modal"})})}),l.jsxs(d.DialogActions,{children:[l.jsx(d.Button,{onClick:a,children:r("close",{ns:"button"})}),l.jsx(d.Button,{variant:"contained",color:"warning",onClick:s,children:r("reset",{ns:"button"})})]})]})]})},$f=({children:e,description:t,open:r,onClose:n,title:o})=>l.jsx(d.Dialog,{open:r,onClose:n,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",maxWidth:"sm",fullWidth:!0,scroll:"paper",children:l.jsxs(d.DialogContent,{sx:{backgroundColor:he.background,border:`solid 1px ${he.borderBlue}`,maxHeight:"80vh",overflowY:"auto"},children:[l.jsx(d.Typography,{variant:"h3",pb:2,children:o}),l.jsx(d.Typography,{pb:2,children:t}),e]})});var $r={},bi;function Pf(){if(bi)return $r;bi=1;var e=_e();Object.defineProperty($r,"__esModule",{value:!0}),$r.default=void 0;var t=e(Ae()),r=Re();return $r.default=(0,t.default)((0,r.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),$r}var Mf=Pf();const Df=Ee(Mf),In={container:{display:"flex",flexDirection:"column",height:"100%",margin:1},main:{border:`solid 1px ${he.borderBlue}`,height:" 100%",margin:1},toolbar:{backgroundColor:he.background,boxShadow:"none",display:"flex",padding:"0 ! important"},toolbarBox:{backgroundColor:he.tertiary,border:`solid 1px ${he.primary}`,margin:1,paddingX:2,paddingY:1,width:"100%"}},If=({children:e,appear:t,in:r,onEnter:n,onExited:o,onFocus:a,role:i,tabIndex:s,timeout:f},p)=>l.jsx(d.Slide,{direction:"up",ref:p,appear:t,in:r,onEnter:n,onExited:o,onFocus:a,role:i,tabIndex:s,timeout:f,children:e}),Ff=k.forwardRef(If),Bf=({children:e,open:t,onClose:r,title:n})=>l.jsx(d.Dialog,{PaperProps:{sx:{backgroundColor:he.background,backgroundImage:"none"}},open:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",fullScreen:!0,TransitionComponent:Ff,children:l.jsxs(d.Box,{sx:In.container,children:[l.jsx(d.AppBar,{position:"sticky",elevation:0,children:l.jsx(d.Toolbar,{sx:In.toolbar,children:l.jsxs(d.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:In.toolbarBox,children:[l.jsx(d.Typography,{variant:"h5",children:l.jsx("strong",{children:n})}),l.jsx(d.IconButton,{edge:"end",color:"inherit",onClick:r,"aria-label":"close",children:l.jsx(Df,{})})]})})}),l.jsx(d.Box,{sx:In.main,children:e})]})}),Vf={box:{border:`solid 1px ${he.borderBlue}`,flexGrow:0}},Lf=({children:e})=>l.jsx(d.Box,{p:2,role:"group",sx:Vf.box,children:e}),qf={box:{border:`solid 1px ${he.borderBlue}`,flexGrow:0}},Nf=({children:e})=>l.jsx(d.Box,{sx:qf.box,padding:2,component:"header",children:e}),zf={box:{border:`solid 1px ${he.borderBlue}`,flexGrow:1}},Uf=({children:e})=>l.jsx(d.Box,{sx:zf.box,component:"main",role:"tree",children:e}),gi={stack:{width:"100%"}},Wf=({children:e})=>{const t=k.Children.toArray(e);return l.jsxs(d.Grid,{container:!0,padding:1,flexWrap:"nowrap",height:"100%",role:"treegrid",children:[l.jsx(d.Grid,{item:!0,xs:9,padding:1,display:"flex",children:l.jsxs(d.Stack,{sx:gi.stack,spacing:2,children:[t[0],t[1]]})}),l.jsx(d.Grid,{item:!0,xs:3,padding:1,display:"flex",children:l.jsxs(d.Stack,{sx:gi.stack,spacing:2,children:[t[2],t[3]]})})]})},Yf={box:{border:`solid 1px ${he.borderBlue}`,flexGrow:1,overflow:"auto"}},Gf=({children:e})=>l.jsx(d.Box,{sx:Yf.box,component:"aside",children:e}),Kf=()=>{const{dispatchTree:e,setModalOpen:t,currentHierarchyPointNode:r,treePath:n}=Pe();return{handleSubmit:a=>{var f,p;a.preventDefault();const i=((f=r==null?void 0:r.data)==null?void 0:f.uuid)||"",s=((p=n==null?void 0:n.at(-1))==null?void 0:p.path)||"";e(jl(s,i)),t(null)}}},Jf=({onClose:e})=>{const{t}=Le.useTranslation(),{handleSubmit:r}=Kf();return l.jsx("form",{onSubmit:r,children:l.jsxs(d.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:[l.jsx(d.Button,{variant:"text",onClick:e,children:t("cancel")}),l.jsx(d.Button,{variant:"contained",color:"error",type:"submit",children:t("remove")})]})})};var Pr={},vi;function Qf(){if(vi)return Pr;vi=1;var e=_e();Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0;var t=e(Ae()),r=Re();return Pr.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddCircleRounded"),Pr}var Xf=Qf();const yi=Ee(Xf);var Mr={},xi;function Zf(){if(xi)return Mr;xi=1;var e=_e();Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.default=void 0;var t=e(Ae()),r=Re();return Mr.default=(0,t.default)((0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),Mr}var Hf=Zf();const e0=Ee(Hf);var Dr={},Ci;function t0(){if(Ci)return Dr;Ci=1;var e=_e();Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.default=void 0;var t=e(Ae()),r=Re();return Dr.default=(0,t.default)((0,r.jsx)("path",{d:"M17 7h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c1.65 0 3 1.35 3 3s-1.35 3-3 3h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c2.76 0 5-2.24 5-5s-2.24-5-5-5m-9 5c0 .55.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1H9c-.55 0-1 .45-1 1m2 3H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h3c.55 0 1-.45 1-1s-.45-1-1-1H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h3c.55 0 1-.45 1-1s-.45-1-1-1"}),"LinkRounded"),Dr}var r0=t0();const n0=Ee(r0);var Ir={},Ti;function a0(){if(Ti)return Ir;Ti=1;var e=_e();Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.default=void 0;var t=e(Ae()),r=Re();return Ir.default=(0,t.default)((0,r.jsx)("path",{d:"M7.92 7.54c-.8-.34-1.14-1.33-.66-2.05C8.23 4.05 9.85 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.15.27-.24.49-.3.94-.09.73-.69 1.3-1.43 1.3-.87 0-1.58-.75-1.48-1.62.06-.51.18-1.04.46-1.54.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.17 0-1.93.61-2.4 1.34-.35.57-1.08.75-1.69.5M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMarkRounded"),Ir}var o0=a0();const i0=Ee(o0);var Fr={},wi;function s0(){if(wi)return Fr;wi=1;var e=_e();Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.default=void 0;var t=e(Ae()),r=Re();return Fr.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1"}),"RemoveCircleRounded"),Fr}var l0=s0();const c0=Ee(l0),wa={address:{city:"Paris",countryCode:"FR",route:"Rue Saint-Sabin",streetNumber:"6",zipcode:"75011"},entityId:"0",id:"0",internalCode:"B11X.PE0138",name:"worksite-0"},Ei=(e,t=new Set)=>(Object.keys(e).forEach(r=>{t.add(r);const n=e[r];n!==null&&typeof n=="object"&&Ei(n,t)}),Array.from(t)),Ri=(e,t,r="")=>{let n=null;return Object.keys(e).some(o=>{const a=r?`${r}.${o}`:o;if(o===t)return n=a,!0;const i=e[o];if(i!==null&&typeof i=="object"){const s=Ri(i,t,a);if(s)return n=s,!0}return!1}),n},u0=()=>{const[e,t]=k.useState(""),[r,n]=k.useState(""),o=Ei(wa),a=i=>{const s=i.target.value;t(s);const f=Ri(wa,s);n(f||"")};return l.jsx(d.Card,{children:l.jsx(d.CardContent,{children:l.jsxs(d.Stack,{spacing:1,children:[l.jsx(d.Typography,{variant:"h6",children:"🔑 Pick a key"}),l.jsxs(d.FormControl,{fullWidth:!0,children:[l.jsx(d.InputLabel,{children:"Choisir une clé"}),l.jsx(d.Select,{value:e,label:"Choisir une clé",onChange:a,children:o.map(i=>l.jsx(d.MenuItem,{value:i,children:i},i))})]}),l.jsx(d.Typography,{variant:"h6",children:"Map to value desired 🔑"}),l.jsx(d.TextField,{label:"Chemin complet",variant:"outlined",value:r}),l.jsx(d.Typography,{variant:"h6",children:"API model example:"}),l.jsx(d.Box,{component:"pre",sx:{borderRadius:2},children:JSON.stringify(wa,null,2)})]})})})},d0=["address","dynamicSelect","autocomplete"],f0=({onChange:e,value:t,ancestorName:r,displayTopDivider:n,currentType:o})=>{var T;const{t:a}=Le.useTranslation(["form"]),{tree:i}=Pe(),s=on(i,(t==null?void 0:t.uuid)||""),f=((T=s==null?void 0:s.attributes)==null?void 0:T.type)||"",[p,b]=k.useState(!1),[m,g]=k.useState(!1),{sourceValue:y}=t||{},v=w=>{const j=w.target.value;e==null||e(j)},c=()=>o==="address"?l.jsxs(d.Alert,{severity:"warning",variant:"outlined",children:[l.jsx(d.Typography,{variant:"subtitle2",gutterBottom:!0,children:a("addressStructureHint")}),l.jsx(d.Box,{component:"pre",sx:{borderRadius:2,p:2},children:JSON.stringify({city:"string",country:"string",postalCode:"string",state:"string",street:"string"},null,2)})]}):o==="dynamicSelect"?l.jsx(d.Alert,{severity:"warning",variant:"outlined",children:l.jsx(d.Typography,{variant:"subtitle2",gutterBottom:!0,children:a("dynamicSelectStructureHint")})}):o==="select"||f==="radio"?l.jsx(d.Alert,{severity:"warning",variant:"outlined",children:l.jsx(d.Typography,{variant:"subtitle2",gutterBottom:!0,children:a("selectStructureHint")})}):null;return l.jsx(d.Grid2,{container:!0,children:l.jsxs(d.Grid2,{size:12,pt:2,children:[n&&l.jsx(d.Divider,{sx:{my:2}}),l.jsx(d.Typography,{variant:"h5",gutterBottom:!0,children:a("ancestorValue",{ancestorName:r})}),l.jsxs(d.Typography,{color:"text.secondary",sx:{mb:2},children:["Input type: ",l.jsx("strong",{children:f})]}),d0.includes(f||"")&&l.jsxs(d.Box,{component:"section",sx:{display:"flex",flexDirection:"column",gap:3},children:[l.jsxs(d.Stack,{spacing:1,children:[l.jsx(d.Typography,{children:a("mapObject")}),l.jsx(d.TextField,{fullWidth:!0,label:a("keyPathObject"),value:y??"",onChange:v})]}),l.jsx(d.FormControlLabel,{control:l.jsx(d.IconButton,{onClick:()=>b(w=>!w),sx:{transform:p?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"},children:l.jsx($a.KeyboardArrowDown,{})}),label:a("objectDemo")}),l.jsx(d.Collapse,{in:p,children:l.jsx(d.Box,{mt:1,children:l.jsx(u0,{})})}),l.jsxs(d.Typography,{children:["Output type: ",l.jsx("strong",{children:o})]}),c()]}),["text","number","email","tel","url","switch","checkbox","radio","select","date"].includes(f||"")&&l.jsxs(d.Box,{component:"section",sx:{display:"flex",flexDirection:"column",gap:3},children:[l.jsx(d.Typography,{variant:"body2",children:a("staticValueDescription")}),!["switch","checkbox"].includes(f||"")&&l.jsx(d.TextField,{fullWidth:!0,label:a("staticValue"),value:y??"",onChange:v}),["switch","checkbox"].includes(f||"")&&l.jsx(d.FormControlLabel,{control:l.jsx(d.Checkbox,{checked:m,onChange:w=>{const{checked:j}=w.target;g(j),e==null||e(j?String(j):void 0)}}),label:a("staticValue")}),c()]})]})})};var Br={},ji;function p0(){if(ji)return Br;ji=1;var e=_e();Object.defineProperty(Br,"__esModule",{value:!0}),Br.default=void 0;var t=e(Ae()),r=Re();return Br.default=(0,t.default)((0,r.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded"),Br}var h0=p0();const m0=Ee(h0),Si=()=>{const{dispatchSnackbar:e}=k.useContext(Fa);return{close:()=>e(Ba()),open:(n,o="success")=>e(cl(n,o))}},b0=e=>{const{backendConfig:t}=Pe(),{endpoints:r}=t||{},{workflows:n=""}=r||{};return Gt.useQuery({queryFn:async({signal:o})=>{const{data:a}=await Kt.get(n,{signal:o});return a},queryKey:["workflows"],...e})},g0=({isControlled:e,fetchWorkflowsOnOpen:t})=>{const{t:r}=Le.useTranslation("snackMessage"),{open:n}=Si(),{currentTree:o,setCurrentTree:a,dispatchTree:i}=Pe(),[s,f]=k.useState(""),p=!!s&&!e&&s!==o.id,{data:b,isError:m}=ln(s,{enabled:p}),{data:g,isLoading:y,refetch:v}=b0({enabled:!t}),c=k.useCallback(async({target:w})=>{var _;const{value:j}=w;if(j==="add-new-tree"){f(""),a({name:""}),i(Na());return}f(j),a({id:j,name:(_=g==null?void 0:g.find(O=>O.id===j))==null?void 0:_.label})},[i,a,g]),T=k.useCallback(async()=>{if(t)try{await v(),o.id&&!s&&f(o.id)}catch{n(r("error.fetchTree",{ns:"snackMessage"}),"error")}},[t,v,o.id,s,n,r]);return k.useEffect(()=>{if(b&&s!==o.id){const{id:w,label:j,workflow:_}=b;a({id:w,name:j}),i(Un(_))}},[o.id,i,e,a,s,b]),k.useEffect(()=>{m&&n(r("error.fetchTree",{ns:"snackMessage"}),"error")},[m,n,r]),{currentTree:o,fetchWorkflowSuggestions:v,handleChangeTree:c,handleOnOpen:T,setTreeSelected:f,treeSelected:s,workflowsSuggestions:g,workflowsSuggestionsLoading:y}},ki={formControl:{flex:1},select:{".MuiOutlinedInput-notchedOutline":{border:0,paddingLeft:5},".MuiSelect-select":{opacity:0,width:0},boxShadow:"none"}},_i=({arrowOnly:e,required:t,size:r,showBtnAddNewTree:n,onChange:o,value:a,fetchWorkflowsOnOpen:i})=>{const{t:s}=Le.useTranslation("form"),f=k.useMemo(()=>!!o,[o]),{handleChangeTree:p,handleOnOpen:b,workflowsSuggestions:m,workflowsSuggestionsLoading:g,treeSelected:y}=g0({fetchWorkflowsOnOpen:i,isControlled:f});return l.jsxs(d.FormControl,{size:r,required:t,sx:ki.formControl,children:[!e&&l.jsx(d.InputLabel,{children:s("tree",{ns:"form"})}),l.jsxs(d.Select,{value:f?a:y,id:"tree-select",onChange:v=>f?o==null?void 0:o(v):p(v),sx:e?ki.select:void 0,label:s("tree",{ns:"form"}),onOpen:b,children:[(a&&g||g)&&l.jsx(d.MenuItem,{value:a,children:l.jsx(d.Skeleton,{width:"100%"})}),m==null?void 0:m.map(({label:v,id:c})=>l.jsx(d.MenuItem,{value:c,children:v},c)),n&&l.jsx(d.MenuItem,{disabled:!0,children:l.jsx(d.Box,{sx:{height:1,width:"100%"},children:l.jsx(d.Divider,{})})}),n&&l.jsxs(d.MenuItem,{value:"add-new-tree",children:[l.jsx(d.Typography,{mr:1,children:s("newTree",{ns:"form"})}),l.jsx(m0,{color:"primary"})]})]})]})},v0=({id:e,helperText:t,hiddenValue:r,isHiddenField:n,isTreeField:o,treeSelected:a,handleChangeTreeSelect:i,handleChangeHelperText:s,handleChangeHiddenValue:f})=>{const{t:p}=Le.useTranslation(["translation","form"]);return o?l.jsx(_i,{required:!0,value:a,onChange:i}):n?l.jsx(d.TextField,{required:!0,size:"small",id:e,sx:{flex:1},label:p("hiddenValue",{ns:"form"}),onChange:f,value:r}):l.jsx(d.TextField,{sx:{flex:1},label:p("helperText",{ns:"form"}),size:"small",onChange:s,value:t})},Dt=[{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"text"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"number"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"email"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"file"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"password"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"tel"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"address"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"url"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"date"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dateRange"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"time"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!0,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"timeRange"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"switch"},{isBooleanField:!0,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"checkbox"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"hidden"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"tree"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"radio"},{isBooleanField:!1,isDecisionField:!0,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"select"},{initialQueryEnable:!0,isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!1,type:"autocomplete"},{isBooleanField:!1,isDecisionField:!1,isMultiple:!1,isPatternEnabled:!1,isRepeatableDisabled:!1,isRequiredDisabled:!1,type:"dynamicSelect"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"title"}],y0=()=>{const e=Date.now(),t=performance.now();return`${e}${Math.random().toString(36).substring(2,9)}${t}`},x0=({setIsLarge:e})=>{var Yi,Gi,Ki,Ji,Qi,Xi,Zi,Hi,es,ts,rs,ns,as,os,is,ss,ls,cs,us,ds,fs,ps,hs,ms,bs,gs,vs,ys,xs,Cs,Ts,ws,Es,Rs;const r=k.useRef(y0()).current,n=k.useMemo(()=>[{id:"0",label:"",message:"",value:""}],[]),{dispatchTree:o,currentHierarchyPointNode:a,modalOpen:i,treePath:s,setModalOpen:f,tree:p}=Pe(),{open:b}=Si(),{t:m}=Le.useTranslation(["translation","form"]),g=a!=null&&a.data&&((Yi=a==null?void 0:a.data)!=null&&Yi.attributes)&&"isMultiple"in a.data.attributes?!!a.data.attributes.isMultiple:null,[y,v]=k.useState(n),[c,T]=k.useState(""),[w,j]=k.useState(""),[_,O]=k.useState(""),[C,I]=k.useState(!1),[D,se]=k.useState(!1),[ee,u]=k.useState(!1),[$,V]=k.useState(!1),[F,te]=k.useState("text"),[ge,ve]=k.useState(null),[De,Ie]=k.useState(void 0),[Je,S]=k.useState(""),[P,Y]=k.useState(""),[W,z]=k.useState({off:"",on:""}),[Q,L]=k.useState(!1),[U,G]=k.useState(!1),[K,J]=k.useState(""),[Ce,A]=k.useState(""),[Ve,He]=k.useState(void 0),[at,et]=k.useState(""),[wt,ir]=k.useState(!1),ot=F==="tree",Lt=F==="hidden",bt=F==="autocomplete",Et=F==="dateRange",It=F==="dynamicSelect",sr=Dt.some(E=>E.type===F&&(E==null?void 0:E.isBooleanField)),gt=Dt.some(E=>E.type===F&&(E==null?void 0:E.isDecisionField)),lr=Dt.some(E=>E.type===F&&(E==null?void 0:E.isRequiredDisabled)),cr=Dt.some(E=>E.type===F&&(E==null?void 0:E.isRepeatableDisabled)),ur=Dt.some(E=>E.type===F&&(E==null?void 0:E.isPatternEnabled)),Ft=Dt.some(E=>E.type===F&&"isMultiple"in E),it=i==="edit",st=((Gi=a==null?void 0:a.data)==null?void 0:Gi.uuid)||"",vt=Jt(p,(Ki=s==null?void 0:s.at(-1))==null?void 0:Ki.path),qt=wl(vt,st,!it&&!!st?void 0:st),Qr=k.useMemo(()=>qt.map(({name:E})=>E||""),[qt]),Nt=k.useCallback(E=>!gt&&E>0,[gt]),Rt=!!Qr.length,Bt=bt||It||!!at,{refetch:lt,isLoading:zt}=ln(Je,{enabled:!1}),jt=k.useMemo(()=>[{label:m("form:number"),value:"^\\d+$"},{label:m("form:letter"),value:"^[A-Za-zÀ-ÖØ-öø-ÿ' -]+$"},{label:m("form:numberAndLetter"),value:"^[A-Za-z0-9]+$"},{label:m("form:cardNumber"),value:"^\\d{16}$"},{label:m("form:type.date"),value:"\\d{4}-\\d{2}-\\d{2}"}],[m]),pe=k.useCallback(E=>B=>{v(N=>N.map(X=>{const{id:ye}=X;return B.target.dataset.id===ye?{...X,id:ye,[E]:B.target.value}:{...X}}))},[]),Ut=k.useCallback((E,B)=>{typeof B=="string"?ve(B):B&&B.inputValue?ve(B.inputValue):ve(null)},[]),We=k.useCallback(({target:E})=>{T(E.value)},[]),Wt=k.useCallback(({target:E})=>{j(E.value)},[]),Vt=k.useCallback(({target:E})=>{O(E.value)},[]),St=k.useCallback(({target:E})=>{const B=E.value;Ie(N=>({...N,url:B}))},[]),tt=k.useCallback(({target:E})=>{Ie(B=>{const{searchKey:N,...X}=B??{},{value:ye}=E;return ye===""?Object.keys(X).length>0?X:void 0:{...X,searchKey:ye}})},[]),dr=k.useCallback((E,B)=>{Ie(N=>{const X=N??{},we={...X.pathKey??{},[E]:B.target.value};if(B.target.value===""&&E in we){const{pathKey:$e,...Ge}=X;return Object.keys(Ge).length>0?Ge:void 0}return{...X,pathKey:we}})},[]),Bn=k.useCallback((E,B,N)=>{Ie(X=>{const ye=X??{},we=[...ye.params??[]],$e={...we[E]??{}};if(N===""||N===!1?delete $e[B]:$e[B]=N,Object.values($e).every(ct=>ct===""||ct===!1||ct===void 0)?we.splice(E,1):we[E]=$e,we.length===0){const{params:ct,..._t}=ye;return Object.keys(_t).length>0?_t:void 0}return{...ye,params:we}})},[]),Vn=(E,B)=>{J(B)},Ra=({target:E})=>{A(E.value)},ja=({target:E})=>{V(E.checked)},Sa=({target:E})=>{se(E.checked)},ka=({target:E})=>{G(E.checked)},h=({target:E})=>{u(E.checked)},R=({target:E})=>{I(E.checked)},M=({target:E})=>{L(E.checked)},q=(E,B)=>{te(B.type),u(!1),se(!1),L(!1),I(!1)},ae=({target:E})=>{S(E.value)},ue=E=>({target:B})=>{z(N=>({...N,[E]:B.value}))},H=({target:E})=>{Y(E.value)},Z=k.useCallback(()=>{v(E=>{const B=Number(E[E.length-1].id),N=String(B+1);return[...E,{...n[0],id:N}]})},[n]),Ne=()=>{Ie(E=>{var $e;const B=E??{},N=[...B.params??[]],X=Number((($e=N[N.length-1])==null?void 0:$e.id)||0),ye=String(X+1),we=[...N,{id:ye,key:""}];return{...B,params:we}})},Te=({currentTarget:E})=>{v(B=>B.filter(({id:N})=>E.value!==N))},ke=E=>{const B=E.currentTarget.value;Ie(N=>{const X=N??{},we=(X.params??[]).filter(({id:Ge})=>Ge!==B),$e=we.length>0?we:void 0;return{...X,params:$e}})},Ye=k.useCallback((E,B)=>{var X,ye,we;const N=(we=(ye=(X=E==null?void 0:E.children)==null?void 0:X[B])==null?void 0:ye.data)==null?void 0:we.children;return N?N.map(({uuid:$e,attributes:Ge,children:ct})=>({attributes:Ge,children:ct,uuid:$e})):[]},[]),kt=k.useCallback(E=>{var B;return ee?(B=y==null?void 0:y.filter((N,X)=>!Nt(X)))==null?void 0:B.map(({message:N,value:X,label:ye},we)=>{const $e=`${r}:${X}`,Ge=Ye(a,we);return{attributes:{depth:E+1,label:ye,name:`${_}:${X}`,value:X,...N&&{message:N},...Ge.length===0&&{isLeaf:!0}},children:Ge,uuid:$e}}):[]},[a,Nt,Ye,ee,_,r,y]),yt=k.useCallback(E=>E.map(({message:B,...N})=>({...N,...B&&{message:B}})),[]),ze=k.useCallback((E,B,N)=>{var X;if(E&&(!B||N))try{return lt()}catch{b(m("error.fetchTree",{ns:"snackMessage"}),"error")}return E&&B&&!N?{data:{workflow:(X=a==null?void 0:a.data.attributes)==null?void 0:X.tree},isError:null}:{data:null,isError:null}},[(Ji=a==null?void 0:a.data.attributes)==null?void 0:Ji.tree,lt,b,m]),Xr=E=>{He(B=>{const N={...B??{}};return E?N.sourceValue=E:delete N.sourceValue,Object.keys(N).length>0?N:void 0})},_a=(E,B)=>{He(N=>{const X={...N??{}};return E?X.uuid=E:delete X.uuid,Object.keys(X).length>0?X:void 0}),et(B)},Oa=k.useCallback(async E=>{var Hr,en,tn;E.preventDefault();const{on:B,off:N}=W,ye=((a==null?void 0:a.depth)||0)+(it||a===null?0:1),we=kt(ye),$e=(Hr=s==null?void 0:s.at(-1))==null?void 0:Hr.path,Ge=s.length?`${$e}/${r}`:`/${r}`,ct=((tn=(en=a==null?void 0:a.data.attributes)==null?void 0:en.tree)==null?void 0:tn.treeId)!==Je,{data:_t,isError:Ln}=await ze(ot,it,ct);if(Ln)return;const Zr={attributes:{depth:ye,name:_,type:F,...w&&{label:w},...bt&&{route:De},...It&&{route:De},...P&&{helperText:P},...ee&&{isDecision:ee},...D&&{required:D},...C&&Et&&{isDisabledPast:C},...Q&&{repeatable:Q},...Lt&&{hiddenValue:c},...ge&&{tag:ge},...$&&Ft&&{isMultiple:$},...U&&{initialQuery:U},...gt&&!ee&&{values:yt(y)},...(N||B)&&{messages:{...N&&{off:N},...B&&{on:B}}},...K&&{pattern:typeof K=="object"?K.value:K},...Ce&&{patternMessage:Ce},...Ve&&{defaultValueFromAncestor:Ve},...ot&&{tree:{..._t==null?void 0:_t.workflow,treeId:Je},treePath:Ge}},children:we,uuid:it?st:r};o(it?Rl($e||"",st,Zr):El($e||null,st,Zr)),f(null)},[it,a,st,Ve,o,kt,yt,ze,P,c,U,bt,Et,ee,gt,C,It,Lt,$,Ft,ot,w,W,_,K,Ce,Q,D,De,f,ge,s,Je,F,r,y]);return k.useEffect(()=>{var E,B,N,X,ye,we,$e,Ge,ct,_t,Ln,Zr,Hr,en,tn,js,Ss,ks,_s,Os,As,$s,Ps,Ms,Ds,Is,Fs,Bs,Vs,Ls,qs,Ns;if(i==="edit"){const qn=((B=(E=a==null?void 0:a.data)==null?void 0:E.attributes)==null?void 0:B.values)||((ye=(X=(N=a==null?void 0:a.data)==null?void 0:N.children)==null?void 0:X.filter(({attributes:Ot})=>!(Ot!=null&&Ot.type)))==null?void 0:ye.map(({attributes:Ot},Yt)=>{const{label:Nn,value:zn,message:rn}=Ot||{};return{id:String(Yt),label:String(Nn),value:String(zn),...rn&&{message:String(rn)}}})),zs=(Ge=($e=(we=a==null?void 0:a.data)==null?void 0:we.attributes)==null?void 0:$e.defaultValueFromAncestor)==null?void 0:Ge.uuid,Aa=zs?on(vt,zs):void 0,yp=(ct=Aa==null?void 0:Aa.attributes)==null?void 0:ct.name;et(yp),He(((Ln=(_t=a==null?void 0:a.data)==null?void 0:_t.attributes)==null?void 0:Ln.defaultValueFromAncestor)||void 0),ve(((Zr=a==null?void 0:a.data.attributes)==null?void 0:Zr.tag)||null),te(((Hr=a==null?void 0:a.data.attributes)==null?void 0:Hr.type)||"text"),Y(((en=a==null?void 0:a.data.attributes)==null?void 0:en.helperText)||""),se(((tn=a==null?void 0:a.data.attributes)==null?void 0:tn.required)||!1),I(((js=a==null?void 0:a.data.attributes)==null?void 0:js.isDisabledPast)||!1),j(((Ss=a==null?void 0:a.data.attributes)==null?void 0:Ss.label)||""),O(((ks=a==null?void 0:a.data.attributes)==null?void 0:ks.name)||""),u(((_s=a==null?void 0:a.data.attributes)==null?void 0:_s.isDecision)||!1),v(qn!=null&&qn.length?qn:n),S(((As=(Os=a==null?void 0:a.data.attributes)==null?void 0:Os.tree)==null?void 0:As.treeId)||""),L((($s=a==null?void 0:a.data.attributes)==null?void 0:$s.repeatable)||!1),T(((Ps=a==null?void 0:a.data.attributes)==null?void 0:Ps.hiddenValue)||""),J(jt.find(({value:Ot})=>{var Yt;return Ot===((Yt=a==null?void 0:a.data.attributes)==null?void 0:Yt.pattern)})||((Ms=a==null?void 0:a.data.attributes)==null?void 0:Ms.pattern)||""),A(((Ds=a==null?void 0:a.data.attributes)==null?void 0:Ds.patternMessage)||""),z({off:((Fs=(Is=a==null?void 0:a.data.attributes)==null?void 0:Is.messages)==null?void 0:Fs.off)||"",on:((Vs=(Bs=a==null?void 0:a.data.attributes)==null?void 0:Bs.messages)==null?void 0:Vs.on)||""}),Ie(Ot=>{var Yt,Nn,zn,rn,Us,Ws,Ys,Gs;return{...Ot,params:(Nn=(Yt=a==null?void 0:a.data.attributes)==null?void 0:Yt.route)==null?void 0:Nn.params,pathKey:(rn=(zn=a==null?void 0:a.data.attributes)==null?void 0:zn.route)==null?void 0:rn.pathKey,searchKey:(Ws=(Us=a==null?void 0:a.data.attributes)==null?void 0:Us.route)==null?void 0:Ws.searchKey,url:((Gs=(Ys=a==null?void 0:a.data.attributes)==null?void 0:Ys.route)==null?void 0:Gs.url)||""}}),V(g||!1),G(((Ls=a==null?void 0:a.data.attributes)==null?void 0:Ls.initialQuery)||!1),He(((Ns=(qs=a==null?void 0:a.data)==null?void 0:qs.attributes)==null?void 0:Ns.defaultValueFromAncestor)||void 0)}},[(Qi=a==null?void 0:a.data.attributes)==null?void 0:Qi.defaultValueFromAncestor,(Xi=a==null?void 0:a.data.attributes)==null?void 0:Xi.helperText,(Zi=a==null?void 0:a.data.attributes)==null?void 0:Zi.hiddenValue,(Hi=a==null?void 0:a.data.attributes)==null?void 0:Hi.initialQuery,(es=a==null?void 0:a.data.attributes)==null?void 0:es.isDecision,(ts=a==null?void 0:a.data.attributes)==null?void 0:ts.isDisabledPast,(rs=a==null?void 0:a.data.attributes)==null?void 0:rs.label,(as=(ns=a==null?void 0:a.data.attributes)==null?void 0:ns.messages)==null?void 0:as.off,(is=(os=a==null?void 0:a.data.attributes)==null?void 0:os.messages)==null?void 0:is.on,(ss=a==null?void 0:a.data.attributes)==null?void 0:ss.name,(ls=a==null?void 0:a.data.attributes)==null?void 0:ls.pattern,(cs=a==null?void 0:a.data.attributes)==null?void 0:cs.patternMessage,(us=a==null?void 0:a.data.attributes)==null?void 0:us.repeatable,(ds=a==null?void 0:a.data.attributes)==null?void 0:ds.required,(ps=(fs=a==null?void 0:a.data.attributes)==null?void 0:fs.route)==null?void 0:ps.params,(ms=(hs=a==null?void 0:a.data.attributes)==null?void 0:hs.route)==null?void 0:ms.pathKey,(gs=(bs=a==null?void 0:a.data.attributes)==null?void 0:bs.route)==null?void 0:gs.searchKey,(ys=(vs=a==null?void 0:a.data.attributes)==null?void 0:vs.route)==null?void 0:ys.url,(xs=a==null?void 0:a.data.attributes)==null?void 0:xs.tag,(Ts=(Cs=a==null?void 0:a.data.attributes)==null?void 0:Cs.tree)==null?void 0:Ts.treeId,(ws=a==null?void 0:a.data.attributes)==null?void 0:ws.type,(Es=a==null?void 0:a.data.attributes)==null?void 0:Es.values,(Rs=a==null?void 0:a.data)==null?void 0:Rs.children,vt,n,g,i,jt]),k.useEffect(()=>{e&&e(Bt)},[Bt,e]),{ancestors:qt,collapseOptions:wt,currentTree:vt,defaultValueFromAncestor:Ve,getDisabledValueField:Nt,handleAddParams:Ne,handleAddValue:Z,handleAncestorRef:_a,handleChangeHelperText:H,handleChangeHiddenValue:We,handleChangeInitialQuery:ka,handleChangeIsDecisionField:h,handleChangeIsDisabledPast:R,handleChangeLabel:Wt,handleChangeMessage:ue,handleChangeMultiple:ja,handleChangeName:Vt,handleChangeParam:Bn,handleChangePath:dr,handleChangePattern:Vn,handleChangePatternMessage:Ra,handleChangeRepeatable:M,handleChangeRequired:Sa,handleChangeSearchKey:tt,handleChangeTag:Ut,handleChangeTreeSelect:ae,handleChangeType:q,handleChangeUrlSelect:St,handleDeleteParam:ke,handleDeleteValue:Te,handlePresetValues:pe,handleSubmit:Oa,handleValueFromAncestor:Xr,hasAncestors:Rt,helperText:P,hiddenValue:c,initialQuery:U,isAutocomplete:bt,isBooleanField:sr,isDateRangePicker:Et,isDecision:ee,isDecisionField:gt,isDisabledPast:C,isDynamicSelect:It,isHiddenField:Lt,isLargeView:Bt,isMultiple:$,isMultiplePossible:Ft,isPatternEnabled:ur,isRepeatableDisabled:cr,isRequiredDisabled:lr,isTreeField:ot,isWorkflowLoading:zt,label:w,messages:W,name:_,pattern:K,patternMessage:Ce,patternOptions:jt,repeatable:Q,required:D,route:De,selectAncestorName:at,setCollapseOptions:ir,tag:ge,treeSelected:Je,type:F,uuid:r,values:y}},C0=({onChange:e,id:t,value:r,ancestors:n})=>{const{t:o}=Le.useTranslation(["form"]),{tree:a,currentHierarchyPointNode:i}=Pe(),{uuid:s}=(i==null?void 0:i.data)||{},f=`label-${t}`;if(!a||!s)return null;const p=b=>{const{value:m}=b.target,g=n.find(v=>v.name===m),y=g==null?void 0:g.uuid;e==null||e(y,m)};return l.jsxs(d.Stack,{spacing:1,pb:2,pt:3,children:[l.jsxs(d.InputLabel,{id:f,children:[" ",o("receiveValueFromParent")]}),l.jsxs(d.Select,{id:t,labelId:f,variant:"outlined",size:"xSmall",value:r||"",onChange:p,MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:[n.length&&l.jsx(d.MenuItem,{value:"",children:" "}),n.length?n.map(({name:b})=>l.jsx(d.MenuItem,{value:b,children:b},`${b}-${s}`)):l.jsx(d.MenuItem,{disabled:!0,value:"",children:o("form:noAncestorFound")})]})]})},T0=e=>{const{backendConfig:t}=Pe(),r=Dt.filter(o=>!(o.type==="tree"&&!(t!=null&&t.baseUrl)))||[];return{currentValue:r.find(o=>o.type===e)||Dt[0],options:r}},w0=({id:e,onChange:t,value:r,sx:n})=>{const{t:o}=Le.useTranslation(["translation","form"]),{currentValue:a,options:i}=T0(r);return l.jsx(d.Autocomplete,{disableClearable:!0,fullWidth:!0,size:"small",id:e,sx:n,options:i,value:a,onChange:t,getOptionLabel:s=>o(`form:type.${s.type}`),renderInput:s=>l.jsx(d.TextField,{...s,required:!0,size:"small",label:o("type")}),renderOption:(s,f)=>{const{key:p,...b}=s;return l.jsxs(d.MenuItem,{...b,children:[o(`form:type.${f.type}`),f.isDecisionField&&l.jsx(d.Chip,{label:o("decisionField",{ns:"form"}),size:"small",color:"info",sx:{marginLeft:1}})]},p)}})},E0=e=>{if(!e)return[];const t=new Set,r=n=>{var o,a;if((o=n==null?void 0:n.attributes)!=null&&o.tag&&t.add(n.attributes.tag),(a=n==null?void 0:n.children)!=null&&a.length){const{children:i}=n;for(let s=0;s<i.length;s+=1)r(i[s])}};return r(e),[...t]},R0=d.createFilterOptions(),j0=({id:e,value:t,onChange:r})=>{const{t:n}=Le.useTranslation(["translation","form"]),{tree:o}=Pe(),a=E0(o).reduce((i,s)=>[...i,{inputValue:s,label:s}],[]);return l.jsx(d.Autocomplete,{freeSolo:!0,fullWidth:!0,id:e,sx:{flex:1},size:"small",value:t,onChange:r,filterOptions:(i,s)=>{const f=R0(i,s),{inputValue:p}=s,b=i.some(m=>typeof m!="string"&&p===m.label);return p!==""&&!b&&f.push({inputValue:p,label:`${n("add")} "${p}"`}),f},getOptionLabel:i=>typeof i=="string"?i:i.inputValue?i.inputValue:i.label,renderOption:(i,s)=>l.jsx("li",{...i,children:typeof s!="string"&&s.label}),renderInput:i=>l.jsx(d.TextField,{...i,label:n("tag")}),options:a})},Oi={marginRight:"-20px !important",minWidth:"auto !important"},Ea={iconButton:Oi,iconButtonDelete:{...Oi,"&:before":{borderRadius:"50%",content:'""',height:20,position:"absolute",width:20,zIndex:-1},backgroundColor:he.background,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}},S0=({onClose:e,title:t,setIsLarge:r})=>{const{t:n}=Le.useTranslation(["translation","form"]),{ancestors:o,hasAncestors:a,patternOptions:i,values:s,required:f,tag:p,type:b,helperText:m,label:g,name:y,hiddenValue:v,isBooleanField:c,isDisabledPast:T,handleChangeIsDisabledPast:w,isDecision:j,isDecisionField:_,isHiddenField:O,isRequiredDisabled:C,isRepeatableDisabled:I,isAutocomplete:D,isDateRangePicker:se,isDynamicSelect:ee,isTreeField:u,treeSelected:$,isWorkflowLoading:V,repeatable:F,isMultiplePossible:te,isPatternEnabled:ge,isMultiple:ve,initialQuery:De,handleChangeTreeSelect:Ie,handleChangeHelperText:Je,handleChangeRequired:S,handleChangeName:P,handleChangeType:Y,handleChangeIsDecisionField:W,handleDeleteValue:z,handleDeleteParam:Q,handleChangeMessage:L,handleSubmit:U,handleAddValue:G,handleAddParams:K,handleChangeLabel:J,handleChangeRepeatable:Ce,handleChangeHiddenValue:A,handleChangeTag:Ve,handleChangeSearchKey:He,handleChangeUrlSelect:at,handleChangeParam:et,handleChangePath:wt,handleChangeMultiple:ir,handleChangeInitialQuery:ot,route:Lt,handlePresetValues:bt,patternMessage:Et,pattern:It,handleChangePattern:sr,handleChangePatternMessage:gt,messages:{on:lr,off:cr},isLargeView:ur,handleValueFromAncestor:Ft,defaultValueFromAncestor:it,handleAncestorRef:st,selectAncestorName:vt,collapseOptions:Jr,setCollapseOptions:Fn}=x0({setIsLarge:r}),{searchKey:qt,url:Qr,pathKey:Nt,params:Rt}=Lt||{},{object:Bt="",label:lt="",value:zt="",image:jt=""}=Nt||{};return l.jsx(d.Box,{component:"form",onSubmit:U,children:l.jsxs(d.Grid2,{container:!0,height:600,children:[l.jsxs(d.Grid2,{size:ur?6:12,sx:{display:"flex",flexDirection:"column",height:"100%"},children:[l.jsxs(d.DialogContent,{children:[l.jsx(d.Typography,{variant:"h3",pb:2,children:t}),l.jsx(w0,{id:"type",value:b,onChange:Y,sx:{marginBottom:1}}),l.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[l.jsx(d.TextField,{autoComplete:"off",id:"name",label:n("name"),sx:{flex:1},onChange:P,value:y,size:"small",required:!0}),l.jsx(d.TextField,{id:"label",sx:{flex:1},label:n("label",{ns:"form"}),onChange:J,value:g,size:"small"})]}),l.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[b!=="title"&&l.jsx(j0,{id:"tag",value:p,onChange:Ve}),l.jsx(v0,{id:"helperText",helperText:m,hiddenValue:v,isHiddenField:O,isTreeField:u,treeSelected:$,handleChangeTreeSelect:Ie,handleChangeHelperText:Je,handleChangeHiddenValue:A})]}),ge&&l.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[l.jsx(d.Autocomplete,{freeSolo:!0,id:"autoCompletePatternMessage",size:"small",sx:{flex:1},onChange:sr,onInputChange:sr,value:It,options:i,renderInput:pe=>l.jsx(d.TextField,{...pe,label:n("form:pattern")})}),l.jsx(d.TextField,{id:"patternMessageText",label:n("form:patternMessage"),sx:{flex:1},onChange:gt,value:Et,size:"small"})]}),c&&l.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[l.jsx(d.TextField,{id:"onMessage",size:"small",sx:{flex:1},label:n("onMessage",{ns:"form"}),onChange:L("on"),value:lr}),l.jsx(d.TextField,{id:"offMessage",size:"small",sx:{flex:1},label:n("offMessage",{ns:"form"}),onChange:L("off"),value:cr})]}),l.jsx(d.Stack,{paddingY:1,children:l.jsxs(d.FormGroup,{row:!0,children:[te&&l.jsx(d.FormControlLabel,{control:l.jsx(d.Checkbox,{checked:ve,onChange:ir}),label:n("multiple")}),D&&l.jsx(d.FormControlLabel,{control:l.jsx(d.Checkbox,{id:"isInitialQuery",checked:De,onChange:ot}),label:n("initialQueryEnable")}),l.jsx(d.FormControlLabel,{disabled:C,control:l.jsx(d.Checkbox,{id:"isRequired",checked:f,onChange:S}),label:n("required")}),l.jsx(d.FormControlLabel,{disabled:I,control:l.jsx(d.Checkbox,{id:"isRepeatable",checked:F,onChange:Ce}),label:n("repeatable",{ns:"form"})}),_&&l.jsx(d.FormControlLabel,{control:l.jsx(d.Checkbox,{id:"isDecision",checked:j,onChange:W}),label:n("decisionField",{ns:"form"})}),se&&l.jsx(d.FormControlLabel,{control:l.jsx(d.Checkbox,{id:"disabledPast",checked:T,onChange:w}),label:n("disabledPast",{ns:"form"})})]})}),_&&l.jsxs(l.Fragment,{children:[l.jsx(d.Typography,{variant:"h4",children:n("values")}),s==null?void 0:s.map(({value:pe,label:Ut,id:We,message:Wt})=>l.jsxs(d.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[l.jsx(d.TextField,{id:`decision-label-${We}`,label:n("label",{ns:"form"}),size:"small",sx:{flex:1},onChange:bt("label"),value:Ut,inputProps:{"data-id":We},required:!0}),l.jsx(d.TextField,{id:`decision-value-${We}`,label:n("value",{ns:"form"}),size:"small",sx:{flex:1},onChange:bt("value"),value:pe,inputProps:{"data-id":We},required:!0}),l.jsx(d.TextField,{id:`decision-message-${We}`,label:n("message",{ns:"form"}),size:"small",sx:{flex:1},onChange:bt("message"),value:Wt,inputProps:{"data-id":We}}),s.length>1&&l.jsx(d.IconButton,{color:"warning",sx:Ea.iconButtonDelete,value:We,onClick:z,children:l.jsx(c0,{})})]},We))]}),_&&l.jsx(d.Box,{justifyContent:"flex-end",display:"flex",children:l.jsx(d.IconButton,{color:"success",sx:Ea.iconButton,onClick:G,children:l.jsx(yi,{})})}),a&&l.jsx(C0,{id:"receive-value",onChange:st,value:vt,ancestors:o})]}),l.jsxs(d.DialogActions,{children:[l.jsx(d.Button,{variant:"text",onClick:e,children:n("cancel")}),l.jsx(d.Button,{variant:"contained",type:"submit",disabled:V,isLoading:V,loadingIndicator:l.jsx(d.CircularProgress,{size:14}),children:n("validate")})]})]}),ur&&l.jsx(d.Grid2,{size:6,maxHeight:600,sx:{display:"flex"},children:l.jsxs(d.DialogContent,{children:[(ee||D)&&l.jsxs(d.Grid2,{container:!0,spacing:1,paddingY:1,children:[l.jsx(d.Grid2,{size:12,children:l.jsx(d.Typography,{variant:"h5",pb:1,children:n("form:urlConstruction")})}),l.jsx(d.Grid2,{size:D?7:12,children:l.jsx(d.TextField,{id:"urlSelect",size:"small",fullWidth:!0,InputProps:{startAdornment:l.jsx(d.InputAdornment,{position:"start",children:l.jsx(n0,{})})},placeholder:"https://api.com/",type:"url",label:n("form:apiRoute"),onChange:at,value:Qr||""})}),D&&l.jsx(d.Grid2,{size:5,children:l.jsxs(d.Stack,{direction:"row",spacing:1,alignItems:"center",children:[l.jsx(i0,{}),l.jsx(d.TextField,{id:"searchKey",size:"small",InputLabelProps:{shrink:!0},sx:{flex:1,minWidth:0},placeholder:n("form:searchKeyPlaceholder"),type:"text",label:n("form:key"),onChange:He,value:qt||""})]})})]}),(D||ee)&&l.jsxs(l.Fragment,{children:[l.jsxs(d.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},position:"relative",alignItems:{sm:"center",xs:"flex-start"},children:[l.jsx(d.Typography,{variant:"h5",children:n("form:additionalParams")}),l.jsx(d.Box,{justifyContent:"flex-end",children:l.jsx(d.IconButton,{color:"success",sx:Ea.iconButton,onClick:K,children:l.jsx(yi,{})})})]}),Rt==null?void 0:Rt.map(({id:pe,key:Ut,staticValue:We,ancestorUuid:Wt,useAncestorValue:Vt},St)=>l.jsx(d.Paper,{elevation:1,sx:{marginY:1},children:l.jsxs(d.Grid2,{container:!0,pb:2,justifyContent:"space-between",alignItems:"center",padding:1,spacing:1,children:[l.jsx(d.Grid2,{size:6,children:l.jsx(d.Tooltip,{title:Vt?n("form:keyPathApiDescription"):"",children:l.jsx(d.TextField,{id:`param-key-${pe}`,label:"Key",size:"small",onChange:({target:tt})=>et(St,"key",tt.value),value:Ut||"",inputProps:{"data-id":pe}})})}),l.jsx(d.Grid2,{size:6,children:Vt?l.jsx(d.Select,{fullWidth:!0,id:pe,variant:"outlined",size:"small",value:Wt||"",onChange:({target:tt})=>et(St,"ancestorUuid",tt.value),MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:o.length?o.map(({name:tt,uuid:dr})=>l.jsx(d.MenuItem,{value:dr,children:tt},dr)):l.jsx(d.MenuItem,{disabled:!0,value:"",children:n("form:noAncestorFound")})}):l.jsx(d.TextField,{id:`param-value-${pe}`,label:n("value",{ns:"form"}),size:"small",fullWidth:!0,onChange:({target:tt})=>et(St,"staticValue",tt.value),value:We||"",inputProps:{"data-id":pe}})}),!!o.length&&l.jsx(d.FormControlLabel,{control:l.jsx(d.Checkbox,{id:`useAncestorAsParam-${pe}`,disabled:!o.length,checked:Vt||!1,onChange:({target:tt})=>et(St,"useAncestorValue",tt.checked)}),label:l.jsx(d.Typography,{variant:"body2",color:"textSecondary",children:n("form:useAncestorValueAsParam")})}),l.jsx(d.IconButton,{color:"error",value:pe,onClick:Q,children:l.jsx(e0,{})})]},pe)},pe)),l.jsxs(d.Box,{display:"flex",alignItems:"center",children:[l.jsx(d.IconButton,{"aria-label":n("form:dataMapping"),onClick:()=>Fn(pe=>!pe),sx:{transform:Jr?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"},children:l.jsx($a.KeyboardArrowDown,{})}),l.jsx(d.Typography,{sx:{ml:1},children:n("form:dataMapping")})]}),l.jsx(d.Collapse,{in:Jr,children:l.jsxs(d.Stack,{spacing:1,paddingY:1,children:[l.jsxs(d.Stack,{spacing:1,sx:{pb:1},direction:{sm:"row",xs:"column"},alignItems:"center",children:[l.jsx(d.TextField,{id:"objectArrayPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Object Array Path",value:Bt||"",onChange:pe=>wt("object",pe),placeholder:"elements.features[]",type:"text"}),l.jsx(d.TextField,{id:"labelPath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Label Path",value:lt||"",onChange:pe=>wt("label",pe),placeholder:"client.name",type:"text"})]}),l.jsxs(d.Stack,{spacing:1,direction:{sm:"row",xs:"column"},alignItems:"center",children:[l.jsx(d.TextField,{id:"valuePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Value Path",value:zt||"",onChange:pe=>wt("value",pe),placeholder:"client.id",type:"text"}),l.jsx(d.TextField,{id:"imagePath",size:"small",sx:{flex:3},InputLabelProps:{shrink:!0},label:"Image Path",value:jt||"",onChange:pe=>wt("image",pe),placeholder:"client.src.profile",type:"text"})]})]})})]}),vt&&l.jsx(f0,{ancestorName:vt,onChange:Ft,value:it,displayTopDivider:D||ee,currentType:b})]})})]})})};var Vr={},Ai;function k0(){if(Ai)return Vr;Ai=1;var e=_e();Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.default=void 0;var t=e(Ae()),r=Re();return Vr.default=(0,t.default)((0,r.jsx)("path",{d:"M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2v-4c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1h-1.01c-.54 0-.99-.45-.99-.99V8h2v1c0 1.1.9 2 2 2"}),"AccountTreeRounded"),Vr}var _0=k0();const O0=Ee(_0);var Lr={},$i;function A0(){if($i)return Lr;$i=1;var e=_e();Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.default=void 0;var t=e(Ae()),r=Re();return Lr.default=(0,t.default)((0,r.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-3 10h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V8c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddBoxRounded"),Lr}var $0=A0();const P0=Ee($0);var qr={},Pi;function M0(){if(Pi)return qr;Pi=1;var e=_e();Object.defineProperty(qr,"__esModule",{value:!0}),qr.default=void 0;var t=e(Ae()),r=Re();return qr.default=(0,t.default)((0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2zM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1m6.5-5-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1z"}),"DeleteOutlineRounded"),qr}var D0=M0();const I0=Ee(D0);var Nr={},Mi;function F0(){if(Mi)return Nr;Mi=1;var e=_e();Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.default=void 0;var t=e(Ae()),r=Re();return Nr.default=(0,t.default)((0,r.jsx)("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded"),Nr}var B0=F0();const V0=Ee(B0);var zr={},Di;function L0(){if(Di)return zr;Di=1;var e=_e();Object.defineProperty(zr,"__esModule",{value:!0}),zr.default=void 0;var t=e(Ae()),r=Re();return zr.default=(0,t.default)((0,r.jsx)("path",{d:"M12 3c-4.8 0-9 3.86-9 9 0 2.12.74 4.07 1.97 5.61l-1.68 1.68c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l1.68-1.68C7.93 20.26 9.88 21 12 21c2.3 0 4.61-.88 6.36-2.64C20.12 16.61 21 14.3 21 12V5c0-1.1-.9-2-2-2zm3.83 9.26-5.16 4.63c-.16.15-.41.14-.56-.01-.14-.14-.16-.36-.04-.52l2.44-3.33-4.05-.4c-.44-.04-.63-.59-.3-.89l5.16-4.63c.16-.15.41-.14.56.01.14.14.16.36.04.52l-2.44 3.33 4.05.4c.45.04.63.59.3.89"}),"EnergySavingsLeafRounded"),zr}var q0=L0();const N0=Ee(q0);var Ur={},Ii;function z0(){if(Ii)return Ur;Ii=1;var e=_e();Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.default=void 0;var t=e(Ae()),r=Re();return Ur.default=(0,t.default)([(0,r.jsx)("path",{d:"M14.14 12h-.06c.81 0 1.28-.91.82-1.57L9.82 3.17c-.4-.57-1.24-.57-1.64 0L3.1 10.43c-.46.66.01 1.57.82 1.57h-.06L.99 16.46c-.43.66.05 1.54.84 1.54H7v2c0 1.1.9 2 2 2s2-.9 2-2v-2h5.17c.79 0 1.27-.88.84-1.54z"},"0"),(0,r.jsx)("path",{d:"M23.01 16.46 20.14 12h-.06c.81 0 1.28-.91.82-1.57l-5.08-7.26c-.4-.57-1.24-.57-1.64 0l-1.57 2.24 3.11 4.44c.43.61.48 1.41.14 2.07-.08.16-.18.3-.3.43l2.29 3.57c.4.62.42 1.4.07 2.04-.01.02-.02.03-.03.04h4.28c.79 0 1.27-.88.84-1.54M13 20c0 1.1.9 2 2 2s2-.9 2-2v-1h-4z"},"1")],"ForestRounded"),Ur}var U0=z0();const W0=Ee(U0);var Wr={},Fi;function Y0(){if(Fi)return Wr;Fi=1;var e=_e();Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.default=void 0;var t=e(Ae()),r=Re();return Wr.default=(0,t.default)((0,r.jsx)("path",{d:"M12 4V2.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V6c3.31 0 6 2.69 6 6 0 .79-.15 1.56-.44 2.25-.15.36-.04.77.23 1.04.51.51 1.37.33 1.64-.34.37-.91.57-1.91.57-2.95 0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-.79.15-1.56.44-2.25.15-.36.04-.77-.23-1.04-.51-.51-1.37-.33-1.64.34C4.2 9.96 4 10.96 4 12c0 4.42 3.58 8 8 8v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36z"}),"LoopRounded"),Wr}var G0=Y0();const K0=Ee(G0);var Yr={},Bi;function J0(){if(Bi)return Yr;Bi=1;var e=_e();Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.default=void 0;var t=e(Ae()),r=Re();return Yr.default=(0,t.default)((0,r.jsx)("path",{d:"M16.96 12h.08c.81 0 1.28-.91.82-1.57l-5.08-7.25c-.4-.57-1.24-.57-1.64 0L6.1 10.43c-.46.66.02 1.57.83 1.57h.04l-2.9 4.46c-.44.66.04 1.54.84 1.54h5.08v2.02c0 1.09.89 1.98 1.98 1.98 1.09 0 1.98-.89 1.98-1.98V18h5.15c.8 0 1.28-.89.83-1.55z"}),"ParkRounded"),Yr}var Q0=J0();const X0=Ee(Q0);var Gr={},Vi;function Z0(){if(Vi)return Gr;Vi=1;var e=_e();Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.default=void 0;var t=e(Ae()),r=Re();return Gr.default=(0,t.default)((0,r.jsx)("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded"),Gr}var H0=Z0();const ep=Ee(H0);var Kr={},Li;function tp(){if(Li)return Kr;Li=1;var e=_e();Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.default=void 0;var t=e(Ae()),r=Re();return Kr.default=(0,t.default)((0,r.jsx)("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded"),Kr}var rp=tp();const np=Ee(rp),qi={400:"#8d6e63",700:"#5d4037"},Be={actionButton:{minWidth:"auto !important"},containerField:{background:he.background,border:`solid 1px ${he.primary}`,borderRadius:"1rem"},containerHidden:{background:he.background,border:`solid 1px ${he.borderGrey}`,borderRadius:"1rem"},containerTitle:{background:qi[700],border:`solid 1px ${qi[400]}`,borderRadius:"1rem"},containerTree:{background:he.tertiary,border:`solid 1px ${he.primary}`,borderRadius:"1rem"},containerValue:{background:he.background,border:`solid 1px ${he.secondary}`,borderRadius:"1rem"},icon:{color:he.grey500},nodeSvg:{stroke:"transparent !important"},stepChip:{fontSize:".7rem !important",fontWeight:"bold",height:"20px !important"},title:{display:"-webkit-box",margin:0,overflow:"hidden",textAlign:"right",textOverflow:"ellipsis",webkitBoxOrient:"vertical",webkitLineClamp:2}},ap=e=>{const t=!!e,r=e==="tree",n=e==="hidden";return e==="title"?Be.containerTitle:n?Be.containerHidden:r?Be.containerTree:t?Be.containerField:Be.containerValue},op=({nodeDatum:e,onAddChildren:t,onEditChildren:r,onDeleteChildren:n,onOpenTreeModal:o,hierarchyPointNode:a,size:i=220})=>{var se;const{t:s}=Le.useTranslation(["translation","form"]),{attributes:f}=e||{},{isRoot:p,isLeaf:b,required:m,isDecision:g,step:y,type:v,label:c,repeatable:T,tag:w,name:j}=f||{},_=!!v,O=v==="tree",C=v==="hidden",I=!_,D=!p&&!b;return l.jsxs("g",{children:[l.jsx(d.GlobalStyles,{styles:{".rd3t-node svg":Be.nodeSvg}}),l.jsx(d.Box,{component:"foreignObject",height:i,width:i,x:`-${i/2}`,y:`-${i/2}`,sx:ap(v),children:l.jsxs(d.Box,{flex:1,display:"flex",p:2,height:"100%",flexDirection:"column",justifyContent:"space-between",children:[l.jsxs(d.Stack,{alignItems:"flex-end",spacing:.5,children:[_&&l.jsxs(d.Stack,{direction:"row",spacing:1,alignItems:"center",children:[y&&l.jsx(d.Tooltip,{title:`${s("step",{ns:"form"})} ${(se=e==null?void 0:e.attributes)==null?void 0:se.step}`,placement:"left",arrow:!0,children:l.jsx(d.Chip,{color:"primary",size:"small",label:y,sx:Be.stepChip})}),l.jsx(d.Typography,{variant:"subtitle2",sx:Be.title,children:l.jsx("strong",{children:c||j})})]}),_&&l.jsx(d.Chip,{color:"info",size:"small",label:s(`type.${v}`,{ns:"form"})}),w&&l.jsx(d.Chip,{variant:"outlined",color:"warning",size:"small",label:w}),m&&l.jsx(d.Stack,{direction:"row",spacing:.5,children:m&&l.jsx(d.Typography,{variant:"body2",sx:{color:({palette:ee})=>ee.error.main},children:s("required")})}),l.jsx(d.Stack,{spacing:.5,alignItems:"flex-end",children:I&&l.jsx(d.Typography,{variant:"subtitle2",sx:Be.title,children:l.jsx("strong",{children:c})})}),l.jsxs(d.Stack,{paddingTop:.5,spacing:.5,direction:"row",children:[T&&l.jsx(d.Tooltip,{title:s("isARepeatable"),placement:"bottom",arrow:!0,children:l.jsx(K0,{style:Be.icon})}),b&&l.jsx(d.Tooltip,{title:s("isALeaf"),placement:"bottom",arrow:!0,children:l.jsx(N0,{style:Be.icon})}),C&&l.jsx(d.Tooltip,{title:s("isAHidden"),placement:"bottom",arrow:!0,children:l.jsx(ep,{style:Be.icon})}),p&&l.jsx(d.Tooltip,{title:s("isTheRoot"),placement:"bottom",arrow:!0,children:l.jsx(X0,{style:Be.icon})}),D&&l.jsx(d.Tooltip,{title:s("isABranch"),placement:"bottom",arrow:!0,children:l.jsx(O0,{style:Be.icon})}),O&&l.jsx(d.Tooltip,{title:s("isATree"),placement:"bottom",arrow:!0,children:l.jsx(W0,{style:Be.icon})})]})]}),l.jsxs(d.Stack,{direction:"row",justifyContent:"flex-end",spacing:0,alignSelf:"flex-end",children:[!p&&l.jsx(d.Tooltip,{title:s("remove"),arrow:!0,children:l.jsx(d.Button,{variant:"text",sx:Be.actionButton,size:"small",color:"error",onClick:()=>n==null?void 0:n(a),children:l.jsx(I0,{})})}),!I&&l.jsx(d.Tooltip,{title:s("edit"),arrow:!0,children:l.jsx(d.Button,{variant:"text",color:"secondary",sx:Be.actionButton,size:"small",onClick:()=>r==null?void 0:r(a),children:l.jsx(V0,{})})}),!g&&l.jsx(d.Tooltip,{title:s("add"),arrow:!0,children:l.jsx(d.Button,{variant:"text",color:"success",sx:Be.actionButton,size:"small",onClick:()=>t==null?void 0:t(a),children:l.jsx(P0,{})})}),O&&l.jsx(d.Tooltip,{title:s("show"),arrow:!0,children:l.jsx(d.Button,{variant:"text",color:"info",sx:Be.actionButton,size:"small",onClick:()=>o==null?void 0:o(a),children:l.jsx(np,{})})})]})]})})]})},ip=k.memo(op),Ni=()=>{const{setModalOpen:e,setCurrentHierarchyPointNode:t,setTreeModalOpen:r,setTreePath:n}=Pe();return{handleAddChildren:p=>{t(p),e("add")},handleCloseTreeModal:()=>{n([]),r(!1)},handleDeleteChildren:p=>{t(p),e("delete")},handleEditChildren:p=>{t(p),e("edit")},handleOpenTreeModal:p=>{var m,g,y;const b={label:((m=p==null?void 0:p.data.attributes)==null?void 0:m.label)||"",path:((y=(g=p==null?void 0:p.data)==null?void 0:g.attributes)==null?void 0:y.treePath)||""};n(v=>[...v,b]),r(!0)}}},sp=({nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:o,onNodeMouseOut:a,addChildren:i})=>{const{handleDeleteChildren:s,handleEditChildren:f,handleAddChildren:p,handleOpenTreeModal:b}=Ni();return l.jsx(ip,{addChildren:i,nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:o,onNodeMouseOut:a,onAddChildren:p,onOpenTreeModal:b,onDeleteChildren:s,onEditChildren:f})},zi=({nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:o,onNodeMouseOut:a,addChildren:i})=>l.jsx(sp,{addChildren:i,nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:o,onNodeMouseOut:a}),lp=()=>{const{t:e}=Le.useTranslation(["modal","snackMessage"]),{currentHierarchyPointNode:t,modalOpen:r,setModalOpen:n,dispatchTree:o}=Pe(),[a,i]=k.useState(!1),s=r==="edit";return{closeModal:()=>{n(null),i(!1)},getTitleModalDelete:()=>{var w;const{label:c,name:T}=((w=t==null?void 0:t.data)==null?void 0:w.attributes)||{};return e("deleteTitle",{name:c||T,ns:"modal"})},getTitleModalMutation:()=>{var j;const{label:c,name:T}=((j=t==null?void 0:t.data)==null?void 0:j.attributes)||{};return s?e(s?"editTitle":"addTitle",{name:c||T,ns:"modal"}):e("addFirstTitle",{ns:"modal"})},handleChangeTree:c=>{try{o(Un(JSON.parse(c)))}catch{return!1}},isDeleteModal:r==="delete",isLargeView:a,isModalMutationOpen:s||r==="add",setIsLargeView:i}},cp=()=>{const{currentTree:e,setCurrentTree:t,tree:r}=Pe(),{name:n,errorName:o,id:a}=e;return{disabled:!!e.id&&!r,errorName:o,handleChangeName:f=>{const{value:p}=f.target;if(!p){t(b=>({...b,errorName:"Champs requis",name:f.target.value}));return}t(b=>({...b,errorName:"",name:f.target.value}))},id:a,name:n}},up=()=>{const{t:e}=Le.useTranslation("form"),{name:t,handleChangeName:r,errorName:n,disabled:o}=cp();return l.jsx(d.TextField,{required:!0,label:e("treeName",{ns:"form"}),size:"small",onChange:r,value:t,error:!!n,disabled:o})},dp=()=>{const{tree:e,treeModalOpen:t,treePath:r,backendConfig:n}=Pe(),{handleCloseTreeModal:o}=Ni(),{getTitleModalMutation:a,closeModal:i,getTitleModalDelete:s,isModalMutationOpen:f,isDeleteModal:p,handleChangeTree:b,isLargeView:m,setIsLargeView:g}=lp(),y=r==null?void 0:r.at(-1),v=y==null?void 0:y.path,c=y==null?void 0:y.label,T=Jt(e,v);return l.jsxs(l.Fragment,{children:[l.jsxs(Wf,{children:[l.jsx(Nf,{children:l.jsxs(d.Stack,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[l.jsx(hl,{}),!!(n!=null&&n.baseUrl)&&l.jsxs(d.Stack,{direction:"row",alignItems:"center",spacing:2,children:[l.jsx(up,{}),l.jsx(_i,{size:"small",arrowOnly:!0,showBtnAddNewTree:!0,fetchWorkflowsOnOpen:!0})]})]})}),l.jsx(Uf,{children:l.jsx(Ua,{data:e,renderCustomNodeElement:zi})}),l.jsx(Gf,{children:l.jsx(Ml,{value:e,onChange:b})}),l.jsx(Lf,{children:l.jsx(Af,{value:e})})]}),l.jsx(d.Dialog,{open:f,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",maxWidth:m?"md":"sm",fullWidth:!0,scroll:"paper",children:l.jsx(S0,{setIsLarge:g,onClose:i,title:a()})}),l.jsx($f,{open:p,onClose:i,title:s(),children:l.jsx(Jf,{onClose:i})}),l.jsx(Bf,{open:t,onClose:o,title:c,children:l.jsx(Ua,{data:T,renderCustomNodeElement:zi})})]})},fp={close:"Close",copyToClipboard:"Copy tree to clipboard",createTree:"Create Tree",downloadJSONFile:"Download JSON File",reset:"Reset",resetTree:"Reset tree",save:"Save",update:"Update"},pp={error:{fetchTree:"An error has occurred. Please try again",saveTree:"An error has occurred. Please try again",updateTree:"An error has occurred. Please try again"},success:{copyToClipboard:"Copied to clipboard",saveTree:"Tree registered",updateTree:"Tree updated"}},hp={add:"Add",cancel:"Cancel",disabled:"Disabled",edit:"Edit",initialQueryEnable:"Enable initial API call",isABranch:"Is a branch",isAHidden:"Is a hidden field",isALeaf:"Is a leaf",isARepeatable:"Is a repeatable",isATree:"Is a tree",isTheRoot:"Is the root",label:"Label",multiple:"Multiple",name:"Name",parentRef:"Parent element",remove:"Remove",required:"Required",save:"Save",show:"Show",tag:"Tag",type:"Type",uuid:"UUID",validate:"Validate",value:"Value",values:"Values"},mp={close:"Fermer",copyToClipboard:"Copier l'arbre dans le presse-papiers",createTree:"Créer un arbre",downloadJSONFile:"Télécharger le fichier JSON",reset:"Réinitialiser",resetTree:"Réinitialiser l'arbre",save:"Enregistrer",update:"Modifier"},Ui={additionalParams:"Paramètres API",addressStructureHint:"Un type d'adresse doit être :",ancestor:"Ancêtre",ancestorValue:"Récupération de la valeur de : {{ancestorName}}",apiRoute:"Api route",cardNumber:"Numéro de carte",dataMapping:"Mapping des options",decisionField:"Champs de décision",disabledPast:"Passé désactivé",dynamicSelectStructureHint:"Assurez-vous que le champ accepte la valeur de l'ancêtre.",email:"Email",firstNameAndLastName:"Prénom et nom",helperText:"Texte d'information",hiddenValue:"Valeur caché",key:"Clé",keyPath:"Chemin de la clé (string | number)",keyPathApiDescription:"Pour insérer une valeur dans une URL, utilisez la syntaxe {paramName}. Par exemple : http://api.com/userId={userId}, ajouter {userId} en params.",keyPathAssignment:"Chemin vers la valeur : {{keyPath}}",keyPathObject:"Clé vers la valeur",label:"Label",letter:"Lettre",mapObject:"Mapper l'objet",message:"Message",mustBeUnique:"Doit être unique",newTree:"Nouvel arbre",noAncestorFound:"Aucun parent trouvé ",number:"Chiffre",numberAndLetter:"Chiffre et lettre",objectDemo:"Exemple de mapping d'objet",offMessage:"Message (désactiver)",onMessage:"Message (activer)",pattern:"Expression régulière",patternMessage:"Message d'aide invalide",phoneNumber:"Numéro de téléphone",receiveValueFromParent:"Valeur par défaut depuis l'ancêtre",repeatable:"Répétable",searchKeyPlaceholder:"text",selectStructureHint:"Doit être une valeur existante dans les options de valeurs.",staticFields:"Champs statiques",staticValue:"(Option) Valeur statique",staticValueDescription:"Par défaut, il utilisera la valeur de l'ancêtre, mais vous pouvez assigner une valeur statique.",step:"Étape",tree:"Arbre",treeName:"Nom de l'arbre",type:{address:"Adresse",autocomplete:"Autocomplétion",checkbox:"Case à cocher",date:"Date",dateRange:"Plage de dates",dynamicSelect:"Sélection dynamique",email:"Email",file:"Fichier",hidden:"Champs caché",number:"Nombre",password:"Mot de passe",radio:"Radio",select:"Select",switch:"Switch",tel:"Téléphone",text:"Texte",time:"Temps",timeRange:"Plage de temps",title:"Titre",tree:"Arbre",url:"URL"},typeStructureWarning:"Le type d'input doit être : {{type}}",url:"URL",urlConstruction:"Construction de l'URL",useAncestorValueAsParam:"Utiliser une valeur ancêtre",value:"Valeur",values:"Valeurs",warningApiAutocomplete:{response:"dois avoir comme réponse",url:"La route de l'API"},warningApiSelect:{response:"à l'emplacement de votre variable.",url:"Pour intégrer la valeur du parent dans l'URL",warning:"placez {{}}"}},Wi={addFirstTitle:"Ajouter un champ",addTitle:"Ajouter un champ à « {{name}} »",deleteTitle:"Voulez vraiment supprimer « {{name}} »",editTitle:"Éditer le champ « {{name}} »",resetTreeContent:"Êtes-vous sûr de vouloir réinitialiser l'arbre ?",saveTree:"Enregistrer l'arbre"},bp={error:{fetchTree:"Une erreur est survenue veuillez réessayer",saveTree:"Une erreur est survenue veuillez réessayer",updateTree:"Une erreur est survenue veuillez réessayer"},success:{copyToClipboard:"Copié dans le presse-papiers",saveTree:"Arbre enregistré",updateTree:"Arbre mis à jour"}},gp={add:"Ajouter",cancel:"Annuler",disabled:"Désactivé",edit:"Éditer",initialQueryEnable:"Activer un appel API intiale",isABranch:"Est une branche",isAHidden:"Est un champs caché",isALeaf:"Est une feuille",isARepeatable:"Est répétable",isATree:"Est un arbre",isTheRoot:"Est la racine",label:"Label",multiple:"Multiple",name:"Nom",parentRef:"Element parent",remove:"Supprimer",required:"Requis",save:"Enregistrer",show:"Afficher",tag:"Tag",type:"Type",uuid:"UUID",validate:"Valider",value:"Valeur",values:"Valeurs"};fr.use(Zs).use(Le.initReactI18next).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:{en:{button:fp,form:Ui,modal:Wi,snackMessage:pp,translation:hp},fr:{button:mp,form:Ui,modal:Wi,snackMessage:bp,translation:gp}},returnNull:!1}).then(()=>{document.documentElement.lang!==fr.resolvedLanguage&&fr.resolvedLanguage&&document.documentElement.setAttribute("lang",fr.resolvedLanguage)}),fr.on("languageChanged",e=>{document.documentElement.setAttribute("lang",e)});const vp=({initialTree:e,initialTreeId:t,backendConfig:r})=>(k.useLayoutEffect(()=>{Kt.defaults.baseURL=r==null?void 0:r.baseUrl,r!=null&&r.authToken&&(Kt.defaults.headers.common.Authorization=`Bearer ${r==null?void 0:r.authToken}`)},[r==null?void 0:r.authToken,r==null?void 0:r.baseUrl]),l.jsx(Gt.QueryClientProvider,{client:ol,children:l.jsx(ll,{authToken:r==null?void 0:r.authToken,children:l.jsx(_l,{backendConfig:r,initialTree:e,initialTreeId:t,children:l.jsx(al,{children:l.jsx(fl,{children:l.jsx(dp,{})})})})})}));Fe.TreePlusIcon=Va,Fe.Treege=vp,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})});