treege 2.0.0 → 2.1.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.
- package/CHANGELOG.md +3 -25
- package/dist/components/DataDisplay/Tree/useTree.d.ts +1 -1
- package/dist/constants/fields.d.ts +16 -16
- package/dist/features/Treege/components/Forms/AssignValueToChildren/AssignValueToChildren.d.ts +1 -3
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/Fields/ApiFieldsConfigAccordion.d.ts +32 -0
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/Fields/FillerFieldAccordion.d.ts +14 -0
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/FormTreeCardMutation.d.ts +1 -2
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +4 -9
- package/dist/features/Treege/components/Inputs/AutocompleteSelectType/useAutocompleteSelectType.d.ts +32 -32
- package/dist/features/Treege/components/TreeGrid/useTreeGrid.d.ts +0 -2
- package/dist/features/Treege/context/TreegeProvider.d.ts +5 -4
- package/dist/features/Treege/reducer/treeReducer.d.ts +20 -19
- package/dist/locales/en/form-en.d.ts +16 -8
- package/dist/locales/en/translation-en.d.ts +2 -0
- package/dist/locales/fr/form-fr.d.ts +16 -8
- package/dist/locales/fr/translation-fr.d.ts +2 -0
- package/dist/main.js +4334 -5031
- package/dist/main.umd.cjs +42 -53
- package/dist/utils/tree/removeNode/removeNode.d.ts +3 -3
- package/dist/utils/tree/updateNodeInTree/updateNodeInTree.d.ts +3 -3
- package/package.json +25 -24
- package/dist/context/Snackbar/SnackbarContext.d.ts +0 -19
- package/dist/context/Snackbar/SnackbarProvider.d.ts +0 -6
- package/dist/context/Snackbar/snackbarReducer.d.ts +0 -23
- package/dist/features/Treege/components/Forms/ReceiveValueFromAncestor.d.ts +0 -11
- package/dist/hooks/useSnackbar/index.d.ts +0 -3
- package/dist/hooks/useSnackbar/useSnackbar.d.ts +0 -6
- /package/dist/features/Treege/components/Forms/FormTreeCardMutation/{ExtraField.d.ts → Fields/ExtraField.d.ts} +0 -0
package/dist/main.umd.cjs
CHANGED
|
@@ -1,88 +1,78 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Ce,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("@tanstack/react-query"),require("@tracktor/design-system"),require("axios"),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","@tracktor/design-system","axios","react-d3-tree","react-i18next","@codemirror/lang-json","@uiw/codemirror-theme-dracula","@uiw/react-codemirror","@mui/icons-material","i18next","i18next-browser-languagedetector"],A):(Ce=typeof globalThis<"u"?globalThis:Ce||self,A(Ce.treege={},Ce.React,Ce.reactQuery,Ce.tracktorDesignSystem,Ce.axios,Ce.ReactD3Tree,Ce.reactI18next,Ce.codemirrorLangJson,Ce.codemirrorThemeDracula,Ce.reactCodemirror,Ce.iconsMaterial,Ce.i18next,Ce.i18nextBrowserLanguageDetector))})(this,function(Ce,A,ut,c,dt,oo,ke,io,so,lo,co,kt,uo){"use strict";function fo(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 Ee=fo(A);function po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ut={exports:{}},Et={};/**
|
|
2
2
|
* @license React
|
|
3
|
-
* react-jsx-runtime.production.
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
|
9
|
+
*/var mn;function ho(){if(mn)return Et;mn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var l in a)l!=="key"&&(o[l]=a[l])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:s,ref:a!==void 0?a:null,props:o}}return Et.Fragment=t,Et.jsx=r,Et.jsxs=r,Et}var jt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
13
|
-
* Copyright (c)
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
17
|
+
*/var bn;function mo(){return bn||(bn=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===u?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case d:return"Fragment";case w:return"Profiler";case k:return"StrictMode";case T:return"Suspense";case I:return"SuspenseList";case G:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case y:return"Portal";case j:return(h.displayName||"Context")+".Provider";case P:return(h._context.displayName||"Context")+".Consumer";case S:var v=h.render;return h=h.displayName,h||(h=v.displayName||v.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case _:return v=h.displayName||null,v!==null?v:e(h.type)||"Memo";case H:v=h._payload,h=h._init;try{return e(h(v))}catch{}}return null}function t(h){return""+h}function r(h){try{t(h);var v=!1}catch{v=!0}if(v){v=console;var M=v.error,D=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return M.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",D),t(h)}}function n(h){if(h===d)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===H)return"<...>";try{var v=e(h);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function a(){var h=$.A;return h===null?null:h.getOwner()}function o(){return Error("react-stack-top-frame")}function s(h){if(L.call(h,"key")){var v=Object.getOwnPropertyDescriptor(h,"key").get;if(v&&v.isReactWarning)return!1}return h.key!==void 0}function l(h,v){function M(){O||(O=!0,console.error("%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://react.dev/link/special-props)",v))}M.isReactWarning=!0,Object.defineProperty(h,"key",{get:M,configurable:!0})}function p(){var h=e(this.type);return W[h]||(W[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function f(h,v,M,D,N,z,q,U){return M=z.ref,h={$$typeof:C,type:h,key:v,props:z,_owner:N},(M!==void 0?M:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:p}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function m(h,v,M,D,N,z,q,U){var F=v.children;if(F!==void 0)if(D)if(J(F)){for(D=0;D<F.length;D++)b(F[D]);Object.freeze&&Object.freeze(F)}else console.error("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 b(F);if(L.call(v,"key")){F=e(h);var K=Object.keys(v).filter(function(ye){return ye!=="key"});D=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",we[F+D]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
26
18
|
let props = %s;
|
|
27
19
|
<%s {...props} />
|
|
28
20
|
React keys must be passed directly to JSX without using spread:
|
|
29
21
|
let props = %s;
|
|
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`}),
|
|
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`})]}),
|
|
33
|
-
*
|
|
34
|
-
* react-is.production.js
|
|
22
|
+
<%s key={someKey} {...props} />`,D,F,K,F),we[F+D]=!0)}if(F=null,M!==void 0&&(r(M),F=""+M),s(v)&&(r(v.key),F=""+v.key),"key"in v){M={};for(var Y in v)Y!=="key"&&(M[Y]=v[Y])}else M=v;return F&&l(M,typeof h=="function"?h.displayName||h.name||"Unknown":h),f(h,F,z,N,a(),M,q,U)}function b(h){typeof h=="object"&&h!==null&&h.$$typeof===C&&h._store&&(h._store.validated=1)}var g=A,C=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),j=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),u=Symbol.for("react.client.reference"),$=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,J=Array.isArray,ue=console.createTask?console.createTask:function(){return null};g={"react-stack-bottom-frame":function(h){return h()}};var O,W={},Q=g["react-stack-bottom-frame"].bind(g,o)(),ge=ue(n(o)),we={};jt.Fragment=d,jt.jsx=function(h,v,M,D,N){var z=1e4>$.recentlyCreatedOwnerStacks++;return m(h,v,M,!1,D,N,z?Error("react-stack-top-frame"):Q,z?ue(n(h)):ge)},jt.jsxs=function(h,v,M,D,N){var z=1e4>$.recentlyCreatedOwnerStacks++;return m(h,v,M,!0,D,N,z?Error("react-stack-top-frame"):Q,z?ue(n(h)):ge)}}()),jt}var gn;function bo(){return gn||(gn=1,process.env.NODE_ENV==="production"?Ut.exports=ho():Ut.exports=mo()),Ut.exports}var i=bo();const ie={background:"#0a1929",borderBlue:"#0f353e",borderGrey:"rgba(255, 255, 255, 0.1)",grey500:"#868c95",primary:"#0ed3b4",secondary:"#007ef6",tertiary:"#0f353e"},go={components:{MuiButton:{styleOverrides:{root:({ownerState:e})=>({...e.color==="primary"&&e.variant==="contained"&&{color:`${ie.tertiary} !important`},...e.disabled&&e.variant==="contained"&&{color:"white"}})}}},palette:{background:{default:ie.background,paper:ie.background},mode:"dark",primary:{main:ie.primary},secondary:{main:ie.secondary}}},yo=({children:e})=>i.jsxs(i.Fragment,{children:[i.jsx(c.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(c.ThemeProvider,{theme:go,children:e})]}),xo=new ut.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),vo={authToken:void 0},Co=A.createContext(vo),To=({children:e,authToken:t})=>{const r=A.useMemo(()=>({authToken:t}),[t]);return i.jsx(Co.Provider,{value:r,children:e})},wo="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",ko=()=>i.jsx("img",{src:wo,alt:"Treege",height:30,width:"auto"}),Eo=()=>{const[e,t]=A.useState({x:0,y:0}),[r,n]=A.useState({height:0,width:0}),a=A.useCallback(o=>{if(!o)return;const{width:s,height:l}=o.getBoundingClientRect();n({height:l,width:s}),t({x:s/2,y:l/2})},[]);return{dimensions:r,refContainer:a,translate:e}},yn=({color:e,height:t=20,width:r=20})=>i.jsxs("svg",{focusable:"false",x:"0px",y:"0px",viewBox:"0 0 24 24",color:e,height:t,width:r,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
|
|
23
|
+
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
|
|
24
|
+
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`})]}),Ht=(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 a=r[n],o=Ht(a,t);if(o)return o}return null},ft=(e,t)=>{if(!e)return null;if(!t)return e;if(e.attributes?.treePath===t)return e.attributes?.tree||null;let r=null;const n=e.attributes?.tree,a=e.children?.length;if(n&&(r=ft(e.attributes?.tree,t)),a){const{children:o}=e;for(let s=0;s<o.length;s+=1){const l=o[s];if(r!==null)return r;r=ft(l,t)}}return r},Yt=(e,t,r)=>{const n=ft(e,t);return Ht(n,r)},jo=(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)},So=({tree:e,path:t,uuid:r,child:n})=>{const{attributes:a,children:o}=n;if(!e)return o.length?{...n}:{...n,attributes:{...a,isLeaf:!0,isRoot:!0}};const s=structuredClone(e),l=Yt(s,t,r);return jo(l,{...n,...!a.isDecision&&{children:[...Yt(e,t,r)?.children||[]]}}),s},xn=(e,t,r=null)=>{if(!e)return null;if(e.uuid===t)return r;const n=e.children||[];for(let a=0;a<n.length;a+=1){const o=n[a],s=xn(o,t,e);if(s!==null)return s}return null},Ao=(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),Po=(e,t,r)=>{const n=ft(e,t);return xn(n,r)},vn=(e,t)=>{const r={...e.attributes};r.defaultValueFromAncestor?.uuid===t&&delete r.defaultValueFromAncestor,r.route?.params&&(r.route={...r.route,params:r.route.params.filter(a=>a.ancestorUuid!==t)});const n=e.children?.map(a=>vn(a,t))||[];return{...e,attributes:r,children:n}},Oo=({tree:e,path:t,uuid:r})=>{if(!e)return null;const n=structuredClone(e),a=Yt(n,t,r),o=Po(n,t,r);return Ao(o,a),vn(n,r)},Ro=(e,t)=>{if(!e)return null;const r=t.attributes.isDecision,n=e.attributes.isDecision,a=e.attributes.depth===0,o={value:t.uuid},s=n||r,l=s?{value:[...t.children]}:{value:[...e.children]},p=s?{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!t.children.length||!r}}:{value:{...t.attributes,...a&&{isRoot:!0},isLeaf:!e.children.length}};return Object.defineProperties(e,{attributes:p,children:l,uuid:o}),null},$o=({tree:e,path:t,uuid:r,children:n})=>{if(!e)return null;const a=structuredClone(e),o=Yt(a,t,r);return Ro(o,n),a},Mo=(e,t,r)=>{if(!e||!t)return[];const n=[],a=o=>{const{attributes:s,uuid:l}=o;return n.push({name:s?.name,uuid:l}),l===t||(o.children?.some(f=>a(f))??!1)?!0:(n.pop(),!1)};return a(e),r?n.filter(o=>o.uuid!==r):n},Fe={appendTreeCard:"appendTreeCard",deleteTreeCard:"deleteTreeCard",replaceTreeCard:"replaceTreeCard",resetTree:"resetTree",setTree:"setTree"},_o=(e,t,r)=>({children:r,path:e,type:Fe.appendTreeCard,uuid:t}),Io=(e,t,r)=>({children:r,path:e,type:Fe.replaceTreeCard,uuid:t}),Do=(e,t)=>({path:e,type:Fe.deleteTreeCard,uuid:t}),Cn=()=>({type:Fe.resetTree}),jr=e=>({tree:e,type:Fe.setTree}),Fo=(e,t)=>{switch(t.type){case Fe.appendTreeCard:{const{uuid:r,path:n,children:a}=t;return So({child:a,path:n,tree:e,uuid:r})}case Fe.deleteTreeCard:{const{path:r,uuid:n}=t;return Oo({path:r,tree:e,uuid:n})}case Fe.replaceTreeCard:{const{uuid:r,path:n,children:a}=t;return $o({children:a,path:n,tree:e,uuid:r})}case Fe.resetTree:return null;case Fe.setTree:return t.tree;default:throw new Error}},Gt=(e,t)=>{const{backendConfig:r}=xe(),{endpoints:n}=r||{},{workflow:a=""}=n||{};return ut.useQuery({enabled:!!e,queryFn:async({signal:o})=>{const{data:s}=await dt.get(`${a}?id=${e}`,{signal:o});return s},queryKey:["workflow",e],...t})},No="2.1.0",Ne={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:""},Sr=A.createContext(Ne),Bo=({children:e,initialTree:t,initialTreeId:r,backendConfig:n})=>{const{data:a}=Gt(r,{enabled:!!r}),[o,s]=A.useState(Ne.currentHierarchyPointNode),[l,p]=A.useState(Ne.modalOpen),[f,m]=A.useState(Ne.treeModalOpen),[b,g]=A.useState(Ne.treePath),[C,y]=A.useReducer(Fo,t||Ne.tree),[d,k]=A.useState(r?{...Ne.currentTree,id:r}:Ne.currentTree);A.useEffect(()=>{a&&(k({id:a.id,name:a.label}),y(jr(a.workflow||null)))},[a]);const w=A.useMemo(()=>({backendConfig:{...Ne.backendConfig,...n,endpoints:{...Ne.backendConfig?.endpoints,...n?.endpoints}},currentHierarchyPointNode:o,currentTree:d,dispatchTree:y,modalOpen:l,setCurrentHierarchyPointNode:s,setCurrentTree:k,setModalOpen:p,setTreeModalOpen:m,setTreePath:g,tree:C,treeModalOpen:f,treePath:b,version:No}),[n,o,d,l,C,f,b]);return i.jsx(Sr.Provider,{value:w,children:e})},xe=()=>{if(!Sr)throw new Error("useTreegeContext must be used within a TreegeProvider");return A.useContext(Sr)},Lo=()=>{const{setModalOpen:e}=xe();return{handleClick:()=>e("add")}},Vo=()=>{const{t:e}=ke.useTranslation("button"),{handleClick:t}=Lo();return i.jsx(c.Box,{alignItems:"center",justifyContent:"center",display:"flex",height:"100%",children:i.jsx(c.Button,{onClick:t,size:"medium",variant:"contained",startIcon:i.jsx(yn,{}),children:e("createTree")})})},Ar={container:{height:"100%",width:"100%"},progressContainer:{alignItems:"center",display:"flex",height:"100%",justifyContent:"center"},treeLink:{stroke:`${ie.borderGrey} !important`}},Tn="tree-link",zo=({data:e,renderCustomNodeElement:t,nodeSize:r={x:300,y:300}})=>{const{dimensions:n,refContainer:a,translate:o}=Eo(),{currentTree:s}=xe(),{isLoading:l,data:p}=Gt(s.id);return!e&&!s.id||p&&!e?i.jsx(Vo,{}):s.id&&!e||l?i.jsx(c.Box,{sx:Ar.progressContainer,children:i.jsx(c.CircularProgress,{})}):i.jsxs("div",{style:Ar.container,ref:a,children:[i.jsx(c.GlobalStyles,{styles:{[`.${Tn}`]:Ar.treeLink}}),i.jsx(oo,{data:e,orientation:"vertical",translate:o,dimensions:n,renderCustomNodeElement:t,pathFunc:"diagonal",pathClassFunc:()=>Tn,nodeSize:r})]})},wn=A.memo(zo),qo=()=>({formatJSON:t=>JSON.stringify(t??{},null,2)}),kn={fullHeight:{height:"100%"}},Wo=({value:e,onChange:t})=>{const{formatJSON:r}=qo();return i.jsxs("div",{style:kn.fullHeight,children:[i.jsx(c.GlobalStyles,{styles:{".cm-activeLine.cm-line, .cm-gutterElement.cm-activeLineGutter":{backgroundColor:"transparent"}}}),i.jsx(lo,{editable:!0,value:r(e),extensions:[io.json()],theme:so.dracula,height:"100%",style:kn.fullHeight,onChange:t})]})},En=e=>e,Uo=(()=>{let e=En;return{configure(t){e=t},generate(t){return e(t)},reset(){e=En}}})();function Ke(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 rt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ke(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Kt={exports:{}},Jt={exports:{}},te={};/** @license React v16.13.1
|
|
25
|
+
* react-is.production.min.js
|
|
35
26
|
*
|
|
36
|
-
* Copyright (c)
|
|
27
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
28
|
*
|
|
38
29
|
* This source code is licensed under the MIT license found in the
|
|
39
30
|
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var
|
|
41
|
-
* @license React
|
|
31
|
+
*/var jn;function Ho(){if(jn)return te;jn=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,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,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,k=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function j(T){if(typeof T=="object"&&T!==null){var I=T.$$typeof;switch(I){case t:switch(T=T.type,T){case p:case f:case n:case o:case a:case b:return T;default:switch(T=T&&T.$$typeof,T){case l:case m:case y:case C:case s:return T;default:return I}}case r:return I}}}function S(T){return j(T)===f}return te.AsyncMode=p,te.ConcurrentMode=f,te.ContextConsumer=l,te.ContextProvider=s,te.Element=t,te.ForwardRef=m,te.Fragment=n,te.Lazy=y,te.Memo=C,te.Portal=r,te.Profiler=o,te.StrictMode=a,te.Suspense=b,te.isAsyncMode=function(T){return S(T)||j(T)===p},te.isConcurrentMode=S,te.isContextConsumer=function(T){return j(T)===l},te.isContextProvider=function(T){return j(T)===s},te.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},te.isForwardRef=function(T){return j(T)===m},te.isFragment=function(T){return j(T)===n},te.isLazy=function(T){return j(T)===y},te.isMemo=function(T){return j(T)===C},te.isPortal=function(T){return j(T)===r},te.isProfiler=function(T){return j(T)===o},te.isStrictMode=function(T){return j(T)===a},te.isSuspense=function(T){return j(T)===b},te.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===f||T===o||T===a||T===b||T===g||typeof T=="object"&&T!==null&&(T.$$typeof===y||T.$$typeof===C||T.$$typeof===s||T.$$typeof===l||T.$$typeof===m||T.$$typeof===k||T.$$typeof===w||T.$$typeof===P||T.$$typeof===d)},te.typeOf=j,te}var re={};/** @license React v16.13.1
|
|
42
32
|
* react-is.development.js
|
|
43
33
|
*
|
|
44
|
-
* Copyright (c)
|
|
34
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
35
|
*
|
|
46
36
|
* This source code is licensed under the MIT license found in the
|
|
47
37
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var
|
|
49
|
-
|
|
38
|
+
*/var Sn;function Yo(){return Sn||(Sn=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,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,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,k=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function j(R){return typeof R=="string"||typeof R=="function"||R===n||R===f||R===o||R===a||R===b||R===g||typeof R=="object"&&R!==null&&(R.$$typeof===y||R.$$typeof===C||R.$$typeof===s||R.$$typeof===l||R.$$typeof===m||R.$$typeof===k||R.$$typeof===w||R.$$typeof===P||R.$$typeof===d)}function S(R){if(typeof R=="object"&&R!==null){var Se=R.$$typeof;switch(Se){case t:var Xe=R.type;switch(Xe){case p:case f:case n:case o:case a:case b:return Xe;default:var ot=Xe&&Xe.$$typeof;switch(ot){case l:case m:case y:case C:case s:return ot;default:return Se}}case r:return Se}}}var T=p,I=f,_=l,H=s,G=t,u=m,$=n,L=y,J=C,ue=r,O=o,W=a,Q=b,ge=!1;function we(R){return ge||(ge=!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.")),h(R)||S(R)===p}function h(R){return S(R)===f}function v(R){return S(R)===l}function M(R){return S(R)===s}function D(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function N(R){return S(R)===m}function z(R){return S(R)===n}function q(R){return S(R)===y}function U(R){return S(R)===C}function F(R){return S(R)===r}function K(R){return S(R)===o}function Y(R){return S(R)===a}function ye(R){return S(R)===b}re.AsyncMode=T,re.ConcurrentMode=I,re.ContextConsumer=_,re.ContextProvider=H,re.Element=G,re.ForwardRef=u,re.Fragment=$,re.Lazy=L,re.Memo=J,re.Portal=ue,re.Profiler=O,re.StrictMode=W,re.Suspense=Q,re.isAsyncMode=we,re.isConcurrentMode=h,re.isContextConsumer=v,re.isContextProvider=M,re.isElement=D,re.isForwardRef=N,re.isFragment=z,re.isLazy=q,re.isMemo=U,re.isPortal=F,re.isProfiler=K,re.isStrictMode=Y,re.isSuspense=ye,re.isValidElementType=j,re.typeOf=S}()),re}var An;function Pn(){return An||(An=1,process.env.NODE_ENV==="production"?Jt.exports=Ho():Jt.exports=Yo()),Jt.exports}/*
|
|
39
|
+
object-assign
|
|
40
|
+
(c) Sindre Sorhus
|
|
41
|
+
@license MIT
|
|
42
|
+
*/var Pr,On;function Go(){if(On)return Pr;On=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(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 p=Object.getOwnPropertyNames(s).map(function(m){return s[m]});if(p.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(m){f[m]=m}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Pr=a()?Object.assign:function(o,s){for(var l,p=n(o),f,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var b in l)t.call(l,b)&&(p[b]=l[b]);if(e){f=e(l);for(var g=0;g<f.length;g++)r.call(l,f[g])&&(p[f[g]]=l[f[g]])}}return p},Pr}var Or,Rn;function Rr(){if(Rn)return Or;Rn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Or=e,Or}var $r,$n;function Mn(){return $n||($n=1,$r=Function.call.bind(Object.prototype.hasOwnProperty)),$r}var Mr,_n;function Ko(){if(_n)return Mr;_n=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Rr(),r={},n=Mn();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(o,s,l,p,f){if(process.env.NODE_ENV!=="production"){for(var m in o)if(n(o,m)){var b;try{if(typeof o[m]!="function"){var g=Error((p||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}b=o[m](s,m,p,l,null,t)}catch(y){b=y}if(b&&!(b instanceof Error)&&e((p||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),b instanceof Error&&!(b.message in r)){r[b.message]=!0;var C=f?f():"";e("Failed "+l+" type: "+b.message+(C??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Mr=a,Mr}var _r,In;function Jo(){if(In)return _r;In=1;var e=Pn(),t=Go(),r=Rr(),n=Mn(),a=Ko(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(l){var p="Warning: "+l;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function s(){return null}return _r=function(l,p){var f=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function b(h){var v=h&&(f&&h[f]||h[m]);if(typeof v=="function")return v}var g="<<anonymous>>",C={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:P(),arrayOf:j,element:S(),elementType:T(),instanceOf:I,node:u(),objectOf:H,oneOf:_,oneOfType:G,shape:L,exact:J};function y(h,v){return h===v?h!==0||1/h===1/v:h!==h&&v!==v}function d(h,v){this.message=h,this.data=v&&typeof v=="object"?v:{},this.stack=""}d.prototype=Error.prototype;function k(h){if(process.env.NODE_ENV!=="production")var v={},M=0;function D(z,q,U,F,K,Y,ye){if(F=F||g,Y=Y||U,ye!==r){if(p){var R=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 R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Se=F+":"+U;!v[Se]&&M<3&&(o("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+F+"`. 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."),v[Se]=!0,M++)}}return q[U]==null?z?q[U]===null?new d("The "+K+" `"+Y+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new d("The "+K+" `"+Y+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:h(q,U,F,K,Y)}var N=D.bind(null,!1);return N.isRequired=D.bind(null,!0),N}function w(h){function v(M,D,N,z,q,U){var F=M[D],K=W(F);if(K!==h){var Y=Q(F);return new d("Invalid "+z+" `"+q+"` of type "+("`"+Y+"` supplied to `"+N+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return k(v)}function P(){return k(s)}function j(h){function v(M,D,N,z,q){if(typeof h!="function")return new d("Property `"+q+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var U=M[D];if(!Array.isArray(U)){var F=W(U);return new d("Invalid "+z+" `"+q+"` of type "+("`"+F+"` supplied to `"+N+"`, expected an array."))}for(var K=0;K<U.length;K++){var Y=h(U,K,N,z,q+"["+K+"]",r);if(Y instanceof Error)return Y}return null}return k(v)}function S(){function h(v,M,D,N,z){var q=v[M];if(!l(q)){var U=W(q);return new d("Invalid "+N+" `"+z+"` of type "+("`"+U+"` supplied to `"+D+"`, expected a single ReactElement."))}return null}return k(h)}function T(){function h(v,M,D,N,z){var q=v[M];if(!e.isValidElementType(q)){var U=W(q);return new d("Invalid "+N+" `"+z+"` of type "+("`"+U+"` supplied to `"+D+"`, expected a single ReactElement type."))}return null}return k(h)}function I(h){function v(M,D,N,z,q){if(!(M[D]instanceof h)){var U=h.name||g,F=we(M[D]);return new d("Invalid "+z+" `"+q+"` of type "+("`"+F+"` supplied to `"+N+"`, expected ")+("instance of `"+U+"`."))}return null}return k(v)}function _(h){if(!Array.isArray(h))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 v(M,D,N,z,q){for(var U=M[D],F=0;F<h.length;F++)if(y(U,h[F]))return null;var K=JSON.stringify(h,function(ye,R){var Se=Q(R);return Se==="symbol"?String(R):R});return new d("Invalid "+z+" `"+q+"` of value `"+String(U)+"` "+("supplied to `"+N+"`, expected one of "+K+"."))}return k(v)}function H(h){function v(M,D,N,z,q){if(typeof h!="function")return new d("Property `"+q+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var U=M[D],F=W(U);if(F!=="object")return new d("Invalid "+z+" `"+q+"` of type "+("`"+F+"` supplied to `"+N+"`, expected an object."));for(var K in U)if(n(U,K)){var Y=h(U,K,N,z,q+"."+K,r);if(Y instanceof Error)return Y}return null}return k(v)}function G(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var v=0;v<h.length;v++){var M=h[v];if(typeof M!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ge(M)+" at index "+v+"."),s}function D(N,z,q,U,F){for(var K=[],Y=0;Y<h.length;Y++){var ye=h[Y],R=ye(N,z,q,U,F,r);if(R==null)return null;R.data&&n(R.data,"expectedType")&&K.push(R.data.expectedType)}var Se=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new d("Invalid "+U+" `"+F+"` supplied to "+("`"+q+"`"+Se+"."))}return k(D)}function u(){function h(v,M,D,N,z){return ue(v[M])?null:new d("Invalid "+N+" `"+z+"` supplied to "+("`"+D+"`, expected a ReactNode."))}return k(h)}function $(h,v,M,D,N){return new d((h||"React class")+": "+v+" type `"+M+"."+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function L(h){function v(M,D,N,z,q){var U=M[D],F=W(U);if(F!=="object")return new d("Invalid "+z+" `"+q+"` of type `"+F+"` "+("supplied to `"+N+"`, expected `object`."));for(var K in h){var Y=h[K];if(typeof Y!="function")return $(N,z,q,K,Q(Y));var ye=Y(U,K,N,z,q+"."+K,r);if(ye)return ye}return null}return k(v)}function J(h){function v(M,D,N,z,q){var U=M[D],F=W(U);if(F!=="object")return new d("Invalid "+z+" `"+q+"` of type `"+F+"` "+("supplied to `"+N+"`, expected `object`."));var K=t({},M[D],h);for(var Y in K){var ye=h[Y];if(n(h,Y)&&typeof ye!="function")return $(N,z,q,Y,Q(ye));if(!ye)return new d("Invalid "+z+" `"+q+"` key `"+Y+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(M[D],null," ")+`
|
|
43
|
+
Valid keys: `+JSON.stringify(Object.keys(h),null," "));var R=ye(U,Y,N,z,q+"."+Y,r);if(R)return R}return null}return k(v)}function ue(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(ue);if(h===null||l(h))return!0;var v=b(h);if(v){var M=v.call(h),D;if(v!==h.entries){for(;!(D=M.next()).done;)if(!ue(D.value))return!1}else for(;!(D=M.next()).done;){var N=D.value;if(N&&!ue(N[1]))return!1}}else return!1;return!0;default:return!1}}function O(h,v){return h==="symbol"?!0:v?v["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&v instanceof Symbol:!1}function W(h){var v=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":O(v,h)?"symbol":v}function Q(h){if(typeof h>"u"||h===null)return""+h;var v=W(h);if(v==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return v}function ge(h){var v=Q(h);switch(v){case"array":case"object":return"an "+v;case"boolean":case"date":case"regexp":return"a "+v;default:return v}}function we(h){return!h.constructor||!h.constructor.name?g:h.constructor.name}return C.checkPropTypes=a,C.resetWarningCache=a.resetWarningCache,C.PropTypes=C,C},_r}var Ir,Dn;function Qo(){if(Dn)return Ir;Dn=1;var e=Rr();function t(){}function r(){}return r.resetWarningCache=t,Ir=function(){function n(s,l,p,f,m,b){if(b!==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 a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Ir}var Fn;function Xo(){if(Fn)return Kt.exports;if(Fn=1,process.env.NODE_ENV!=="production"){var e=Pn(),t=!0;Kt.exports=Jo()(e.isElement,t)}else Kt.exports=Qo()();return Kt.exports}var Zo=Xo();const X=po(Zo);function Nn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Nn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Bn(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Nn(e))&&(n&&(n+=" "),n+=t);return n}function ei(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let s="",l=!0;for(let p=0;p<o.length;p+=1){const f=o[p];f&&(s+=(l===!0?"":" ")+t(f),l=!1,r&&r[f]&&(s+=" "+r[f]))}n[a]=s}return n}var Qt={exports:{}},ae={};/**
|
|
44
|
+
* @license React
|
|
45
|
+
* react-is.production.js
|
|
50
46
|
*
|
|
51
|
-
* Copyright (c)
|
|
47
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
52
48
|
*
|
|
53
49
|
* This source code is licensed under the MIT license found in the
|
|
54
50
|
* LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/var
|
|
51
|
+
*/var Ln;function ti(){if(Ln)return ae;Ln=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=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"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),C=Symbol.for("react.client.reference");function y(d){if(typeof d=="object"&&d!==null){var k=d.$$typeof;switch(k){case e:switch(d=d.type,d){case r:case a:case n:case p:case f:case g:return d;default:switch(d=d&&d.$$typeof,d){case s:case l:case b:case m:return d;case o:return d;default:return k}}case t:return k}}}return ae.ContextConsumer=o,ae.ContextProvider=s,ae.Element=e,ae.ForwardRef=l,ae.Fragment=r,ae.Lazy=b,ae.Memo=m,ae.Portal=t,ae.Profiler=a,ae.StrictMode=n,ae.Suspense=p,ae.SuspenseList=f,ae.isContextConsumer=function(d){return y(d)===o},ae.isContextProvider=function(d){return y(d)===s},ae.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},ae.isForwardRef=function(d){return y(d)===l},ae.isFragment=function(d){return y(d)===r},ae.isLazy=function(d){return y(d)===b},ae.isMemo=function(d){return y(d)===m},ae.isPortal=function(d){return y(d)===t},ae.isProfiler=function(d){return y(d)===a},ae.isStrictMode=function(d){return y(d)===n},ae.isSuspense=function(d){return y(d)===p},ae.isSuspenseList=function(d){return y(d)===f},ae.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===a||d===n||d===p||d===f||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===m||d.$$typeof===s||d.$$typeof===o||d.$$typeof===l||d.$$typeof===C||d.getModuleId!==void 0)},ae.typeOf=y,ae}var oe={};/**
|
|
52
|
+
* @license React
|
|
56
53
|
* react-is.development.js
|
|
57
54
|
*
|
|
58
|
-
* Copyright (c)
|
|
55
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
59
56
|
*
|
|
60
57
|
* This source code is licensed under the MIT license found in the
|
|
61
58
|
* LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/var
|
|
63
|
-
object-
|
|
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(`
|
|
59
|
+
*/var Vn;function ri(){return Vn||(Vn=1,process.env.NODE_ENV!=="production"&&function(){function e(d){if(typeof d=="object"&&d!==null){var k=d.$$typeof;switch(k){case t:switch(d=d.type,d){case n:case o:case a:case f:case m:case C:return d;default:switch(d=d&&d.$$typeof,d){case l:case p:case g:case b:return d;case s:return d;default:return k}}case r:return k}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=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"),p=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),C=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");oe.ContextConsumer=s,oe.ContextProvider=l,oe.Element=t,oe.ForwardRef=p,oe.Fragment=n,oe.Lazy=g,oe.Memo=b,oe.Portal=r,oe.Profiler=o,oe.StrictMode=a,oe.Suspense=f,oe.SuspenseList=m,oe.isContextConsumer=function(d){return e(d)===s},oe.isContextProvider=function(d){return e(d)===l},oe.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},oe.isForwardRef=function(d){return e(d)===p},oe.isFragment=function(d){return e(d)===n},oe.isLazy=function(d){return e(d)===g},oe.isMemo=function(d){return e(d)===b},oe.isPortal=function(d){return e(d)===r},oe.isProfiler=function(d){return e(d)===o},oe.isStrictMode=function(d){return e(d)===a},oe.isSuspense=function(d){return e(d)===f},oe.isSuspenseList=function(d){return e(d)===m},oe.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===o||d===a||d===f||d===m||typeof d=="object"&&d!==null&&(d.$$typeof===g||d.$$typeof===b||d.$$typeof===l||d.$$typeof===s||d.$$typeof===p||d.$$typeof===y||d.getModuleId!==void 0)},oe.typeOf=e}()),oe}var zn;function ni(){return zn||(zn=1,process.env.NODE_ENV==="production"?Qt.exports=ti():Qt.exports=ri()),Qt.exports}var Xt=ni();function We(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 qn(e){if(Ee.isValidElement(e)||Xt.isValidElementType(e)||!We(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=qn(e[r])}),t}function Re(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return We(e)&&We(t)&&Object.keys(t).forEach(a=>{Ee.isValidElement(t[a])||Xt.isValidElementType(t[a])?n[a]=t[a]:We(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&We(e[a])?n[a]=Re(e[a],t[a],r):r.clone?n[a]=We(t[a])?qn(t[a]):t[a]:n[a]=t[a]}),n}function St(e,t){return t?Re(e,t,{clone:!1}):e}const Je=process.env.NODE_ENV!=="production"?X.oneOfType([X.number,X.string,X.object,X.array]):{};function Wn(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,a)=>{const o=/min-width:\s*([0-9.]+)/;return+(n.match(o)?.[1]||0)-+(a.match(o)?.[1]||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function ai(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function oi(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>\`.
|
|
60
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ke(18,`(${t})`));return null}const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function ii(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function r(o,s){o.up=(...l)=>t(e.breakpoints.up(...l),s),o.down=(...l)=>t(e.breakpoints.down(...l),s),o.between=(...l)=>t(e.breakpoints.between(...l),s),o.only=(...l)=>t(e.breakpoints.only(...l),s),o.not=(...l)=>{const p=t(e.breakpoints.not(...l),s);return p.includes("not all and")?p.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):p}}const n={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const Zt={xs:0,sm:600,md:900,lg:1200,xl:1536},Un={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Zt[e]}px)`},si={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Zt[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Ue(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||Un;return t.reduce((s,l,p)=>(s[o.up(o.keys[p])]=r(t[p]),s),{})}if(typeof t=="object"){const o=n.breakpoints||Un;return Object.keys(t).reduce((s,l)=>{if(ai(o.keys,l)){const p=oi(n.containerQueries?n:si,l);p&&(s[p]=r(t[l],l))}else if(Object.keys(o.values||Zt).includes(l)){const p=o.up(l);s[p]=r(t[l],l)}else{const p=l;s[p]=t[p]}return s},{})}return r(t)}function li(e={}){return e.keys?.reduce((r,n)=>{const a=e.up(n);return r[a]={},r},{})||{}}function Hn(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function er(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function tr(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=er(e,r)||n,t&&(a=t(a,n,e)),a}function be(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const l=s[t],p=s.theme,f=er(p,n)||{};return Ue(s,l,b=>{let g=tr(f,a,b);return b===g&&typeof b=="string"&&(g=tr(f,a,`${t}${b==="default"?"":rt(b)}`,b)),r===!1?g:{[r]:g}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:Je}:{},o.filterProps=[t],o}function ci(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const ui={m:"margin",p:"padding"},di={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Yn={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fi=ci(e=>{if(e.length>2)if(Yn[e])e=Yn[e];else return[e];const[t,r]=e.split(""),n=ui[t],a=di[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),rr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],nr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],pi=[...rr,...nr];function At(e,t,r,n){const a=er(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${o}.`),typeof a=="string"?a.startsWith("var(")&&o===0?0:a.startsWith("var(")&&o===1?a:`calc(${o} * ${a})`:a*o):Array.isArray(a)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>a.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${s} > ${a.length-1}, you need to add the missing values.`].join(`
|
|
71
61
|
`)):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
|
|
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
|
|
62
|
+
`)));const l=a[s];return o>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof a=="function"?a:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
63
|
+
`)),()=>{})}function Dr(e){return At(e,"spacing",8,"spacing")}function Pt(e,t){return typeof t=="string"||t==null?t:e(t)}function hi(e,t){return r=>e.reduce((n,a)=>(n[a]=Pt(t,r),n),{})}function mi(e,t,r,n){if(!t.includes(r))return null;const a=fi(r),o=hi(a,n),s=e[r];return Ue(e,s,o)}function Gn(e,t){const r=Dr(e.theme);return Object.keys(e).map(n=>mi(e,t,n,r)).reduce(St,{})}function pe(e){return Gn(e,rr)}pe.propTypes=process.env.NODE_ENV!=="production"?rr.reduce((e,t)=>(e[t]=Je,e),{}):{},pe.filterProps=rr;function he(e){return Gn(e,nr)}he.propTypes=process.env.NODE_ENV!=="production"?nr.reduce((e,t)=>(e[t]=Je,e),{}):{},he.filterProps=nr,process.env.NODE_ENV!=="production"&&pi.reduce((e,t)=>(e[t]=Je,e),{});function ar(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?St(a,t[o](n)):a,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,a)=>Object.assign(n,a.propTypes),{}):{},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function _e(e){return typeof e!="number"?e:`${e}px solid`}function Ie(e,t){return be({prop:e,themeKey:"borders",transform:t})}const bi=Ie("border",_e),gi=Ie("borderTop",_e),yi=Ie("borderRight",_e),xi=Ie("borderBottom",_e),vi=Ie("borderLeft",_e),Ci=Ie("borderColor"),Ti=Ie("borderTopColor"),wi=Ie("borderRightColor"),ki=Ie("borderBottomColor"),Ei=Ie("borderLeftColor"),ji=Ie("outline",_e),Si=Ie("outlineColor"),or=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=At(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Pt(t,n)});return Ue(e,e.borderRadius,r)}return null};or.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Je}:{},or.filterProps=["borderRadius"],ar(bi,gi,yi,xi,vi,Ci,Ti,wi,ki,Ei,or,ji,Si);const ir=e=>{if(e.gap!==void 0&&e.gap!==null){const t=At(e.theme,"spacing",8,"gap"),r=n=>({gap:Pt(t,n)});return Ue(e,e.gap,r)}return null};ir.propTypes=process.env.NODE_ENV!=="production"?{gap:Je}:{},ir.filterProps=["gap"];const sr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=At(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Pt(t,n)});return Ue(e,e.columnGap,r)}return null};sr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Je}:{},sr.filterProps=["columnGap"];const lr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=At(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Pt(t,n)});return Ue(e,e.rowGap,r)}return null};lr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Je}:{},lr.filterProps=["rowGap"];const Ai=be({prop:"gridColumn"}),Pi=be({prop:"gridRow"}),Oi=be({prop:"gridAutoFlow"}),Ri=be({prop:"gridAutoColumns"}),$i=be({prop:"gridAutoRows"}),Mi=be({prop:"gridTemplateColumns"}),_i=be({prop:"gridTemplateRows"}),Ii=be({prop:"gridTemplateAreas"}),Di=be({prop:"gridArea"});ar(ir,sr,lr,Ai,Pi,Oi,Ri,$i,Mi,_i,Ii,Di);function pt(e,t){return t==="grey"?t:e}const Fi=be({prop:"color",themeKey:"palette",transform:pt}),Ni=be({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:pt}),Bi=be({prop:"backgroundColor",themeKey:"palette",transform:pt});ar(Fi,Ni,Bi);function $e(e){return e<=1&&e!==0?`${e*100}%`:e}const Li=be({prop:"width",transform:$e}),Fr=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||Zt[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:$e(r)}};return Ue(e,e.maxWidth,t)}return null};Fr.filterProps=["maxWidth"];const Vi=be({prop:"minWidth",transform:$e}),zi=be({prop:"height",transform:$e}),qi=be({prop:"maxHeight",transform:$e}),Wi=be({prop:"minHeight",transform:$e});be({prop:"size",cssProperty:"width",transform:$e}),be({prop:"size",cssProperty:"height",transform:$e});const Ui=be({prop:"boxSizing"});ar(Li,Fr,Vi,zi,qi,Wi,Ui);const cr={border:{themeKey:"borders",transform:_e},borderTop:{themeKey:"borders",transform:_e},borderRight:{themeKey:"borders",transform:_e},borderBottom:{themeKey:"borders",transform:_e},borderLeft:{themeKey:"borders",transform:_e},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:_e},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:or},color:{themeKey:"palette",transform:pt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:pt},backgroundColor:{themeKey:"palette",transform:pt},p:{style:he},pt:{style:he},pr:{style:he},pb:{style:he},pl:{style:he},px:{style:he},py:{style:he},padding:{style:he},paddingTop:{style:he},paddingRight:{style:he},paddingBottom:{style:he},paddingLeft:{style:he},paddingX:{style:he},paddingY:{style:he},paddingInline:{style:he},paddingInlineStart:{style:he},paddingInlineEnd:{style:he},paddingBlock:{style:he},paddingBlockStart:{style:he},paddingBlockEnd:{style:he},m:{style:pe},mt:{style:pe},mr:{style:pe},mb:{style:pe},ml:{style:pe},mx:{style:pe},my:{style:pe},margin:{style:pe},marginTop:{style:pe},marginRight:{style:pe},marginBottom:{style:pe},marginLeft:{style:pe},marginX:{style:pe},marginY:{style:pe},marginInline:{style:pe},marginInlineStart:{style:pe},marginInlineEnd:{style:pe},marginBlock:{style:pe},marginBlockStart:{style:pe},marginBlockEnd:{style:pe},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:ir},rowGap:{style:lr},columnGap:{style:sr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:$e},maxWidth:{style:Fr},minWidth:{transform:$e},height:{transform:$e},maxHeight:{transform:$e},minHeight:{transform:$e},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 Hi(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Yi(e,t){return typeof e=="function"?e(t):e}function Gi(){function e(r,n,a,o){const s={[r]:n,theme:a},l=o[r];if(!l)return{[r]:n};const{cssProperty:p=r,themeKey:f,transform:m,style:b}=l;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};const g=er(a,f)||{};return b?b(s):Ue(s,n,y=>{let d=tr(g,m,y);return y===d&&typeof y=="string"&&(d=tr(g,m,`${r}${y==="default"?"":rt(y)}`,y)),p===!1?d:{[p]:d}})}function t(r){const{sx:n,theme:a={},nested:o}=r||{};if(!n)return null;const s=a.unstable_sxConfig??cr;function l(p){let f=p;if(typeof p=="function")f=p(a);else if(typeof p!="object")return p;if(!f)return null;const m=li(a.breakpoints),b=Object.keys(m);let g=m;return Object.keys(f).forEach(C=>{const y=Yi(f[C],a);if(y!=null)if(typeof y=="object")if(s[C])g=St(g,e(C,y,a,s));else{const d=Ue({theme:a},y,k=>({[C]:k}));Hi(d,y)?g[C]=t({sx:y,theme:a,nested:!0}):g=St(g,d)}else g=St(g,e(C,y,a,s))}),!o&&a.modularCssLayers?{"@layer sx":Wn(a,Hn(b,g))}:Wn(a,Hn(b,g))}return Array.isArray(n)?n.map(l):l(n)}return t}const ht=Gi();ht.filterProps=["sx"];function Nr(){return Nr=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},Nr.apply(null,arguments)}function Ki(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 Ji(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 Qi=function(){function e(r){var n=this;this._insertTag=function(a){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(a,o),n.tags.push(a)},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(Ji(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Ki(a);try{o.insertRule(n,o.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var a;return(a=n.parentNode)==null?void 0:a.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Ae="-ms-",ur="-moz-",Z="-webkit-",Kn="comm",Br="rule",Lr="decl",Xi="@import",Jn="@keyframes",Zi="@layer",es=Math.abs,dr=String.fromCharCode,ts=Object.assign;function rs(e,t){return je(e,0)^45?(((t<<2^je(e,0))<<2^je(e,1))<<2^je(e,2))<<2^je(e,3):0}function Qn(e){return e.trim()}function ns(e,t){return(e=t.exec(e))?e[0]:e}function ee(e,t,r){return e.replace(t,r)}function Vr(e,t){return e.indexOf(t)}function je(e,t){return e.charCodeAt(t)|0}function Ot(e,t,r){return e.slice(t,r)}function Be(e){return e.length}function zr(e){return e.length}function fr(e,t){return t.push(e),e}function as(e,t){return e.map(t).join("")}var pr=1,mt=1,Xn=0,Oe=0,ve=0,bt="";function hr(e,t,r,n,a,o,s){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:pr,column:mt,length:s,return:""}}function Rt(e,t){return ts(hr("",null,null,"",null,null,0),e,{length:-e.length},t)}function os(){return ve}function is(){return ve=Oe>0?je(bt,--Oe):0,mt--,ve===10&&(mt=1,pr--),ve}function Me(){return ve=Oe<Xn?je(bt,Oe++):0,mt++,ve===10&&(mt=1,pr++),ve}function Le(){return je(bt,Oe)}function mr(){return Oe}function $t(e,t){return Ot(bt,e,t)}function Mt(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 Zn(e){return pr=mt=1,Xn=Be(bt=e),Oe=0,[]}function ea(e){return bt="",e}function br(e){return Qn($t(Oe-1,qr(e===91?e+2:e===40?e+1:e)))}function ss(e){for(;(ve=Le())&&ve<33;)Me();return Mt(e)>2||Mt(ve)>3?"":" "}function ls(e,t){for(;--t&&Me()&&!(ve<48||ve>102||ve>57&&ve<65||ve>70&&ve<97););return $t(e,mr()+(t<6&&Le()==32&&Me()==32))}function qr(e){for(;Me();)switch(ve){case e:return Oe;case 34:case 39:e!==34&&e!==39&&qr(ve);break;case 40:e===41&&qr(e);break;case 92:Me();break}return Oe}function cs(e,t){for(;Me()&&e+ve!==57;)if(e+ve===84&&Le()===47)break;return"/*"+$t(t,Oe-1)+"*"+dr(e===47?e:Me())}function us(e){for(;!Mt(Le());)Me();return $t(e,Oe)}function ds(e){return ea(gr("",null,null,null,[""],e=Zn(e),0,[0],e))}function gr(e,t,r,n,a,o,s,l,p){for(var f=0,m=0,b=s,g=0,C=0,y=0,d=1,k=1,w=1,P=0,j="",S=a,T=o,I=n,_=j;k;)switch(y=P,P=Me()){case 40:if(y!=108&&je(_,b-1)==58){Vr(_+=ee(br(P),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:_+=br(P);break;case 9:case 10:case 13:case 32:_+=ss(y);break;case 92:_+=ls(mr()-1,7);continue;case 47:switch(Le()){case 42:case 47:fr(fs(cs(Me(),mr()),t,r),p);break;default:_+="/"}break;case 123*d:l[f++]=Be(_)*w;case 125*d:case 59:case 0:switch(P){case 0:case 125:k=0;case 59+m:w==-1&&(_=ee(_,/\f/g,"")),C>0&&Be(_)-b&&fr(C>32?ra(_+";",n,r,b-1):ra(ee(_," ","")+";",n,r,b-2),p);break;case 59:_+=";";default:if(fr(I=ta(_,t,r,f,m,a,l,j,S=[],T=[],b),o),P===123)if(m===0)gr(_,t,I,I,S,o,b,l,T);else switch(g===99&&je(_,3)===110?100:g){case 100:case 108:case 109:case 115:gr(e,I,I,n&&fr(ta(e,I,I,0,0,a,l,j,a,S=[],b),T),a,T,b,l,n?S:T);break;default:gr(_,I,I,I,[""],T,0,l,T)}}f=m=C=0,d=w=1,j=_="",b=s;break;case 58:b=1+Be(_),C=y;default:if(d<1){if(P==123)--d;else if(P==125&&d++==0&&is()==125)continue}switch(_+=dr(P),P*d){case 38:w=m>0?1:(_+="\f",-1);break;case 44:l[f++]=(Be(_)-1)*w,w=1;break;case 64:Le()===45&&(_+=br(Me())),g=Le(),m=b=Be(j=_+=us(mr())),P++;break;case 45:y===45&&Be(_)==2&&(d=0)}}return o}function ta(e,t,r,n,a,o,s,l,p,f,m){for(var b=a-1,g=a===0?o:[""],C=zr(g),y=0,d=0,k=0;y<n;++y)for(var w=0,P=Ot(e,b+1,b=es(d=s[y])),j=e;w<C;++w)(j=Qn(d>0?g[w]+" "+P:ee(P,/&\f/g,g[w])))&&(p[k++]=j);return hr(e,t,r,a===0?Br:l,p,f,m)}function fs(e,t,r){return hr(e,t,r,Kn,dr(os()),Ot(e,2,-2),0)}function ra(e,t,r,n){return hr(e,t,r,Lr,Ot(e,0,n),Ot(e,n+1,-1),n)}function gt(e,t){for(var r="",n=zr(e),a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}function ps(e,t,r,n){switch(e.type){case Zi:if(e.children.length)break;case Xi:case Lr:return e.return=e.return||e.value;case Kn:return"";case Jn:return e.return=e.value+"{"+gt(e.children,n)+"}";case Br:e.value=e.props.join(",")}return Be(r=gt(e.children,n))?e.return=e.value+"{"+r+"}":""}function hs(e){var t=zr(e);return function(r,n,a,o){for(var s="",l=0;l<t;l++)s+=e[l](r,n,a,o)||"";return s}}function ms(e){return function(t){t.root||(t=t.return)&&e(t)}}function na(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var bs=function(t,r,n){for(var a=0,o=0;a=o,o=Le(),a===38&&o===12&&(r[n]=1),!Mt(o);)Me();return $t(t,Oe)},gs=function(t,r){var n=-1,a=44;do switch(Mt(a)){case 0:a===38&&Le()===12&&(r[n]=1),t[n]+=bs(Oe-1,r,n);break;case 2:t[n]+=br(a);break;case 4:if(a===44){t[++n]=Le()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=dr(a)}while(a=Me());return t},ys=function(t,r){return ea(gs(Zn(t),r))},aa=new WeakMap,xs=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,a=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&&!aa.get(n))&&!a){aa.set(t,!0);for(var o=[],s=ys(r,o),l=n.props,p=0,f=0;p<s.length;p++)for(var m=0;m<l.length;m++,f++)t.props[f]=o[p]?s[p].replace(/&\f/g,l[m]):l[m]+" "+s[p]}}},vs=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function oa(e,t){switch(rs(e,t)){case 5103:return Z+"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 Z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Z+e+ur+e+Ae+e+e;case 6828:case 4268:return Z+e+Ae+e+e;case 6165:return Z+e+Ae+"flex-"+e+e;case 5187:return Z+e+ee(e,/(\w+).+(:[^]+)/,Z+"box-$1$2"+Ae+"flex-$1$2")+e;case 5443:return Z+e+Ae+"flex-item-"+ee(e,/flex-|-self/,"")+e;case 4675:return Z+e+Ae+"flex-line-pack"+ee(e,/align-content|flex-|-self/,"")+e;case 5548:return Z+e+Ae+ee(e,"shrink","negative")+e;case 5292:return Z+e+Ae+ee(e,"basis","preferred-size")+e;case 6060:return Z+"box-"+ee(e,"-grow","")+Z+e+Ae+ee(e,"grow","positive")+e;case 4554:return Z+ee(e,/([^-])(transform)/g,"$1"+Z+"$2")+e;case 6187:return ee(ee(ee(e,/(zoom-|grab)/,Z+"$1"),/(image-set)/,Z+"$1"),e,"")+e;case 5495:case 3959:return ee(e,/(image-set\([^]*)/,Z+"$1$`$1");case 4968:return ee(ee(e,/(.+:)(flex-)?(.*)/,Z+"box-pack:$3"+Ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Z+e+e;case 4095:case 3583:case 4068:case 2532:return ee(e,/(.+)-inline(.+)/,Z+"$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(Be(e)-1-t>6)switch(je(e,t+1)){case 109:if(je(e,t+4)!==45)break;case 102:return ee(e,/(.+:)(.+)-([^]+)/,"$1"+Z+"$2-$3$1"+ur+(je(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Vr(e,"stretch")?oa(ee(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(je(e,t+1)!==115)break;case 6444:switch(je(e,Be(e)-3-(~Vr(e,"!important")&&10))){case 107:return ee(e,":",":"+Z)+e;case 101:return ee(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Z+(je(e,14)===45?"inline-":"")+"box$3$1"+Z+"$2$3$1"+Ae+"$2box$3")+e}break;case 5936:switch(je(e,t+11)){case 114:return Z+e+Ae+ee(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Z+e+Ae+ee(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Z+e+Ae+ee(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Z+e+Ae+e+e}return e}var Cs=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case Lr:t.return=oa(t.value,t.length);break;case Jn:return gt([Rt(t,{value:ee(t.value,"@","@"+Z)})],a);case Br:if(t.length)return as(t.props,function(o){switch(ns(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return gt([Rt(t,{props:[ee(o,/:(read-\w+)/,":"+ur+"$1")]})],a);case"::placeholder":return gt([Rt(t,{props:[ee(o,/:(plac\w+)/,":"+Z+"input-$1")]}),Rt(t,{props:[ee(o,/:(plac\w+)/,":"+ur+"$1")]}),Rt(t,{props:[ee(o,/:(plac\w+)/,Ae+"input-$1")]})],a)}return""})}},Ts=[Cs],ws=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(d){var k=d.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(d),d.setAttribute("data-s",""))})}var a=t.stylisPlugins||Ts,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(d){for(var k=d.getAttribute("data-emotion").split(" "),w=1;w<k.length;w++)o[k[w]]=!0;l.push(d)});var p,f=[xs,vs];{var m,b=[ps,ms(function(d){m.insert(d)})],g=hs(f.concat(a,b)),C=function(k){return gt(ds(k),g)};p=function(k,w,P,j){m=P,C(k?k+"{"+w.styles+"}":w.styles),j&&(y.inserted[w.name]=!0)}}var y={key:r,sheet:new Qi({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:p};return y.sheet.hydrate(l),y},ks=!0;function Es(e,t,r){var n="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(n+=a+" ")}),n}var ia=function(t,r,n){var a=t.key+"-"+r.name;(n===!1||ks===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles)},js=function(t,r,n){ia(t,r,n);var a=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Ss(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=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(a){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 As={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},Ps=/[A-Z]|^ms/g,Os=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sa=function(t){return t.charCodeAt(1)===45},la=function(t){return t!=null&&typeof t!="boolean"},Wr=na(function(e){return sa(e)?e:e.replace(Ps,"-$&").toLowerCase()}),ca=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Os,function(n,a,o){return Ve={name:a,styles:o,next:Ve},a})}return As[t]!==1&&!sa(t)&&typeof r=="number"&&r!==0?r+"px":r};function _t(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 a=r;if(a.anim===1)return Ve={name:a.name,styles:a.styles,next:Ve},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Ve={name:s.name,styles:s.styles,next:Ve},s=s.next;var l=o.styles+";";return l}return Rs(e,t,r)}case"function":{if(e!==void 0){var p=Ve,f=r(e);return Ve=p,_t(e,t,f)}break}}var m=r;if(t==null)return m;var b=t[m];return b!==void 0?b:m}function Rs(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=_t(e,t,r[a])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var l=s;t!=null&&t[l]!==void 0?n+=o+"{"+t[l]+"}":la(l)&&(n+=Wr(o)+":"+ca(o,l)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var p=0;p<s.length;p++)la(s[p])&&(n+=Wr(o)+":"+ca(o,s[p])+";");else{var f=_t(e,t,s);switch(o){case"animation":case"animationName":{n+=Wr(o)+":"+f+";";break}default:n+=o+"{"+f+"}"}}}return n}var ua=/label:\s*([^\s;{]+)\s*(;|$)/g,Ve;function da(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,a="";Ve=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=_t(r,t,o);else{var s=o;a+=s[0]}for(var l=1;l<e.length;l++)if(a+=_t(r,t,e[l]),n){var p=o;a+=p[l]}ua.lastIndex=0;for(var f="",m;(m=ua.exec(a))!==null;)f+="-"+m[1];var b=Ss(a)+f;return{name:b,styles:a,next:Ve}}var $s=function(t){return t()},Ms=Ee.useInsertionEffect?Ee.useInsertionEffect:!1,_s=Ms||$s,fa=Ee.createContext(typeof HTMLElement<"u"?ws({key:"css"}):null);fa.Provider;var Is=function(t){return A.forwardRef(function(r,n){var a=A.useContext(fa);return t(r,a,n)})},Ds=Ee.createContext({}),Fs=/^((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)-.*))$/,Ns=na(function(e){return Fs.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Bs=Ns,Ls=function(t){return t!=="theme"},pa=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Bs:Ls},ha=function(t,r,n){var a;if(r){var o=r.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},Vs=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return ia(r,n,a),_s(function(){return js(r,n,a)}),null},zs=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,o,s;r!==void 0&&(o=r.label,s=r.target);var l=ha(t,r,n),p=l||pa(a),f=!p("as");return function(){var m=arguments,b=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&b.push("label:"+o+";"),m[0]==null||m[0].raw===void 0)b.push.apply(b,m);else{var g=m[0];b.push(g[0]);for(var C=m.length,y=1;y<C;y++)b.push(m[y],g[y])}var d=Is(function(k,w,P){var j=f&&k.as||a,S="",T=[],I=k;if(k.theme==null){I={};for(var _ in k)I[_]=k[_];I.theme=Ee.useContext(Ds)}typeof k.className=="string"?S=Es(w.registered,T,k.className):k.className!=null&&(S=k.className+" ");var H=da(b.concat(T),w.registered,I);S+=w.key+"-"+H.name,s!==void 0&&(S+=" "+s);var G=f&&l===void 0?pa(j):p,u={};for(var $ in k)f&&$==="as"||G($)&&(u[$]=k[$]);return u.className=S,P&&(u.ref=P),Ee.createElement(Ee.Fragment,null,Ee.createElement(Vs,{cache:w,serialized:H,isStringTag:typeof j=="string"}),Ee.createElement(j,u))});return d.displayName=o!==void 0?o:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=a,d.__emotion_styles=b,d.__emotion_forwardProp=l,Object.defineProperty(d,"toString",{value:function(){return"."+s}}),d.withComponent=function(k,w){var P=e(k,Nr({},r,w,{shouldForwardProp:ha(d,w,!0)}));return P.apply(void 0,b)},d}},qs=["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"],Ur=zs.bind(null);qs.forEach(function(e){Ur[e]=Ur(e)});/**
|
|
64
|
+
* @mui/styled-engine v7.2.0
|
|
75
65
|
*
|
|
76
66
|
* @license MIT
|
|
77
67
|
* This source code is licensed under the MIT license found in the
|
|
78
68
|
* LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/function
|
|
80
|
-
`)):n.some(
|
|
81
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
82
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
83
|
-
`))}return
|
|
84
|
-
The color object needs to have a \`main\` property or a \`${w}\` property.`:
|
|
85
|
-
\`color.main\` should be a string, but \`${JSON.stringify(
|
|
69
|
+
*/function Ws(e,t){const r=Ur(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const a=typeof e=="string"?`"${e}"`:"component";return n.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(`
|
|
70
|
+
`)):n.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...n)}:r}function Us(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ma=[];function nt(e){return ma[0]=e,da(ma)}const Hs=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 Ys(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=Hs(t),s=Object.keys(o);function l(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r})`}function p(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-n/100}${r})`}function f(g,C){const y=s.indexOf(C);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r}) and (max-width:${(y!==-1&&typeof t[s[y]]=="number"?t[s[y]]:C)-n/100}${r})`}function m(g){return s.indexOf(g)+1<s.length?f(g,s[s.indexOf(g)+1]):l(g)}function b(g){const C=s.indexOf(g);return C===0?l(s[1]):C===s.length-1?p(s[C]):f(g,s[s.indexOf(g)+1]).replace("@media","@media not all and")}return{keys:s,values:o,up:l,down:p,between:f,only:m,not:b,unit:r,...a}}const Gs={borderRadius:4};function ba(e=8,t=Dr({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(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function Ks(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function ga(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,l=Ys(r),p=ba(a);let f=Re({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:p,shape:{...Gs,...o}},s);return f=ii(f),f.applyStyles=Ks,f=t.reduce((m,b)=>Re(m,b),f),f.unstable_sxConfig={...cr,...s?.unstable_sxConfig},f.unstable_sx=function(b){return ht({sx:b,theme:this})},f}const Js={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 Hr(e,t,r="Mui"){const n=Js[t];return n?`${r}-${n}`:`${Uo.generate(e)}-${t}`}function Qs(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=Hr(e,a,r)}),n}function ya(e,t=""){return e.displayName||e.name||t}function xa(e,t,r){const n=ya(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Xs(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return ya(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Xt.ForwardRef:return xa(e,e.render,"ForwardRef");case Xt.Memo:return xa(e,e.type,"memo");default:return}}}function va(e){const{variants:t,...r}=e,n={variants:t,style:nt(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=nt(a.style))}),n}const Zs=ga();function Yr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function at(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function el(e){return e?(t,r)=>r[e]:null}function tl(e,t,r){e.theme=ol(e.theme)?r:e.theme[t]||e.theme}function yr(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(a=>yr(e,a,r));if(Array.isArray(n?.variants)){let a;if(n.isProcessed)a=r?at(n.style,r):n.style;else{const{variants:o,...s}=n;a=r?at(nt(s),r):s}return Ca(e,n.variants,[a],r)}return n?.isProcessed?r?at(nt(n.style),r):n.style:r?at(nt(n),r):n}function Ca(e,t,r=[],n=void 0){let a;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(a))continue}else for(const l in s.props)if(e[l]!==s.props[l]&&e.ownerState?.[l]!==s.props[l])continue e;typeof s.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},r.push(n?at(nt(s.style(a)),n):s.style(a))):r.push(n?at(nt(s.style),n):s.style)}return r}function rl(e={}){const{themeId:t,defaultTheme:r=Zs,rootShouldForwardProp:n=Yr,slotShouldForwardProp:a=Yr}=e;function o(l){tl(l,t,r)}return(l,p={})=>{Us(l,I=>I.filter(_=>_!==ht));const{name:f,slot:m,skipVariantsResolver:b,skipSx:g,overridesResolver:C=el(Ta(m)),...y}=p,d=f&&f.startsWith("Mui")||m?"components":"custom",k=b!==void 0?b:m&&m!=="Root"&&m!=="root"||!1,w=g||!1;let P=Yr;m==="Root"||m==="root"?P=n:m?P=a:il(l)&&(P=void 0);const j=Ws(l,{shouldForwardProp:P,label:al(f,m),...y}),S=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(H){return yr(H,I,H.theme.modularCssLayers?d:void 0)};if(We(I)){const _=va(I);return function(G){return _.variants?yr(G,_,G.theme.modularCssLayers?d:void 0):G.theme.modularCssLayers?at(_.style,d):_.style}}return I},T=(...I)=>{const _=[],H=I.map(S),G=[];if(_.push(o),f&&C&&G.push(function(J){const O=J.theme.components?.[f]?.styleOverrides;if(!O)return null;const W={};for(const Q in O)W[Q]=yr(J,O[Q],J.theme.modularCssLayers?"theme":void 0);return C(J,W)}),f&&!k&&G.push(function(J){const O=J.theme?.components?.[f]?.variants;return O?Ca(J,O,[],J.theme.modularCssLayers?"theme":void 0):null}),w||G.push(ht),Array.isArray(H[0])){const L=H.shift(),J=new Array(_.length).fill(""),ue=new Array(G.length).fill("");let O;O=[...J,...L,...ue],O.raw=[...J,...L.raw,...ue],_.unshift(O)}const u=[..._,...H,...G],$=j(...u);return l.muiName&&($.muiName=l.muiName),process.env.NODE_ENV!=="production"&&($.displayName=nl(f,m,l)),$};return j.withConfig&&(T.withConfig=j.withConfig),T}}function nl(e,t,r){return e?`${e}${rt(t||"")}`:`Styled(${Xs(r)})`}function al(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Ta(t||"Root")}`),r}function ol(e){for(const t in e)return!1;return!0}function il(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ta(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Gr(e,t,r=!1){const n={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const o=a;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],l=t[o];if(!l)n[o]=s||{};else if(!s)n[o]=l;else{n[o]={...l};for(const p in s)if(Object.prototype.hasOwnProperty.call(s,p)){const f=p;n[o][f]=Gr(s[f],l[f],r)}}}else o==="className"&&r&&t.className?n.className=Bn(e?.className,t?.className):o==="style"&&r&&t.style?n.style={...e?.style,...t?.style}:n[o]===void 0&&(n[o]=e[o])}return n}function sl(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Kr(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}].`),sl(e,t,r)}function ll(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,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Qe(e){if(e.type)return e;if(e.charAt(0)==="#")return Qe(ll(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.
|
|
71
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ke(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=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(a))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${a}\` color space.
|
|
72
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ke(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const cl=e=>{const t=Qe(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},It=(e,t)=>{try{return cl(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function xr(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function wa(e){e=Qe(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(f,m=(f+r/30)%12)=>a-o*Math.max(Math.min(m-3,9-m,1),-1);let l="rgb";const p=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",p.push(t[3])),xr({type:l,values:p})}function Jr(e){e=Qe(e);let t=e.type==="hsl"||e.type==="hsla"?Qe(wa(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 ka(e,t){const r=Jr(e),n=Jr(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function ul(e,t){return e=Qe(e),t=Kr(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,xr(e)}function vr(e,t,r){try{return ul(e,t)}catch{return e}}function Qr(e,t){if(e=Qe(e),t=Kr(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 xr(e)}function se(e,t,r){try{return Qr(e,t)}catch{return e}}function Xr(e,t){if(e=Qe(e),t=Kr(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 xr(e)}function le(e,t,r){try{return Xr(e,t)}catch{return e}}function dl(e,t=.15){return Jr(e)>.5?Qr(e,t):Xr(e,t)}function Cr(e,t,r){try{return dl(e,t)}catch{return e}}const fl=Ee.createContext(void 0);process.env.NODE_ENV!=="production"&&(X.node,X.object);function pl(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?Gr(a.defaultProps,n,t.components.mergeClassNameAndStyle):!a.styleOverrides&&!a.variants?Gr(a,n,t.components.mergeClassNameAndStyle):n}function hl({props:e,name:t}){const r=Ee.useContext(fl);return pl({props:e,name:t,theme:{components:r}})}const Ea={theme:void 0};function ml(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(Ea.theme=a.theme,o=va(e(Ea)),t=o,r=a.theme),o}}function bl(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.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}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const ja=(e,t,r,n=[])=>{let a=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},gl=(e,t,r)=>{function n(a,o=[],s=[]){Object.entries(a).forEach(([l,p])=>{(!r||r&&!r([...o,l]))&&p!=null&&(typeof p=="object"&&Object.keys(p).length>0?n(p,[...o,l],Array.isArray(p)?[...s,l]:s):t([...o,l],p,s))})}n(e)},yl=(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 Zr(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return gl(e,(l,p,f)=>{if((typeof p=="string"||typeof p=="number")&&(!n||!n(l,p))){const m=`--${r?`${r}-`:""}${l.join("-")}`,b=yl(l,p);Object.assign(a,{[m]:b}),ja(o,l,`var(${m})`,f),ja(s,l,`var(${m}, ${b})`,f)}},l=>l[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function xl(e,t={}){const{getSelector:r=k,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:l="light",...p}=e,{vars:f,css:m,varsWithDefaults:b}=Zr(p,t);let g=b;const C={},{[l]:y,...d}=o;if(Object.entries(d||{}).forEach(([j,S])=>{const{vars:T,css:I,varsWithDefaults:_}=Zr(S,t);g=Re(g,_),C[j]={css:I,vars:T}}),y){const{css:j,vars:S,varsWithDefaults:T}=Zr(y,t);g=Re(g,T),C[l]={css:j,vars:S}}function k(j,S){let T=a;if(a==="class"&&(T=".%s"),a==="data"&&(T="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(T=`[${a}="%s"]`),j){if(T==="media")return e.defaultColorScheme===j?":root":{[`@media (prefers-color-scheme: ${o[j]?.palette?.mode||j})`]:{":root":S}};if(T)return e.defaultColorScheme===j?`:root, ${T.replace("%s",String(j))}`:T.replace("%s",String(j))}return":root"}return{vars:g,generateThemeVars:()=>{let j={...f};return Object.entries(C).forEach(([,{vars:S}])=>{j=Re(j,S)}),j},generateStyleSheets:()=>{const j=[],S=e.defaultColorScheme||"light";function T(H,G){Object.keys(G).length&&j.push(typeof H=="string"?{[H]:{...G}}:H)}T(r(void 0,{...m}),m);const{[S]:I,..._}=C;if(I){const{css:H}=I,G=o[S]?.palette?.mode,u=!n&&G?{colorScheme:G,...H}:{...H};T(r(S,{...u}),u)}return Object.entries(_).forEach(([H,{css:G}])=>{const u=o[H]?.palette?.mode,$=!n&&u?{colorScheme:u,...G}:{...G};T(r(H,{...$}),$)}),j}}}function vl(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 Dt={black:"#000",white:"#fff"},Cl={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"},yt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},xt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ft={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},vt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ct={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Tt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Sa(){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:Dt.white,default:Dt.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 Tl=Sa();function Aa(){return{text:{primary:Dt.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:Dt.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 Pa=Aa();function Oa(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Xr(e.main,a):t==="dark"&&(e.dark=Qr(e.main,o)))}function wl(e="light"){return e==="dark"?{main:vt[200],light:vt[50],dark:vt[400]}:{main:vt[700],light:vt[400],dark:vt[800]}}function kl(e="light"){return e==="dark"?{main:yt[200],light:yt[50],dark:yt[400]}:{main:yt[500],light:yt[300],dark:yt[700]}}function El(e="light"){return e==="dark"?{main:xt[500],light:xt[300],dark:xt[700]}:{main:xt[700],light:xt[400],dark:xt[800]}}function jl(e="light"){return e==="dark"?{main:Ct[400],light:Ct[300],dark:Ct[700]}:{main:Ct[700],light:Ct[500],dark:Ct[900]}}function Sl(e="light"){return e==="dark"?{main:Tt[400],light:Tt[300],dark:Tt[700]}:{main:Tt[800],light:Tt[500],dark:Tt[900]}}function Al(e="light"){return e==="dark"?{main:Ft[400],light:Ft[300],dark:Ft[700]}:{main:"#ed6c02",light:Ft[500],dark:Ft[900]}}function en(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||wl(t),s=e.secondary||kl(t),l=e.error||El(t),p=e.info||jl(t),f=e.success||Sl(t),m=e.warning||Al(t);function b(d){const k=ka(d,Pa.text.primary)>=r?Pa.text.primary:Tl.text.primary;if(process.env.NODE_ENV!=="production"){const w=ka(d,k);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${k} on ${d}`,"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(`
|
|
73
|
+
`))}return k}const g=({color:d,name:k,mainShade:w=500,lightShade:P=300,darkShade:j=700})=>{if(d={...d},!d.main&&d[w]&&(d.main=d[w]),!d.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${k?` (${k})`:""} provided to augmentColor(color) is invalid.
|
|
74
|
+
The color object needs to have a \`main\` property or a \`${w}\` property.`:Ke(11,k?` (${k})`:"",w));if(typeof d.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${k?` (${k})`:""} provided to augmentColor(color) is invalid.
|
|
75
|
+
\`color.main\` should be a string, but \`${JSON.stringify(d.main)}\` was provided instead.
|
|
86
76
|
|
|
87
77
|
Did you intend to use one of the following approaches?
|
|
88
78
|
|
|
@@ -94,15 +84,14 @@ const theme1 = createTheme({ palette: {
|
|
|
94
84
|
|
|
95
85
|
const theme2 = createTheme({ palette: {
|
|
96
86
|
primary: { main: green[500] },
|
|
97
|
-
} });`:
|
|
98
|
-
`)),Object.keys(
|
|
87
|
+
} });`:Ke(12,k?` (${k})`:"",JSON.stringify(d.main)));return Oa(d,"light",P,n),Oa(d,"dark",j,n),d.contrastText||(d.contrastText=b(d.main)),d};let C;return t==="light"?C=Sa():t==="dark"&&(C=Aa()),process.env.NODE_ENV!=="production"&&(C||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Re({common:{...Dt},mode:t,primary:g({color:o,name:"primary"}),secondary:g({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:l,name:"error"}),warning:g({color:m,name:"warning"}),info:g({color:p,name:"info"}),success:g({color:f,name:"success"}),grey:Cl,contrastThreshold:r,getContrastText:b,augmentColor:g,tonalOffset:n,...C},a)}function Pl(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function Ol(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Rl(e){return Math.round(e*1e5)/1e5}const Ra={textTransform:"uppercase"},$a='"Roboto", "Helvetica", "Arial", sans-serif';function $l(e,t){const{fontFamily:r=$a,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:p=16,allVariants:f,pxToRem:m,...b}=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 p!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const g=n/14,C=m||(k=>`${k/p*g}rem`),y=(k,w,P,j,S)=>({fontFamily:r,fontWeight:k,fontSize:C(w),lineHeight:P,...r===$a?{letterSpacing:`${Rl(j/w)}em`}:{},...S,...f}),d={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(s,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(s,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(s,14,1.75,.4,Ra),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,Ra),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Re({htmlFontSize:p,pxToRem:C,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:l,...d},b,{clone:!1})}const Ml=.2,_l=.14,Il=.12;function de(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ml})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${_l})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Il})`].join(",")}const Dl=["none",de(0,2,1,-1,0,1,1,0,0,1,3,0),de(0,3,1,-2,0,2,2,0,0,1,5,0),de(0,3,3,-2,0,3,4,0,0,1,8,0),de(0,2,4,-1,0,4,5,0,0,1,10,0),de(0,3,5,-1,0,5,8,0,0,1,14,0),de(0,3,5,-1,0,6,10,0,0,1,18,0),de(0,4,5,-2,0,7,10,1,0,2,16,1),de(0,5,5,-3,0,8,10,1,0,3,14,2),de(0,5,6,-3,0,9,12,1,0,3,16,2),de(0,6,6,-3,0,10,14,1,0,4,18,3),de(0,6,7,-4,0,11,15,1,0,4,20,3),de(0,7,8,-4,0,12,17,2,0,5,22,4),de(0,7,8,-4,0,13,19,2,0,5,24,4),de(0,7,9,-4,0,14,21,2,0,5,26,4),de(0,8,9,-5,0,15,22,2,0,6,28,5),de(0,8,10,-5,0,16,24,2,0,6,30,5),de(0,8,11,-5,0,17,26,2,0,6,32,5),de(0,9,11,-5,0,18,28,2,0,7,34,6),de(0,9,12,-6,0,19,29,2,0,7,36,6),de(0,10,13,-6,0,20,31,3,0,8,38,7),de(0,10,13,-6,0,21,33,3,0,8,40,7),de(0,10,14,-6,0,22,35,3,0,8,42,7),de(0,11,14,-7,0,23,36,3,0,9,44,8),de(0,11,15,-7,0,24,38,3,0,9,46,8)],Fl={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)"},Nl={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ma(e){return`${Math.round(e)}ms`}function Bl(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Ll(e){const t={...Fl,...e.easing},r={...Nl,...e.duration};return{getAutoHeightDuration:Bl,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:l=t.easeInOut,delay:p=0,...f}=o;if(process.env.NODE_ENV!=="production"){const m=g=>typeof g=="string",b=g=>!Number.isNaN(parseFloat(g));!m(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!b(s)&&!m(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),m(l)||console.error('MUI: Argument "easing" must be a string.'),!b(p)&&!m(p)&&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(`
|
|
88
|
+
`)),Object.keys(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(m=>`${m} ${typeof s=="string"?s:Ma(s)} ${l} ${typeof p=="string"?p:Ma(p)}`).join(",")},...e,easing:t,duration:r}}const Vl={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function zl(e){return We(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function _a(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let o=0;o<a.length;o++){const[s,l]=a[o];!zl(l)||s.startsWith("unstable_")?delete n[s]:We(l)&&(n[s]={...l},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
99
89
|
|
|
100
90
|
const theme = ${JSON.stringify(t,null,2)};
|
|
101
91
|
|
|
102
92
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
103
93
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
104
94
|
|
|
105
|
-
export default theme;`}function
|
|
106
|
-
`))}
|
|
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"})});
|
|
95
|
+
export default theme;`}function tn(e={},...t){const{breakpoints:r,mixins:n={},spacing:a,palette:o={},transitions:s={},typography:l={},shape:p,...f}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ke(20));const m=en(o),b=ga(e);let g=Re(b,{mixins:Ol(b.breakpoints,n),palette:m,shadows:Dl.slice(),typography:$l(m,l),transitions:Ll(s),zIndex:{...Vl}});if(g=Re(g,f),g=t.reduce((C,y)=>Re(C,y),g),process.env.NODE_ENV!=="production"){const C=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],y=(d,k)=>{let w;for(w in d){const P=d[w];if(C.includes(w)&&Object.keys(P).length>0){if(process.env.NODE_ENV!=="production"){const j=Hr("",w);console.error([`MUI: The \`${k}\` component increases the CSS specificity of the \`${w}\` internal state.`,"You can not override it like this: ",JSON.stringify(d,null,2),"",`Instead, you need to use the '&.${j}' syntax:`,JSON.stringify({root:{[`&.${j}`]:P}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
96
|
+
`))}d[w]={}}}};Object.keys(g.components).forEach(d=>{const k=g.components[d].styleOverrides;k&&d.startsWith("Mui")&&y(k,d)})}return g.unstable_sxConfig={...cr,...f?.unstable_sxConfig},g.unstable_sx=function(y){return ht({sx:y,theme:this})},g.toRuntimeSource=_a,g}function ql(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 Wl=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=ql(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Ia(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Da(e){return e==="dark"?Wl:[]}function Ul(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,o=en(t);return{palette:o,opacity:{...Ia(o.mode),...r},overlays:n||Da(o.mode),...a}}function Hl(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Yl=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Gl=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return Yl(e.cssVarPrefix).forEach(l=>{s[l]=r[l],delete r[l]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:o?{[o.replace("%s",t)]:s,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function Kl(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function x(e,t,r){!e[t]&&r&&(e[t]=r)}function Nt(e){return typeof e!="string"||!e.startsWith("hsl")?e:wa(e)}function He(e,t){`${t}Channel`in e||(e[`${t}Channel`]=It(Nt(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().
|
|
97
|
+
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 Jl(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ze=e=>{try{return e()}catch{}},Ql=(e="mui")=>bl(e);function rn(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=Ul({...t,palette:{mode:a,...t?.palette}});return}const{palette:o,...s}=tn({...r,palette:{mode:a,...t?.palette}});return e[n]={...t,palette:o,opacity:{...Ia(a),...t?.opacity},overlays:t?.overlays||Da(a)},s}function Xl(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=Hl,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:p=":root",...f}=e,m=Object.keys(r)[0],b=n||(r.light&&m!=="light"?"light":m),g=Ql(o),{[b]:C,light:y,dark:d,...k}=r,w={...k};let P=C;if((b==="dark"&&!("dark"in r)||b==="light"&&!("light"in r))&&(P=!0),!P)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:Ke(21,b));const j=rn(w,P,f,b);y&&!w.light&&rn(w,y,void 0,"light"),d&&!w.dark&&rn(w,d,void 0,"dark");let S={defaultColorScheme:b,...j,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:p,getCssVar:g,colorSchemes:w,font:{...Pl(j.typography),...j.font},spacing:Jl(f.spacing)};Object.keys(S.colorSchemes).forEach(G=>{const u=S.colorSchemes[G].palette,$=L=>{const J=L.split("-"),ue=J[1],O=J[2];return g(L,u[ue][O])};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")),Kl(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){x(u.Alert,"errorColor",se(u.error.light,.6)),x(u.Alert,"infoColor",se(u.info.light,.6)),x(u.Alert,"successColor",se(u.success.light,.6)),x(u.Alert,"warningColor",se(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",ze(()=>u.getContrastText(u.error.main))),x(u.Alert,"infoFilledColor",ze(()=>u.getContrastText(u.info.main))),x(u.Alert,"successFilledColor",ze(()=>u.getContrastText(u.success.main))),x(u.Alert,"warningFilledColor",ze(()=>u.getContrastText(u.warning.main))),x(u.Alert,"errorStandardBg",le(u.error.light,.9)),x(u.Alert,"infoStandardBg",le(u.info.light,.9)),x(u.Alert,"successStandardBg",le(u.success.light,.9)),x(u.Alert,"warningStandardBg",le(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",le(u.primary.main,.62)),x(u.LinearProgress,"secondaryBg",le(u.secondary.main,.62)),x(u.LinearProgress,"errorBg",le(u.error.main,.62)),x(u.LinearProgress,"infoBg",le(u.info.main,.62)),x(u.LinearProgress,"successBg",le(u.success.main,.62)),x(u.LinearProgress,"warningBg",le(u.warning.main,.62)),x(u.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),x(u.Slider,"primaryTrack",le(u.primary.main,.62)),x(u.Slider,"secondaryTrack",le(u.secondary.main,.62)),x(u.Slider,"errorTrack",le(u.error.main,.62)),x(u.Slider,"infoTrack",le(u.info.main,.62)),x(u.Slider,"successTrack",le(u.success.main,.62)),x(u.Slider,"warningTrack",le(u.warning.main,.62));const L=Cr(u.background.default,.8);x(u.SnackbarContent,"bg",L),x(u.SnackbarContent,"color",ze(()=>u.getContrastText(L))),x(u.SpeedDialAction,"fabHoverBg",Cr(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",le(u.primary.main,.62)),x(u.Switch,"secondaryDisabledColor",le(u.secondary.main,.62)),x(u.Switch,"errorDisabledColor",le(u.error.main,.62)),x(u.Switch,"infoDisabledColor",le(u.info.main,.62)),x(u.Switch,"successDisabledColor",le(u.success.main,.62)),x(u.Switch,"warningDisabledColor",le(u.warning.main,.62)),x(u.TableCell,"border",le(vr(u.divider,1),.88)),x(u.Tooltip,"bg",vr(u.grey[700],.92))}if(u.mode==="dark"){x(u.Alert,"errorColor",le(u.error.light,.6)),x(u.Alert,"infoColor",le(u.info.light,.6)),x(u.Alert,"successColor",le(u.success.light,.6)),x(u.Alert,"warningColor",le(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",ze(()=>u.getContrastText(u.error.dark))),x(u.Alert,"infoFilledColor",ze(()=>u.getContrastText(u.info.dark))),x(u.Alert,"successFilledColor",ze(()=>u.getContrastText(u.success.dark))),x(u.Alert,"warningFilledColor",ze(()=>u.getContrastText(u.warning.dark))),x(u.Alert,"errorStandardBg",se(u.error.light,.9)),x(u.Alert,"infoStandardBg",se(u.info.light,.9)),x(u.Alert,"successStandardBg",se(u.success.light,.9)),x(u.Alert,"warningStandardBg",se(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",se(u.primary.main,.5)),x(u.LinearProgress,"secondaryBg",se(u.secondary.main,.5)),x(u.LinearProgress,"errorBg",se(u.error.main,.5)),x(u.LinearProgress,"infoBg",se(u.info.main,.5)),x(u.LinearProgress,"successBg",se(u.success.main,.5)),x(u.LinearProgress,"warningBg",se(u.warning.main,.5)),x(u.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),x(u.Slider,"primaryTrack",se(u.primary.main,.5)),x(u.Slider,"secondaryTrack",se(u.secondary.main,.5)),x(u.Slider,"errorTrack",se(u.error.main,.5)),x(u.Slider,"infoTrack",se(u.info.main,.5)),x(u.Slider,"successTrack",se(u.success.main,.5)),x(u.Slider,"warningTrack",se(u.warning.main,.5));const L=Cr(u.background.default,.98);x(u.SnackbarContent,"bg",L),x(u.SnackbarContent,"color",ze(()=>u.getContrastText(L))),x(u.SpeedDialAction,"fabHoverBg",Cr(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",se(u.primary.main,.55)),x(u.Switch,"secondaryDisabledColor",se(u.secondary.main,.55)),x(u.Switch,"errorDisabledColor",se(u.error.main,.55)),x(u.Switch,"infoDisabledColor",se(u.info.main,.55)),x(u.Switch,"successDisabledColor",se(u.success.main,.55)),x(u.Switch,"warningDisabledColor",se(u.warning.main,.55)),x(u.TableCell,"border",se(vr(u.divider,1),.68)),x(u.Tooltip,"bg",vr(u.grey[700],.92))}He(u.background,"default"),He(u.background,"paper"),He(u.common,"background"),He(u.common,"onBackground"),He(u,"divider"),Object.keys(u).forEach(L=>{const J=u[L];L!=="tonalOffset"&&J&&typeof J=="object"&&(J.main&&x(u[L],"mainChannel",It(Nt(J.main))),J.light&&x(u[L],"lightChannel",It(Nt(J.light))),J.dark&&x(u[L],"darkChannel",It(Nt(J.dark))),J.contrastText&&x(u[L],"contrastTextChannel",It(Nt(J.contrastText))),L==="text"&&(He(u[L],"primary"),He(u[L],"secondary")),L==="action"&&(J.active&&He(u[L],"active"),J.selected&&He(u[L],"selected")))})}),S=t.reduce((G,u)=>Re(G,u),S);const T={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:Gl(S)},{vars:I,generateThemeVars:_,generateStyleSheets:H}=xl(S,T);return S.vars=I,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([G,u])=>{S[G]=u}),S.generateThemeVars=_,S.generateStyleSheets=H,S.generateSpacing=function(){return ba(f.spacing,Dr(this))},S.getColorSchemeSelector=vl(l),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...cr,...f?.unstable_sxConfig},S.unstable_sx=function(u){return ht({sx:u,theme:this})},S.toRuntimeSource=_a,S}function Fa(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:en({...r===!0?{}:r.palette,mode:t})})}function Zl(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r?.mode,...s}=e,l=o||"light",p=a?.[l],f={...a,...r?{[l]:{...typeof p!="boolean"&&p,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return tn(e,...t);let m=r;"palette"in e||f[l]&&(f[l]!==!0?m=f[l].palette:l==="dark"&&(m={mode:"dark"}));const b=tn({...e,palette:m},...t);return b.defaultColorScheme=l,b.colorSchemes=f,b.palette.mode==="light"&&(b.colorSchemes.light={...f.light!==!0&&f.light,palette:b.palette},Fa(b,"dark",f.dark)),b.palette.mode==="dark"&&(b.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:b.palette},Fa(b,"light",f.light)),b}return!r&&!("light"in f)&&l==="light"&&(f.light=!0),Xl({...s,colorSchemes:f,defaultColorScheme:l,...typeof n!="boolean"&&n},...t)}const ec=Zl(),tc="$$material";function rc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const nc=rl({themeId:tc,defaultTheme:ec,rootShouldForwardProp:e=>rc(e)&&e!=="classes"}),ac=ml;process.env.NODE_ENV!=="production"&&(X.node,X.object.isRequired);function oc(e){return hl(e)}function ic(e){return Hr("MuiSvgIcon",e)}Qs("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const sc=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${rt(t)}`,`fontSize${rt(r)}`]};return ei(a,ic,n)},lc=nc("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${rt(r.color)}`],t[`fontSize${rt(r.fontSize)}`]]}})(ac(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Tr=Ee.forwardRef(function(t,r){const n=oc({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:l="svg",fontSize:p="medium",htmlColor:f,inheritViewBox:m=!1,titleAccess:b,viewBox:g="0 0 24 24",...C}=n,y=Ee.isValidElement(a)&&a.type==="svg",d={...n,color:s,component:l,fontSize:p,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:g,hasSvgAsChild:y},k={};m||(k.viewBox=g);const w=sc(d);return i.jsxs(lc,{as:l,className:Bn(w.root,o),focusable:"false",color:f,"aria-hidden":b?void 0:!0,role:b?"img":void 0,ref:r,...k,...C,...y&&a.props,ownerState:d,children:[y?a.props.children:a,b?i.jsx("title",{children:b}):null]})});process.env.NODE_ENV!=="production"&&(Tr.propTypes={children:X.node,classes:X.object,className:X.string,color:X.oneOfType([X.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),X.string]),component:X.elementType,fontSize:X.oneOfType([X.oneOf(["inherit","large","medium","small"]),X.string]),htmlColor:X.string,inheritViewBox:X.bool,shapeRendering:X.string,sx:X.oneOfType([X.arrayOf(X.oneOfType([X.func,X.object,X.bool])),X.func,X.object]),titleAccess:X.string,viewBox:X.string}),Tr.muiName="SvgIcon";function fe(e,t){function r(n,a){return i.jsx(Tr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Tr.muiName,Ee.memo(Ee.forwardRef(r))}const cc=fe(i.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"),uc=fe(i.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-.7q.18-.6.48-1.17c.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.02q.765.42 1.59.66c.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"),dc=fe(i.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"),fc=fe(i.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"),pc=()=>{const{backendConfig:e}=xe(),{endpoints:t}=e||{},{workflow:r=""}=t||{};return ut.useMutation({mutationFn:async n=>{const{data:a}=await dt.patch(r,n);return a},mutationKey:["patchWorkflow"]})},hc=()=>{const{backendConfig:e}=xe(),{endpoints:t}=e||{},{workflow:r=""}=t||{};return ut.useMutation({mutationFn:async n=>{const{data:a}=await dt.post(r,n);return a},mutationKey:["postWorkflow"]})},mc=()=>{const{t:e}=ke.useTranslation(["snackMessage"]),{openSnackbar:t}=c.useSnackbar(),{setCurrentTree:r,currentTree:n,tree:a,dispatchTree:o}=xe(),[s,l]=A.useState(!1),{version:p}=xe(),{mutate:f}=hc(),{mutate:m}=pc(),b=P=>JSON.stringify(P,null,2),g=P=>`data:text/json;charset=utf-8,${encodeURIComponent(b(P))}`,C=P=>()=>{navigator.clipboard.writeText(b(P)).then(),t({message:e("success.copyToClipboard",{ns:"snackMessage"})})},y=()=>{l(!1)};return{copyToClipboard:C,formatJSON:b,getDownloadLink:g,handleClose:y,handleOpen:()=>{l(!0)},handleResetTree:()=>{o(Cn()),y()},handleSubmit:()=>{const{name:P,id:j}=n;if(!P){r(S=>({...S,errorName:"Champs Requis"}));return}if(a){if(j){m({id:j,label:P,version:p,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}});return}f({label:P,version:p,workflow:a},{onError:()=>{t({message:e("error.updateTree",{ns:"snackMessage"}),severity:"error"})},onSuccess:()=>{t({message:e("success.updateTree",{ns:"snackMessage"})})}})}},openModal:s}},bc=({downloadedFileName:e="export",value:t})=>{const{t:r}=ke.useTranslation(),{getDownloadLink:n,handleSubmit:a,handleClose:o,handleOpen:s,handleResetTree:l,copyToClipboard:p,openModal:f}=mc(),{currentTree:m,backendConfig:b,tree:g}=xe(),{id:C}=m;return i.jsxs(c.Stack,{direction:"row",spacing:1,justifyContent:"center",children:[i.jsx(c.Tooltip,{title:r("resetTree",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(c.Box,{children:i.jsx(c.IconButton,{disabled:!g,onClick:s,color:"warning",children:i.jsx(uc,{})})})}),i.jsx(c.Divider,{orientation:"vertical",flexItem:!0}),i.jsx(c.Tooltip,{title:r("copyToClipboard",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(c.Box,{children:i.jsx(c.IconButton,{disabled:!t,onClick:p(t),children:i.jsx(cc,{})})})}),i.jsx(c.Tooltip,{title:r("downloadJSONFile",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(c.Box,{children:i.jsx(c.IconButton,{href:n(t),download:`${e}.json`,disabled:!t,children:i.jsx(fc,{})})})}),i.jsx(c.Tooltip,{title:C?r("update",{ns:"button"}):r("save",{ns:"button"}),enterDelay:1500,disableHoverListener:!t,arrow:!0,children:i.jsx(c.Box,{children:i.jsx(c.IconButton,{onClick:a,disabled:!t||!b?.baseUrl,children:i.jsx(dc,{})})})}),i.jsxs(c.Dialog,{maxWidth:"xs",fullWidth:!0,open:f,onClose:o,children:[i.jsx(c.DialogTitle,{variant:"h3",children:r("resetTree",{ns:"button"})}),i.jsx(c.DialogContent,{children:i.jsx(c.DialogContentText,{children:r("resetTreeContent",{ns:"modal"})})}),i.jsxs(c.DialogActions,{children:[i.jsx(c.Button,{onClick:o,children:r("close",{ns:"button"})}),i.jsx(c.Button,{variant:"contained",color:"warning",onClick:l,children:r("reset",{ns:"button"})})]})]})]})},gc=({children:e,description:t,open:r,onClose:n,title:a})=>i.jsx(c.Dialog,{open:r,onClose:n,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",maxWidth:"sm",fullWidth:!0,scroll:"paper",children:i.jsxs(c.DialogContent,{sx:{backgroundColor:ie.background,border:`solid 1px ${ie.borderBlue}`,maxHeight:"80vh",overflowY:"auto"},children:[i.jsx(c.Typography,{variant:"h3",pb:2,children:a}),i.jsx(c.Typography,{pb:2,children:t}),e]})}),yc=fe(i.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 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.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),wr={container:{display:"flex",flexDirection:"column",height:"100%",margin:1},main:{border:`solid 1px ${ie.borderBlue}`,height:" 100%",margin:1},toolbar:{backgroundColor:ie.background,boxShadow:"none",display:"flex",padding:"0 ! important"},toolbarBox:{backgroundColor:ie.tertiary,border:`solid 1px ${ie.primary}`,margin:1,paddingX:2,paddingY:1,width:"100%"}},xc=({children:e,appear:t,in:r,onEnter:n,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:p},f)=>i.jsx(c.Slide,{direction:"up",ref:f,appear:t,in:r,onEnter:n,onExited:a,onFocus:o,role:s,tabIndex:l,timeout:p,children:e}),vc=A.forwardRef(xc),Cc=({children:e,open:t,onClose:r,title:n})=>i.jsx(c.Dialog,{PaperProps:{sx:{backgroundColor:ie.background,backgroundImage:"none"}},open:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",fullScreen:!0,TransitionComponent:vc,children:i.jsxs(c.Box,{sx:wr.container,children:[i.jsx(c.AppBar,{position:"sticky",elevation:0,children:i.jsx(c.Toolbar,{sx:wr.toolbar,children:i.jsxs(c.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:wr.toolbarBox,children:[i.jsx(c.Typography,{variant:"h5",children:i.jsx("strong",{children:n})}),i.jsx(c.IconButton,{edge:"end",color:"inherit",onClick:r,"aria-label":"close",children:i.jsx(yc,{})})]})})}),i.jsx(c.Box,{sx:wr.main,children:e})]})}),Tc={box:{border:`solid 1px ${ie.borderBlue}`,flexGrow:0}},wc=({children:e})=>i.jsx(c.Box,{p:2,role:"group",sx:Tc.box,children:e}),kc={box:{border:`solid 1px ${ie.borderBlue}`,flexGrow:0}},Ec=({children:e})=>i.jsx(c.Box,{sx:kc.box,padding:2,component:"header",children:e}),jc={box:{border:`solid 1px ${ie.borderBlue}`,flexGrow:1}},Sc=({children:e})=>i.jsx(c.Box,{sx:jc.box,component:"main",role:"tree",children:e}),Na={stack:{width:"100%"}},Ac=({children:e})=>{const t=A.Children.toArray(e);return i.jsxs(c.Grid,{container:!0,padding:1,flexWrap:"nowrap",height:"100%",role:"treegrid",children:[i.jsx(c.Grid,{size:{xs:9},padding:1,display:"flex",children:i.jsxs(c.Stack,{sx:Na.stack,spacing:2,children:[t[0],t[1]]})}),i.jsx(c.Grid,{size:{xs:3},padding:1,display:"flex",children:i.jsxs(c.Stack,{sx:Na.stack,spacing:2,children:[t[2],t[3]]})})]})},Pc={box:{border:`solid 1px ${ie.borderBlue}`,flexGrow:1,overflow:"auto"}},Oc=({children:e})=>i.jsx(c.Box,{sx:Pc.box,component:"aside",children:e}),Rc=()=>{const{dispatchTree:e,setModalOpen:t,currentHierarchyPointNode:r,treePath:n}=xe();return{handleSubmit:o=>{o.preventDefault();const s=r?.data?.uuid||"",l=n?.at(-1)?.path||"";e(Do(l,s)),t(null)}}},$c=({onClose:e})=>{const{t}=ke.useTranslation(),{handleSubmit:r}=Rc();return i.jsx("form",{onSubmit:r,children:i.jsxs(c.Stack,{spacing:2,direction:"row",justifyContent:"flex-end",children:[i.jsx(c.Button,{variant:"text",onClick:e,children:t("cancel")}),i.jsx(c.Button,{variant:"contained",color:"error",type:"submit",children:t("remove")})]})})},Ba=fe(i.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"),Mc=fe(i.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"),La=fe(i.jsx("path",{d:"M8 11h8v2H8zm12.1 1H22c0-2.76-2.24-5-5-5h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M19 12h-2v3h-3v2h3v3h2v-3h3v-2h-3z"}),"AddLinkOutlined"),_c=fe(i.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"),Va=fe(i.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ic=fe(i.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),za=fe(i.jsx("path",{d:"M10 15h5.88c.27-.31.67-.5 1.12-.5.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5c-.44 0-.84-.19-1.12-.5H11.9c-.46 2.28-2.48 4-4.9 4-2.76 0-5-2.24-5-5 0-2.42 1.72-4.44 4-4.9v2.07c-1.16.41-2 1.53-2 2.83 0 1.65 1.35 3 3 3s3-1.35 3-3zm2.5-11c1.65 0 3 1.35 3 3h2c0-2.76-2.24-5-5-5s-5 2.24-5 5c0 1.43.6 2.71 1.55 3.62l-2.35 3.9c-.68.14-1.2.75-1.2 1.48 0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5c0-.16-.02-.31-.07-.45l3.38-5.63C10.49 9.61 9.5 8.42 9.5 7c0-1.65 1.35-3 3-3m4.5 9c-.64 0-1.23.2-1.72.54l-3.05-5.07C11.53 8.35 11 7.74 11 7c0-.83.67-1.5 1.5-1.5S14 6.17 14 7c0 .15-.02.29-.06.43l2.19 3.65c.28-.05.57-.08.87-.08 2.76 0 5 2.24 5 5s-2.24 5-5 5c-1.85 0-3.47-1.01-4.33-2.5h2.67c.48.32 1.05.5 1.66.5 1.65 0 3-1.35 3-3s-1.35-3-3-3"}),"Webhook"),De=[{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"},{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:!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"},{isBooleanField:!1,isDecisionField:!1,isPatternEnabled:!1,isRepeatableDisabled:!0,isRequiredDisabled:!0,type:"title"}],Dc=({isAutocomplete:e,url:t,searchKey:r,sliceUrlParams:n,apiParams:a,ancestors:o,apiMapping:s,initialQuery:l,onChangeSearchKey:p,onChangeUrlSelect:f,onAddParams:m,onChangeParams:b,onDeleteParams:g,onChangeApiMapping:C,onChangeType:y,onChangeInitialQuery:d})=>{const k=A.useRef(null),{t:w}=ke.useTranslation(["translation","form"]),[P,j]=A.useState(!1),[S,T]=A.useState(""),[I,_]=A.useState(""),H=A.useCallback(O=>a?.findIndex(W=>W.key===O)??-1,[a]),G=a?.filter(O=>!n?.includes(O.key)),u=a?.filter(O=>n?.includes(O.key)),$=De.find(O=>O.type==="autocomplete")||De[0],L=De.find(O=>O.type==="dynamicSelect")||De[0],J=()=>{if(!S)return;const W={target:{value:t?.endsWith("/")?`${t}{${S}}`:`${t}/{${S}}`}};f?.(W);const Q=a?.length??0;m?.(),b?.(Q,"key",`{${S}}`),I&&b?.(Q,"ancestorUuid",I),T(""),_(""),j(!1)},ue=O=>{if(O.target.checked){y?.(O,$);return}y?.(O,L)};return A.useEffect(()=>{if(m||g){if(n?.length&&m){const O=n.filter(W=>!a?.some(({key:Q})=>Q===W));O.length&&O.forEach(W=>{const Q=a?.length??0;m(),b?.(Q,"key",W)})}if(a?.length&&g){const O=a.filter(({key:W})=>{const Q=/^\{[^}]+\}$/.test(W.trim()),ge=!n?.includes(W);return Q&&ge});O.length&&O.forEach(({id:W})=>{g(W)})}}},[n,a,m,b,g]),i.jsxs(c.Stack,{marginY:3,children:[i.jsx(c.TextField,{id:"urlSelect",size:"small",fullWidth:!0,slotProps:{input:{endAdornment:o.length?i.jsxs(c.InputAdornment,{position:"end",children:[i.jsx(c.Popover,{open:P,anchorEl:k.current,onClose:()=>{j(!1),T(""),_("")},anchorOrigin:{horizontal:"center",vertical:"top"},transformOrigin:{horizontal:"center",vertical:"bottom"},children:i.jsxs(c.Stack,{p:2,width:400,children:[i.jsxs(c.Stack,{spacing:1,mb:2,direction:"row",children:[i.jsx(c.TextField,{required:!0,value:S,onChange:O=>T(O.target.value),label:"key",fullWidth:!0,size:"small",sx:{mb:2}}),i.jsx(c.Select,{fullWidth:!0,required:!0,id:"new-param-ancestor",variant:"outlined",size:"xSmall",value:I,onChange:({target:O})=>_(O.value),MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:o.length?o.map(({name:O,uuid:W})=>i.jsx(c.MenuItem,{value:W,children:O},W)):i.jsx(c.MenuItem,{disabled:!0,value:"",children:w("form:noAncestorFound")})})]}),i.jsx(c.Button,{variant:"contained",fullWidth:!0,onClick:J,children:w("add")})]})}),i.jsx(c.Tooltip,{title:w("form:addUrlVariable"),placement:"top",arrow:!0,children:i.jsx(c.IconButton,{ref:k,size:"small",onClick:O=>{O.stopPropagation(),j(!P)},children:i.jsx(La,{color:"primary"})})})]}):i.jsx(c.Tooltip,{title:w("form:addParentsBeforeIntegrateUrlVariable"),placement:"top",arrow:!0,children:i.jsx(c.IconButton,{ref:k,size:"small",children:i.jsx(La,{color:"disabled"})})}),startAdornment:i.jsx(c.InputAdornment,{position:"start",children:i.jsx(za,{})})}},placeholder:"https://api.com/",type:"url",onChange:f,value:t||"",onClick:O=>O.stopPropagation(),sx:{"& .MuiOutlinedInput-root":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}),i.jsxs(c.Accordion,{disableGutters:!0,children:[i.jsx(c.AccordionSummary,{expandIcon:i.jsx(Va,{}),children:i.jsxs(c.Stack,{direction:"row",spacing:2,alignItems:"center",children:[i.jsx(c.Typography,{children:w("advancedConfiguration")}),o?.length?i.jsx(c.Stack,{mt:2,mb:1,children:i.jsx(c.Tooltip,{title:w("form:apiConfigDescription"),placement:"right",arrow:!0,children:i.jsx(Ic,{fontSize:"small",color:"primary"})})}):null]})}),i.jsx(c.Divider,{}),i.jsx(c.AccordionDetails,{children:i.jsxs(i.Fragment,{children:[o?.length&&n?.length?i.jsxs(i.Fragment,{children:[i.jsxs(c.Stack,{spacing:1,position:"relative",paddingY:2,children:[i.jsxs(c.Typography,{variant:"h5",pb:1,color:"text.secondary",children:[w("form:URlVariables")," :"]}),u?.map(({key:O,ancestorUuid:W,id:Q})=>{const ge=H(O);return i.jsxs(c.Grid,{container:!0,alignItems:"center",spacing:1,alignContent:"center",children:[i.jsx(c.Grid,{size:6,alignItems:"center",textAlign:"center",spacing:1,children:i.jsx(c.Typography,{variant:"h5",children:`${O}`})}),i.jsx(c.Grid,{size:6,children:i.jsx(c.Select,{fullWidth:!0,id:Q,variant:"outlined",size:"xSmall",value:W||"",onChange:({target:we})=>b?.(ge,"ancestorUuid",we.value),MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:o.length?o.map(({name:we,uuid:h})=>i.jsx(c.MenuItem,{value:h,children:we},h)):i.jsx(c.MenuItem,{disabled:!0,value:"",children:w("form:noAncestorFound")})})})]},O)})]}),i.jsx(c.Divider,{sx:{ml:-2,mr:-2}})]}):null,i.jsxs(i.Fragment,{children:[i.jsxs(c.Stack,{direction:"column",spacing:1,paddingY:2,children:[i.jsx(c.Typography,{variant:"h5",color:"text.secondary",children:w("form:variant",{variant:e?"Autocomplete":"Select"})}),i.jsxs(c.Stack,{direction:"row",spacing:4,children:[i.jsxs(c.FormGroup,{children:[i.jsx(c.FormControlLabel,{control:i.jsx(c.Checkbox,{id:"isAutocomplete",checked:e,onChange:ue}),label:w("activateSearch")}),e&&i.jsx(c.FormControlLabel,{control:i.jsx(c.Checkbox,{id:"isInitialQuery",checked:l,onChange:d}),label:w("initialQueryEnable")})]}),e&&i.jsx(c.TextField,{required:!0,id:"searchKey",size:"small",InputLabelProps:{shrink:!0},sx:{flex:1,minWidth:0},placeholder:w("form:searchKeyPlaceholder"),type:"text",label:w("form:key"),onChange:p,value:r||"",onClick:O=>O.stopPropagation()})]})]}),i.jsx(c.Divider,{sx:{mb:1,ml:-2,mr:-2}})]}),i.jsxs(c.Stack,{direction:"column",paddingY:2,spacing:2,children:[i.jsxs(c.Typography,{variant:"h5",sx:{ml:1},color:"text.secondary",children:[w("form:optionConfig")," :"]}),i.jsxs(c.Stack,{spacing:2,children:[i.jsx(c.TextField,{required:!0,id:"labelPath",size:"small",sx:{flex:1},label:"Label",value:s?.label||"",onChange:O=>C?.("label",O),placeholder:"client.name",type:"text"}),i.jsx(c.TextField,{required:!0,id:"valuePath",size:"small",label:"Value",value:s?.value||"",onChange:O=>C?.("value",O),placeholder:"client.id",type:"text"}),i.jsx(c.TextField,{id:"imagePath",size:"small",label:"Image",value:s?.image||"",onChange:O=>C?.("image",O),placeholder:"client.src.profile",type:"text"})]})]}),i.jsx(c.Divider,{sx:{mb:1,ml:-2,mr:-2,mt:1}}),i.jsxs(c.Stack,{spacing:1,paddingY:2,direction:{sm:"row",xs:"column"},alignItems:{sm:"center",xs:"flex-start"},children:[i.jsx(c.Typography,{variant:"h5",color:"text.secondary",children:w("form:queryParams")}),i.jsx(c.Box,{justifyContent:"flex-end",children:i.jsx(c.IconButton,{color:"success",sx:{marginRight:"-20px !important",minWidth:"auto !important"},onClick:m,children:i.jsx(Ba,{})})})]}),G?.map(({id:O,key:W,staticValue:Q,ancestorUuid:ge,useAncestorValue:we})=>{const h=H(W);return i.jsxs(c.Grid,{container:!0,pb:2,alignItems:"center",padding:1,spacing:1,children:[i.jsx(c.Grid,{size:6,children:i.jsx(c.Tooltip,{title:we?w("form:keyPathApiDescription"):"",children:i.jsx(c.TextField,{required:!0,id:`param-key-${O}`,label:"Key",size:"small",onChange:({target:v})=>b?.(h,"key",v.value),value:W||"",inputProps:{"data-id":O}})})}),i.jsx(c.Grid,{size:6,children:we?i.jsx(c.Select,{fullWidth:!0,required:!0,id:O,variant:"outlined",size:"small",value:ge||"",onChange:({target:v})=>b?.(h,"ancestorUuid",v.value),MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:o.length?o.map(({name:v,uuid:M})=>i.jsx(c.MenuItem,{value:M,children:v},M)):i.jsx(c.MenuItem,{disabled:!0,value:"",children:w("form:noAncestorFound")})}):i.jsx(c.TextField,{required:!0,id:`param-value-${O}`,label:w("value",{ns:"form"}),size:"small",fullWidth:!0,onChange:({target:v})=>b?.(h,"staticValue",v.value),value:Q||"",inputProps:{"data-id":O}})}),i.jsxs(c.Grid,{size:"auto",sx:{ml:"auto"},container:!0,alignItems:"center",children:[o.length>0&&i.jsx(c.FormControlLabel,{control:i.jsx(c.Checkbox,{id:`useAncestorAsParam-${O}`,disabled:!o.length,checked:we||!1,onChange:({target:v})=>b?.(h,"useAncestorValue",v.checked)}),label:i.jsx(c.Typography,{variant:"body2",color:"textSecondary",children:w("form:useAncestorValueAsParam")})}),i.jsx(c.IconButton,{color:"error",value:O,onClick:g,children:i.jsx(_c,{})})]})]},O)})]})})]})]})},Fc=fe(i.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"),Nc=e=>{const{backendConfig:t}=xe(),{endpoints:r}=t||{},{workflows:n=""}=r||{};return ut.useQuery({queryFn:async({signal:a})=>{const{data:o}=await dt.get(n,{signal:a});return o},queryKey:["workflows"],...e})},Bc=({isControlled:e,fetchWorkflowsOnOpen:t})=>{const{t:r}=ke.useTranslation("snackMessage"),{openSnackbar:n}=c.useSnackbar(),{currentTree:a,setCurrentTree:o,dispatchTree:s}=xe(),[l,p]=A.useState(""),f=!!l&&!e&&l!==a.id,{data:m,isError:b}=Gt(l,{enabled:f}),{data:g,isLoading:C,refetch:y}=Nc({enabled:!t}),d=A.useCallback(async({target:w})=>{const{value:P}=w;if(P==="add-new-tree"){p(""),o({name:""}),s(Cn());return}p(P),o({id:P,name:g?.find(j=>j.id===P)?.label})},[s,o,g]),k=A.useCallback(async()=>{if(t)try{await y(),a.id&&!l&&p(a.id)}catch{n({message:r("error.fetchTree",{ns:"snackMessage"}),severity:"error"})}},[t,y,a.id,l,n,r]);return A.useEffect(()=>{if(m&&l!==a.id){const{id:w,label:P,workflow:j}=m;o({id:w,name:P}),s(jr(j))}},[a.id,s,e,o,l,m]),A.useEffect(()=>{b&&n({message:r("error.fetchTree",{ns:"snackMessage"}),severity:"error"})},[b,n,r]),{currentTree:a,fetchWorkflowSuggestions:y,handleChangeTree:d,handleOnOpen:k,setTreeSelected:p,treeSelected:l,workflowsSuggestions:g,workflowsSuggestionsLoading:C}},qa={formControl:{flex:1},select:{".MuiOutlinedInput-notchedOutline":{border:0,paddingLeft:5},".MuiSelect-select":{opacity:0,width:0},boxShadow:"none"}},Wa=({arrowOnly:e,required:t,size:r,showBtnAddNewTree:n,onChange:a,value:o,fetchWorkflowsOnOpen:s})=>{const{t:l}=ke.useTranslation("form"),p=A.useMemo(()=>!!a,[a]),{handleChangeTree:f,handleOnOpen:m,workflowsSuggestions:b,workflowsSuggestionsLoading:g,treeSelected:C}=Bc({fetchWorkflowsOnOpen:s,isControlled:p});return i.jsxs(c.FormControl,{size:r,required:t,sx:qa.formControl,children:[!e&&i.jsx(c.InputLabel,{children:l("tree",{ns:"form"})}),i.jsxs(c.Select,{value:p?o:C,id:"tree-select",onChange:y=>p?a?.(y):f(y),sx:e?qa.select:void 0,label:l("tree",{ns:"form"}),onOpen:m,children:[(o&&g||g)&&i.jsx(c.MenuItem,{value:o,children:i.jsx(c.Skeleton,{width:"100%"})}),b?.map(({label:y,id:d})=>i.jsx(c.MenuItem,{value:d,children:y},d)),n&&i.jsx(c.MenuItem,{disabled:!0,children:i.jsx(c.Box,{sx:{height:1,width:"100%"},children:i.jsx(c.Divider,{})})}),n&&i.jsxs(c.MenuItem,{value:"add-new-tree",children:[i.jsx(c.Typography,{mr:1,children:l("newTree",{ns:"form"})}),i.jsx(Fc,{color:"primary"})]})]})]})},Lc=({id:e,helperText:t,hiddenValue:r,isHiddenField:n,isTreeField:a,treeSelected:o,handleChangeTreeSelect:s,handleChangeHelperText:l,handleChangeHiddenValue:p})=>{const{t:f}=ke.useTranslation(["translation","form"]);return a?i.jsx(Wa,{required:!0,value:o,onChange:s}):n?i.jsx(c.TextField,{required:!0,size:"small",id:e,sx:{flex:1},label:f("hiddenValue",{ns:"form"}),onChange:p,value:r}):i.jsx(c.TextField,{sx:{flex:1},label:f("helperText",{ns:"form"}),size:"small",onChange:l,value:t})},nn={address:{city:"Paris",countryCode:"FR",route:"Rue Saint-Sabin",streetNumber:"6",zipcode:"75011"},entityId:"0",id:"0",internalCode:"B11X.PE0138",name:"worksite-0"},Ua=(e,t=new Set)=>(Object.keys(e).forEach(r=>{t.add(r);const n=e[r];n!==null&&typeof n=="object"&&Ua(n,t)}),Array.from(t)),Ha=(e,t,r="")=>{let n=null;return Object.keys(e).some(a=>{const o=r?`${r}.${a}`:a;if(a===t)return n=o,!0;const s=e[a];if(s!==null&&typeof s=="object"){const l=Ha(s,t,o);if(l)return n=l,!0}return!1}),n},Vc=()=>{const[e,t]=A.useState(""),[r,n]=A.useState(""),a=Ua(nn),o=s=>{const l=s.target.value;t(l);const p=Ha(nn,l);n(p||"")};return i.jsx(c.Card,{children:i.jsx(c.CardContent,{children:i.jsxs(c.Stack,{spacing:1,children:[i.jsx(c.Typography,{variant:"h6",children:"🔑 Pick a key"}),i.jsxs(c.FormControl,{fullWidth:!0,children:[i.jsx(c.InputLabel,{children:"Choisir une clé"}),i.jsx(c.Select,{value:e,label:"Choisir une clé",onChange:o,children:a.map(s=>i.jsx(c.MenuItem,{value:s,children:s},s))})]}),i.jsx(c.Typography,{variant:"h6",children:"Map to value desired 🔑"}),i.jsx(c.TextField,{label:"Chemin complet",variant:"outlined",value:r}),i.jsx(c.Typography,{variant:"h6",children:"API model example:"}),i.jsx(c.Box,{component:"pre",sx:{borderRadius:2},children:JSON.stringify(nn,null,2)})]})})})},zc=["address","dynamicSelect","autocomplete"],qc=({onChange:e,value:t,currentType:r})=>{const{t:n}=ke.useTranslation(["form"]),{tree:a}=xe(),s=Ht(a,t?.uuid||"")?.attributes?.type||"",[l,p]=A.useState(!1),[f,m]=A.useState(!1),{sourceValue:b}=t||{},g=y=>{const d=y.target.value;e?.(d)},C=()=>r==="address"?i.jsxs(c.Alert,{severity:"warning",variant:"outlined",children:[i.jsx(c.Typography,{variant:"subtitle2",gutterBottom:!0,children:n("addressStructureHint")}),i.jsx(c.Box,{component:"pre",sx:{borderRadius:2,p:2},children:JSON.stringify({city:"string",country:"string",postalCode:"string",state:"string",street:"string"},null,2)})]}):r==="select"||s==="radio"?i.jsx(c.Alert,{severity:"warning",variant:"outlined",children:i.jsx(c.Typography,{variant:"subtitle2",gutterBottom:!0,children:n("selectStructureHint")})}):null;return i.jsxs(c.Stack,{spacing:2,children:[i.jsxs(c.Typography,{color:"text.secondary",sx:{mb:2},children:[n("valueOfParentIsOfType"),": ",i.jsx("strong",{children:s})]}),zc.includes(s||"")&&i.jsxs(c.Stack,{spacing:2,children:[i.jsx(c.TextField,{fullWidth:!0,label:n("mapObjectToRender"),value:b??"",onChange:g}),i.jsx(c.FormControlLabel,{control:i.jsx(c.IconButton,{onClick:()=>p(y=>!y),sx:{transform:l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"},children:i.jsx(co.KeyboardArrowDown,{})}),label:n("objectDemo")}),i.jsx(c.Collapse,{in:l,children:i.jsx(c.Box,{mt:1,children:i.jsx(Vc,{})})}),C()]}),["text","number","email","tel","url","switch","checkbox","radio","select","date"].includes(s||"")&&i.jsxs(c.Stack,{spacing:2,children:[i.jsx(c.Typography,{variant:"body2",children:n("staticValueDescription")}),!["switch","checkbox"].includes(s||"")&&i.jsx(c.TextField,{fullWidth:!0,label:n("staticValue"),value:b??"",onChange:g}),["switch","checkbox"].includes(s||"")&&i.jsx(c.FormControlLabel,{control:i.jsx(c.Checkbox,{checked:f,onChange:y=>{const{checked:d}=y.target;m(d),e?.(d?String(d):void 0)}}),label:n("staticValue")}),C()]})]})},Wc=({selectAncestorName:e,type:t,ancestors:r,defaultValueFromAncestor:n,onChangeValueFromAncestor:a,onChangeAncestorRef:o})=>{const{t:s}=ke.useTranslation(["translation","form"]),{tree:l,currentHierarchyPointNode:p}=xe(),{uuid:f}=p?.data||{};if(!l||!f)return null;const m=b=>{const{value:g}=b.target,y=r.find(d=>d.name===g)?.uuid;o?.(y,g)};return i.jsxs(c.Stack,{marginY:3,children:[i.jsxs(c.FormControl,{fullWidth:!0,variant:"outlined",size:"small",children:[i.jsx(c.InputLabel,{id:"label-receive-value",children:s("form:receiveValueFromParent")}),i.jsx(c.Select,{labelId:"label-receive-value",id:"select-receive-value",value:e||"",onChange:m,label:s("form:receiveValueFromParent"),sx:{borderBottomLeftRadius:e?0:void 0,borderBottomRightRadius:e?0:void 0},MenuProps:{PaperProps:{sx:{maxHeight:300}}},children:r.length>0?[i.jsx(c.MenuItem,{value:"",children:" "},"empty"),...r.map(({name:b})=>i.jsx(c.MenuItem,{value:b,children:b},`${b}-${f}`))]:i.jsx(c.MenuItem,{disabled:!0,value:"",children:s("form:noAncestorFound")})})]}),e&&i.jsxs(c.Accordion,{disableGutters:!0,children:[i.jsx(c.AccordionSummary,{expandIcon:i.jsx(Va,{}),"aria-controls":"panel-ancestor-control",id:"panel-ancestor-control-header",children:i.jsx(c.Typography,{variant:"h5",children:s("advancedConfiguration")})}),i.jsx(c.AccordionDetails,{children:i.jsx(qc,{onChange:a,value:n,currentType:t})})]})]})},Uc=()=>{const e=Date.now(),t=performance.now();return`${e}${Math.random().toString(36).substring(2,9)}${t}`},Hc=()=>{const t=A.useRef(Uc()).current,r=A.useMemo(()=>[{id:"0",label:"",message:"",value:""}],[]),{dispatchTree:n,currentHierarchyPointNode:a,modalOpen:o,treePath:s,setModalOpen:l,tree:p}=xe(),{openSnackbar:f}=c.useSnackbar(),{t:m}=ke.useTranslation(["translation","form"]),b=a?.data&&a?.data?.attributes&&"isMultiple"in a.data.attributes?!!a.data.attributes.isMultiple:null,[g,C]=A.useState(r),[y,d]=A.useState(""),[k,w]=A.useState(""),[P,j]=A.useState(""),[S,T]=A.useState(!1),[I,_]=A.useState(!1),[H,G]=A.useState(!1),[u,$]=A.useState(!1),[L,J]=A.useState("text"),[ue,O]=A.useState(null),[W,Q]=A.useState(void 0),[ge,we]=A.useState(""),[h,v]=A.useState(""),[M,D]=A.useState({off:"",on:""}),[N,z]=A.useState(!1),[q,U]=A.useState(!1),[F,K]=A.useState(""),[Y,ye]=A.useState(""),[R,Se]=A.useState(void 0),[Xe,ot]=A.useState(""),an=[...W?.url?.matchAll(/{(.*?)}/g)??[]].filter(E=>E[1]!=="").map(E=>E[0]),wt=L==="tree",Bt=L==="hidden",Ze=L==="autocomplete",Lt=L==="dateRange",Vt=L==="dynamicSelect",kr=De.some(E=>E.type===L&&E?.isBooleanField),it=De.some(E=>E.type===L&&E?.isDecisionField),on=De.some(E=>E.type===L&&E?.isRequiredDisabled),sn=De.some(E=>E.type===L&&E?.isRepeatableDisabled),ln=De.some(E=>E.type===L&&E?.isPatternEnabled),zt=De.some(E=>E.type===L&&"isMultiple"in E),et=o==="edit",Ye=a?.data?.uuid||"",st=ft(p,s?.at(-1)?.path),qt=Mo(st,Ye,!et&&!!Ye?void 0:Ye),cn=A.useMemo(()=>qt.map(({name:E})=>E||""),[qt]),Wt=A.useCallback(E=>!it&&E>0,[it]),un=!!cn.length,dn=Ze||Vt,{refetch:Er,isLoading:fn}=Gt(ge,{enabled:!1}),lt=A.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]),pn=A.useCallback(E=>B=>{C(V=>V.map(ne=>{const{id:me}=ne;return B.target.dataset.id===me?{...ne,id:me,[E]:B.target.value}:{...ne}}))},[]),qe=A.useCallback((E,B)=>{typeof B=="string"?O(B):B&&B.inputValue?O(B.inputValue):O(null)},[]),hn=A.useCallback(({target:E})=>{d(E.value)},[]),ku=A.useCallback(({target:E})=>{w(E.value)},[]),Eu=A.useCallback(({target:E})=>{j(E.value)},[]),ju=A.useCallback(({target:E})=>{const B=E.value;Q(V=>({...V,url:B}))},[]),Su=A.useCallback(({target:E})=>{Q(B=>{const{searchKey:V,...ne}=B??{},{value:me}=E;return me===""?Object.keys(ne).length>0?ne:void 0:{...ne,searchKey:me}})},[]),Au=A.useCallback((E,B)=>{Q(V=>{const ne=V??{},ce={...ne.pathKey??{},[E]:B.target.value};if(B.target.value===""&&E in ce){const{pathKey:Pe,...Ge}=ne;return Object.keys(Ge).length>0?Ge:void 0}return{...ne,pathKey:ce}})},[]),Pu=A.useCallback((E,B,V)=>{Q(ne=>{const me=ne??{},ce=[...me.params??[]],Pe={...ce[E]??{}};if(V===""||V===!1?delete Pe[B]:Pe[B]=V,Object.values(Pe).every(tt=>tt===""||tt===!1||tt===void 0)?ce.splice(E,1):ce[E]=Pe,ce.length===0){const{params:tt,...ct}=me;return Object.keys(ct).length>0?ct:void 0}return{...me,params:ce}})},[]),Ou=(E,B)=>{K(B)},Ru=({target:E})=>{ye(E.value)},$u=({target:E})=>{$(E.checked)},Mu=({target:E})=>{_(E.checked)},_u=({target:E})=>{U(E.checked)},Iu=({target:E})=>{G(E.checked)},Du=({target:E})=>{T(E.checked)},Fu=({target:E})=>{z(E.checked)},Nu=(E,B)=>{J(B.type),G(!1),_(!1),z(!1),T(!1)},Bu=({target:E})=>{we(E.value)},Lu=E=>({target:B})=>{D(V=>({...V,[E]:B.value}))},Vu=({target:E})=>{v(E.value)},zu=A.useCallback(()=>{C(E=>{const B=Number(E[E.length-1].id),V=String(B+1);return[...E,{...r[0],id:V}]})},[r]),qu=()=>{Q(E=>{const B=E??{},V=[...B.params??[]],ne=Number(V[V.length-1]?.id||0),me=String(ne+1),ce=[...V,{id:me,key:""}];return{...B,params:ce}})},Wu=({currentTarget:E})=>{C(B=>B.filter(({id:V})=>E.value!==V))},Uu=E=>{const B=typeof E=="string"?E:E.currentTarget.value;Q(V=>{const ne=V??{},ce=(ne.params??[]).filter(Ge=>Ge.id!==B),Pe=ce.length>0?ce:void 0;return{...ne,params:Pe}})},eo=A.useCallback((E,B)=>{const V=E?.children?.[B]?.data?.children;return V?V.map(({uuid:ne,attributes:me,children:ce})=>({attributes:me,children:ce,uuid:ne})):[]},[]),to=A.useCallback(E=>H?g?.filter((B,V)=>!Wt(V))?.map(({message:B,value:V,label:ne},me)=>{const ce=`${t}:${V}`,Pe=eo(a,me);return{attributes:{depth:E+1,label:ne,name:`${P}:${V}`,value:V,...B&&{message:B},...Pe.length===0&&{isLeaf:!0}},children:Pe,uuid:ce}}):[],[a,Wt,eo,H,P,t,g]),ro=A.useCallback(E=>E.map(({message:B,...V})=>({...V,...B&&{message:B}})),[]),no=A.useCallback((E,B,V)=>{if(E&&(!B||V))try{return Er()}catch{f({message:m("error.fetchTree",{ns:"snackMessage"}),severity:"error"})}return E&&B&&!V?{data:{workflow:a?.data.attributes?.tree},isError:null}:{data:null,isError:null}},[a?.data.attributes?.tree,Er,f,m]),Hu=E=>{Se(B=>{const V={...B??{}};return E?V.sourceValue=E:delete V.sourceValue,Object.keys(V).length>0?V:void 0})},Yu=(E,B)=>{Se(V=>{const ne={...V??{}};return E?ne.uuid=E:delete ne.uuid,Object.keys(ne).length>0?ne:void 0}),ot(B)},Gu=A.useCallback(async E=>{E.preventDefault();const{on:B,off:V}=M,me=(a?.depth||0)+(et||a===null?0:1),ce=to(me),Pe=s?.at(-1)?.path,Ge=s.length?`${Pe}/${t}`:`/${t}`,tt=a?.data.attributes?.tree?.treeId!==ge,{data:ct,isError:Ku}=await no(wt,et,tt);if(Ku)return;const ao={attributes:{depth:me,name:P,type:L,...k&&{label:k},...Ze&&{route:W},...Vt&&{route:W},...h&&{helperText:h},...H&&{isDecision:H},...I&&{required:I},...S&&Lt&&{isDisabledPast:S},...N&&{repeatable:N},...Bt&&{hiddenValue:y},...ue&&{tag:ue},...u&&zt&&{isMultiple:u},...q&&{initialQuery:q},...it&&!H&&{values:ro(g)},...(V||B)&&{messages:{...V&&{off:V},...B&&{on:B}}},...F&&{pattern:typeof F=="object"?F.value:F},...Y&&{patternMessage:Y},...R&&{defaultValueFromAncestor:R},...wt&&{tree:{...ct?.workflow,treeId:ge},treePath:Ge}},children:ce,uuid:et?Ye:t};n(et?Io(Pe||"",Ye,ao):_o(Pe||null,Ye,ao)),l(null)},[et,a,Ye,R,n,to,ro,no,h,y,q,Ze,Lt,H,it,S,Vt,Bt,u,zt,wt,k,M,P,F,Y,N,I,W,l,ue,s,ge,L,t,g]);return A.useEffect(()=>{if(o==="edit"){const B=a?.data?.attributes?.values||a?.data?.children?.filter(({attributes:ce})=>!ce?.type)?.map(({attributes:ce},Pe)=>{const{label:Ge,value:tt,message:ct}=ce||{};return{id:String(Pe),label:String(Ge),value:String(tt),...ct&&{message:String(ct)}}}),V=a?.data?.attributes?.defaultValueFromAncestor?.uuid,me=(V?Ht(st,V):void 0)?.attributes?.name;ot(me),Se(a?.data?.attributes?.defaultValueFromAncestor||void 0),O(a?.data.attributes?.tag||null),J(a?.data.attributes?.type||"text"),v(a?.data.attributes?.helperText||""),_(a?.data.attributes?.required||!1),T(a?.data.attributes?.isDisabledPast||!1),w(a?.data.attributes?.label||""),j(a?.data.attributes?.name||""),G(a?.data.attributes?.isDecision||!1),C(B?.length?B:r),we(a?.data.attributes?.tree?.treeId||""),z(a?.data.attributes?.repeatable||!1),d(a?.data.attributes?.hiddenValue||""),K(lt.find(({value:ce})=>ce===a?.data.attributes?.pattern)||a?.data.attributes?.pattern||""),ye(a?.data.attributes?.patternMessage||""),D({off:a?.data.attributes?.messages?.off||"",on:a?.data.attributes?.messages?.on||""}),Q(ce=>({...ce,params:a?.data.attributes?.route?.params,pathKey:a?.data.attributes?.route?.pathKey,searchKey:a?.data.attributes?.route?.searchKey,url:a?.data.attributes?.route?.url||""})),$(b||!1),U(a?.data.attributes?.initialQuery||!1),Se(a?.data?.attributes?.defaultValueFromAncestor||void 0)}},[a?.data.attributes?.defaultValueFromAncestor,a?.data.attributes?.helperText,a?.data.attributes?.hiddenValue,a?.data.attributes?.initialQuery,a?.data.attributes?.isDecision,a?.data.attributes?.isDisabledPast,a?.data.attributes?.label,a?.data.attributes?.messages?.off,a?.data.attributes?.messages?.on,a?.data.attributes?.name,a?.data.attributes?.pattern,a?.data.attributes?.patternMessage,a?.data.attributes?.repeatable,a?.data.attributes?.required,a?.data.attributes?.route?.params,a?.data.attributes?.route?.pathKey,a?.data.attributes?.route?.searchKey,a?.data.attributes?.route?.url,a?.data.attributes?.tag,a?.data.attributes?.tree?.treeId,a?.data.attributes?.type,a?.data.attributes?.values,a?.data?.children,st,r,b,o,lt]),{ancestors:qt,currentTree:st,defaultValueFromAncestor:R,getDisabledValueField:Wt,handleAddParams:qu,handleAddValue:zu,handleAncestorRef:Yu,handleChangeHelperText:Vu,handleChangeHiddenValue:hn,handleChangeInitialQuery:_u,handleChangeIsDecisionField:Iu,handleChangeIsDisabledPast:Du,handleChangeLabel:ku,handleChangeMessage:Lu,handleChangeMultiple:$u,handleChangeName:Eu,handleChangeParam:Pu,handleChangePath:Au,handleChangePattern:Ou,handleChangePatternMessage:Ru,handleChangeRepeatable:Fu,handleChangeRequired:Mu,handleChangeSearchKey:Su,handleChangeTag:qe,handleChangeTreeSelect:Bu,handleChangeType:Nu,handleChangeUrlSelect:ju,handleDeleteParam:Uu,handleDeleteValue:Wu,handlePresetValues:pn,handleSubmit:Gu,handleValueFromAncestor:Hu,hasAncestors:un,hasApiConfig:dn,helperText:h,hiddenValue:y,initialQuery:q,isAutocomplete:Ze,isBooleanField:kr,isDateRangePicker:Lt,isDecision:H,isDecisionField:it,isDisabledPast:S,isHiddenField:Bt,isMultiple:u,isMultiplePossible:zt,isPatternEnabled:ln,isRepeatableDisabled:sn,isRequiredDisabled:on,isTreeField:wt,isWorkflowLoading:fn,label:k,messages:M,name:P,pattern:F,patternMessage:Y,patternOptions:lt,repeatable:N,required:I,route:W,selectAncestorName:Xe,tag:ue,treeSelected:ge,type:L,uuid:t,validDynamicUrlParams:an,values:g}},Yc=e=>{const{backendConfig:t}=xe(),r=De.filter(a=>!(a.type==="tree"&&!t?.baseUrl))||[];return{currentValue:r.find(a=>a.type===e)||De[0],options:r}},Gc=({id:e,onChange:t,value:r,sx:n})=>{const{t:a}=ke.useTranslation(["translation","form"]),{currentValue:o,options:s}=Yc(r);return i.jsx(c.Autocomplete,{disableClearable:!0,fullWidth:!0,size:"small",id:e,sx:n,options:s,value:o,onChange:t,getOptionLabel:l=>a(`form:type.${l.type}`),renderInput:l=>i.jsx(c.TextField,{...l,required:!0,size:"small",label:a("type")}),renderOption:(l,p)=>{const{key:f,...m}=l;return p.type==="autocomplete"?null:p.type==="dynamicSelect"?i.jsxs(c.MenuItem,{...m,children:[a(`form:type.${p.type}`),i.jsx(za,{fontSize:"small",sx:{color:"green",ml:1}})]},f):i.jsxs(c.MenuItem,{...m,children:[a(`form:type.${p.type}`),p.isDecisionField&&i.jsx(c.Chip,{label:a("decisionField",{ns:"form"}),size:"small",color:"info",sx:{marginLeft:1}})]},f)}})},Kc=e=>{if(!e)return[];const t=new Set,r=n=>{if(n?.attributes?.tag&&t.add(n.attributes.tag),n?.children?.length){const{children:a}=n;for(let o=0;o<a.length;o+=1)r(a[o])}};return r(e),[...t]},Jc=c.createFilterOptions(),Qc=({id:e,value:t,onChange:r})=>{const{t:n}=ke.useTranslation(["translation","form"]),{tree:a}=xe(),o=Kc(a).reduce((s,l)=>[...s,{inputValue:l,label:l}],[]);return i.jsx(c.Autocomplete,{freeSolo:!0,fullWidth:!0,id:e,sx:{flex:1},size:"small",value:t,onChange:r,filterOptions:(s,l)=>{const p=Jc(s,l),{inputValue:f}=l,m=s.some(b=>typeof b!="string"&&f===b.label);return f!==""&&!m&&p.push({inputValue:f,label:`${n("add")} "${f}"`}),p},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(c.TextField,{...s,label:n("tag")}),options:o})},Xc=({onClose:e,title:t})=>{const{t:r}=ke.useTranslation(["translation","form"]),{ancestors:n,hasAncestors:a,patternOptions:o,values:s,required:l,tag:p,type:f,helperText:m,label:b,name:g,hiddenValue:C,isBooleanField:y,isDisabledPast:d,handleChangeIsDisabledPast:k,isDecision:w,isDecisionField:P,isHiddenField:j,isRequiredDisabled:S,isRepeatableDisabled:T,isAutocomplete:I,isDateRangePicker:_,isTreeField:H,treeSelected:G,isWorkflowLoading:u,repeatable:$,isMultiplePossible:L,isPatternEnabled:J,isMultiple:ue,initialQuery:O,handleChangeTreeSelect:W,handleChangeHelperText:Q,handleChangeRequired:ge,handleChangeName:we,handleChangeType:h,handleChangeIsDecisionField:v,handleDeleteValue:M,handleDeleteParam:D,handleChangeMessage:N,handleSubmit:z,handleAddValue:q,handleAddParams:U,handleChangeLabel:F,handleChangeRepeatable:K,handleChangeHiddenValue:Y,handleChangeTag:ye,handleChangeSearchKey:R,handleChangeUrlSelect:Se,handleChangeParam:Xe,handleChangePath:ot,handleChangeMultiple:an,handleChangeInitialQuery:wt,route:Bt,handlePresetValues:Ze,patternMessage:Lt,pattern:Vt,handleChangePattern:kr,handleChangePatternMessage:it,messages:{on,off:sn},handleValueFromAncestor:ln,defaultValueFromAncestor:zt,handleAncestorRef:et,selectAncestorName:Ye,hasApiConfig:st,validDynamicUrlParams:Xa}=Hc(),{searchKey:Za,url:qt,pathKey:cn,params:Wt}=Bt||{},{object:un="",label:dn="",value:Er="",image:fn=""}=cn||{};return i.jsx(c.Box,{component:"form",onSubmit:z,children:i.jsx(c.Grid,{container:!0,height:600,children:i.jsxs(c.Grid,{size:12,sx:{display:"flex",flexDirection:"column",height:"100%"},children:[i.jsxs(c.DialogContent,{children:[i.jsx(c.Typography,{variant:"h3",pb:2,children:t}),i.jsx(Gc,{id:"type",value:f,onChange:h,sx:{marginBottom:1}}),i.jsxs(c.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(c.TextField,{autoComplete:"off",id:"name",label:r("name"),sx:{flex:1},onChange:we,value:g,size:"small",required:!0}),i.jsx(c.TextField,{id:"label",sx:{flex:1},label:r("label",{ns:"form"}),onChange:F,value:b,size:"small"})]}),i.jsxs(c.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[f!=="title"&&i.jsx(Qc,{id:"tag",value:p,onChange:ye}),i.jsx(Lc,{id:"helperText",helperText:m,hiddenValue:C,isHiddenField:j,isTreeField:H,treeSelected:G,handleChangeTreeSelect:W,handleChangeHelperText:Q,handleChangeHiddenValue:Y})]}),J&&i.jsxs(c.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(c.Autocomplete,{freeSolo:!0,id:"autoCompletePatternMessage",size:"small",sx:{flex:1},onChange:kr,onInputChange:kr,value:Vt,options:o,renderInput:lt=>i.jsx(c.TextField,{...lt,label:r("form:pattern")})}),i.jsx(c.TextField,{id:"patternMessageText",label:r("form:patternMessage"),sx:{flex:1},onChange:it,value:Lt,size:"small"})]}),y&&i.jsxs(c.Stack,{spacing:1,paddingY:1,direction:{sm:"row",xs:"column"},children:[i.jsx(c.TextField,{id:"onMessage",size:"small",sx:{flex:1},label:r("onMessage",{ns:"form"}),onChange:N("on"),value:on}),i.jsx(c.TextField,{id:"offMessage",size:"small",sx:{flex:1},label:r("offMessage",{ns:"form"}),onChange:N("off"),value:sn})]}),st&&i.jsx(Dc,{isAutocomplete:I,url:qt,searchKey:Za,sliceUrlParams:Xa,apiParams:Wt,ancestors:n,apiMapping:{image:fn,label:dn,object:un,value:Er},initialQuery:O,onChangeUrlSelect:Se,onChangeSearchKey:R,onAddParams:U,onChangeParams:Xe,onDeleteParams:D,onChangeApiMapping:ot,onChangeType:h,onChangeInitialQuery:wt}),a&&!st&&i.jsx(Wc,{selectAncestorName:Ye,type:f,ancestors:n,defaultValueFromAncestor:zt,onChangeValueFromAncestor:ln,onChangeAncestorRef:et}),i.jsx(c.Stack,{paddingY:1,children:i.jsxs(c.FormGroup,{row:!0,children:[L&&i.jsx(c.FormControlLabel,{control:i.jsx(c.Checkbox,{checked:ue,onChange:an}),label:r("multiple")}),i.jsx(c.FormControlLabel,{disabled:S,control:i.jsx(c.Checkbox,{id:"isRequired",checked:l,onChange:ge}),label:r("required")}),i.jsx(c.FormControlLabel,{disabled:T,control:i.jsx(c.Checkbox,{id:"isRepeatable",checked:$,onChange:K}),label:r("repeatable",{ns:"form"})}),P&&i.jsx(c.FormControlLabel,{control:i.jsx(c.Checkbox,{id:"isDecision",checked:w,onChange:v}),label:r("decisionField",{ns:"form"})}),_&&i.jsx(c.FormControlLabel,{control:i.jsx(c.Checkbox,{id:"disabledPast",checked:d,onChange:k}),label:r("disabledPast",{ns:"form"})})]})}),P&&i.jsxs(i.Fragment,{children:[i.jsx(c.Typography,{variant:"h4",children:r("values")}),s?.map(({value:lt,label:pn,id:qe,message:hn})=>i.jsxs(c.Stack,{direction:{sm:"row",xs:"column"},spacing:1,paddingY:1,position:"relative",children:[i.jsx(c.TextField,{id:`decision-label-${qe}`,label:r("label",{ns:"form"}),size:"small",sx:{flex:1},onChange:Ze("label"),value:pn,inputProps:{"data-id":qe},required:!0}),i.jsx(c.TextField,{id:`decision-value-${qe}`,label:r("value",{ns:"form"}),size:"small",sx:{flex:1},onChange:Ze("value"),value:lt,inputProps:{"data-id":qe},required:!0}),i.jsx(c.TextField,{id:`decision-message-${qe}`,label:r("message",{ns:"form"}),size:"small",sx:{flex:1},onChange:Ze("message"),value:hn,inputProps:{"data-id":qe}}),s.length>1&&i.jsx(c.IconButton,{color:"warning",sx:{"&:before":{borderRadius:"50%",content:'""',height:20,position:"absolute",width:20,zIndex:-1},backgroundColor:ie.background,marginRight:"-20px !important",minWidth:"auto !important",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"},value:qe,onClick:M,children:i.jsx(Mc,{})})]},qe))]}),P&&i.jsx(c.Box,{justifyContent:"flex-end",display:"flex",children:i.jsx(c.IconButton,{color:"success",sx:{marginRight:"-20px !important",minWidth:"auto !important"},onClick:q,children:i.jsx(Ba,{})})})]}),i.jsxs(c.DialogActions,{children:[i.jsx(c.Button,{variant:"text",onClick:e,children:r("cancel")}),i.jsx(c.Button,{variant:"contained",type:"submit",disabled:u,isLoading:u,loadingIndicator:i.jsx(c.CircularProgress,{size:14}),children:r("validate")})]})]})})})},Zc=fe(i.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"),eu=fe(i.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"),tu=fe(i.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"),ru=fe(i.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.1q-.15.15-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded"),nu=fe(i.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.41s1.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"),au=fe([i.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"),i.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"),ou=fe(i.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"),iu=fe(i.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.98s1.98-.89 1.98-1.98V18h5.15c.8 0 1.28-.89.83-1.55z"}),"ParkRounded"),su=fe(i.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 0s.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"),lu=fe(i.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"),Ya={400:"#8d6e63",700:"#5d4037"},Te={actionButton:{minWidth:"auto !important"},containerField:{background:ie.background,border:`solid 1px ${ie.primary}`,borderRadius:"1rem"},containerHidden:{background:ie.background,border:`solid 1px ${ie.borderGrey}`,borderRadius:"1rem"},containerTitle:{background:Ya[700],border:`solid 1px ${Ya[400]}`,borderRadius:"1rem"},containerTree:{background:ie.tertiary,border:`solid 1px ${ie.primary}`,borderRadius:"1rem"},containerValue:{background:ie.background,border:`solid 1px ${ie.secondary}`,borderRadius:"1rem"},icon:{color:ie.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}},cu=e=>{const t=!!e,r=e==="tree",n=e==="hidden";return e==="title"?Te.containerTitle:n?Te.containerHidden:r?Te.containerTree:t?Te.containerField:Te.containerValue},uu=({nodeDatum:e,onAddChildren:t,onEditChildren:r,onDeleteChildren:n,onOpenTreeModal:a,hierarchyPointNode:o,size:s=220})=>{const{t:l}=ke.useTranslation(["translation","form"]),{attributes:p}=e||{},{isRoot:f,isLeaf:m,required:b,isDecision:g,step:C,type:y,label:d,repeatable:k,tag:w,name:P}=p||{},j=!!y,S=y==="tree",T=y==="hidden",I=!j,_=!f&&!m;return i.jsxs("g",{children:[i.jsx(c.GlobalStyles,{styles:{".rd3t-node svg":Te.nodeSvg}}),i.jsx(c.Box,{component:"foreignObject",height:s,width:s,x:`-${s/2}`,y:`-${s/2}`,sx:cu(y),children:i.jsxs(c.Box,{flex:1,display:"flex",p:2,height:"100%",flexDirection:"column",justifyContent:"space-between",children:[i.jsxs(c.Stack,{alignItems:"flex-end",spacing:.5,children:[j&&i.jsxs(c.Stack,{direction:"row",spacing:1,alignItems:"center",children:[C&&i.jsx(c.Tooltip,{title:`${l("step",{ns:"form"})} ${e?.attributes?.step}`,placement:"left",arrow:!0,children:i.jsx(c.Chip,{color:"primary",size:"small",label:C,sx:Te.stepChip})}),i.jsx(c.Typography,{variant:"subtitle2",sx:Te.title,children:i.jsx("strong",{children:d||P})})]}),j&&i.jsx(c.Chip,{color:"info",size:"small",label:l(`type.${y}`,{ns:"form"})}),w&&i.jsx(c.Chip,{variant:"outlined",color:"warning",size:"small",label:w}),b&&i.jsx(c.Stack,{direction:"row",spacing:.5,children:b&&i.jsx(c.Typography,{variant:"body2",sx:{color:({palette:H})=>H.error.main},children:l("required")})}),i.jsx(c.Stack,{spacing:.5,alignItems:"flex-end",children:I&&i.jsx(c.Typography,{variant:"subtitle2",sx:Te.title,children:i.jsx("strong",{children:d})})}),i.jsxs(c.Stack,{paddingTop:.5,spacing:.5,direction:"row",children:[k&&i.jsx(c.Tooltip,{title:l("isARepeatable"),placement:"bottom",arrow:!0,children:i.jsx(ou,{style:Te.icon})}),m&&i.jsx(c.Tooltip,{title:l("isALeaf"),placement:"bottom",arrow:!0,children:i.jsx(nu,{style:Te.icon})}),T&&i.jsx(c.Tooltip,{title:l("isAHidden"),placement:"bottom",arrow:!0,children:i.jsx(su,{style:Te.icon})}),f&&i.jsx(c.Tooltip,{title:l("isTheRoot"),placement:"bottom",arrow:!0,children:i.jsx(iu,{style:Te.icon})}),_&&i.jsx(c.Tooltip,{title:l("isABranch"),placement:"bottom",arrow:!0,children:i.jsx(Zc,{style:Te.icon})}),S&&i.jsx(c.Tooltip,{title:l("isATree"),placement:"bottom",arrow:!0,children:i.jsx(au,{style:Te.icon})})]})]}),i.jsxs(c.Stack,{direction:"row",justifyContent:"flex-end",spacing:0,alignSelf:"flex-end",children:[!f&&i.jsx(c.Tooltip,{title:l("remove"),arrow:!0,children:i.jsx(c.Button,{variant:"text",sx:Te.actionButton,size:"small",color:"error",onClick:()=>n?.(o),children:i.jsx(tu,{})})}),!I&&i.jsx(c.Tooltip,{title:l("edit"),arrow:!0,children:i.jsx(c.Button,{variant:"text",color:"secondary",sx:Te.actionButton,size:"small",onClick:()=>r?.(o),children:i.jsx(ru,{})})}),!g&&i.jsx(c.Tooltip,{title:l("add"),arrow:!0,children:i.jsx(c.Button,{variant:"text",color:"success",sx:Te.actionButton,size:"small",onClick:()=>t?.(o),children:i.jsx(eu,{})})}),S&&i.jsx(c.Tooltip,{title:l("show"),arrow:!0,children:i.jsx(c.Button,{variant:"text",color:"info",sx:Te.actionButton,size:"small",onClick:()=>a?.(o),children:i.jsx(lu,{})})})]})]})})]})},du=A.memo(uu),Ga=()=>{const{setModalOpen:e,setCurrentHierarchyPointNode:t,setTreeModalOpen:r,setTreePath:n}=xe();return{handleAddChildren:f=>{t(f),e("add")},handleCloseTreeModal:()=>{n([]),r(!1)},handleDeleteChildren:f=>{t(f),e("delete")},handleEditChildren:f=>{t(f),e("edit")},handleOpenTreeModal:f=>{const m={label:f?.data.attributes?.label||"",path:f?.data?.attributes?.treePath||""};n(b=>[...b,m]),r(!0)}}},fu=({nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>{const{handleDeleteChildren:l,handleEditChildren:p,handleAddChildren:f,handleOpenTreeModal:m}=Ga();return i.jsx(du,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o,onAddChildren:f,onOpenTreeModal:m,onDeleteChildren:l,onEditChildren:p})},Ka=({nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o,addChildren:s})=>i.jsx(fu,{addChildren:s,nodeDatum:e,hierarchyPointNode:t,toggleNode:r,onNodeClick:n,onNodeMouseOver:a,onNodeMouseOut:o}),pu=()=>{const{t:e}=ke.useTranslation(["modal","snackMessage"]),{currentHierarchyPointNode:t,modalOpen:r,setModalOpen:n,dispatchTree:a}=xe(),o=r==="edit";return{closeModal:()=>{n(null)},getTitleModalDelete:()=>{const{label:C,name:y}=t?.data?.attributes||{};return e("deleteTitle",{name:C||y,ns:"modal"})},getTitleModalMutation:()=>{const{label:C,name:y}=t?.data?.attributes||{};return o?e(o?"editTitle":"addTitle",{name:C||y,ns:"modal"}):e("addFirstTitle",{ns:"modal"})},handleChangeTree:C=>{try{a(jr(JSON.parse(C)))}catch{return!1}},isDeleteModal:r==="delete",isModalMutationOpen:o||r==="add"}},hu=()=>{const{currentTree:e,setCurrentTree:t,tree:r}=xe(),{name:n,errorName:a,id:o}=e;return{disabled:!!e.id&&!r,errorName:a,handleChangeName:p=>{const{value:f}=p.target;if(!f){t(m=>({...m,errorName:"Champs requis",name:p.target.value}));return}t(m=>({...m,errorName:"",name:p.target.value}))},id:o,name:n}},mu=()=>{const{t:e}=ke.useTranslation("form"),{name:t,handleChangeName:r,errorName:n,disabled:a}=hu();return i.jsx(c.TextField,{required:!0,label:e("treeName",{ns:"form"}),size:"small",onChange:r,value:t,error:!!n,disabled:a})},bu=()=>{const{tree:e,treeModalOpen:t,treePath:r,backendConfig:n}=xe(),{handleCloseTreeModal:a}=Ga(),{getTitleModalMutation:o,closeModal:s,getTitleModalDelete:l,isModalMutationOpen:p,isDeleteModal:f,handleChangeTree:m}=pu(),b=r?.at(-1),g=b?.path,C=b?.label,y=ft(e,g);return i.jsxs(i.Fragment,{children:[i.jsxs(Ac,{children:[i.jsx(Ec,{children:i.jsxs(c.Stack,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[i.jsx(ko,{}),!!n?.baseUrl&&i.jsxs(c.Stack,{direction:"row",alignItems:"center",spacing:2,children:[i.jsx(mu,{}),i.jsx(Wa,{size:"small",arrowOnly:!0,showBtnAddNewTree:!0,fetchWorkflowsOnOpen:!0})]})]})}),i.jsx(Sc,{children:i.jsx(wn,{data:e,renderCustomNodeElement:Ka})}),i.jsx(Oc,{children:i.jsx(Wo,{value:e,onChange:m})}),i.jsx(wc,{children:i.jsx(bc,{value:e})})]}),i.jsx(c.Dialog,{open:p,onClose:s,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",maxWidth:"sm",fullWidth:!0,scroll:"paper",children:i.jsx(Xc,{onClose:s,title:o()})}),i.jsx(gc,{open:f,onClose:s,title:l(),children:i.jsx($c,{onClose:s})}),i.jsx(Cc,{open:t,onClose:a,title:C,children:i.jsx(wn,{data:y,renderCustomNodeElement:Ka})})]})},gu={close:"Close",copyToClipboard:"Copy tree to clipboard",createTree:"Create Tree",downloadJSONFile:"Download JSON File",reset:"Reset",resetTree:"Reset tree",save:"Save",update:"Update"},yu={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"}},xu={activateSearch:"Activate search",add:"Add",advancedConfiguration:"Advanced configuration",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"},vu={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"},Ja={addParentsBeforeIntegrateUrlVariable:"Ajouter des champs parents avant d'intégrer une variable d'URL",addressStructureHint:"Un type d'adresse doit être :",addUrlVariable:"Ajouter une variable d'URL",ancestor:"Ancêtre",ancestorValue:"Récupération de la valeur de : {{ancestorName}}",apiConfigDescription:"Lorsque la recherche ne trouve qu’un seul choix possible, ce choix est directement affiché dans le champ.",apiRoute:"Api route",baseUrl:"URL de base",cardNumber:"Numéro de carte",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.",keyPathObject:"Clé vers la valeur",label:"Label",letter:"Lettre",mapObjectToRender:"Mapper la valeur de l'objet à afficher",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)",optionConfig:"Configuration des options",pattern:"Expression régulière",patternMessage:"Message d'aide invalide",phoneNumber:"Numéro de téléphone",prefillField:"pré-remplir le champ",queryParams:"Query params",receiveValueFromParent:"Pré-remplissage du champ depuis un parent",repeatable:"Répétable",searchKeyPlaceholder:"text",selectStructureHint:"Doit être une valeur existante dans les options de valeurs.",setupApi:"Configurer l'API",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:"Champs API",checkbox:"Case à cocher",date:"Date",dateRange:"Plage de dates",dynamicSelect:"Champs API",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",urlBuilder:"URL Builder",urlConstruction:"Construction de l'URL",URlVariables:"Variables d'URL",useAncestorValueAsParam:"Utiliser une valeur ancêtre",value:"Valeur",valueOfParentIsOfType:"La valeur du parent est de type",values:"Valeurs",variant:"Champ de type : {{variant}}",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 {{}}"}},Qa={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"},Cu={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"}},Tu={activateSearch:"Activer la recherche",add:"Ajouter",advancedConfiguration:"Configuration avancée",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"};kt.use(uo).use(ke.initReactI18next).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:{en:{button:gu,form:Ja,modal:Qa,snackMessage:yu,translation:xu},fr:{button:vu,form:Ja,modal:Qa,snackMessage:Cu,translation:Tu}},returnNull:!1}).then(()=>{document.documentElement.lang!==kt.resolvedLanguage&&kt.resolvedLanguage&&document.documentElement.setAttribute("lang",kt.resolvedLanguage)}),kt.on("languageChanged",e=>{document.documentElement.setAttribute("lang",e)});const wu=({initialTree:e,initialTreeId:t,backendConfig:r})=>(A.useLayoutEffect(()=>{dt.defaults.baseURL=r?.baseUrl,r?.authToken&&(dt.defaults.headers.common.Authorization=`Bearer ${r?.authToken}`)},[r?.authToken,r?.baseUrl]),i.jsx(ut.QueryClientProvider,{client:xo,children:i.jsx(To,{authToken:r?.authToken,children:i.jsx(Bo,{backendConfig:r,initialTree:e,initialTreeId:t,children:i.jsx(yo,{children:i.jsx(c.SnackbarProvider,{children:i.jsx(bu,{})})})})})}));Ce.TreePlusIcon=yn,Ce.Treege=wu,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})});
|