Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Update react code

Roland Geider87b3842a5446
diff --git a/wger/core/static/react/locales/de/translation.json b/wger/core/static/react/locales/de/translation.json
index aa4ebf524..c21eb5c4f 100644
--- a/wger/core/static/react/locales/de/translation.json
+++ b/wger/core/static/react/locales/de/translation.json
@@ -171,14 +171,14 @@
"maxLengthRoutine": "Die Routine darf maximal {{number}} Wochen lang sein",
"resultingRoutine": "Resultierende Routine",
"deleteDayConfirmation": "Dies löscht alle Sets, Übungen und Fortschrittsregeln",
- "fitDaysInWeek": "Ruhetage in der Woche",
+ "fitDaysInWeek": "Tage in die Woche einpassen",
"defaultRounding": "Standardroutine",
"rounding": "Rundung (diese Übung)",
"weightLogNotPlanned": "Speichere Log an einem Tag ohne geplantes Workout.",
"alsoShowLogs": "Zeige auch Logeinträge",
"confirmRestDay": "Änderung des Ruhetags bestätigen",
"confirmRestDayHelpText": "Bitte beachten Sie, dass alle Sätze und Übungen entfernt werden, wenn Sie einen Tag als Ruhetag markieren.",
- "duplicate": "Doppelte Routine",
+ "duplicate": "Routine duplizieren",
"downloadPdfTable": "Download PDF (Tabelle)",
"downloadPdfLogs": "Download PDF (Logs)",
"downloadIcal": "Download iCal Datei",
diff --git a/wger/core/static/react/locales/en/translation.json b/wger/core/static/react/locales/en/translation.json
index b24e50eef..5f37a62f6 100644
--- a/wger/core/static/react/locales/en/translation.json
+++ b/wger/core/static/react/locales/en/translation.json
@@ -44,6 +44,8 @@
"alsoSearchEnglish": "Also search for names in English",
"copyToClipboard": "Copy to clipboard",
"filters": "Filters",
+ "private": "Private",
+ "public": "Public",
"exercises": {
"replacements": "Replacements",
"replacementsInfoText": "Optionally, you can also select an exercise that should replace this one (e.g. because it was submitted twice, or similar). This will replace the exercise in routines as well as training logs, instead of just deleting it. These changes will also propagate to any instance that syncs the exercises from this one.",
diff --git a/wger/core/static/react/locales/es/translation.json b/wger/core/static/react/locales/es/translation.json
index baec1db5d..d1e2ed3e5 100644
--- a/wger/core/static/react/locales/es/translation.json
+++ b/wger/core/static/react/locales/es/translation.json
@@ -167,7 +167,7 @@
"addSuperset": "Añadir superset",
"addExercise": "Añadir ejercicio",
"exerciseNr": "Ejercicio {{number}}",
- "supersetNr": "",
+ "supersetNr": "Superserie {{number}}",
"editProgression": "Editar progreso",
"progressionNeedsReplace": "Una de las entradas anteriores debe tener ser reemplazada",
"exerciseHasProgression": "Este ejercicio tiene reglas de progresión y no se puede editar aquí. Para hacerlo, haga clic en el botón.",
@@ -197,8 +197,8 @@
"publicTemplates": "Plantillas públicas",
"set": {
"dropSet": "Borrar conjunto",
- "myo": "",
- "tut": "",
+ "myo": "Técnica MYO",
+ "tut": "Trabajo bajo tensión",
"normalSet": "Conjunto normal",
"partial": "Parcial",
"forced": "Forzado",
@@ -320,10 +320,10 @@
"result": "Su IMC es {{value}}"
},
"editName": "Editar {{name}}",
- "start": "Inicio",
+ "start": "Comenzar",
"end": "Fin",
"comment": "Comentar",
- "min": "Min",
+ "min": "Mínimo",
"max": "Máximo",
"durationWeeks": "{{number}} semanas",
"durationWeeksDays": "{{nrWeeks}} semanas, {{nrDays}} días",
diff --git a/wger/core/static/react/locales/it/translation.json b/wger/core/static/react/locales/it/translation.json
index 4d5f5ddf6..78a85a147 100644
--- a/wger/core/static/react/locales/it/translation.json
+++ b/wger/core/static/react/locales/it/translation.json
@@ -173,7 +173,8 @@
"gramShort": "g",
"searchIngredientName": "Cerca per nome dell'ingrediente",
"sodium": "Sodio",
- "pseudoMealTitle": "Altri registri"
+ "pseudoMealTitle": "Altri registri",
+ "goalFiber": "Obiettivo fibre"
},
"images": "Immagini",
"downloadAsPdf": "Scarica come PDF",
@@ -192,7 +193,10 @@
"maxLength": "Per favore inserisci meno di {{chars}} caratteri",
"maxValue": "Il valore di questo campo deve essere minore di {{value}}",
"minValue": "Il valore di questo campo deve essere maggiore di {{value}}",
- "enterNumber": "Inserisci un numero valido"
+ "enterNumber": "Inserisci un numero valido",
+ "enterInteger": "Inserisci un numero intero",
+ "maxLessThanMin": "Il valore massimo deve essere più grande del minimo",
+ "endBeforeStart": "Il valore finale non può precedere quello iniziale"
},
"goBack": "Indietro",
"licenses": {
@@ -254,8 +258,42 @@
"type": "Tipo",
"normalSet": "Set normale",
"dropSet": "Set di rilascio",
- "partial": "Parziale"
- }
+ "partial": "Parziale",
+ "myo": "Serie MYO",
+ "forced": "Forzato",
+ "tut": "Tempo sotto tensione",
+ "iso": "Isometrico",
+ "jump": "Salto"
+ },
+ "sets": "Serie",
+ "reps": "Ripetizioni",
+ "volume": "Volume",
+ "intensity": "Intensità",
+ "currentRoutine": "Programma attuale",
+ "workoutNr": "Allenamento Nr. {{number}}",
+ "weekNr": "Settimana {{number}}",
+ "backToRoutine": "Torna al programma",
+ "minLengthRoutine": "Il programma deve durare almeno {{number}} settimane",
+ "maxLengthRoutine": "Il programma può durare massimo {{number}} settimane",
+ "addSuperset": "Aggiungi serie combinata",
+ "addExercise": "Aggiungi esercizio",
+ "exerciseNr": "Esercizio {{number}}",
+ "supersetNr": "Serie combinata {{number}}",
+ "editProgression": "Modifica avanzamento",
+ "progressionNeedsReplace": "Una delle voci precedenti deve avere un'operazione di sostituzione",
+ "exerciseHasProgression": "Questo esercizio ha regole di progressione e non può essere modificato qui. Per farlo, clicca il bottone.",
+ "defaultRounding": "Arrotondamento predefinito",
+ "rounding": "Arrotondamento (per questo esercizio)",
+ "roundingHelp": "Imposta l'arrotondamento predefinito per peso e ripetizioni (particolarmente utile quando si utilizza l’aumento percentuale nella progressione). Verrà applicato a tutte le nuove serie, ma potrà essere modificato singolarmente nel modulo della progressione. Lascia vuoto per disattivare l'arrotondamento.",
+ "newDay": "Nuovo giorno",
+ "weightLogNotPlanned": "Salvataggio dei log in una data senza allenamenti programmati.",
+ "logsOverview": "Panoramica dei log",
+ "alsoShowLogs": "Mostra anche logs",
+ "statsOverview": "Statistiche",
+ "step": "Fase",
+ "repeat": "Impostazione di ripetizione",
+ "markAsTemplate": "Gestisci template",
+ "resultingRoutine": "Risultato routine"
},
"measurements": {
"deleteInfo": "Ciò eliminerà la categoria e tutte le sue voci",
@@ -279,13 +317,20 @@
"start": "Inizia",
"end": "Fine",
"editName": "Modifica {{name}}",
- "comment": "Comment",
+ "comment": "Commento",
"filters": "Filtri",
"bmi": {
"calculator": "Calcolatore Bmi",
"overweight": "Overweight",
"obese": "Obeso",
"normal": "Peso normale",
- "underweight": "Sottopeso"
- }
+ "underweight": "Sottopeso",
+ "result": "Il tuo BMI è {{value}}"
+ },
+ "min": "Min",
+ "max": "Max",
+ "durationWeeks": "{{number}} settimane",
+ "durationWeeksDays": "{{nrWeeks}} settimane, {{nrDays}} giorni",
+ "undo": "Annulla",
+ "successfullyDeleted": "Eliminato con successo"
}
diff --git a/wger/core/static/react/locales/pl/translation.json b/wger/core/static/react/locales/pl/translation.json
index 3451d949e..898a6d08a 100644
--- a/wger/core/static/react/locales/pl/translation.json
+++ b/wger/core/static/react/locales/pl/translation.json
@@ -56,7 +56,8 @@
"imageStyleLine": "Linia",
"imageStyleLowPoly": "Low-Poly",
"imageStyleOther": "Inne",
- "replacementsInfoText": "Opcjonalnie, możesz również wybrać ćwiczenie, które ma zamienić obecne (np. ponieważ zostało przesłane podwójnie lub w podobnych sytuacjach). Sprawi to, że zamiast usuwania nieaktualnego ćwiczenia, w jego miejsce, zarówno w planach jak i w dzienniku treningowym. Te zmiany wpłyną również na każdą instancję, która synchronizuje zamieniane ćwiczenia z tej instancji."
+ "replacementsInfoText": "Opcjonalnie, możesz również wybrać ćwiczenie, które ma zamienić obecne (np. ponieważ zostało przesłane podwójnie lub w podobnych sytuacjach). Sprawi to, że zamiast usuwania nieaktualnego ćwiczenia, w jego miejsce, zarówno w planach jak i w dzienniku treningowym. Te zmiany wpłyną również na każdą instancję, która synchronizuje zamieniane ćwiczenia z tej instancji.",
+ "swapExercise": "Zamień ćwiczenie"
},
"noResults": "Brak wyników",
"noResultsDescription": "Nie znaleziono wyników dla tego zapytania, rozważ zmniejszenie liczby filtrów.",
@@ -122,7 +123,10 @@
"minLength": "Wprowadź więcej niż {{chars}} znaków",
"maxLength": "Wprowadź mniej niż {{chars}} znaków",
"maxValue": "Wartość w tym polu nie może być mniejsza niż {{value}}",
- "minValue": "Wartość w tym polu nie może być większa niż {{value}}"
+ "minValue": "Wartość w tym polu nie może być większa niż {{value}}",
+ "enterNumber": "Proszę wprowadzić poprawny numer",
+ "enterInteger": "Wprowadź liczbę całkowitą",
+ "maxLessThanMin": "Wartość maksymalna musi być większa niż minimalna"
},
"category": "Kategoria",
"English": "Angielski",
@@ -251,5 +255,7 @@
"successfullyDeleted": "Usunięto",
"editName": "Edytować {{name}}",
"min": "Min",
- "max": "Max"
+ "max": "Max",
+ "start": "Uruchom",
+ "end": "Koniec"
}
diff --git a/wger/core/static/react/main.js b/wger/core/static/react/main.js
index 9c545d9fb..457f2a29d 100644
--- a/wger/core/static/react/main.js
+++ b/wger/core/static/react/main.js
@@ -1,4 +1,4 @@
-var vye=Object.defineProperty;var T3=e=>{throw TypeError(e)};var bye=(e,t,n)=>t in e?vye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ce=(e,t,n)=>bye(e,typeof t!="symbol"?t+"":t,n),cR=(e,t,n)=>t.has(e)||T3("Cannot "+n);var be=(e,t,n)=>(cR(e,t,"read from private field"),n?n.call(e):t.get(e)),Yt=(e,t,n)=>t.has(e)?T3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_t=(e,t,n,r)=>(cR(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),An=(e,t,n)=>(cR(e,t,"access private method"),n);var d1=(e,t,n,r)=>({set _(o){_t(e,t,o,n)},get _(){return be(e,t,r)}});function xye(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var f1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uR={exports:{}},Gb={};/**
+var xye=Object.defineProperty;var T3=e=>{throw TypeError(e)};var Sye=(e,t,n)=>t in e?xye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ce=(e,t,n)=>Sye(e,typeof t!="symbol"?t+"":t,n),uR=(e,t,n)=>t.has(e)||T3("Cannot "+n);var be=(e,t,n)=>(uR(e,t,"read from private field"),n?n.call(e):t.get(e)),Qt=(e,t,n)=>t.has(e)?T3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_t=(e,t,n,r)=>(uR(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),An=(e,t,n)=>(uR(e,t,"access private method"),n);var f1=(e,t,n,r)=>({set _(o){_t(e,t,o,n)},get _(){return be(e,t,r)}});function wye(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var p1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dR={exports:{}},Gb={};/**
* @license React
* react-jsx-runtime.production.js
*
@@ -6,7 +6,7 @@ var vye=Object.defineProperty;var T3=e=>{throw TypeError(e)};var bye=(e,t,n)=>t
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var O3;function Sye(){if(O3)return Gb;O3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Gb.Fragment=t,Gb.jsx=n,Gb.jsxs=n,Gb}var I3;function wye(){return I3||(I3=1,uR.exports=Sye()),uR.exports}var k=wye(),dR={exports:{}},En={};/**
+ */var O3;function Cye(){if(O3)return Gb;O3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Gb.Fragment=t,Gb.jsx=n,Gb.jsxs=n,Gb}var I3;function Eye(){return I3||(I3=1,dR.exports=Cye()),dR.exports}var k=Eye(),fR={exports:{}},En={};/**
* @license React
* react.production.js
*
@@ -14,14 +14,14 @@ var vye=Object.defineProperty;var T3=e=>{throw TypeError(e)};var bye=(e,t,n)=>t
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var P3;function Cye(){if(P3)return En;P3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.iterator;function h(G){return G===null||typeof G!="object"?null:(G=f&&G[f]||G["@@iterator"],typeof G=="function"?G:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(G,q,Y){this.props=G,this.context=q,this.refs=y,this.updater=Y||m}v.prototype.isReactComponent={},v.prototype.setState=function(G,q){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,q,"setState")},v.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function w(){}w.prototype=v.prototype;function C(G,q,Y){this.props=G,this.context=q,this.refs=y,this.updater=Y||m}var E=C.prototype=new w;E.constructor=C,g(E,v.prototype),E.isPureReactComponent=!0;var I=Array.isArray,O={H:null,A:null,T:null,S:null,V:null},P=Object.prototype.hasOwnProperty;function R(G,q,Y,Z,ie,se){return Y=se.ref,{$$typeof:e,type:G,key:q,ref:Y!==void 0?Y:null,props:se}}function D(G,q){return R(G.type,q,void 0,void 0,void 0,G.props)}function M(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function A(G){var q={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(Y){return q[Y]})}var _=/\/+/g;function N(G,q){return typeof G=="object"&&G!==null&&G.key!=null?A(""+G.key):q.toString(36)}function B(){}function H(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(B,B):(G.status="pending",G.then(function(q){G.status==="pending"&&(G.status="fulfilled",G.value=q)},function(q){G.status==="pending"&&(G.status="rejected",G.reason=q)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function j(G,q,Y,Z,ie){var se=typeof G;(se==="undefined"||se==="boolean")&&(G=null);var ce=!1;if(G===null)ce=!0;else switch(se){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(G.$$typeof){case e:case t:ce=!0;break;case u:return ce=G._init,j(ce(G._payload),q,Y,Z,ie)}}if(ce)return ie=ie(G),ce=Z===""?"."+N(G,0):Z,I(ie)?(Y="",ce!=null&&(Y=ce.replace(_,"$&/")+"/"),j(ie,q,Y,"",function(ne){return ne})):ie!=null&&(M(ie)&&(ie=D(ie,Y+(ie.key==null||G&&G.key===ie.key?"":(""+ie.key).replace(_,"$&/")+"/")+ce)),q.push(ie)),1;ce=0;var ye=Z===""?".":Z+":";if(I(G))for(var Se=0;Se<G.length;Se++)Z=G[Se],se=ye+N(Z,Se),ce+=j(Z,q,Y,se,ie);else if(Se=h(G),typeof Se=="function")for(G=Se.call(G),Se=0;!(Z=G.next()).done;)Z=Z.value,se=ye+N(Z,Se++),ce+=j(Z,q,Y,se,ie);else if(se==="object"){if(typeof G.then=="function")return j(H(G),q,Y,Z,ie);throw q=String(G),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ce}function L(G,q,Y){if(G==null)return G;var Z=[],ie=0;return j(G,Z,"","",function(se){return q.call(Y,se,ie++)}),Z}function V(G){if(G._status===-1){var q=G._result;q=q(),q.then(function(Y){(G._status===0||G._status===-1)&&(G._status=1,G._result=Y)},function(Y){(G._status===0||G._status===-1)&&(G._status=2,G._result=Y)}),G._status===-1&&(G._status=0,G._result=q)}if(G._status===1)return G._result.default;throw G._result}var W=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)};function K(){}return En.Children={map:L,forEach:function(G,q,Y){L(G,function(){q.apply(this,arguments)},Y)},count:function(G){var q=0;return L(G,function(){q++}),q},toArray:function(G){return L(G,function(q){return q})||[]},only:function(G){if(!M(G))throw Error("React.Children.only expected to receive a single React element child.");return G}},En.Component=v,En.Fragment=n,En.Profiler=o,En.PureComponent=C,En.StrictMode=r,En.Suspense=l,En.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,En.__COMPILER_RUNTIME={__proto__:null,c:function(G){return O.H.useMemoCache(G)}},En.cache=function(G){return function(){return G.apply(null,arguments)}},En.cloneElement=function(G,q,Y){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var Z=g({},G.props),ie=G.key,se=void 0;if(q!=null)for(ce in q.ref!==void 0&&(se=void 0),q.key!==void 0&&(ie=""+q.key),q)!P.call(q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&q.ref===void 0||(Z[ce]=q[ce]);var ce=arguments.length-2;if(ce===1)Z.children=Y;else if(1<ce){for(var ye=Array(ce),Se=0;Se<ce;Se++)ye[Se]=arguments[Se+2];Z.children=ye}return R(G.type,ie,void 0,void 0,se,Z)},En.createContext=function(G){return G={$$typeof:a,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:i,_context:G},G},En.createElement=function(G,q,Y){var Z,ie={},se=null;if(q!=null)for(Z in q.key!==void 0&&(se=""+q.key),q)P.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ie[Z]=q[Z]);var ce=arguments.length-2;if(ce===1)ie.children=Y;else if(1<ce){for(var ye=Array(ce),Se=0;Se<ce;Se++)ye[Se]=arguments[Se+2];ie.children=ye}if(G&&G.defaultProps)for(Z in ce=G.defaultProps,ce)ie[Z]===void 0&&(ie[Z]=ce[Z]);return R(G,se,void 0,void 0,null,ie)},En.createRef=function(){return{current:null}},En.forwardRef=function(G){return{$$typeof:s,render:G}},En.isValidElement=M,En.lazy=function(G){return{$$typeof:u,_payload:{_status:-1,_result:G},_init:V}},En.memo=function(G,q){return{$$typeof:c,type:G,compare:q===void 0?null:q}},En.startTransition=function(G){var q=O.T,Y={};O.T=Y;try{var Z=G(),ie=O.S;ie!==null&&ie(Y,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(K,W)}catch(se){W(se)}finally{O.T=q}},En.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},En.use=function(G){return O.H.use(G)},En.useActionState=function(G,q,Y){return O.H.useActionState(G,q,Y)},En.useCallback=function(G,q){return O.H.useCallback(G,q)},En.useContext=function(G){return O.H.useContext(G)},En.useDebugValue=function(){},En.useDeferredValue=function(G,q){return O.H.useDeferredValue(G,q)},En.useEffect=function(G,q,Y){var Z=O.H;if(typeof Y=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Z.useEffect(G,q)},En.useId=function(){return O.H.useId()},En.useImperativeHandle=function(G,q,Y){return O.H.useImperativeHandle(G,q,Y)},En.useInsertionEffect=function(G,q){return O.H.useInsertionEffect(G,q)},En.useLayoutEffect=function(G,q){return O.H.useLayoutEffect(G,q)},En.useMemo=function(G,q){return O.H.useMemo(G,q)},En.useOptimistic=function(G,q){return O.H.useOptimistic(G,q)},En.useReducer=function(G,q,Y){return O.H.useReducer(G,q,Y)},En.useRef=function(G){return O.H.useRef(G)},En.useState=function(G){return O.H.useState(G)},En.useSyncExternalStore=function(G,q,Y){return O.H.useSyncExternalStore(G,q,Y)},En.useTransition=function(){return O.H.useTransition()},En.version="19.1.0",En}var A3;function GS(){return A3||(A3=1,dR.exports=Cye()),dR.exports}var x=GS();const J=Gn(x),FE=xye({__proto__:null,default:J},[x]);function Eye(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 Tye(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 Oye=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Tye(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Eye(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Mi="-ms-",jE="-moz-",ir="-webkit-",Hee="comm",wj="rule",Cj="decl",Iye="@import",Uee="@keyframes",Pye="@layer",Aye=Math.abs,zO=String.fromCharCode,Mye=Object.assign;function Rye(e,t){return vi(e,0)^45?(((t<<2^vi(e,0))<<2^vi(e,1))<<2^vi(e,2))<<2^vi(e,3):0}function Gee(e){return e.trim()}function Dye(e,t){return(e=t.exec(e))?e[0]:e}function ar(e,t,n){return e.replace(t,n)}function q$(e,t){return e.indexOf(t)}function vi(e,t){return e.charCodeAt(t)|0}function vx(e,t,n){return e.slice(t,n)}function gc(e){return e.length}function Ej(e){return e.length}function p1(e,t){return t.push(e),e}function kye(e,t){return e.map(t).join("")}var VO=1,ry=1,qee=0,Pa=0,Mo=0,tv="";function HO(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:VO,column:ry,length:a,return:""}}function qb(e,t){return Mye(HO("",null,null,"",null,null,0),e,{length:-e.length},t)}function _ye(){return Mo}function $ye(){return Mo=Pa>0?vi(tv,--Pa):0,ry--,Mo===10&&(ry=1,VO--),Mo}function Ya(){return Mo=Pa<qee?vi(tv,Pa++):0,ry++,Mo===10&&(ry=1,VO++),Mo}function Ec(){return vi(tv,Pa)}function lE(){return Pa}function qS(e,t){return vx(tv,e,t)}function bx(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 Wee(e){return VO=ry=1,qee=gc(tv=e),Pa=0,[]}function Kee(e){return tv="",e}function cE(e){return Gee(qS(Pa-1,W$(e===91?e+2:e===40?e+1:e)))}function Nye(e){for(;(Mo=Ec())&&Mo<33;)Ya();return bx(e)>2||bx(Mo)>3?"":" "}function Lye(e,t){for(;--t&&Ya()&&!(Mo<48||Mo>102||Mo>57&&Mo<65||Mo>70&&Mo<97););return qS(e,lE()+(t<6&&Ec()==32&&Ya()==32))}function W$(e){for(;Ya();)switch(Mo){case e:return Pa;case 34:case 39:e!==34&&e!==39&&W$(Mo);break;case 40:e===41&&W$(e);break;case 92:Ya();break}return Pa}function Fye(e,t){for(;Ya()&&e+Mo!==57;)if(e+Mo===84&&Ec()===47)break;return"/*"+qS(t,Pa-1)+"*"+zO(e===47?e:Ya())}function jye(e){for(;!bx(Ec());)Ya();return qS(e,Pa)}function Bye(e){return Kee(uE("",null,null,null,[""],e=Wee(e),0,[0],e))}function uE(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,f=a,h=0,m=0,g=0,y=1,v=1,w=1,C=0,E="",I=o,O=i,P=r,R=E;v;)switch(g=C,C=Ya()){case 40:if(g!=108&&vi(R,f-1)==58){q$(R+=ar(cE(C),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:R+=cE(C);break;case 9:case 10:case 13:case 32:R+=Nye(g);break;case 92:R+=Lye(lE()-1,7);continue;case 47:switch(Ec()){case 42:case 47:p1(zye(Fye(Ya(),lE()),t,n),l);break;default:R+="/"}break;case 123*y:s[c++]=gc(R)*w;case 125*y:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+u:w==-1&&(R=ar(R,/\f/g,"")),m>0&&gc(R)-f&&p1(m>32?R3(R+";",r,n,f-1):R3(ar(R," ","")+";",r,n,f-2),l);break;case 59:R+=";";default:if(p1(P=M3(R,t,n,c,u,o,s,E,I=[],O=[],f),i),C===123)if(u===0)uE(R,t,P,P,I,i,f,s,O);else switch(h===99&&vi(R,3)===110?100:h){case 100:case 108:case 109:case 115:uE(e,P,P,r&&p1(M3(e,P,P,0,0,o,s,E,o,I=[],f),O),o,O,f,s,r?I:O);break;default:uE(R,P,P,P,[""],O,0,s,O)}}c=u=m=0,y=w=1,E=R="",f=a;break;case 58:f=1+gc(R),m=g;default:if(y<1){if(C==123)--y;else if(C==125&&y++==0&&$ye()==125)continue}switch(R+=zO(C),C*y){case 38:w=u>0?1:(R+="\f",-1);break;case 44:s[c++]=(gc(R)-1)*w,w=1;break;case 64:Ec()===45&&(R+=cE(Ya())),h=Ec(),u=f=gc(E=R+=jye(lE())),C++;break;case 45:g===45&&gc(R)==2&&(y=0)}}return i}function M3(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,h=o===0?i:[""],m=Ej(h),g=0,y=0,v=0;g<r;++g)for(var w=0,C=vx(e,f+1,f=Aye(y=a[g])),E=e;w<m;++w)(E=Gee(y>0?h[w]+" "+C:ar(C,/&\f/g,h[w])))&&(l[v++]=E);return HO(e,t,n,o===0?wj:s,l,c,u)}function zye(e,t,n){return HO(e,t,n,Hee,zO(_ye()),vx(e,2,-2),0)}function R3(e,t,n,r){return HO(e,t,n,Cj,vx(e,0,r),vx(e,r+1,-1),r)}function Ag(e,t){for(var n="",r=Ej(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Vye(e,t,n,r){switch(e.type){case Pye:if(e.children.length)break;case Iye:case Cj:return e.return=e.return||e.value;case Hee:return"";case Uee:return e.return=e.value+"{"+Ag(e.children,r)+"}";case wj:e.value=e.props.join(",")}return gc(n=Ag(e.children,r))?e.return=e.value+"{"+n+"}":""}function Hye(e){var t=Ej(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Uye(e){return function(t){t.root||(t=t.return)&&e(t)}}function Yee(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Gye=function(t,n,r){for(var o=0,i=0;o=i,i=Ec(),o===38&&i===12&&(n[r]=1),!bx(i);)Ya();return qS(t,Pa)},qye=function(t,n){var r=-1,o=44;do switch(bx(o)){case 0:o===38&&Ec()===12&&(n[r]=1),t[r]+=Gye(Pa-1,n,r);break;case 2:t[r]+=cE(o);break;case 4:if(o===44){t[++r]=Ec()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=zO(o)}while(o=Ya());return t},Wye=function(t,n){return Kee(qye(Wee(t),n))},D3=new WeakMap,Kye=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!D3.get(r))&&!o){D3.set(t,!0);for(var i=[],a=Wye(n,i),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=i[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},Yye=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Qee(e,t){switch(Rye(e,t)){case 5103:return ir+"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 ir+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ir+e+jE+e+Mi+e+e;case 6828:case 4268:return ir+e+Mi+e+e;case 6165:return ir+e+Mi+"flex-"+e+e;case 5187:return ir+e+ar(e,/(\w+).+(:[^]+)/,ir+"box-$1$2"+Mi+"flex-$1$2")+e;case 5443:return ir+e+Mi+"flex-item-"+ar(e,/flex-|-self/,"")+e;case 4675:return ir+e+Mi+"flex-line-pack"+ar(e,/align-content|flex-|-self/,"")+e;case 5548:return ir+e+Mi+ar(e,"shrink","negative")+e;case 5292:return ir+e+Mi+ar(e,"basis","preferred-size")+e;case 6060:return ir+"box-"+ar(e,"-grow","")+ir+e+Mi+ar(e,"grow","positive")+e;case 4554:return ir+ar(e,/([^-])(transform)/g,"$1"+ir+"$2")+e;case 6187:return ar(ar(ar(e,/(zoom-|grab)/,ir+"$1"),/(image-set)/,ir+"$1"),e,"")+e;case 5495:case 3959:return ar(e,/(image-set\([^]*)/,ir+"$1$`$1");case 4968:return ar(ar(e,/(.+:)(flex-)?(.*)/,ir+"box-pack:$3"+Mi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ir+e+e;case 4095:case 3583:case 4068:case 2532:return ar(e,/(.+)-inline(.+)/,ir+"$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(gc(e)-1-t>6)switch(vi(e,t+1)){case 109:if(vi(e,t+4)!==45)break;case 102:return ar(e,/(.+:)(.+)-([^]+)/,"$1"+ir+"$2-$3$1"+jE+(vi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~q$(e,"stretch")?Qee(ar(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(vi(e,t+1)!==115)break;case 6444:switch(vi(e,gc(e)-3-(~q$(e,"!important")&&10))){case 107:return ar(e,":",":"+ir)+e;case 101:return ar(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ir+(vi(e,14)===45?"inline-":"")+"box$3$1"+ir+"$2$3$1"+Mi+"$2box$3")+e}break;case 5936:switch(vi(e,t+11)){case 114:return ir+e+Mi+ar(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ir+e+Mi+ar(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ir+e+Mi+ar(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ir+e+Mi+e+e}return e}var Qye=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Cj:t.return=Qee(t.value,t.length);break;case Uee:return Ag([qb(t,{value:ar(t.value,"@","@"+ir)})],o);case wj:if(t.length)return kye(t.props,function(i){switch(Dye(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ag([qb(t,{props:[ar(i,/:(read-\w+)/,":"+jE+"$1")]})],o);case"::placeholder":return Ag([qb(t,{props:[ar(i,/:(plac\w+)/,":"+ir+"input-$1")]}),qb(t,{props:[ar(i,/:(plac\w+)/,":"+jE+"$1")]}),qb(t,{props:[ar(i,/:(plac\w+)/,Mi+"input-$1")]})],o)}return""})}},Xye=[Qye],Xee=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||Xye,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),w=1;w<v.length;w++)i[v[w]]=!0;s.push(y)});var l,c=[Kye,Yye];{var u,f=[Vye,Uye(function(y){u.insert(y)})],h=Hye(c.concat(o,f)),m=function(v){return Ag(Bye(v),h)};l=function(v,w,C,E){u=C,m(v?v+"{"+w.styles+"}":w.styles),E&&(g.inserted[w.name]=!0)}}var g={key:n,sheet:new Oye({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return g.sheet.hydrate(s),g};function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(null,arguments)}var fR={exports:{}},lr={};/** @license React v16.13.1
+ */var P3;function Tye(){if(P3)return En;P3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.iterator;function p(G){return G===null||typeof G!="object"?null:(G=f&&G[f]||G["@@iterator"],typeof G=="function"?G:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(G,q,Y){this.props=G,this.context=q,this.refs=y,this.updater=Y||m}v.prototype.isReactComponent={},v.prototype.setState=function(G,q){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,q,"setState")},v.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function w(){}w.prototype=v.prototype;function C(G,q,Y){this.props=G,this.context=q,this.refs=y,this.updater=Y||m}var E=C.prototype=new w;E.constructor=C,g(E,v.prototype),E.isPureReactComponent=!0;var I=Array.isArray,O={H:null,A:null,T:null,S:null,V:null},P=Object.prototype.hasOwnProperty;function R(G,q,Y,Z,ie,se){return Y=se.ref,{$$typeof:e,type:G,key:q,ref:Y!==void 0?Y:null,props:se}}function D(G,q){return R(G.type,q,void 0,void 0,void 0,G.props)}function M(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function A(G){var q={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(Y){return q[Y]})}var _=/\/+/g;function N(G,q){return typeof G=="object"&&G!==null&&G.key!=null?A(""+G.key):q.toString(36)}function B(){}function H(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(B,B):(G.status="pending",G.then(function(q){G.status==="pending"&&(G.status="fulfilled",G.value=q)},function(q){G.status==="pending"&&(G.status="rejected",G.reason=q)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function j(G,q,Y,Z,ie){var se=typeof G;(se==="undefined"||se==="boolean")&&(G=null);var ce=!1;if(G===null)ce=!0;else switch(se){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(G.$$typeof){case e:case t:ce=!0;break;case u:return ce=G._init,j(ce(G._payload),q,Y,Z,ie)}}if(ce)return ie=ie(G),ce=Z===""?"."+N(G,0):Z,I(ie)?(Y="",ce!=null&&(Y=ce.replace(_,"$&/")+"/"),j(ie,q,Y,"",function(ne){return ne})):ie!=null&&(M(ie)&&(ie=D(ie,Y+(ie.key==null||G&&G.key===ie.key?"":(""+ie.key).replace(_,"$&/")+"/")+ce)),q.push(ie)),1;ce=0;var ye=Z===""?".":Z+":";if(I(G))for(var Se=0;Se<G.length;Se++)Z=G[Se],se=ye+N(Z,Se),ce+=j(Z,q,Y,se,ie);else if(Se=p(G),typeof Se=="function")for(G=Se.call(G),Se=0;!(Z=G.next()).done;)Z=Z.value,se=ye+N(Z,Se++),ce+=j(Z,q,Y,se,ie);else if(se==="object"){if(typeof G.then=="function")return j(H(G),q,Y,Z,ie);throw q=String(G),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ce}function L(G,q,Y){if(G==null)return G;var Z=[],ie=0;return j(G,Z,"","",function(se){return q.call(Y,se,ie++)}),Z}function V(G){if(G._status===-1){var q=G._result;q=q(),q.then(function(Y){(G._status===0||G._status===-1)&&(G._status=1,G._result=Y)},function(Y){(G._status===0||G._status===-1)&&(G._status=2,G._result=Y)}),G._status===-1&&(G._status=0,G._result=q)}if(G._status===1)return G._result.default;throw G._result}var W=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)};function K(){}return En.Children={map:L,forEach:function(G,q,Y){L(G,function(){q.apply(this,arguments)},Y)},count:function(G){var q=0;return L(G,function(){q++}),q},toArray:function(G){return L(G,function(q){return q})||[]},only:function(G){if(!M(G))throw Error("React.Children.only expected to receive a single React element child.");return G}},En.Component=v,En.Fragment=n,En.Profiler=o,En.PureComponent=C,En.StrictMode=r,En.Suspense=l,En.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,En.__COMPILER_RUNTIME={__proto__:null,c:function(G){return O.H.useMemoCache(G)}},En.cache=function(G){return function(){return G.apply(null,arguments)}},En.cloneElement=function(G,q,Y){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var Z=g({},G.props),ie=G.key,se=void 0;if(q!=null)for(ce in q.ref!==void 0&&(se=void 0),q.key!==void 0&&(ie=""+q.key),q)!P.call(q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&q.ref===void 0||(Z[ce]=q[ce]);var ce=arguments.length-2;if(ce===1)Z.children=Y;else if(1<ce){for(var ye=Array(ce),Se=0;Se<ce;Se++)ye[Se]=arguments[Se+2];Z.children=ye}return R(G.type,ie,void 0,void 0,se,Z)},En.createContext=function(G){return G={$$typeof:a,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:i,_context:G},G},En.createElement=function(G,q,Y){var Z,ie={},se=null;if(q!=null)for(Z in q.key!==void 0&&(se=""+q.key),q)P.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ie[Z]=q[Z]);var ce=arguments.length-2;if(ce===1)ie.children=Y;else if(1<ce){for(var ye=Array(ce),Se=0;Se<ce;Se++)ye[Se]=arguments[Se+2];ie.children=ye}if(G&&G.defaultProps)for(Z in ce=G.defaultProps,ce)ie[Z]===void 0&&(ie[Z]=ce[Z]);return R(G,se,void 0,void 0,null,ie)},En.createRef=function(){return{current:null}},En.forwardRef=function(G){return{$$typeof:s,render:G}},En.isValidElement=M,En.lazy=function(G){return{$$typeof:u,_payload:{_status:-1,_result:G},_init:V}},En.memo=function(G,q){return{$$typeof:c,type:G,compare:q===void 0?null:q}},En.startTransition=function(G){var q=O.T,Y={};O.T=Y;try{var Z=G(),ie=O.S;ie!==null&&ie(Y,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(K,W)}catch(se){W(se)}finally{O.T=q}},En.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},En.use=function(G){return O.H.use(G)},En.useActionState=function(G,q,Y){return O.H.useActionState(G,q,Y)},En.useCallback=function(G,q){return O.H.useCallback(G,q)},En.useContext=function(G){return O.H.useContext(G)},En.useDebugValue=function(){},En.useDeferredValue=function(G,q){return O.H.useDeferredValue(G,q)},En.useEffect=function(G,q,Y){var Z=O.H;if(typeof Y=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Z.useEffect(G,q)},En.useId=function(){return O.H.useId()},En.useImperativeHandle=function(G,q,Y){return O.H.useImperativeHandle(G,q,Y)},En.useInsertionEffect=function(G,q){return O.H.useInsertionEffect(G,q)},En.useLayoutEffect=function(G,q){return O.H.useLayoutEffect(G,q)},En.useMemo=function(G,q){return O.H.useMemo(G,q)},En.useOptimistic=function(G,q){return O.H.useOptimistic(G,q)},En.useReducer=function(G,q,Y){return O.H.useReducer(G,q,Y)},En.useRef=function(G){return O.H.useRef(G)},En.useState=function(G){return O.H.useState(G)},En.useSyncExternalStore=function(G,q,Y){return O.H.useSyncExternalStore(G,q,Y)},En.useTransition=function(){return O.H.useTransition()},En.version="19.1.0",En}var A3;function GS(){return A3||(A3=1,fR.exports=Tye()),fR.exports}var x=GS();const J=Gn(x),jE=wye({__proto__:null,default:J},[x]);function Oye(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 Iye(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 Pye=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Iye(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Oye(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ri="-ms-",BE="-moz-",ir="-webkit-",Uee="comm",Cj="rule",Ej="decl",Aye="@import",Gee="@keyframes",Mye="@layer",Rye=Math.abs,VO=String.fromCharCode,Dye=Object.assign;function kye(e,t){return bi(e,0)^45?(((t<<2^bi(e,0))<<2^bi(e,1))<<2^bi(e,2))<<2^bi(e,3):0}function qee(e){return e.trim()}function _ye(e,t){return(e=t.exec(e))?e[0]:e}function ar(e,t,n){return e.replace(t,n)}function W$(e,t){return e.indexOf(t)}function bi(e,t){return e.charCodeAt(t)|0}function vx(e,t,n){return e.slice(t,n)}function yc(e){return e.length}function Tj(e){return e.length}function h1(e,t){return t.push(e),e}function $ye(e,t){return e.map(t).join("")}var HO=1,oy=1,Wee=0,Pa=0,Ro=0,nv="";function UO(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:HO,column:oy,length:a,return:""}}function qb(e,t){return Dye(UO("",null,null,"",null,null,0),e,{length:-e.length},t)}function Nye(){return Ro}function Lye(){return Ro=Pa>0?bi(nv,--Pa):0,oy--,Ro===10&&(oy=1,HO--),Ro}function Ya(){return Ro=Pa<Wee?bi(nv,Pa++):0,oy++,Ro===10&&(oy=1,HO++),Ro}function Tc(){return bi(nv,Pa)}function cE(){return Pa}function qS(e,t){return vx(nv,e,t)}function bx(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 Kee(e){return HO=oy=1,Wee=yc(nv=e),Pa=0,[]}function Yee(e){return nv="",e}function uE(e){return qee(qS(Pa-1,K$(e===91?e+2:e===40?e+1:e)))}function Fye(e){for(;(Ro=Tc())&&Ro<33;)Ya();return bx(e)>2||bx(Ro)>3?"":" "}function jye(e,t){for(;--t&&Ya()&&!(Ro<48||Ro>102||Ro>57&&Ro<65||Ro>70&&Ro<97););return qS(e,cE()+(t<6&&Tc()==32&&Ya()==32))}function K$(e){for(;Ya();)switch(Ro){case e:return Pa;case 34:case 39:e!==34&&e!==39&&K$(Ro);break;case 40:e===41&&K$(e);break;case 92:Ya();break}return Pa}function Bye(e,t){for(;Ya()&&e+Ro!==57;)if(e+Ro===84&&Tc()===47)break;return"/*"+qS(t,Pa-1)+"*"+VO(e===47?e:Ya())}function zye(e){for(;!bx(Tc());)Ya();return qS(e,Pa)}function Vye(e){return Yee(dE("",null,null,null,[""],e=Kee(e),0,[0],e))}function dE(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,f=a,p=0,m=0,g=0,y=1,v=1,w=1,C=0,E="",I=o,O=i,P=r,R=E;v;)switch(g=C,C=Ya()){case 40:if(g!=108&&bi(R,f-1)==58){W$(R+=ar(uE(C),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:R+=uE(C);break;case 9:case 10:case 13:case 32:R+=Fye(g);break;case 92:R+=jye(cE()-1,7);continue;case 47:switch(Tc()){case 42:case 47:h1(Hye(Bye(Ya(),cE()),t,n),l);break;default:R+="/"}break;case 123*y:s[c++]=yc(R)*w;case 125*y:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+u:w==-1&&(R=ar(R,/\f/g,"")),m>0&&yc(R)-f&&h1(m>32?R3(R+";",r,n,f-1):R3(ar(R," ","")+";",r,n,f-2),l);break;case 59:R+=";";default:if(h1(P=M3(R,t,n,c,u,o,s,E,I=[],O=[],f),i),C===123)if(u===0)dE(R,t,P,P,I,i,f,s,O);else switch(p===99&&bi(R,3)===110?100:p){case 100:case 108:case 109:case 115:dE(e,P,P,r&&h1(M3(e,P,P,0,0,o,s,E,o,I=[],f),O),o,O,f,s,r?I:O);break;default:dE(R,P,P,P,[""],O,0,s,O)}}c=u=m=0,y=w=1,E=R="",f=a;break;case 58:f=1+yc(R),m=g;default:if(y<1){if(C==123)--y;else if(C==125&&y++==0&&Lye()==125)continue}switch(R+=VO(C),C*y){case 38:w=u>0?1:(R+="\f",-1);break;case 44:s[c++]=(yc(R)-1)*w,w=1;break;case 64:Tc()===45&&(R+=uE(Ya())),p=Tc(),u=f=yc(E=R+=zye(cE())),C++;break;case 45:g===45&&yc(R)==2&&(y=0)}}return i}function M3(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,p=o===0?i:[""],m=Tj(p),g=0,y=0,v=0;g<r;++g)for(var w=0,C=vx(e,f+1,f=Rye(y=a[g])),E=e;w<m;++w)(E=qee(y>0?p[w]+" "+C:ar(C,/&\f/g,p[w])))&&(l[v++]=E);return UO(e,t,n,o===0?Cj:s,l,c,u)}function Hye(e,t,n){return UO(e,t,n,Uee,VO(Nye()),vx(e,2,-2),0)}function R3(e,t,n,r){return UO(e,t,n,Ej,vx(e,0,r),vx(e,r+1,-1),r)}function Mg(e,t){for(var n="",r=Tj(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Uye(e,t,n,r){switch(e.type){case Mye:if(e.children.length)break;case Aye:case Ej:return e.return=e.return||e.value;case Uee:return"";case Gee:return e.return=e.value+"{"+Mg(e.children,r)+"}";case Cj:e.value=e.props.join(",")}return yc(n=Mg(e.children,r))?e.return=e.value+"{"+n+"}":""}function Gye(e){var t=Tj(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function qye(e){return function(t){t.root||(t=t.return)&&e(t)}}function Qee(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Wye=function(t,n,r){for(var o=0,i=0;o=i,i=Tc(),o===38&&i===12&&(n[r]=1),!bx(i);)Ya();return qS(t,Pa)},Kye=function(t,n){var r=-1,o=44;do switch(bx(o)){case 0:o===38&&Tc()===12&&(n[r]=1),t[r]+=Wye(Pa-1,n,r);break;case 2:t[r]+=uE(o);break;case 4:if(o===44){t[++r]=Tc()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=VO(o)}while(o=Ya());return t},Yye=function(t,n){return Yee(Kye(Kee(t),n))},D3=new WeakMap,Qye=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!D3.get(r))&&!o){D3.set(t,!0);for(var i=[],a=Yye(n,i),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=i[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},Xye=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Xee(e,t){switch(kye(e,t)){case 5103:return ir+"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 ir+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ir+e+BE+e+Ri+e+e;case 6828:case 4268:return ir+e+Ri+e+e;case 6165:return ir+e+Ri+"flex-"+e+e;case 5187:return ir+e+ar(e,/(\w+).+(:[^]+)/,ir+"box-$1$2"+Ri+"flex-$1$2")+e;case 5443:return ir+e+Ri+"flex-item-"+ar(e,/flex-|-self/,"")+e;case 4675:return ir+e+Ri+"flex-line-pack"+ar(e,/align-content|flex-|-self/,"")+e;case 5548:return ir+e+Ri+ar(e,"shrink","negative")+e;case 5292:return ir+e+Ri+ar(e,"basis","preferred-size")+e;case 6060:return ir+"box-"+ar(e,"-grow","")+ir+e+Ri+ar(e,"grow","positive")+e;case 4554:return ir+ar(e,/([^-])(transform)/g,"$1"+ir+"$2")+e;case 6187:return ar(ar(ar(e,/(zoom-|grab)/,ir+"$1"),/(image-set)/,ir+"$1"),e,"")+e;case 5495:case 3959:return ar(e,/(image-set\([^]*)/,ir+"$1$`$1");case 4968:return ar(ar(e,/(.+:)(flex-)?(.*)/,ir+"box-pack:$3"+Ri+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ir+e+e;case 4095:case 3583:case 4068:case 2532:return ar(e,/(.+)-inline(.+)/,ir+"$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(yc(e)-1-t>6)switch(bi(e,t+1)){case 109:if(bi(e,t+4)!==45)break;case 102:return ar(e,/(.+:)(.+)-([^]+)/,"$1"+ir+"$2-$3$1"+BE+(bi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~W$(e,"stretch")?Xee(ar(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(bi(e,t+1)!==115)break;case 6444:switch(bi(e,yc(e)-3-(~W$(e,"!important")&&10))){case 107:return ar(e,":",":"+ir)+e;case 101:return ar(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ir+(bi(e,14)===45?"inline-":"")+"box$3$1"+ir+"$2$3$1"+Ri+"$2box$3")+e}break;case 5936:switch(bi(e,t+11)){case 114:return ir+e+Ri+ar(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ir+e+Ri+ar(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ir+e+Ri+ar(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ir+e+Ri+e+e}return e}var Jye=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Ej:t.return=Xee(t.value,t.length);break;case Gee:return Mg([qb(t,{value:ar(t.value,"@","@"+ir)})],o);case Cj:if(t.length)return $ye(t.props,function(i){switch(_ye(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mg([qb(t,{props:[ar(i,/:(read-\w+)/,":"+BE+"$1")]})],o);case"::placeholder":return Mg([qb(t,{props:[ar(i,/:(plac\w+)/,":"+ir+"input-$1")]}),qb(t,{props:[ar(i,/:(plac\w+)/,":"+BE+"$1")]}),qb(t,{props:[ar(i,/:(plac\w+)/,Ri+"input-$1")]})],o)}return""})}},Zye=[Jye],Jee=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||Zye,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),w=1;w<v.length;w++)i[v[w]]=!0;s.push(y)});var l,c=[Qye,Xye];{var u,f=[Uye,qye(function(y){u.insert(y)})],p=Gye(c.concat(o,f)),m=function(v){return Mg(Vye(v),p)};l=function(v,w,C,E){u=C,m(v?v+"{"+w.styles+"}":w.styles),E&&(g.inserted[w.name]=!0)}}var g={key:n,sheet:new Pye({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return g.sheet.hydrate(s),g};function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(null,arguments)}var pR={exports:{}},cr={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var k3;function Jye(){if(k3)return lr;k3=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(O){if(typeof O=="object"&&O!==null){var P=O.$$typeof;switch(P){case t:switch(O=O.type,O){case l:case c:case r:case i:case o:case f:return O;default:switch(O=O&&O.$$typeof,O){case s:case u:case g:case m:case a:return O;default:return P}}case n:return P}}}function I(O){return E(O)===c}return lr.AsyncMode=l,lr.ConcurrentMode=c,lr.ContextConsumer=s,lr.ContextProvider=a,lr.Element=t,lr.ForwardRef=u,lr.Fragment=r,lr.Lazy=g,lr.Memo=m,lr.Portal=n,lr.Profiler=i,lr.StrictMode=o,lr.Suspense=f,lr.isAsyncMode=function(O){return I(O)||E(O)===l},lr.isConcurrentMode=I,lr.isContextConsumer=function(O){return E(O)===s},lr.isContextProvider=function(O){return E(O)===a},lr.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},lr.isForwardRef=function(O){return E(O)===u},lr.isFragment=function(O){return E(O)===r},lr.isLazy=function(O){return E(O)===g},lr.isMemo=function(O){return E(O)===m},lr.isPortal=function(O){return E(O)===n},lr.isProfiler=function(O){return E(O)===i},lr.isStrictMode=function(O){return E(O)===o},lr.isSuspense=function(O){return E(O)===f},lr.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===r||O===c||O===i||O===o||O===f||O===h||typeof O=="object"&&O!==null&&(O.$$typeof===g||O.$$typeof===m||O.$$typeof===a||O.$$typeof===s||O.$$typeof===u||O.$$typeof===v||O.$$typeof===w||O.$$typeof===C||O.$$typeof===y)},lr.typeOf=E,lr}var _3;function Zye(){return _3||(_3=1,fR.exports=Jye()),fR.exports}var pR,$3;function eve(){if($3)return pR;$3=1;var e=Zye(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=o;function a(g){return e.isMemo(g)?o:i[g.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function m(g,y,v){if(typeof y!="string"){if(h){var w=f(y);w&&w!==h&&m(g,w,v)}var C=l(y);c&&(C=C.concat(c(y)));for(var E=a(g),I=a(y),O=0;O<C.length;++O){var P=C[O];if(!n[P]&&!(v&&v[P])&&!(I&&I[P])&&!(E&&E[P])){var R=u(y,P);try{s(g,P,R)}catch{}}}}return g}return pR=m,pR}var tve=eve();const nve=Gn(tve);var rve=!0;function Jee(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var Tj=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||rve===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Oj=function(t,n,r){Tj(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function ove(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ive={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},ave=/[A-Z]|^ms/g,sve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zee=function(t){return t.charCodeAt(1)===45},N3=function(t){return t!=null&&typeof t!="boolean"},hR=Yee(function(e){return Zee(e)?e:e.replace(ave,"-$&").toLowerCase()}),L3=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(sve,function(r,o,i){return yc={name:o,styles:i,next:yc},o})}return ive[t]!==1&&!Zee(t)&&typeof n=="number"&&n!==0?n+"px":n};function xx(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return yc={name:o.name,styles:o.styles,next:yc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)yc={name:a.name,styles:a.styles,next:yc},a=a.next;var s=i.styles+";";return s}return lve(e,t,n)}case"function":{if(e!==void 0){var l=yc,c=n(e);return yc=l,xx(e,t,c)}break}}var u=n;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function lve(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=xx(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":N3(s)&&(r+=hR(i)+":"+L3(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)N3(a[l])&&(r+=hR(i)+":"+L3(i,a[l])+";");else{var c=xx(e,t,a);switch(i){case"animation":case"animationName":{r+=hR(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}return r}var F3=/label:\s*([^\s;{]+)\s*(;|$)/g,yc;function WS(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";yc=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=xx(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=xx(n,t,e[s]),r){var l=i;o+=l[s]}F3.lastIndex=0;for(var c="",u;(u=F3.exec(o))!==null;)c+="-"+u[1];var f=ove(o)+c;return{name:f,styles:o,next:yc}}var cve=function(t){return t()},ete=FE.useInsertionEffect?FE.useInsertionEffect:!1,tte=ete||cve,j3=ete||x.useLayoutEffect,nte=x.createContext(typeof HTMLElement<"u"?Xee({key:"css"}):null),uve=nte.Provider,Ij=function(t){return x.forwardRef(function(n,r){var o=x.useContext(nte);return t(n,o,r)})},KS=x.createContext({}),YS={}.hasOwnProperty,K$="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Pj=function(t,n){var r={};for(var o in n)YS.call(n,o)&&(r[o]=n[o]);return r[K$]=t,r},dve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Tj(n,r,o),tte(function(){return Oj(n,r,o)}),null},fve=Ij(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[K$],i=[r],a="";typeof e.className=="string"?a=Jee(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var s=WS(i,void 0,x.useContext(KS));a+=t.key+"-"+s.name;var l={};for(var c in e)YS.call(e,c)&&c!=="css"&&c!==K$&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),x.createElement(x.Fragment,null,x.createElement(dve,{cache:t,serialized:s,isStringTag:typeof o=="string"}),x.createElement(o,l))}),Aj=fve,Tt=k.Fragment,S=function(t,n,r){return YS.call(n,"css")?k.jsx(Aj,Pj(t,n),r):k.jsx(t,n,r)},Q=function(t,n,r){return YS.call(n,"css")?k.jsxs(Aj,Pj(t,n),r):k.jsxs(t,n,r)},Sx=function(t,n){var r=arguments;if(n==null||!YS.call(n,"css"))return x.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Aj,i[1]=Pj(t,n);for(var a=2;a<o;a++)i[a]=r[a];return x.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Sx||(Sx={}));var pve=Ij(function(e,t){var n=e.styles,r=WS([n],void 0,x.useContext(KS)),o=x.useRef();return j3(function(){var i=t.key+"-global",a=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+i+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",i),a.hydrate([l])),o.current=[a,s],function(){a.flush()}},[t]),j3(function(){var i=o.current,a=i[0],s=i[1];if(s){i[1]=!1;return}if(r.next!==void 0&&Oj(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function kf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WS(t)}function il(){var e=kf.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function Bu(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const qs="$$material";var hve=/^((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)-.*))$/,mve=Yee(function(e){return hve.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),gve=mve,yve=function(t){return t!=="theme"},B3=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?gve:yve},z3=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},vve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Tj(n,r,o),tte(function(){return Oj(n,r,o)}),null},bve=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=z3(t,n,r),l=s||B3(o),c=!l("as");return function(){var u=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var h=u[0];f.push(h[0]);for(var m=u.length,g=1;g<m;g++)f.push(u[g],h[g])}var y=Ij(function(v,w,C){var E=c&&v.as||o,I="",O=[],P=v;if(v.theme==null){P={};for(var R in v)P[R]=v[R];P.theme=x.useContext(KS)}typeof v.className=="string"?I=Jee(w.registered,O,v.className):v.className!=null&&(I=v.className+" ");var D=WS(f.concat(O),w.registered,P);I+=w.key+"-"+D.name,a!==void 0&&(I+=" "+a);var M=c&&s===void 0?B3(E):l,A={};for(var _ in v)c&&_==="as"||M(_)&&(A[_]=v[_]);return A.className=I,C&&(A.ref=C),x.createElement(x.Fragment,null,x.createElement(vve,{cache:w,serialized:D,isStringTag:typeof E=="string"}),x.createElement(E,A))});return y.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",y.defaultProps=t.defaultProps,y.__emotion_real=y,y.__emotion_base=o,y.__emotion_styles=f,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return"."+a}}),y.withComponent=function(v,w){var C=e(v,z({},n,w,{shouldForwardProp:z3(y,w,!0)}));return C.apply(void 0,f)},y}},xve=["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"],Y$=bve.bind(null);xve.forEach(function(e){Y$[e]=Y$(e)});var mR={exports:{}},gR,V3;function Sve(){if(V3)return gR;V3=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gR=e,gR}var yR,H3;function wve(){if(H3)return yR;H3=1;var e=Sve();function t(){}function n(){}return n.resetWarningCache=t,yR=function(){function r(a,s,l,c,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yR}var U3;function Cve(){return U3||(U3=1,mR.exports=wve()()),mR.exports}var Eve=Cve();const U=Gn(Eve);function Tve(e){return e==null||Object.keys(e).length===0}function rte(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(Tve(o)?n:o):t;return k.jsx(pve,{styles:r})}function ote(e,t){return Y$(e,t)}function Ove(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const G3=[];function q3(e){return G3[0]=e,WS(G3)}var vR={exports:{}},wr={};/**
+ */var k3;function eve(){if(k3)return cr;k3=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(O){if(typeof O=="object"&&O!==null){var P=O.$$typeof;switch(P){case t:switch(O=O.type,O){case l:case c:case r:case i:case o:case f:return O;default:switch(O=O&&O.$$typeof,O){case s:case u:case g:case m:case a:return O;default:return P}}case n:return P}}}function I(O){return E(O)===c}return cr.AsyncMode=l,cr.ConcurrentMode=c,cr.ContextConsumer=s,cr.ContextProvider=a,cr.Element=t,cr.ForwardRef=u,cr.Fragment=r,cr.Lazy=g,cr.Memo=m,cr.Portal=n,cr.Profiler=i,cr.StrictMode=o,cr.Suspense=f,cr.isAsyncMode=function(O){return I(O)||E(O)===l},cr.isConcurrentMode=I,cr.isContextConsumer=function(O){return E(O)===s},cr.isContextProvider=function(O){return E(O)===a},cr.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},cr.isForwardRef=function(O){return E(O)===u},cr.isFragment=function(O){return E(O)===r},cr.isLazy=function(O){return E(O)===g},cr.isMemo=function(O){return E(O)===m},cr.isPortal=function(O){return E(O)===n},cr.isProfiler=function(O){return E(O)===i},cr.isStrictMode=function(O){return E(O)===o},cr.isSuspense=function(O){return E(O)===f},cr.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===r||O===c||O===i||O===o||O===f||O===p||typeof O=="object"&&O!==null&&(O.$$typeof===g||O.$$typeof===m||O.$$typeof===a||O.$$typeof===s||O.$$typeof===u||O.$$typeof===v||O.$$typeof===w||O.$$typeof===C||O.$$typeof===y)},cr.typeOf=E,cr}var _3;function tve(){return _3||(_3=1,pR.exports=eve()),pR.exports}var hR,$3;function nve(){if($3)return hR;$3=1;var e=tve(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=o;function a(g){return e.isMemo(g)?o:i[g.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function m(g,y,v){if(typeof y!="string"){if(p){var w=f(y);w&&w!==p&&m(g,w,v)}var C=l(y);c&&(C=C.concat(c(y)));for(var E=a(g),I=a(y),O=0;O<C.length;++O){var P=C[O];if(!n[P]&&!(v&&v[P])&&!(I&&I[P])&&!(E&&E[P])){var R=u(y,P);try{s(g,P,R)}catch{}}}}return g}return hR=m,hR}var rve=nve();const ove=Gn(rve);var ive=!0;function Zee(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var Oj=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||ive===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Ij=function(t,n,r){Oj(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function ave(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var sve={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},lve=/[A-Z]|^ms/g,cve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ete=function(t){return t.charCodeAt(1)===45},N3=function(t){return t!=null&&typeof t!="boolean"},mR=Qee(function(e){return ete(e)?e:e.replace(lve,"-$&").toLowerCase()}),L3=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(cve,function(r,o,i){return vc={name:o,styles:i,next:vc},o})}return sve[t]!==1&&!ete(t)&&typeof n=="number"&&n!==0?n+"px":n};function xx(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return vc={name:o.name,styles:o.styles,next:vc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)vc={name:a.name,styles:a.styles,next:vc},a=a.next;var s=i.styles+";";return s}return uve(e,t,n)}case"function":{if(e!==void 0){var l=vc,c=n(e);return vc=l,xx(e,t,c)}break}}var u=n;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function uve(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=xx(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":N3(s)&&(r+=mR(i)+":"+L3(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)N3(a[l])&&(r+=mR(i)+":"+L3(i,a[l])+";");else{var c=xx(e,t,a);switch(i){case"animation":case"animationName":{r+=mR(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}return r}var F3=/label:\s*([^\s;{]+)\s*(;|$)/g,vc;function WS(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";vc=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=xx(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=xx(n,t,e[s]),r){var l=i;o+=l[s]}F3.lastIndex=0;for(var c="",u;(u=F3.exec(o))!==null;)c+="-"+u[1];var f=ave(o)+c;return{name:f,styles:o,next:vc}}var dve=function(t){return t()},tte=jE.useInsertionEffect?jE.useInsertionEffect:!1,nte=tte||dve,j3=tte||x.useLayoutEffect,rte=x.createContext(typeof HTMLElement<"u"?Jee({key:"css"}):null),fve=rte.Provider,Pj=function(t){return x.forwardRef(function(n,r){var o=x.useContext(rte);return t(n,o,r)})},KS=x.createContext({}),YS={}.hasOwnProperty,Y$="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Aj=function(t,n){var r={};for(var o in n)YS.call(n,o)&&(r[o]=n[o]);return r[Y$]=t,r},pve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Oj(n,r,o),nte(function(){return Ij(n,r,o)}),null},hve=Pj(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Y$],i=[r],a="";typeof e.className=="string"?a=Zee(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var s=WS(i,void 0,x.useContext(KS));a+=t.key+"-"+s.name;var l={};for(var c in e)YS.call(e,c)&&c!=="css"&&c!==Y$&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),x.createElement(x.Fragment,null,x.createElement(pve,{cache:t,serialized:s,isStringTag:typeof o=="string"}),x.createElement(o,l))}),Mj=hve,Tt=k.Fragment,S=function(t,n,r){return YS.call(n,"css")?k.jsx(Mj,Aj(t,n),r):k.jsx(t,n,r)},Q=function(t,n,r){return YS.call(n,"css")?k.jsxs(Mj,Aj(t,n),r):k.jsxs(t,n,r)},Sx=function(t,n){var r=arguments;if(n==null||!YS.call(n,"css"))return x.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Mj,i[1]=Aj(t,n);for(var a=2;a<o;a++)i[a]=r[a];return x.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Sx||(Sx={}));var mve=Pj(function(e,t){var n=e.styles,r=WS([n],void 0,x.useContext(KS)),o=x.useRef();return j3(function(){var i=t.key+"-global",a=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+i+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",i),a.hydrate([l])),o.current=[a,s],function(){a.flush()}},[t]),j3(function(){var i=o.current,a=i[0],s=i[1];if(s){i[1]=!1;return}if(r.next!==void 0&&Ij(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function $f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WS(t)}function sl(){var e=$f.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function zu(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const qs="$$material";var gve=/^((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)-.*))$/,yve=Qee(function(e){return gve.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),vve=yve,bve=function(t){return t!=="theme"},B3=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?vve:bve},z3=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},xve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Oj(n,r,o),nte(function(){return Ij(n,r,o)}),null},Sve=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=z3(t,n,r),l=s||B3(o),c=!l("as");return function(){var u=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var p=u[0];f.push(p[0]);for(var m=u.length,g=1;g<m;g++)f.push(u[g],p[g])}var y=Pj(function(v,w,C){var E=c&&v.as||o,I="",O=[],P=v;if(v.theme==null){P={};for(var R in v)P[R]=v[R];P.theme=x.useContext(KS)}typeof v.className=="string"?I=Zee(w.registered,O,v.className):v.className!=null&&(I=v.className+" ");var D=WS(f.concat(O),w.registered,P);I+=w.key+"-"+D.name,a!==void 0&&(I+=" "+a);var M=c&&s===void 0?B3(E):l,A={};for(var _ in v)c&&_==="as"||M(_)&&(A[_]=v[_]);return A.className=I,C&&(A.ref=C),x.createElement(x.Fragment,null,x.createElement(xve,{cache:w,serialized:D,isStringTag:typeof E=="string"}),x.createElement(E,A))});return y.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",y.defaultProps=t.defaultProps,y.__emotion_real=y,y.__emotion_base=o,y.__emotion_styles=f,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return"."+a}}),y.withComponent=function(v,w){var C=e(v,z({},n,w,{shouldForwardProp:z3(y,w,!0)}));return C.apply(void 0,f)},y}},wve=["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"],Q$=Sve.bind(null);wve.forEach(function(e){Q$[e]=Q$(e)});var gR={exports:{}},yR,V3;function Cve(){if(V3)return yR;V3=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return yR=e,yR}var vR,H3;function Eve(){if(H3)return vR;H3=1;var e=Cve();function t(){}function n(){}return n.resetWarningCache=t,vR=function(){function r(a,s,l,c,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},vR}var U3;function Tve(){return U3||(U3=1,gR.exports=Eve()()),gR.exports}var Ove=Tve();const U=Gn(Ove);function Ive(e){return e==null||Object.keys(e).length===0}function ote(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(Ive(o)?n:o):t;return k.jsx(mve,{styles:r})}function ite(e,t){return Q$(e,t)}function Pve(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const G3=[];function q3(e){return G3[0]=e,WS(G3)}var bR={exports:{}},wr={};/**
* @license React
* react-is.production.js
*
@@ -29,10 +29,10 @@ var vye=Object.defineProperty;var T3=e=>{throw TypeError(e)};var bye=(e,t,n)=>t
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var W3;function Ive(){if(W3)return wr;W3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case e:switch(y=y.type,y){case n:case o:case r:case l:case c:case h:return y;default:switch(y=y&&y.$$typeof,y){case a:case s:case f:case u:return y;case i:return y;default:return v}}case t:return v}}}return wr.ContextConsumer=i,wr.ContextProvider=a,wr.Element=e,wr.ForwardRef=s,wr.Fragment=n,wr.Lazy=f,wr.Memo=u,wr.Portal=t,wr.Profiler=o,wr.StrictMode=r,wr.Suspense=l,wr.SuspenseList=c,wr.isContextConsumer=function(y){return g(y)===i},wr.isContextProvider=function(y){return g(y)===a},wr.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},wr.isForwardRef=function(y){return g(y)===s},wr.isFragment=function(y){return g(y)===n},wr.isLazy=function(y){return g(y)===f},wr.isMemo=function(y){return g(y)===u},wr.isPortal=function(y){return g(y)===t},wr.isProfiler=function(y){return g(y)===o},wr.isStrictMode=function(y){return g(y)===r},wr.isSuspense=function(y){return g(y)===l},wr.isSuspenseList=function(y){return g(y)===c},wr.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===l||y===c||typeof y=="object"&&y!==null&&(y.$$typeof===f||y.$$typeof===u||y.$$typeof===a||y.$$typeof===i||y.$$typeof===s||y.$$typeof===m||y.getModuleId!==void 0)},wr.typeOf=g,wr}var K3;function Pve(){return K3||(K3=1,vR.exports=Ive()),vR.exports}var ite=Pve();function vc(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 ate(e){if(x.isValidElement(e)||ite.isValidElementType(e)||!vc(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ate(e[n])}),t}function si(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return vc(e)&&vc(t)&&Object.keys(t).forEach(o=>{x.isValidElement(t[o])||ite.isValidElementType(t[o])?r[o]=t[o]:vc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&vc(e[o])?r[o]=si(e[o],t[o],n):n.clone?r[o]=vc(t[o])?ate(t[o]):t[o]:r[o]=t[o]}),r}const Ave=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Mve(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=Ave(t),a=Object.keys(i);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function u(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):s(h)}function f(h){const m=a.indexOf(h);return m===0?s(a[1]):m===a.length-1?l(a[m]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:s,down:l,between:c,only:u,not:f,unit:n,...o}}function Rve(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function Dve(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function kve(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function _ve(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const $ve={borderRadius:4};function q0(e,t){return t?si(e,t,{clone:!1}):e}const UO={xs:0,sm:600,md:900,lg:1200,xl:1536},Y3={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${UO[e]}px)`},Nve={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:UO[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ql(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||Y3;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||Y3;return Object.keys(t).reduce((a,s)=>{if(Dve(i.keys,s)){const l=kve(r.containerQueries?r:Nve,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||UO).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function ste(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function lte(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Lve(e,...t){const n=ste(e),r=[n,...t].reduce((o,i)=>si(o,i),{});return lte(Object.keys(n),r)}function Fve(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i<e.length&&(n[o]=!0)}):r.forEach(o=>{e[o]!=null&&(n[o]=!0)}),n}function bR({values:e,breakpoints:t,base:n}){const r=n||Fve(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Oe(e){if(typeof e!="string")throw new Error(Bu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function GO(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function BE(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=GO(e,n)||r,t&&(o=t(o,r,e)),o}function Eo(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=GO(l,r)||{};return ql(a,s,f=>{let h=BE(c,o,f);return f===h&&typeof f=="string"&&(h=BE(c,o,`${t}${f==="default"?"":Oe(f)}`,f)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[t],i}function jve(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Bve={m:"margin",p:"padding"},zve={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Q3={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Vve=jve(e=>{if(e.length>2)if(Q3[e])e=Q3[e];else return[e];const[t,n]=e.split(""),r=Bve[t],o=zve[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Mj=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rj=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Mj,...Rj];function QS(e,t,n,r){const o=GO(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function qO(e){return QS(e,"spacing",8)}function lh(e,t){return typeof t=="string"||t==null?t:e(t)}function Hve(e,t){return n=>e.reduce((r,o)=>(r[o]=lh(t,n),r),{})}function Uve(e,t,n,r){if(!t.includes(n))return null;const o=Vve(n),i=Hve(o,r),a=e[n];return ql(e,a,i)}function cte(e,t){const n=qO(e.theme);return Object.keys(e).map(r=>Uve(e,t,r,n)).reduce(q0,{})}function so(e){return cte(e,Mj)}so.propTypes={};so.filterProps=Mj;function lo(e){return cte(e,Rj)}lo.propTypes={};lo.filterProps=Rj;function ute(e=8,t=qO({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function WO(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?q0(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Fs(e){return typeof e!="number"?e:`${e}px solid`}function al(e,t){return Eo({prop:e,themeKey:"borders",transform:t})}const Gve=al("border",Fs),qve=al("borderTop",Fs),Wve=al("borderRight",Fs),Kve=al("borderBottom",Fs),Yve=al("borderLeft",Fs),Qve=al("borderColor"),Xve=al("borderTopColor"),Jve=al("borderRightColor"),Zve=al("borderBottomColor"),ebe=al("borderLeftColor"),tbe=al("outline",Fs),nbe=al("outlineColor"),KO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=QS(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:lh(t,r)});return ql(e,e.borderRadius,n)}return null};KO.propTypes={};KO.filterProps=["borderRadius"];WO(Gve,qve,Wve,Kve,Yve,Qve,Xve,Jve,Zve,ebe,KO,tbe,nbe);const YO=e=>{if(e.gap!==void 0&&e.gap!==null){const t=QS(e.theme,"spacing",8),n=r=>({gap:lh(t,r)});return ql(e,e.gap,n)}return null};YO.propTypes={};YO.filterProps=["gap"];const QO=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=QS(e.theme,"spacing",8),n=r=>({columnGap:lh(t,r)});return ql(e,e.columnGap,n)}return null};QO.propTypes={};QO.filterProps=["columnGap"];const XO=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=QS(e.theme,"spacing",8),n=r=>({rowGap:lh(t,r)});return ql(e,e.rowGap,n)}return null};XO.propTypes={};XO.filterProps=["rowGap"];const rbe=Eo({prop:"gridColumn"}),obe=Eo({prop:"gridRow"}),ibe=Eo({prop:"gridAutoFlow"}),abe=Eo({prop:"gridAutoColumns"}),sbe=Eo({prop:"gridAutoRows"}),lbe=Eo({prop:"gridTemplateColumns"}),cbe=Eo({prop:"gridTemplateRows"}),ube=Eo({prop:"gridTemplateAreas"}),dbe=Eo({prop:"gridArea"});WO(YO,QO,XO,rbe,obe,ibe,abe,sbe,lbe,cbe,ube,dbe);function Mg(e,t){return t==="grey"?t:e}const fbe=Eo({prop:"color",themeKey:"palette",transform:Mg}),pbe=Eo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Mg}),hbe=Eo({prop:"backgroundColor",themeKey:"palette",transform:Mg});WO(fbe,pbe,hbe);function Ga(e){return e<=1&&e!==0?`${e*100}%`:e}const mbe=Eo({prop:"width",transform:Ga}),Dj=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||UO[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ga(n)}};return ql(e,e.maxWidth,t)}return null};Dj.filterProps=["maxWidth"];const gbe=Eo({prop:"minWidth",transform:Ga}),ybe=Eo({prop:"height",transform:Ga}),vbe=Eo({prop:"maxHeight",transform:Ga}),bbe=Eo({prop:"minHeight",transform:Ga});Eo({prop:"size",cssProperty:"width",transform:Ga});Eo({prop:"size",cssProperty:"height",transform:Ga});const xbe=Eo({prop:"boxSizing"});WO(mbe,Dj,gbe,ybe,vbe,bbe,xbe);const XS={border:{themeKey:"borders",transform:Fs},borderTop:{themeKey:"borders",transform:Fs},borderRight:{themeKey:"borders",transform:Fs},borderBottom:{themeKey:"borders",transform:Fs},borderLeft:{themeKey:"borders",transform:Fs},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Fs},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:KO},color:{themeKey:"palette",transform:Mg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Mg},backgroundColor:{themeKey:"palette",transform:Mg},p:{style:lo},pt:{style:lo},pr:{style:lo},pb:{style:lo},pl:{style:lo},px:{style:lo},py:{style:lo},padding:{style:lo},paddingTop:{style:lo},paddingRight:{style:lo},paddingBottom:{style:lo},paddingLeft:{style:lo},paddingX:{style:lo},paddingY:{style:lo},paddingInline:{style:lo},paddingInlineStart:{style:lo},paddingInlineEnd:{style:lo},paddingBlock:{style:lo},paddingBlockStart:{style:lo},paddingBlockEnd:{style:lo},m:{style:so},mt:{style:so},mr:{style:so},mb:{style:so},ml:{style:so},mx:{style:so},my:{style:so},margin:{style:so},marginTop:{style:so},marginRight:{style:so},marginBottom:{style:so},marginLeft:{style:so},marginX:{style:so},marginY:{style:so},marginInline:{style:so},marginInlineStart:{style:so},marginInlineEnd:{style:so},marginBlock:{style:so},marginBlockStart:{style:so},marginBlockEnd:{style:so},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:YO},rowGap:{style:XO},columnGap:{style:QO},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ga},maxWidth:{style:Dj},minWidth:{transform:Ga},height:{transform:Ga},maxHeight:{transform:Ga},minHeight:{transform:Ga},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 Sbe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function wbe(e,t){return typeof e=="function"?e(t):e}function Cbe(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=GO(o,c)||{};return f?f(a):ql(a,r,g=>{let y=BE(h,u,g);return g===y&&typeof g=="string"&&(y=BE(h,u,`${n}${g==="default"?"":Oe(g)}`,g)),l===!1?y:{[l]:y}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??XS;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=ste(o.breakpoints),u=Object.keys(c);let f=c;return Object.keys(l).forEach(h=>{const m=wbe(l[h],o);if(m!=null)if(typeof m=="object")if(i[h])f=q0(f,e(h,m,o,i));else{const g=ql({theme:o},m,y=>({[h]:y}));Sbe(g,m)?f[h]=t({sx:m,theme:o}):f=q0(f,g)}else f=q0(f,e(h,m,o,i))}),Rve(o,lte(u,f))}return Array.isArray(r)?r.map(a):a(r)}return t}const wf=Cbe();wf.filterProps=["sx"];function Ebe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function nv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=Mve(n),l=ute(o);let c=si({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...$ve,...i}},a);return c=_ve(c),c.applyStyles=Ebe,c=t.reduce((u,f)=>si(u,f),c),c.unstable_sxConfig={...XS,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(f){return wf({sx:f,theme:this})},c}function Tbe(e){return Object.keys(e).length===0}function kj(e=null){const t=x.useContext(KS);return!t||Tbe(t)?e:t}const Obe=nv();function JS(e=Obe){return kj(e)}function Ibe({styles:e,themeId:t,defaultTheme:n={}}){const r=JS(n),o=typeof e=="function"?e(t&&r[t]||r):e;return k.jsx(rte,{styles:o})}const Pbe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??XS;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function JO(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=Pbe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return vc(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const X3=e=>e,Abe=()=>{let e=X3;return{configure(t){e=t},generate(t){return e(t)},reset(){e=X3}}},dte=Abe();function fte(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=fte(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fe(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fte(e))&&(r&&(r+=" "),r+=t);return r}function Mbe(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=ote("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(wf);return x.forwardRef(function(l,c){const u=JS(n),{className:f,component:h="div",...m}=JO(l);return k.jsx(i,{as:h,ref:c,className:fe(f,o?o(r):r),theme:t&&u[t]||u,...m})})}const Rbe={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 qe(e,t,n="Mui"){const r=Rbe[t];return r?`${n}-${r}`:`${dte.generate(e)}-${t}`}function Ke(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=qe(e,o,n)}),r}function pte(e){const{variants:t,...n}=e,r={variants:t,style:q3(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=q3(o.style))}),r}const Dbe=nv();function Ca(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function kbe(e){return e?(t,n)=>n[e]:null}function _be(e,t,n){e.theme=Nbe(e.theme)?n:e.theme[t]||e.theme}function dE(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>dE(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return hte(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function hte(e,t,n=[]){var o;let r;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(r))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&((o=e.ownerState)==null?void 0:o[s])!==a.props[s])continue e;typeof a.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(a.style(r))):n.push(a.style)}return n}function mte(e={}){const{themeId:t,defaultTheme:n=Dbe,rootShouldForwardProp:r=Ca,slotShouldForwardProp:o=Ca}=e;function i(s){_be(s,t,n)}return(s,l={})=>{Ove(s,O=>O.filter(P=>P!==wf));const{name:c,slot:u,skipVariantsResolver:f,skipSx:h,overridesResolver:m=kbe(Fbe(u)),...g}=l,y=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,v=h||!1;let w=Ca;u==="Root"||u==="root"?w=r:u?w=o:Lbe(s)&&(w=void 0);const C=ote(s,{shouldForwardProp:w,label:$be(),...g}),E=O=>{if(typeof O=="function"&&O.__emotion_real!==O)return function(R){return dE(R,O)};if(vc(O)){const P=pte(O);return P.variants?function(D){return dE(D,P)}:P.style}return O},I=(...O)=>{const P=[],R=O.map(E),D=[];if(P.push(i),c&&m&&D.push(function(N){var L,V;const H=(V=(L=N.theme.components)==null?void 0:L[c])==null?void 0:V.styleOverrides;if(!H)return null;const j={};for(const W in H)j[W]=dE(N,H[W]);return m(N,j)}),c&&!y&&D.push(function(N){var j,L;const B=N.theme,H=(L=(j=B==null?void 0:B.components)==null?void 0:j[c])==null?void 0:L.variants;return H?hte(N,H):null}),v||D.push(wf),Array.isArray(R[0])){const _=R.shift(),N=new Array(P.length).fill(""),B=new Array(D.length).fill("");let H;H=[...N,..._,...B],H.raw=[...N,..._.raw,...B],P.unshift(H)}const M=[...P,...R,...D],A=C(...M);return s.muiName&&(A.muiName=s.muiName),A};return C.withConfig&&(I.withConfig=C.withConfig),I}}function $be(e,t){return void 0}function Nbe(e){for(const t in e)return!1;return!0}function Lbe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Fbe(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Nn=mte();function ch(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=ch(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function _j(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ch(t.components[n].defaultProps,r)}function ZO({props:e,name:t,defaultTheme:n,themeId:r}){let o=JS(n);return r&&(o=o[r]||o),_j({theme:o,name:t,props:e})}const In=typeof window<"u"?x.useLayoutEffect:x.useEffect;function jbe(e,t,n,r,o){const[i,a]=x.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return In(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const Bbe={...FE},gte=Bbe.useSyncExternalStore;function zbe(e,t,n,r,o){const i=x.useCallback(()=>t,[t]),a=x.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=x.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,f=>(u.addEventListener("change",f),()=>{u.removeEventListener("change",f)})]},[i,n,e]);return gte(l,s,a)}function yte(e={}){const{themeId:t}=e;return function(r,o={}){let i=kj();i&&t&&(i=i[t]||i);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:c=null,noSsr:u=!1}=_j({name:"MuiUseMediaQuery",props:o,theme:i});let f=typeof r=="function"?r(i):r;return f=f.replace(/^@media( ?)/m,""),(gte!==void 0?zbe:jbe)(f,s,l,c,u)}}yte();function Vbe(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function $j(e,t=0,n=1){return Vbe(e,t,n)}function Hbe(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Cf(e){if(e.type)return e;if(e.charAt(0)==="#")return Cf(Hbe(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Bu(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Bu(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const Ube=e=>{const t=Cf(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},A0=(e,t)=>{try{return Ube(e)}catch{return e}};function eI(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function vte(e){e=Cf(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),eI({type:s,values:l})}function Q$(e){e=Cf(e);let t=e.type==="hsl"||e.type==="hsla"?Cf(vte(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Gbe(e,t){const n=Q$(e),r=Q$(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Nt(e,t){return e=Cf(e),t=$j(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,eI(e)}function h1(e,t,n){try{return Nt(e,t)}catch{return e}}function zu(e,t){if(e=Cf(e),t=$j(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return eI(e)}function Ir(e,t,n){try{return zu(e,t)}catch{return e}}function Vu(e,t){if(e=Cf(e),t=$j(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return eI(e)}function Pr(e,t,n){try{return Vu(e,t)}catch{return e}}function bte(e,t=.15){return Q$(e)>.5?zu(e,t):Vu(e,t)}function m1(e,t,n){try{return bte(e,t)}catch{return e}}const rv=U.oneOfType([U.func,U.object]);function J3(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function $h(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Rg(e,t){var n,r,o;return x.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function Mr(e){return e&&e.ownerDocument||document}function ns(e){return Mr(e).defaultView||window}function X$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let Z3=0;function qbe(e){const[t,n]=x.useState(e),r=e||t;return x.useEffect(()=>{t==null&&(Z3+=1,n(`mui-${Z3}`))},[t]),r}const Wbe={...FE},eG=Wbe.useId;function bn(e){if(eG!==void 0){const t=eG();return e??t}return qbe(e)}function ia({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=x.useRef(e!==void 0),[i,a]=x.useState(t),s=o?e:i,l=x.useCallback(c=>{o||a(c)},[]);return[s,l]}function Je(e){const t=x.useRef(e);return In(()=>{t.current=e}),x.useRef((...n)=>(0,t.current)(...n)).current}function en(...e){const t=x.useRef(void 0),n=x.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return x.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const tG={};function Xl(e,t){const n=x.useRef(tG);return n.current===tG&&(n.current=e(t)),n}const Kbe=[];function Nj(e){x.useEffect(e,Kbe)}class tI{constructor(){Ce(this,"currentId",null);Ce(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Ce(this,"disposeEffect",()=>this.clear)}static create(){return new tI}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ko(){const e=Xl(tI.create).current;return Nj(e.disposeEffect),e}function zE(e){try{return e.matches(":focus-visible")}catch{}return!1}function xte(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const Lj=e=>{const t=x.useRef({});return x.useEffect(()=>{t.current=e}),t.current};function Ste(e){return x.Children.toArray(e).filter(t=>x.isValidElement(t))}const Ybe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Me(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[o]=a}return r}function Qbe(e){return typeof e=="string"}function wte(e,t,n){return e===void 0||Qbe(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function VE(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function nG(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Cte(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const m=fe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),g={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...n,...o,...r};return m.length>0&&(y.className=m),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:void 0}}const a=VE({...o,...r}),s=nG(r),l=nG(o),c=t(a),u=fe(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},h={...c,...n,...l,...s};return u.length>0&&(h.className=u),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Dc(e,t,n){return typeof e=="function"?e(t,n):e}function Dn(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Dc(n,r),{props:s,internalRef:l}=Cte({...i,externalSlotProps:a}),c=en(l,a==null?void 0:a.ref,(f=e.additionalProps)==null?void 0:f.ref);return wte(t,{...s,ref:c},r)}function _f(e){var t;return parseInt(x.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const Ete=x.createContext(null);function Fj(){return x.useContext(Ete)}const Xbe=typeof Symbol=="function"&&Symbol.for,Jbe=Xbe?Symbol.for("mui.nested"):"__THEME_NESTED__";function Zbe(e,t){return typeof t=="function"?t(e):{...e,...t}}function e0e(e){const{children:t,theme:n}=e,r=Fj(),o=x.useMemo(()=>{const i=r===null?{...n}:Zbe(r,n);return i!=null&&(i[Jbe]=r!==null),i},[n,r]);return k.jsx(Ete.Provider,{value:o,children:t})}const Tte=x.createContext();function t0e({value:e,...t}){return k.jsx(Tte.Provider,{value:e??!0,...t})}const vr=()=>x.useContext(Tte)??!1,Ote=x.createContext(void 0);function n0e({value:e,children:t}){return k.jsx(Ote.Provider,{value:e,children:t})}function r0e(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?ch(o.defaultProps,r):!o.styleOverrides&&!o.variants?ch(o,r):r}function o0e({props:e,name:t}){const n=x.useContext(Ote);return r0e({props:e,name:t,theme:{components:n}})}const rG={};function oG(e,t,n,r=!1){return x.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function Ite(e){const{children:t,theme:n,themeId:r}=e,o=kj(rG),i=Fj()||rG,a=oG(r,o,n),s=oG(r,i,n,!0),l=(r?a[r]:a).direction==="rtl";return k.jsx(e0e,{theme:s,children:k.jsx(KS.Provider,{value:a,children:k.jsx(t0e,{value:l,children:k.jsx(n0e,{value:r?a[r].components:a.components,children:t})})})})}const iG={theme:void 0};function i0e(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(iG.theme=o.theme,i=pte(e(iG)),t=i,n=o.theme),i}}const jj="mode",Bj="color-scheme",a0e="data-color-scheme";function s0e(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=jj,colorSchemeStorageKey:i=Bj,attribute:a=a0e,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const h=u.substring(1);c+=`${s}.classList.remove('${h}'.replace('%s', light), '${h}'.replace('%s', dark));
- ${s}.classList.add('${h}'.replace('%s', colorScheme));`}const f=u.match(/\[([^\]]+)\]/);if(f){const[h,m]=f[1].split("=");m||(c+=`${s}.removeAttribute('${h}'.replace('%s', light));
- ${s}.removeAttribute('${h}'.replace('%s', dark));`),c+=`
- ${s}.setAttribute('${h}'.replace('%s', colorScheme), ${m?`${m}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return k.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() {
+ */var W3;function Ave(){if(W3)return wr;W3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case e:switch(y=y.type,y){case n:case o:case r:case l:case c:case p:return y;default:switch(y=y&&y.$$typeof,y){case a:case s:case f:case u:return y;case i:return y;default:return v}}case t:return v}}}return wr.ContextConsumer=i,wr.ContextProvider=a,wr.Element=e,wr.ForwardRef=s,wr.Fragment=n,wr.Lazy=f,wr.Memo=u,wr.Portal=t,wr.Profiler=o,wr.StrictMode=r,wr.Suspense=l,wr.SuspenseList=c,wr.isContextConsumer=function(y){return g(y)===i},wr.isContextProvider=function(y){return g(y)===a},wr.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},wr.isForwardRef=function(y){return g(y)===s},wr.isFragment=function(y){return g(y)===n},wr.isLazy=function(y){return g(y)===f},wr.isMemo=function(y){return g(y)===u},wr.isPortal=function(y){return g(y)===t},wr.isProfiler=function(y){return g(y)===o},wr.isStrictMode=function(y){return g(y)===r},wr.isSuspense=function(y){return g(y)===l},wr.isSuspenseList=function(y){return g(y)===c},wr.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===l||y===c||typeof y=="object"&&y!==null&&(y.$$typeof===f||y.$$typeof===u||y.$$typeof===a||y.$$typeof===i||y.$$typeof===s||y.$$typeof===m||y.getModuleId!==void 0)},wr.typeOf=g,wr}var K3;function Mve(){return K3||(K3=1,bR.exports=Ave()),bR.exports}var ate=Mve();function bc(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 ste(e){if(x.isValidElement(e)||ate.isValidElementType(e)||!bc(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ste(e[n])}),t}function si(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return bc(e)&&bc(t)&&Object.keys(t).forEach(o=>{x.isValidElement(t[o])||ate.isValidElementType(t[o])?r[o]=t[o]:bc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&bc(e[o])?r[o]=si(e[o],t[o],n):n.clone?r[o]=bc(t[o])?ste(t[o]):t[o]:r[o]=t[o]}),r}const Rve=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Dve(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=Rve(t),a=Object.keys(i);function s(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function u(p){return a.indexOf(p)+1<a.length?c(p,a[a.indexOf(p)+1]):s(p)}function f(p){const m=a.indexOf(p);return m===0?s(a[1]):m===a.length-1?l(a[m]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:s,down:l,between:c,only:u,not:f,unit:n,...o}}function kve(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function _ve(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function $ve(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function Nve(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const Lve={borderRadius:4};function q0(e,t){return t?si(e,t,{clone:!1}):e}const GO={xs:0,sm:600,md:900,lg:1200,xl:1536},Y3={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${GO[e]}px)`},Fve={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:GO[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Kl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||Y3;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||Y3;return Object.keys(t).reduce((a,s)=>{if(_ve(i.keys,s)){const l=$ve(r.containerQueries?r:Fve,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||GO).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function lte(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function cte(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function jve(e,...t){const n=lte(e),r=[n,...t].reduce((o,i)=>si(o,i),{});return cte(Object.keys(n),r)}function Bve(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i<e.length&&(n[o]=!0)}):r.forEach(o=>{e[o]!=null&&(n[o]=!0)}),n}function xR({values:e,breakpoints:t,base:n}){const r=n||Bve(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Oe(e){if(typeof e!="string")throw new Error(zu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function qO(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function zE(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=qO(e,n)||r,t&&(o=t(o,r,e)),o}function To(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=qO(l,r)||{};return Kl(a,s,f=>{let p=zE(c,o,f);return f===p&&typeof f=="string"&&(p=zE(c,o,`${t}${f==="default"?"":Oe(f)}`,f)),n===!1?p:{[n]:p}})};return i.propTypes={},i.filterProps=[t],i}function zve(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Vve={m:"margin",p:"padding"},Hve={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Q3={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Uve=zve(e=>{if(e.length>2)if(Q3[e])e=Q3[e];else return[e];const[t,n]=e.split(""),r=Vve[t],o=Hve[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Rj=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Dj=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Rj,...Dj];function QS(e,t,n,r){const o=qO(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function WO(e){return QS(e,"spacing",8)}function uh(e,t){return typeof t=="string"||t==null?t:e(t)}function Gve(e,t){return n=>e.reduce((r,o)=>(r[o]=uh(t,n),r),{})}function qve(e,t,n,r){if(!t.includes(n))return null;const o=Uve(n),i=Gve(o,r),a=e[n];return Kl(e,a,i)}function ute(e,t){const n=WO(e.theme);return Object.keys(e).map(r=>qve(e,t,r,n)).reduce(q0,{})}function so(e){return ute(e,Rj)}so.propTypes={};so.filterProps=Rj;function lo(e){return ute(e,Dj)}lo.propTypes={};lo.filterProps=Dj;function dte(e=8,t=WO({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function KO(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?q0(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Fs(e){return typeof e!="number"?e:`${e}px solid`}function ll(e,t){return To({prop:e,themeKey:"borders",transform:t})}const Wve=ll("border",Fs),Kve=ll("borderTop",Fs),Yve=ll("borderRight",Fs),Qve=ll("borderBottom",Fs),Xve=ll("borderLeft",Fs),Jve=ll("borderColor"),Zve=ll("borderTopColor"),ebe=ll("borderRightColor"),tbe=ll("borderBottomColor"),nbe=ll("borderLeftColor"),rbe=ll("outline",Fs),obe=ll("outlineColor"),YO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=QS(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:uh(t,r)});return Kl(e,e.borderRadius,n)}return null};YO.propTypes={};YO.filterProps=["borderRadius"];KO(Wve,Kve,Yve,Qve,Xve,Jve,Zve,ebe,tbe,nbe,YO,rbe,obe);const QO=e=>{if(e.gap!==void 0&&e.gap!==null){const t=QS(e.theme,"spacing",8),n=r=>({gap:uh(t,r)});return Kl(e,e.gap,n)}return null};QO.propTypes={};QO.filterProps=["gap"];const XO=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=QS(e.theme,"spacing",8),n=r=>({columnGap:uh(t,r)});return Kl(e,e.columnGap,n)}return null};XO.propTypes={};XO.filterProps=["columnGap"];const JO=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=QS(e.theme,"spacing",8),n=r=>({rowGap:uh(t,r)});return Kl(e,e.rowGap,n)}return null};JO.propTypes={};JO.filterProps=["rowGap"];const ibe=To({prop:"gridColumn"}),abe=To({prop:"gridRow"}),sbe=To({prop:"gridAutoFlow"}),lbe=To({prop:"gridAutoColumns"}),cbe=To({prop:"gridAutoRows"}),ube=To({prop:"gridTemplateColumns"}),dbe=To({prop:"gridTemplateRows"}),fbe=To({prop:"gridTemplateAreas"}),pbe=To({prop:"gridArea"});KO(QO,XO,JO,ibe,abe,sbe,lbe,cbe,ube,dbe,fbe,pbe);function Rg(e,t){return t==="grey"?t:e}const hbe=To({prop:"color",themeKey:"palette",transform:Rg}),mbe=To({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Rg}),gbe=To({prop:"backgroundColor",themeKey:"palette",transform:Rg});KO(hbe,mbe,gbe);function Ga(e){return e<=1&&e!==0?`${e*100}%`:e}const ybe=To({prop:"width",transform:Ga}),kj=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||GO[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ga(n)}};return Kl(e,e.maxWidth,t)}return null};kj.filterProps=["maxWidth"];const vbe=To({prop:"minWidth",transform:Ga}),bbe=To({prop:"height",transform:Ga}),xbe=To({prop:"maxHeight",transform:Ga}),Sbe=To({prop:"minHeight",transform:Ga});To({prop:"size",cssProperty:"width",transform:Ga});To({prop:"size",cssProperty:"height",transform:Ga});const wbe=To({prop:"boxSizing"});KO(ybe,kj,vbe,bbe,xbe,Sbe,wbe);const XS={border:{themeKey:"borders",transform:Fs},borderTop:{themeKey:"borders",transform:Fs},borderRight:{themeKey:"borders",transform:Fs},borderBottom:{themeKey:"borders",transform:Fs},borderLeft:{themeKey:"borders",transform:Fs},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Fs},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:YO},color:{themeKey:"palette",transform:Rg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Rg},backgroundColor:{themeKey:"palette",transform:Rg},p:{style:lo},pt:{style:lo},pr:{style:lo},pb:{style:lo},pl:{style:lo},px:{style:lo},py:{style:lo},padding:{style:lo},paddingTop:{style:lo},paddingRight:{style:lo},paddingBottom:{style:lo},paddingLeft:{style:lo},paddingX:{style:lo},paddingY:{style:lo},paddingInline:{style:lo},paddingInlineStart:{style:lo},paddingInlineEnd:{style:lo},paddingBlock:{style:lo},paddingBlockStart:{style:lo},paddingBlockEnd:{style:lo},m:{style:so},mt:{style:so},mr:{style:so},mb:{style:so},ml:{style:so},mx:{style:so},my:{style:so},margin:{style:so},marginTop:{style:so},marginRight:{style:so},marginBottom:{style:so},marginLeft:{style:so},marginX:{style:so},marginY:{style:so},marginInline:{style:so},marginInlineStart:{style:so},marginInlineEnd:{style:so},marginBlock:{style:so},marginBlockStart:{style:so},marginBlockEnd:{style:so},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:QO},rowGap:{style:JO},columnGap:{style:XO},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ga},maxWidth:{style:kj},minWidth:{transform:Ga},height:{transform:Ga},maxHeight:{transform:Ga},minHeight:{transform:Ga},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 Cbe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Ebe(e,t){return typeof e=="function"?e(t):e}function Tbe(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const p=qO(o,c)||{};return f?f(a):Kl(a,r,g=>{let y=zE(p,u,g);return g===y&&typeof g=="string"&&(y=zE(p,u,`${n}${g==="default"?"":Oe(g)}`,g)),l===!1?y:{[l]:y}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??XS;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=lte(o.breakpoints),u=Object.keys(c);let f=c;return Object.keys(l).forEach(p=>{const m=Ebe(l[p],o);if(m!=null)if(typeof m=="object")if(i[p])f=q0(f,e(p,m,o,i));else{const g=Kl({theme:o},m,y=>({[p]:y}));Cbe(g,m)?f[p]=t({sx:m,theme:o}):f=q0(f,g)}else f=q0(f,e(p,m,o,i))}),kve(o,cte(u,f))}return Array.isArray(r)?r.map(a):a(r)}return t}const Ef=Tbe();Ef.filterProps=["sx"];function Obe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function rv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=Dve(n),l=dte(o);let c=si({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Lve,...i}},a);return c=Nve(c),c.applyStyles=Obe,c=t.reduce((u,f)=>si(u,f),c),c.unstable_sxConfig={...XS,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(f){return Ef({sx:f,theme:this})},c}function Ibe(e){return Object.keys(e).length===0}function _j(e=null){const t=x.useContext(KS);return!t||Ibe(t)?e:t}const Pbe=rv();function JS(e=Pbe){return _j(e)}function Abe({styles:e,themeId:t,defaultTheme:n={}}){const r=JS(n),o=typeof e=="function"?e(t&&r[t]||r):e;return k.jsx(ote,{styles:o})}const Mbe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??XS;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function ZO(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=Mbe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return bc(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const X3=e=>e,Rbe=()=>{let e=X3;return{configure(t){e=t},generate(t){return e(t)},reset(){e=X3}}},fte=Rbe();function pte(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=pte(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fe(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pte(e))&&(r&&(r+=" "),r+=t);return r}function Dbe(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=ite("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(Ef);return x.forwardRef(function(l,c){const u=JS(n),{className:f,component:p="div",...m}=ZO(l);return k.jsx(i,{as:p,ref:c,className:fe(f,o?o(r):r),theme:t&&u[t]||u,...m})})}const kbe={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 qe(e,t,n="Mui"){const r=kbe[t];return r?`${n}-${r}`:`${fte.generate(e)}-${t}`}function Ke(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=qe(e,o,n)}),r}function hte(e){const{variants:t,...n}=e,r={variants:t,style:q3(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=q3(o.style))}),r}const _be=rv();function Ca(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function $be(e){return e?(t,n)=>n[e]:null}function Nbe(e,t,n){e.theme=Fbe(e.theme)?n:e.theme[t]||e.theme}function fE(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>fE(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return mte(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function mte(e,t,n=[]){var o;let r;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(r))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&((o=e.ownerState)==null?void 0:o[s])!==a.props[s])continue e;typeof a.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(a.style(r))):n.push(a.style)}return n}function gte(e={}){const{themeId:t,defaultTheme:n=_be,rootShouldForwardProp:r=Ca,slotShouldForwardProp:o=Ca}=e;function i(s){Nbe(s,t,n)}return(s,l={})=>{Pve(s,O=>O.filter(P=>P!==Ef));const{name:c,slot:u,skipVariantsResolver:f,skipSx:p,overridesResolver:m=$be(Bbe(u)),...g}=l,y=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,v=p||!1;let w=Ca;u==="Root"||u==="root"?w=r:u?w=o:jbe(s)&&(w=void 0);const C=ite(s,{shouldForwardProp:w,label:Lbe(),...g}),E=O=>{if(typeof O=="function"&&O.__emotion_real!==O)return function(R){return fE(R,O)};if(bc(O)){const P=hte(O);return P.variants?function(D){return fE(D,P)}:P.style}return O},I=(...O)=>{const P=[],R=O.map(E),D=[];if(P.push(i),c&&m&&D.push(function(N){var L,V;const H=(V=(L=N.theme.components)==null?void 0:L[c])==null?void 0:V.styleOverrides;if(!H)return null;const j={};for(const W in H)j[W]=fE(N,H[W]);return m(N,j)}),c&&!y&&D.push(function(N){var j,L;const B=N.theme,H=(L=(j=B==null?void 0:B.components)==null?void 0:j[c])==null?void 0:L.variants;return H?mte(N,H):null}),v||D.push(Ef),Array.isArray(R[0])){const _=R.shift(),N=new Array(P.length).fill(""),B=new Array(D.length).fill("");let H;H=[...N,..._,...B],H.raw=[...N,..._.raw,...B],P.unshift(H)}const M=[...P,...R,...D],A=C(...M);return s.muiName&&(A.muiName=s.muiName),A};return C.withConfig&&(I.withConfig=C.withConfig),I}}function Lbe(e,t){return void 0}function Fbe(e){for(const t in e)return!1;return!0}function jbe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Bbe(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Nn=gte();function dh(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=dh(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function $j(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:dh(t.components[n].defaultProps,r)}function eI({props:e,name:t,defaultTheme:n,themeId:r}){let o=JS(n);return r&&(o=o[r]||o),$j({theme:o,name:t,props:e})}const In=typeof window<"u"?x.useLayoutEffect:x.useEffect;function zbe(e,t,n,r,o){const[i,a]=x.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return In(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const Vbe={...jE},yte=Vbe.useSyncExternalStore;function Hbe(e,t,n,r,o){const i=x.useCallback(()=>t,[t]),a=x.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=x.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,f=>(u.addEventListener("change",f),()=>{u.removeEventListener("change",f)})]},[i,n,e]);return yte(l,s,a)}function vte(e={}){const{themeId:t}=e;return function(r,o={}){let i=_j();i&&t&&(i=i[t]||i);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:c=null,noSsr:u=!1}=$j({name:"MuiUseMediaQuery",props:o,theme:i});let f=typeof r=="function"?r(i):r;return f=f.replace(/^@media( ?)/m,""),(yte!==void 0?Hbe:zbe)(f,s,l,c,u)}}vte();function Ube(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Nj(e,t=0,n=1){return Ube(e,t,n)}function Gbe(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Tf(e){if(e.type)return e;if(e.charAt(0)==="#")return Tf(Gbe(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(zu(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(zu(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const qbe=e=>{const t=Tf(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},A0=(e,t)=>{try{return qbe(e)}catch{return e}};function tI(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function bte(e){e=Tf(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),tI({type:s,values:l})}function X$(e){e=Tf(e);let t=e.type==="hsl"||e.type==="hsla"?Tf(bte(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Wbe(e,t){const n=X$(e),r=X$(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Nt(e,t){return e=Tf(e),t=Nj(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,tI(e)}function m1(e,t,n){try{return Nt(e,t)}catch{return e}}function Vu(e,t){if(e=Tf(e),t=Nj(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return tI(e)}function Ir(e,t,n){try{return Vu(e,t)}catch{return e}}function Hu(e,t){if(e=Tf(e),t=Nj(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return tI(e)}function Pr(e,t,n){try{return Hu(e,t)}catch{return e}}function xte(e,t=.15){return X$(e)>.5?Vu(e,t):Hu(e,t)}function g1(e,t,n){try{return xte(e,t)}catch{return e}}const ov=U.oneOfType([U.func,U.object]);function J3(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Lh(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Dg(e,t){var n,r,o;return x.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function Mr(e){return e&&e.ownerDocument||document}function ns(e){return Mr(e).defaultView||window}function J$(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let Z3=0;function Kbe(e){const[t,n]=x.useState(e),r=e||t;return x.useEffect(()=>{t==null&&(Z3+=1,n(`mui-${Z3}`))},[t]),r}const Ybe={...jE},eG=Ybe.useId;function bn(e){if(eG!==void 0){const t=eG();return e??t}return Kbe(e)}function ia({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=x.useRef(e!==void 0),[i,a]=x.useState(t),s=o?e:i,l=x.useCallback(c=>{o||a(c)},[]);return[s,l]}function Je(e){const t=x.useRef(e);return In(()=>{t.current=e}),x.useRef((...n)=>(0,t.current)(...n)).current}function en(...e){const t=x.useRef(void 0),n=x.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return x.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const tG={};function Jl(e,t){const n=x.useRef(tG);return n.current===tG&&(n.current=e(t)),n}const Qbe=[];function Lj(e){x.useEffect(e,Qbe)}class nI{constructor(){Ce(this,"currentId",null);Ce(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Ce(this,"disposeEffect",()=>this.clear)}static create(){return new nI}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function _o(){const e=Jl(nI.create).current;return Lj(e.disposeEffect),e}function VE(e){try{return e.matches(":focus-visible")}catch{}return!1}function Ste(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const Fj=e=>{const t=x.useRef({});return x.useEffect(()=>{t.current=e}),t.current};function wte(e){return x.Children.toArray(e).filter(t=>x.isValidElement(t))}const Xbe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Me(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[o]=a}return r}function Jbe(e){return typeof e=="string"}function Cte(e,t,n){return e===void 0||Jbe(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function HE(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function nG(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Ete(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const m=fe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),g={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...n,...o,...r};return m.length>0&&(y.className=m),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:void 0}}const a=HE({...o,...r}),s=nG(r),l=nG(o),c=t(a),u=fe(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:c.ref}}function kc(e,t,n){return typeof e=="function"?e(t,n):e}function Dn(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:kc(n,r),{props:s,internalRef:l}=Ete({...i,externalSlotProps:a}),c=en(l,a==null?void 0:a.ref,(f=e.additionalProps)==null?void 0:f.ref);return Cte(t,{...s,ref:c},r)}function Nf(e){var t;return parseInt(x.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const Tte=x.createContext(null);function jj(){return x.useContext(Tte)}const Zbe=typeof Symbol=="function"&&Symbol.for,e0e=Zbe?Symbol.for("mui.nested"):"__THEME_NESTED__";function t0e(e,t){return typeof t=="function"?t(e):{...e,...t}}function n0e(e){const{children:t,theme:n}=e,r=jj(),o=x.useMemo(()=>{const i=r===null?{...n}:t0e(r,n);return i!=null&&(i[e0e]=r!==null),i},[n,r]);return k.jsx(Tte.Provider,{value:o,children:t})}const Ote=x.createContext();function r0e({value:e,...t}){return k.jsx(Ote.Provider,{value:e??!0,...t})}const vr=()=>x.useContext(Ote)??!1,Ite=x.createContext(void 0);function o0e({value:e,children:t}){return k.jsx(Ite.Provider,{value:e,children:t})}function i0e(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?dh(o.defaultProps,r):!o.styleOverrides&&!o.variants?dh(o,r):r}function a0e({props:e,name:t}){const n=x.useContext(Ite);return i0e({props:e,name:t,theme:{components:n}})}const rG={};function oG(e,t,n,r=!1){return x.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function Pte(e){const{children:t,theme:n,themeId:r}=e,o=_j(rG),i=jj()||rG,a=oG(r,o,n),s=oG(r,i,n,!0),l=(r?a[r]:a).direction==="rtl";return k.jsx(n0e,{theme:s,children:k.jsx(KS.Provider,{value:a,children:k.jsx(r0e,{value:l,children:k.jsx(o0e,{value:r?a[r].components:a.components,children:t})})})})}const iG={theme:void 0};function s0e(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(iG.theme=o.theme,i=hte(e(iG)),t=i,n=o.theme),i}}const Bj="mode",zj="color-scheme",l0e="data-color-scheme";function c0e(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=Bj,colorSchemeStorageKey:i=zj,attribute:a=l0e,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const p=u.substring(1);c+=`${s}.classList.remove('${p}'.replace('%s', light), '${p}'.replace('%s', dark));
+ ${s}.classList.add('${p}'.replace('%s', colorScheme));`}const f=u.match(/\[([^\]]+)\]/);if(f){const[p,m]=f[1].split("=");m||(c+=`${s}.removeAttribute('${p}'.replace('%s', light));
+ ${s}.removeAttribute('${p}'.replace('%s', dark));`),c+=`
+ ${s}.setAttribute('${p}'.replace('%s', colorScheme), ${m?`${m}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return k.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() {
try {
let colorScheme = '';
const mode = localStorage.getItem('${o}') || '${t}';
@@ -56,14 +56,14 @@ try {
if (colorScheme) {
${c}
}
-} catch(e){}})();`}},"mui-color-scheme-init")}function l0e(){}const c0e=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return l0e;const r=o=>{const i=o.newValue;o.key===e&&n(i)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function xR(){}function aG(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Pte(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function u0e(e){return Pte(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function d0e(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=jj,colorSchemeStorageKey:a=Bj,storageWindow:s=typeof window>"u"?void 0:window,storageManager:l=c0e,noSsr:c=!1}=e,u=o.join(","),f=o.length>1,h=x.useMemo(()=>l==null?void 0:l({key:i,storageWindow:s}),[l,i,s]),m=x.useMemo(()=>l==null?void 0:l({key:`${a}-light`,storageWindow:s}),[l,a,s]),g=x.useMemo(()=>l==null?void 0:l({key:`${a}-dark`,storageWindow:s}),[l,a,s]),[y,v]=x.useState(()=>{const D=(h==null?void 0:h.get(t))||t,M=(m==null?void 0:m.get(n))||n,A=(g==null?void 0:g.get(r))||r;return{mode:D,systemMode:aG(D),lightColorScheme:M,darkColorScheme:A}}),[w,C]=x.useState(c||!f);x.useEffect(()=>{C(!0)},[]);const E=u0e(y),I=x.useCallback(D=>{v(M=>{if(D===M.mode)return M;const A=D??t;return h==null||h.set(A),{...M,mode:A,systemMode:aG(A)}})},[h,t]),O=x.useCallback(D=>{D?typeof D=="string"?D&&!u.includes(D)?console.error(`\`${D}\` does not exist in \`theme.colorSchemes\`.`):v(M=>{const A={...M};return Pte(M,_=>{_==="light"&&(m==null||m.set(D),A.lightColorScheme=D),_==="dark"&&(g==null||g.set(D),A.darkColorScheme=D)}),A}):v(M=>{const A={...M},_=D.light===null?n:D.light,N=D.dark===null?r:D.dark;return _&&(u.includes(_)?(A.lightColorScheme=_,m==null||m.set(_)):console.error(`\`${_}\` does not exist in \`theme.colorSchemes\`.`)),N&&(u.includes(N)?(A.darkColorScheme=N,g==null||g.set(N)):console.error(`\`${N}\` does not exist in \`theme.colorSchemes\`.`)),A}):v(M=>(m==null||m.set(n),g==null||g.set(r),{...M,lightColorScheme:n,darkColorScheme:r}))},[u,m,g,n,r]),P=x.useCallback(D=>{y.mode==="system"&&v(M=>{const A=D!=null&&D.matches?"dark":"light";return M.systemMode===A?M:{...M,systemMode:A}})},[y.mode]),R=x.useRef(P);return R.current=P,x.useEffect(()=>{if(typeof window.matchMedia!="function"||!f)return;const D=(...A)=>R.current(...A),M=window.matchMedia("(prefers-color-scheme: dark)");return M.addListener(D),D(M),()=>{M.removeListener(D)}},[f]),x.useEffect(()=>{if(f){const D=(h==null?void 0:h.subscribe(_=>{(!_||["light","dark","system"].includes(_))&&I(_||t)}))||xR,M=(m==null?void 0:m.subscribe(_=>{(!_||u.match(_))&&O({light:_})}))||xR,A=(g==null?void 0:g.subscribe(_=>{(!_||u.match(_))&&O({dark:_})}))||xR;return()=>{D(),M(),A()}}},[O,I,u,t,s,f,h,m,g]),{...y,mode:w?y.mode:void 0,systemMode:w?y.systemMode:void 0,colorScheme:w?E:void 0,setMode:I,setColorScheme:O}}const f0e="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function p0e(e){const{themeId:t,theme:n={},modeStorageKey:r=jj,colorSchemeStorageKey:o=Bj,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=x.createContext(void 0),u=()=>x.useContext(c)||l,f={},h={};function m(w){var We,rt,ut,Be;const{children:C,theme:E,modeStorageKey:I=r,colorSchemeStorageKey:O=o,disableTransitionOnChange:P=i,storageManager:R,storageWindow:D=typeof window>"u"?void 0:window,documentNode:M=typeof document>"u"?void 0:document,colorSchemeNode:A=typeof document>"u"?void 0:document.documentElement,disableNestedContext:_=!1,disableStyleSheetGeneration:N=!1,defaultMode:B="system",forceThemeRerender:H=!1,noSsr:j}=w,L=x.useRef(!1),V=Fj(),W=x.useContext(c),K=!!W&&!_,G=x.useMemo(()=>E||(typeof n=="function"?n():n),[E]),q=G[t],Y=q||G,{colorSchemes:Z=f,components:ie=h,cssVarPrefix:se}=Y,ce=Object.keys(Z).filter(et=>!!Z[et]).join(","),ye=x.useMemo(()=>ce.split(","),[ce]),Se=typeof a=="string"?a:a.light,ne=typeof a=="string"?a:a.dark,le=Z[Se]&&Z[ne]?B:((rt=(We=Z[Y.defaultColorScheme])==null?void 0:We.palette)==null?void 0:rt.mode)||((ut=Y.palette)==null?void 0:ut.mode),{mode:de,setMode:oe,systemMode:ue,lightColorScheme:pe,darkColorScheme:Ee,colorScheme:xe,setColorScheme:Re}=d0e({supportedColorSchemes:ye,defaultLightColorScheme:Se,defaultDarkColorScheme:ne,modeStorageKey:I,colorSchemeStorageKey:O,defaultMode:le,storageManager:R,storageWindow:D,noSsr:j});let he=de,Pe=xe;K&&(he=W.mode,Pe=W.colorScheme);let ve=Pe||Y.defaultColorScheme;Y.vars&&!H&&(ve=Y.defaultColorScheme);const Ie=x.useMemo(()=>{var It;const et=((It=Y.generateThemeVars)==null?void 0:It.call(Y))||Y.vars,Le={...Y,components:ie,colorSchemes:Z,cssVarPrefix:se,vars:et};if(typeof Le.generateSpacing=="function"&&(Le.spacing=Le.generateSpacing()),ve){const Lt=Z[ve];Lt&&typeof Lt=="object"&&Object.keys(Lt).forEach(nt=>{Lt[nt]&&typeof Lt[nt]=="object"?Le[nt]={...Le[nt],...Lt[nt]}:Le[nt]=Lt[nt]})}return s?s(Le):Le},[Y,ve,ie,Z,se]),te=Y.colorSchemeSelector;In(()=>{if(Pe&&A&&te&&te!=="media"){const et=te;let Le=te;if(et==="class"&&(Le=".%s"),et==="data"&&(Le="[data-%s]"),et!=null&&et.startsWith("data-")&&!et.includes("%s")&&(Le=`[${et}="%s"]`),Le.startsWith("."))A.classList.remove(...ye.map(It=>Le.substring(1).replace("%s",It))),A.classList.add(Le.substring(1).replace("%s",Pe));else{const It=Le.replace("%s",Pe).match(/\[([^\]]+)\]/);if(It){const[Lt,nt]=It[1].split("=");nt||ye.forEach(lt=>{A.removeAttribute(Lt.replace(Pe,lt))}),A.setAttribute(Lt,nt?nt.replace(/"|'/g,""):"")}else A.setAttribute(Le,Pe)}}},[Pe,te,A,ye]),x.useEffect(()=>{let et;if(P&&L.current&&M){const Le=M.createElement("style");Le.appendChild(M.createTextNode(f0e)),M.head.appendChild(Le),window.getComputedStyle(M.body),et=setTimeout(()=>{M.head.removeChild(Le)},1)}return()=>{clearTimeout(et)}},[Pe,P,M]),x.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);const Te=x.useMemo(()=>({allColorSchemes:ye,colorScheme:Pe,darkColorScheme:Ee,lightColorScheme:pe,mode:he,setColorScheme:Re,setMode:oe,systemMode:ue}),[ye,Pe,Ee,pe,he,Re,oe,ue,Ie.colorSchemeSelector]);let De=!0;(N||Y.cssVariables===!1||K&&(V==null?void 0:V.cssVarPrefix)===se)&&(De=!1);const Ve=k.jsxs(x.Fragment,{children:[k.jsx(Ite,{themeId:q?t:void 0,theme:Ie,children:C}),De&&k.jsx(rte,{styles:((Be=Ie.generateStyleSheets)==null?void 0:Be.call(Ie))||[]})]});return K?Ve:k.jsx(c.Provider,{value:Te,children:Ve})}const g=typeof a=="string"?a:a.light,y=typeof a=="string"?a:a.dark;return{CssVarsProvider:m,useColorScheme:u,getInitColorSchemeScript:w=>s0e({colorSchemeStorageKey:o,defaultLightColorScheme:g,defaultDarkColorScheme:y,modeStorageKey:r,...w})}}function h0e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const sG=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},m0e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},g0e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function SR(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return m0e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,f=g0e(s,l);Object.assign(o,{[u]:f}),sG(i,s,`var(${u})`,c),sG(a,s,`var(${u}, ${f})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function y0e(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:f}=SR(l,t);let h=f;const m={},{[s]:g,...y}=i;if(Object.entries(y||{}).forEach(([E,I])=>{const{vars:O,css:P,varsWithDefaults:R}=SR(I,t);h=si(h,R),m[E]={css:P,vars:O}}),g){const{css:E,vars:I,varsWithDefaults:O}=SR(g,t);h=si(h,O),m[s]={css:E,vars:I}}function v(E,I){var P,R;let O=o;if(o==="class"&&(O=".%s"),o==="data"&&(O="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(O=`[${o}="%s"]`),E){if(O==="media")return e.defaultColorScheme===E?":root":{[`@media (prefers-color-scheme: ${((R=(P=i[E])==null?void 0:P.palette)==null?void 0:R.mode)||E})`]:{":root":I}};if(O)return e.defaultColorScheme===E?`:root, ${O.replace("%s",String(E))}`:O.replace("%s",String(E))}return":root"}return{vars:h,generateThemeVars:()=>{let E={...c};return Object.entries(m).forEach(([,{vars:I}])=>{E=si(E,I)}),E},generateStyleSheets:()=>{var D,M;const E=[],I=e.defaultColorScheme||"light";function O(A,_){Object.keys(_).length&&E.push(typeof A=="string"?{[A]:{..._}}:A)}O(n(void 0,{...u}),u);const{[I]:P,...R}=m;if(P){const{css:A}=P,_=(M=(D=i[I])==null?void 0:D.palette)==null?void 0:M.mode,N=!r&&_?{colorScheme:_,...A}:{...A};O(n(I,{...N}),N)}return Object.entries(R).forEach(([A,{css:_}])=>{var H,j;const N=(j=(H=i[A])==null?void 0:H.palette)==null?void 0:j.mode,B=!r&&N?{colorScheme:N,..._}:{..._};O(n(A,{...B}),B)}),E}}}function v0e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const b0e=nv(),x0e=Nn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Oe(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),S0e=e=>ZO({props:e,name:"MuiContainer",defaultTheme:b0e}),w0e=(e,t)=>{const n=l=>qe(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Oe(String(a))}`,o&&"fixed",i&&"disableGutters"]};return Me(s,n,r)};function C0e(e={}){const{createStyledComponent:t=x0e,useThemeProps:n=S0e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,f=a.breakpoints.values[u];return f!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${f}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return x.forwardRef(function(s,l){const c=n(s),{className:u,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:g="lg",classes:y,...v}=c,w={...c,component:f,disableGutters:h,fixed:m,maxWidth:g},C=w0e(w,r);return k.jsx(o,{as:f,ownerState:w,className:fe(C.root,u),ref:l,...v})})}const E0e=(e,t)=>e.filter(n=>t.includes(n)),ov=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:E0e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function HE(e){return`--Grid-${e}Spacing`}function nI(e){return`--Grid-parent-${e}Spacing`}const lG="--Grid-columns",Dg="--Grid-parent-columns",T0e=({theme:e,ownerState:t})=>{const n={};return ov(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${Dg}) - (var(${Dg}) - ${o}) * (var(${nI("column")}) / var(${Dg})))`}),r(n,i)}),n},O0e=({theme:e,ownerState:t})=>{const n={};return ov(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${Dg}) + var(${nI("column")}) * ${o} / var(${Dg}))`}),r(n,i)}),n},I0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[lG]:12};return ov(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[lG]:i,"> *":{[Dg]:i}})}),n},P0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return ov(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[HE("row")]:i,"> *":{[nI("row")]:i}})}),n},A0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return ov(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[HE("column")]:i,"> *":{[nI("column")]:i}})}),n},M0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return ov(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},R0e=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${HE("row")}) var(${HE("column")})`}}),D0e=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},k0e=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},_0e=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`];function $0e(e,t){e.item!==void 0&&delete e.item,e.zeroMinWidth!==void 0&&delete e.zeroMinWidth,t.keys.forEach(n=>{e[n]!==void 0&&delete e[n]})}const N0e=nv(),L0e=Nn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function F0e(e){return ZO({props:e,name:"MuiGrid",defaultTheme:N0e})}function j0e(e={}){const{createStyledComponent:t=L0e,useThemeProps:n=F0e,useTheme:r=JS,componentName:o="MuiGrid"}=e,i=(c,u)=>{const{container:f,direction:h,spacing:m,wrap:g,size:y}=c,v={root:["root",f&&"container",g!=="wrap"&&`wrap-xs-${String(g)}`,..._0e(h),...D0e(y),...f?k0e(m,u.breakpoints.keys[0]):[]]};return Me(v,w=>qe(o,w),{})};function a(c,u,f=()=>!0){const h={};return c===null||(Array.isArray(c)?c.forEach((m,g)=>{m!==null&&f(m)&&u.keys[g]&&(h[u.keys[g]]=m)}):typeof c=="object"?Object.keys(c).forEach(m=>{const g=c[m];g!=null&&f(g)&&(h[m]=g)}):h[u.keys[0]]=c),h}const s=t(I0e,A0e,P0e,T0e,M0e,R0e,O0e),l=x.forwardRef(function(u,f){const h=r(),m=n(u),g=JO(m);$0e(g,h.breakpoints);const{className:y,children:v,columns:w=12,container:C=!1,component:E="div",direction:I="row",wrap:O="wrap",size:P={},offset:R={},spacing:D=0,rowSpacing:M=D,columnSpacing:A=D,unstable_level:_=0,...N}=g,B=a(P,h.breakpoints,q=>q!==!1),H=a(R,h.breakpoints),j=u.columns??(_?void 0:w),L=u.spacing??(_?void 0:D),V=u.rowSpacing??u.spacing??(_?void 0:M),W=u.columnSpacing??u.spacing??(_?void 0:A),K={...g,level:_,columns:j,container:C,direction:I,wrap:O,spacing:L,rowSpacing:V,columnSpacing:W,size:B,offset:H},G=i(K,h);return k.jsx(s,{ref:f,as:E,ownerState:K,className:fe(G.root,y),...N,children:x.Children.map(v,q=>{var Y;return x.isValidElement(q)&&Rg(q,["Grid"])&&C&&q.props.container?x.cloneElement(q,{unstable_level:((Y=q.props)==null?void 0:Y.unstable_level)??_+1}):q})})});return l.muiName="Grid",l}const B0e=nv(),z0e=Nn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function V0e(e){return ZO({props:e,name:"MuiStack",defaultTheme:B0e})}function H0e(e,t){const n=x.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(x.cloneElement(t,{key:`separator-${i}`})),r),[])}const U0e=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],G0e=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...ql({theme:t},bR({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=qO(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=bR({values:e.direction,base:o}),a=bR({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const h=c>0?i[u[c-1]]:"column";i[l]=h}}),n=si(n,ql({theme:t},a,(l,c)=>e.useFlexGap?{gap:lh(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${U0e(c?i[c]:e.direction)}`]:lh(r,l)}}))}return n=Lve(t.breakpoints,n),n};function q0e(e={}){const{createStyledComponent:t=z0e,useThemeProps:n=V0e,componentName:r="MuiStack"}=e,o=()=>Me({root:["root"]},l=>qe(r,l),{}),i=t(G0e);return x.forwardRef(function(l,c){const u=n(l),f=JO(u),{component:h="div",direction:m="column",spacing:g=0,divider:y,children:v,className:w,useFlexGap:C=!1,...E}=f,I={direction:m,spacing:g,useFlexGap:C},O=o();return k.jsx(i,{as:h,ownerState:I,ref:c,className:fe(O.root,w),...E,children:y?H0e(v,y):v})})}const wx={black:"#000",white:"#fff"},W0e={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"},Nm={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Lm={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Wb={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Fm={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},jm={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Bm={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Ate(){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:wx.white,default:wx.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 K0e=Ate();function Mte(){return{text:{primary:wx.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:wx.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 cG=Mte();function uG(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Vu(e.main,o):t==="dark"&&(e.dark=zu(e.main,i)))}function Y0e(e="light"){return e==="dark"?{main:Fm[200],light:Fm[50],dark:Fm[400]}:{main:Fm[700],light:Fm[400],dark:Fm[800]}}function Q0e(e="light"){return e==="dark"?{main:Nm[200],light:Nm[50],dark:Nm[400]}:{main:Nm[500],light:Nm[300],dark:Nm[700]}}function X0e(e="light"){return e==="dark"?{main:Lm[500],light:Lm[300],dark:Lm[700]}:{main:Lm[700],light:Lm[400],dark:Lm[800]}}function J0e(e="light"){return e==="dark"?{main:jm[400],light:jm[300],dark:jm[700]}:{main:jm[700],light:jm[500],dark:jm[900]}}function Z0e(e="light"){return e==="dark"?{main:Bm[400],light:Bm[300],dark:Bm[700]}:{main:Bm[800],light:Bm[500],dark:Bm[900]}}function exe(e="light"){return e==="dark"?{main:Wb[400],light:Wb[300],dark:Wb[700]}:{main:"#ed6c02",light:Wb[500],dark:Wb[900]}}function zj(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||Y0e(t),a=e.secondary||Q0e(t),s=e.error||X0e(t),l=e.info||J0e(t),c=e.success||Z0e(t),u=e.warning||exe(t);function f(y){return Gbe(y,cG.text.primary)>=n?cG.text.primary:K0e.text.primary}const h=({color:y,name:v,mainShade:w=500,lightShade:C=300,darkShade:E=700})=>{if(y={...y},!y.main&&y[w]&&(y.main=y[w]),!y.hasOwnProperty("main"))throw new Error(Bu(11,v?` (${v})`:"",w));if(typeof y.main!="string")throw new Error(Bu(12,v?` (${v})`:"",JSON.stringify(y.main)));return uG(y,"light",C,r),uG(y,"dark",E,r),y.contrastText||(y.contrastText=f(y.main)),y};let m;return t==="light"?m=Ate():t==="dark"&&(m=Mte()),si({common:{...wx},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:W0e,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r,...m},o)}function txe(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function nxe(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function rxe(e){return Math.round(e*1e5)/1e5}const dG={textTransform:"uppercase"},fG='"Roboto", "Helvetica", "Arial", sans-serif';function Rte(e,t){const{fontFamily:n=fG,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...f}=typeof t=="function"?t(e):t,h=r/14,m=u||(v=>`${v/l*h}rem`),g=(v,w,C,E,I)=>({fontFamily:n,fontWeight:v,fontSize:m(w),lineHeight:C,...n===fG?{letterSpacing:`${rxe(E/w)}em`}:{},...I,...c}),y={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(a,14,1.75,.4,dG),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,dG),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return si({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...y},f,{clone:!1})}const oxe=.2,ixe=.14,axe=.12;function qr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${oxe})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ixe})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${axe})`].join(",")}const sxe=["none",qr(0,2,1,-1,0,1,1,0,0,1,3,0),qr(0,3,1,-2,0,2,2,0,0,1,5,0),qr(0,3,3,-2,0,3,4,0,0,1,8,0),qr(0,2,4,-1,0,4,5,0,0,1,10,0),qr(0,3,5,-1,0,5,8,0,0,1,14,0),qr(0,3,5,-1,0,6,10,0,0,1,18,0),qr(0,4,5,-2,0,7,10,1,0,2,16,1),qr(0,5,5,-3,0,8,10,1,0,3,14,2),qr(0,5,6,-3,0,9,12,1,0,3,16,2),qr(0,6,6,-3,0,10,14,1,0,4,18,3),qr(0,6,7,-4,0,11,15,1,0,4,20,3),qr(0,7,8,-4,0,12,17,2,0,5,22,4),qr(0,7,8,-4,0,13,19,2,0,5,24,4),qr(0,7,9,-4,0,14,21,2,0,5,26,4),qr(0,8,9,-5,0,15,22,2,0,6,28,5),qr(0,8,10,-5,0,16,24,2,0,6,30,5),qr(0,8,11,-5,0,17,26,2,0,6,32,5),qr(0,9,11,-5,0,18,28,2,0,7,34,6),qr(0,9,12,-6,0,19,29,2,0,7,36,6),qr(0,10,13,-6,0,20,31,3,0,8,38,7),qr(0,10,13,-6,0,21,33,3,0,8,40,7),qr(0,10,14,-6,0,22,35,3,0,8,42,7),qr(0,11,14,-7,0,23,36,3,0,9,44,8),qr(0,11,15,-7,0,24,38,3,0,9,46,8)],lxe={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)"},Dte={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function pG(e){return`${Math.round(e)}ms`}function cxe(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function uxe(e){const t={...lxe,...e.easing},n={...Dte,...e.duration};return{getAutoHeightDuration:cxe,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:pG(a)} ${s} ${typeof l=="string"?l:pG(l)}`).join(",")},...e,easing:t,duration:n}}const dxe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function fxe(e){return vc(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function kte(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[a,s]=o[i];!fxe(s)||a.startsWith("unstable_")?delete r[a]:vc(s)&&(r[a]={...s},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
+} catch(e){}})();`}},"mui-color-scheme-init")}function u0e(){}const d0e=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return u0e;const r=o=>{const i=o.newValue;o.key===e&&n(i)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function SR(){}function aG(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ate(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function f0e(e){return Ate(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function p0e(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=Bj,colorSchemeStorageKey:a=zj,storageWindow:s=typeof window>"u"?void 0:window,storageManager:l=d0e,noSsr:c=!1}=e,u=o.join(","),f=o.length>1,p=x.useMemo(()=>l==null?void 0:l({key:i,storageWindow:s}),[l,i,s]),m=x.useMemo(()=>l==null?void 0:l({key:`${a}-light`,storageWindow:s}),[l,a,s]),g=x.useMemo(()=>l==null?void 0:l({key:`${a}-dark`,storageWindow:s}),[l,a,s]),[y,v]=x.useState(()=>{const D=(p==null?void 0:p.get(t))||t,M=(m==null?void 0:m.get(n))||n,A=(g==null?void 0:g.get(r))||r;return{mode:D,systemMode:aG(D),lightColorScheme:M,darkColorScheme:A}}),[w,C]=x.useState(c||!f);x.useEffect(()=>{C(!0)},[]);const E=f0e(y),I=x.useCallback(D=>{v(M=>{if(D===M.mode)return M;const A=D??t;return p==null||p.set(A),{...M,mode:A,systemMode:aG(A)}})},[p,t]),O=x.useCallback(D=>{D?typeof D=="string"?D&&!u.includes(D)?console.error(`\`${D}\` does not exist in \`theme.colorSchemes\`.`):v(M=>{const A={...M};return Ate(M,_=>{_==="light"&&(m==null||m.set(D),A.lightColorScheme=D),_==="dark"&&(g==null||g.set(D),A.darkColorScheme=D)}),A}):v(M=>{const A={...M},_=D.light===null?n:D.light,N=D.dark===null?r:D.dark;return _&&(u.includes(_)?(A.lightColorScheme=_,m==null||m.set(_)):console.error(`\`${_}\` does not exist in \`theme.colorSchemes\`.`)),N&&(u.includes(N)?(A.darkColorScheme=N,g==null||g.set(N)):console.error(`\`${N}\` does not exist in \`theme.colorSchemes\`.`)),A}):v(M=>(m==null||m.set(n),g==null||g.set(r),{...M,lightColorScheme:n,darkColorScheme:r}))},[u,m,g,n,r]),P=x.useCallback(D=>{y.mode==="system"&&v(M=>{const A=D!=null&&D.matches?"dark":"light";return M.systemMode===A?M:{...M,systemMode:A}})},[y.mode]),R=x.useRef(P);return R.current=P,x.useEffect(()=>{if(typeof window.matchMedia!="function"||!f)return;const D=(...A)=>R.current(...A),M=window.matchMedia("(prefers-color-scheme: dark)");return M.addListener(D),D(M),()=>{M.removeListener(D)}},[f]),x.useEffect(()=>{if(f){const D=(p==null?void 0:p.subscribe(_=>{(!_||["light","dark","system"].includes(_))&&I(_||t)}))||SR,M=(m==null?void 0:m.subscribe(_=>{(!_||u.match(_))&&O({light:_})}))||SR,A=(g==null?void 0:g.subscribe(_=>{(!_||u.match(_))&&O({dark:_})}))||SR;return()=>{D(),M(),A()}}},[O,I,u,t,s,f,p,m,g]),{...y,mode:w?y.mode:void 0,systemMode:w?y.systemMode:void 0,colorScheme:w?E:void 0,setMode:I,setColorScheme:O}}const h0e="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function m0e(e){const{themeId:t,theme:n={},modeStorageKey:r=Bj,colorSchemeStorageKey:o=zj,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=x.createContext(void 0),u=()=>x.useContext(c)||l,f={},p={};function m(w){var We,rt,ut,Be;const{children:C,theme:E,modeStorageKey:I=r,colorSchemeStorageKey:O=o,disableTransitionOnChange:P=i,storageManager:R,storageWindow:D=typeof window>"u"?void 0:window,documentNode:M=typeof document>"u"?void 0:document,colorSchemeNode:A=typeof document>"u"?void 0:document.documentElement,disableNestedContext:_=!1,disableStyleSheetGeneration:N=!1,defaultMode:B="system",forceThemeRerender:H=!1,noSsr:j}=w,L=x.useRef(!1),V=jj(),W=x.useContext(c),K=!!W&&!_,G=x.useMemo(()=>E||(typeof n=="function"?n():n),[E]),q=G[t],Y=q||G,{colorSchemes:Z=f,components:ie=p,cssVarPrefix:se}=Y,ce=Object.keys(Z).filter(et=>!!Z[et]).join(","),ye=x.useMemo(()=>ce.split(","),[ce]),Se=typeof a=="string"?a:a.light,ne=typeof a=="string"?a:a.dark,le=Z[Se]&&Z[ne]?B:((rt=(We=Z[Y.defaultColorScheme])==null?void 0:We.palette)==null?void 0:rt.mode)||((ut=Y.palette)==null?void 0:ut.mode),{mode:de,setMode:oe,systemMode:ue,lightColorScheme:pe,darkColorScheme:Ee,colorScheme:xe,setColorScheme:Re}=p0e({supportedColorSchemes:ye,defaultLightColorScheme:Se,defaultDarkColorScheme:ne,modeStorageKey:I,colorSchemeStorageKey:O,defaultMode:le,storageManager:R,storageWindow:D,noSsr:j});let he=de,Pe=xe;K&&(he=W.mode,Pe=W.colorScheme);let ve=Pe||Y.defaultColorScheme;Y.vars&&!H&&(ve=Y.defaultColorScheme);const Ie=x.useMemo(()=>{var It;const et=((It=Y.generateThemeVars)==null?void 0:It.call(Y))||Y.vars,Le={...Y,components:ie,colorSchemes:Z,cssVarPrefix:se,vars:et};if(typeof Le.generateSpacing=="function"&&(Le.spacing=Le.generateSpacing()),ve){const Lt=Z[ve];Lt&&typeof Lt=="object"&&Object.keys(Lt).forEach(nt=>{Lt[nt]&&typeof Lt[nt]=="object"?Le[nt]={...Le[nt],...Lt[nt]}:Le[nt]=Lt[nt]})}return s?s(Le):Le},[Y,ve,ie,Z,se]),te=Y.colorSchemeSelector;In(()=>{if(Pe&&A&&te&&te!=="media"){const et=te;let Le=te;if(et==="class"&&(Le=".%s"),et==="data"&&(Le="[data-%s]"),et!=null&&et.startsWith("data-")&&!et.includes("%s")&&(Le=`[${et}="%s"]`),Le.startsWith("."))A.classList.remove(...ye.map(It=>Le.substring(1).replace("%s",It))),A.classList.add(Le.substring(1).replace("%s",Pe));else{const It=Le.replace("%s",Pe).match(/\[([^\]]+)\]/);if(It){const[Lt,nt]=It[1].split("=");nt||ye.forEach(lt=>{A.removeAttribute(Lt.replace(Pe,lt))}),A.setAttribute(Lt,nt?nt.replace(/"|'/g,""):"")}else A.setAttribute(Le,Pe)}}},[Pe,te,A,ye]),x.useEffect(()=>{let et;if(P&&L.current&&M){const Le=M.createElement("style");Le.appendChild(M.createTextNode(h0e)),M.head.appendChild(Le),window.getComputedStyle(M.body),et=setTimeout(()=>{M.head.removeChild(Le)},1)}return()=>{clearTimeout(et)}},[Pe,P,M]),x.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);const Te=x.useMemo(()=>({allColorSchemes:ye,colorScheme:Pe,darkColorScheme:Ee,lightColorScheme:pe,mode:he,setColorScheme:Re,setMode:oe,systemMode:ue}),[ye,Pe,Ee,pe,he,Re,oe,ue,Ie.colorSchemeSelector]);let De=!0;(N||Y.cssVariables===!1||K&&(V==null?void 0:V.cssVarPrefix)===se)&&(De=!1);const Ve=k.jsxs(x.Fragment,{children:[k.jsx(Pte,{themeId:q?t:void 0,theme:Ie,children:C}),De&&k.jsx(ote,{styles:((Be=Ie.generateStyleSheets)==null?void 0:Be.call(Ie))||[]})]});return K?Ve:k.jsx(c.Provider,{value:Te,children:Ve})}const g=typeof a=="string"?a:a.light,y=typeof a=="string"?a:a.dark;return{CssVarsProvider:m,useColorScheme:u,getInitColorSchemeScript:w=>c0e({colorSchemeStorageKey:o,defaultLightColorScheme:g,defaultDarkColorScheme:y,modeStorageKey:r,...w})}}function g0e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const sG=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},y0e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},v0e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function wR(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return y0e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,f=v0e(s,l);Object.assign(o,{[u]:f}),sG(i,s,`var(${u})`,c),sG(a,s,`var(${u}, ${f})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function b0e(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:f}=wR(l,t);let p=f;const m={},{[s]:g,...y}=i;if(Object.entries(y||{}).forEach(([E,I])=>{const{vars:O,css:P,varsWithDefaults:R}=wR(I,t);p=si(p,R),m[E]={css:P,vars:O}}),g){const{css:E,vars:I,varsWithDefaults:O}=wR(g,t);p=si(p,O),m[s]={css:E,vars:I}}function v(E,I){var P,R;let O=o;if(o==="class"&&(O=".%s"),o==="data"&&(O="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(O=`[${o}="%s"]`),E){if(O==="media")return e.defaultColorScheme===E?":root":{[`@media (prefers-color-scheme: ${((R=(P=i[E])==null?void 0:P.palette)==null?void 0:R.mode)||E})`]:{":root":I}};if(O)return e.defaultColorScheme===E?`:root, ${O.replace("%s",String(E))}`:O.replace("%s",String(E))}return":root"}return{vars:p,generateThemeVars:()=>{let E={...c};return Object.entries(m).forEach(([,{vars:I}])=>{E=si(E,I)}),E},generateStyleSheets:()=>{var D,M;const E=[],I=e.defaultColorScheme||"light";function O(A,_){Object.keys(_).length&&E.push(typeof A=="string"?{[A]:{..._}}:A)}O(n(void 0,{...u}),u);const{[I]:P,...R}=m;if(P){const{css:A}=P,_=(M=(D=i[I])==null?void 0:D.palette)==null?void 0:M.mode,N=!r&&_?{colorScheme:_,...A}:{...A};O(n(I,{...N}),N)}return Object.entries(R).forEach(([A,{css:_}])=>{var H,j;const N=(j=(H=i[A])==null?void 0:H.palette)==null?void 0:j.mode,B=!r&&N?{colorScheme:N,..._}:{..._};O(n(A,{...B}),B)}),E}}}function x0e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const S0e=rv(),w0e=Nn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Oe(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),C0e=e=>eI({props:e,name:"MuiContainer",defaultTheme:S0e}),E0e=(e,t)=>{const n=l=>qe(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Oe(String(a))}`,o&&"fixed",i&&"disableGutters"]};return Me(s,n,r)};function T0e(e={}){const{createStyledComponent:t=w0e,useThemeProps:n=C0e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,f=a.breakpoints.values[u];return f!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${f}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return x.forwardRef(function(s,l){const c=n(s),{className:u,component:f="div",disableGutters:p=!1,fixed:m=!1,maxWidth:g="lg",classes:y,...v}=c,w={...c,component:f,disableGutters:p,fixed:m,maxWidth:g},C=E0e(w,r);return k.jsx(o,{as:f,ownerState:w,className:fe(C.root,u),ref:l,...v})})}const O0e=(e,t)=>e.filter(n=>t.includes(n)),iv=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:O0e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function UE(e){return`--Grid-${e}Spacing`}function rI(e){return`--Grid-parent-${e}Spacing`}const lG="--Grid-columns",kg="--Grid-parent-columns",I0e=({theme:e,ownerState:t})=>{const n={};return iv(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${kg}) - (var(${kg}) - ${o}) * (var(${rI("column")}) / var(${kg})))`}),r(n,i)}),n},P0e=({theme:e,ownerState:t})=>{const n={};return iv(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${kg}) + var(${rI("column")}) * ${o} / var(${kg}))`}),r(n,i)}),n},A0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[lG]:12};return iv(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[lG]:i,"> *":{[kg]:i}})}),n},M0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return iv(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[UE("row")]:i,"> *":{[rI("row")]:i}})}),n},R0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return iv(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[UE("column")]:i,"> *":{[rI("column")]:i}})}),n},D0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return iv(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},k0e=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${UE("row")}) var(${UE("column")})`}}),_0e=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},$0e=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},N0e=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`];function L0e(e,t){e.item!==void 0&&delete e.item,e.zeroMinWidth!==void 0&&delete e.zeroMinWidth,t.keys.forEach(n=>{e[n]!==void 0&&delete e[n]})}const F0e=rv(),j0e=Nn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function B0e(e){return eI({props:e,name:"MuiGrid",defaultTheme:F0e})}function z0e(e={}){const{createStyledComponent:t=j0e,useThemeProps:n=B0e,useTheme:r=JS,componentName:o="MuiGrid"}=e,i=(c,u)=>{const{container:f,direction:p,spacing:m,wrap:g,size:y}=c,v={root:["root",f&&"container",g!=="wrap"&&`wrap-xs-${String(g)}`,...N0e(p),..._0e(y),...f?$0e(m,u.breakpoints.keys[0]):[]]};return Me(v,w=>qe(o,w),{})};function a(c,u,f=()=>!0){const p={};return c===null||(Array.isArray(c)?c.forEach((m,g)=>{m!==null&&f(m)&&u.keys[g]&&(p[u.keys[g]]=m)}):typeof c=="object"?Object.keys(c).forEach(m=>{const g=c[m];g!=null&&f(g)&&(p[m]=g)}):p[u.keys[0]]=c),p}const s=t(A0e,R0e,M0e,I0e,D0e,k0e,P0e),l=x.forwardRef(function(u,f){const p=r(),m=n(u),g=ZO(m);L0e(g,p.breakpoints);const{className:y,children:v,columns:w=12,container:C=!1,component:E="div",direction:I="row",wrap:O="wrap",size:P={},offset:R={},spacing:D=0,rowSpacing:M=D,columnSpacing:A=D,unstable_level:_=0,...N}=g,B=a(P,p.breakpoints,q=>q!==!1),H=a(R,p.breakpoints),j=u.columns??(_?void 0:w),L=u.spacing??(_?void 0:D),V=u.rowSpacing??u.spacing??(_?void 0:M),W=u.columnSpacing??u.spacing??(_?void 0:A),K={...g,level:_,columns:j,container:C,direction:I,wrap:O,spacing:L,rowSpacing:V,columnSpacing:W,size:B,offset:H},G=i(K,p);return k.jsx(s,{ref:f,as:E,ownerState:K,className:fe(G.root,y),...N,children:x.Children.map(v,q=>{var Y;return x.isValidElement(q)&&Dg(q,["Grid"])&&C&&q.props.container?x.cloneElement(q,{unstable_level:((Y=q.props)==null?void 0:Y.unstable_level)??_+1}):q})})});return l.muiName="Grid",l}const V0e=rv(),H0e=Nn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function U0e(e){return eI({props:e,name:"MuiStack",defaultTheme:V0e})}function G0e(e,t){const n=x.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(x.cloneElement(t,{key:`separator-${i}`})),r),[])}const q0e=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],W0e=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Kl({theme:t},xR({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=WO(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=xR({values:e.direction,base:o}),a=xR({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const p=c>0?i[u[c-1]]:"column";i[l]=p}}),n=si(n,Kl({theme:t},a,(l,c)=>e.useFlexGap?{gap:uh(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${q0e(c?i[c]:e.direction)}`]:uh(r,l)}}))}return n=jve(t.breakpoints,n),n};function K0e(e={}){const{createStyledComponent:t=H0e,useThemeProps:n=U0e,componentName:r="MuiStack"}=e,o=()=>Me({root:["root"]},l=>qe(r,l),{}),i=t(W0e);return x.forwardRef(function(l,c){const u=n(l),f=ZO(u),{component:p="div",direction:m="column",spacing:g=0,divider:y,children:v,className:w,useFlexGap:C=!1,...E}=f,I={direction:m,spacing:g,useFlexGap:C},O=o();return k.jsx(i,{as:p,ownerState:I,ref:c,className:fe(O.root,w),...E,children:y?G0e(v,y):v})})}const wx={black:"#000",white:"#fff"},Y0e={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"},Lm={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Fm={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Wb={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},jm={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Bm={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},zm={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Mte(){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:wx.white,default:wx.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 Q0e=Mte();function Rte(){return{text:{primary:wx.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:wx.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 cG=Rte();function uG(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Hu(e.main,o):t==="dark"&&(e.dark=Vu(e.main,i)))}function X0e(e="light"){return e==="dark"?{main:jm[200],light:jm[50],dark:jm[400]}:{main:jm[700],light:jm[400],dark:jm[800]}}function J0e(e="light"){return e==="dark"?{main:Lm[200],light:Lm[50],dark:Lm[400]}:{main:Lm[500],light:Lm[300],dark:Lm[700]}}function Z0e(e="light"){return e==="dark"?{main:Fm[500],light:Fm[300],dark:Fm[700]}:{main:Fm[700],light:Fm[400],dark:Fm[800]}}function exe(e="light"){return e==="dark"?{main:Bm[400],light:Bm[300],dark:Bm[700]}:{main:Bm[700],light:Bm[500],dark:Bm[900]}}function txe(e="light"){return e==="dark"?{main:zm[400],light:zm[300],dark:zm[700]}:{main:zm[800],light:zm[500],dark:zm[900]}}function nxe(e="light"){return e==="dark"?{main:Wb[400],light:Wb[300],dark:Wb[700]}:{main:"#ed6c02",light:Wb[500],dark:Wb[900]}}function Vj(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||X0e(t),a=e.secondary||J0e(t),s=e.error||Z0e(t),l=e.info||exe(t),c=e.success||txe(t),u=e.warning||nxe(t);function f(y){return Wbe(y,cG.text.primary)>=n?cG.text.primary:Q0e.text.primary}const p=({color:y,name:v,mainShade:w=500,lightShade:C=300,darkShade:E=700})=>{if(y={...y},!y.main&&y[w]&&(y.main=y[w]),!y.hasOwnProperty("main"))throw new Error(zu(11,v?` (${v})`:"",w));if(typeof y.main!="string")throw new Error(zu(12,v?` (${v})`:"",JSON.stringify(y.main)));return uG(y,"light",C,r),uG(y,"dark",E,r),y.contrastText||(y.contrastText=f(y.main)),y};let m;return t==="light"?m=Mte():t==="dark"&&(m=Rte()),si({common:{...wx},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:Y0e,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},o)}function rxe(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function oxe(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function ixe(e){return Math.round(e*1e5)/1e5}const dG={textTransform:"uppercase"},fG='"Roboto", "Helvetica", "Arial", sans-serif';function Dte(e,t){const{fontFamily:n=fG,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...f}=typeof t=="function"?t(e):t,p=r/14,m=u||(v=>`${v/l*p}rem`),g=(v,w,C,E,I)=>({fontFamily:n,fontWeight:v,fontSize:m(w),lineHeight:C,...n===fG?{letterSpacing:`${ixe(E/w)}em`}:{},...I,...c}),y={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(a,14,1.75,.4,dG),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,dG),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return si({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...y},f,{clone:!1})}const axe=.2,sxe=.14,lxe=.12;function qr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${axe})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${sxe})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${lxe})`].join(",")}const cxe=["none",qr(0,2,1,-1,0,1,1,0,0,1,3,0),qr(0,3,1,-2,0,2,2,0,0,1,5,0),qr(0,3,3,-2,0,3,4,0,0,1,8,0),qr(0,2,4,-1,0,4,5,0,0,1,10,0),qr(0,3,5,-1,0,5,8,0,0,1,14,0),qr(0,3,5,-1,0,6,10,0,0,1,18,0),qr(0,4,5,-2,0,7,10,1,0,2,16,1),qr(0,5,5,-3,0,8,10,1,0,3,14,2),qr(0,5,6,-3,0,9,12,1,0,3,16,2),qr(0,6,6,-3,0,10,14,1,0,4,18,3),qr(0,6,7,-4,0,11,15,1,0,4,20,3),qr(0,7,8,-4,0,12,17,2,0,5,22,4),qr(0,7,8,-4,0,13,19,2,0,5,24,4),qr(0,7,9,-4,0,14,21,2,0,5,26,4),qr(0,8,9,-5,0,15,22,2,0,6,28,5),qr(0,8,10,-5,0,16,24,2,0,6,30,5),qr(0,8,11,-5,0,17,26,2,0,6,32,5),qr(0,9,11,-5,0,18,28,2,0,7,34,6),qr(0,9,12,-6,0,19,29,2,0,7,36,6),qr(0,10,13,-6,0,20,31,3,0,8,38,7),qr(0,10,13,-6,0,21,33,3,0,8,40,7),qr(0,10,14,-6,0,22,35,3,0,8,42,7),qr(0,11,14,-7,0,23,36,3,0,9,44,8),qr(0,11,15,-7,0,24,38,3,0,9,46,8)],uxe={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)"},kte={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function pG(e){return`${Math.round(e)}ms`}function dxe(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function fxe(e){const t={...uxe,...e.easing},n={...kte,...e.duration};return{getAutoHeightDuration:dxe,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:pG(a)} ${s} ${typeof l=="string"?l:pG(l)}`).join(",")},...e,easing:t,duration:n}}const pxe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function hxe(e){return bc(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function _te(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[a,s]=o[i];!hxe(s)||a.startsWith("unstable_")?delete r[a]:bc(s)&&(r[a]={...s},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
const theme = ${JSON.stringify(t,null,2)};
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
theme.transitions = createTransitions(theme.transitions || {});
-export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Bu(20));const u=zj(i),f=nv(e);let h=si(f,{mixins:nxe(f.breakpoints,r),palette:u,shadows:sxe.slice(),typography:Rte(u,s),transitions:uxe(a),zIndex:{...dxe}});return h=si(h,c),h=t.reduce((m,g)=>si(m,g),h),h.unstable_sxConfig={...XS,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(g){return wf({sx:g,theme:this})},h.toRuntimeSource=kte,h}function Z$(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 pxe=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Z$(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function _te(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function $te(e){return e==="dark"?pxe:[]}function hxe(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=zj(t);return{palette:i,opacity:{..._te(i.mode),...n},overlays:r||$te(i.mode),...o}}function mxe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const gxe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],yxe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return gxe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function vxe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Qe(e,t,n){!e[t]&&n&&(e[t]=n)}function M0(e){return typeof e!="string"||!e.startsWith("hsl")?e:vte(e)}function mu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=A0(M0(e[t])))}function bxe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const cc=e=>{try{return e()}catch{}},xxe=(e="mui")=>h0e(e);function wR(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=hxe({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=J$({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{..._te(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||$te(o)},a}function Sxe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=mxe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],f=r||(n.light&&u!=="light"?"light":u),h=xxe(i),{[f]:m,light:g,dark:y,...v}=n,w={...v};let C=m;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(Bu(21,f));const E=wR(w,C,c,f);g&&!w.light&&wR(w,g,void 0,"light"),y&&!w.dark&&wR(w,y,void 0,"dark");let I={defaultColorScheme:f,...E,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:w,font:{...txe(E.typography),...E.font},spacing:bxe(c.spacing)};Object.keys(I.colorSchemes).forEach(M=>{const A=I.colorSchemes[M].palette,_=N=>{const B=N.split("-"),H=B[1],j=B[2];return h(N,A[H][j])};if(A.mode==="light"&&(Qe(A.common,"background","#fff"),Qe(A.common,"onBackground","#000")),A.mode==="dark"&&(Qe(A.common,"background","#000"),Qe(A.common,"onBackground","#fff")),vxe(A,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),A.mode==="light"){Qe(A.Alert,"errorColor",Ir(A.error.light,.6)),Qe(A.Alert,"infoColor",Ir(A.info.light,.6)),Qe(A.Alert,"successColor",Ir(A.success.light,.6)),Qe(A.Alert,"warningColor",Ir(A.warning.light,.6)),Qe(A.Alert,"errorFilledBg",_("palette-error-main")),Qe(A.Alert,"infoFilledBg",_("palette-info-main")),Qe(A.Alert,"successFilledBg",_("palette-success-main")),Qe(A.Alert,"warningFilledBg",_("palette-warning-main")),Qe(A.Alert,"errorFilledColor",cc(()=>A.getContrastText(A.error.main))),Qe(A.Alert,"infoFilledColor",cc(()=>A.getContrastText(A.info.main))),Qe(A.Alert,"successFilledColor",cc(()=>A.getContrastText(A.success.main))),Qe(A.Alert,"warningFilledColor",cc(()=>A.getContrastText(A.warning.main))),Qe(A.Alert,"errorStandardBg",Pr(A.error.light,.9)),Qe(A.Alert,"infoStandardBg",Pr(A.info.light,.9)),Qe(A.Alert,"successStandardBg",Pr(A.success.light,.9)),Qe(A.Alert,"warningStandardBg",Pr(A.warning.light,.9)),Qe(A.Alert,"errorIconColor",_("palette-error-main")),Qe(A.Alert,"infoIconColor",_("palette-info-main")),Qe(A.Alert,"successIconColor",_("palette-success-main")),Qe(A.Alert,"warningIconColor",_("palette-warning-main")),Qe(A.AppBar,"defaultBg",_("palette-grey-100")),Qe(A.Avatar,"defaultBg",_("palette-grey-400")),Qe(A.Button,"inheritContainedBg",_("palette-grey-300")),Qe(A.Button,"inheritContainedHoverBg",_("palette-grey-A100")),Qe(A.Chip,"defaultBorder",_("palette-grey-400")),Qe(A.Chip,"defaultAvatarColor",_("palette-grey-700")),Qe(A.Chip,"defaultIconColor",_("palette-grey-700")),Qe(A.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Qe(A.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Qe(A.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Qe(A.LinearProgress,"primaryBg",Pr(A.primary.main,.62)),Qe(A.LinearProgress,"secondaryBg",Pr(A.secondary.main,.62)),Qe(A.LinearProgress,"errorBg",Pr(A.error.main,.62)),Qe(A.LinearProgress,"infoBg",Pr(A.info.main,.62)),Qe(A.LinearProgress,"successBg",Pr(A.success.main,.62)),Qe(A.LinearProgress,"warningBg",Pr(A.warning.main,.62)),Qe(A.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.11)`),Qe(A.Slider,"primaryTrack",Pr(A.primary.main,.62)),Qe(A.Slider,"secondaryTrack",Pr(A.secondary.main,.62)),Qe(A.Slider,"errorTrack",Pr(A.error.main,.62)),Qe(A.Slider,"infoTrack",Pr(A.info.main,.62)),Qe(A.Slider,"successTrack",Pr(A.success.main,.62)),Qe(A.Slider,"warningTrack",Pr(A.warning.main,.62));const N=m1(A.background.default,.8);Qe(A.SnackbarContent,"bg",N),Qe(A.SnackbarContent,"color",cc(()=>A.getContrastText(N))),Qe(A.SpeedDialAction,"fabHoverBg",m1(A.background.paper,.15)),Qe(A.StepConnector,"border",_("palette-grey-400")),Qe(A.StepContent,"border",_("palette-grey-400")),Qe(A.Switch,"defaultColor",_("palette-common-white")),Qe(A.Switch,"defaultDisabledColor",_("palette-grey-100")),Qe(A.Switch,"primaryDisabledColor",Pr(A.primary.main,.62)),Qe(A.Switch,"secondaryDisabledColor",Pr(A.secondary.main,.62)),Qe(A.Switch,"errorDisabledColor",Pr(A.error.main,.62)),Qe(A.Switch,"infoDisabledColor",Pr(A.info.main,.62)),Qe(A.Switch,"successDisabledColor",Pr(A.success.main,.62)),Qe(A.Switch,"warningDisabledColor",Pr(A.warning.main,.62)),Qe(A.TableCell,"border",Pr(h1(A.divider,1),.88)),Qe(A.Tooltip,"bg",h1(A.grey[700],.92))}if(A.mode==="dark"){Qe(A.Alert,"errorColor",Pr(A.error.light,.6)),Qe(A.Alert,"infoColor",Pr(A.info.light,.6)),Qe(A.Alert,"successColor",Pr(A.success.light,.6)),Qe(A.Alert,"warningColor",Pr(A.warning.light,.6)),Qe(A.Alert,"errorFilledBg",_("palette-error-dark")),Qe(A.Alert,"infoFilledBg",_("palette-info-dark")),Qe(A.Alert,"successFilledBg",_("palette-success-dark")),Qe(A.Alert,"warningFilledBg",_("palette-warning-dark")),Qe(A.Alert,"errorFilledColor",cc(()=>A.getContrastText(A.error.dark))),Qe(A.Alert,"infoFilledColor",cc(()=>A.getContrastText(A.info.dark))),Qe(A.Alert,"successFilledColor",cc(()=>A.getContrastText(A.success.dark))),Qe(A.Alert,"warningFilledColor",cc(()=>A.getContrastText(A.warning.dark))),Qe(A.Alert,"errorStandardBg",Ir(A.error.light,.9)),Qe(A.Alert,"infoStandardBg",Ir(A.info.light,.9)),Qe(A.Alert,"successStandardBg",Ir(A.success.light,.9)),Qe(A.Alert,"warningStandardBg",Ir(A.warning.light,.9)),Qe(A.Alert,"errorIconColor",_("palette-error-main")),Qe(A.Alert,"infoIconColor",_("palette-info-main")),Qe(A.Alert,"successIconColor",_("palette-success-main")),Qe(A.Alert,"warningIconColor",_("palette-warning-main")),Qe(A.AppBar,"defaultBg",_("palette-grey-900")),Qe(A.AppBar,"darkBg",_("palette-background-paper")),Qe(A.AppBar,"darkColor",_("palette-text-primary")),Qe(A.Avatar,"defaultBg",_("palette-grey-600")),Qe(A.Button,"inheritContainedBg",_("palette-grey-800")),Qe(A.Button,"inheritContainedHoverBg",_("palette-grey-700")),Qe(A.Chip,"defaultBorder",_("palette-grey-700")),Qe(A.Chip,"defaultAvatarColor",_("palette-grey-300")),Qe(A.Chip,"defaultIconColor",_("palette-grey-300")),Qe(A.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Qe(A.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Qe(A.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Qe(A.LinearProgress,"primaryBg",Ir(A.primary.main,.5)),Qe(A.LinearProgress,"secondaryBg",Ir(A.secondary.main,.5)),Qe(A.LinearProgress,"errorBg",Ir(A.error.main,.5)),Qe(A.LinearProgress,"infoBg",Ir(A.info.main,.5)),Qe(A.LinearProgress,"successBg",Ir(A.success.main,.5)),Qe(A.LinearProgress,"warningBg",Ir(A.warning.main,.5)),Qe(A.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.13)`),Qe(A.Slider,"primaryTrack",Ir(A.primary.main,.5)),Qe(A.Slider,"secondaryTrack",Ir(A.secondary.main,.5)),Qe(A.Slider,"errorTrack",Ir(A.error.main,.5)),Qe(A.Slider,"infoTrack",Ir(A.info.main,.5)),Qe(A.Slider,"successTrack",Ir(A.success.main,.5)),Qe(A.Slider,"warningTrack",Ir(A.warning.main,.5));const N=m1(A.background.default,.98);Qe(A.SnackbarContent,"bg",N),Qe(A.SnackbarContent,"color",cc(()=>A.getContrastText(N))),Qe(A.SpeedDialAction,"fabHoverBg",m1(A.background.paper,.15)),Qe(A.StepConnector,"border",_("palette-grey-600")),Qe(A.StepContent,"border",_("palette-grey-600")),Qe(A.Switch,"defaultColor",_("palette-grey-300")),Qe(A.Switch,"defaultDisabledColor",_("palette-grey-600")),Qe(A.Switch,"primaryDisabledColor",Ir(A.primary.main,.55)),Qe(A.Switch,"secondaryDisabledColor",Ir(A.secondary.main,.55)),Qe(A.Switch,"errorDisabledColor",Ir(A.error.main,.55)),Qe(A.Switch,"infoDisabledColor",Ir(A.info.main,.55)),Qe(A.Switch,"successDisabledColor",Ir(A.success.main,.55)),Qe(A.Switch,"warningDisabledColor",Ir(A.warning.main,.55)),Qe(A.TableCell,"border",Ir(h1(A.divider,1),.68)),Qe(A.Tooltip,"bg",h1(A.grey[700],.92))}mu(A.background,"default"),mu(A.background,"paper"),mu(A.common,"background"),mu(A.common,"onBackground"),mu(A,"divider"),Object.keys(A).forEach(N=>{const B=A[N];N!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&Qe(A[N],"mainChannel",A0(M0(B.main))),B.light&&Qe(A[N],"lightChannel",A0(M0(B.light))),B.dark&&Qe(A[N],"darkChannel",A0(M0(B.dark))),B.contrastText&&Qe(A[N],"contrastTextChannel",A0(M0(B.contrastText))),N==="text"&&(mu(A[N],"primary"),mu(A[N],"secondary")),N==="action"&&(B.active&&mu(A[N],"active"),B.selected&&mu(A[N],"selected")))})}),I=t.reduce((M,A)=>si(M,A),I);const O={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:yxe(I)},{vars:P,generateThemeVars:R,generateStyleSheets:D}=y0e(I,O);return I.vars=P,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([M,A])=>{I[M]=A}),I.generateThemeVars=R,I.generateStyleSheets=D,I.generateSpacing=function(){return ute(c.spacing,qO(this))},I.getColorSchemeSelector=v0e(s),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig={...XS,...c==null?void 0:c.unstable_sxConfig},I.unstable_sx=function(A){return wf({sx:A,theme:this})},I.toRuntimeSource=kte,I}function hG(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:zj({...n===!0?{}:n.palette,mode:t})})}function ZS(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return J$(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const f=J$({...e,palette:u},...t);return f.defaultColorScheme=s,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},hG(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},hG(f,"light",c.light)),f}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),Sxe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function wxe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Cxe(e){return parseFloat(e)}const rI=ZS();function Lr(){const e=JS(rI);return e[qs]||e}function Pn({props:e,name:t}){return ZO({props:e,name:t,defaultTheme:rI,themeId:qs})}function Nte(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ui=e=>Nte(e)&&e!=="classes",ae=mte({themeId:qs,defaultTheme:rI,rootShouldForwardProp:ui});function CR({theme:e,...t}){const n=qs in e?e[qs]:void 0;return k.jsx(Ite,{...t,themeId:n?qs:void 0,theme:n||e})}const g1={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:Exe}=p0e({themeId:qs,theme:()=>ZS({cssVariables:!0}),colorSchemeStorageKey:g1.colorSchemeStorageKey,modeStorageKey:g1.modeStorageKey,defaultColorScheme:{light:g1.defaultLightColorScheme,dark:g1.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Rte(e.palette,e.typography)};return t.unstable_sx=function(r){return wf({sx:r,theme:this})},t}}),Txe=Exe;function Nh({theme:e,...t}){if(typeof e=="function")return k.jsx(CR,{theme:e,...t});const n=qs in e?e[qs]:e;return"colorSchemes"in n?k.jsx(Txe,{theme:e,...t}):"vars"in n?k.jsx(CR,{theme:e,...t}):k.jsx(CR,{theme:{...e,vars:null},...t})}var iv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},uh=typeof window>"u"||"Deno"in globalThis;function $s(){}function Oxe(e,t){return typeof e=="function"?e(t):e}function eN(e){return typeof e=="number"&&e>=0&&e!==1/0}function Lte(e,t){return Math.max(e+(t||0)-Date.now(),0)}function kg(e,t){return typeof e=="function"?e(t):e}function Ml(e,t){return typeof e=="function"?e(t):e}function mG(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==Vj(a,t.options))return!1}else if(!Cx(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function gG(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(dh(t.options.mutationKey)!==dh(i))return!1}else if(!Cx(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Vj(e,t){return((t==null?void 0:t.queryKeyHashFn)||dh)(e)}function dh(e){return JSON.stringify(e,(t,n)=>tN(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Cx(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Cx(e[n],t[n])):!1}function Fte(e,t){if(e===t)return e;const n=yG(e)&&yG(t);if(n||tN(e)&&tN(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c<a;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(s[u]=void 0,l++):(s[u]=Fte(e[u],t[u]),s[u]===e[u]&&e[u]!==void 0&&l++)}return o===a&&l===o?e:s}return t}function UE(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function yG(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tN(e){if(!vG(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!vG(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vG(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ixe(e){return new Promise(t=>{setTimeout(t,e)})}function nN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Fte(e,t):t}function Pxe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Axe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Hj=Symbol();function jte(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Hj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var qp,tf,Ug,kee,Mxe=(kee=class extends iv{constructor(){super();Yt(this,qp);Yt(this,tf);Yt(this,Ug);_t(this,Ug,t=>{if(!uh&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){be(this,tf)||this.setEventListener(be(this,Ug))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,tf))==null||t.call(this),_t(this,tf,void 0))}setEventListener(t){var n;_t(this,Ug,t),(n=be(this,tf))==null||n.call(this),_t(this,tf,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){be(this,qp)!==t&&(_t(this,qp,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof be(this,qp)=="boolean"?be(this,qp):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qp=new WeakMap,tf=new WeakMap,Ug=new WeakMap,kee),Uj=new Mxe,Gg,nf,qg,_ee,Rxe=(_ee=class extends iv{constructor(){super();Yt(this,Gg,!0);Yt(this,nf);Yt(this,qg);_t(this,qg,t=>{if(!uh&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){be(this,nf)||this.setEventListener(be(this,qg))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,nf))==null||t.call(this),_t(this,nf,void 0))}setEventListener(t){var n;_t(this,qg,t),(n=be(this,nf))==null||n.call(this),_t(this,nf,t(this.setOnline.bind(this)))}setOnline(t){be(this,Gg)!==t&&(_t(this,Gg,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return be(this,Gg)}},Gg=new WeakMap,nf=new WeakMap,qg=new WeakMap,_ee),GE=new Rxe;function rN(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Dxe(e){return Math.min(1e3*2**e,3e4)}function Bte(e){return(e??"online")==="online"?GE.isOnline():!0}var zte=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ER(e){return e instanceof zte}function Vte(e){let t=!1,n=0,r=!1,o;const i=rN(),a=y=>{var v;r||(h(new zte(y)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>Uj.isFocused()&&(e.networkMode==="always"||GE.isOnline())&&e.canRun(),u=()=>Bte(e.networkMode)&&e.canRun(),f=y=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,y),o==null||o(),i.resolve(y))},h=y=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,y),o==null||o(),i.reject(y))},m=()=>new Promise(y=>{var v;o=w=>{(r||c())&&y(w)},(v=e.onPause)==null||v.call(e)}).then(()=>{var y;o=void 0,r||(y=e.onContinue)==null||y.call(e)}),g=()=>{if(r)return;let y;const v=n===0?e.initialPromise:void 0;try{y=v??e.fn()}catch(w){y=Promise.reject(w)}Promise.resolve(y).then(f).catch(w=>{var P;if(r)return;const C=e.retry??(uh?0:3),E=e.retryDelay??Dxe,I=typeof E=="function"?E(n,w):E,O=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,w);if(t||!O){h(w);return}n++,(P=e.onFail)==null||P.call(e,n,w),Ixe(I).then(()=>c()?void 0:m()).then(()=>{t?h(w):g()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?g():m().then(g),i)}}var kxe=e=>setTimeout(e,0);function _xe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=kxe;const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var zo=_xe(),Wp,$ee,Hte=($ee=class{constructor(){Yt(this,Wp)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),eN(this.gcTime)&&_t(this,Wp,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uh?1/0:5*60*1e3))}clearGcTimeout(){be(this,Wp)&&(clearTimeout(be(this,Wp)),_t(this,Wp,void 0))}},Wp=new WeakMap,$ee),Wg,Kg,_s,Kp,Ri,zS,Yp,El,bu,Nee,$xe=(Nee=class extends Hte{constructor(t){super();Yt(this,El);Yt(this,Wg);Yt(this,Kg);Yt(this,_s);Yt(this,Kp);Yt(this,Ri);Yt(this,zS);Yt(this,Yp);_t(this,Yp,!1),_t(this,zS,t.defaultOptions),this.setOptions(t.options),this.observers=[],_t(this,Kp,t.client),_t(this,_s,be(this,Kp).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,_t(this,Wg,Nxe(this.options)),this.state=t.state??be(this,Wg),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=be(this,Ri))==null?void 0:t.promise}setOptions(t){this.options={...be(this,zS),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&be(this,_s).remove(this)}setData(t,n){const r=nN(this.state.data,t,this.options);return An(this,El,bu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){An(this,El,bu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=be(this,Ri))==null?void 0:r.promise;return(o=be(this,Ri))==null||o.cancel(t),n?n.then($s).catch($s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(be(this,Wg))}isActive(){return this.observers.some(t=>Ml(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Lte(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Ri))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Ri))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),be(this,_s).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(be(this,Ri)&&(be(this,Yp)?be(this,Ri).cancel({revert:!0}):be(this,Ri).cancelRetry()),this.scheduleGc()),be(this,_s).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||An(this,El,bu).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(be(this,Ri))return be(this,Ri).continueRetry(),be(this,Ri).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,o=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(_t(this,Yp,!0),r.signal)})},i=()=>{const f=jte(this.options,n),h={client:be(this,Kp),queryKey:this.queryKey,meta:this.meta};return o(h),_t(this,Yp,!1),this.options.persister?this.options.persister(f,h,this):f(h)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:be(this,Kp),state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),_t(this,Kg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&An(this,El,bu).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=f=>{var h,m,g,y;ER(f)&&f.silent||An(this,El,bu).call(this,{type:"error",error:f}),ER(f)||((m=(h=be(this,_s).config).onError)==null||m.call(h,f,this),(y=(g=be(this,_s).config).onSettled)==null||y.call(g,this.state.data,f,this)),this.scheduleGc()};return _t(this,Ri,Vte({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,m,g,y;if(f===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){s(v);return}(m=(h=be(this,_s).config).onSuccess)==null||m.call(h,f,this),(y=(g=be(this,_s).config).onSettled)==null||y.call(g,f,this.state.error,this),this.scheduleGc()},onError:s,onFail:(f,h)=>{An(this,El,bu).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{An(this,El,bu).call(this,{type:"pause"})},onContinue:()=>{An(this,El,bu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),be(this,Ri).start()}},Wg=new WeakMap,Kg=new WeakMap,_s=new WeakMap,Kp=new WeakMap,Ri=new WeakMap,zS=new WeakMap,Yp=new WeakMap,El=new WeakSet,bu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ute(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return ER(o)&&o.revert&&be(this,Kg)?{...be(this,Kg),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),zo.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),be(this,_s).notify({query:this,type:"updated",action:t})})},Nee);function Ute(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bte(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Nxe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fc,Lee,Lxe=(Lee=class extends iv{constructor(t={}){super();Yt(this,fc);this.config=t,_t(this,fc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Vj(o,n);let a=this.get(i);return a||(a=new $xe({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){be(this,fc).has(t.queryHash)||(be(this,fc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=be(this,fc).get(t.queryHash);n&&(t.destroy(),n===t&&be(this,fc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){zo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return be(this,fc).get(t)}getAll(){return[...be(this,fc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mG(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mG(t,r)):n}notify(t){zo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){zo.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){zo.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},fc=new WeakMap,Lee),pc,Xi,Qp,hc,jd,Fee,Fxe=(Fee=class extends Hte{constructor(t){super();Yt(this,hc);Yt(this,pc);Yt(this,Xi);Yt(this,Qp);this.mutationId=t.mutationId,_t(this,Xi,t.mutationCache),_t(this,pc,[]),this.state=t.state||Gte(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){be(this,pc).includes(t)||(be(this,pc).push(t),this.clearGcTimeout(),be(this,Xi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){_t(this,pc,be(this,pc).filter(n=>n!==t)),this.scheduleGc(),be(this,Xi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){be(this,pc).length||(this.state.status==="pending"?this.scheduleGc():be(this,Xi).remove(this))}continue(){var t;return((t=be(this,Qp))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,f,h,m,g,y,v,w,C,E,I,O,P,R;_t(this,Qp,Vte({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,M)=>{An(this,hc,jd).call(this,{type:"failed",failureCount:D,error:M})},onPause:()=>{An(this,hc,jd).call(this,{type:"pause"})},onContinue:()=>{An(this,hc,jd).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>be(this,Xi).canRun(this)}));const n=this.state.status==="pending",r=!be(this,Qp).canStart();try{if(!n){An(this,hc,jd).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=be(this,Xi).config).onMutate)==null?void 0:i.call(o,t,this));const M=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));M!==this.state.context&&An(this,hc,jd).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const D=await be(this,Qp).start();return await((c=(l=be(this,Xi).config).onSuccess)==null?void 0:c.call(l,D,t,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,D,t,this.state.context)),await((m=(h=be(this,Xi).config).onSettled)==null?void 0:m.call(h,D,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,D,null,t,this.state.context)),An(this,hc,jd).call(this,{type:"success",data:D}),D}catch(D){try{throw await((w=(v=be(this,Xi).config).onError)==null?void 0:w.call(v,D,t,this.state.context,this)),await((E=(C=this.options).onError)==null?void 0:E.call(C,D,t,this.state.context)),await((O=(I=be(this,Xi).config).onSettled)==null?void 0:O.call(I,void 0,D,this.state.variables,this.state.context,this)),await((R=(P=this.options).onSettled)==null?void 0:R.call(P,void 0,D,t,this.state.context)),D}finally{An(this,hc,jd).call(this,{type:"error",error:D})}}finally{be(this,Xi).runNext(this)}}},pc=new WeakMap,Xi=new WeakMap,Qp=new WeakMap,hc=new WeakSet,jd=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),zo.batch(()=>{be(this,pc).forEach(r=>{r.onMutationUpdate(t)}),be(this,Xi).notify({mutation:this,type:"updated",action:t})})},Fee);function Gte(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ou,Tl,VS,jee,jxe=(jee=class extends iv{constructor(t={}){super();Yt(this,Ou);Yt(this,Tl);Yt(this,VS);this.config=t,_t(this,Ou,new Set),_t(this,Tl,new Map),_t(this,VS,0)}build(t,n,r){const o=new Fxe({mutationCache:this,mutationId:++d1(this,VS)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){be(this,Ou).add(t);const n=y1(t);if(typeof n=="string"){const r=be(this,Tl).get(n);r?r.push(t):be(this,Tl).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(be(this,Ou).delete(t)){const n=y1(t);if(typeof n=="string"){const r=be(this,Tl).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&be(this,Tl).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=y1(t);if(typeof n=="string"){const r=be(this,Tl).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=y1(t);if(typeof n=="string"){const o=(r=be(this,Tl).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){zo.batch(()=>{be(this,Ou).forEach(t=>{this.notify({type:"removed",mutation:t})}),be(this,Ou).clear(),be(this,Tl).clear()})}getAll(){return Array.from(be(this,Ou))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gG(n,r))}findAll(t={}){return this.getAll().filter(n=>gG(t,n))}notify(t){zo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return zo.batch(()=>Promise.all(t.map(n=>n.continue().catch($s))))}},Ou=new WeakMap,Tl=new WeakMap,VS=new WeakMap,jee);function y1(e){var t;return(t=e.options.scope)==null?void 0:t.id}function bG(e){return{onFetch:(t,n)=>{var u,f,h,m,g;const r=t.options,o=(h=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],a=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const v=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},w=jte(t.options,t.fetchOptions),C=async(E,I,O)=>{if(y)return Promise.reject();if(I==null&&E.pages.length)return Promise.resolve(E);const P={client:t.client,queryKey:t.queryKey,pageParam:I,direction:O?"backward":"forward",meta:t.options.meta};v(P);const R=await w(P),{maxPages:D}=t.options,M=O?Axe:Pxe;return{pages:M(E.pages,R,D),pageParams:M(E.pageParams,I,D)}};if(o&&i.length){const E=o==="backward",I=E?Bxe:xG,O={pages:i,pageParams:a},P=I(r,O);s=await C(O,P,E)}else{const E=e??i.length;do{const I=l===0?a[0]??r.initialPageParam:xG(r,s);if(l>0&&I==null)break;s=await C(s,I),l++}while(l<E)}return s};t.options.persister?t.fetchFn=()=>{var y,v;return(v=(y=t.options).persister)==null?void 0:v.call(y,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function xG(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Bxe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var co,rf,of,Yg,Qg,af,Xg,Jg,Bee,zxe=(Bee=class{constructor(e={}){Yt(this,co);Yt(this,rf);Yt(this,of);Yt(this,Yg);Yt(this,Qg);Yt(this,af);Yt(this,Xg);Yt(this,Jg);_t(this,co,e.queryCache||new Lxe),_t(this,rf,e.mutationCache||new jxe),_t(this,of,e.defaultOptions||{}),_t(this,Yg,new Map),_t(this,Qg,new Map),_t(this,af,0)}mount(){d1(this,af)._++,be(this,af)===1&&(_t(this,Xg,Uj.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,co).onFocus())})),_t(this,Jg,GE.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,co).onOnline())})))}unmount(){var e,t;d1(this,af)._--,be(this,af)===0&&((e=be(this,Xg))==null||e.call(this),_t(this,Xg,void 0),(t=be(this,Jg))==null||t.call(this),_t(this,Jg,void 0))}isFetching(e){return be(this,co).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return be(this,rf).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,co).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=be(this,co).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(kg(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return be(this,co).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=be(this,co).get(r.queryHash),i=o==null?void 0:o.state.data,a=Oxe(t,i);if(a!==void 0)return be(this,co).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return zo.batch(()=>be(this,co).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,co).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=be(this,co);zo.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=be(this,co);return zo.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=zo.batch(()=>be(this,co).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then($s).catch($s)}invalidateQueries(e,t={}){return zo.batch(()=>(be(this,co).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=zo.batch(()=>be(this,co).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch($s)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then($s)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=be(this,co).build(this,t);return n.isStaleByTime(kg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($s).catch($s)}fetchInfiniteQuery(e){return e.behavior=bG(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($s).catch($s)}ensureInfiniteQueryData(e){return e.behavior=bG(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return GE.isOnline()?be(this,rf).resumePausedMutations():Promise.resolve()}getQueryCache(){return be(this,co)}getMutationCache(){return be(this,rf)}getDefaultOptions(){return be(this,of)}setDefaultOptions(e){_t(this,of,e)}setQueryDefaults(e,t){be(this,Yg).set(dh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...be(this,Yg).values()],n={};return t.forEach(r=>{Cx(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){be(this,Qg).set(dh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...be(this,Qg).values()],n={};return t.forEach(r=>{Cx(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...be(this,of).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Vj(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Hj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...be(this,of).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){be(this,co).clear(),be(this,rf).clear()}},co=new WeakMap,rf=new WeakMap,of=new WeakMap,Yg=new WeakMap,Qg=new WeakMap,af=new WeakMap,Xg=new WeakMap,Jg=new WeakMap,Bee),ma,Un,HS,Ji,Xp,Zg,sf,mc,US,ey,ty,Jp,Zp,lf,ny,pr,R0,oN,iN,aN,sN,lN,cN,uN,qte,zee,Vxe=(zee=class extends iv{constructor(t,n){super();Yt(this,pr);Yt(this,ma);Yt(this,Un);Yt(this,HS);Yt(this,Ji);Yt(this,Xp);Yt(this,Zg);Yt(this,sf);Yt(this,mc);Yt(this,US);Yt(this,ey);Yt(this,ty);Yt(this,Jp);Yt(this,Zp);Yt(this,lf);Yt(this,ny,new Set);this.options=n,_t(this,ma,t),_t(this,mc,null),_t(this,sf,rN()),this.options.experimental_prefetchInRender||be(this,sf).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(be(this,Un).addObserver(this),SG(be(this,Un),this.options)?An(this,pr,R0).call(this):this.updateResult(),An(this,pr,sN).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dN(be(this,Un),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dN(be(this,Un),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,An(this,pr,lN).call(this),An(this,pr,cN).call(this),be(this,Un).removeObserver(this)}setOptions(t){const n=this.options,r=be(this,Un);if(this.options=be(this,ma).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ml(this.options.enabled,be(this,Un))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");An(this,pr,uN).call(this),be(this,Un).setOptions(this.options),n._defaulted&&!UE(this.options,n)&&be(this,ma).getQueryCache().notify({type:"observerOptionsUpdated",query:be(this,Un),observer:this});const o=this.hasListeners();o&&wG(be(this,Un),r,this.options,n)&&An(this,pr,R0).call(this),this.updateResult(),o&&(be(this,Un)!==r||Ml(this.options.enabled,be(this,Un))!==Ml(n.enabled,be(this,Un))||kg(this.options.staleTime,be(this,Un))!==kg(n.staleTime,be(this,Un)))&&An(this,pr,oN).call(this);const i=An(this,pr,iN).call(this);o&&(be(this,Un)!==r||Ml(this.options.enabled,be(this,Un))!==Ml(n.enabled,be(this,Un))||i!==be(this,lf))&&An(this,pr,aN).call(this,i)}getOptimisticResult(t){const n=be(this,ma).getQueryCache().build(be(this,ma),t),r=this.createResult(n,t);return Uxe(this,r)&&(_t(this,Ji,r),_t(this,Zg,this.options),_t(this,Xp,be(this,Un).state)),r}getCurrentResult(){return be(this,Ji)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){be(this,ny).add(t)}getCurrentQuery(){return be(this,Un)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=be(this,ma).defaultQueryOptions(t),r=be(this,ma).getQueryCache().build(be(this,ma),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return An(this,pr,R0).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),be(this,Ji)))}createResult(t,n){var D;const r=be(this,Un),o=this.options,i=be(this,Ji),a=be(this,Xp),s=be(this,Zg),c=t!==r?t.state:be(this,HS),{state:u}=t;let f={...u},h=!1,m;if(n._optimisticResults){const M=this.hasListeners(),A=!M&&SG(t,n),_=M&&wG(t,r,n,o);(A||_)&&(f={...f,...Ute(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:y,status:v}=f;if(n.select&&f.data!==void 0)if(i&&f.data===(a==null?void 0:a.data)&&n.select===be(this,US))m=be(this,ey);else try{_t(this,US,n.select),m=n.select(f.data),m=nN(i==null?void 0:i.data,m,n),_t(this,ey,m),_t(this,mc,null)}catch(M){_t(this,mc,M)}else m=f.data;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let M;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))M=i.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((D=be(this,ty))==null?void 0:D.state.data,be(this,ty)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),_t(this,mc,null)}catch(A){_t(this,mc,A)}M!==void 0&&(v="success",m=nN(i==null?void 0:i.data,M,n),h=!0)}be(this,mc)&&(g=be(this,mc),m=be(this,ey),y=Date.now(),v="error");const w=f.fetchStatus==="fetching",C=v==="pending",E=v==="error",I=C&&w,O=m!==void 0,R={status:v,fetchStatus:f.fetchStatus,isPending:C,isSuccess:v==="success",isError:E,isInitialLoading:I,isLoading:I,data:m,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!C,isLoadingError:E&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:E&&O,isStale:Gj(t,n),refetch:this.refetch,promise:be(this,sf)};if(this.options.experimental_prefetchInRender){const M=N=>{R.status==="error"?N.reject(R.error):R.data!==void 0&&N.resolve(R.data)},A=()=>{const N=_t(this,sf,R.promise=rN());M(N)},_=be(this,sf);switch(_.status){case"pending":t.queryHash===r.queryHash&&M(_);break;case"fulfilled":(R.status==="error"||R.data!==_.value)&&A();break;case"rejected":(R.status!=="error"||R.error!==_.reason)&&A();break}}return R}updateResult(){const t=be(this,Ji),n=this.createResult(be(this,Un),this.options);if(_t(this,Xp,be(this,Un).state),_t(this,Zg,this.options),be(this,Xp).data!==void 0&&_t(this,ty,be(this,Un)),UE(n,t))return;_t(this,Ji,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!be(this,ny).size)return!0;const a=new Set(i??be(this,ny));return this.options.throwOnError&&a.add("error"),Object.keys(be(this,Ji)).some(s=>{const l=s;return be(this,Ji)[l]!==t[l]&&a.has(l)})};An(this,pr,qte).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&An(this,pr,sN).call(this)}},ma=new WeakMap,Un=new WeakMap,HS=new WeakMap,Ji=new WeakMap,Xp=new WeakMap,Zg=new WeakMap,sf=new WeakMap,mc=new WeakMap,US=new WeakMap,ey=new WeakMap,ty=new WeakMap,Jp=new WeakMap,Zp=new WeakMap,lf=new WeakMap,ny=new WeakMap,pr=new WeakSet,R0=function(t){An(this,pr,uN).call(this);let n=be(this,Un).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch($s)),n},oN=function(){An(this,pr,lN).call(this);const t=kg(this.options.staleTime,be(this,Un));if(uh||be(this,Ji).isStale||!eN(t))return;const r=Lte(be(this,Ji).dataUpdatedAt,t)+1;_t(this,Jp,setTimeout(()=>{be(this,Ji).isStale||this.updateResult()},r))},iN=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(be(this,Un)):this.options.refetchInterval)??!1},aN=function(t){An(this,pr,cN).call(this),_t(this,lf,t),!(uh||Ml(this.options.enabled,be(this,Un))===!1||!eN(be(this,lf))||be(this,lf)===0)&&_t(this,Zp,setInterval(()=>{(this.options.refetchIntervalInBackground||Uj.isFocused())&&An(this,pr,R0).call(this)},be(this,lf)))},sN=function(){An(this,pr,oN).call(this),An(this,pr,aN).call(this,An(this,pr,iN).call(this))},lN=function(){be(this,Jp)&&(clearTimeout(be(this,Jp)),_t(this,Jp,void 0))},cN=function(){be(this,Zp)&&(clearInterval(be(this,Zp)),_t(this,Zp,void 0))},uN=function(){const t=be(this,ma).getQueryCache().build(be(this,ma),this.options);if(t===be(this,Un))return;const n=be(this,Un);_t(this,Un,t),_t(this,HS,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},qte=function(t){zo.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(be(this,Ji))}),be(this,ma).getQueryCache().notify({query:be(this,Un),type:"observerResultsUpdated"})})},zee);function Hxe(e,t){return Ml(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function SG(e,t){return Hxe(e,t)||e.state.data!==void 0&&dN(e,t,t.refetchOnMount)}function dN(e,t,n){if(Ml(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Gj(e,t)}return!1}function wG(e,t,n,r){return(e!==t||Ml(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Gj(e,n)}function Gj(e,t){return Ml(t.enabled,e)!==!1&&e.isStaleByTime(kg(t.staleTime,e))}function Uxe(e,t){return!UE(e.getCurrentResult(),t)}var cf,uf,ga,Iu,ju,fE,fN,Vee,Gxe=(Vee=class extends iv{constructor(n,r){super();Yt(this,ju);Yt(this,cf);Yt(this,uf);Yt(this,ga);Yt(this,Iu);_t(this,cf,n),this.setOptions(r),this.bindMethods(),An(this,ju,fE).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=be(this,cf).defaultMutationOptions(n),UE(this.options,r)||be(this,cf).getMutationCache().notify({type:"observerOptionsUpdated",mutation:be(this,ga),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&dh(r.mutationKey)!==dh(this.options.mutationKey)?this.reset():((o=be(this,ga))==null?void 0:o.state.status)==="pending"&&be(this,ga).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=be(this,ga))==null||n.removeObserver(this)}onMutationUpdate(n){An(this,ju,fE).call(this),An(this,ju,fN).call(this,n)}getCurrentResult(){return be(this,uf)}reset(){var n;(n=be(this,ga))==null||n.removeObserver(this),_t(this,ga,void 0),An(this,ju,fE).call(this),An(this,ju,fN).call(this)}mutate(n,r){var o;return _t(this,Iu,r),(o=be(this,ga))==null||o.removeObserver(this),_t(this,ga,be(this,cf).getMutationCache().build(be(this,cf),this.options)),be(this,ga).addObserver(this),be(this,ga).execute(n)}},cf=new WeakMap,uf=new WeakMap,ga=new WeakMap,Iu=new WeakMap,ju=new WeakSet,fE=function(){var r;const n=((r=be(this,ga))==null?void 0:r.state)??Gte();_t(this,uf,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},fN=function(n){zo.batch(()=>{var r,o,i,a,s,l,c,u;if(be(this,Iu)&&this.hasListeners()){const f=be(this,uf).variables,h=be(this,uf).context;(n==null?void 0:n.type)==="success"?((o=(r=be(this,Iu)).onSuccess)==null||o.call(r,n.data,f,h),(a=(i=be(this,Iu)).onSettled)==null||a.call(i,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((l=(s=be(this,Iu)).onError)==null||l.call(s,n.error,f,h),(u=(c=be(this,Iu)).onSettled)==null||u.call(c,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(be(this,uf))})})},Vee),Wte=x.createContext(void 0),Mt=e=>{const t=x.useContext(Wte);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},av=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(Wte.Provider,{value:e,children:t})),Kte=x.createContext(!1),qxe=()=>x.useContext(Kte);Kte.Provider;function Wxe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Kxe=x.createContext(Wxe()),Yxe=()=>x.useContext(Kxe);function Yte(e,t){return typeof e=="function"?e(...t):!!e}function pN(){}var Qxe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Xxe=e=>{x.useEffect(()=>{e.clearReset()},[e])},Jxe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Yte(n,[e.error,r])),Zxe=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},eSe=(e,t)=>e.isLoading&&e.isFetching&&!t,tSe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,CG=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function nSe(e,t,n){var f,h,m,g,y;const r=Mt(),o=qxe(),i=Yxe(),a=r.defaultQueryOptions(e);(h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,a),a._optimisticResults=o?"isRestoring":"optimistic",Zxe(a),Qxe(a,i),Xxe(i);const s=!r.getQueryCache().get(a.queryHash),[l]=x.useState(()=>new t(r,a)),c=l.getOptimisticResult(a),u=!o&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(v=>{const w=u?l.subscribe(zo.batchCalls(v)):pN;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),x.useEffect(()=>{l.setOptions(a)},[a,l]),tSe(a,c))throw CG(a,l,i);if(Jxe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if((g=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||g.call(m,a,c),a.experimental_prefetchInRender&&!uh&&eSe(c,o)){const v=s?CG(a,l,i):(y=r.getQueryCache().get(a.queryHash))==null?void 0:y.promise;v==null||v.catch(pN).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function yr(e,t){return nSe(e,Vxe)}function Dt(e,t){const n=Mt(),[r]=x.useState(()=>new Gxe(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const o=x.useSyncExternalStore(x.useCallback(a=>r.subscribe(zo.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=x.useCallback((a,s)=>{r.mutate(a,s).catch(pN)},[r]);if(o.error&&Yte(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const rSe="modulepreload",oSe=function(e){return"/"+e},EG={},iSe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=a(n.map(c=>{if(c=oSe(c),c in EG)return;EG[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":rSe,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((m,g)=>{h.addEventListener("load",m),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};var aSe=function(){return null};function sSe(e){return k.jsx(Ibe,{...e,defaultTheme:rI,themeId:qs})}function lSe(e){return function(n){return k.jsx(sSe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function cSe(){return JO}const dt=i0e;function pt(e){return o0e(e)}function uSe(e){return qe("MuiSvgIcon",e)}Ke("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const dSe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Oe(t)}`,`fontSize${Oe(n)}`]};return Me(o,uSe,r)},fSe=ae("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Oe(n.color)}`],t[`fontSize${Oe(n.fontSize)}`]]}})(dt(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,f,h,m,g;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:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,y])=>y&&y.main).map(([y])=>{var v,w;return{props:{color:y},style:{color:(w=(v=(e.vars??e).palette)==null?void 0:v[y])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(h=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(g=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),qE=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24",...m}=r,g=x.isValidElement(o)&&o.type==="svg",y={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:g},v={};u||(v.viewBox=h);const w=dSe(y);return k.jsxs(fSe,{as:s,className:fe(w.root,i),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...v,...m,...g&&o.props,ownerState:y,children:[g?o.props.children:o,f?k.jsx("title",{children:f}):null]})});qE.muiName="SvgIcon";function Ot(e,t){function n(r,o){return k.jsx(qE,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=qE.muiName,x.memo(x.forwardRef(n))}function pSe(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function qj(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(c=>{pSe(c,s[c])&&typeof a[c]=="function"&&(l[c]=(...u)=>{a[c](...u),s[c](...u)})}),l}if(typeof e=="function"||typeof t=="function")return a=>{const s=typeof t=="function"?t(a):t,l=typeof e=="function"?e({...a,...s}):e,c=fe(a==null?void 0:a.className,s==null?void 0:s.className,l==null?void 0:l.className),u=n(l,s);return{...s,...l,...u,...!!c&&{className:c},...(s==null?void 0:s.style)&&(l==null?void 0:l.style)&&{style:{...s.style,...l.style}},...(s==null?void 0:s.sx)&&(l==null?void 0:l.sx)&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,o=n(e,r),i=fe(r==null?void 0:r.className,e==null?void 0:e.className);return{...t,...e,...o,...!!i&&{className:i},...(r==null?void 0:r.style)&&(e==null?void 0:e.style)&&{style:{...r.style,...e.style}},...(r==null?void 0:r.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function $e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hN(e,t){return hN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},hN(e,t)}function Wj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,hN(e,t)}function hSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function mSe(e,t){e.classList?e.classList.add(t):hSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function TG(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function gSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=TG(e.className,t):e.setAttribute("class",TG(e.className&&e.className.baseVal||"",t))}var TR={exports:{}},Ai={};/**
+export default theme;`}function Z$(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(zu(20));const u=Vj(i),f=rv(e);let p=si(f,{mixins:oxe(f.breakpoints,r),palette:u,shadows:cxe.slice(),typography:Dte(u,s),transitions:fxe(a),zIndex:{...pxe}});return p=si(p,c),p=t.reduce((m,g)=>si(m,g),p),p.unstable_sxConfig={...XS,...c==null?void 0:c.unstable_sxConfig},p.unstable_sx=function(g){return Ef({sx:g,theme:this})},p.toRuntimeSource=_te,p}function eN(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 mxe=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=eN(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function $te(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Nte(e){return e==="dark"?mxe:[]}function gxe(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=Vj(t);return{palette:i,opacity:{...$te(i.mode),...n},overlays:r||Nte(i.mode),...o}}function yxe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const vxe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],bxe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return vxe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function xxe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Qe(e,t,n){!e[t]&&n&&(e[t]=n)}function M0(e){return typeof e!="string"||!e.startsWith("hsl")?e:bte(e)}function gu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=A0(M0(e[t])))}function Sxe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const uc=e=>{try{return e()}catch{}},wxe=(e="mui")=>g0e(e);function CR(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=gxe({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=Z$({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...$te(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Nte(o)},a}function Cxe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=yxe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],f=r||(n.light&&u!=="light"?"light":u),p=wxe(i),{[f]:m,light:g,dark:y,...v}=n,w={...v};let C=m;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(zu(21,f));const E=CR(w,C,c,f);g&&!w.light&&CR(w,g,void 0,"light"),y&&!w.dark&&CR(w,y,void 0,"dark");let I={defaultColorScheme:f,...E,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:p,colorSchemes:w,font:{...rxe(E.typography),...E.font},spacing:Sxe(c.spacing)};Object.keys(I.colorSchemes).forEach(M=>{const A=I.colorSchemes[M].palette,_=N=>{const B=N.split("-"),H=B[1],j=B[2];return p(N,A[H][j])};if(A.mode==="light"&&(Qe(A.common,"background","#fff"),Qe(A.common,"onBackground","#000")),A.mode==="dark"&&(Qe(A.common,"background","#000"),Qe(A.common,"onBackground","#fff")),xxe(A,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),A.mode==="light"){Qe(A.Alert,"errorColor",Ir(A.error.light,.6)),Qe(A.Alert,"infoColor",Ir(A.info.light,.6)),Qe(A.Alert,"successColor",Ir(A.success.light,.6)),Qe(A.Alert,"warningColor",Ir(A.warning.light,.6)),Qe(A.Alert,"errorFilledBg",_("palette-error-main")),Qe(A.Alert,"infoFilledBg",_("palette-info-main")),Qe(A.Alert,"successFilledBg",_("palette-success-main")),Qe(A.Alert,"warningFilledBg",_("palette-warning-main")),Qe(A.Alert,"errorFilledColor",uc(()=>A.getContrastText(A.error.main))),Qe(A.Alert,"infoFilledColor",uc(()=>A.getContrastText(A.info.main))),Qe(A.Alert,"successFilledColor",uc(()=>A.getContrastText(A.success.main))),Qe(A.Alert,"warningFilledColor",uc(()=>A.getContrastText(A.warning.main))),Qe(A.Alert,"errorStandardBg",Pr(A.error.light,.9)),Qe(A.Alert,"infoStandardBg",Pr(A.info.light,.9)),Qe(A.Alert,"successStandardBg",Pr(A.success.light,.9)),Qe(A.Alert,"warningStandardBg",Pr(A.warning.light,.9)),Qe(A.Alert,"errorIconColor",_("palette-error-main")),Qe(A.Alert,"infoIconColor",_("palette-info-main")),Qe(A.Alert,"successIconColor",_("palette-success-main")),Qe(A.Alert,"warningIconColor",_("palette-warning-main")),Qe(A.AppBar,"defaultBg",_("palette-grey-100")),Qe(A.Avatar,"defaultBg",_("palette-grey-400")),Qe(A.Button,"inheritContainedBg",_("palette-grey-300")),Qe(A.Button,"inheritContainedHoverBg",_("palette-grey-A100")),Qe(A.Chip,"defaultBorder",_("palette-grey-400")),Qe(A.Chip,"defaultAvatarColor",_("palette-grey-700")),Qe(A.Chip,"defaultIconColor",_("palette-grey-700")),Qe(A.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Qe(A.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Qe(A.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Qe(A.LinearProgress,"primaryBg",Pr(A.primary.main,.62)),Qe(A.LinearProgress,"secondaryBg",Pr(A.secondary.main,.62)),Qe(A.LinearProgress,"errorBg",Pr(A.error.main,.62)),Qe(A.LinearProgress,"infoBg",Pr(A.info.main,.62)),Qe(A.LinearProgress,"successBg",Pr(A.success.main,.62)),Qe(A.LinearProgress,"warningBg",Pr(A.warning.main,.62)),Qe(A.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.11)`),Qe(A.Slider,"primaryTrack",Pr(A.primary.main,.62)),Qe(A.Slider,"secondaryTrack",Pr(A.secondary.main,.62)),Qe(A.Slider,"errorTrack",Pr(A.error.main,.62)),Qe(A.Slider,"infoTrack",Pr(A.info.main,.62)),Qe(A.Slider,"successTrack",Pr(A.success.main,.62)),Qe(A.Slider,"warningTrack",Pr(A.warning.main,.62));const N=g1(A.background.default,.8);Qe(A.SnackbarContent,"bg",N),Qe(A.SnackbarContent,"color",uc(()=>A.getContrastText(N))),Qe(A.SpeedDialAction,"fabHoverBg",g1(A.background.paper,.15)),Qe(A.StepConnector,"border",_("palette-grey-400")),Qe(A.StepContent,"border",_("palette-grey-400")),Qe(A.Switch,"defaultColor",_("palette-common-white")),Qe(A.Switch,"defaultDisabledColor",_("palette-grey-100")),Qe(A.Switch,"primaryDisabledColor",Pr(A.primary.main,.62)),Qe(A.Switch,"secondaryDisabledColor",Pr(A.secondary.main,.62)),Qe(A.Switch,"errorDisabledColor",Pr(A.error.main,.62)),Qe(A.Switch,"infoDisabledColor",Pr(A.info.main,.62)),Qe(A.Switch,"successDisabledColor",Pr(A.success.main,.62)),Qe(A.Switch,"warningDisabledColor",Pr(A.warning.main,.62)),Qe(A.TableCell,"border",Pr(m1(A.divider,1),.88)),Qe(A.Tooltip,"bg",m1(A.grey[700],.92))}if(A.mode==="dark"){Qe(A.Alert,"errorColor",Pr(A.error.light,.6)),Qe(A.Alert,"infoColor",Pr(A.info.light,.6)),Qe(A.Alert,"successColor",Pr(A.success.light,.6)),Qe(A.Alert,"warningColor",Pr(A.warning.light,.6)),Qe(A.Alert,"errorFilledBg",_("palette-error-dark")),Qe(A.Alert,"infoFilledBg",_("palette-info-dark")),Qe(A.Alert,"successFilledBg",_("palette-success-dark")),Qe(A.Alert,"warningFilledBg",_("palette-warning-dark")),Qe(A.Alert,"errorFilledColor",uc(()=>A.getContrastText(A.error.dark))),Qe(A.Alert,"infoFilledColor",uc(()=>A.getContrastText(A.info.dark))),Qe(A.Alert,"successFilledColor",uc(()=>A.getContrastText(A.success.dark))),Qe(A.Alert,"warningFilledColor",uc(()=>A.getContrastText(A.warning.dark))),Qe(A.Alert,"errorStandardBg",Ir(A.error.light,.9)),Qe(A.Alert,"infoStandardBg",Ir(A.info.light,.9)),Qe(A.Alert,"successStandardBg",Ir(A.success.light,.9)),Qe(A.Alert,"warningStandardBg",Ir(A.warning.light,.9)),Qe(A.Alert,"errorIconColor",_("palette-error-main")),Qe(A.Alert,"infoIconColor",_("palette-info-main")),Qe(A.Alert,"successIconColor",_("palette-success-main")),Qe(A.Alert,"warningIconColor",_("palette-warning-main")),Qe(A.AppBar,"defaultBg",_("palette-grey-900")),Qe(A.AppBar,"darkBg",_("palette-background-paper")),Qe(A.AppBar,"darkColor",_("palette-text-primary")),Qe(A.Avatar,"defaultBg",_("palette-grey-600")),Qe(A.Button,"inheritContainedBg",_("palette-grey-800")),Qe(A.Button,"inheritContainedHoverBg",_("palette-grey-700")),Qe(A.Chip,"defaultBorder",_("palette-grey-700")),Qe(A.Chip,"defaultAvatarColor",_("palette-grey-300")),Qe(A.Chip,"defaultIconColor",_("palette-grey-300")),Qe(A.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Qe(A.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Qe(A.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Qe(A.LinearProgress,"primaryBg",Ir(A.primary.main,.5)),Qe(A.LinearProgress,"secondaryBg",Ir(A.secondary.main,.5)),Qe(A.LinearProgress,"errorBg",Ir(A.error.main,.5)),Qe(A.LinearProgress,"infoBg",Ir(A.info.main,.5)),Qe(A.LinearProgress,"successBg",Ir(A.success.main,.5)),Qe(A.LinearProgress,"warningBg",Ir(A.warning.main,.5)),Qe(A.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.13)`),Qe(A.Slider,"primaryTrack",Ir(A.primary.main,.5)),Qe(A.Slider,"secondaryTrack",Ir(A.secondary.main,.5)),Qe(A.Slider,"errorTrack",Ir(A.error.main,.5)),Qe(A.Slider,"infoTrack",Ir(A.info.main,.5)),Qe(A.Slider,"successTrack",Ir(A.success.main,.5)),Qe(A.Slider,"warningTrack",Ir(A.warning.main,.5));const N=g1(A.background.default,.98);Qe(A.SnackbarContent,"bg",N),Qe(A.SnackbarContent,"color",uc(()=>A.getContrastText(N))),Qe(A.SpeedDialAction,"fabHoverBg",g1(A.background.paper,.15)),Qe(A.StepConnector,"border",_("palette-grey-600")),Qe(A.StepContent,"border",_("palette-grey-600")),Qe(A.Switch,"defaultColor",_("palette-grey-300")),Qe(A.Switch,"defaultDisabledColor",_("palette-grey-600")),Qe(A.Switch,"primaryDisabledColor",Ir(A.primary.main,.55)),Qe(A.Switch,"secondaryDisabledColor",Ir(A.secondary.main,.55)),Qe(A.Switch,"errorDisabledColor",Ir(A.error.main,.55)),Qe(A.Switch,"infoDisabledColor",Ir(A.info.main,.55)),Qe(A.Switch,"successDisabledColor",Ir(A.success.main,.55)),Qe(A.Switch,"warningDisabledColor",Ir(A.warning.main,.55)),Qe(A.TableCell,"border",Ir(m1(A.divider,1),.68)),Qe(A.Tooltip,"bg",m1(A.grey[700],.92))}gu(A.background,"default"),gu(A.background,"paper"),gu(A.common,"background"),gu(A.common,"onBackground"),gu(A,"divider"),Object.keys(A).forEach(N=>{const B=A[N];N!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&Qe(A[N],"mainChannel",A0(M0(B.main))),B.light&&Qe(A[N],"lightChannel",A0(M0(B.light))),B.dark&&Qe(A[N],"darkChannel",A0(M0(B.dark))),B.contrastText&&Qe(A[N],"contrastTextChannel",A0(M0(B.contrastText))),N==="text"&&(gu(A[N],"primary"),gu(A[N],"secondary")),N==="action"&&(B.active&&gu(A[N],"active"),B.selected&&gu(A[N],"selected")))})}),I=t.reduce((M,A)=>si(M,A),I);const O={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:bxe(I)},{vars:P,generateThemeVars:R,generateStyleSheets:D}=b0e(I,O);return I.vars=P,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([M,A])=>{I[M]=A}),I.generateThemeVars=R,I.generateStyleSheets=D,I.generateSpacing=function(){return dte(c.spacing,WO(this))},I.getColorSchemeSelector=x0e(s),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig={...XS,...c==null?void 0:c.unstable_sxConfig},I.unstable_sx=function(A){return Ef({sx:A,theme:this})},I.toRuntimeSource=_te,I}function hG(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Vj({...n===!0?{}:n.palette,mode:t})})}function ZS(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Z$(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const f=Z$({...e,palette:u},...t);return f.defaultColorScheme=s,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},hG(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},hG(f,"light",c.light)),f}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),Cxe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function Exe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Txe(e){return parseFloat(e)}const oI=ZS();function Lr(){const e=JS(oI);return e[qs]||e}function Pn({props:e,name:t}){return eI({props:e,name:t,defaultTheme:oI,themeId:qs})}function Lte(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ui=e=>Lte(e)&&e!=="classes",ae=gte({themeId:qs,defaultTheme:oI,rootShouldForwardProp:ui});function ER({theme:e,...t}){const n=qs in e?e[qs]:void 0;return k.jsx(Pte,{...t,themeId:n?qs:void 0,theme:n||e})}const y1={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:Oxe}=m0e({themeId:qs,theme:()=>ZS({cssVariables:!0}),colorSchemeStorageKey:y1.colorSchemeStorageKey,modeStorageKey:y1.modeStorageKey,defaultColorScheme:{light:y1.defaultLightColorScheme,dark:y1.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Dte(e.palette,e.typography)};return t.unstable_sx=function(r){return Ef({sx:r,theme:this})},t}}),Ixe=Oxe;function Fh({theme:e,...t}){if(typeof e=="function")return k.jsx(ER,{theme:e,...t});const n=qs in e?e[qs]:e;return"colorSchemes"in n?k.jsx(Ixe,{theme:e,...t}):"vars"in n?k.jsx(ER,{theme:e,...t}):k.jsx(ER,{theme:{...e,vars:null},...t})}var av=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fh=typeof window>"u"||"Deno"in globalThis;function $s(){}function Pxe(e,t){return typeof e=="function"?e(t):e}function tN(e){return typeof e=="number"&&e>=0&&e!==1/0}function Fte(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _g(e,t){return typeof e=="function"?e(t):e}function Dl(e,t){return typeof e=="function"?e(t):e}function mG(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==Hj(a,t.options))return!1}else if(!Cx(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function gG(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ph(t.options.mutationKey)!==ph(i))return!1}else if(!Cx(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Hj(e,t){return((t==null?void 0:t.queryKeyHashFn)||ph)(e)}function ph(e){return JSON.stringify(e,(t,n)=>nN(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Cx(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Cx(e[n],t[n])):!1}function jte(e,t){if(e===t)return e;const n=yG(e)&&yG(t);if(n||nN(e)&&nN(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c<a;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(s[u]=void 0,l++):(s[u]=jte(e[u],t[u]),s[u]===e[u]&&e[u]!==void 0&&l++)}return o===a&&l===o?e:s}return t}function GE(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function yG(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nN(e){if(!vG(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!vG(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vG(e){return Object.prototype.toString.call(e)==="[object Object]"}function Axe(e){return new Promise(t=>{setTimeout(t,e)})}function rN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?jte(e,t):t}function Mxe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Rxe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Uj=Symbol();function Bte(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Uj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Kp,rf,Gg,_ee,Dxe=(_ee=class extends av{constructor(){super();Qt(this,Kp);Qt(this,rf);Qt(this,Gg);_t(this,Gg,t=>{if(!fh&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){be(this,rf)||this.setEventListener(be(this,Gg))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,rf))==null||t.call(this),_t(this,rf,void 0))}setEventListener(t){var n;_t(this,Gg,t),(n=be(this,rf))==null||n.call(this),_t(this,rf,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){be(this,Kp)!==t&&(_t(this,Kp,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof be(this,Kp)=="boolean"?be(this,Kp):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Kp=new WeakMap,rf=new WeakMap,Gg=new WeakMap,_ee),Gj=new Dxe,qg,of,Wg,$ee,kxe=($ee=class extends av{constructor(){super();Qt(this,qg,!0);Qt(this,of);Qt(this,Wg);_t(this,Wg,t=>{if(!fh&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){be(this,of)||this.setEventListener(be(this,Wg))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,of))==null||t.call(this),_t(this,of,void 0))}setEventListener(t){var n;_t(this,Wg,t),(n=be(this,of))==null||n.call(this),_t(this,of,t(this.setOnline.bind(this)))}setOnline(t){be(this,qg)!==t&&(_t(this,qg,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return be(this,qg)}},qg=new WeakMap,of=new WeakMap,Wg=new WeakMap,$ee),qE=new kxe;function oN(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function _xe(e){return Math.min(1e3*2**e,3e4)}function zte(e){return(e??"online")==="online"?qE.isOnline():!0}var Vte=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function TR(e){return e instanceof Vte}function Hte(e){let t=!1,n=0,r=!1,o;const i=oN(),a=y=>{var v;r||(p(new Vte(y)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>Gj.isFocused()&&(e.networkMode==="always"||qE.isOnline())&&e.canRun(),u=()=>zte(e.networkMode)&&e.canRun(),f=y=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,y),o==null||o(),i.resolve(y))},p=y=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,y),o==null||o(),i.reject(y))},m=()=>new Promise(y=>{var v;o=w=>{(r||c())&&y(w)},(v=e.onPause)==null||v.call(e)}).then(()=>{var y;o=void 0,r||(y=e.onContinue)==null||y.call(e)}),g=()=>{if(r)return;let y;const v=n===0?e.initialPromise:void 0;try{y=v??e.fn()}catch(w){y=Promise.reject(w)}Promise.resolve(y).then(f).catch(w=>{var P;if(r)return;const C=e.retry??(fh?0:3),E=e.retryDelay??_xe,I=typeof E=="function"?E(n,w):E,O=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,w);if(t||!O){p(w);return}n++,(P=e.onFail)==null||P.call(e,n,w),Axe(I).then(()=>c()?void 0:m()).then(()=>{t?p(w):g()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?g():m().then(g),i)}}var $xe=e=>setTimeout(e,0);function Nxe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=$xe;const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var Vo=Nxe(),Yp,Nee,Ute=(Nee=class{constructor(){Qt(this,Yp)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tN(this.gcTime)&&_t(this,Yp,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fh?1/0:5*60*1e3))}clearGcTimeout(){be(this,Yp)&&(clearTimeout(be(this,Yp)),_t(this,Yp,void 0))}},Yp=new WeakMap,Nee),Kg,Yg,_s,Qp,Di,zS,Xp,Ol,xu,Lee,Lxe=(Lee=class extends Ute{constructor(t){super();Qt(this,Ol);Qt(this,Kg);Qt(this,Yg);Qt(this,_s);Qt(this,Qp);Qt(this,Di);Qt(this,zS);Qt(this,Xp);_t(this,Xp,!1),_t(this,zS,t.defaultOptions),this.setOptions(t.options),this.observers=[],_t(this,Qp,t.client),_t(this,_s,be(this,Qp).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,_t(this,Kg,Fxe(this.options)),this.state=t.state??be(this,Kg),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=be(this,Di))==null?void 0:t.promise}setOptions(t){this.options={...be(this,zS),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&be(this,_s).remove(this)}setData(t,n){const r=rN(this.state.data,t,this.options);return An(this,Ol,xu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){An(this,Ol,xu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=be(this,Di))==null?void 0:r.promise;return(o=be(this,Di))==null||o.cancel(t),n?n.then($s).catch($s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(be(this,Kg))}isActive(){return this.observers.some(t=>Dl(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Fte(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Di))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,Di))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),be(this,_s).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(be(this,Di)&&(be(this,Xp)?be(this,Di).cancel({revert:!0}):be(this,Di).cancelRetry()),this.scheduleGc()),be(this,_s).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||An(this,Ol,xu).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(be(this,Di))return be(this,Di).continueRetry(),be(this,Di).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,o=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(_t(this,Xp,!0),r.signal)})},i=()=>{const f=Bte(this.options,n),p={client:be(this,Qp),queryKey:this.queryKey,meta:this.meta};return o(p),_t(this,Xp,!1),this.options.persister?this.options.persister(f,p,this):f(p)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:be(this,Qp),state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),_t(this,Yg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&An(this,Ol,xu).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=f=>{var p,m,g,y;TR(f)&&f.silent||An(this,Ol,xu).call(this,{type:"error",error:f}),TR(f)||((m=(p=be(this,_s).config).onError)==null||m.call(p,f,this),(y=(g=be(this,_s).config).onSettled)==null||y.call(g,this.state.data,f,this)),this.scheduleGc()};return _t(this,Di,Hte({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,m,g,y;if(f===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){s(v);return}(m=(p=be(this,_s).config).onSuccess)==null||m.call(p,f,this),(y=(g=be(this,_s).config).onSettled)==null||y.call(g,f,this.state.error,this),this.scheduleGc()},onError:s,onFail:(f,p)=>{An(this,Ol,xu).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{An(this,Ol,xu).call(this,{type:"pause"})},onContinue:()=>{An(this,Ol,xu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),be(this,Di).start()}},Kg=new WeakMap,Yg=new WeakMap,_s=new WeakMap,Qp=new WeakMap,Di=new WeakMap,zS=new WeakMap,Xp=new WeakMap,Ol=new WeakSet,xu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Gte(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return TR(o)&&o.revert&&be(this,Yg)?{...be(this,Yg),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Vo.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),be(this,_s).notify({query:this,type:"updated",action:t})})},Lee);function Gte(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:zte(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Fxe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var pc,Fee,jxe=(Fee=class extends av{constructor(t={}){super();Qt(this,pc);this.config=t,_t(this,pc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Hj(o,n);let a=this.get(i);return a||(a=new Lxe({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){be(this,pc).has(t.queryHash)||(be(this,pc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=be(this,pc).get(t.queryHash);n&&(t.destroy(),n===t&&be(this,pc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Vo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return be(this,pc).get(t)}getAll(){return[...be(this,pc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mG(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mG(t,r)):n}notify(t){Vo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Vo.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Vo.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pc=new WeakMap,Fee),hc,Xi,Jp,mc,zd,jee,Bxe=(jee=class extends Ute{constructor(t){super();Qt(this,mc);Qt(this,hc);Qt(this,Xi);Qt(this,Jp);this.mutationId=t.mutationId,_t(this,Xi,t.mutationCache),_t(this,hc,[]),this.state=t.state||qte(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){be(this,hc).includes(t)||(be(this,hc).push(t),this.clearGcTimeout(),be(this,Xi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){_t(this,hc,be(this,hc).filter(n=>n!==t)),this.scheduleGc(),be(this,Xi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){be(this,hc).length||(this.state.status==="pending"?this.scheduleGc():be(this,Xi).remove(this))}continue(){var t;return((t=be(this,Jp))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,f,p,m,g,y,v,w,C,E,I,O,P,R;_t(this,Jp,Hte({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,M)=>{An(this,mc,zd).call(this,{type:"failed",failureCount:D,error:M})},onPause:()=>{An(this,mc,zd).call(this,{type:"pause"})},onContinue:()=>{An(this,mc,zd).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>be(this,Xi).canRun(this)}));const n=this.state.status==="pending",r=!be(this,Jp).canStart();try{if(!n){An(this,mc,zd).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=be(this,Xi).config).onMutate)==null?void 0:i.call(o,t,this));const M=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));M!==this.state.context&&An(this,mc,zd).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const D=await be(this,Jp).start();return await((c=(l=be(this,Xi).config).onSuccess)==null?void 0:c.call(l,D,t,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,D,t,this.state.context)),await((m=(p=be(this,Xi).config).onSettled)==null?void 0:m.call(p,D,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,D,null,t,this.state.context)),An(this,mc,zd).call(this,{type:"success",data:D}),D}catch(D){try{throw await((w=(v=be(this,Xi).config).onError)==null?void 0:w.call(v,D,t,this.state.context,this)),await((E=(C=this.options).onError)==null?void 0:E.call(C,D,t,this.state.context)),await((O=(I=be(this,Xi).config).onSettled)==null?void 0:O.call(I,void 0,D,this.state.variables,this.state.context,this)),await((R=(P=this.options).onSettled)==null?void 0:R.call(P,void 0,D,t,this.state.context)),D}finally{An(this,mc,zd).call(this,{type:"error",error:D})}}finally{be(this,Xi).runNext(this)}}},hc=new WeakMap,Xi=new WeakMap,Jp=new WeakMap,mc=new WeakSet,zd=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Vo.batch(()=>{be(this,hc).forEach(r=>{r.onMutationUpdate(t)}),be(this,Xi).notify({mutation:this,type:"updated",action:t})})},jee);function qte(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Iu,Il,VS,Bee,zxe=(Bee=class extends av{constructor(t={}){super();Qt(this,Iu);Qt(this,Il);Qt(this,VS);this.config=t,_t(this,Iu,new Set),_t(this,Il,new Map),_t(this,VS,0)}build(t,n,r){const o=new Bxe({mutationCache:this,mutationId:++f1(this,VS)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){be(this,Iu).add(t);const n=v1(t);if(typeof n=="string"){const r=be(this,Il).get(n);r?r.push(t):be(this,Il).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(be(this,Iu).delete(t)){const n=v1(t);if(typeof n=="string"){const r=be(this,Il).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&be(this,Il).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=v1(t);if(typeof n=="string"){const r=be(this,Il).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=v1(t);if(typeof n=="string"){const o=(r=be(this,Il).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Vo.batch(()=>{be(this,Iu).forEach(t=>{this.notify({type:"removed",mutation:t})}),be(this,Iu).clear(),be(this,Il).clear()})}getAll(){return Array.from(be(this,Iu))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gG(n,r))}findAll(t={}){return this.getAll().filter(n=>gG(t,n))}notify(t){Vo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Vo.batch(()=>Promise.all(t.map(n=>n.continue().catch($s))))}},Iu=new WeakMap,Il=new WeakMap,VS=new WeakMap,Bee);function v1(e){var t;return(t=e.options.scope)==null?void 0:t.id}function bG(e){return{onFetch:(t,n)=>{var u,f,p,m,g;const r=t.options,o=(p=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],a=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const v=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},w=Bte(t.options,t.fetchOptions),C=async(E,I,O)=>{if(y)return Promise.reject();if(I==null&&E.pages.length)return Promise.resolve(E);const P={client:t.client,queryKey:t.queryKey,pageParam:I,direction:O?"backward":"forward",meta:t.options.meta};v(P);const R=await w(P),{maxPages:D}=t.options,M=O?Rxe:Mxe;return{pages:M(E.pages,R,D),pageParams:M(E.pageParams,I,D)}};if(o&&i.length){const E=o==="backward",I=E?Vxe:xG,O={pages:i,pageParams:a},P=I(r,O);s=await C(O,P,E)}else{const E=e??i.length;do{const I=l===0?a[0]??r.initialPageParam:xG(r,s);if(l>0&&I==null)break;s=await C(s,I),l++}while(l<E)}return s};t.options.persister?t.fetchFn=()=>{var y,v;return(v=(y=t.options).persister)==null?void 0:v.call(y,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function xG(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Vxe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var co,af,sf,Qg,Xg,lf,Jg,Zg,zee,Hxe=(zee=class{constructor(e={}){Qt(this,co);Qt(this,af);Qt(this,sf);Qt(this,Qg);Qt(this,Xg);Qt(this,lf);Qt(this,Jg);Qt(this,Zg);_t(this,co,e.queryCache||new jxe),_t(this,af,e.mutationCache||new zxe),_t(this,sf,e.defaultOptions||{}),_t(this,Qg,new Map),_t(this,Xg,new Map),_t(this,lf,0)}mount(){f1(this,lf)._++,be(this,lf)===1&&(_t(this,Jg,Gj.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,co).onFocus())})),_t(this,Zg,qE.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,co).onOnline())})))}unmount(){var e,t;f1(this,lf)._--,be(this,lf)===0&&((e=be(this,Jg))==null||e.call(this),_t(this,Jg,void 0),(t=be(this,Zg))==null||t.call(this),_t(this,Zg,void 0))}isFetching(e){return be(this,co).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return be(this,af).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,co).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=be(this,co).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(_g(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return be(this,co).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=be(this,co).get(r.queryHash),i=o==null?void 0:o.state.data,a=Pxe(t,i);if(a!==void 0)return be(this,co).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Vo.batch(()=>be(this,co).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,co).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=be(this,co);Vo.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=be(this,co);return Vo.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Vo.batch(()=>be(this,co).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then($s).catch($s)}invalidateQueries(e,t={}){return Vo.batch(()=>(be(this,co).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Vo.batch(()=>be(this,co).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch($s)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then($s)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=be(this,co).build(this,t);return n.isStaleByTime(_g(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($s).catch($s)}fetchInfiniteQuery(e){return e.behavior=bG(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($s).catch($s)}ensureInfiniteQueryData(e){return e.behavior=bG(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qE.isOnline()?be(this,af).resumePausedMutations():Promise.resolve()}getQueryCache(){return be(this,co)}getMutationCache(){return be(this,af)}getDefaultOptions(){return be(this,sf)}setDefaultOptions(e){_t(this,sf,e)}setQueryDefaults(e,t){be(this,Qg).set(ph(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...be(this,Qg).values()],n={};return t.forEach(r=>{Cx(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){be(this,Xg).set(ph(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...be(this,Xg).values()],n={};return t.forEach(r=>{Cx(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...be(this,sf).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Hj(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Uj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...be(this,sf).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){be(this,co).clear(),be(this,af).clear()}},co=new WeakMap,af=new WeakMap,sf=new WeakMap,Qg=new WeakMap,Xg=new WeakMap,lf=new WeakMap,Jg=new WeakMap,Zg=new WeakMap,zee),ma,Un,HS,Ji,Zp,ey,cf,gc,US,ty,ny,eh,th,uf,ry,hr,R0,iN,aN,sN,lN,cN,uN,dN,Wte,Vee,Uxe=(Vee=class extends av{constructor(t,n){super();Qt(this,hr);Qt(this,ma);Qt(this,Un);Qt(this,HS);Qt(this,Ji);Qt(this,Zp);Qt(this,ey);Qt(this,cf);Qt(this,gc);Qt(this,US);Qt(this,ty);Qt(this,ny);Qt(this,eh);Qt(this,th);Qt(this,uf);Qt(this,ry,new Set);this.options=n,_t(this,ma,t),_t(this,gc,null),_t(this,cf,oN()),this.options.experimental_prefetchInRender||be(this,cf).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(be(this,Un).addObserver(this),SG(be(this,Un),this.options)?An(this,hr,R0).call(this):this.updateResult(),An(this,hr,lN).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fN(be(this,Un),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fN(be(this,Un),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,An(this,hr,cN).call(this),An(this,hr,uN).call(this),be(this,Un).removeObserver(this)}setOptions(t){const n=this.options,r=be(this,Un);if(this.options=be(this,ma).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dl(this.options.enabled,be(this,Un))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");An(this,hr,dN).call(this),be(this,Un).setOptions(this.options),n._defaulted&&!GE(this.options,n)&&be(this,ma).getQueryCache().notify({type:"observerOptionsUpdated",query:be(this,Un),observer:this});const o=this.hasListeners();o&&wG(be(this,Un),r,this.options,n)&&An(this,hr,R0).call(this),this.updateResult(),o&&(be(this,Un)!==r||Dl(this.options.enabled,be(this,Un))!==Dl(n.enabled,be(this,Un))||_g(this.options.staleTime,be(this,Un))!==_g(n.staleTime,be(this,Un)))&&An(this,hr,iN).call(this);const i=An(this,hr,aN).call(this);o&&(be(this,Un)!==r||Dl(this.options.enabled,be(this,Un))!==Dl(n.enabled,be(this,Un))||i!==be(this,uf))&&An(this,hr,sN).call(this,i)}getOptimisticResult(t){const n=be(this,ma).getQueryCache().build(be(this,ma),t),r=this.createResult(n,t);return qxe(this,r)&&(_t(this,Ji,r),_t(this,ey,this.options),_t(this,Zp,be(this,Un).state)),r}getCurrentResult(){return be(this,Ji)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){be(this,ry).add(t)}getCurrentQuery(){return be(this,Un)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=be(this,ma).defaultQueryOptions(t),r=be(this,ma).getQueryCache().build(be(this,ma),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return An(this,hr,R0).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),be(this,Ji)))}createResult(t,n){var D;const r=be(this,Un),o=this.options,i=be(this,Ji),a=be(this,Zp),s=be(this,ey),c=t!==r?t.state:be(this,HS),{state:u}=t;let f={...u},p=!1,m;if(n._optimisticResults){const M=this.hasListeners(),A=!M&&SG(t,n),_=M&&wG(t,r,n,o);(A||_)&&(f={...f,...Gte(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:y,status:v}=f;if(n.select&&f.data!==void 0)if(i&&f.data===(a==null?void 0:a.data)&&n.select===be(this,US))m=be(this,ty);else try{_t(this,US,n.select),m=n.select(f.data),m=rN(i==null?void 0:i.data,m,n),_t(this,ty,m),_t(this,gc,null)}catch(M){_t(this,gc,M)}else m=f.data;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let M;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))M=i.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((D=be(this,ny))==null?void 0:D.state.data,be(this,ny)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),_t(this,gc,null)}catch(A){_t(this,gc,A)}M!==void 0&&(v="success",m=rN(i==null?void 0:i.data,M,n),p=!0)}be(this,gc)&&(g=be(this,gc),m=be(this,ty),y=Date.now(),v="error");const w=f.fetchStatus==="fetching",C=v==="pending",E=v==="error",I=C&&w,O=m!==void 0,R={status:v,fetchStatus:f.fetchStatus,isPending:C,isSuccess:v==="success",isError:E,isInitialLoading:I,isLoading:I,data:m,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!C,isLoadingError:E&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:E&&O,isStale:qj(t,n),refetch:this.refetch,promise:be(this,cf)};if(this.options.experimental_prefetchInRender){const M=N=>{R.status==="error"?N.reject(R.error):R.data!==void 0&&N.resolve(R.data)},A=()=>{const N=_t(this,cf,R.promise=oN());M(N)},_=be(this,cf);switch(_.status){case"pending":t.queryHash===r.queryHash&&M(_);break;case"fulfilled":(R.status==="error"||R.data!==_.value)&&A();break;case"rejected":(R.status!=="error"||R.error!==_.reason)&&A();break}}return R}updateResult(){const t=be(this,Ji),n=this.createResult(be(this,Un),this.options);if(_t(this,Zp,be(this,Un).state),_t(this,ey,this.options),be(this,Zp).data!==void 0&&_t(this,ny,be(this,Un)),GE(n,t))return;_t(this,Ji,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!be(this,ry).size)return!0;const a=new Set(i??be(this,ry));return this.options.throwOnError&&a.add("error"),Object.keys(be(this,Ji)).some(s=>{const l=s;return be(this,Ji)[l]!==t[l]&&a.has(l)})};An(this,hr,Wte).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&An(this,hr,lN).call(this)}},ma=new WeakMap,Un=new WeakMap,HS=new WeakMap,Ji=new WeakMap,Zp=new WeakMap,ey=new WeakMap,cf=new WeakMap,gc=new WeakMap,US=new WeakMap,ty=new WeakMap,ny=new WeakMap,eh=new WeakMap,th=new WeakMap,uf=new WeakMap,ry=new WeakMap,hr=new WeakSet,R0=function(t){An(this,hr,dN).call(this);let n=be(this,Un).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch($s)),n},iN=function(){An(this,hr,cN).call(this);const t=_g(this.options.staleTime,be(this,Un));if(fh||be(this,Ji).isStale||!tN(t))return;const r=Fte(be(this,Ji).dataUpdatedAt,t)+1;_t(this,eh,setTimeout(()=>{be(this,Ji).isStale||this.updateResult()},r))},aN=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(be(this,Un)):this.options.refetchInterval)??!1},sN=function(t){An(this,hr,uN).call(this),_t(this,uf,t),!(fh||Dl(this.options.enabled,be(this,Un))===!1||!tN(be(this,uf))||be(this,uf)===0)&&_t(this,th,setInterval(()=>{(this.options.refetchIntervalInBackground||Gj.isFocused())&&An(this,hr,R0).call(this)},be(this,uf)))},lN=function(){An(this,hr,iN).call(this),An(this,hr,sN).call(this,An(this,hr,aN).call(this))},cN=function(){be(this,eh)&&(clearTimeout(be(this,eh)),_t(this,eh,void 0))},uN=function(){be(this,th)&&(clearInterval(be(this,th)),_t(this,th,void 0))},dN=function(){const t=be(this,ma).getQueryCache().build(be(this,ma),this.options);if(t===be(this,Un))return;const n=be(this,Un);_t(this,Un,t),_t(this,HS,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Wte=function(t){Vo.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(be(this,Ji))}),be(this,ma).getQueryCache().notify({query:be(this,Un),type:"observerResultsUpdated"})})},Vee);function Gxe(e,t){return Dl(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function SG(e,t){return Gxe(e,t)||e.state.data!==void 0&&fN(e,t,t.refetchOnMount)}function fN(e,t,n){if(Dl(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&qj(e,t)}return!1}function wG(e,t,n,r){return(e!==t||Dl(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&qj(e,n)}function qj(e,t){return Dl(t.enabled,e)!==!1&&e.isStaleByTime(_g(t.staleTime,e))}function qxe(e,t){return!GE(e.getCurrentResult(),t)}var df,ff,ga,Pu,Bu,pE,pN,Hee,Wxe=(Hee=class extends av{constructor(n,r){super();Qt(this,Bu);Qt(this,df);Qt(this,ff);Qt(this,ga);Qt(this,Pu);_t(this,df,n),this.setOptions(r),this.bindMethods(),An(this,Bu,pE).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=be(this,df).defaultMutationOptions(n),GE(this.options,r)||be(this,df).getMutationCache().notify({type:"observerOptionsUpdated",mutation:be(this,ga),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ph(r.mutationKey)!==ph(this.options.mutationKey)?this.reset():((o=be(this,ga))==null?void 0:o.state.status)==="pending"&&be(this,ga).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=be(this,ga))==null||n.removeObserver(this)}onMutationUpdate(n){An(this,Bu,pE).call(this),An(this,Bu,pN).call(this,n)}getCurrentResult(){return be(this,ff)}reset(){var n;(n=be(this,ga))==null||n.removeObserver(this),_t(this,ga,void 0),An(this,Bu,pE).call(this),An(this,Bu,pN).call(this)}mutate(n,r){var o;return _t(this,Pu,r),(o=be(this,ga))==null||o.removeObserver(this),_t(this,ga,be(this,df).getMutationCache().build(be(this,df),this.options)),be(this,ga).addObserver(this),be(this,ga).execute(n)}},df=new WeakMap,ff=new WeakMap,ga=new WeakMap,Pu=new WeakMap,Bu=new WeakSet,pE=function(){var r;const n=((r=be(this,ga))==null?void 0:r.state)??qte();_t(this,ff,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},pN=function(n){Vo.batch(()=>{var r,o,i,a,s,l,c,u;if(be(this,Pu)&&this.hasListeners()){const f=be(this,ff).variables,p=be(this,ff).context;(n==null?void 0:n.type)==="success"?((o=(r=be(this,Pu)).onSuccess)==null||o.call(r,n.data,f,p),(a=(i=be(this,Pu)).onSettled)==null||a.call(i,n.data,null,f,p)):(n==null?void 0:n.type)==="error"&&((l=(s=be(this,Pu)).onError)==null||l.call(s,n.error,f,p),(u=(c=be(this,Pu)).onSettled)==null||u.call(c,void 0,n.error,f,p))}this.listeners.forEach(f=>{f(be(this,ff))})})},Hee),Kte=x.createContext(void 0),Mt=e=>{const t=x.useContext(Kte);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sv=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(Kte.Provider,{value:e,children:t})),Yte=x.createContext(!1),Kxe=()=>x.useContext(Yte);Yte.Provider;function Yxe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qxe=x.createContext(Yxe()),Xxe=()=>x.useContext(Qxe);function Qte(e,t){return typeof e=="function"?e(...t):!!e}function hN(){}var Jxe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Zxe=e=>{x.useEffect(()=>{e.clearReset()},[e])},eSe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Qte(n,[e.error,r])),tSe=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},nSe=(e,t)=>e.isLoading&&e.isFetching&&!t,rSe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,CG=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function oSe(e,t,n){var f,p,m,g,y;const r=Mt(),o=Kxe(),i=Xxe(),a=r.defaultQueryOptions(e);(p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.call(f,a),a._optimisticResults=o?"isRestoring":"optimistic",tSe(a),Jxe(a,i),Zxe(i);const s=!r.getQueryCache().get(a.queryHash),[l]=x.useState(()=>new t(r,a)),c=l.getOptimisticResult(a),u=!o&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(v=>{const w=u?l.subscribe(Vo.batchCalls(v)):hN;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),x.useEffect(()=>{l.setOptions(a)},[a,l]),rSe(a,c))throw CG(a,l,i);if(eSe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if((g=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||g.call(m,a,c),a.experimental_prefetchInRender&&!fh&&nSe(c,o)){const v=s?CG(a,l,i):(y=r.getQueryCache().get(a.queryHash))==null?void 0:y.promise;v==null||v.catch(hN).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function yr(e,t){return oSe(e,Uxe)}function Dt(e,t){const n=Mt(),[r]=x.useState(()=>new Wxe(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const o=x.useSyncExternalStore(x.useCallback(a=>r.subscribe(Vo.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=x.useCallback((a,s)=>{r.mutate(a,s).catch(hN)},[r]);if(o.error&&Qte(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const iSe="modulepreload",aSe=function(e){return"/"+e},EG={},sSe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=a(n.map(c=>{if(c=aSe(c),c in EG)return;EG[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":iSe,u||(p.as="script"),p.crossOrigin="",p.href=c,l&&p.setAttribute("nonce",l),document.head.appendChild(p),u)return new Promise((m,g)=>{p.addEventListener("load",m),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};var lSe=function(){return null};function cSe(e){return k.jsx(Abe,{...e,defaultTheme:oI,themeId:qs})}function uSe(e){return function(n){return k.jsx(cSe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function dSe(){return ZO}const dt=s0e;function pt(e){return a0e(e)}function fSe(e){return qe("MuiSvgIcon",e)}Ke("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const pSe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Oe(t)}`,`fontSize${Oe(n)}`]};return Me(o,fSe,r)},hSe=ae("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Oe(n.color)}`],t[`fontSize${Oe(n.fontSize)}`]]}})(dt(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,f,p,m,g;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:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,y])=>y&&y.main).map(([y])=>{var v,w;return{props:{color:y},style:{color:(w=(v=(e.vars??e).palette)==null?void 0:v[y])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(p=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(g=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),WE=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:p="0 0 24 24",...m}=r,g=x.isValidElement(o)&&o.type==="svg",y={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:g},v={};u||(v.viewBox=p);const w=pSe(y);return k.jsxs(hSe,{as:s,className:fe(w.root,i),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...v,...m,...g&&o.props,ownerState:y,children:[g?o.props.children:o,f?k.jsx("title",{children:f}):null]})});WE.muiName="SvgIcon";function Ot(e,t){function n(r,o){return k.jsx(WE,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=WE.muiName,x.memo(x.forwardRef(n))}function mSe(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function Wj(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(c=>{mSe(c,s[c])&&typeof a[c]=="function"&&(l[c]=(...u)=>{a[c](...u),s[c](...u)})}),l}if(typeof e=="function"||typeof t=="function")return a=>{const s=typeof t=="function"?t(a):t,l=typeof e=="function"?e({...a,...s}):e,c=fe(a==null?void 0:a.className,s==null?void 0:s.className,l==null?void 0:l.className),u=n(l,s);return{...s,...l,...u,...!!c&&{className:c},...(s==null?void 0:s.style)&&(l==null?void 0:l.style)&&{style:{...s.style,...l.style}},...(s==null?void 0:s.sx)&&(l==null?void 0:l.sx)&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,o=n(e,r),i=fe(r==null?void 0:r.className,e==null?void 0:e.className);return{...t,...e,...o,...!!i&&{className:i},...(r==null?void 0:r.style)&&(e==null?void 0:e.style)&&{style:{...r.style,...e.style}},...(r==null?void 0:r.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function $e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function mN(e,t){return mN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},mN(e,t)}function Kj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mN(e,t)}function gSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function ySe(e,t){e.classList?e.classList.add(t):gSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function TG(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function vSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=TG(e.className,t):e.setAttribute("class",TG(e.className&&e.className.baseVal||"",t))}var OR={exports:{}},Mi={};/**
* @license React
* react-dom.production.js
*
@@ -71,7 +71,7 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var OG;function ySe(){if(OG)return Ai;OG=1;var e=GS();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(l,c,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:f==null?null:""+f,children:l,containerInfo:c,implementation:u}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return Ai.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ai.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return i(l,c,null,u)},Ai.flushSync=function(l){var c=a.T,u=r.p;try{if(a.T=null,r.p=2,l)return l()}finally{a.T=c,r.p=u,r.d.f()}},Ai.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,r.d.C(l,c))},Ai.prefetchDNS=function(l){typeof l=="string"&&r.d.D(l)},Ai.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,f=s(u,c.crossOrigin),h=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?r.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:h,fetchPriority:m}):u==="script"&&r.d.X(l,{crossOrigin:f,integrity:h,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},Ai.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=s(c.as,c.crossOrigin);r.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&r.d.M(l)},Ai.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,f=s(u,c.crossOrigin);r.d.L(l,u,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},Ai.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=s(c.as,c.crossOrigin);r.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else r.d.m(l)},Ai.requestFormReset=function(l){r.d.r(l)},Ai.unstable_batchedUpdates=function(l,c){return l(c)},Ai.useFormState=function(l,c,u){return a.H.useFormState(l,c,u)},Ai.useFormStatus=function(){return a.H.useHostTransitionStatus()},Ai.version="19.1.0",Ai}var IG;function Qte(){if(IG)return TR.exports;IG=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),TR.exports=ySe(),TR.exports}var ew=Qte();const D0=Gn(ew),PG={disabled:!1},WE=J.createContext(null);var Xte=function(t){return t.scrollTop},k0="unmounted",Op="exited",Ip="entering",sg="entered",mN="exiting",as=function(e){Wj(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=Op,i.appearStatus=Ip):l=sg:r.unmountOnExit||r.mountOnEnter?l=k0:l=Op,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===k0?{status:Op}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Ip&&a!==sg&&(i=Ip):(a===Ip||a===sg)&&(i=mN)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Ip){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:D0.findDOMNode(this);a&&Xte(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Op&&this.setState({status:k0})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[D0.findDOMNode(this),s],c=l[0],u=l[1],f=this.getTimeouts(),h=s?f.appear:f.enter;if(!o&&!a||PG.disabled){this.safeSetState({status:sg},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ip},function(){i.props.onEntering(c,u),i.onTransitionEnd(h,function(){i.safeSetState({status:sg},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:D0.findDOMNode(this);if(!i||PG.disabled){this.safeSetState({status:Op},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:mN},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Op},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:D0.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===k0)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=$e(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return J.createElement(WE.Provider,{value:null},typeof a=="function"?a(o,s):J.cloneElement(J.Children.only(a),s))},t}(J.Component);as.contextType=WE;as.propTypes={};function zm(){}as.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zm,onEntering:zm,onEntered:zm,onExit:zm,onExiting:zm,onExited:zm};as.UNMOUNTED=k0;as.EXITED=Op;as.ENTERING=Ip;as.ENTERED=sg;as.EXITING=mN;var vSe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return mSe(t,r)})},OR=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return gSe(t,r)})},Kj=function(e){Wj(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1];r.removeClasses(u,"exit"),r.addClass(u,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1],h=f?"appear":"enter";r.addClass(u,h,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1],h=f?"appear":"enter";r.removeClasses(u,h),r.addClass(u,h,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,c=typeof l=="string",u=c&&l?l+"-":"",f=c?""+u+s:l[s],h=c?f+"-active":l[s+"Active"],m=c?f+"-done":l[s+"Done"];return{baseClassName:f,activeClassName:h,doneClassName:m}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;i==="appear"&&a==="done"&&c&&(s+=" "+c),a==="active"&&o&&Xte(o),s&&(this.appliedClasses[i][a]=s,vSe(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,l=a.active,c=a.done;this.appliedClasses[i]={},s&&OR(o,s),l&&OR(o,l),c&&OR(o,c)},n.render=function(){var o=this.props;o.classNames;var i=$e(o,["classNames"]);return J.createElement(as,z({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(J.Component);Kj.defaultProps={classNames:""};Kj.propTypes={};function bSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yj(e,t){var n=function(i){return t&&x.isValidElement(i)?t(i):i},r=Object.create(null);return e&&x.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function xSe(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var c=r[l][a];s[r[l][a]]=n(c)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function $p(e,t,n){return n[t]!=null?n[t]:e.props[t]}function SSe(e,t){return Yj(e.children,function(n){return x.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:$p(n,"appear",e),enter:$p(n,"enter",e),exit:$p(n,"exit",e)})})}function wSe(e,t,n){var r=Yj(e.children),o=xSe(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(x.isValidElement(a)){var s=i in t,l=i in r,c=t[i],u=x.isValidElement(c)&&!c.props.in;l&&(!s||u)?o[i]=x.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:$p(a,"exit",e),enter:$p(a,"enter",e)}):!l&&s&&!u?o[i]=x.cloneElement(a,{in:!1}):l&&s&&x.isValidElement(c)&&(o[i]=x.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:$p(a,"exit",e),enter:$p(a,"enter",e)}))}}),o}var CSe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},ESe={component:"div",childFactory:function(t){return t}},tw=function(e){Wj(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(bSe(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?SSe(o,s):wSe(o,a,s),firstRender:!1}},n.handleExited=function(o,i){var a=Yj(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=z({},s.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=$e(o,["component","childFactory"]),l=this.state.contextValue,c=CSe(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?J.createElement(WE.Provider,{value:l},c):J.createElement(WE.Provider,{value:l},J.createElement(i,s,c))},t}(J.Component);tw.propTypes={};tw.defaultProps=ESe;const Qj=e=>e.scrollTop;function Ef(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function TSe(e){return qe("MuiCollapse",e)}Ke("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const OSe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Me(r,TSe,n)},ISe=ae("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(dt(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),PSe=ae("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),ASe=ae("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),aa=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:f,onEntered:h,onEntering:m,onExit:g,onExited:y,onExiting:v,orientation:w="vertical",style:C,timeout:E=Dte.standard,TransitionComponent:I=as,...O}=r,P={...r,orientation:w,collapsedSize:s},R=OSe(P),D=Lr(),M=ko(),A=x.useRef(null),_=x.useRef(),N=typeof s=="number"?`${s}px`:s,B=w==="horizontal",H=B?"width":"height",j=x.useRef(null),L=en(n,j),V=ce=>ye=>{if(ce){const Se=j.current;ye===void 0?ce(Se):ce(Se,ye)}},W=()=>A.current?A.current[B?"clientWidth":"clientHeight"]:0,K=V((ce,ye)=>{A.current&&B&&(A.current.style.position="absolute"),ce.style[H]=N,f&&f(ce,ye)}),G=V((ce,ye)=>{const Se=W();A.current&&B&&(A.current.style.position="");const{duration:ne,easing:le}=Ef({style:C,timeout:E,easing:c},{mode:"enter"});if(E==="auto"){const de=D.transitions.getAutoHeightDuration(Se);ce.style.transitionDuration=`${de}ms`,_.current=de}else ce.style.transitionDuration=typeof ne=="string"?ne:`${ne}ms`;ce.style[H]=`${Se}px`,ce.style.transitionTimingFunction=le,m&&m(ce,ye)}),q=V((ce,ye)=>{ce.style[H]="auto",h&&h(ce,ye)}),Y=V(ce=>{ce.style[H]=`${W()}px`,g&&g(ce)}),Z=V(y),ie=V(ce=>{const ye=W(),{duration:Se,easing:ne}=Ef({style:C,timeout:E,easing:c},{mode:"exit"});if(E==="auto"){const le=D.transitions.getAutoHeightDuration(ye);ce.style.transitionDuration=`${le}ms`,_.current=le}else ce.style.transitionDuration=typeof Se=="string"?Se:`${Se}ms`;ce.style[H]=N,ce.style.transitionTimingFunction=ne,v&&v(ce)}),se=ce=>{E==="auto"&&M.start(_.current||0,ce),o&&o(j.current,ce)};return k.jsx(I,{in:u,onEnter:K,onEntered:q,onEntering:G,onExit:Y,onExited:Z,onExiting:ie,addEndListener:se,nodeRef:j,timeout:E==="auto"?null:E,...O,children:(ce,{ownerState:ye,...Se})=>k.jsx(ISe,{as:l,className:fe(R.root,a,{entered:R.entered,exited:!u&&N==="0px"&&R.hidden}[ce]),style:{[B?"minWidth":"minHeight"]:N,...C},ref:L,ownerState:{...P,state:ce},...Se,children:k.jsx(PSe,{ownerState:{...P,state:ce},className:R.wrapper,ref:A,children:k.jsx(ASe,{ownerState:{...P,state:ce},className:R.wrapperInner,children:i})})})})});aa&&(aa.muiSupportAuto=!0);function MSe(e){return qe("MuiPaper",e)}Ke("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const RSe=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Me(i,MSe,o)},DSe=ae("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(dt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),go=x.forwardRef(function(t,n){var m;const r=pt({props:t,name:"MuiPaper"}),o=Lr(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,f={...r,component:a,elevation:s,square:l,variant:c},h=RSe(f);return k.jsx(DSe,{as:a,ownerState:f,className:fe(h.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(m=o.vars.overlays)==null?void 0:m[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Nt("#fff",Z$(s))}, ${Nt("#fff",Z$(s))})`}},...u.style}})}),Jte=x.createContext({});function wt(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:f={[e]:void 0},...h}=i,m=u[e]||r,g=Dc(f[e],o),{props:{component:y,...v},internalRef:w}=Cte({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g}),C=en(w,g==null?void 0:g.ref,t.ref),E=e==="root"?y||c:y,I=wte(m,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...v,...E&&!s&&{as:E},...E&&s&&{component:E},ref:C},o);return[m,I]}function kSe(e){return qe("MuiAccordion",e)}const v1=Ke("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),_Se=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return Me({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},kSe,t)},$Se=ae(go,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${v1.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(dt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${v1.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${v1.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),dt(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${v1.expanded}`]:{margin:"16px 0"}}}]}))),NSe=ae("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),Xj=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:f=!1,slots:h={},slotProps:m={},TransitionComponent:g,TransitionProps:y,...v}=r,[w,C]=ia({controlled:c,default:a,name:"Accordion",state:"expanded"}),E=x.useCallback(W=>{C(!w),u&&u(W,!w)},[w,u,C]),[I,...O]=x.Children.toArray(o),P=x.useMemo(()=>({expanded:w,disabled:s,disableGutters:l,toggle:E}),[w,s,l,E]),R={...r,square:f,disabled:s,disableGutters:l,expanded:w},D=_Se(R),M={transition:g,...h},A={transition:y,...m},_={slots:M,slotProps:A},[N,B]=wt("root",{elementType:$Se,externalForwardedProps:{..._,...v},className:fe(D.root,i),shouldForwardComponentProp:!0,ownerState:R,ref:n,additionalProps:{square:f}}),[H,j]=wt("heading",{elementType:NSe,externalForwardedProps:_,className:D.heading,ownerState:R}),[L,V]=wt("transition",{elementType:aa,externalForwardedProps:_,ownerState:R});return k.jsxs(N,{...B,children:[k.jsx(H,{...j,children:k.jsx(Jte.Provider,{value:P,children:I})}),k.jsx(L,{in:w,timeout:"auto",...V,children:k.jsx("div",{"aria-labelledby":I.props.id,id:I.props["aria-controls"],role:"region",className:D.region,children:O})})]})});function LSe(e){return qe("MuiAccordionDetails",e)}Ke("MuiAccordionDetails",["root"]);const FSe=e=>{const{classes:t}=e;return Me({root:["root"]},LSe,t)},jSe=ae("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({padding:e.spacing(1,2,2)}))),Jj=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=FSe(a);return k.jsx(jSe,{className:fe(s.root,o),ref:n,ownerState:a,...i})});class KE{constructor(){Ce(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new KE}static use(){const t=Xl(KE.create).current,[n,r]=x.useState(!1);return t.shouldMount=n,t.setShouldMount=r,x.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=zSe(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function BSe(){return KE.use()}function zSe(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function VSe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,f]=x.useState(!1),h=fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=fe(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&f(!0),x.useEffect(()=>{if(!s&&l!=null){const y=setTimeout(l,c);return()=>{clearTimeout(y)}}},[l,s,c]),k.jsx("span",{className:h,style:m,children:k.jsx("span",{className:g})})}const Ls=Ke("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),gN=550,HSe=80,USe=il`
+ */var OG;function bSe(){if(OG)return Mi;OG=1;var e=GS();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(l,c,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:f==null?null:""+f,children:l,containerInfo:c,implementation:u}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return Mi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Mi.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return i(l,c,null,u)},Mi.flushSync=function(l){var c=a.T,u=r.p;try{if(a.T=null,r.p=2,l)return l()}finally{a.T=c,r.p=u,r.d.f()}},Mi.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,r.d.C(l,c))},Mi.prefetchDNS=function(l){typeof l=="string"&&r.d.D(l)},Mi.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,f=s(u,c.crossOrigin),p=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?r.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:p,fetchPriority:m}):u==="script"&&r.d.X(l,{crossOrigin:f,integrity:p,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},Mi.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=s(c.as,c.crossOrigin);r.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&r.d.M(l)},Mi.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,f=s(u,c.crossOrigin);r.d.L(l,u,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},Mi.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=s(c.as,c.crossOrigin);r.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else r.d.m(l)},Mi.requestFormReset=function(l){r.d.r(l)},Mi.unstable_batchedUpdates=function(l,c){return l(c)},Mi.useFormState=function(l,c,u){return a.H.useFormState(l,c,u)},Mi.useFormStatus=function(){return a.H.useHostTransitionStatus()},Mi.version="19.1.0",Mi}var IG;function Xte(){if(IG)return OR.exports;IG=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),OR.exports=bSe(),OR.exports}var ew=Xte();const D0=Gn(ew),PG={disabled:!1},KE=J.createContext(null);var Jte=function(t){return t.scrollTop},k0="unmounted",Pp="exited",Ap="entering",lg="entered",gN="exiting",as=function(e){Kj(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=Pp,i.appearStatus=Ap):l=lg:r.unmountOnExit||r.mountOnEnter?l=k0:l=Pp,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===k0?{status:Pp}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Ap&&a!==lg&&(i=Ap):(a===Ap||a===lg)&&(i=gN)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Ap){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:D0.findDOMNode(this);a&&Jte(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pp&&this.setState({status:k0})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[D0.findDOMNode(this),s],c=l[0],u=l[1],f=this.getTimeouts(),p=s?f.appear:f.enter;if(!o&&!a||PG.disabled){this.safeSetState({status:lg},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ap},function(){i.props.onEntering(c,u),i.onTransitionEnd(p,function(){i.safeSetState({status:lg},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:D0.findDOMNode(this);if(!i||PG.disabled){this.safeSetState({status:Pp},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:gN},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Pp},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:D0.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===k0)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=$e(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return J.createElement(KE.Provider,{value:null},typeof a=="function"?a(o,s):J.cloneElement(J.Children.only(a),s))},t}(J.Component);as.contextType=KE;as.propTypes={};function Vm(){}as.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vm,onEntering:Vm,onEntered:Vm,onExit:Vm,onExiting:Vm,onExited:Vm};as.UNMOUNTED=k0;as.EXITED=Pp;as.ENTERING=Ap;as.ENTERED=lg;as.EXITING=gN;var xSe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return ySe(t,r)})},IR=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return vSe(t,r)})},Yj=function(e){Kj(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1];r.removeClasses(u,"exit"),r.addClass(u,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1],p=f?"appear":"enter";r.addClass(u,p,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var c=r.resolveArguments(s,l),u=c[0],f=c[1],p=f?"appear":"enter";r.removeClasses(u,p),r.addClass(u,p,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,c=typeof l=="string",u=c&&l?l+"-":"",f=c?""+u+s:l[s],p=c?f+"-active":l[s+"Active"],m=c?f+"-done":l[s+"Done"];return{baseClassName:f,activeClassName:p,doneClassName:m}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;i==="appear"&&a==="done"&&c&&(s+=" "+c),a==="active"&&o&&Jte(o),s&&(this.appliedClasses[i][a]=s,xSe(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,l=a.active,c=a.done;this.appliedClasses[i]={},s&&IR(o,s),l&&IR(o,l),c&&IR(o,c)},n.render=function(){var o=this.props;o.classNames;var i=$e(o,["classNames"]);return J.createElement(as,z({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(J.Component);Yj.defaultProps={classNames:""};Yj.propTypes={};function SSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qj(e,t){var n=function(i){return t&&x.isValidElement(i)?t(i):i},r=Object.create(null);return e&&x.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function wSe(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var c=r[l][a];s[r[l][a]]=n(c)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function Lp(e,t,n){return n[t]!=null?n[t]:e.props[t]}function CSe(e,t){return Qj(e.children,function(n){return x.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Lp(n,"appear",e),enter:Lp(n,"enter",e),exit:Lp(n,"exit",e)})})}function ESe(e,t,n){var r=Qj(e.children),o=wSe(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(x.isValidElement(a)){var s=i in t,l=i in r,c=t[i],u=x.isValidElement(c)&&!c.props.in;l&&(!s||u)?o[i]=x.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Lp(a,"exit",e),enter:Lp(a,"enter",e)}):!l&&s&&!u?o[i]=x.cloneElement(a,{in:!1}):l&&s&&x.isValidElement(c)&&(o[i]=x.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:Lp(a,"exit",e),enter:Lp(a,"enter",e)}))}}),o}var TSe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},OSe={component:"div",childFactory:function(t){return t}},tw=function(e){Kj(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(SSe(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?CSe(o,s):ESe(o,a,s),firstRender:!1}},n.handleExited=function(o,i){var a=Qj(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=z({},s.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=$e(o,["component","childFactory"]),l=this.state.contextValue,c=TSe(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?J.createElement(KE.Provider,{value:l},c):J.createElement(KE.Provider,{value:l},J.createElement(i,s,c))},t}(J.Component);tw.propTypes={};tw.defaultProps=OSe;const Xj=e=>e.scrollTop;function Of(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function ISe(e){return qe("MuiCollapse",e)}Ke("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const PSe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Me(r,ISe,n)},ASe=ae("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(dt(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),MSe=ae("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),RSe=ae("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),aa=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:f,onEntered:p,onEntering:m,onExit:g,onExited:y,onExiting:v,orientation:w="vertical",style:C,timeout:E=kte.standard,TransitionComponent:I=as,...O}=r,P={...r,orientation:w,collapsedSize:s},R=PSe(P),D=Lr(),M=_o(),A=x.useRef(null),_=x.useRef(),N=typeof s=="number"?`${s}px`:s,B=w==="horizontal",H=B?"width":"height",j=x.useRef(null),L=en(n,j),V=ce=>ye=>{if(ce){const Se=j.current;ye===void 0?ce(Se):ce(Se,ye)}},W=()=>A.current?A.current[B?"clientWidth":"clientHeight"]:0,K=V((ce,ye)=>{A.current&&B&&(A.current.style.position="absolute"),ce.style[H]=N,f&&f(ce,ye)}),G=V((ce,ye)=>{const Se=W();A.current&&B&&(A.current.style.position="");const{duration:ne,easing:le}=Of({style:C,timeout:E,easing:c},{mode:"enter"});if(E==="auto"){const de=D.transitions.getAutoHeightDuration(Se);ce.style.transitionDuration=`${de}ms`,_.current=de}else ce.style.transitionDuration=typeof ne=="string"?ne:`${ne}ms`;ce.style[H]=`${Se}px`,ce.style.transitionTimingFunction=le,m&&m(ce,ye)}),q=V((ce,ye)=>{ce.style[H]="auto",p&&p(ce,ye)}),Y=V(ce=>{ce.style[H]=`${W()}px`,g&&g(ce)}),Z=V(y),ie=V(ce=>{const ye=W(),{duration:Se,easing:ne}=Of({style:C,timeout:E,easing:c},{mode:"exit"});if(E==="auto"){const le=D.transitions.getAutoHeightDuration(ye);ce.style.transitionDuration=`${le}ms`,_.current=le}else ce.style.transitionDuration=typeof Se=="string"?Se:`${Se}ms`;ce.style[H]=N,ce.style.transitionTimingFunction=ne,v&&v(ce)}),se=ce=>{E==="auto"&&M.start(_.current||0,ce),o&&o(j.current,ce)};return k.jsx(I,{in:u,onEnter:K,onEntered:q,onEntering:G,onExit:Y,onExited:Z,onExiting:ie,addEndListener:se,nodeRef:j,timeout:E==="auto"?null:E,...O,children:(ce,{ownerState:ye,...Se})=>k.jsx(ASe,{as:l,className:fe(R.root,a,{entered:R.entered,exited:!u&&N==="0px"&&R.hidden}[ce]),style:{[B?"minWidth":"minHeight"]:N,...C},ref:L,ownerState:{...P,state:ce},...Se,children:k.jsx(MSe,{ownerState:{...P,state:ce},className:R.wrapper,ref:A,children:k.jsx(RSe,{ownerState:{...P,state:ce},className:R.wrapperInner,children:i})})})})});aa&&(aa.muiSupportAuto=!0);function DSe(e){return qe("MuiPaper",e)}Ke("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const kSe=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Me(i,DSe,o)},_Se=ae("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(dt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),go=x.forwardRef(function(t,n){var m;const r=pt({props:t,name:"MuiPaper"}),o=Lr(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,f={...r,component:a,elevation:s,square:l,variant:c},p=kSe(f);return k.jsx(_Se,{as:a,ownerState:f,className:fe(p.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(m=o.vars.overlays)==null?void 0:m[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Nt("#fff",eN(s))}, ${Nt("#fff",eN(s))})`}},...u.style}})}),Zte=x.createContext({});function wt(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:f={[e]:void 0},...p}=i,m=u[e]||r,g=kc(f[e],o),{props:{component:y,...v},internalRef:w}=Ete({className:n,...l,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:g}),C=en(w,g==null?void 0:g.ref,t.ref),E=e==="root"?y||c:y,I=Cte(m,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...v,...E&&!s&&{as:E},...E&&s&&{component:E},ref:C},o);return[m,I]}function $Se(e){return qe("MuiAccordion",e)}const b1=Ke("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),NSe=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return Me({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},$Se,t)},LSe=ae(go,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${b1.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(dt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${b1.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${b1.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),dt(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${b1.expanded}`]:{margin:"16px 0"}}}]}))),FSe=ae("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),Jj=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:f=!1,slots:p={},slotProps:m={},TransitionComponent:g,TransitionProps:y,...v}=r,[w,C]=ia({controlled:c,default:a,name:"Accordion",state:"expanded"}),E=x.useCallback(W=>{C(!w),u&&u(W,!w)},[w,u,C]),[I,...O]=x.Children.toArray(o),P=x.useMemo(()=>({expanded:w,disabled:s,disableGutters:l,toggle:E}),[w,s,l,E]),R={...r,square:f,disabled:s,disableGutters:l,expanded:w},D=NSe(R),M={transition:g,...p},A={transition:y,...m},_={slots:M,slotProps:A},[N,B]=wt("root",{elementType:LSe,externalForwardedProps:{..._,...v},className:fe(D.root,i),shouldForwardComponentProp:!0,ownerState:R,ref:n,additionalProps:{square:f}}),[H,j]=wt("heading",{elementType:FSe,externalForwardedProps:_,className:D.heading,ownerState:R}),[L,V]=wt("transition",{elementType:aa,externalForwardedProps:_,ownerState:R});return k.jsxs(N,{...B,children:[k.jsx(H,{...j,children:k.jsx(Zte.Provider,{value:P,children:I})}),k.jsx(L,{in:w,timeout:"auto",...V,children:k.jsx("div",{"aria-labelledby":I.props.id,id:I.props["aria-controls"],role:"region",className:D.region,children:O})})]})});function jSe(e){return qe("MuiAccordionDetails",e)}Ke("MuiAccordionDetails",["root"]);const BSe=e=>{const{classes:t}=e;return Me({root:["root"]},jSe,t)},zSe=ae("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({padding:e.spacing(1,2,2)}))),Zj=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=BSe(a);return k.jsx(zSe,{className:fe(s.root,o),ref:n,ownerState:a,...i})});class YE{constructor(){Ce(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new YE}static use(){const t=Jl(YE.create).current,[n,r]=x.useState(!1);return t.shouldMount=n,t.setShouldMount=r,x.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=HSe(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function VSe(){return YE.use()}function HSe(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function USe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,f]=x.useState(!1),p=fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=fe(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&f(!0),x.useEffect(()=>{if(!s&&l!=null){const y=setTimeout(l,c);return()=>{clearTimeout(y)}}},[l,s,c]),k.jsx("span",{className:p,style:m,children:k.jsx("span",{className:g})})}const Ls=Ke("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),yN=550,GSe=80,qSe=sl`
0% {
transform: scale(0);
opacity: 0.1;
@@ -81,7 +81,7 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
transform: scale(1);
opacity: 0.3;
}
-`,GSe=il`
+`,WSe=sl`
0% {
opacity: 1;
}
@@ -89,7 +89,7 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
100% {
opacity: 0;
}
-`,qSe=il`
+`,KSe=sl`
0% {
transform: scale(1);
}
@@ -101,15 +101,15 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
100% {
transform: scale(1);
}
-`,WSe=ae("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),KSe=ae(VSe,{name:"MuiTouchRipple",slot:"Ripple"})`
+`,YSe=ae("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),QSe=ae(USe,{name:"MuiTouchRipple",slot:"Ripple"})`
opacity: 0;
position: absolute;
&.${Ls.rippleVisible} {
opacity: 0.3;
transform: scale(1);
- animation-name: ${USe};
- animation-duration: ${gN}ms;
+ animation-name: ${qSe};
+ animation-duration: ${yN}ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
}
@@ -128,8 +128,8 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
& .${Ls.childLeaving} {
opacity: 0;
- animation-name: ${GSe};
- animation-duration: ${gN}ms;
+ animation-name: ${WSe};
+ animation-duration: ${yN}ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
}
@@ -138,13 +138,13 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
/* @noflip */
left: 0px;
top: 0;
- animation-name: ${qSe};
+ animation-name: ${KSe};
animation-duration: 2500ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
animation-iteration-count: infinite;
animation-delay: 200ms;
}
-`,YSe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=x.useState([]),u=x.useRef(0),f=x.useRef(null);x.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=x.useRef(!1),m=ko(),g=x.useRef(null),y=x.useRef(null),v=x.useCallback(I=>{const{pulsate:O,rippleX:P,rippleY:R,rippleSize:D,cb:M}=I;c(A=>[...A,k.jsx(KSe,{classes:{ripple:fe(i.ripple,Ls.ripple),rippleVisible:fe(i.rippleVisible,Ls.rippleVisible),ripplePulsate:fe(i.ripplePulsate,Ls.ripplePulsate),child:fe(i.child,Ls.child),childLeaving:fe(i.childLeaving,Ls.childLeaving),childPulsate:fe(i.childPulsate,Ls.childPulsate)},timeout:gN,pulsate:O,rippleX:P,rippleY:R,rippleSize:D},u.current)]),u.current+=1,f.current=M},[i]),w=x.useCallback((I={},O={},P=()=>{})=>{const{pulsate:R=!1,center:D=o||O.pulsate,fakeElement:M=!1}=O;if((I==null?void 0:I.type)==="mousedown"&&h.current){h.current=!1;return}(I==null?void 0:I.type)==="touchstart"&&(h.current=!0);const A=M?null:y.current,_=A?A.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,B,H;if(D||I===void 0||I.clientX===0&&I.clientY===0||!I.clientX&&!I.touches)N=Math.round(_.width/2),B=Math.round(_.height/2);else{const{clientX:j,clientY:L}=I.touches&&I.touches.length>0?I.touches[0]:I;N=Math.round(j-_.left),B=Math.round(L-_.top)}if(D)H=Math.sqrt((2*_.width**2+_.height**2)/3),H%2===0&&(H+=1);else{const j=Math.max(Math.abs((A?A.clientWidth:0)-N),N)*2+2,L=Math.max(Math.abs((A?A.clientHeight:0)-B),B)*2+2;H=Math.sqrt(j**2+L**2)}I!=null&&I.touches?g.current===null&&(g.current=()=>{v({pulsate:R,rippleX:N,rippleY:B,rippleSize:H,cb:P})},m.start(HSe,()=>{g.current&&(g.current(),g.current=null)})):v({pulsate:R,rippleX:N,rippleY:B,rippleSize:H,cb:P})},[o,v,m]),C=x.useCallback(()=>{w({},{pulsate:!0})},[w]),E=x.useCallback((I,O)=>{if(m.clear(),(I==null?void 0:I.type)==="touchend"&&g.current){g.current(),g.current=null,m.start(0,()=>{E(I,O)});return}g.current=null,c(P=>P.length>0?P.slice(1):P),f.current=O},[m]);return x.useImperativeHandle(n,()=>({pulsate:C,start:w,stop:E}),[C,w,E]),k.jsx(WSe,{className:fe(Ls.root,i.root,a),ref:y,...s,children:k.jsx(tw,{component:null,exit:!0,children:l})})});function QSe(e){return qe("MuiButtonBase",e)}const XSe=Ke("MuiButtonBase",["root","disabled","focusVisible"]),JSe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Me({root:["root",t&&"disabled",n&&"focusVisible"]},QSe,o);return n&&r&&(a.root+=` ${r}`),a},ZSe=ae("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${XSe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),la=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,focusVisibleClassName:m,LinkComponent:g="a",onBlur:y,onClick:v,onContextMenu:w,onDragLeave:C,onFocus:E,onFocusVisible:I,onKeyDown:O,onKeyUp:P,onMouseDown:R,onMouseLeave:D,onMouseUp:M,onTouchEnd:A,onTouchMove:_,onTouchStart:N,tabIndex:B=0,TouchRippleProps:H,touchRippleRef:j,type:L,...V}=r,W=x.useRef(null),K=BSe(),G=en(K.ref,j),[q,Y]=x.useState(!1);c&&q&&Y(!1),x.useImperativeHandle(o,()=>({focusVisible:()=>{Y(!0),W.current.focus()}}),[]);const Z=K.shouldMount&&!u&&!c;x.useEffect(()=>{q&&h&&!u&&K.pulsate()},[u,h,q,K]);const ie=gu(K,"start",R,f),se=gu(K,"stop",w,f),ce=gu(K,"stop",C,f),ye=gu(K,"stop",M,f),Se=gu(K,"stop",te=>{q&&te.preventDefault(),D&&D(te)},f),ne=gu(K,"start",N,f),le=gu(K,"stop",A,f),de=gu(K,"stop",_,f),oe=gu(K,"stop",te=>{zE(te.target)||Y(!1),y&&y(te)},!1),ue=Je(te=>{W.current||(W.current=te.currentTarget),zE(te.target)&&(Y(!0),I&&I(te)),E&&E(te)}),pe=()=>{const te=W.current;return l&&l!=="button"&&!(te.tagName==="A"&&te.href)},Ee=Je(te=>{h&&!te.repeat&&q&&te.key===" "&&K.stop(te,()=>{K.start(te)}),te.target===te.currentTarget&&pe()&&te.key===" "&&te.preventDefault(),O&&O(te),te.target===te.currentTarget&&pe()&&te.key==="Enter"&&!c&&(te.preventDefault(),v&&v(te))}),xe=Je(te=>{h&&te.key===" "&&q&&!te.defaultPrevented&&K.stop(te,()=>{K.pulsate(te)}),P&&P(te),v&&te.target===te.currentTarget&&pe()&&te.key===" "&&!te.defaultPrevented&&v(te)});let Re=l;Re==="button"&&(V.href||V.to)&&(Re=g);const he={};Re==="button"?(he.type=L===void 0?"button":L,he.disabled=c):(!V.href&&!V.to&&(he.role="button"),c&&(he["aria-disabled"]=c));const Pe=en(n,W),ve={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:B,focusVisible:q},Ie=JSe(ve);return k.jsxs(ZSe,{as:Re,className:fe(Ie.root,s),ownerState:ve,onBlur:oe,onClick:v,onContextMenu:se,onFocus:ue,onKeyDown:Ee,onKeyUp:xe,onMouseDown:ie,onMouseLeave:Se,onMouseUp:ye,onDragLeave:ce,onTouchEnd:le,onTouchMove:de,onTouchStart:ne,ref:Pe,tabIndex:c?-1:B,type:L,...he,...V,children:[a,Z?k.jsx(YSe,{ref:G,center:i,...H}):null]})});function gu(e,t,n,r=!1){return Je(o=>(n&&n(o),r||e[t](o),!0))}function ewe(e){return qe("MuiAccordionSummary",e)}const pg=Ke("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),twe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return Me({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},ewe,t)},nwe=ae(la,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${pg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${pg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${pg.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${pg.expanded}`]:{minHeight:64}}}]}})),rwe=ae("span",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(dt(({theme:e})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${pg.expanded}`]:{margin:"20px 0"}}}]}))),owe=ae("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(dt(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${pg.expanded}`]:{transform:"rotate(180deg)"}}))),Zj=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,slots:c,slotProps:u,...f}=r,{disabled:h=!1,disableGutters:m,expanded:g,toggle:y}=x.useContext(Jte),v=A=>{y&&y(A),l&&l(A)},w={...r,expanded:g,disabled:h,disableGutters:m},C=twe(w),E={slots:c,slotProps:u},[I,O]=wt("root",{ref:n,shouldForwardComponentProp:!0,className:fe(C.root,i),elementType:nwe,externalForwardedProps:{...E,...f},ownerState:w,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:h,"aria-expanded":g,focusVisibleClassName:fe(C.focusVisible,s)},getSlotProps:A=>({...A,onClick:_=>{var N;(N=A.onClick)==null||N.call(A,_),v(_)}})}),[P,R]=wt("content",{className:C.content,elementType:rwe,externalForwardedProps:E,ownerState:w}),[D,M]=wt("expandIconWrapper",{className:C.expandIconWrapper,elementType:owe,externalForwardedProps:E,ownerState:w});return k.jsxs(I,{...O,children:[k.jsx(P,{...R,children:o}),a&&k.jsx(D,{...M,children:a})]})});function iwe(e){return typeof e.main=="string"}function awe(e,t=[]){if(!iwe(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function er(e=[]){return([,t])=>t&&awe(t,e)}function swe(e){return qe("MuiAlert",e)}const AG=Ke("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function lwe(e){return qe("MuiCircularProgress",e)}Ke("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const _d=44,yN=il`
+`,XSe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=x.useState([]),u=x.useRef(0),f=x.useRef(null);x.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const p=x.useRef(!1),m=_o(),g=x.useRef(null),y=x.useRef(null),v=x.useCallback(I=>{const{pulsate:O,rippleX:P,rippleY:R,rippleSize:D,cb:M}=I;c(A=>[...A,k.jsx(QSe,{classes:{ripple:fe(i.ripple,Ls.ripple),rippleVisible:fe(i.rippleVisible,Ls.rippleVisible),ripplePulsate:fe(i.ripplePulsate,Ls.ripplePulsate),child:fe(i.child,Ls.child),childLeaving:fe(i.childLeaving,Ls.childLeaving),childPulsate:fe(i.childPulsate,Ls.childPulsate)},timeout:yN,pulsate:O,rippleX:P,rippleY:R,rippleSize:D},u.current)]),u.current+=1,f.current=M},[i]),w=x.useCallback((I={},O={},P=()=>{})=>{const{pulsate:R=!1,center:D=o||O.pulsate,fakeElement:M=!1}=O;if((I==null?void 0:I.type)==="mousedown"&&p.current){p.current=!1;return}(I==null?void 0:I.type)==="touchstart"&&(p.current=!0);const A=M?null:y.current,_=A?A.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,B,H;if(D||I===void 0||I.clientX===0&&I.clientY===0||!I.clientX&&!I.touches)N=Math.round(_.width/2),B=Math.round(_.height/2);else{const{clientX:j,clientY:L}=I.touches&&I.touches.length>0?I.touches[0]:I;N=Math.round(j-_.left),B=Math.round(L-_.top)}if(D)H=Math.sqrt((2*_.width**2+_.height**2)/3),H%2===0&&(H+=1);else{const j=Math.max(Math.abs((A?A.clientWidth:0)-N),N)*2+2,L=Math.max(Math.abs((A?A.clientHeight:0)-B),B)*2+2;H=Math.sqrt(j**2+L**2)}I!=null&&I.touches?g.current===null&&(g.current=()=>{v({pulsate:R,rippleX:N,rippleY:B,rippleSize:H,cb:P})},m.start(GSe,()=>{g.current&&(g.current(),g.current=null)})):v({pulsate:R,rippleX:N,rippleY:B,rippleSize:H,cb:P})},[o,v,m]),C=x.useCallback(()=>{w({},{pulsate:!0})},[w]),E=x.useCallback((I,O)=>{if(m.clear(),(I==null?void 0:I.type)==="touchend"&&g.current){g.current(),g.current=null,m.start(0,()=>{E(I,O)});return}g.current=null,c(P=>P.length>0?P.slice(1):P),f.current=O},[m]);return x.useImperativeHandle(n,()=>({pulsate:C,start:w,stop:E}),[C,w,E]),k.jsx(YSe,{className:fe(Ls.root,i.root,a),ref:y,...s,children:k.jsx(tw,{component:null,exit:!0,children:l})})});function JSe(e){return qe("MuiButtonBase",e)}const ZSe=Ke("MuiButtonBase",["root","disabled","focusVisible"]),ewe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Me({root:["root",t&&"disabled",n&&"focusVisible"]},JSe,o);return n&&r&&(a.root+=` ${r}`),a},twe=ae("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ZSe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),la=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:m,LinkComponent:g="a",onBlur:y,onClick:v,onContextMenu:w,onDragLeave:C,onFocus:E,onFocusVisible:I,onKeyDown:O,onKeyUp:P,onMouseDown:R,onMouseLeave:D,onMouseUp:M,onTouchEnd:A,onTouchMove:_,onTouchStart:N,tabIndex:B=0,TouchRippleProps:H,touchRippleRef:j,type:L,...V}=r,W=x.useRef(null),K=VSe(),G=en(K.ref,j),[q,Y]=x.useState(!1);c&&q&&Y(!1),x.useImperativeHandle(o,()=>({focusVisible:()=>{Y(!0),W.current.focus()}}),[]);const Z=K.shouldMount&&!u&&!c;x.useEffect(()=>{q&&p&&!u&&K.pulsate()},[u,p,q,K]);const ie=yu(K,"start",R,f),se=yu(K,"stop",w,f),ce=yu(K,"stop",C,f),ye=yu(K,"stop",M,f),Se=yu(K,"stop",te=>{q&&te.preventDefault(),D&&D(te)},f),ne=yu(K,"start",N,f),le=yu(K,"stop",A,f),de=yu(K,"stop",_,f),oe=yu(K,"stop",te=>{VE(te.target)||Y(!1),y&&y(te)},!1),ue=Je(te=>{W.current||(W.current=te.currentTarget),VE(te.target)&&(Y(!0),I&&I(te)),E&&E(te)}),pe=()=>{const te=W.current;return l&&l!=="button"&&!(te.tagName==="A"&&te.href)},Ee=Je(te=>{p&&!te.repeat&&q&&te.key===" "&&K.stop(te,()=>{K.start(te)}),te.target===te.currentTarget&&pe()&&te.key===" "&&te.preventDefault(),O&&O(te),te.target===te.currentTarget&&pe()&&te.key==="Enter"&&!c&&(te.preventDefault(),v&&v(te))}),xe=Je(te=>{p&&te.key===" "&&q&&!te.defaultPrevented&&K.stop(te,()=>{K.pulsate(te)}),P&&P(te),v&&te.target===te.currentTarget&&pe()&&te.key===" "&&!te.defaultPrevented&&v(te)});let Re=l;Re==="button"&&(V.href||V.to)&&(Re=g);const he={};Re==="button"?(he.type=L===void 0?"button":L,he.disabled=c):(!V.href&&!V.to&&(he.role="button"),c&&(he["aria-disabled"]=c));const Pe=en(n,W),ve={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:p,tabIndex:B,focusVisible:q},Ie=ewe(ve);return k.jsxs(twe,{as:Re,className:fe(Ie.root,s),ownerState:ve,onBlur:oe,onClick:v,onContextMenu:se,onFocus:ue,onKeyDown:Ee,onKeyUp:xe,onMouseDown:ie,onMouseLeave:Se,onMouseUp:ye,onDragLeave:ce,onTouchEnd:le,onTouchMove:de,onTouchStart:ne,ref:Pe,tabIndex:c?-1:B,type:L,...he,...V,children:[a,Z?k.jsx(XSe,{ref:G,center:i,...H}):null]})});function yu(e,t,n,r=!1){return Je(o=>(n&&n(o),r||e[t](o),!0))}function nwe(e){return qe("MuiAccordionSummary",e)}const hg=Ke("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),rwe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return Me({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},nwe,t)},owe=ae(la,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${hg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${hg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${hg.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${hg.expanded}`]:{minHeight:64}}}]}})),iwe=ae("span",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(dt(({theme:e})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${hg.expanded}`]:{margin:"20px 0"}}}]}))),awe=ae("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(dt(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${hg.expanded}`]:{transform:"rotate(180deg)"}}))),eB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,slots:c,slotProps:u,...f}=r,{disabled:p=!1,disableGutters:m,expanded:g,toggle:y}=x.useContext(Zte),v=A=>{y&&y(A),l&&l(A)},w={...r,expanded:g,disabled:p,disableGutters:m},C=rwe(w),E={slots:c,slotProps:u},[I,O]=wt("root",{ref:n,shouldForwardComponentProp:!0,className:fe(C.root,i),elementType:owe,externalForwardedProps:{...E,...f},ownerState:w,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:p,"aria-expanded":g,focusVisibleClassName:fe(C.focusVisible,s)},getSlotProps:A=>({...A,onClick:_=>{var N;(N=A.onClick)==null||N.call(A,_),v(_)}})}),[P,R]=wt("content",{className:C.content,elementType:iwe,externalForwardedProps:E,ownerState:w}),[D,M]=wt("expandIconWrapper",{className:C.expandIconWrapper,elementType:awe,externalForwardedProps:E,ownerState:w});return k.jsxs(I,{...O,children:[k.jsx(P,{...R,children:o}),a&&k.jsx(D,{...M,children:a})]})});function swe(e){return typeof e.main=="string"}function lwe(e,t=[]){if(!swe(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function er(e=[]){return([,t])=>t&&lwe(t,e)}function cwe(e){return qe("MuiAlert",e)}const AG=Ke("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function uwe(e){return qe("MuiCircularProgress",e)}Ke("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Nd=44,vN=sl`
0% {
transform: rotate(0deg);
}
@@ -152,7 +152,7 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
100% {
transform: rotate(360deg);
}
-`,vN=il`
+`,bN=sl`
0% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: 0;
@@ -167,12 +167,12 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
stroke-dasharray: 1px, 200px;
stroke-dashoffset: -126px;
}
-`,cwe=typeof yN!="string"?kf`
- animation: ${yN} 1.4s linear infinite;
- `:null,uwe=typeof vN!="string"?kf`
- animation: ${vN} 1.4s ease-in-out infinite;
- `:null,dwe=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Oe(r)}`],svg:["svg"],circle:["circle",`circle${Oe(n)}`,o&&"circleDisableShrink"]};return Me(i,lwe,t)},fwe=ae("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:cwe||{animation:`${yN} 1.4s linear infinite`}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),pwe=ae("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),hwe=ae("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Oe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(dt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:uwe||{animation:`${vN} 1.4s ease-in-out infinite`}}]}))),nw=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:f="indeterminate",...h}=r,m={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:f},g=dwe(m),y={},v={},w={};if(f==="determinate"){const C=2*Math.PI*((_d-c)/2);y.strokeDasharray=C.toFixed(3),w["aria-valuenow"]=Math.round(u),y.strokeDashoffset=`${((100-u)/100*C).toFixed(3)}px`,v.transform="rotate(-90deg)"}return k.jsx(fwe,{className:fe(g.root,o),style:{width:s,height:s,...v,...l},ownerState:m,ref:n,role:"progressbar",...w,...h,children:k.jsx(pwe,{className:g.svg,ownerState:m,viewBox:`${_d/2} ${_d/2} ${_d} ${_d}`,children:k.jsx(hwe,{className:g.circle,style:y,ownerState:m,cx:_d,cy:_d,r:(_d-c)/2,fill:"none",strokeWidth:c})})})});function mwe(e){return qe("MuiIconButton",e)}const bN=Ke("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),gwe=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${Oe(r)}`,o&&`edge${Oe(o)}`,`size${Oe(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Me(s,mwe,t)},ywe=ae(la,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Oe(n.color)}`],n.edge&&t[`edge${Oe(n.edge)}`],t[`size${Oe(n.size)}`]]}})(dt(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),dt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${bN.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${bN.loading}`]:{color:"transparent"}}))),vwe=ae("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),pn=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",id:f,loading:h=null,loadingIndicator:m,...g}=r,y=bn(f),v=m??k.jsx(nw,{"aria-labelledby":y,color:"inherit",size:16}),w={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,loading:h,loadingIndicator:v,size:u},C=gwe(w);return k.jsxs(ywe,{id:h?y:f,className:fe(C.root,a),centerRipple:!0,focusRipple:!c,disabled:l||h,ref:n,...g,ownerState:w,children:[typeof h=="boolean"&&k.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:k.jsx(vwe,{className:C.loadingIndicator,ownerState:w,children:h&&v})}),i]})}),bwe=Ot(k.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),xwe=Ot(k.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),Swe=Ot(k.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),wwe=Ot(k.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),Zte=Ot(k.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),Cwe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Oe(n||r)}`,`${t}${Oe(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Me(i,swe,o)},Ewe=ae(go,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Oe(n.color||n.severity)}`]]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?zu:Vu,n=e.palette.mode==="light"?Vu:zu;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(er(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${AG.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(er(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${AG.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(er(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),Twe=ae("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Owe=ae("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Iwe=ae("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),MG={success:k.jsx(bwe,{fontSize:"inherit"}),warning:k.jsx(xwe,{fontSize:"inherit"}),error:k.jsx(Swe,{fontSize:"inherit"}),info:k.jsx(wwe,{fontSize:"inherit"})},Ci=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:f,iconMapping:h=MG,onClose:m,role:g="alert",severity:y="success",slotProps:v={},slots:w={},variant:C="standard",...E}=r,I={...r,color:l,severity:y,variant:C,colorSeverity:l||y},O=Cwe(I),P={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...w},slotProps:{...u,...v}},[R,D]=wt("root",{ref:n,shouldForwardComponentProp:!0,className:fe(O.root,a),elementType:Ewe,externalForwardedProps:{...P,...E},ownerState:I,additionalProps:{role:g,elevation:0}}),[M,A]=wt("icon",{className:O.icon,elementType:Twe,externalForwardedProps:P,ownerState:I}),[_,N]=wt("message",{className:O.message,elementType:Owe,externalForwardedProps:P,ownerState:I}),[B,H]=wt("action",{className:O.action,elementType:Iwe,externalForwardedProps:P,ownerState:I}),[j,L]=wt("closeButton",{elementType:pn,externalForwardedProps:P,ownerState:I}),[V,W]=wt("closeIcon",{elementType:Zte,externalForwardedProps:P,ownerState:I});return k.jsxs(R,{...D,children:[f!==!1?k.jsx(M,{...A,children:f||h[y]||MG[y]}):null,k.jsx(_,{...N,children:i}),o!=null?k.jsx(B,{...H,children:o}):null,o==null&&m?k.jsx(B,{...H,children:k.jsx(j,{size:"small","aria-label":s,title:s,color:"inherit",onClick:m,...L,children:k.jsx(V,{fontSize:"small",...W})})}):null]})});function Pwe(e){return qe("MuiTypography",e)}const YE=Ke("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),Awe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Mwe=cSe(),Rwe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Oe(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Me(s,Pwe,a)},Dwe=ae("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Oe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(dt(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(er()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Oe(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),RG={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},at=x.forwardRef(function(t,n){const{color:r,...o}=pt({props:t,name:"MuiTypography"}),i=!Awe[r],a=Mwe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:f=!1,paragraph:h=!1,variant:m="body1",variantMapping:g=RG,...y}=a,v={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:f,paragraph:h,variant:m,variantMapping:g},w=c||(h?"p":g[m]||RG[m])||"span",C=Rwe(v);return k.jsx(Dwe,{as:w,ref:n,className:fe(C.root,l),...y,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...y.style}})});function kwe(e){return qe("MuiAlertTitle",e)}Ke("MuiAlertTitle",["root"]);const _we=e=>{const{classes:t}=e;return Me({root:["root"]},kwe,t)},$we=ae(at,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),fh=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=_we(a);return k.jsx($we,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:fe(s.root,o),...i})});function Nwe(e){return qe("MuiAppBar",e)}Ke("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Lwe=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Oe(t)}`,`position${Oe(n)}`]};return Me(o,Nwe,r)},DG=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Fwe=ae(go,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Oe(n.position)}`],t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(er(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?DG(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?DG(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),jwe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=Lwe(c);return k.jsx(Fwe,{square:!0,component:"header",ownerState:c,elevation:4,className:fe(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function kG(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Bwe(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=kG(u));const f=u?s.filter(h=>{let m=(i||c)(h);return n&&(m=m.toLowerCase()),t&&(m=kG(m)),o==="start"?m.startsWith(u):m.includes(u)}):s;return typeof r=="number"?f.slice(0,r):f}}const zwe=Bwe(),Vwe=5,Hwe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},Uwe=[];function _G(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function Gwe(e){const{unstable_isActiveElementInListbox:t=Hwe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?Uwe:null,disableClearable:f=!1,disableCloseOnSelect:h=!1,disabled:m,disabledItemsFocusable:g=!1,disableListWrap:y=!1,filterOptions:v=zwe,filterSelectedOptions:w=!1,freeSolo:C=!1,getOptionDisabled:E,getOptionKey:I,getOptionLabel:O=He=>He.label??He,groupBy:P,handleHomeEndKeys:R=!e.freeSolo,id:D,includeInputInList:M=!1,inputValue:A,isOptionEqualToValue:_=(He,Ye)=>He===Ye,multiple:N=!1,onChange:B,onClose:H,onHighlightChange:j,onInputChange:L,onOpen:V,open:W,openOnFocus:K=!1,options:G,readOnly:q=!1,renderValue:Y,selectOnFocus:Z=!e.freeSolo,value:ie}=e,se=bn(D);let ce=O;ce=He=>{const Ye=O(He);return typeof Ye!="string"?String(Ye):Ye};const ye=x.useRef(!1),Se=x.useRef(!0),ne=x.useRef(null),le=x.useRef(null),[de,oe]=x.useState(null),[ue,pe]=x.useState(-1),Ee=o?0:-1,xe=x.useRef(Ee),Re=x.useRef(_G(u??ie,N,ce)).current,[he,Pe]=ia({controlled:ie,default:u,name:c}),[ve,Ie]=ia({controlled:A,default:Re,name:c,state:"inputValue"}),[te,Te]=x.useState(!1),De=x.useCallback((He,Ye,$t)=>{if(!(N?he.length<Ye.length:Ye!==null)&&!s)return;const Gt=_G(Ye,N,ce,Y);ve!==Gt&&(Ie(Gt),L&&L(He,Gt,$t))},[ce,ve,N,L,Ie,s,he,Y]),[Ve,We]=ia({controlled:W,default:!1,name:c,state:"open"}),[rt,ut]=x.useState(!0),Be=!N&&he!=null&&ve===ce(he),et=Ve&&!q,Le=et?v(G.filter(He=>!(w&&(N?he:[he]).some(Ye=>Ye!==null&&_(He,Ye)))),{inputValue:Be&&rt?"":ve,getOptionLabel:ce}):[],It=Lj({filteredOptions:Le,value:he,inputValue:ve});x.useEffect(()=>{const He=he!==It.value;te&&!He||C&&!He||De(null,he,"reset")},[he,De,te,It.value,C]);const Lt=Ve&&Le.length>0&&!q,nt=Je(He=>{if(He===-1)ne.current.focus();else{const Ye=Y?"data-item-index":"data-tag-index";de.querySelector(`[${Ye}="${He}"]`).focus()}});x.useEffect(()=>{N&&ue>he.length-1&&(pe(-1),nt(-1))},[he,N,ue,nt]);function lt(He,Ye){if(!le.current||He<0||He>=Le.length)return-1;let $t=He;for(;;){const hn=le.current.querySelector(`[data-option-index="${$t}"]`),Gt=g?!1:!hn||hn.disabled||hn.getAttribute("aria-disabled")==="true";if(hn&&hn.hasAttribute("tabindex")&&!Gt)return $t;if(Ye==="next"?$t=($t+1)%Le.length:$t=($t-1+Le.length)%Le.length,$t===He)return-1}}const vt=Je(({event:He,index:Ye,reason:$t})=>{if(xe.current=Ye,Ye===-1?ne.current.removeAttribute("aria-activedescendant"):ne.current.setAttribute("aria-activedescendant",`${se}-option-${Ye}`),j&&["mouse","keyboard","touch"].includes($t)&&j(He,Ye===-1?null:Le[Ye],$t),!le.current)return;const hn=le.current.querySelector(`[role="option"].${n}-focused`);hn&&(hn.classList.remove(`${n}-focused`),hn.classList.remove(`${n}-focusVisible`));let Gt=le.current;if(le.current.getAttribute("role")!=="listbox"&&(Gt=le.current.parentElement.querySelector('[role="listbox"]')),!Gt)return;if(Ye===-1){Gt.scrollTop=0;return}const Xr=le.current.querySelector(`[data-option-index="${Ye}"]`);if(Xr&&(Xr.classList.add(`${n}-focused`),$t==="keyboard"&&Xr.classList.add(`${n}-focusVisible`),Gt.scrollHeight>Gt.clientHeight&&$t!=="mouse"&&$t!=="touch")){const Jr=Xr,Vi=Gt.clientHeight+Gt.scrollTop,Jv=Jr.offsetTop+Jr.offsetHeight;Jv>Vi?Gt.scrollTop=Jv-Gt.clientHeight:Jr.offsetTop-Jr.offsetHeight*(P?1.3:0)<Gt.scrollTop&&(Gt.scrollTop=Jr.offsetTop-Jr.offsetHeight*(P?1.3:0))}}),bt=Je(({event:He,diff:Ye,direction:$t="next",reason:hn})=>{if(!et)return;const Xr=lt((()=>{const Jr=Le.length-1;if(Ye==="reset")return Ee;if(Ye==="start")return 0;if(Ye==="end")return Jr;const Vi=xe.current+Ye;return Vi<0?Vi===-1&&M?-1:y&&xe.current!==-1||Math.abs(Ye)>1?0:Jr:Vi>Jr?Vi===Jr+1&&M?-1:y||Math.abs(Ye)>1?Jr:0:Vi})(),$t);if(vt({index:Xr,reason:hn,event:He}),r&&Ye!=="reset")if(Xr===-1)ne.current.value=ve;else{const Jr=ce(Le[Xr]);ne.current.value=Jr,Jr.toLowerCase().indexOf(ve.toLowerCase())===0&&ve.length>0&&ne.current.setSelectionRange(ve.length,Jr.length)}}),vn=()=>{const He=(Ye,$t)=>{const hn=Ye?ce(Ye):"",Gt=$t?ce($t):"";return hn===Gt};if(xe.current!==-1&&It.filteredOptions&&It.filteredOptions.length!==Le.length&&It.inputValue===ve&&(N?he.length===It.value.length&&It.value.every((Ye,$t)=>ce(he[$t])===ce(Ye)):He(It.value,he))){const Ye=It.filteredOptions[xe.current];if(Ye)return Le.findIndex($t=>ce($t)===ce(Ye))}return-1},kn=x.useCallback(()=>{if(!et)return;const He=vn();if(He!==-1){xe.current=He;return}const Ye=N?he[0]:he;if(Le.length===0||Ye==null){bt({diff:"reset"});return}if(le.current){if(Ye!=null){const $t=Le[xe.current];if(N&&$t&&he.findIndex(Gt=>_($t,Gt))!==-1)return;const hn=Le.findIndex(Gt=>_(Gt,Ye));hn===-1?bt({diff:"reset"}):vt({index:hn});return}if(xe.current>=Le.length-1){vt({index:Le.length-1});return}vt({index:xe.current})}},[Le.length,N?!1:he,w,bt,vt,et,ve,N]),Rr=Je(He=>{X$(le,He),He&&kn()});x.useEffect(()=>{kn()},[kn]);const nr=He=>{Ve||(We(!0),ut(!0),V&&V(He))},Bn=(He,Ye)=>{Ve&&(We(!1),H&&H(He,Ye))},yo=(He,Ye,$t,hn)=>{if(N){if(he.length===Ye.length&&he.every((Gt,Xr)=>Gt===Ye[Xr]))return}else if(he===Ye)return;B&&B(He,Ye,$t,hn),Pe(Ye)},To=x.useRef(!1),oo=(He,Ye,$t="selectOption",hn="options")=>{let Gt=$t,Xr=Ye;if(N){Xr=Array.isArray(he)?he.slice():[];const Jr=Xr.findIndex(Vi=>_(Ye,Vi));Jr===-1?Xr.push(Ye):hn!=="freeSolo"&&(Xr.splice(Jr,1),Gt="removeOption")}De(He,Xr,Gt),yo(He,Xr,Gt,{option:Ye}),!h&&(!He||!He.ctrlKey&&!He.metaKey)&&Bn(He,Gt),(a===!0||a==="touch"&&To.current||a==="mouse"&&!To.current)&&ne.current.blur()};function Oi(He,Ye){if(He===-1)return-1;let $t=He;for(;;){if(Ye==="next"&&$t===he.length||Ye==="previous"&&$t===-1)return-1;const hn=Y?"data-item-index":"data-tag-index",Gt=de.querySelector(`[${hn}="${$t}"]`);if(!Gt||!Gt.hasAttribute("tabindex")||Gt.disabled||Gt.getAttribute("aria-disabled")==="true")$t+=Ye==="next"?1:-1;else return $t}}const Kt=(He,Ye)=>{if(!N)return;ve===""&&Bn(He,"toggleInput");let $t=ue;ue===-1?ve===""&&Ye==="previous"&&($t=he.length-1):($t+=Ye==="next"?1:-1,$t<0&&($t=0),$t===he.length&&($t=-1)),$t=Oi($t,Ye),pe($t),nt($t)},un=He=>{ye.current=!0,Ie(""),L&&L(He,"","clear"),yo(He,N?[]:null,"clear")},gt=He=>Ye=>{if(He.onKeyDown&&He.onKeyDown(Ye),!Ye.defaultMuiPrevented&&(ue!==-1&&!["ArrowLeft","ArrowRight"].includes(Ye.key)&&(pe(-1),nt(-1)),Ye.which!==229))switch(Ye.key){case"Home":et&&R&&(Ye.preventDefault(),bt({diff:"start",direction:"next",reason:"keyboard",event:Ye}));break;case"End":et&&R&&(Ye.preventDefault(),bt({diff:"end",direction:"previous",reason:"keyboard",event:Ye}));break;case"PageUp":Ye.preventDefault(),bt({diff:-5,direction:"previous",reason:"keyboard",event:Ye}),nr(Ye);break;case"PageDown":Ye.preventDefault(),bt({diff:Vwe,direction:"next",reason:"keyboard",event:Ye}),nr(Ye);break;case"ArrowDown":Ye.preventDefault(),bt({diff:1,direction:"next",reason:"keyboard",event:Ye}),nr(Ye);break;case"ArrowUp":Ye.preventDefault(),bt({diff:-1,direction:"previous",reason:"keyboard",event:Ye}),nr(Ye);break;case"ArrowLeft":!N&&Y?nt(0):Kt(Ye,"previous");break;case"ArrowRight":!N&&Y?nt(-1):Kt(Ye,"next");break;case"Enter":if(xe.current!==-1&&et){const $t=Le[xe.current],hn=E?E($t):!1;if(Ye.preventDefault(),hn)return;oo(Ye,$t,"selectOption"),r&&ne.current.setSelectionRange(ne.current.value.length,ne.current.value.length)}else C&&ve!==""&&Be===!1&&(N&&Ye.preventDefault(),oo(Ye,ve,"createOption","freeSolo"));break;case"Escape":et?(Ye.preventDefault(),Ye.stopPropagation(),Bn(Ye,"escape")):l&&(ve!==""||N&&he.length>0||Y)&&(Ye.preventDefault(),Ye.stopPropagation(),un(Ye));break;case"Backspace":if(N&&!q&&ve===""&&he.length>0){const $t=ue===-1?he.length-1:ue,hn=he.slice();hn.splice($t,1),yo(Ye,hn,"removeOption",{option:he[$t]})}!N&&Y&&!q&&(Pe(null),nt(-1));break;case"Delete":if(N&&!q&&ve===""&&he.length>0&&ue!==-1){const $t=ue,hn=he.slice();hn.splice($t,1),yo(Ye,hn,"removeOption",{option:he[$t]})}!N&&Y&&!q&&(Pe(null),nt(-1));break}},kt=He=>{Te(!0),K&&!ye.current&&nr(He)},Ut=He=>{if(t(le)){ne.current.focus();return}Te(!1),Se.current=!0,ye.current=!1,i&&xe.current!==-1&&et?oo(He,Le[xe.current],"blur"):i&&C&&ve!==""?oo(He,ve,"blur","freeSolo"):s&&De(He,he,"blur"),Bn(He,"blur")},Xt=He=>{const Ye=He.target.value;ve!==Ye&&(Ie(Ye),ut(!1),L&&L(He,Ye,"input")),Ye===""?!f&&!N&&yo(He,null,"clear"):nr(He)},Vn=He=>{const Ye=Number(He.currentTarget.getAttribute("data-option-index"));xe.current!==Ye&&vt({event:He,index:Ye,reason:"mouse"})},Xo=He=>{vt({event:He,index:Number(He.currentTarget.getAttribute("data-option-index")),reason:"touch"}),To.current=!0},Da=He=>{const Ye=Number(He.currentTarget.getAttribute("data-option-index"));oo(He,Le[Ye],"selectOption"),To.current=!1},ps=He=>Ye=>{const $t=he.slice();$t.splice(He,1),yo(Ye,$t,"removeOption",{option:he[He]})},ud=He=>{yo(He,null,"removeOption",{option:he})},Ii=He=>{Ve?Bn(He,"toggleInput"):nr(He)},vo=He=>{He.currentTarget.contains(He.target)&&He.target.getAttribute("id")!==se&&He.preventDefault()},Fr=He=>{He.currentTarget.contains(He.target)&&(ne.current.focus(),Z&&Se.current&&ne.current.selectionEnd-ne.current.selectionStart===0&&ne.current.select(),Se.current=!1)},zi=He=>{!m&&(ve===""||!Ve)&&Ii(He)};let ul=C&&ve.length>0;ul=ul||(N?he.length>0:he!==null);let dl=Le;return P&&(dl=Le.reduce((He,Ye,$t)=>{const hn=P(Ye);return He.length>0&&He[He.length-1].group===hn?He[He.length-1].options.push(Ye):He.push({key:$t,index:$t,group:hn,options:[Ye]}),He},[])),m&&te&&Ut(),{getRootProps:(He={})=>({...He,onKeyDown:gt(He),onMouseDown:vo,onClick:Fr}),getInputLabelProps:()=>({id:`${se}-label`,htmlFor:se}),getInputProps:()=>({id:se,value:ve,onBlur:Ut,onFocus:kt,onChange:Xt,onMouseDown:zi,"aria-activedescendant":et?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Lt?`${se}-listbox`:void 0,"aria-expanded":Lt,autoComplete:"off",ref:ne,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:m}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:un}),getItemProps:({index:He=0}={})=>({...N&&{key:He},...Y?{"data-item-index":He}:{"data-tag-index":He},tabIndex:-1,...!q&&{onDelete:N?ps(He):ud}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ii}),getTagProps:({index:He})=>({key:He,"data-tag-index":He,tabIndex:-1,...!q&&{onDelete:ps(He)}}),getListboxProps:()=>({role:"listbox",id:`${se}-listbox`,"aria-labelledby":`${se}-label`,ref:Rr,onMouseDown:He=>{He.preventDefault()}}),getOptionProps:({index:He,option:Ye})=>{const $t=(N?he:[he]).some(Gt=>Gt!=null&&_(Ye,Gt)),hn=E?E(Ye):!1;return{key:(I==null?void 0:I(Ye))??ce(Ye),tabIndex:-1,role:"option",id:`${se}-option-${He}`,onMouseMove:Vn,onClick:Da,onTouchStart:Xo,"data-option-index":He,"aria-disabled":hn,"aria-selected":$t}},id:se,inputValue:ve,value:he,dirty:ul,expanded:et&&de,popupOpen:et,focused:te||ue!==-1,anchorEl:de,setAnchorEl:oe,focusedItem:ue,focusedTag:ue,groupedOptions:dl}}var Ea="top",el="bottom",tl="right",Ta="left",eB="auto",rw=[Ea,el,tl,Ta],oy="start",Ex="end",qwe="clippingParents",ene="viewport",Kb="popper",Wwe="reference",$G=rw.reduce(function(e,t){return e.concat([t+"-"+oy,t+"-"+Ex])},[]),tne=[].concat(rw,[eB]).reduce(function(e,t){return e.concat([t,t+"-"+oy,t+"-"+Ex])},[]),Kwe="beforeRead",Ywe="read",Qwe="afterRead",Xwe="beforeMain",Jwe="main",Zwe="afterMain",eCe="beforeWrite",tCe="write",nCe="afterWrite",rCe=[Kwe,Ywe,Qwe,Xwe,Jwe,Zwe,eCe,tCe,nCe];function kc(e){return e?(e.nodeName||"").toLowerCase():null}function rs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ph(e){var t=rs(e).Element;return e instanceof t||e instanceof Element}function Ws(e){var t=rs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function tB(e){if(typeof ShadowRoot>"u")return!1;var t=rs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oCe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Ws(i)||!kc(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function iCe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Ws(o)||!kc(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const aCe={name:"applyStyles",enabled:!0,phase:"write",fn:oCe,effect:iCe,requires:["computeStyles"]};function Tc(e){return e.split("-")[0]}var eh=Math.max,QE=Math.min,iy=Math.round;function xN(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function nne(){return!/^((?!chrome|android).)*safari/i.test(xN())}function ay(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Ws(e)&&(o=e.offsetWidth>0&&iy(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&iy(r.height)/e.offsetHeight||1);var a=ph(e)?rs(e):window,s=a.visualViewport,l=!nne()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,f=r.width/o,h=r.height/i;return{width:f,height:h,top:u,right:c+f,bottom:u+h,left:c,x:c,y:u}}function nB(e){var t=ay(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function rne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&tB(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Hu(e){return rs(e).getComputedStyle(e)}function sCe(e){return["table","td","th"].indexOf(kc(e))>=0}function $f(e){return((ph(e)?e.ownerDocument:e.document)||window.document).documentElement}function oI(e){return kc(e)==="html"?e:e.assignedSlot||e.parentNode||(tB(e)?e.host:null)||$f(e)}function NG(e){return!Ws(e)||Hu(e).position==="fixed"?null:e.offsetParent}function lCe(e){var t=/firefox/i.test(xN()),n=/Trident/i.test(xN());if(n&&Ws(e)){var r=Hu(e);if(r.position==="fixed")return null}var o=oI(e);for(tB(o)&&(o=o.host);Ws(o)&&["html","body"].indexOf(kc(o))<0;){var i=Hu(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function ow(e){for(var t=rs(e),n=NG(e);n&&sCe(n)&&Hu(n).position==="static";)n=NG(n);return n&&(kc(n)==="html"||kc(n)==="body"&&Hu(n).position==="static")?t:n||lCe(e)||t}function rB(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function W0(e,t,n){return eh(e,QE(t,n))}function cCe(e,t,n){var r=W0(e,t,n);return r>n?n:r}function one(){return{top:0,right:0,bottom:0,left:0}}function ine(e){return Object.assign({},one(),e)}function ane(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var uCe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,ine(typeof t!="number"?t:ane(t,rw))};function dCe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tc(n.placement),l=rB(s),c=[Ta,tl].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var f=uCe(o.padding,n),h=nB(i),m=l==="y"?Ea:Ta,g=l==="y"?el:tl,y=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],w=ow(i),C=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,E=y/2-v/2,I=f[m],O=C-h[u]-f[g],P=C/2-h[u]/2+E,R=W0(I,P,O),D=l;n.modifiersData[r]=(t={},t[D]=R,t.centerOffset=R-P,t)}}function fCe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||rne(t.elements.popper,o)&&(t.elements.arrow=o))}const pCe={name:"arrow",enabled:!0,phase:"main",fn:dCe,effect:fCe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function sy(e){return e.split("-")[1]}var hCe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mCe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:iy(n*o)/o||0,y:iy(r*o)/o||0}}function LG(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,h=a.x,m=h===void 0?0:h,g=a.y,y=g===void 0?0:g,v=typeof u=="function"?u({x:m,y}):{x:m,y};m=v.x,y=v.y;var w=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),E=Ta,I=Ea,O=window;if(c){var P=ow(n),R="clientHeight",D="clientWidth";if(P===rs(n)&&(P=$f(n),Hu(P).position!=="static"&&s==="absolute"&&(R="scrollHeight",D="scrollWidth")),P=P,o===Ea||(o===Ta||o===tl)&&i===Ex){I=el;var M=f&&P===O&&O.visualViewport?O.visualViewport.height:P[R];y-=M-r.height,y*=l?1:-1}if(o===Ta||(o===Ea||o===el)&&i===Ex){E=tl;var A=f&&P===O&&O.visualViewport?O.visualViewport.width:P[D];m-=A-r.width,m*=l?1:-1}}var _=Object.assign({position:s},c&&hCe),N=u===!0?mCe({x:m,y},rs(n)):{x:m,y};if(m=N.x,y=N.y,l){var B;return Object.assign({},_,(B={},B[I]=C?"0":"",B[E]=w?"0":"",B.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",B))}return Object.assign({},_,(t={},t[I]=C?y+"px":"",t[E]=w?m+"px":"",t.transform="",t))}function gCe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Tc(t.placement),variation:sy(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LG(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LG(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const yCe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gCe,data:{}};var b1={passive:!0};function vCe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=rs(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,b1)}),s&&l.addEventListener("resize",n.update,b1),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,b1)}),s&&l.removeEventListener("resize",n.update,b1)}}const bCe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vCe,data:{}};var xCe={left:"right",right:"left",bottom:"top",top:"bottom"};function pE(e){return e.replace(/left|right|bottom|top/g,function(t){return xCe[t]})}var SCe={start:"end",end:"start"};function FG(e){return e.replace(/start|end/g,function(t){return SCe[t]})}function oB(e){var t=rs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function iB(e){return ay($f(e)).left+oB(e).scrollLeft}function wCe(e,t){var n=rs(e),r=$f(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=nne();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+iB(e),y:l}}function CCe(e){var t,n=$f(e),r=oB(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=eh(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+iB(e),l=-r.scrollTop;return Hu(o||n).direction==="rtl"&&(s+=eh(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function aB(e){var t=Hu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function sne(e){return["html","body","#document"].indexOf(kc(e))>=0?e.ownerDocument.body:Ws(e)&&aB(e)?e:sne(oI(e))}function K0(e,t){var n;t===void 0&&(t=[]);var r=sne(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=rs(r),a=o?[i].concat(i.visualViewport||[],aB(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(K0(oI(a)))}function SN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ECe(e,t){var n=ay(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function jG(e,t,n){return t===ene?SN(wCe(e,n)):ph(t)?ECe(t,n):SN(CCe($f(e)))}function TCe(e){var t=K0(oI(e)),n=["absolute","fixed"].indexOf(Hu(e).position)>=0,r=n&&Ws(e)?ow(e):e;return ph(r)?t.filter(function(o){return ph(o)&&rne(o,r)&&kc(o)!=="body"}):[]}function OCe(e,t,n,r){var o=t==="clippingParents"?TCe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=jG(e,c,r);return l.top=eh(u.top,l.top),l.right=QE(u.right,l.right),l.bottom=QE(u.bottom,l.bottom),l.left=eh(u.left,l.left),l},jG(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function lne(e){var t=e.reference,n=e.element,r=e.placement,o=r?Tc(r):null,i=r?sy(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case Ea:l={x:a,y:t.y-n.height};break;case el:l={x:a,y:t.y+t.height};break;case tl:l={x:t.x+t.width,y:s};break;case Ta:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?rB(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case oy:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Ex:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Tx(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?qwe:s,c=n.rootBoundary,u=c===void 0?ene:c,f=n.elementContext,h=f===void 0?Kb:f,m=n.altBoundary,g=m===void 0?!1:m,y=n.padding,v=y===void 0?0:y,w=ine(typeof v!="number"?v:ane(v,rw)),C=h===Kb?Wwe:Kb,E=e.rects.popper,I=e.elements[g?C:h],O=OCe(ph(I)?I:I.contextElement||$f(e.elements.popper),l,u,a),P=ay(e.elements.reference),R=lne({reference:P,element:E,placement:o}),D=SN(Object.assign({},E,R)),M=h===Kb?D:P,A={top:O.top-M.top+w.top,bottom:M.bottom-O.bottom+w.bottom,left:O.left-M.left+w.left,right:M.right-O.right+w.right},_=e.modifiersData.offset;if(h===Kb&&_){var N=_[o];Object.keys(A).forEach(function(B){var H=[tl,el].indexOf(B)>=0?1:-1,j=[Ea,el].indexOf(B)>=0?"y":"x";A[B]+=N[j]*H})}return A}function ICe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?tne:l,u=sy(r),f=u?s?$G:$G.filter(function(g){return sy(g)===u}):rw,h=f.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=f);var m=h.reduce(function(g,y){return g[y]=Tx(e,{placement:y,boundary:o,rootBoundary:i,padding:a})[Tc(y)],g},{});return Object.keys(m).sort(function(g,y){return m[g]-m[y]})}function PCe(e){if(Tc(e)===eB)return[];var t=pE(e);return[FG(e),t,FG(t)]}function ACe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,m=n.flipVariations,g=m===void 0?!0:m,y=n.allowedAutoPlacements,v=t.options.placement,w=Tc(v),C=w===v,E=l||(C||!g?[pE(v)]:PCe(v)),I=[v].concat(E).reduce(function(ie,se){return ie.concat(Tc(se)===eB?ICe(t,{placement:se,boundary:u,rootBoundary:f,padding:c,flipVariations:g,allowedAutoPlacements:y}):se)},[]),O=t.rects.reference,P=t.rects.popper,R=new Map,D=!0,M=I[0],A=0;A<I.length;A++){var _=I[A],N=Tc(_),B=sy(_)===oy,H=[Ea,el].indexOf(N)>=0,j=H?"width":"height",L=Tx(t,{placement:_,boundary:u,rootBoundary:f,altBoundary:h,padding:c}),V=H?B?tl:Ta:B?el:Ea;O[j]>P[j]&&(V=pE(V));var W=pE(V),K=[];if(i&&K.push(L[N]<=0),s&&K.push(L[V]<=0,L[W]<=0),K.every(function(ie){return ie})){M=_,D=!1;break}R.set(_,K)}if(D)for(var G=g?3:1,q=function(se){var ce=I.find(function(ye){var Se=R.get(ye);if(Se)return Se.slice(0,se).every(function(ne){return ne})});if(ce)return M=ce,"break"},Y=G;Y>0;Y--){var Z=q(Y);if(Z==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const MCe={name:"flip",enabled:!0,phase:"main",fn:ACe,requiresIfExists:["offset"],data:{_skip:!1}};function BG(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function zG(e){return[Ea,tl,el,Ta].some(function(t){return e[t]>=0})}function RCe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Tx(t,{elementContext:"reference"}),s=Tx(t,{altBoundary:!0}),l=BG(a,r),c=BG(s,o,i),u=zG(l),f=zG(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const DCe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:RCe};function kCe(e,t,n){var r=Tc(e),o=[Ta,Ea].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Ta,tl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function _Ce(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=tne.reduce(function(u,f){return u[f]=kCe(f,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const $Ce={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_Ce};function NCe(e){var t=e.state,n=e.name;t.modifiersData[n]=lne({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const LCe={name:"popperOffsets",enabled:!0,phase:"read",fn:NCe,data:{}};function FCe(e){return e==="x"?"y":"x"}function jCe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,m=h===void 0?!0:h,g=n.tetherOffset,y=g===void 0?0:g,v=Tx(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),w=Tc(t.placement),C=sy(t.placement),E=!C,I=rB(w),O=FCe(I),P=t.modifiersData.popperOffsets,R=t.rects.reference,D=t.rects.popper,M=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,A=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(P){if(i){var B,H=I==="y"?Ea:Ta,j=I==="y"?el:tl,L=I==="y"?"height":"width",V=P[I],W=V+v[H],K=V-v[j],G=m?-D[L]/2:0,q=C===oy?R[L]:D[L],Y=C===oy?-D[L]:-R[L],Z=t.elements.arrow,ie=m&&Z?nB(Z):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:one(),ce=se[H],ye=se[j],Se=W0(0,R[L],ie[L]),ne=E?R[L]/2-G-Se-ce-A.mainAxis:q-Se-ce-A.mainAxis,le=E?-R[L]/2+G+Se+ye+A.mainAxis:Y+Se+ye+A.mainAxis,de=t.elements.arrow&&ow(t.elements.arrow),oe=de?I==="y"?de.clientTop||0:de.clientLeft||0:0,ue=(B=_==null?void 0:_[I])!=null?B:0,pe=V+ne-ue-oe,Ee=V+le-ue,xe=W0(m?QE(W,pe):W,V,m?eh(K,Ee):K);P[I]=xe,N[I]=xe-V}if(s){var Re,he=I==="x"?Ea:Ta,Pe=I==="x"?el:tl,ve=P[O],Ie=O==="y"?"height":"width",te=ve+v[he],Te=ve-v[Pe],De=[Ea,Ta].indexOf(w)!==-1,Ve=(Re=_==null?void 0:_[O])!=null?Re:0,We=De?te:ve-R[Ie]-D[Ie]-Ve+A.altAxis,rt=De?ve+R[Ie]+D[Ie]-Ve-A.altAxis:Te,ut=m&&De?cCe(We,ve,rt):W0(m?We:te,ve,m?rt:Te);P[O]=ut,N[O]=ut-ve}t.modifiersData[r]=N}}const BCe={name:"preventOverflow",enabled:!0,phase:"main",fn:jCe,requiresIfExists:["offset"]};function zCe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function VCe(e){return e===rs(e)||!Ws(e)?oB(e):zCe(e)}function HCe(e){var t=e.getBoundingClientRect(),n=iy(t.width)/e.offsetWidth||1,r=iy(t.height)/e.offsetHeight||1;return n!==1||r!==1}function UCe(e,t,n){n===void 0&&(n=!1);var r=Ws(t),o=Ws(t)&&HCe(t),i=$f(t),a=ay(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((kc(t)!=="body"||aB(i))&&(s=VCe(t)),Ws(t)?(l=ay(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=iB(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function GCe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function qCe(e){var t=GCe(e);return rCe.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function WCe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function KCe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var VG={placement:"bottom",modifiers:[],strategy:"absolute"};function HG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function YCe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?VG:o;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},VG,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],h=!1,m={state:u,setOptions:function(w){var C=typeof w=="function"?w(u.options):w;y(),u.options=Object.assign({},i,u.options,C),u.scrollParents={reference:ph(s)?K0(s):s.contextElement?K0(s.contextElement):[],popper:K0(l)};var E=qCe(KCe([].concat(r,u.options.modifiers)));return u.orderedModifiers=E.filter(function(I){return I.enabled}),g(),m.update()},forceUpdate:function(){if(!h){var w=u.elements,C=w.reference,E=w.popper;if(HG(C,E)){u.rects={reference:UCe(C,ow(E),u.options.strategy==="fixed"),popper:nB(E)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(A){return u.modifiersData[A.name]=Object.assign({},A.data)});for(var I=0;I<u.orderedModifiers.length;I++){if(u.reset===!0){u.reset=!1,I=-1;continue}var O=u.orderedModifiers[I],P=O.fn,R=O.options,D=R===void 0?{}:R,M=O.name;typeof P=="function"&&(u=P({state:u,options:D,name:M,instance:m})||u)}}}},update:WCe(function(){return new Promise(function(v){m.forceUpdate(),v(u)})}),destroy:function(){y(),h=!0}};if(!HG(s,l))return m;m.setOptions(c).then(function(v){!h&&c.onFirstUpdate&&c.onFirstUpdate(v)});function g(){u.orderedModifiers.forEach(function(v){var w=v.name,C=v.options,E=C===void 0?{}:C,I=v.effect;if(typeof I=="function"){var O=I({state:u,name:w,instance:m,options:E}),P=function(){};f.push(O||P)}})}function y(){f.forEach(function(v){return v()}),f=[]}return m}}var QCe=[bCe,LCe,yCe,aCe,$Ce,MCe,BCe,pCe,DCe],XCe=YCe({defaultModifiers:QCe});function JCe(e){return typeof e=="function"?e():e}const cne=x.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,s]=x.useState(null),l=en(x.isValidElement(r)?_f(r):null,n);if(In(()=>{i||s(JCe(o)||document.body)},[o,i]),In(()=>{if(a&&!i)return X$(n,a),()=>{X$(n,null)}},[n,a,i]),i){if(x.isValidElement(r)){const c={ref:l};return x.cloneElement(r,c)}return r}return a&&ew.createPortal(r,a)});function ZCe(e){return qe("MuiPopper",e)}Ke("MuiPopper",["root"]);function e1e(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function wN(e){return typeof e=="function"?e():e}function t1e(e){return e.nodeType!==void 0}const n1e=e=>{const{classes:t}=e;return Me({root:["root"]},ZCe,t)},r1e={},o1e=x.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:f,slotProps:h={},slots:m={},TransitionProps:g,ownerState:y,...v}=t,w=x.useRef(null),C=en(w,n),E=x.useRef(null),I=en(E,f),O=x.useRef(I);In(()=>{O.current=I},[I]),x.useImperativeHandle(f,()=>E.current,[]);const P=e1e(c,i),[R,D]=x.useState(P),[M,A]=x.useState(wN(r));x.useEffect(()=>{E.current&&E.current.forceUpdate()}),x.useEffect(()=>{r&&A(wN(r))},[r]),In(()=>{if(!M||!l)return;const j=W=>{D(W.placement)};let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{j(W)}}];s!=null&&(L=L.concat(s)),u&&u.modifiers!=null&&(L=L.concat(u.modifiers));const V=XCe(M,w.current,{placement:P,...u,modifiers:L});return O.current(V),()=>{V.destroy(),O.current(null)}},[M,a,s,l,u,P]);const _={placement:R};g!==null&&(_.TransitionProps=g);const N=n1e(t),B=m.root??"div",H=Dn({elementType:B,externalSlotProps:h.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:C},ownerState:t,className:N.root});return k.jsx(B,{...H,children:typeof o=="function"?o(_):o})}),i1e=x.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:f="bottom",popperOptions:h=r1e,popperRef:m,style:g,transition:y=!1,slotProps:v={},slots:w={},...C}=t,[E,I]=x.useState(!0),O=()=>{I(!1)},P=()=>{I(!0)};if(!l&&!u&&(!y||E))return null;let R;if(i)R=i;else if(r){const A=wN(r);R=A&&t1e(A)?Mr(A).body:Mr(null).body}const D=!u&&l&&(!y||E)?"none":void 0,M=y?{in:u,onEnter:O,onExited:P}:void 0;return k.jsx(cne,{disablePortal:s,container:R,children:k.jsx(o1e,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:y?!E:u,placement:f,popperOptions:h,popperRef:m,slotProps:v,slots:w,...C,style:{position:"fixed",top:0,left:0,display:D,...g},TransitionProps:M,children:o})})}),a1e=ae(i1e,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sv=x.forwardRef(function(t,n){const r=vr(),o=pt({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:y,popperRef:v,transition:w,slots:C,slotProps:E,...I}=o,O=(C==null?void 0:C.root)??(s==null?void 0:s.Root),P={anchorEl:i,container:c,disablePortal:u,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:y,popperRef:v,transition:w,...I};return k.jsx(a1e,{as:a,direction:r?"rtl":"ltr",slots:{root:O},slotProps:E??l,...P,ref:n})});function s1e(e){return qe("MuiListSubheader",e)}Ke("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const l1e=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Oe(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Me(a,s1e,t)},c1e=ae("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Oe(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(dt(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),CN=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,f={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},h=l1e(f);return k.jsx(c1e,{as:a,className:fe(h.root,o),ref:n,ownerState:f,...u})});CN&&(CN.muiSkipListHighlight=!0);const u1e=Ot(k.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function d1e(e){return qe("MuiChip",e)}const jn=Ke("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),f1e=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Oe(r)}`,`color${Oe(o)}`,s&&"clickable",s&&`clickableColor${Oe(o)}`,a&&"deletable",a&&`deletableColor${Oe(o)}`,`${l}${Oe(o)}`],label:["label",`label${Oe(r)}`],avatar:["avatar",`avatar${Oe(r)}`,`avatarColor${Oe(o)}`],icon:["icon",`icon${Oe(r)}`,`iconColor${Oe(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Oe(r)}`,`deleteIconColor${Oe(o)}`,`deleteIcon${Oe(l)}Color${Oe(o)}`]};return Me(c,d1e,t)},p1e=ae("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${jn.avatar}`]:t.avatar},{[`& .${jn.avatar}`]:t[`avatar${Oe(s)}`]},{[`& .${jn.avatar}`]:t[`avatarColor${Oe(r)}`]},{[`& .${jn.icon}`]:t.icon},{[`& .${jn.icon}`]:t[`icon${Oe(s)}`]},{[`& .${jn.icon}`]:t[`iconColor${Oe(o)}`]},{[`& .${jn.deleteIcon}`]:t.deleteIcon},{[`& .${jn.deleteIcon}`]:t[`deleteIcon${Oe(s)}`]},{[`& .${jn.deleteIcon}`]:t[`deleteIconColor${Oe(r)}`]},{[`& .${jn.deleteIcon}`]:t[`deleteIcon${Oe(l)}Color${Oe(r)}`]},t.root,t[`size${Oe(s)}`],t[`color${Oe(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Oe(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Oe(r)}`],t[l],t[`${l}${Oe(r)}`]]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${jn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${jn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${jn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${jn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${jn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${jn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${jn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Nt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Nt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${jn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${jn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(er(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${jn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:Nt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${jn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${jn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${jn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(er(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${jn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${jn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(er(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${jn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${jn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${jn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${jn.avatar}`]:{marginLeft:4},[`& .${jn.avatarSmall}`]:{marginLeft:2},[`& .${jn.icon}`]:{marginLeft:4},[`& .${jn.iconSmall}`]:{marginLeft:2},[`& .${jn.deleteIcon}`]:{marginRight:5},[`& .${jn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(er()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:Nt(e.palette[n].main,.7)}`,[`&.${jn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${jn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${jn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:Nt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),h1e=ae("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Oe(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function UG(e){return e.key==="Backspace"||e.key==="Delete"}const Wl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:f,label:h,onClick:m,onDelete:g,onKeyDown:y,onKeyUp:v,size:w="medium",variant:C="filled",tabIndex:E,skipFocusWhenDisabled:I=!1,...O}=r,P=x.useRef(null),R=en(P,n),D=K=>{K.stopPropagation(),g&&g(K)},M=K=>{K.currentTarget===K.target&&UG(K)&&K.preventDefault(),y&&y(K)},A=K=>{K.currentTarget===K.target&&g&&UG(K)&&g(K),v&&v(K)},_=a!==!1&&m?!0:a,N=_||g?la:l||"div",B={...r,component:N,disabled:u,size:w,color:s,iconColor:x.isValidElement(f)&&f.props.color||s,onDelete:!!g,clickable:_,variant:C},H=f1e(B),j=N===la?{component:l||"div",focusVisibleClassName:H.focusVisible,...g&&{disableRipple:!0}}:{};let L=null;g&&(L=c&&x.isValidElement(c)?x.cloneElement(c,{className:fe(c.props.className,H.deleteIcon),onClick:D}):k.jsx(u1e,{className:fe(H.deleteIcon),onClick:D}));let V=null;o&&x.isValidElement(o)&&(V=x.cloneElement(o,{className:fe(H.avatar,o.props.className)}));let W=null;return f&&x.isValidElement(f)&&(W=x.cloneElement(f,{className:fe(H.icon,f.props.className)})),k.jsxs(p1e,{as:N,className:fe(H.root,i),disabled:_&&u?!0:void 0,onClick:m,onKeyDown:M,onKeyUp:A,ref:R,tabIndex:I&&u?-1:E,ownerState:B,...j,...O,children:[V||W,k.jsx(h1e,{className:fe(H.label),ownerState:B,children:h}),L]})});function x1(e){return parseInt(e,10)||0}const m1e={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function g1e(e){for(const t in e)return!1;return!0}function GG(e){return g1e(e)||e.outerHeightStyle===0&&!e.overflowing}const y1e=x.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=x.useRef(s!=null),u=x.useRef(null),f=en(n,u),h=x.useRef(null),m=x.useRef(null),g=x.useCallback(()=>{const E=u.current,I=m.current;if(!E||!I)return;const P=ns(E).getComputedStyle(E);if(P.width==="0px")return{outerHeightStyle:0,overflowing:!1};I.style.width=P.width,I.value=E.value||t.placeholder||"x",I.value.slice(-1)===`
-`&&(I.value+=" ");const R=P.boxSizing,D=x1(P.paddingBottom)+x1(P.paddingTop),M=x1(P.borderBottomWidth)+x1(P.borderTopWidth),A=I.scrollHeight;I.value="x";const _=I.scrollHeight;let N=A;i&&(N=Math.max(Number(i)*_,N)),o&&(N=Math.min(Number(o)*_,N)),N=Math.max(N,_);const B=N+(R==="border-box"?D+M:0),H=Math.abs(N-A)<=1;return{outerHeightStyle:B,overflowing:H}},[o,i,t.placeholder]),y=Je(()=>{const E=u.current,I=g();if(!E||!I||GG(I))return!1;const O=I.outerHeightStyle;return h.current!=null&&h.current!==O}),v=x.useCallback(()=>{const E=u.current,I=g();if(!E||!I||GG(I))return;const O=I.outerHeightStyle;h.current!==O&&(h.current=O,E.style.height=`${O}px`),E.style.overflow=I.overflowing?"hidden":""},[g]),w=x.useRef(-1);In(()=>{const E=$h(v),I=u==null?void 0:u.current;if(!I)return;const O=ns(I);O.addEventListener("resize",E);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(()=>{y()&&(P.unobserve(I),cancelAnimationFrame(w.current),v(),w.current=requestAnimationFrame(()=>{P.observe(I)}))}),P.observe(I)),()=>{E.clear(),cancelAnimationFrame(w.current),O.removeEventListener("resize",E),P&&P.disconnect()}},[g,v,y]),In(()=>{v()});const C=E=>{c||v(),r&&r(E)};return k.jsxs(x.Fragment,{children:[k.jsx("textarea",{value:s,onChange:C,ref:f,rows:i,style:a,...l}),k.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:{...m1e.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Ox(e){return typeof e=="string"}function Nf({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const iI=x.createContext(void 0);function sl(){return x.useContext(iI)}function qG(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function XE(e,t=!1){return e&&(qG(e.value)&&e.value!==""||t&&qG(e.defaultValue)&&e.defaultValue!=="")}function v1e(e){return e.startAdornment}function b1e(e){return qe("MuiInputBase",e)}const bi=Ke("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var WG;const aI=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Oe(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},sI=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},x1e=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:g}=e,y={root:["root",`color${Oe(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&h!=="medium"&&`size${Oe(h)}`,u&&"multiline",m&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",g==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return Me(y,b1e,t)},lI=ae("div",{name:"MuiInputBase",slot:"Root",overridesResolver:aI})(dt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${bi.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),cI=ae("input",{name:"MuiInputBase",slot:"Input",overridesResolver:sI})(dt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${bi.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${bi.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),KG=lSe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),iw=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:g,error:y,fullWidth:v=!1,id:w,inputComponent:C="input",inputProps:E={},inputRef:I,margin:O,maxRows:P,minRows:R,multiline:D=!1,name:M,onBlur:A,onChange:_,onClick:N,onFocus:B,onKeyDown:H,onKeyUp:j,placeholder:L,readOnly:V,renderSuffix:W,rows:K,size:G,slotProps:q={},slots:Y={},startAdornment:Z,type:ie="text",value:se,...ce}=r,ye=E.value!=null?E.value:se,{current:Se}=x.useRef(ye!=null),ne=x.useRef(),le=x.useCallback(Le=>{},[]),de=en(ne,I,E.ref,le),[oe,ue]=x.useState(!1),pe=sl(),Ee=Nf({props:r,muiFormControl:pe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ee.focused=pe?pe.focused:oe,x.useEffect(()=>{!pe&&h&&oe&&(ue(!1),A&&A())},[pe,h,oe,A]);const xe=pe&&pe.onFilled,Re=pe&&pe.onEmpty,he=x.useCallback(Le=>{XE(Le)?xe&&xe():Re&&Re()},[xe,Re]);In(()=>{Se&&he({value:ye})},[ye,he,Se]);const Pe=Le=>{B&&B(Le),E.onFocus&&E.onFocus(Le),pe&&pe.onFocus?pe.onFocus(Le):ue(!0)},ve=Le=>{A&&A(Le),E.onBlur&&E.onBlur(Le),pe&&pe.onBlur?pe.onBlur(Le):ue(!1)},Ie=(Le,...It)=>{if(!Se){const Lt=Le.target||ne.current;if(Lt==null)throw new Error(Bu(1));he({value:Lt.value})}E.onChange&&E.onChange(Le,...It),_&&_(Le,...It)};x.useEffect(()=>{he(ne.current)},[]);const te=Le=>{ne.current&&Le.currentTarget===Le.target&&ne.current.focus(),N&&N(Le)};let Te=C,De=E;D&&Te==="input"&&(K?De={type:void 0,minRows:K,maxRows:K,...De}:De={type:void 0,maxRows:P,minRows:R,...De},Te=y1e);const Ve=Le=>{he(Le.animationName==="mui-auto-fill-cancel"?ne.current:{value:"x"})};x.useEffect(()=>{pe&&pe.setAdornedStart(!!Z)},[pe,Z]);const We={...r,color:Ee.color||"primary",disabled:Ee.disabled,endAdornment:g,error:Ee.error,focused:Ee.focused,formControl:pe,fullWidth:v,hiddenLabel:Ee.hiddenLabel,multiline:D,size:Ee.size,startAdornment:Z,type:ie},rt=x1e(We),ut=Y.root||c.Root||lI,Be=q.root||u.root||{},et=Y.input||c.Input||cI;return De={...De,...q.input??u.input},k.jsxs(x.Fragment,{children:[!m&&typeof KG=="function"&&(WG||(WG=k.jsx(KG,{}))),k.jsxs(ut,{...Be,ref:n,onClick:te,...ce,...!Ox(ut)&&{ownerState:{...We,...Be.ownerState}},className:fe(rt.root,Be.className,s,V&&"MuiInputBase-readOnly"),children:[Z,k.jsx(iI.Provider,{value:null,children:k.jsx(et,{"aria-invalid":Ee.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:f,disabled:Ee.disabled,id:w,onAnimationStart:Ve,name:M,placeholder:L,readOnly:V,required:Ee.required,rows:K,value:ye,onKeyDown:H,onKeyUp:j,type:ie,...De,...!Ox(et)&&{as:Te,ownerState:{...We,...De.ownerState}},ref:de,className:fe(rt.input,De.className,V&&"MuiInputBase-readOnly"),onBlur:ve,onChange:Ie,onFocus:Pe})}),g,W?W({...Ee,startAdornment:Z}):null]})]})});function S1e(e){return qe("MuiInput",e)}const Kd={...bi,...Ke("MuiInput",["root","underline","input"])};function w1e(e){return qe("MuiOutlinedInput",e)}const Rs={...bi,...Ke("MuiOutlinedInput",["root","notchedOutline","input"])};function C1e(e){return qe("MuiFilledInput",e)}const Ua={...bi,...Ke("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},une=Ot(k.jsx("path",{d:"M7 10l5 5 5-5z"}));function E1e(e){return qe("MuiAutocomplete",e)}const Mn=Ke("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var YG,QG;const T1e=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,f={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Oe(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Me(f,E1e,t)},O1e=ae("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Mn.tag}`]:t.tag},{[`& .${Mn.tag}`]:t[`tagSize${Oe(s)}`]},{[`& .${Mn.inputRoot}`]:t.inputRoot},{[`& .${Mn.input}`]:t.input},{[`& .${Mn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Mn.focused} .${Mn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Mn.clearIndicator}`]:{visibility:"visible"}},[`& .${Mn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Mn.inputRoot}`]:{[`.${Mn.hasPopupIcon}&, .${Mn.hasClearIcon}&`]:{paddingRight:30},[`.${Mn.hasPopupIcon}.${Mn.hasClearIcon}&`]:{paddingRight:56},[`& .${Mn.input}`]:{width:0,minWidth:30}},[`& .${Kd.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Kd.root}.${bi.sizeSmall}`]:{[`& .${Kd.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Rs.root}`]:{padding:9,[`.${Mn.hasPopupIcon}&, .${Mn.hasClearIcon}&`]:{paddingRight:39},[`.${Mn.hasPopupIcon}.${Mn.hasClearIcon}&`]:{paddingRight:65},[`& .${Mn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Mn.endAdornment}`]:{right:9}},[`& .${Rs.root}.${bi.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Mn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Ua.root}`]:{paddingTop:19,paddingLeft:8,[`.${Mn.hasPopupIcon}&, .${Mn.hasClearIcon}&`]:{paddingRight:39},[`.${Mn.hasPopupIcon}.${Mn.hasClearIcon}&`]:{paddingRight:65},[`& .${Ua.input}`]:{padding:"7px 4px"},[`& .${Mn.endAdornment}`]:{right:9}},[`& .${Ua.root}.${bi.sizeSmall}`]:{paddingBottom:1,[`& .${Ua.input}`]:{padding:"2.5px 4px"}},[`& .${bi.hiddenLabel}`]:{paddingTop:8},[`& .${Ua.root}.${bi.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Mn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Ua.root}.${bi.hiddenLabel}.${bi.sizeSmall}`]:{[`& .${Mn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Mn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Mn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Mn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Mn.inputRoot}`]:{flexWrap:"wrap"}}}]}),I1e=ae("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),P1e=ae(pn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),A1e=ae(pn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),M1e=ae(sv,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Mn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),R1e=ae(go,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(dt(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),D1e=ae("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),k1e=ae("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),_1e=ae("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(dt(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Mn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Mn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),$1e=ae(CN,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(dt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),N1e=ae("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Mn.option}`]:{paddingLeft:24}}),_c=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=YG||(YG=k.jsx(Zte,{fontSize:"small"})),clearOnBlur:f=!r.freeSolo,clearOnEscape:h=!1,clearText:m="Clear",closeText:g="Close",componentsProps:y,defaultValue:v=r.multiple?[]:null,disableClearable:w=!1,disableCloseOnSelect:C=!1,disabled:E=!1,disabledItemsFocusable:I=!1,disableListWrap:O=!1,disablePortal:P=!1,filterOptions:R,filterSelectedOptions:D=!1,forcePopupIcon:M="auto",freeSolo:A=!1,fullWidth:_=!1,getLimitTagsText:N=Hn=>`+${Hn}`,getOptionDisabled:B,getOptionKey:H,getOptionLabel:j,isOptionEqualToValue:L,groupBy:V,handleHomeEndKeys:W=!r.freeSolo,id:K,includeInputInList:G=!1,inputValue:q,limitTags:Y=-1,ListboxComponent:Z,ListboxProps:ie,loading:se=!1,loadingText:ce="Loading…",multiple:ye=!1,noOptionsText:Se="No options",onChange:ne,onClose:le,onHighlightChange:de,onInputChange:oe,onOpen:ue,open:pe,openOnFocus:Ee=!1,openText:xe="Open",options:Re,PaperComponent:he,PopperComponent:Pe,popupIcon:ve=QG||(QG=k.jsx(une,{})),readOnly:Ie=!1,renderGroup:te,renderInput:Te,renderOption:De,renderTags:Ve,renderValue:We,selectOnFocus:rt=!r.freeSolo,size:ut="medium",slots:Be={},slotProps:et={},value:Le,...It}=r,{getRootProps:Lt,getInputProps:nt,getInputLabelProps:lt,getPopupIndicatorProps:vt,getClearProps:bt,getItemProps:vn,getListboxProps:kn,getOptionProps:Rr,value:nr,dirty:Bn,expanded:yo,id:To,popupOpen:oo,focused:Oi,focusedItem:Kt,anchorEl:un,setAnchorEl:gt,inputValue:kt,groupedOptions:Ut}=Gwe({...r,componentName:"Autocomplete"}),Xt=!w&&!E&&Bn&&!Ie,Vn=(!A||M===!0)&&M!==!1,{onMouseDown:Xo}=nt(),{ref:Da,...ps}=kn(),Ii=j||(Hn=>Hn.label??Hn),vo={...r,disablePortal:P,expanded:yo,focused:Oi,fullWidth:_,getOptionLabel:Ii,hasClearIcon:Xt,hasPopupIcon:Vn,inputFocused:Kt===-1,popupOpen:oo,size:ut},Fr=T1e(vo),zi={slots:{paper:he,popper:Pe,...Be},slotProps:{chip:l,listbox:ie,...y,...et}},[ul,dl]=wt("listbox",{elementType:_1e,externalForwardedProps:zi,ownerState:vo,className:Fr.listbox,additionalProps:ps,ref:Da}),[He,Ye]=wt("paper",{elementType:go,externalForwardedProps:zi,ownerState:vo,className:Fr.paper}),[$t,hn]=wt("popper",{elementType:sv,externalForwardedProps:zi,ownerState:vo,className:Fr.popper,additionalProps:{disablePortal:P,style:{width:un?un.clientWidth:null},role:"presentation",anchorEl:un,open:oo}});let Gt;const Xr=Hn=>({className:Fr.tag,disabled:E,...vn(Hn)});if(Ve&&ye&&nr.length>0?Gt=Ve(nr,Xr,vo):We&&nr?Gt=We(nr,Xr,vo):ye&&nr.length>0&&(Gt=nr.map((Hn,Hi)=>{const{key:hs,...eu}=Xr({index:Hi});return k.jsx(Wl,{label:Ii(Hn),size:ut,...eu,...zi.slotProps.chip},hs)})),Y>-1&&Array.isArray(Gt)){const Hn=Gt.length-Y;!Oi&&Hn>0&&(Gt=Gt.splice(0,Y),Gt.push(k.jsx("span",{className:Fr.tag,children:N(Hn)},Gt.length)))}const Vi=te||(Hn=>k.jsxs("li",{children:[k.jsx($1e,{className:Fr.groupLabel,ownerState:vo,component:"div",children:Hn.group}),k.jsx(N1e,{className:Fr.groupUl,ownerState:vo,children:Hn.children})]},Hn.key)),nm=De||((Hn,Hi)=>{const{key:hs,...eu}=Hn;return k.jsx("li",{...eu,children:Ii(Hi)},hs)}),Xf=(Hn,Hi)=>{const hs=Rr({option:Hn,index:Hi});return nm({...hs,className:Fr.option},Hn,{selected:hs["aria-selected"],index:Hi,inputValue:kt},vo)},ca=zi.slotProps.clearIndicator,dd=zi.slotProps.popupIndicator;return k.jsxs(x.Fragment,{children:[k.jsx(O1e,{ref:n,className:fe(Fr.root,c),ownerState:vo,...Lt(It),children:Te({id:To,disabled:E,fullWidth:!0,size:ut==="small"?"small":void 0,InputLabelProps:lt(),InputProps:{ref:gt,className:Fr.inputRoot,startAdornment:Gt,onMouseDown:Hn=>{Hn.target===Hn.currentTarget&&Xo(Hn)},...(Xt||Vn)&&{endAdornment:k.jsxs(I1e,{className:Fr.endAdornment,ownerState:vo,children:[Xt?k.jsx(P1e,{...bt(),"aria-label":m,title:m,ownerState:vo,...ca,className:fe(Fr.clearIndicator,ca==null?void 0:ca.className),children:u}):null,Vn?k.jsx(A1e,{...vt(),disabled:E,"aria-label":oo?g:xe,title:oo?g:xe,ownerState:vo,...dd,className:fe(Fr.popupIndicator,dd==null?void 0:dd.className),children:ve}):null]})}},inputProps:{className:Fr.input,disabled:E,readOnly:Ie,...nt()}})}),un?k.jsx(M1e,{as:$t,...hn,children:k.jsxs(R1e,{as:He,...Ye,children:[se&&Ut.length===0?k.jsx(D1e,{className:Fr.loading,ownerState:vo,children:ce}):null,Ut.length===0&&!A&&!se?k.jsx(k1e,{className:Fr.noOptions,ownerState:vo,role:"presentation",onMouseDown:Hn=>{Hn.preventDefault()},children:Se}):null,Ut.length>0?k.jsx(ul,{as:Z,...dl,children:Ut.map((Hn,Hi)=>V?Vi({key:Hn.key,group:Hn.group,children:Hn.options.map((hs,eu)=>Xf(hs,Hn.index+eu))}):Xf(Hn,Hi))}):null]})}):null]})}),L1e=Ot(k.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function F1e(e){return qe("MuiAvatar",e)}const j1e=Ke("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),B1e=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Me({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},F1e,t)},z1e=ae("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(dt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),V1e=ae("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),H1e=ae(L1e,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function U1e({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=x.useState(!1);return x.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const Kl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:f,src:h,srcSet:m,variant:g="circular",...y}=r;let v=null;const w={...r,component:s,variant:g},C=U1e({...u,...typeof c.img=="function"?c.img(w):c.img,src:h,srcSet:m}),E=h||m,I=E&&C!=="error";w.colorDefault=!I,delete w.ownerState;const O=B1e(w),[P,R]=wt("img",{className:O.img,elementType:V1e,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:h,srcSet:m,sizes:f},ownerState:w});return I?v=k.jsx(P,{...R}):i||i===0?v=i:E&&o?v=o[0]:v=k.jsx(H1e,{ownerState:w,className:O.fallback}),k.jsx(z1e,{as:s,className:fe(O.root,a),ref:n,...y,ownerState:w,children:v})});function G1e(e){return qe("MuiAvatarGroup",e)}const q1e=Ke("MuiAvatarGroup",["root","avatar"]),IR={small:-16,medium:-8},W1e=e=>{const{classes:t}=e;return Me({root:["root"],avatar:["avatar"]},G1e,t)},K1e=ae("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>[{[`& .${q1e.avatar}`]:t.avatar},t.root]})(dt(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${j1e.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),Y1e=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:f={},spacing:h="medium",total:m,variant:g="circular",...y}=r;let v=l<2?2:l;const w={...r,max:l,spacing:h,component:a,variant:g},C=W1e(w),E=x.Children.toArray(o).filter(N=>x.isValidElement(N)),I=m||E.length;I===v&&(v+=1),v=Math.min(I+1,v);const O=Math.min(E.length,v-1),P=Math.max(I-v,I-O,0),R=c?c(P):`+${P}`;let D;w.spacing&&IR[w.spacing]!==void 0?D=IR[w.spacing]:w.spacing===0?D=0:D=-w.spacing||IR.medium;const M={slots:f,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[A,_]=wt("surplus",{elementType:Kl,externalForwardedProps:M,className:C.avatar,ownerState:w,additionalProps:{variant:g}});return k.jsxs(K1e,{as:a,ownerState:w,className:fe(C.root,i),ref:n,...y,style:{"--AvatarGroup-spacing":`${D}px`,...y.style},children:[P?k.jsx(A,{..._,children:R}):null,E.slice(0,O).reverse().map(N=>x.cloneElement(N,{className:fe(N.props.className,C.avatar),variant:N.props.variant||g}))]})}),Q1e={entering:{opacity:1},entered:{opacity:1}},hh=x.forwardRef(function(t,n){const r=Lr(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:g,onExiting:y,style:v,timeout:w=o,TransitionComponent:C=as,...E}=t,I=x.useRef(null),O=en(I,_f(s),n),P=H=>j=>{if(H){const L=I.current;j===void 0?H(L):H(L,j)}},R=P(h),D=P((H,j)=>{Qj(H);const L=Ef({style:v,timeout:w,easing:l},{mode:"enter"});H.style.webkitTransition=r.transitions.create("opacity",L),H.style.transition=r.transitions.create("opacity",L),u&&u(H,j)}),M=P(f),A=P(y),_=P(H=>{const j=Ef({style:v,timeout:w,easing:l},{mode:"exit"});H.style.webkitTransition=r.transitions.create("opacity",j),H.style.transition=r.transitions.create("opacity",j),m&&m(H)}),N=P(g),B=H=>{i&&i(I.current,H)};return k.jsx(C,{appear:a,in:c,nodeRef:I,onEnter:D,onEntered:M,onEntering:R,onExit:_,onExited:N,onExiting:A,addEndListener:B,timeout:w,...E,children:(H,{ownerState:j,...L})=>x.cloneElement(s,{style:{opacity:0,visibility:H==="exited"&&!c?"hidden":void 0,...Q1e[H],...v,...s.props.style},ref:O,...L})})});function X1e(e){return qe("MuiBackdrop",e)}Ke("MuiBackdrop",["root","invisible"]);const J1e=e=>{const{classes:t,invisible:n}=e;return Me({root:["root",n&&"invisible"]},X1e,t)},Z1e=ae("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),dne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:f={},slots:h={},TransitionComponent:m,transitionDuration:g,...y}=r,v={...r,component:a,invisible:s},w=J1e(v),C={transition:m,root:c.Root,...h},E={...u,...f},I={slots:C,slotProps:E},[O,P]=wt("root",{elementType:Z1e,externalForwardedProps:I,className:fe(w.root,i),ownerState:v}),[R,D]=wt("transition",{elementType:hh,externalForwardedProps:I,ownerState:v});return k.jsx(R,{in:l,timeout:g,...y,...D,children:k.jsx(O,{"aria-hidden":!0,...P,classes:w,ref:n,children:o})})});function eEe(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=Lj({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function tEe(e){return qe("MuiBadge",e)}const $d=Ke("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),PR=10,AR=4,nEe=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Oe(n.vertical)}${Oe(n.horizontal)}`,`anchorOrigin${Oe(n.vertical)}${Oe(n.horizontal)}${Oe(o)}`,`overlap${Oe(o)}`,t!=="default"&&`color${Oe(t)}`]};return Me(s,tEe,a)},rEe=ae("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),oEe=ae("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Oe(n.anchorOrigin.vertical)}${Oe(n.anchorOrigin.horizontal)}${Oe(n.overlap)}`],n.color!=="default"&&t[`color${Oe(n.color)}`],n.invisible&&t.invisible]}})(dt(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:PR*2,lineHeight:1,padding:"0 6px",height:PR*2,borderRadius:PR,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(er(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:AR,height:AR*2,minWidth:AR*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${$d.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function XG(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const iEe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:f="rectangular",color:h="default",invisible:m=!1,max:g=99,badgeContent:y,slots:v,slotProps:w,showZero:C=!1,variant:E="standard",...I}=r,{badgeContent:O,invisible:P,max:R,displayValue:D}=eEe({max:g,invisible:m,badgeContent:y,showZero:C}),M=Lj({anchorOrigin:XG(o),color:h,overlap:f,variant:E,badgeContent:y}),A=P||O==null&&E!=="dot",{color:_=h,overlap:N=f,anchorOrigin:B,variant:H=E}=A?M:r,j=XG(B),L=H!=="dot"?D:void 0,V={...r,badgeContent:O,invisible:A,max:R,displayValue:L,showZero:C,anchorOrigin:j,color:_,overlap:N,variant:H},W=nEe(V),K=(v==null?void 0:v.root)??l.Root??rEe,G=(v==null?void 0:v.badge)??l.Badge??oEe,q=(w==null?void 0:w.root)??c.root,Y=(w==null?void 0:w.badge)??c.badge,Z=Dn({elementType:K,externalSlotProps:q,externalForwardedProps:I,additionalProps:{ref:n,as:s},ownerState:V,className:fe(q==null?void 0:q.className,W.root,i)}),ie=Dn({elementType:G,externalSlotProps:Y,ownerState:V,className:fe(W.badge,Y==null?void 0:Y.className)});return k.jsxs(K,{...Z,children:[u,k.jsx(G,{...ie,children:L})]})}),aEe=Ke("MuiBox",["root"]),sEe=ZS(),Zt=Mbe({themeId:qs,defaultTheme:sEe,defaultClassName:aEe.root,generateClassName:dte.generate});function lEe(e){return qe("MuiButton",e)}const hp=Ke("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),fne=x.createContext({}),pne=x.createContext(void 0),cEe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c={root:["root",a&&"loading",i,`${i}${Oe(t)}`,`size${Oe(o)}`,`${i}Size${Oe(o)}`,`color${Oe(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Oe(s)}`],startIcon:["icon","startIcon",`iconSize${Oe(o)}`],endIcon:["icon","endIcon",`iconSize${Oe(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=Me(c,lEe,l);return{...l,...u}},hne=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],uEe=ae(la,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Oe(n.color)}`],t[`size${Oe(n.size)}`],t[`${n.variant}Size${Oe(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${hp.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${hp.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${hp.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${hp.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(er()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:Nt(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${hp.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${hp.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${hp.loading}`]:{color:"transparent"}}}]}})),dEe=ae("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Oe(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...hne]})),fEe=ae("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Oe(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...hne]})),pEe=ae("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),JG=ae("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),ct=x.forwardRef(function(t,n){const r=x.useContext(fne),o=x.useContext(pne),i=ch(r,t),a=pt({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:g,focusVisibleClassName:y,fullWidth:v=!1,id:w,loading:C=null,loadingIndicator:E,loadingPosition:I="center",size:O="medium",startIcon:P,type:R,variant:D="text",...M}=a,A=bn(w),_=E??k.jsx(nw,{"aria-labelledby":A,color:"inherit",size:16}),N={...a,color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:v,loading:C,loadingIndicator:_,loadingPosition:I,size:O,type:R,variant:D},B=cEe(N),H=(P||C&&I==="start")&&k.jsx(dEe,{className:B.startIcon,ownerState:N,children:P||k.jsx(JG,{className:B.loadingIconPlaceholder,ownerState:N})}),j=(g||C&&I==="end")&&k.jsx(fEe,{className:B.endIcon,ownerState:N,children:g||k.jsx(JG,{className:B.loadingIconPlaceholder,ownerState:N})}),L=o||"",V=typeof C=="boolean"?k.jsx("span",{className:B.loadingWrapper,style:{display:"contents"},children:C&&k.jsx(pEe,{className:B.loadingIndicator,ownerState:N,children:_})}):null;return k.jsxs(uEe,{ownerState:N,className:fe(r.className,B.root,u,L),component:c,disabled:f||C,focusRipple:!m,focusVisibleClassName:fe(B.focusVisible,y),ref:n,type:R,id:C?A:w,...M,classes:B,children:[H,I!=="end"&&V,s,I==="end"&&V,j]})});function hEe(e){return qe("MuiButtonGroup",e)}const Tn=Ke("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),mEe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${Tn.grouped}`]:t.grouped},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.orientation)}`]},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.variant)}`]},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.variant)}${Oe(n.orientation)}`]},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.variant)}${Oe(n.color)}`]},{[`& .${Tn.firstButton}`]:t.firstButton},{[`& .${Tn.lastButton}`]:t.lastButton},{[`& .${Tn.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},gEe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Oe(n)}`],grouped:["grouped",`grouped${Oe(a)}`,`grouped${Oe(s)}`,`grouped${Oe(s)}${Oe(a)}`,`grouped${Oe(s)}${Oe(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Me(l,hEe,t)},yEe=ae("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:mEe})(dt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Tn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Tn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(er()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:Nt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${Tn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${Tn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(er(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${Tn.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),sB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:f=!1,fullWidth:h=!1,orientation:m="horizontal",size:g="medium",variant:y="outlined",...v}=r,w={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:f,fullWidth:h,orientation:m,size:g,variant:y},C=gEe(w),E=x.useMemo(()=>({className:C.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:f,fullWidth:h,size:g,variant:y}),[a,l,c,u,f,h,g,y,C.grouped]),I=Ste(o),O=I.length,P=R=>{const D=R===0,M=R===O-1;return D&&M?"":D?C.firstButton:M?C.lastButton:C.middleButton};return k.jsx(yEe,{as:s,role:"group",className:fe(C.root,i),ref:n,ownerState:w,...v,children:k.jsx(fne.Provider,{value:E,children:I.map((R,D)=>k.jsx(pne.Provider,{value:P(D),children:R},D))})})});function vEe(e){return qe("MuiCard",e)}Ke("MuiCard",["root"]);const bEe=e=>{const{classes:t}=e;return Me({root:["root"]},vEe,t)},xEe=ae(go,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),ho=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=bEe(s);return k.jsx(xEe,{className:fe(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function SEe(e){return qe("MuiCardActionArea",e)}const MR=Ke("MuiCardActionArea",["root","focusVisible","focusHighlight"]),wEe=e=>{const{classes:t}=e;return Me({root:["root"],focusHighlight:["focusHighlight"]},SEe,t)},CEe=ae(la,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${MR.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${MR.focusVisible} .${MR.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),EEe=ae("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(dt(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),TEe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=wEe(l);return k.jsxs(CEe,{className:fe(c.root,i),focusVisibleClassName:fe(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,k.jsx(EEe,{className:c.focusHighlight,ownerState:l})]})});function OEe(e){return qe("MuiCardActions",e)}Ke("MuiCardActions",["root","spacing"]);const IEe=e=>{const{classes:t,disableSpacing:n}=e;return Me({root:["root",!n&&"spacing"]},OEe,t)},PEe=ae("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),ll=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=IEe(s);return k.jsx(PEe,{className:fe(l.root,i),ownerState:s,ref:n,...a})});function AEe(e){return qe("MuiCardContent",e)}Ke("MuiCardContent",["root"]);const MEe=e=>{const{classes:t}=e;return Me({root:["root"]},AEe,t)},REe=ae("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),Fi=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=MEe(s);return k.jsx(REe,{as:i,className:fe(l.root,o),ownerState:s,ref:n,...a})});function DEe(e){return qe("MuiCardHeader",e)}const JE=Ke("MuiCardHeader",["root","avatar","action","content","title","subheader"]),kEe=e=>{const{classes:t}=e;return Me({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},DEe,t)},_Ee=ae("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>[{[`& .${JE.title}`]:t.title},{[`& .${JE.subheader}`]:t.subheader},t.root]})({display:"flex",alignItems:"center",padding:16}),$Ee=ae("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),NEe=ae("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),LEe=ae("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${YE.root}:where(& .${JE.title})`]:{display:"block"},[`.${YE.root}:where(& .${JE.subheader})`]:{display:"block"}}),Jl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:f,slots:h={},slotProps:m={},...g}=r,y={...r,component:a,disableTypography:s},v=kEe(y),w={slots:h,slotProps:{title:f,subheader:c,...m}};let C=u;const[E,I]=wt("title",{className:v.title,elementType:at,externalForwardedProps:w,ownerState:y,additionalProps:{variant:i?"body2":"h5",component:"span"}});C!=null&&C.type!==at&&!s&&(C=k.jsx(E,{...I,children:C}));let O=l;const[P,R]=wt("subheader",{className:v.subheader,elementType:at,externalForwardedProps:w,ownerState:y,additionalProps:{variant:i?"body2":"body1",color:"textSecondary",component:"span"}});O!=null&&O.type!==at&&!s&&(O=k.jsx(P,{...R,children:O}));const[D,M]=wt("root",{ref:n,className:v.root,elementType:_Ee,externalForwardedProps:{...w,...g,component:a},ownerState:y}),[A,_]=wt("avatar",{className:v.avatar,elementType:$Ee,externalForwardedProps:w,ownerState:y}),[N,B]=wt("content",{className:v.content,elementType:LEe,externalForwardedProps:w,ownerState:y}),[H,j]=wt("action",{className:v.action,elementType:NEe,externalForwardedProps:w,ownerState:y});return k.jsxs(D,{...M,children:[i&&k.jsx(A,{..._,children:i}),k.jsxs(N,{...B,children:[C,O]}),o&&k.jsx(H,{...j,children:o})]})});function FEe(e){return qe("MuiCardMedia",e)}Ke("MuiCardMedia",["root","media","img"]);const jEe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return Me({root:["root",n&&"media",r&&"img"]},FEe,t)},BEe=ae("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),zEe=["video","audio","picture","iframe","img"],VEe=["picture","img"],$c=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,f=zEe.includes(a),h=!f&&s?{backgroundImage:`url("${s}")`,...c}:c,m={...r,component:a,isMediaComponent:f,isImageComponent:VEe.includes(a)},g=jEe(m);return k.jsx(BEe,{className:fe(g.root,i),as:a,role:!f&&s?"img":void 0,ref:n,style:h,ownerState:m,src:f?s||l:void 0,...u,children:o})});function HEe(e){return qe("PrivateSwitchBase",e)}Ke("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const UEe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Oe(o)}`],input:["input"]};return Me(i,HEe,t)},GEe=ae(la)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),qEe=ae("input",{shouldForwardProp:ui})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),mne=x.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:f,inputProps:h,inputRef:m,name:g,onBlur:y,onChange:v,onFocus:w,readOnly:C,required:E=!1,tabIndex:I,type:O,value:P,slots:R={},slotProps:D={},...M}=t,[A,_]=ia({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),N=sl(),B=se=>{w&&w(se),N&&N.onFocus&&N.onFocus(se)},H=se=>{y&&y(se),N&&N.onBlur&&N.onBlur(se)},j=se=>{if(se.nativeEvent.defaultPrevented)return;const ce=se.target.checked;_(ce),v&&v(se,ce)};let L=s;N&&typeof L>"u"&&(L=N.disabled);const V=O==="checkbox"||O==="radio",W={...t,checked:A,disabled:L,disableFocusRipple:l,edge:c},K=UEe(W),G={slots:R,slotProps:{input:h,...D}},[q,Y]=wt("root",{ref:n,elementType:GEe,className:K.root,shouldForwardComponentProp:!0,externalForwardedProps:{...G,component:"span",...M},getSlotProps:se=>({...se,onFocus:ce=>{var ye;(ye=se.onFocus)==null||ye.call(se,ce),B(ce)},onBlur:ce=>{var ye;(ye=se.onBlur)==null||ye.call(se,ce),H(ce)}}),ownerState:W,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:L,role:void 0,tabIndex:null}}),[Z,ie]=wt("input",{ref:m,elementType:qEe,className:K.input,externalForwardedProps:G,getSlotProps:se=>({...se,onChange:ce=>{var ye;(ye=se.onChange)==null||ye.call(se,ce),j(ce)}}),ownerState:W,additionalProps:{autoFocus:r,checked:o,defaultChecked:a,disabled:L,id:V?f:void 0,name:g,readOnly:C,required:E,tabIndex:I,type:O,...O==="checkbox"&&P===void 0?{}:{value:P}}});return k.jsxs(q,{...Y,children:[k.jsx(Z,{...ie}),A?i:u]})}),WEe=Ot(k.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),KEe=Ot(k.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),YEe=Ot(k.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function QEe(e){return qe("MuiCheckbox",e)}const RR=Ke("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),XEe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Oe(r)}`,`size${Oe(o)}`]},a=Me(i,QEe,t);return{...t,...a}},JEe=ae(mne,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Oe(n.size)}`],n.color!=="default"&&t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{[`&.${RR.checked}, &.${RR.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${RR.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),ZEe=k.jsx(KEe,{}),eTe=k.jsx(WEe,{}),tTe=k.jsx(YEe,{}),nTe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCheckbox"}),{checkedIcon:o=ZEe,color:i="primary",icon:a=eTe,indeterminate:s=!1,indeterminateIcon:l=tTe,inputProps:c,size:u="medium",disableRipple:f=!1,className:h,slots:m={},slotProps:g={},...y}=r,v=s?l:a,w=s?l:o,C={...r,disableRipple:f,color:i,indeterminate:s,size:u},E=XEe(C),I=g.input??c,[O,P]=wt("root",{ref:n,elementType:JEe,className:fe(E.root,h),shouldForwardComponentProp:!0,externalForwardedProps:{slots:m,slotProps:g,...y},ownerState:C,additionalProps:{type:"checkbox",icon:x.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:x.cloneElement(w,{fontSize:w.props.fontSize??u}),disableRipple:f,slots:m,slotProps:{input:qj(typeof I=="function"?I(C):I,{"data-indeterminate":s})}}});return k.jsx(O,{...P,classes:E})});function ZG(e){return e.substring(2).toLowerCase()}function rTe(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function gne(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=x.useRef(!1),s=x.useRef(null),l=x.useRef(!1),c=x.useRef(!1);x.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=en(_f(t),s),f=Je(g=>{const y=c.current;c.current=!1;const v=Mr(s.current);if(!l.current||!s.current||"clientX"in g&&rTe(g,v))return;if(a.current){a.current=!1;return}let w;g.composedPath?w=g.composedPath().includes(s.current):w=!v.documentElement.contains(g.target)||s.current.contains(g.target),!w&&(n||!y)&&o(g)}),h=g=>y=>{c.current=!0;const v=t.props[g];v&&v(y)},m={ref:u};return i!==!1&&(m[i]=h(i)),x.useEffect(()=>{if(i!==!1){const g=ZG(i),y=Mr(s.current),v=()=>{a.current=!0};return y.addEventListener(g,f),y.addEventListener("touchmove",v),()=>{y.removeEventListener(g,f),y.removeEventListener("touchmove",v)}}},[f,i]),r!==!1&&(m[r]=h(r)),x.useEffect(()=>{if(r!==!1){const g=ZG(r),y=Mr(s.current);return y.addEventListener(g,f),()=>{y.removeEventListener(g,f)}}},[f,r]),x.cloneElement(t,m)}const Uu=C0e({createStyledComponent:ae("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Oe(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>pt({props:e,name:"MuiContainer"})});function oTe(e){const t=Mr(e);return t.body===e?ns(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Y0(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function e6(e){return parseInt(ns(e).getComputedStyle(e).paddingRight,10)||0}function iTe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function t6(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!iTe(a);s&&l&&Y0(a,o)})}function DR(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function aTe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(oTe(r)){const a=xte(ns(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${e6(r)+a}px`;const s=Mr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${e6(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Mr(r).body;else{const a=r.parentElement,s=ns(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function sTe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class lTe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Y0(t.modalRef,!1);const o=sTe(n);t6(n,t.mount,t.modalRef,o,!0);const i=DR(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=DR(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=aTe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=DR(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Y0(t.modalRef,n),t6(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&Y0(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const cTe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function uTe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function dTe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function fTe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||dTe(e))}function pTe(e){const t=[],n=[];return Array.from(e.querySelectorAll(cTe)).forEach((r,o)=>{const i=uTe(r);i===-1||!fTe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function hTe(){return!0}function lB(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=pTe,isEnabled:a=hTe,open:s}=e,l=x.useRef(!1),c=x.useRef(null),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),m=x.useRef(!1),g=x.useRef(null),y=en(_f(t),g),v=x.useRef(null);x.useEffect(()=>{!s||!g.current||(m.current=!n)},[n,s]),x.useEffect(()=>{if(!s||!g.current)return;const E=Mr(g.current);return g.current.contains(E.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),m.current&&g.current.focus()),()=>{o||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),x.useEffect(()=>{if(!s||!g.current)return;const E=Mr(g.current),I=R=>{v.current=R,!(r||!a()||R.key!=="Tab")&&E.activeElement===g.current&&R.shiftKey&&(l.current=!0,u.current&&u.current.focus())},O=()=>{var M,A;const R=g.current;if(R===null)return;if(!E.hasFocus()||!a()||l.current){l.current=!1;return}if(R.contains(E.activeElement)||r&&E.activeElement!==c.current&&E.activeElement!==u.current)return;if(E.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let D=[];if((E.activeElement===c.current||E.activeElement===u.current)&&(D=i(g.current)),D.length>0){const _=!!((M=v.current)!=null&&M.shiftKey&&((A=v.current)==null?void 0:A.key)==="Tab"),N=D[0],B=D[D.length-1];typeof N!="string"&&typeof B!="string"&&(_?B.focus():N.focus())}else R.focus()};E.addEventListener("focusin",O),E.addEventListener("keydown",I,!0);const P=setInterval(()=>{E.activeElement&&E.activeElement.tagName==="BODY"&&O()},50);return()=>{clearInterval(P),E.removeEventListener("focusin",O),E.removeEventListener("keydown",I,!0)}},[n,r,o,a,s,i]);const w=E=>{f.current===null&&(f.current=E.relatedTarget),m.current=!0,h.current=E.target;const I=t.props.onFocus;I&&I(E)},C=E=>{f.current===null&&(f.current=E.relatedTarget),m.current=!0};return k.jsxs(x.Fragment,{children:[k.jsx("div",{tabIndex:s?0:-1,onFocus:C,ref:c,"data-testid":"sentinelStart"}),x.cloneElement(t,{ref:y,onFocus:w}),k.jsx("div",{tabIndex:s?0:-1,onFocus:C,ref:u,"data-testid":"sentinelEnd"})]})}function mTe(e){return typeof e=="function"?e():e}function gTe(e){return e?e.props.hasOwnProperty("in"):!1}const n6=()=>{},S1=new lTe;function yTe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,f=x.useRef({}),h=x.useRef(null),m=x.useRef(null),g=en(m,u),[y,v]=x.useState(!c),w=gTe(s);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const E=()=>Mr(h.current),I=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),O=()=>{S1.mount(I(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},P=Je(()=>{const j=mTe(t)||E().body;S1.add(I(),j),m.current&&O()}),R=()=>S1.isTopModal(I()),D=Je(j=>{h.current=j,j&&(c&&R()?O():m.current&&Y0(m.current,C))}),M=x.useCallback(()=>{S1.remove(I(),C)},[C]);x.useEffect(()=>()=>{M()},[M]),x.useEffect(()=>{c?P():(!w||!o)&&M()},[c,M,w,o,P]);const A=j=>L=>{var V;(V=j.onKeyDown)==null||V.call(j,L),!(L.key!=="Escape"||L.which===229||!R())&&(n||(L.stopPropagation(),l&&l(L,"escapeKeyDown")))},_=j=>L=>{var V;(V=j.onClick)==null||V.call(j,L),L.target===L.currentTarget&&l&&l(L,"backdropClick")};return{getRootProps:(j={})=>{const L=VE(e);delete L.onTransitionEnter,delete L.onTransitionExited;const V={...L,...j};return{role:"presentation",...V,onKeyDown:A(V),ref:g}},getBackdropProps:(j={})=>{const L=j;return{"aria-hidden":!0,...L,onClick:_(L),open:c}},getTransitionProps:()=>{const j=()=>{v(!1),i&&i()},L=()=>{v(!0),a&&a(),o&&M()};return{onEnter:J3(j,(s==null?void 0:s.props.onEnter)??n6),onExited:J3(L,(s==null?void 0:s.props.onExited)??n6)}},rootRef:g,portalRef:D,isTopModal:R,exited:y,hasTransition:w}}function vTe(e){return qe("MuiModal",e)}Ke("MuiModal",["root","hidden","backdrop"]);const bTe=e=>{const{open:t,exited:n,classes:r}=e;return Me({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},vTe,r)},xTe=ae("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(dt(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),STe=ae(dne,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),lv=x.forwardRef(function(t,n){const r=pt({name:"MuiModal",props:t}),{BackdropComponent:o=STe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:f,components:h={},componentsProps:m={},disableAutoFocus:g=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:v=!1,disablePortal:w=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:I=!1,keepMounted:O=!1,onClose:P,onTransitionEnter:R,onTransitionExited:D,open:M,slotProps:A={},slots:_={},theme:N,...B}=r,H={...r,closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:y,disableEscapeKeyDown:v,disablePortal:w,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:I,keepMounted:O},{getRootProps:j,getBackdropProps:L,getTransitionProps:V,portalRef:W,isTopModal:K,exited:G,hasTransition:q}=yTe({...H,rootRef:n}),Y={...H,exited:G},Z=bTe(Y),ie={};if(c.props.tabIndex===void 0&&(ie.tabIndex="-1"),q){const{onEnter:le,onExited:de}=V();ie.onEnter=le,ie.onExited=de}const se={slots:{root:h.Root,backdrop:h.Backdrop,..._},slotProps:{...m,...A}},[ce,ye]=wt("root",{ref:n,elementType:xTe,externalForwardedProps:{...se,...B,component:f},getSlotProps:j,ownerState:Y,className:fe(s,Z==null?void 0:Z.root,!Y.open&&Y.exited&&(Z==null?void 0:Z.hidden))}),[Se,ne]=wt("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:se,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:le=>L({...le,onClick:de=>{le!=null&&le.onClick&&le.onClick(de)}}),className:fe(i==null?void 0:i.className,Z==null?void 0:Z.backdrop),ownerState:Y});return!O&&!M&&(!q||G)?null:k.jsx(cne,{ref:W,container:u,disablePortal:w,children:k.jsxs(ce,{...ye,children:[!I&&o?k.jsx(Se,{...ne}):null,k.jsx(lB,{disableEnforceFocus:y,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:K,open:M,children:x.cloneElement(c,ie)})]})})});function wTe(e){return qe("MuiDialog",e)}const Q0=Ke("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),yne=x.createContext({}),CTe=ae(dne,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),ETe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Oe(n)}`],paper:["paper",`paperScroll${Oe(n)}`,`paperWidth${Oe(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Me(a,wTe,t)},TTe=ae(lv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),OTe=ae("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Oe(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),ITe=ae(go,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Oe(n.scroll)}`],t[`paperWidth${Oe(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(dt(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Q0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),Ix=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialog"}),o=Lr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:f,className:h,disableEscapeKeyDown:m=!1,fullScreen:g=!1,fullWidth:y=!1,maxWidth:v="sm",onClick:w,onClose:C,open:E,PaperComponent:I=go,PaperProps:O={},scroll:P="paper",slots:R={},slotProps:D={},TransitionComponent:M=hh,transitionDuration:A=i,TransitionProps:_,...N}=r,B={...r,disableEscapeKeyDown:m,fullScreen:g,fullWidth:y,maxWidth:v,scroll:P},H=ETe(B),j=x.useRef(),L=ue=>{j.current=ue.target===ue.currentTarget},V=ue=>{w&&w(ue),j.current&&(j.current=null,C&&C(ue,"backdropClick"))},W=bn(s),K=x.useMemo(()=>({titleId:W}),[W]),G={transition:M,...R},q={transition:_,paper:O,backdrop:u,...D},Y={slots:G,slotProps:q},[Z,ie]=wt("root",{elementType:TTe,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:B,className:fe(H.root,h),ref:n}),[se,ce]=wt("backdrop",{elementType:CTe,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:B}),[ye,Se]=wt("paper",{elementType:ITe,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:B,className:fe(H.paper,O.className)}),[ne,le]=wt("container",{elementType:OTe,externalForwardedProps:Y,ownerState:B,className:fe(H.container)}),[de,oe]=wt("transition",{elementType:hh,externalForwardedProps:Y,ownerState:B,additionalProps:{appear:!0,in:E,timeout:A,role:"presentation"}});return k.jsx(Z,{closeAfterTransition:!0,slots:{backdrop:se},slotProps:{backdrop:{transitionDuration:A,as:c,...ce}},disableEscapeKeyDown:m,onClose:C,open:E,onClick:V,...ie,...N,children:k.jsx(de,{...oe,children:k.jsx(ne,{onMouseDown:L,...le,children:k.jsx(ye,{as:I,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":W,"aria-modal":l,...Se,children:k.jsx(yne.Provider,{value:K,children:f})})})})})});function PTe(e){return qe("MuiDialogActions",e)}Ke("MuiDialogActions",["root","spacing"]);const ATe=e=>{const{classes:t,disableSpacing:n}=e;return Me({root:["root",!n&&"spacing"]},PTe,t)},MTe=ae("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Px=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=ATe(s);return k.jsx(MTe,{className:fe(l.root,o),ownerState:s,ref:n,...a})});function RTe(e){return qe("MuiDialogContent",e)}Ke("MuiDialogContent",["root","dividers"]);function DTe(e){return qe("MuiDialogTitle",e)}const kTe=Ke("MuiDialogTitle",["root"]),_Te=e=>{const{classes:t,dividers:n}=e;return Me({root:["root",n&&"dividers"]},RTe,t)},$Te=ae("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(dt(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${kTe.root} + &`]:{paddingTop:0}}}]}))),Ax=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=_Te(s);return k.jsx($Te,{className:fe(l.root,o),ownerState:s,ref:n,...a})});function NTe(e){return qe("MuiDialogContentText",e)}Ke("MuiDialogContentText",["root"]);const LTe=e=>{const{classes:t}=e,r=Me({root:["root"]},NTe,t);return{...t,...r}},FTe=ae(at,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),r6=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogContentText"}),{children:o,className:i,...a}=r,s=LTe(a);return k.jsx(FTe,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:a,className:fe(s.root,i),...r,classes:s})}),jTe=e=>{const{classes:t}=e;return Me({root:["root"]},DTe,t)},BTe=ae(at,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),ZE=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=jTe(s),{titleId:c=i}=x.useContext(yne);return k.jsx(BTe,{component:"h2",className:fe(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function zTe(e){return qe("MuiDivider",e)}const o6=Ke("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),VTe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Me({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},zTe,r)},HTe=ae("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(dt(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Nt(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),UTe=ae("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(dt(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),ji=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:f=l!=="hr"?"separator":void 0,textAlign:h="center",variant:m="fullWidth",...g}=r,y={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:f,textAlign:h,variant:m},v=VTe(y);return k.jsx(HTe,{as:l,className:fe(v.root,a),role:f,ref:n,ownerState:y,"aria-orientation":f==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...g,children:i?k.jsx(UTe,{className:v.wrapper,ownerState:y,children:i}):null})});ji&&(ji.muiSkipListHighlight=!0);function GTe(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=ns(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function qTe(e){return typeof e=="function"?e():e}function w1(e,t,n){const r=qTe(n),o=GTe(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const WTe=x.forwardRef(function(t,n){const r=Lr(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:f=o,in:h,onEnter:m,onEntered:g,onEntering:y,onExit:v,onExited:w,onExiting:C,style:E,timeout:I=i,TransitionComponent:O=as,...P}=t,R=x.useRef(null),D=en(_f(l),R,n),M=W=>K=>{W&&(K===void 0?W(R.current):W(R.current,K))},A=M((W,K)=>{w1(u,W,c),Qj(W),m&&m(W,K)}),_=M((W,K)=>{const G=Ef({timeout:I,style:E,easing:f},{mode:"enter"});W.style.webkitTransition=r.transitions.create("-webkit-transform",{...G}),W.style.transition=r.transitions.create("transform",{...G}),W.style.webkitTransform="none",W.style.transform="none",y&&y(W,K)}),N=M(g),B=M(C),H=M(W=>{const K=Ef({timeout:I,style:E,easing:f},{mode:"exit"});W.style.webkitTransition=r.transitions.create("-webkit-transform",K),W.style.transition=r.transitions.create("transform",K),w1(u,W,c),v&&v(W)}),j=M(W=>{W.style.webkitTransition="",W.style.transition="",w&&w(W)}),L=W=>{a&&a(R.current,W)},V=x.useCallback(()=>{R.current&&w1(u,R.current,c)},[u,c]);return x.useEffect(()=>{if(h||u==="down"||u==="right")return;const W=$h(()=>{R.current&&w1(u,R.current,c)}),K=ns(R.current);return K.addEventListener("resize",W),()=>{W.clear(),K.removeEventListener("resize",W)}},[u,h,c]),x.useEffect(()=>{h||V()},[h,V]),k.jsx(O,{nodeRef:R,onEnter:A,onEntered:N,onEntering:_,onExit:H,onExited:j,onExiting:B,addEndListener:L,appear:s,in:h,timeout:I,...P,children:(W,{ownerState:K,...G})=>x.cloneElement(l,{ref:D,style:{visibility:W==="exited"&&!h?"hidden":void 0,...E,...l.props.style},...G})})});function KTe(e){return qe("MuiDrawer",e)}Ke("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const vne=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},YTe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root",`anchor${Oe(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Oe(n)}`,r!=="temporary"&&`paperAnchorDocked${Oe(n)}`]};return Me(o,KTe,t)},QTe=ae(lv,{name:"MuiDrawer",slot:"Root",overridesResolver:vne})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),XTe=ae("div",{shouldForwardProp:ui,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:vne})({flex:"0 0 auto"}),JTe=ae(go,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Oe(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Oe(n.anchor)}`]]}})(dt(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),bne={left:"right",right:"left",top:"down",bottom:"up"};function ZTe(e){return["left","right"].includes(e)}function eOe({direction:e},t){return e==="rtl"&&ZTe(t)?bne[t]:t}const tOe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDrawer"}),o=Lr(),i=vr(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:m,...g}={},onClose:y,open:v=!1,PaperProps:w={},SlideProps:C,TransitionComponent:E,transitionDuration:I=a,variant:O="temporary",slots:P={},slotProps:R={},...D}=r,M=x.useRef(!1);x.useEffect(()=>{M.current=!0},[]);const A=eOe({direction:i?"rtl":"ltr"},s),N={...r,anchor:s,elevation:f,open:v,variant:O,...D},B=YTe(N),H={slots:{transition:E,...P},slotProps:{paper:w,transition:C,...R,backdrop:qj(R.backdrop||{...l,...m},{transitionDuration:I})}},[j,L]=wt("root",{ref:n,elementType:QTe,className:fe(B.root,B.modal,u),shouldForwardComponentProp:!0,ownerState:N,externalForwardedProps:{...H,...D,...g},additionalProps:{open:v,onClose:y,hideBackdrop:h,slots:{backdrop:H.slots.backdrop},slotProps:{backdrop:H.slotProps.backdrop}}}),[V,W]=wt("paper",{elementType:JTe,shouldForwardComponentProp:!0,className:fe(B.paper,w.className),ownerState:N,externalForwardedProps:H,additionalProps:{elevation:O==="temporary"?f:0,square:!0}}),[K,G]=wt("docked",{elementType:XTe,ref:n,className:fe(B.root,B.docked,u),ownerState:N,externalForwardedProps:H,additionalProps:D}),[q,Y]=wt("transition",{elementType:WTe,ownerState:N,externalForwardedProps:H,additionalProps:{in:v,direction:bne[A],timeout:I,appear:M.current}}),Z=k.jsx(V,{...W,children:c});if(O==="permanent")return k.jsx(K,{...G,children:Z});const ie=k.jsx(q,{...Y,children:Z});return O==="persistent"?k.jsx(K,{...G,children:ie}):k.jsx(j,{...L,children:ie})});function nOe(e){return qe("MuiFab",e)}const i6=Ke("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),rOe=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Oe(o)}`,t==="inherit"?"colorInherit":t]},a=Me(i,nOe,r);return{...r,...a}},oOe=ae(la,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>ui(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Oe(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Oe(n.size)],t[n.color]]}})(dt(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${i6.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),dt(({theme:e})=>({variants:[...Object.entries(e.palette).filter(er(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),dt(({theme:e})=>({[`&.${i6.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Lh=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:f="large",variant:h="circular",...m}=r,g={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:f,variant:h},y=rOe(g);return k.jsx(oOe,{className:fe(y.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:fe(y.focusVisible,u),ownerState:g,ref:n,...m,classes:y,children:o})}),iOe=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Oe(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Me(l,C1e,t);return{...t,...c}},aOe=ae(lI,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...aI(e,t),!n.disableUnderline&&t.underline]}})(dt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ua.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ua.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ua.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ua.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ua.disabled}, .${Ua.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ua.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(er()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),sOe=ae(cI,{name:"MuiFilledInput",slot:"Input",overridesResolver:sI})(dt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),cB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:f,slots:h={},type:m="text",...g}=r,y={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:m},v=iOe(r),w={root:{ownerState:y},input:{ownerState:y}},C=f??a?si(w,f??a):w,E=h.root??i.Root??aOe,I=h.input??i.Input??sOe;return k.jsx(iw,{slots:{root:E,input:I},slotProps:C,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:m,...g,classes:v})});cB.muiName="Input";function lOe(e){return qe("MuiFormControl",e)}Ke("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const cOe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Oe(n)}`,r&&"fullWidth"]};return Me(o,lOe,t)},uOe=ae("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${Oe(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Fh=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:g=!1,size:y="medium",variant:v="outlined",...w}=r,C={...r,color:a,component:s,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:g,size:y,variant:v},E=cOe(C),[I,O]=x.useState(()=>{let j=!1;return o&&x.Children.forEach(o,L=>{if(!Rg(L,["Input","Select"]))return;const V=Rg(L,["Select"])?L.props.input:L;V&&v1e(V.props)&&(j=!0)}),j}),[P,R]=x.useState(()=>{let j=!1;return o&&x.Children.forEach(o,L=>{Rg(L,["Input","Select"])&&(XE(L.props,!0)||XE(L.props.inputProps,!0))&&(j=!0)}),j}),[D,M]=x.useState(!1);l&&D&&M(!1);const A=u!==void 0&&!l?u:D;let _;x.useRef(!1);const N=x.useCallback(()=>{R(!0)},[]),B=x.useCallback(()=>{R(!1)},[]),H=x.useMemo(()=>({adornedStart:I,setAdornedStart:O,color:a,disabled:l,error:c,filled:P,focused:A,fullWidth:f,hiddenLabel:h,size:y,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:B,onFilled:N,registerEffect:_,required:g,variant:v}),[I,a,l,c,P,A,f,h,_,B,N,g,y,v]);return k.jsx(iI.Provider,{value:H,children:k.jsx(uOe,{as:s,ownerState:C,className:fe(E.root,i),ref:n,...w,children:o})})});function dOe(e){return qe("MuiFormControlLabel",e)}const hg=Ke("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),fOe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Oe(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Me(a,dOe,t)},pOe=ae("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${hg.label}`]:t.label},t.root,t[`labelPlacement${Oe(n.labelPlacement)}`]]}})(dt(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${hg.disabled}`]:{cursor:"default"},[`& .${hg.label}`]:{[`&.${hg.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),hOe=ae("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(dt(({theme:e})=>({[`&.${hg.error}`]:{color:(e.vars||e).palette.error.main}}))),os=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:f,labelPlacement:h="end",name:m,onChange:g,required:y,slots:v={},slotProps:w={},value:C,...E}=r,I=sl(),O=l??s.props.disabled??(I==null?void 0:I.disabled),P=y??s.props.required,R={disabled:O,required:P};["checked","name","onChange","value","inputRef"].forEach(j=>{typeof s.props[j]>"u"&&typeof r[j]<"u"&&(R[j]=r[j])});const D=Nf({props:r,muiFormControl:I,states:["error"]}),M={...r,disabled:O,labelPlacement:h,required:P,error:D.error},A=fOe(M),_={slots:v,slotProps:{...a,...w}},[N,B]=wt("typography",{elementType:at,externalForwardedProps:_,ownerState:M});let H=f;return H!=null&&H.type!==at&&!c&&(H=k.jsx(N,{component:"span",...B,className:fe(A.label,B==null?void 0:B.className),children:H})),k.jsxs(pOe,{className:fe(A.root,i),ownerState:M,ref:n,...E,children:[x.cloneElement(s,R),P?k.jsxs("div",{children:[H,k.jsxs(hOe,{ownerState:M,"aria-hidden":!0,className:A.asterisk,children:[" ","*"]})]}):H]})});function mOe(e){return qe("MuiFormGroup",e)}Ke("MuiFormGroup",["root","row","error"]);const gOe=e=>{const{classes:t,row:n,error:r}=e;return Me({root:["root",n&&"row",r&&"error"]},mOe,t)},yOe=ae("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),Mx=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=sl(),l=Nf({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=gOe(c);return k.jsx(yOe,{className:fe(u.root,o),ownerState:c,ref:n,...a})});function vOe(e){return qe("MuiFormHelperText",e)}const a6=Ke("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var s6;const bOe=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Oe(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Me(c,vOe,t)},xOe=ae("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Oe(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${a6.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${a6.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),aw=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:f,required:h,variant:m,...g}=r,y=sl(),v=Nf({props:r,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete w.ownerState;const C=bOe(w);return k.jsx(xOe,{as:a,className:fe(C.root,i),ref:n,...g,ownerState:w,children:o===" "?s6||(s6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});function SOe(e){return qe("MuiFormLabel",e)}const X0=Ke("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),wOe=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Oe(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Me(l,SOe,t)},COe=ae("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{[`&.${X0.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${X0.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${X0.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),EOe=ae("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(dt(({theme:e})=>({[`&.${X0.error}`]:{color:(e.vars||e).palette.error.main}}))),TOe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:f,required:h,...m}=r,g=sl(),y=Nf({props:r,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),v={...r,color:y.color||"primary",component:s,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},w=wOe(v);return k.jsxs(COe,{as:s,ownerState:v,className:fe(w.root,i),ref:n,...m,children:[o,y.required&&k.jsxs(EOe,{ownerState:v,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})}),me=j0e({createStyledComponent:ae("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>pt({props:e,name:"MuiGrid"}),useTheme:Lr});function EN(e){return`scale(${e}, ${e**2})`}const OOe={entering:{opacity:1,transform:EN(1)},entered:{opacity:1,transform:"none"}},kR=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),mh=x.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:g,timeout:y="auto",TransitionComponent:v=as,...w}=t,C=ko(),E=x.useRef(),I=Lr(),O=x.useRef(null),P=en(O,_f(i),n),R=j=>L=>{if(j){const V=O.current;L===void 0?j(V):j(V,L)}},D=R(u),M=R((j,L)=>{Qj(j);const{duration:V,delay:W,easing:K}=Ef({style:g,timeout:y,easing:a},{mode:"enter"});let G;y==="auto"?(G=I.transitions.getAutoHeightDuration(j.clientHeight),E.current=G):G=V,j.style.transition=[I.transitions.create("opacity",{duration:G,delay:W}),I.transitions.create("transform",{duration:kR?G:G*.666,delay:W,easing:K})].join(","),l&&l(j,L)}),A=R(c),_=R(m),N=R(j=>{const{duration:L,delay:V,easing:W}=Ef({style:g,timeout:y,easing:a},{mode:"exit"});let K;y==="auto"?(K=I.transitions.getAutoHeightDuration(j.clientHeight),E.current=K):K=L,j.style.transition=[I.transitions.create("opacity",{duration:K,delay:V}),I.transitions.create("transform",{duration:kR?K:K*.666,delay:kR?V:V||K*.333,easing:W})].join(","),j.style.opacity=0,j.style.transform=EN(.75),f&&f(j)}),B=R(h),H=j=>{y==="auto"&&C.start(E.current||0,j),r&&r(O.current,j)};return k.jsx(v,{appear:o,in:s,nodeRef:O,onEnter:M,onEntered:A,onEntering:D,onExit:N,onExited:B,onExiting:_,addEndListener:H,timeout:y==="auto"?null:y,...w,children:(j,{ownerState:L,...V})=>x.cloneElement(i,{style:{opacity:0,transform:EN(.75),visibility:j==="exited"&&!s?"hidden":void 0,...OOe[j],...g,...i.props.style},ref:P,...V})})});mh&&(mh.muiSupportAuto=!0);function IOe(e){return qe("MuiImageList",e)}Ke("MuiImageList",["root","masonry","quilted","standard","woven"]);const xne=x.createContext({}),POe=e=>{const{classes:t,variant:n}=e;return Me({root:["root",n]},IOe,t)},AOe=ae("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),Sne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:f="standard",...h}=r,m=x.useMemo(()=>({rowHeight:l,gap:c,variant:f}),[l,c,f]),g=f==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},y={...r,component:s,gap:c,rowHeight:l,variant:f},v=POe(y);return k.jsx(AOe,{as:s,className:fe(v.root,v[f],i),ref:n,style:g,ownerState:y,...h,children:k.jsx(xne.Provider,{value:m,children:o})})});function MOe(e){return qe("MuiImageListItem",e)}const _R=Ke("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),ROe=e=>{const{classes:t,variant:n}=e;return Me({root:["root",n],img:["img"]},MOe,t)},DOe=ae("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${_R.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${_R.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${_R.img}`]:{height:"auto",flexGrow:1}}}]}),wne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:f="auto",gap:h,variant:m}=x.useContext(xne);let g="auto";m==="woven"?g=void 0:f!=="auto"&&(g=f*l+h*(l-1));const y={...r,cols:a,component:s,gap:h,rowHeight:f,rows:l,variant:m},v=ROe(y);return k.jsx(DOe,{as:s,className:fe(v.root,v[m],i),ref:n,style:{height:g,gridColumnEnd:m!=="masonry"?`span ${a}`:void 0,gridRowEnd:m!=="masonry"?`span ${l}`:void 0,marginBottom:m==="masonry"?h:void 0,breakInside:m==="masonry"?"avoid":void 0,...c},ownerState:y,...u,children:x.Children.map(o,w=>x.isValidElement(w)?w.type==="img"||Rg(w,["Image"])?x.cloneElement(w,{className:fe(v.img,w.props.className)}):w:null)})});function kOe(e){return qe("MuiImageListItemBar",e)}Ke("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const _Oe=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Oe(n)}`,`actionPosition${Oe(o)}`],titleWrap:["titleWrap",`titleWrap${Oe(n)}`,r&&`titleWrapActionPos${Oe(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Oe(o)}`]};return Me(i,kOe,t)},$Oe=ae("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Oe(n.position)}`]]}})(dt(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),NOe=ae("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Oe(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Oe(n.actionPosition)}`]]}})(dt(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),LOe=ae("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(dt(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),FOe=ae("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(dt(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),jOe=ae("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Oe(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),BOe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,f={...r,position:c,actionPosition:i},h=_Oe(f);return k.jsxs($Oe,{ownerState:f,className:fe(h.root,a),ref:n,...u,children:[k.jsxs(NOe,{ownerState:f,className:h.titleWrap,children:[k.jsx(LOe,{className:h.title,children:l}),s?k.jsx(FOe,{className:h.subtitle,children:s}):null]}),o?k.jsx(jOe,{ownerState:f,className:h.actionIcon,children:o}):null]})}),zOe=e=>{const{classes:t,disableUnderline:n}=e,o=Me({root:["root",!n&&"underline"],input:["input"]},S1e,t);return{...t,...o}},VOe=ae(lI,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...aI(e,t),!n.disableUnderline&&t.underline]}})(dt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Kd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Kd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Kd.disabled}, .${Kd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Kd.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(er()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),HOe=ae(cI,{name:"MuiInput",slot:"Input",overridesResolver:sI})({}),uB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:f={},type:h="text",...m}=r,g=zOe(r),v={root:{ownerState:{disableUnderline:o}}},w=u??a?si(u??a,v):v,C=f.root??i.Root??VOe,E=f.input??i.Input??HOe;return k.jsx(iw,{slots:{root:C,input:E},slotProps:w,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:h,...m,classes:g})});uB.muiName="Input";function UOe(e){return qe("MuiInputAdornment",e)}const TN=Ke("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var l6;const GOe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Oe(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},qOe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Oe(o)}`,a,r&&"hiddenLabel",i&&`size${Oe(i)}`]};return Me(s,UOe,t)},WOe=ae("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:GOe})(dt(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${TN.positionStart}&:not(.${TN.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),So=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...f}=r,h=sl()||{};let m=u;u&&h.variant,h&&!m&&(m=h.variant);const g={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:s,position:c,variant:m},y=qOe(g);return k.jsx(iI.Provider,{value:null,children:k.jsx(WOe,{as:a,ownerState:g,className:fe(y.root,i),ref:n,...f,children:typeof o=="string"&&!l?k.jsx(at,{color:"textSecondary",children:o}):k.jsxs(x.Fragment,{children:[c==="start"?l6||(l6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function KOe(e){return qe("MuiInputLabel",e)}Ke("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const YOe=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="medium"&&`size${Oe(r)}`,a],asterisk:[s&&"asterisk"]},c=Me(l,KOe,t);return{...t,...c}},QOe=ae(TOe,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${X0.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(dt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),jh=x.forwardRef(function(t,n){const r=pt({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=sl();let f=a;typeof f>"u"&&u&&(f=u.filled||u.focused||u.adornedStart);const h=Nf({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),m={...r,disableAnimation:o,formControl:u,shrink:f,size:h.size,variant:h.variant,required:h.required,focused:h.focused},g=YOe(m);return k.jsx(QOe,{"data-shrink":f,ref:n,className:fe(g.root,l),...c,ownerState:m,classes:g})});function XOe(e){return qe("MuiLinearProgress",e)}Ke("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const ON=4,IN=il`
+`,dwe=typeof vN!="string"?$f`
+ animation: ${vN} 1.4s linear infinite;
+ `:null,fwe=typeof bN!="string"?$f`
+ animation: ${bN} 1.4s ease-in-out infinite;
+ `:null,pwe=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Oe(r)}`],svg:["svg"],circle:["circle",`circle${Oe(n)}`,o&&"circleDisableShrink"]};return Me(i,uwe,t)},hwe=ae("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:dwe||{animation:`${vN} 1.4s linear infinite`}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),mwe=ae("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),gwe=ae("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Oe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(dt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:fwe||{animation:`${bN} 1.4s ease-in-out infinite`}}]}))),nw=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:f="indeterminate",...p}=r,m={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:f},g=pwe(m),y={},v={},w={};if(f==="determinate"){const C=2*Math.PI*((Nd-c)/2);y.strokeDasharray=C.toFixed(3),w["aria-valuenow"]=Math.round(u),y.strokeDashoffset=`${((100-u)/100*C).toFixed(3)}px`,v.transform="rotate(-90deg)"}return k.jsx(hwe,{className:fe(g.root,o),style:{width:s,height:s,...v,...l},ownerState:m,ref:n,role:"progressbar",...w,...p,children:k.jsx(mwe,{className:g.svg,ownerState:m,viewBox:`${Nd/2} ${Nd/2} ${Nd} ${Nd}`,children:k.jsx(gwe,{className:g.circle,style:y,ownerState:m,cx:Nd,cy:Nd,r:(Nd-c)/2,fill:"none",strokeWidth:c})})})});function ywe(e){return qe("MuiIconButton",e)}const xN=Ke("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),vwe=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${Oe(r)}`,o&&`edge${Oe(o)}`,`size${Oe(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Me(s,ywe,t)},bwe=ae(la,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Oe(n.color)}`],n.edge&&t[`edge${Oe(n.edge)}`],t[`size${Oe(n.size)}`]]}})(dt(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),dt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${xN.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${xN.loading}`]:{color:"transparent"}}))),xwe=ae("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),pn=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",id:f,loading:p=null,loadingIndicator:m,...g}=r,y=bn(f),v=m??k.jsx(nw,{"aria-labelledby":y,color:"inherit",size:16}),w={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,loading:p,loadingIndicator:v,size:u},C=vwe(w);return k.jsxs(bwe,{id:p?y:f,className:fe(C.root,a),centerRipple:!0,focusRipple:!c,disabled:l||p,ref:n,...g,ownerState:w,children:[typeof p=="boolean"&&k.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:k.jsx(xwe,{className:C.loadingIndicator,ownerState:w,children:p&&v})}),i]})}),Swe=Ot(k.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),wwe=Ot(k.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),Cwe=Ot(k.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Ewe=Ot(k.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),ene=Ot(k.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),Twe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Oe(n||r)}`,`${t}${Oe(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Me(i,cwe,o)},Owe=ae(go,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Oe(n.color||n.severity)}`]]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?Vu:Hu,n=e.palette.mode==="light"?Hu:Vu;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(er(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${AG.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(er(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${AG.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(er(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),Iwe=ae("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Pwe=ae("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Awe=ae("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),MG={success:k.jsx(Swe,{fontSize:"inherit"}),warning:k.jsx(wwe,{fontSize:"inherit"}),error:k.jsx(Cwe,{fontSize:"inherit"}),info:k.jsx(Ewe,{fontSize:"inherit"})},Ei=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:f,iconMapping:p=MG,onClose:m,role:g="alert",severity:y="success",slotProps:v={},slots:w={},variant:C="standard",...E}=r,I={...r,color:l,severity:y,variant:C,colorSeverity:l||y},O=Twe(I),P={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...w},slotProps:{...u,...v}},[R,D]=wt("root",{ref:n,shouldForwardComponentProp:!0,className:fe(O.root,a),elementType:Owe,externalForwardedProps:{...P,...E},ownerState:I,additionalProps:{role:g,elevation:0}}),[M,A]=wt("icon",{className:O.icon,elementType:Iwe,externalForwardedProps:P,ownerState:I}),[_,N]=wt("message",{className:O.message,elementType:Pwe,externalForwardedProps:P,ownerState:I}),[B,H]=wt("action",{className:O.action,elementType:Awe,externalForwardedProps:P,ownerState:I}),[j,L]=wt("closeButton",{elementType:pn,externalForwardedProps:P,ownerState:I}),[V,W]=wt("closeIcon",{elementType:ene,externalForwardedProps:P,ownerState:I});return k.jsxs(R,{...D,children:[f!==!1?k.jsx(M,{...A,children:f||p[y]||MG[y]}):null,k.jsx(_,{...N,children:i}),o!=null?k.jsx(B,{...H,children:o}):null,o==null&&m?k.jsx(B,{...H,children:k.jsx(j,{size:"small","aria-label":s,title:s,color:"inherit",onClick:m,...L,children:k.jsx(V,{fontSize:"small",...W})})}):null]})});function Mwe(e){return qe("MuiTypography",e)}const QE=Ke("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),Rwe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Dwe=dSe(),kwe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Oe(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Me(s,Mwe,a)},_we=ae("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Oe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(dt(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(er()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Oe(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),RG={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},at=x.forwardRef(function(t,n){const{color:r,...o}=pt({props:t,name:"MuiTypography"}),i=!Rwe[r],a=Dwe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:f=!1,paragraph:p=!1,variant:m="body1",variantMapping:g=RG,...y}=a,v={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:f,paragraph:p,variant:m,variantMapping:g},w=c||(p?"p":g[m]||RG[m])||"span",C=kwe(v);return k.jsx(_we,{as:w,ref:n,className:fe(C.root,l),...y,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...y.style}})});function $we(e){return qe("MuiAlertTitle",e)}Ke("MuiAlertTitle",["root"]);const Nwe=e=>{const{classes:t}=e;return Me({root:["root"]},$we,t)},Lwe=ae(at,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),hh=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=Nwe(a);return k.jsx(Lwe,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:fe(s.root,o),...i})});function Fwe(e){return qe("MuiAppBar",e)}Ke("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const jwe=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Oe(t)}`,`position${Oe(n)}`]};return Me(o,Fwe,r)},DG=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Bwe=ae(go,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Oe(n.position)}`],t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(er(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?DG(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?DG(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),zwe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=jwe(c);return k.jsx(Bwe,{square:!0,component:"header",ownerState:c,elevation:4,className:fe(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function kG(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Vwe(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=kG(u));const f=u?s.filter(p=>{let m=(i||c)(p);return n&&(m=m.toLowerCase()),t&&(m=kG(m)),o==="start"?m.startsWith(u):m.includes(u)}):s;return typeof r=="number"?f.slice(0,r):f}}const Hwe=Vwe(),Uwe=5,Gwe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},qwe=[];function _G(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function Wwe(e){const{unstable_isActiveElementInListbox:t=Gwe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?qwe:null,disableClearable:f=!1,disableCloseOnSelect:p=!1,disabled:m,disabledItemsFocusable:g=!1,disableListWrap:y=!1,filterOptions:v=Hwe,filterSelectedOptions:w=!1,freeSolo:C=!1,getOptionDisabled:E,getOptionKey:I,getOptionLabel:O=He=>He.label??He,groupBy:P,handleHomeEndKeys:R=!e.freeSolo,id:D,includeInputInList:M=!1,inputValue:A,isOptionEqualToValue:_=(He,Ye)=>He===Ye,multiple:N=!1,onChange:B,onClose:H,onHighlightChange:j,onInputChange:L,onOpen:V,open:W,openOnFocus:K=!1,options:G,readOnly:q=!1,renderValue:Y,selectOnFocus:Z=!e.freeSolo,value:ie}=e,se=bn(D);let ce=O;ce=He=>{const Ye=O(He);return typeof Ye!="string"?String(Ye):Ye};const ye=x.useRef(!1),Se=x.useRef(!0),ne=x.useRef(null),le=x.useRef(null),[de,oe]=x.useState(null),[ue,pe]=x.useState(-1),Ee=o?0:-1,xe=x.useRef(Ee),Re=x.useRef(_G(u??ie,N,ce)).current,[he,Pe]=ia({controlled:ie,default:u,name:c}),[ve,Ie]=ia({controlled:A,default:Re,name:c,state:"inputValue"}),[te,Te]=x.useState(!1),De=x.useCallback((He,Ye,$t)=>{if(!(N?he.length<Ye.length:Ye!==null)&&!s)return;const Ut=_G(Ye,N,ce,Y);ve!==Ut&&(Ie(Ut),L&&L(He,Ut,$t))},[ce,ve,N,L,Ie,s,he,Y]),[Ve,We]=ia({controlled:W,default:!1,name:c,state:"open"}),[rt,ut]=x.useState(!0),Be=!N&&he!=null&&ve===ce(he),et=Ve&&!q,Le=et?v(G.filter(He=>!(w&&(N?he:[he]).some(Ye=>Ye!==null&&_(He,Ye)))),{inputValue:Be&&rt?"":ve,getOptionLabel:ce}):[],It=Fj({filteredOptions:Le,value:he,inputValue:ve});x.useEffect(()=>{const He=he!==It.value;te&&!He||C&&!He||De(null,he,"reset")},[he,De,te,It.value,C]);const Lt=Ve&&Le.length>0&&!q,nt=Je(He=>{if(He===-1)ne.current.focus();else{const Ye=Y?"data-item-index":"data-tag-index";de.querySelector(`[${Ye}="${He}"]`).focus()}});x.useEffect(()=>{N&&ue>he.length-1&&(pe(-1),nt(-1))},[he,N,ue,nt]);function lt(He,Ye){if(!le.current||He<0||He>=Le.length)return-1;let $t=He;for(;;){const hn=le.current.querySelector(`[data-option-index="${$t}"]`),Ut=g?!1:!hn||hn.disabled||hn.getAttribute("aria-disabled")==="true";if(hn&&hn.hasAttribute("tabindex")&&!Ut)return $t;if(Ye==="next"?$t=($t+1)%Le.length:$t=($t-1+Le.length)%Le.length,$t===He)return-1}}const vt=Je(({event:He,index:Ye,reason:$t})=>{if(xe.current=Ye,Ye===-1?ne.current.removeAttribute("aria-activedescendant"):ne.current.setAttribute("aria-activedescendant",`${se}-option-${Ye}`),j&&["mouse","keyboard","touch"].includes($t)&&j(He,Ye===-1?null:Le[Ye],$t),!le.current)return;const hn=le.current.querySelector(`[role="option"].${n}-focused`);hn&&(hn.classList.remove(`${n}-focused`),hn.classList.remove(`${n}-focusVisible`));let Ut=le.current;if(le.current.getAttribute("role")!=="listbox"&&(Ut=le.current.parentElement.querySelector('[role="listbox"]')),!Ut)return;if(Ye===-1){Ut.scrollTop=0;return}const Xr=le.current.querySelector(`[data-option-index="${Ye}"]`);if(Xr&&(Xr.classList.add(`${n}-focused`),$t==="keyboard"&&Xr.classList.add(`${n}-focusVisible`),Ut.scrollHeight>Ut.clientHeight&&$t!=="mouse"&&$t!=="touch")){const Jr=Xr,Vi=Ut.clientHeight+Ut.scrollTop,Jv=Jr.offsetTop+Jr.offsetHeight;Jv>Vi?Ut.scrollTop=Jv-Ut.clientHeight:Jr.offsetTop-Jr.offsetHeight*(P?1.3:0)<Ut.scrollTop&&(Ut.scrollTop=Jr.offsetTop-Jr.offsetHeight*(P?1.3:0))}}),bt=Je(({event:He,diff:Ye,direction:$t="next",reason:hn})=>{if(!et)return;const Xr=lt((()=>{const Jr=Le.length-1;if(Ye==="reset")return Ee;if(Ye==="start")return 0;if(Ye==="end")return Jr;const Vi=xe.current+Ye;return Vi<0?Vi===-1&&M?-1:y&&xe.current!==-1||Math.abs(Ye)>1?0:Jr:Vi>Jr?Vi===Jr+1&&M?-1:y||Math.abs(Ye)>1?Jr:0:Vi})(),$t);if(vt({index:Xr,reason:hn,event:He}),r&&Ye!=="reset")if(Xr===-1)ne.current.value=ve;else{const Jr=ce(Le[Xr]);ne.current.value=Jr,Jr.toLowerCase().indexOf(ve.toLowerCase())===0&&ve.length>0&&ne.current.setSelectionRange(ve.length,Jr.length)}}),vn=()=>{const He=(Ye,$t)=>{const hn=Ye?ce(Ye):"",Ut=$t?ce($t):"";return hn===Ut};if(xe.current!==-1&&It.filteredOptions&&It.filteredOptions.length!==Le.length&&It.inputValue===ve&&(N?he.length===It.value.length&&It.value.every((Ye,$t)=>ce(he[$t])===ce(Ye)):He(It.value,he))){const Ye=It.filteredOptions[xe.current];if(Ye)return Le.findIndex($t=>ce($t)===ce(Ye))}return-1},kn=x.useCallback(()=>{if(!et)return;const He=vn();if(He!==-1){xe.current=He;return}const Ye=N?he[0]:he;if(Le.length===0||Ye==null){bt({diff:"reset"});return}if(le.current){if(Ye!=null){const $t=Le[xe.current];if(N&&$t&&he.findIndex(Ut=>_($t,Ut))!==-1)return;const hn=Le.findIndex(Ut=>_(Ut,Ye));hn===-1?bt({diff:"reset"}):vt({index:hn});return}if(xe.current>=Le.length-1){vt({index:Le.length-1});return}vt({index:xe.current})}},[Le.length,N?!1:he,w,bt,vt,et,ve,N]),Rr=Je(He=>{J$(le,He),He&&kn()});x.useEffect(()=>{kn()},[kn]);const nr=He=>{Ve||(We(!0),ut(!0),V&&V(He))},Bn=(He,Ye)=>{Ve&&(We(!1),H&&H(He,Ye))},yo=(He,Ye,$t,hn)=>{if(N){if(he.length===Ye.length&&he.every((Ut,Xr)=>Ut===Ye[Xr]))return}else if(he===Ye)return;B&&B(He,Ye,$t,hn),Pe(Ye)},Oo=x.useRef(!1),oo=(He,Ye,$t="selectOption",hn="options")=>{let Ut=$t,Xr=Ye;if(N){Xr=Array.isArray(he)?he.slice():[];const Jr=Xr.findIndex(Vi=>_(Ye,Vi));Jr===-1?Xr.push(Ye):hn!=="freeSolo"&&(Xr.splice(Jr,1),Ut="removeOption")}De(He,Xr,Ut),yo(He,Xr,Ut,{option:Ye}),!p&&(!He||!He.ctrlKey&&!He.metaKey)&&Bn(He,Ut),(a===!0||a==="touch"&&Oo.current||a==="mouse"&&!Oo.current)&&ne.current.blur()};function Ii(He,Ye){if(He===-1)return-1;let $t=He;for(;;){if(Ye==="next"&&$t===he.length||Ye==="previous"&&$t===-1)return-1;const hn=Y?"data-item-index":"data-tag-index",Ut=de.querySelector(`[${hn}="${$t}"]`);if(!Ut||!Ut.hasAttribute("tabindex")||Ut.disabled||Ut.getAttribute("aria-disabled")==="true")$t+=Ye==="next"?1:-1;else return $t}}const Kt=(He,Ye)=>{if(!N)return;ve===""&&Bn(He,"toggleInput");let $t=ue;ue===-1?ve===""&&Ye==="previous"&&($t=he.length-1):($t+=Ye==="next"?1:-1,$t<0&&($t=0),$t===he.length&&($t=-1)),$t=Ii($t,Ye),pe($t),nt($t)},un=He=>{ye.current=!0,Ie(""),L&&L(He,"","clear"),yo(He,N?[]:null,"clear")},gt=He=>Ye=>{if(He.onKeyDown&&He.onKeyDown(Ye),!Ye.defaultMuiPrevented&&(ue!==-1&&!["ArrowLeft","ArrowRight"].includes(Ye.key)&&(pe(-1),nt(-1)),Ye.which!==229))switch(Ye.key){case"Home":et&&R&&(Ye.preventDefault(),bt({diff:"start",direction:"next",reason:"keyboard",event:Ye}));break;case"End":et&&R&&(Ye.preventDefault(),bt({diff:"end",direction:"previous",reason:"keyboard",event:Ye}));break;case"PageUp":Ye.preventDefault(),bt({diff:-5,direction:"previous",reason:"keyboard",event:Ye}),nr(Ye);break;case"PageDown":Ye.preventDefault(),bt({diff:Uwe,direction:"next",reason:"keyboard",event:Ye}),nr(Ye);break;case"ArrowDown":Ye.preventDefault(),bt({diff:1,direction:"next",reason:"keyboard",event:Ye}),nr(Ye);break;case"ArrowUp":Ye.preventDefault(),bt({diff:-1,direction:"previous",reason:"keyboard",event:Ye}),nr(Ye);break;case"ArrowLeft":!N&&Y?nt(0):Kt(Ye,"previous");break;case"ArrowRight":!N&&Y?nt(-1):Kt(Ye,"next");break;case"Enter":if(xe.current!==-1&&et){const $t=Le[xe.current],hn=E?E($t):!1;if(Ye.preventDefault(),hn)return;oo(Ye,$t,"selectOption"),r&&ne.current.setSelectionRange(ne.current.value.length,ne.current.value.length)}else C&&ve!==""&&Be===!1&&(N&&Ye.preventDefault(),oo(Ye,ve,"createOption","freeSolo"));break;case"Escape":et?(Ye.preventDefault(),Ye.stopPropagation(),Bn(Ye,"escape")):l&&(ve!==""||N&&he.length>0||Y)&&(Ye.preventDefault(),Ye.stopPropagation(),un(Ye));break;case"Backspace":if(N&&!q&&ve===""&&he.length>0){const $t=ue===-1?he.length-1:ue,hn=he.slice();hn.splice($t,1),yo(Ye,hn,"removeOption",{option:he[$t]})}!N&&Y&&!q&&(Pe(null),nt(-1));break;case"Delete":if(N&&!q&&ve===""&&he.length>0&&ue!==-1){const $t=ue,hn=he.slice();hn.splice($t,1),yo(Ye,hn,"removeOption",{option:he[$t]})}!N&&Y&&!q&&(Pe(null),nt(-1));break}},kt=He=>{Te(!0),K&&!ye.current&&nr(He)},Ht=He=>{if(t(le)){ne.current.focus();return}Te(!1),Se.current=!0,ye.current=!1,i&&xe.current!==-1&&et?oo(He,Le[xe.current],"blur"):i&&C&&ve!==""?oo(He,ve,"blur","freeSolo"):s&&De(He,he,"blur"),Bn(He,"blur")},Jt=He=>{const Ye=He.target.value;ve!==Ye&&(Ie(Ye),ut(!1),L&&L(He,Ye,"input")),Ye===""?!f&&!N&&yo(He,null,"clear"):nr(He)},Vn=He=>{const Ye=Number(He.currentTarget.getAttribute("data-option-index"));xe.current!==Ye&&vt({event:He,index:Ye,reason:"mouse"})},Xo=He=>{vt({event:He,index:Number(He.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Oo.current=!0},Da=He=>{const Ye=Number(He.currentTarget.getAttribute("data-option-index"));oo(He,Le[Ye],"selectOption"),Oo.current=!1},ps=He=>Ye=>{const $t=he.slice();$t.splice(He,1),yo(Ye,$t,"removeOption",{option:he[He]})},fd=He=>{yo(He,null,"removeOption",{option:he})},Pi=He=>{Ve?Bn(He,"toggleInput"):nr(He)},vo=He=>{He.currentTarget.contains(He.target)&&He.target.getAttribute("id")!==se&&He.preventDefault()},Fr=He=>{He.currentTarget.contains(He.target)&&(ne.current.focus(),Z&&Se.current&&ne.current.selectionEnd-ne.current.selectionStart===0&&ne.current.select(),Se.current=!1)},zi=He=>{!m&&(ve===""||!Ve)&&Pi(He)};let fl=C&&ve.length>0;fl=fl||(N?he.length>0:he!==null);let pl=Le;return P&&(pl=Le.reduce((He,Ye,$t)=>{const hn=P(Ye);return He.length>0&&He[He.length-1].group===hn?He[He.length-1].options.push(Ye):He.push({key:$t,index:$t,group:hn,options:[Ye]}),He},[])),m&&te&&Ht(),{getRootProps:(He={})=>({...He,onKeyDown:gt(He),onMouseDown:vo,onClick:Fr}),getInputLabelProps:()=>({id:`${se}-label`,htmlFor:se}),getInputProps:()=>({id:se,value:ve,onBlur:Ht,onFocus:kt,onChange:Jt,onMouseDown:zi,"aria-activedescendant":et?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Lt?`${se}-listbox`:void 0,"aria-expanded":Lt,autoComplete:"off",ref:ne,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:m}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:un}),getItemProps:({index:He=0}={})=>({...N&&{key:He},...Y?{"data-item-index":He}:{"data-tag-index":He},tabIndex:-1,...!q&&{onDelete:N?ps(He):fd}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Pi}),getTagProps:({index:He})=>({key:He,"data-tag-index":He,tabIndex:-1,...!q&&{onDelete:ps(He)}}),getListboxProps:()=>({role:"listbox",id:`${se}-listbox`,"aria-labelledby":`${se}-label`,ref:Rr,onMouseDown:He=>{He.preventDefault()}}),getOptionProps:({index:He,option:Ye})=>{const $t=(N?he:[he]).some(Ut=>Ut!=null&&_(Ye,Ut)),hn=E?E(Ye):!1;return{key:(I==null?void 0:I(Ye))??ce(Ye),tabIndex:-1,role:"option",id:`${se}-option-${He}`,onMouseMove:Vn,onClick:Da,onTouchStart:Xo,"data-option-index":He,"aria-disabled":hn,"aria-selected":$t}},id:se,inputValue:ve,value:he,dirty:fl,expanded:et&&de,popupOpen:et,focused:te||ue!==-1,anchorEl:de,setAnchorEl:oe,focusedItem:ue,focusedTag:ue,groupedOptions:pl}}var Ea="top",el="bottom",tl="right",Ta="left",tB="auto",rw=[Ea,el,tl,Ta],iy="start",Ex="end",Kwe="clippingParents",tne="viewport",Kb="popper",Ywe="reference",$G=rw.reduce(function(e,t){return e.concat([t+"-"+iy,t+"-"+Ex])},[]),nne=[].concat(rw,[tB]).reduce(function(e,t){return e.concat([t,t+"-"+iy,t+"-"+Ex])},[]),Qwe="beforeRead",Xwe="read",Jwe="afterRead",Zwe="beforeMain",eCe="main",tCe="afterMain",nCe="beforeWrite",rCe="write",oCe="afterWrite",iCe=[Qwe,Xwe,Jwe,Zwe,eCe,tCe,nCe,rCe,oCe];function _c(e){return e?(e.nodeName||"").toLowerCase():null}function rs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function mh(e){var t=rs(e).Element;return e instanceof t||e instanceof Element}function Ws(e){var t=rs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function nB(e){if(typeof ShadowRoot>"u")return!1;var t=rs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function aCe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Ws(i)||!_c(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function sCe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Ws(o)||!_c(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const lCe={name:"applyStyles",enabled:!0,phase:"write",fn:aCe,effect:sCe,requires:["computeStyles"]};function Oc(e){return e.split("-")[0]}var nh=Math.max,XE=Math.min,ay=Math.round;function SN(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rne(){return!/^((?!chrome|android).)*safari/i.test(SN())}function sy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Ws(e)&&(o=e.offsetWidth>0&&ay(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ay(r.height)/e.offsetHeight||1);var a=mh(e)?rs(e):window,s=a.visualViewport,l=!rne()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,f=r.width/o,p=r.height/i;return{width:f,height:p,top:u,right:c+f,bottom:u+p,left:c,x:c,y:u}}function rB(e){var t=sy(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function one(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&nB(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Uu(e){return rs(e).getComputedStyle(e)}function cCe(e){return["table","td","th"].indexOf(_c(e))>=0}function Lf(e){return((mh(e)?e.ownerDocument:e.document)||window.document).documentElement}function iI(e){return _c(e)==="html"?e:e.assignedSlot||e.parentNode||(nB(e)?e.host:null)||Lf(e)}function NG(e){return!Ws(e)||Uu(e).position==="fixed"?null:e.offsetParent}function uCe(e){var t=/firefox/i.test(SN()),n=/Trident/i.test(SN());if(n&&Ws(e)){var r=Uu(e);if(r.position==="fixed")return null}var o=iI(e);for(nB(o)&&(o=o.host);Ws(o)&&["html","body"].indexOf(_c(o))<0;){var i=Uu(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function ow(e){for(var t=rs(e),n=NG(e);n&&cCe(n)&&Uu(n).position==="static";)n=NG(n);return n&&(_c(n)==="html"||_c(n)==="body"&&Uu(n).position==="static")?t:n||uCe(e)||t}function oB(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function W0(e,t,n){return nh(e,XE(t,n))}function dCe(e,t,n){var r=W0(e,t,n);return r>n?n:r}function ine(){return{top:0,right:0,bottom:0,left:0}}function ane(e){return Object.assign({},ine(),e)}function sne(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var fCe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,ane(typeof t!="number"?t:sne(t,rw))};function pCe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Oc(n.placement),l=oB(s),c=[Ta,tl].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var f=fCe(o.padding,n),p=rB(i),m=l==="y"?Ea:Ta,g=l==="y"?el:tl,y=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],w=ow(i),C=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,E=y/2-v/2,I=f[m],O=C-p[u]-f[g],P=C/2-p[u]/2+E,R=W0(I,P,O),D=l;n.modifiersData[r]=(t={},t[D]=R,t.centerOffset=R-P,t)}}function hCe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||one(t.elements.popper,o)&&(t.elements.arrow=o))}const mCe={name:"arrow",enabled:!0,phase:"main",fn:pCe,effect:hCe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ly(e){return e.split("-")[1]}var gCe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yCe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:ay(n*o)/o||0,y:ay(r*o)/o||0}}function LG(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,p=a.x,m=p===void 0?0:p,g=a.y,y=g===void 0?0:g,v=typeof u=="function"?u({x:m,y}):{x:m,y};m=v.x,y=v.y;var w=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),E=Ta,I=Ea,O=window;if(c){var P=ow(n),R="clientHeight",D="clientWidth";if(P===rs(n)&&(P=Lf(n),Uu(P).position!=="static"&&s==="absolute"&&(R="scrollHeight",D="scrollWidth")),P=P,o===Ea||(o===Ta||o===tl)&&i===Ex){I=el;var M=f&&P===O&&O.visualViewport?O.visualViewport.height:P[R];y-=M-r.height,y*=l?1:-1}if(o===Ta||(o===Ea||o===el)&&i===Ex){E=tl;var A=f&&P===O&&O.visualViewport?O.visualViewport.width:P[D];m-=A-r.width,m*=l?1:-1}}var _=Object.assign({position:s},c&&gCe),N=u===!0?yCe({x:m,y},rs(n)):{x:m,y};if(m=N.x,y=N.y,l){var B;return Object.assign({},_,(B={},B[I]=C?"0":"",B[E]=w?"0":"",B.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",B))}return Object.assign({},_,(t={},t[I]=C?y+"px":"",t[E]=w?m+"px":"",t.transform="",t))}function vCe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Oc(t.placement),variation:ly(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LG(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LG(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const bCe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vCe,data:{}};var x1={passive:!0};function xCe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=rs(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,x1)}),s&&l.addEventListener("resize",n.update,x1),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,x1)}),s&&l.removeEventListener("resize",n.update,x1)}}const SCe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:xCe,data:{}};var wCe={left:"right",right:"left",bottom:"top",top:"bottom"};function hE(e){return e.replace(/left|right|bottom|top/g,function(t){return wCe[t]})}var CCe={start:"end",end:"start"};function FG(e){return e.replace(/start|end/g,function(t){return CCe[t]})}function iB(e){var t=rs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function aB(e){return sy(Lf(e)).left+iB(e).scrollLeft}function ECe(e,t){var n=rs(e),r=Lf(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=rne();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+aB(e),y:l}}function TCe(e){var t,n=Lf(e),r=iB(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=nh(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=nh(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+aB(e),l=-r.scrollTop;return Uu(o||n).direction==="rtl"&&(s+=nh(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function sB(e){var t=Uu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function lne(e){return["html","body","#document"].indexOf(_c(e))>=0?e.ownerDocument.body:Ws(e)&&sB(e)?e:lne(iI(e))}function K0(e,t){var n;t===void 0&&(t=[]);var r=lne(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=rs(r),a=o?[i].concat(i.visualViewport||[],sB(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(K0(iI(a)))}function wN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function OCe(e,t){var n=sy(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function jG(e,t,n){return t===tne?wN(ECe(e,n)):mh(t)?OCe(t,n):wN(TCe(Lf(e)))}function ICe(e){var t=K0(iI(e)),n=["absolute","fixed"].indexOf(Uu(e).position)>=0,r=n&&Ws(e)?ow(e):e;return mh(r)?t.filter(function(o){return mh(o)&&one(o,r)&&_c(o)!=="body"}):[]}function PCe(e,t,n,r){var o=t==="clippingParents"?ICe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=jG(e,c,r);return l.top=nh(u.top,l.top),l.right=XE(u.right,l.right),l.bottom=XE(u.bottom,l.bottom),l.left=nh(u.left,l.left),l},jG(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function cne(e){var t=e.reference,n=e.element,r=e.placement,o=r?Oc(r):null,i=r?ly(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case Ea:l={x:a,y:t.y-n.height};break;case el:l={x:a,y:t.y+t.height};break;case tl:l={x:t.x+t.width,y:s};break;case Ta:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?oB(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case iy:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Ex:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Tx(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?Kwe:s,c=n.rootBoundary,u=c===void 0?tne:c,f=n.elementContext,p=f===void 0?Kb:f,m=n.altBoundary,g=m===void 0?!1:m,y=n.padding,v=y===void 0?0:y,w=ane(typeof v!="number"?v:sne(v,rw)),C=p===Kb?Ywe:Kb,E=e.rects.popper,I=e.elements[g?C:p],O=PCe(mh(I)?I:I.contextElement||Lf(e.elements.popper),l,u,a),P=sy(e.elements.reference),R=cne({reference:P,element:E,placement:o}),D=wN(Object.assign({},E,R)),M=p===Kb?D:P,A={top:O.top-M.top+w.top,bottom:M.bottom-O.bottom+w.bottom,left:O.left-M.left+w.left,right:M.right-O.right+w.right},_=e.modifiersData.offset;if(p===Kb&&_){var N=_[o];Object.keys(A).forEach(function(B){var H=[tl,el].indexOf(B)>=0?1:-1,j=[Ea,el].indexOf(B)>=0?"y":"x";A[B]+=N[j]*H})}return A}function ACe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?nne:l,u=ly(r),f=u?s?$G:$G.filter(function(g){return ly(g)===u}):rw,p=f.filter(function(g){return c.indexOf(g)>=0});p.length===0&&(p=f);var m=p.reduce(function(g,y){return g[y]=Tx(e,{placement:y,boundary:o,rootBoundary:i,padding:a})[Oc(y)],g},{});return Object.keys(m).sort(function(g,y){return m[g]-m[y]})}function MCe(e){if(Oc(e)===tB)return[];var t=hE(e);return[FG(e),t,FG(t)]}function RCe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,g=m===void 0?!0:m,y=n.allowedAutoPlacements,v=t.options.placement,w=Oc(v),C=w===v,E=l||(C||!g?[hE(v)]:MCe(v)),I=[v].concat(E).reduce(function(ie,se){return ie.concat(Oc(se)===tB?ACe(t,{placement:se,boundary:u,rootBoundary:f,padding:c,flipVariations:g,allowedAutoPlacements:y}):se)},[]),O=t.rects.reference,P=t.rects.popper,R=new Map,D=!0,M=I[0],A=0;A<I.length;A++){var _=I[A],N=Oc(_),B=ly(_)===iy,H=[Ea,el].indexOf(N)>=0,j=H?"width":"height",L=Tx(t,{placement:_,boundary:u,rootBoundary:f,altBoundary:p,padding:c}),V=H?B?tl:Ta:B?el:Ea;O[j]>P[j]&&(V=hE(V));var W=hE(V),K=[];if(i&&K.push(L[N]<=0),s&&K.push(L[V]<=0,L[W]<=0),K.every(function(ie){return ie})){M=_,D=!1;break}R.set(_,K)}if(D)for(var G=g?3:1,q=function(se){var ce=I.find(function(ye){var Se=R.get(ye);if(Se)return Se.slice(0,se).every(function(ne){return ne})});if(ce)return M=ce,"break"},Y=G;Y>0;Y--){var Z=q(Y);if(Z==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const DCe={name:"flip",enabled:!0,phase:"main",fn:RCe,requiresIfExists:["offset"],data:{_skip:!1}};function BG(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function zG(e){return[Ea,tl,el,Ta].some(function(t){return e[t]>=0})}function kCe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Tx(t,{elementContext:"reference"}),s=Tx(t,{altBoundary:!0}),l=BG(a,r),c=BG(s,o,i),u=zG(l),f=zG(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const _Ce={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:kCe};function $Ce(e,t,n){var r=Oc(e),o=[Ta,Ea].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Ta,tl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function NCe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=nne.reduce(function(u,f){return u[f]=$Ce(f,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const LCe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:NCe};function FCe(e){var t=e.state,n=e.name;t.modifiersData[n]=cne({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const jCe={name:"popperOffsets",enabled:!0,phase:"read",fn:FCe,data:{}};function BCe(e){return e==="x"?"y":"x"}function zCe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,g=n.tetherOffset,y=g===void 0?0:g,v=Tx(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),w=Oc(t.placement),C=ly(t.placement),E=!C,I=oB(w),O=BCe(I),P=t.modifiersData.popperOffsets,R=t.rects.reference,D=t.rects.popper,M=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,A=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(P){if(i){var B,H=I==="y"?Ea:Ta,j=I==="y"?el:tl,L=I==="y"?"height":"width",V=P[I],W=V+v[H],K=V-v[j],G=m?-D[L]/2:0,q=C===iy?R[L]:D[L],Y=C===iy?-D[L]:-R[L],Z=t.elements.arrow,ie=m&&Z?rB(Z):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ine(),ce=se[H],ye=se[j],Se=W0(0,R[L],ie[L]),ne=E?R[L]/2-G-Se-ce-A.mainAxis:q-Se-ce-A.mainAxis,le=E?-R[L]/2+G+Se+ye+A.mainAxis:Y+Se+ye+A.mainAxis,de=t.elements.arrow&&ow(t.elements.arrow),oe=de?I==="y"?de.clientTop||0:de.clientLeft||0:0,ue=(B=_==null?void 0:_[I])!=null?B:0,pe=V+ne-ue-oe,Ee=V+le-ue,xe=W0(m?XE(W,pe):W,V,m?nh(K,Ee):K);P[I]=xe,N[I]=xe-V}if(s){var Re,he=I==="x"?Ea:Ta,Pe=I==="x"?el:tl,ve=P[O],Ie=O==="y"?"height":"width",te=ve+v[he],Te=ve-v[Pe],De=[Ea,Ta].indexOf(w)!==-1,Ve=(Re=_==null?void 0:_[O])!=null?Re:0,We=De?te:ve-R[Ie]-D[Ie]-Ve+A.altAxis,rt=De?ve+R[Ie]+D[Ie]-Ve-A.altAxis:Te,ut=m&&De?dCe(We,ve,rt):W0(m?We:te,ve,m?rt:Te);P[O]=ut,N[O]=ut-ve}t.modifiersData[r]=N}}const VCe={name:"preventOverflow",enabled:!0,phase:"main",fn:zCe,requiresIfExists:["offset"]};function HCe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function UCe(e){return e===rs(e)||!Ws(e)?iB(e):HCe(e)}function GCe(e){var t=e.getBoundingClientRect(),n=ay(t.width)/e.offsetWidth||1,r=ay(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qCe(e,t,n){n===void 0&&(n=!1);var r=Ws(t),o=Ws(t)&&GCe(t),i=Lf(t),a=sy(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((_c(t)!=="body"||sB(i))&&(s=UCe(t)),Ws(t)?(l=sy(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=aB(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function WCe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function KCe(e){var t=WCe(e);return iCe.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function YCe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function QCe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var VG={placement:"bottom",modifiers:[],strategy:"absolute"};function HG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function XCe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?VG:o;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},VG,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],p=!1,m={state:u,setOptions:function(w){var C=typeof w=="function"?w(u.options):w;y(),u.options=Object.assign({},i,u.options,C),u.scrollParents={reference:mh(s)?K0(s):s.contextElement?K0(s.contextElement):[],popper:K0(l)};var E=KCe(QCe([].concat(r,u.options.modifiers)));return u.orderedModifiers=E.filter(function(I){return I.enabled}),g(),m.update()},forceUpdate:function(){if(!p){var w=u.elements,C=w.reference,E=w.popper;if(HG(C,E)){u.rects={reference:qCe(C,ow(E),u.options.strategy==="fixed"),popper:rB(E)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(A){return u.modifiersData[A.name]=Object.assign({},A.data)});for(var I=0;I<u.orderedModifiers.length;I++){if(u.reset===!0){u.reset=!1,I=-1;continue}var O=u.orderedModifiers[I],P=O.fn,R=O.options,D=R===void 0?{}:R,M=O.name;typeof P=="function"&&(u=P({state:u,options:D,name:M,instance:m})||u)}}}},update:YCe(function(){return new Promise(function(v){m.forceUpdate(),v(u)})}),destroy:function(){y(),p=!0}};if(!HG(s,l))return m;m.setOptions(c).then(function(v){!p&&c.onFirstUpdate&&c.onFirstUpdate(v)});function g(){u.orderedModifiers.forEach(function(v){var w=v.name,C=v.options,E=C===void 0?{}:C,I=v.effect;if(typeof I=="function"){var O=I({state:u,name:w,instance:m,options:E}),P=function(){};f.push(O||P)}})}function y(){f.forEach(function(v){return v()}),f=[]}return m}}var JCe=[SCe,jCe,bCe,lCe,LCe,DCe,VCe,mCe,_Ce],ZCe=XCe({defaultModifiers:JCe});function e1e(e){return typeof e=="function"?e():e}const une=x.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,s]=x.useState(null),l=en(x.isValidElement(r)?Nf(r):null,n);if(In(()=>{i||s(e1e(o)||document.body)},[o,i]),In(()=>{if(a&&!i)return J$(n,a),()=>{J$(n,null)}},[n,a,i]),i){if(x.isValidElement(r)){const c={ref:l};return x.cloneElement(r,c)}return r}return a&&ew.createPortal(r,a)});function t1e(e){return qe("MuiPopper",e)}Ke("MuiPopper",["root"]);function n1e(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function CN(e){return typeof e=="function"?e():e}function r1e(e){return e.nodeType!==void 0}const o1e=e=>{const{classes:t}=e;return Me({root:["root"]},t1e,t)},i1e={},a1e=x.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:f,slotProps:p={},slots:m={},TransitionProps:g,ownerState:y,...v}=t,w=x.useRef(null),C=en(w,n),E=x.useRef(null),I=en(E,f),O=x.useRef(I);In(()=>{O.current=I},[I]),x.useImperativeHandle(f,()=>E.current,[]);const P=n1e(c,i),[R,D]=x.useState(P),[M,A]=x.useState(CN(r));x.useEffect(()=>{E.current&&E.current.forceUpdate()}),x.useEffect(()=>{r&&A(CN(r))},[r]),In(()=>{if(!M||!l)return;const j=W=>{D(W.placement)};let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{j(W)}}];s!=null&&(L=L.concat(s)),u&&u.modifiers!=null&&(L=L.concat(u.modifiers));const V=ZCe(M,w.current,{placement:P,...u,modifiers:L});return O.current(V),()=>{V.destroy(),O.current(null)}},[M,a,s,l,u,P]);const _={placement:R};g!==null&&(_.TransitionProps=g);const N=o1e(t),B=m.root??"div",H=Dn({elementType:B,externalSlotProps:p.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:C},ownerState:t,className:N.root});return k.jsx(B,{...H,children:typeof o=="function"?o(_):o})}),s1e=x.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:f="bottom",popperOptions:p=i1e,popperRef:m,style:g,transition:y=!1,slotProps:v={},slots:w={},...C}=t,[E,I]=x.useState(!0),O=()=>{I(!1)},P=()=>{I(!0)};if(!l&&!u&&(!y||E))return null;let R;if(i)R=i;else if(r){const A=CN(r);R=A&&r1e(A)?Mr(A).body:Mr(null).body}const D=!u&&l&&(!y||E)?"none":void 0,M=y?{in:u,onEnter:O,onExited:P}:void 0;return k.jsx(une,{disablePortal:s,container:R,children:k.jsx(a1e,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:y?!E:u,placement:f,popperOptions:p,popperRef:m,slotProps:v,slots:w,...C,style:{position:"fixed",top:0,left:0,display:D,...g},TransitionProps:M,children:o})})}),l1e=ae(s1e,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),lv=x.forwardRef(function(t,n){const r=vr(),o=pt({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:f,modifiers:p,open:m,placement:g,popperOptions:y,popperRef:v,transition:w,slots:C,slotProps:E,...I}=o,O=(C==null?void 0:C.root)??(s==null?void 0:s.Root),P={anchorEl:i,container:c,disablePortal:u,keepMounted:f,modifiers:p,open:m,placement:g,popperOptions:y,popperRef:v,transition:w,...I};return k.jsx(l1e,{as:a,direction:r?"rtl":"ltr",slots:{root:O},slotProps:E??l,...P,ref:n})});function c1e(e){return qe("MuiListSubheader",e)}Ke("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const u1e=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Oe(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Me(a,c1e,t)},d1e=ae("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Oe(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(dt(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),EN=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,f={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},p=u1e(f);return k.jsx(d1e,{as:a,className:fe(p.root,o),ref:n,ownerState:f,...u})});EN&&(EN.muiSkipListHighlight=!0);const f1e=Ot(k.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function p1e(e){return qe("MuiChip",e)}const jn=Ke("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),h1e=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Oe(r)}`,`color${Oe(o)}`,s&&"clickable",s&&`clickableColor${Oe(o)}`,a&&"deletable",a&&`deletableColor${Oe(o)}`,`${l}${Oe(o)}`],label:["label",`label${Oe(r)}`],avatar:["avatar",`avatar${Oe(r)}`,`avatarColor${Oe(o)}`],icon:["icon",`icon${Oe(r)}`,`iconColor${Oe(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Oe(r)}`,`deleteIconColor${Oe(o)}`,`deleteIcon${Oe(l)}Color${Oe(o)}`]};return Me(c,p1e,t)},m1e=ae("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${jn.avatar}`]:t.avatar},{[`& .${jn.avatar}`]:t[`avatar${Oe(s)}`]},{[`& .${jn.avatar}`]:t[`avatarColor${Oe(r)}`]},{[`& .${jn.icon}`]:t.icon},{[`& .${jn.icon}`]:t[`icon${Oe(s)}`]},{[`& .${jn.icon}`]:t[`iconColor${Oe(o)}`]},{[`& .${jn.deleteIcon}`]:t.deleteIcon},{[`& .${jn.deleteIcon}`]:t[`deleteIcon${Oe(s)}`]},{[`& .${jn.deleteIcon}`]:t[`deleteIconColor${Oe(r)}`]},{[`& .${jn.deleteIcon}`]:t[`deleteIcon${Oe(l)}Color${Oe(r)}`]},t.root,t[`size${Oe(s)}`],t[`color${Oe(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Oe(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Oe(r)}`],t[l],t[`${l}${Oe(r)}`]]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${jn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${jn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${jn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${jn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${jn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${jn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${jn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Nt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Nt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${jn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${jn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(er(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${jn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:Nt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${jn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${jn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${jn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(er(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${jn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${jn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(er(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${jn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${jn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${jn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${jn.avatar}`]:{marginLeft:4},[`& .${jn.avatarSmall}`]:{marginLeft:2},[`& .${jn.icon}`]:{marginLeft:4},[`& .${jn.iconSmall}`]:{marginLeft:2},[`& .${jn.deleteIcon}`]:{marginRight:5},[`& .${jn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(er()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:Nt(e.palette[n].main,.7)}`,[`&.${jn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${jn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${jn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:Nt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),g1e=ae("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Oe(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function UG(e){return e.key==="Backspace"||e.key==="Delete"}const nl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:f,label:p,onClick:m,onDelete:g,onKeyDown:y,onKeyUp:v,size:w="medium",variant:C="filled",tabIndex:E,skipFocusWhenDisabled:I=!1,...O}=r,P=x.useRef(null),R=en(P,n),D=K=>{K.stopPropagation(),g&&g(K)},M=K=>{K.currentTarget===K.target&&UG(K)&&K.preventDefault(),y&&y(K)},A=K=>{K.currentTarget===K.target&&g&&UG(K)&&g(K),v&&v(K)},_=a!==!1&&m?!0:a,N=_||g?la:l||"div",B={...r,component:N,disabled:u,size:w,color:s,iconColor:x.isValidElement(f)&&f.props.color||s,onDelete:!!g,clickable:_,variant:C},H=h1e(B),j=N===la?{component:l||"div",focusVisibleClassName:H.focusVisible,...g&&{disableRipple:!0}}:{};let L=null;g&&(L=c&&x.isValidElement(c)?x.cloneElement(c,{className:fe(c.props.className,H.deleteIcon),onClick:D}):k.jsx(f1e,{className:fe(H.deleteIcon),onClick:D}));let V=null;o&&x.isValidElement(o)&&(V=x.cloneElement(o,{className:fe(H.avatar,o.props.className)}));let W=null;return f&&x.isValidElement(f)&&(W=x.cloneElement(f,{className:fe(H.icon,f.props.className)})),k.jsxs(m1e,{as:N,className:fe(H.root,i),disabled:_&&u?!0:void 0,onClick:m,onKeyDown:M,onKeyUp:A,ref:R,tabIndex:I&&u?-1:E,ownerState:B,...j,...O,children:[V||W,k.jsx(g1e,{className:fe(H.label),ownerState:B,children:p}),L]})});function S1(e){return parseInt(e,10)||0}const y1e={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function v1e(e){for(const t in e)return!1;return!0}function GG(e){return v1e(e)||e.outerHeightStyle===0&&!e.overflowing}const b1e=x.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=x.useRef(s!=null),u=x.useRef(null),f=en(n,u),p=x.useRef(null),m=x.useRef(null),g=x.useCallback(()=>{const E=u.current,I=m.current;if(!E||!I)return;const P=ns(E).getComputedStyle(E);if(P.width==="0px")return{outerHeightStyle:0,overflowing:!1};I.style.width=P.width,I.value=E.value||t.placeholder||"x",I.value.slice(-1)===`
+`&&(I.value+=" ");const R=P.boxSizing,D=S1(P.paddingBottom)+S1(P.paddingTop),M=S1(P.borderBottomWidth)+S1(P.borderTopWidth),A=I.scrollHeight;I.value="x";const _=I.scrollHeight;let N=A;i&&(N=Math.max(Number(i)*_,N)),o&&(N=Math.min(Number(o)*_,N)),N=Math.max(N,_);const B=N+(R==="border-box"?D+M:0),H=Math.abs(N-A)<=1;return{outerHeightStyle:B,overflowing:H}},[o,i,t.placeholder]),y=Je(()=>{const E=u.current,I=g();if(!E||!I||GG(I))return!1;const O=I.outerHeightStyle;return p.current!=null&&p.current!==O}),v=x.useCallback(()=>{const E=u.current,I=g();if(!E||!I||GG(I))return;const O=I.outerHeightStyle;p.current!==O&&(p.current=O,E.style.height=`${O}px`),E.style.overflow=I.overflowing?"hidden":""},[g]),w=x.useRef(-1);In(()=>{const E=Lh(v),I=u==null?void 0:u.current;if(!I)return;const O=ns(I);O.addEventListener("resize",E);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(()=>{y()&&(P.unobserve(I),cancelAnimationFrame(w.current),v(),w.current=requestAnimationFrame(()=>{P.observe(I)}))}),P.observe(I)),()=>{E.clear(),cancelAnimationFrame(w.current),O.removeEventListener("resize",E),P&&P.disconnect()}},[g,v,y]),In(()=>{v()});const C=E=>{c||v(),r&&r(E)};return k.jsxs(x.Fragment,{children:[k.jsx("textarea",{value:s,onChange:C,ref:f,rows:i,style:a,...l}),k.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:{...y1e.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Ox(e){return typeof e=="string"}function Ff({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const aI=x.createContext(void 0);function cl(){return x.useContext(aI)}function qG(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function JE(e,t=!1){return e&&(qG(e.value)&&e.value!==""||t&&qG(e.defaultValue)&&e.defaultValue!=="")}function x1e(e){return e.startAdornment}function S1e(e){return qe("MuiInputBase",e)}const xi=Ke("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var WG;const sI=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Oe(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},lI=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},w1e=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:p,startAdornment:m,type:g}=e,y={root:["root",`color${Oe(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&p!=="medium"&&`size${Oe(p)}`,u&&"multiline",m&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",g==="search"&&"inputTypeSearch",u&&"inputMultiline",p==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return Me(y,S1e,t)},cI=ae("div",{name:"MuiInputBase",slot:"Root",overridesResolver:sI})(dt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${xi.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),uI=ae("input",{name:"MuiInputBase",slot:"Input",overridesResolver:lI})(dt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${xi.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${xi.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),KG=uSe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),iw=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:f,disabled:p,disableInjectingGlobalStyles:m,endAdornment:g,error:y,fullWidth:v=!1,id:w,inputComponent:C="input",inputProps:E={},inputRef:I,margin:O,maxRows:P,minRows:R,multiline:D=!1,name:M,onBlur:A,onChange:_,onClick:N,onFocus:B,onKeyDown:H,onKeyUp:j,placeholder:L,readOnly:V,renderSuffix:W,rows:K,size:G,slotProps:q={},slots:Y={},startAdornment:Z,type:ie="text",value:se,...ce}=r,ye=E.value!=null?E.value:se,{current:Se}=x.useRef(ye!=null),ne=x.useRef(),le=x.useCallback(Le=>{},[]),de=en(ne,I,E.ref,le),[oe,ue]=x.useState(!1),pe=cl(),Ee=Ff({props:r,muiFormControl:pe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ee.focused=pe?pe.focused:oe,x.useEffect(()=>{!pe&&p&&oe&&(ue(!1),A&&A())},[pe,p,oe,A]);const xe=pe&&pe.onFilled,Re=pe&&pe.onEmpty,he=x.useCallback(Le=>{JE(Le)?xe&&xe():Re&&Re()},[xe,Re]);In(()=>{Se&&he({value:ye})},[ye,he,Se]);const Pe=Le=>{B&&B(Le),E.onFocus&&E.onFocus(Le),pe&&pe.onFocus?pe.onFocus(Le):ue(!0)},ve=Le=>{A&&A(Le),E.onBlur&&E.onBlur(Le),pe&&pe.onBlur?pe.onBlur(Le):ue(!1)},Ie=(Le,...It)=>{if(!Se){const Lt=Le.target||ne.current;if(Lt==null)throw new Error(zu(1));he({value:Lt.value})}E.onChange&&E.onChange(Le,...It),_&&_(Le,...It)};x.useEffect(()=>{he(ne.current)},[]);const te=Le=>{ne.current&&Le.currentTarget===Le.target&&ne.current.focus(),N&&N(Le)};let Te=C,De=E;D&&Te==="input"&&(K?De={type:void 0,minRows:K,maxRows:K,...De}:De={type:void 0,maxRows:P,minRows:R,...De},Te=b1e);const Ve=Le=>{he(Le.animationName==="mui-auto-fill-cancel"?ne.current:{value:"x"})};x.useEffect(()=>{pe&&pe.setAdornedStart(!!Z)},[pe,Z]);const We={...r,color:Ee.color||"primary",disabled:Ee.disabled,endAdornment:g,error:Ee.error,focused:Ee.focused,formControl:pe,fullWidth:v,hiddenLabel:Ee.hiddenLabel,multiline:D,size:Ee.size,startAdornment:Z,type:ie},rt=w1e(We),ut=Y.root||c.Root||cI,Be=q.root||u.root||{},et=Y.input||c.Input||uI;return De={...De,...q.input??u.input},k.jsxs(x.Fragment,{children:[!m&&typeof KG=="function"&&(WG||(WG=k.jsx(KG,{}))),k.jsxs(ut,{...Be,ref:n,onClick:te,...ce,...!Ox(ut)&&{ownerState:{...We,...Be.ownerState}},className:fe(rt.root,Be.className,s,V&&"MuiInputBase-readOnly"),children:[Z,k.jsx(aI.Provider,{value:null,children:k.jsx(et,{"aria-invalid":Ee.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:f,disabled:Ee.disabled,id:w,onAnimationStart:Ve,name:M,placeholder:L,readOnly:V,required:Ee.required,rows:K,value:ye,onKeyDown:H,onKeyUp:j,type:ie,...De,...!Ox(et)&&{as:Te,ownerState:{...We,...De.ownerState}},ref:de,className:fe(rt.input,De.className,V&&"MuiInputBase-readOnly"),onBlur:ve,onChange:Ie,onFocus:Pe})}),g,W?W({...Ee,startAdornment:Z}):null]})]})});function C1e(e){return qe("MuiInput",e)}const Qd={...xi,...Ke("MuiInput",["root","underline","input"])};function E1e(e){return qe("MuiOutlinedInput",e)}const Rs={...xi,...Ke("MuiOutlinedInput",["root","notchedOutline","input"])};function T1e(e){return qe("MuiFilledInput",e)}const Ua={...xi,...Ke("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},dne=Ot(k.jsx("path",{d:"M7 10l5 5 5-5z"}));function O1e(e){return qe("MuiAutocomplete",e)}const Mn=Ke("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var YG,QG;const I1e=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,f={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Oe(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Me(f,O1e,t)},P1e=ae("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Mn.tag}`]:t.tag},{[`& .${Mn.tag}`]:t[`tagSize${Oe(s)}`]},{[`& .${Mn.inputRoot}`]:t.inputRoot},{[`& .${Mn.input}`]:t.input},{[`& .${Mn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Mn.focused} .${Mn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Mn.clearIndicator}`]:{visibility:"visible"}},[`& .${Mn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Mn.inputRoot}`]:{[`.${Mn.hasPopupIcon}&, .${Mn.hasClearIcon}&`]:{paddingRight:30},[`.${Mn.hasPopupIcon}.${Mn.hasClearIcon}&`]:{paddingRight:56},[`& .${Mn.input}`]:{width:0,minWidth:30}},[`& .${Qd.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Qd.root}.${xi.sizeSmall}`]:{[`& .${Qd.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Rs.root}`]:{padding:9,[`.${Mn.hasPopupIcon}&, .${Mn.hasClearIcon}&`]:{paddingRight:39},[`.${Mn.hasPopupIcon}.${Mn.hasClearIcon}&`]:{paddingRight:65},[`& .${Mn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Mn.endAdornment}`]:{right:9}},[`& .${Rs.root}.${xi.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Mn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Ua.root}`]:{paddingTop:19,paddingLeft:8,[`.${Mn.hasPopupIcon}&, .${Mn.hasClearIcon}&`]:{paddingRight:39},[`.${Mn.hasPopupIcon}.${Mn.hasClearIcon}&`]:{paddingRight:65},[`& .${Ua.input}`]:{padding:"7px 4px"},[`& .${Mn.endAdornment}`]:{right:9}},[`& .${Ua.root}.${xi.sizeSmall}`]:{paddingBottom:1,[`& .${Ua.input}`]:{padding:"2.5px 4px"}},[`& .${xi.hiddenLabel}`]:{paddingTop:8},[`& .${Ua.root}.${xi.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Mn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Ua.root}.${xi.hiddenLabel}.${xi.sizeSmall}`]:{[`& .${Mn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Mn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Mn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Mn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Mn.inputRoot}`]:{flexWrap:"wrap"}}}]}),A1e=ae("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),M1e=ae(pn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),R1e=ae(pn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),D1e=ae(lv,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Mn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),k1e=ae(go,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(dt(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),_1e=ae("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),$1e=ae("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),N1e=ae("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(dt(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Mn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Mn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),L1e=ae(EN,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(dt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),F1e=ae("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Mn.option}`]:{paddingLeft:24}}),$c=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=YG||(YG=k.jsx(ene,{fontSize:"small"})),clearOnBlur:f=!r.freeSolo,clearOnEscape:p=!1,clearText:m="Clear",closeText:g="Close",componentsProps:y,defaultValue:v=r.multiple?[]:null,disableClearable:w=!1,disableCloseOnSelect:C=!1,disabled:E=!1,disabledItemsFocusable:I=!1,disableListWrap:O=!1,disablePortal:P=!1,filterOptions:R,filterSelectedOptions:D=!1,forcePopupIcon:M="auto",freeSolo:A=!1,fullWidth:_=!1,getLimitTagsText:N=Hn=>`+${Hn}`,getOptionDisabled:B,getOptionKey:H,getOptionLabel:j,isOptionEqualToValue:L,groupBy:V,handleHomeEndKeys:W=!r.freeSolo,id:K,includeInputInList:G=!1,inputValue:q,limitTags:Y=-1,ListboxComponent:Z,ListboxProps:ie,loading:se=!1,loadingText:ce="Loading…",multiple:ye=!1,noOptionsText:Se="No options",onChange:ne,onClose:le,onHighlightChange:de,onInputChange:oe,onOpen:ue,open:pe,openOnFocus:Ee=!1,openText:xe="Open",options:Re,PaperComponent:he,PopperComponent:Pe,popupIcon:ve=QG||(QG=k.jsx(dne,{})),readOnly:Ie=!1,renderGroup:te,renderInput:Te,renderOption:De,renderTags:Ve,renderValue:We,selectOnFocus:rt=!r.freeSolo,size:ut="medium",slots:Be={},slotProps:et={},value:Le,...It}=r,{getRootProps:Lt,getInputProps:nt,getInputLabelProps:lt,getPopupIndicatorProps:vt,getClearProps:bt,getItemProps:vn,getListboxProps:kn,getOptionProps:Rr,value:nr,dirty:Bn,expanded:yo,id:Oo,popupOpen:oo,focused:Ii,focusedItem:Kt,anchorEl:un,setAnchorEl:gt,inputValue:kt,groupedOptions:Ht}=Wwe({...r,componentName:"Autocomplete"}),Jt=!w&&!E&&Bn&&!Ie,Vn=(!A||M===!0)&&M!==!1,{onMouseDown:Xo}=nt(),{ref:Da,...ps}=kn(),Pi=j||(Hn=>Hn.label??Hn),vo={...r,disablePortal:P,expanded:yo,focused:Ii,fullWidth:_,getOptionLabel:Pi,hasClearIcon:Jt,hasPopupIcon:Vn,inputFocused:Kt===-1,popupOpen:oo,size:ut},Fr=I1e(vo),zi={slots:{paper:he,popper:Pe,...Be},slotProps:{chip:l,listbox:ie,...y,...et}},[fl,pl]=wt("listbox",{elementType:N1e,externalForwardedProps:zi,ownerState:vo,className:Fr.listbox,additionalProps:ps,ref:Da}),[He,Ye]=wt("paper",{elementType:go,externalForwardedProps:zi,ownerState:vo,className:Fr.paper}),[$t,hn]=wt("popper",{elementType:lv,externalForwardedProps:zi,ownerState:vo,className:Fr.popper,additionalProps:{disablePortal:P,style:{width:un?un.clientWidth:null},role:"presentation",anchorEl:un,open:oo}});let Ut;const Xr=Hn=>({className:Fr.tag,disabled:E,...vn(Hn)});if(Ve&&ye&&nr.length>0?Ut=Ve(nr,Xr,vo):We&&nr?Ut=We(nr,Xr,vo):ye&&nr.length>0&&(Ut=nr.map((Hn,Hi)=>{const{key:hs,...tu}=Xr({index:Hi});return k.jsx(nl,{label:Pi(Hn),size:ut,...tu,...zi.slotProps.chip},hs)})),Y>-1&&Array.isArray(Ut)){const Hn=Ut.length-Y;!Ii&&Hn>0&&(Ut=Ut.splice(0,Y),Ut.push(k.jsx("span",{className:Fr.tag,children:N(Hn)},Ut.length)))}const Vi=te||(Hn=>k.jsxs("li",{children:[k.jsx(L1e,{className:Fr.groupLabel,ownerState:vo,component:"div",children:Hn.group}),k.jsx(F1e,{className:Fr.groupUl,ownerState:vo,children:Hn.children})]},Hn.key)),rm=De||((Hn,Hi)=>{const{key:hs,...tu}=Hn;return k.jsx("li",{...tu,children:Pi(Hi)},hs)}),Zf=(Hn,Hi)=>{const hs=Rr({option:Hn,index:Hi});return rm({...hs,className:Fr.option},Hn,{selected:hs["aria-selected"],index:Hi,inputValue:kt},vo)},ca=zi.slotProps.clearIndicator,pd=zi.slotProps.popupIndicator;return k.jsxs(x.Fragment,{children:[k.jsx(P1e,{ref:n,className:fe(Fr.root,c),ownerState:vo,...Lt(It),children:Te({id:Oo,disabled:E,fullWidth:!0,size:ut==="small"?"small":void 0,InputLabelProps:lt(),InputProps:{ref:gt,className:Fr.inputRoot,startAdornment:Ut,onMouseDown:Hn=>{Hn.target===Hn.currentTarget&&Xo(Hn)},...(Jt||Vn)&&{endAdornment:k.jsxs(A1e,{className:Fr.endAdornment,ownerState:vo,children:[Jt?k.jsx(M1e,{...bt(),"aria-label":m,title:m,ownerState:vo,...ca,className:fe(Fr.clearIndicator,ca==null?void 0:ca.className),children:u}):null,Vn?k.jsx(R1e,{...vt(),disabled:E,"aria-label":oo?g:xe,title:oo?g:xe,ownerState:vo,...pd,className:fe(Fr.popupIndicator,pd==null?void 0:pd.className),children:ve}):null]})}},inputProps:{className:Fr.input,disabled:E,readOnly:Ie,...nt()}})}),un?k.jsx(D1e,{as:$t,...hn,children:k.jsxs(k1e,{as:He,...Ye,children:[se&&Ht.length===0?k.jsx(_1e,{className:Fr.loading,ownerState:vo,children:ce}):null,Ht.length===0&&!A&&!se?k.jsx($1e,{className:Fr.noOptions,ownerState:vo,role:"presentation",onMouseDown:Hn=>{Hn.preventDefault()},children:Se}):null,Ht.length>0?k.jsx(fl,{as:Z,...pl,children:Ht.map((Hn,Hi)=>V?Vi({key:Hn.key,group:Hn.group,children:Hn.options.map((hs,tu)=>Zf(hs,Hn.index+tu))}):Zf(Hn,Hi))}):null]})}):null]})}),j1e=Ot(k.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function B1e(e){return qe("MuiAvatar",e)}const z1e=Ke("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),V1e=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Me({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},B1e,t)},H1e=ae("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(dt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),U1e=ae("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),G1e=ae(j1e,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function q1e({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=x.useState(!1);return x.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const Yl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:f,src:p,srcSet:m,variant:g="circular",...y}=r;let v=null;const w={...r,component:s,variant:g},C=q1e({...u,...typeof c.img=="function"?c.img(w):c.img,src:p,srcSet:m}),E=p||m,I=E&&C!=="error";w.colorDefault=!I,delete w.ownerState;const O=V1e(w),[P,R]=wt("img",{className:O.img,elementType:U1e,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:p,srcSet:m,sizes:f},ownerState:w});return I?v=k.jsx(P,{...R}):i||i===0?v=i:E&&o?v=o[0]:v=k.jsx(G1e,{ownerState:w,className:O.fallback}),k.jsx(H1e,{as:s,className:fe(O.root,a),ref:n,...y,ownerState:w,children:v})});function W1e(e){return qe("MuiAvatarGroup",e)}const K1e=Ke("MuiAvatarGroup",["root","avatar"]),PR={small:-16,medium:-8},Y1e=e=>{const{classes:t}=e;return Me({root:["root"],avatar:["avatar"]},W1e,t)},Q1e=ae("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>[{[`& .${K1e.avatar}`]:t.avatar},t.root]})(dt(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${z1e.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),X1e=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:f={},spacing:p="medium",total:m,variant:g="circular",...y}=r;let v=l<2?2:l;const w={...r,max:l,spacing:p,component:a,variant:g},C=Y1e(w),E=x.Children.toArray(o).filter(N=>x.isValidElement(N)),I=m||E.length;I===v&&(v+=1),v=Math.min(I+1,v);const O=Math.min(E.length,v-1),P=Math.max(I-v,I-O,0),R=c?c(P):`+${P}`;let D;w.spacing&&PR[w.spacing]!==void 0?D=PR[w.spacing]:w.spacing===0?D=0:D=-w.spacing||PR.medium;const M={slots:f,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[A,_]=wt("surplus",{elementType:Yl,externalForwardedProps:M,className:C.avatar,ownerState:w,additionalProps:{variant:g}});return k.jsxs(Q1e,{as:a,ownerState:w,className:fe(C.root,i),ref:n,...y,style:{"--AvatarGroup-spacing":`${D}px`,...y.style},children:[P?k.jsx(A,{..._,children:R}):null,E.slice(0,O).reverse().map(N=>x.cloneElement(N,{className:fe(N.props.className,C.avatar),variant:N.props.variant||g}))]})}),J1e={entering:{opacity:1},entered:{opacity:1}},gh=x.forwardRef(function(t,n){const r=Lr(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:f,onEntering:p,onExit:m,onExited:g,onExiting:y,style:v,timeout:w=o,TransitionComponent:C=as,...E}=t,I=x.useRef(null),O=en(I,Nf(s),n),P=H=>j=>{if(H){const L=I.current;j===void 0?H(L):H(L,j)}},R=P(p),D=P((H,j)=>{Xj(H);const L=Of({style:v,timeout:w,easing:l},{mode:"enter"});H.style.webkitTransition=r.transitions.create("opacity",L),H.style.transition=r.transitions.create("opacity",L),u&&u(H,j)}),M=P(f),A=P(y),_=P(H=>{const j=Of({style:v,timeout:w,easing:l},{mode:"exit"});H.style.webkitTransition=r.transitions.create("opacity",j),H.style.transition=r.transitions.create("opacity",j),m&&m(H)}),N=P(g),B=H=>{i&&i(I.current,H)};return k.jsx(C,{appear:a,in:c,nodeRef:I,onEnter:D,onEntered:M,onEntering:R,onExit:_,onExited:N,onExiting:A,addEndListener:B,timeout:w,...E,children:(H,{ownerState:j,...L})=>x.cloneElement(s,{style:{opacity:0,visibility:H==="exited"&&!c?"hidden":void 0,...J1e[H],...v,...s.props.style},ref:O,...L})})});function Z1e(e){return qe("MuiBackdrop",e)}Ke("MuiBackdrop",["root","invisible"]);const eEe=e=>{const{classes:t,invisible:n}=e;return Me({root:["root",n&&"invisible"]},Z1e,t)},tEe=ae("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),fne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:f={},slots:p={},TransitionComponent:m,transitionDuration:g,...y}=r,v={...r,component:a,invisible:s},w=eEe(v),C={transition:m,root:c.Root,...p},E={...u,...f},I={slots:C,slotProps:E},[O,P]=wt("root",{elementType:tEe,externalForwardedProps:I,className:fe(w.root,i),ownerState:v}),[R,D]=wt("transition",{elementType:gh,externalForwardedProps:I,ownerState:v});return k.jsx(R,{in:l,timeout:g,...y,...D,children:k.jsx(O,{"aria-hidden":!0,...P,classes:w,ref:n,children:o})})});function nEe(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=Fj({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function rEe(e){return qe("MuiBadge",e)}const Ld=Ke("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),AR=10,MR=4,oEe=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Oe(n.vertical)}${Oe(n.horizontal)}`,`anchorOrigin${Oe(n.vertical)}${Oe(n.horizontal)}${Oe(o)}`,`overlap${Oe(o)}`,t!=="default"&&`color${Oe(t)}`]};return Me(s,rEe,a)},iEe=ae("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),aEe=ae("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Oe(n.anchorOrigin.vertical)}${Oe(n.anchorOrigin.horizontal)}${Oe(n.overlap)}`],n.color!=="default"&&t[`color${Oe(n.color)}`],n.invisible&&t.invisible]}})(dt(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:AR*2,lineHeight:1,padding:"0 6px",height:AR*2,borderRadius:AR,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(er(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:MR,height:MR*2,minWidth:MR*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Ld.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function XG(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const sEe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:f="rectangular",color:p="default",invisible:m=!1,max:g=99,badgeContent:y,slots:v,slotProps:w,showZero:C=!1,variant:E="standard",...I}=r,{badgeContent:O,invisible:P,max:R,displayValue:D}=nEe({max:g,invisible:m,badgeContent:y,showZero:C}),M=Fj({anchorOrigin:XG(o),color:p,overlap:f,variant:E,badgeContent:y}),A=P||O==null&&E!=="dot",{color:_=p,overlap:N=f,anchorOrigin:B,variant:H=E}=A?M:r,j=XG(B),L=H!=="dot"?D:void 0,V={...r,badgeContent:O,invisible:A,max:R,displayValue:L,showZero:C,anchorOrigin:j,color:_,overlap:N,variant:H},W=oEe(V),K=(v==null?void 0:v.root)??l.Root??iEe,G=(v==null?void 0:v.badge)??l.Badge??aEe,q=(w==null?void 0:w.root)??c.root,Y=(w==null?void 0:w.badge)??c.badge,Z=Dn({elementType:K,externalSlotProps:q,externalForwardedProps:I,additionalProps:{ref:n,as:s},ownerState:V,className:fe(q==null?void 0:q.className,W.root,i)}),ie=Dn({elementType:G,externalSlotProps:Y,ownerState:V,className:fe(W.badge,Y==null?void 0:Y.className)});return k.jsxs(K,{...Z,children:[u,k.jsx(G,{...ie,children:L})]})}),lEe=Ke("MuiBox",["root"]),cEe=ZS(),Xt=Dbe({themeId:qs,defaultTheme:cEe,defaultClassName:lEe.root,generateClassName:fte.generate});function uEe(e){return qe("MuiButton",e)}const gp=Ke("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),pne=x.createContext({}),hne=x.createContext(void 0),dEe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c={root:["root",a&&"loading",i,`${i}${Oe(t)}`,`size${Oe(o)}`,`${i}Size${Oe(o)}`,`color${Oe(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Oe(s)}`],startIcon:["icon","startIcon",`iconSize${Oe(o)}`],endIcon:["icon","endIcon",`iconSize${Oe(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=Me(c,uEe,l);return{...l,...u}},mne=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],fEe=ae(la,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Oe(n.color)}`],t[`size${Oe(n.size)}`],t[`${n.variant}Size${Oe(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${gp.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${gp.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${gp.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${gp.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(er()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:Nt(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${gp.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${gp.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${gp.loading}`]:{color:"transparent"}}}]}})),pEe=ae("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Oe(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...mne]})),hEe=ae("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Oe(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...mne]})),mEe=ae("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),JG=ae("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),ct=x.forwardRef(function(t,n){const r=x.useContext(pne),o=x.useContext(hne),i=dh(r,t),a=pt({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:m=!1,endIcon:g,focusVisibleClassName:y,fullWidth:v=!1,id:w,loading:C=null,loadingIndicator:E,loadingPosition:I="center",size:O="medium",startIcon:P,type:R,variant:D="text",...M}=a,A=bn(w),_=E??k.jsx(nw,{"aria-labelledby":A,color:"inherit",size:16}),N={...a,color:l,component:c,disabled:f,disableElevation:p,disableFocusRipple:m,fullWidth:v,loading:C,loadingIndicator:_,loadingPosition:I,size:O,type:R,variant:D},B=dEe(N),H=(P||C&&I==="start")&&k.jsx(pEe,{className:B.startIcon,ownerState:N,children:P||k.jsx(JG,{className:B.loadingIconPlaceholder,ownerState:N})}),j=(g||C&&I==="end")&&k.jsx(hEe,{className:B.endIcon,ownerState:N,children:g||k.jsx(JG,{className:B.loadingIconPlaceholder,ownerState:N})}),L=o||"",V=typeof C=="boolean"?k.jsx("span",{className:B.loadingWrapper,style:{display:"contents"},children:C&&k.jsx(mEe,{className:B.loadingIndicator,ownerState:N,children:_})}):null;return k.jsxs(fEe,{ownerState:N,className:fe(r.className,B.root,u,L),component:c,disabled:f||C,focusRipple:!m,focusVisibleClassName:fe(B.focusVisible,y),ref:n,type:R,id:C?A:w,...M,classes:B,children:[H,I!=="end"&&V,s,I==="end"&&V,j]})});function gEe(e){return qe("MuiButtonGroup",e)}const Tn=Ke("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),yEe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${Tn.grouped}`]:t.grouped},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.orientation)}`]},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.variant)}`]},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.variant)}${Oe(n.orientation)}`]},{[`& .${Tn.grouped}`]:t[`grouped${Oe(n.variant)}${Oe(n.color)}`]},{[`& .${Tn.firstButton}`]:t.firstButton},{[`& .${Tn.lastButton}`]:t.lastButton},{[`& .${Tn.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},vEe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Oe(n)}`],grouped:["grouped",`grouped${Oe(a)}`,`grouped${Oe(s)}`,`grouped${Oe(s)}${Oe(a)}`,`grouped${Oe(s)}${Oe(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Me(l,gEe,t)},bEe=ae("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:yEe})(dt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Tn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Tn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(er()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:Nt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${Tn.lastButton},& .${Tn.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${Tn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${Tn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(er(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${Tn.firstButton},& .${Tn.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${Tn.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),lB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:f=!1,fullWidth:p=!1,orientation:m="horizontal",size:g="medium",variant:y="outlined",...v}=r,w={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:f,fullWidth:p,orientation:m,size:g,variant:y},C=vEe(w),E=x.useMemo(()=>({className:C.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:f,fullWidth:p,size:g,variant:y}),[a,l,c,u,f,p,g,y,C.grouped]),I=wte(o),O=I.length,P=R=>{const D=R===0,M=R===O-1;return D&&M?"":D?C.firstButton:M?C.lastButton:C.middleButton};return k.jsx(bEe,{as:s,role:"group",className:fe(C.root,i),ref:n,ownerState:w,...v,children:k.jsx(pne.Provider,{value:E,children:I.map((R,D)=>k.jsx(hne.Provider,{value:P(D),children:R},D))})})});function xEe(e){return qe("MuiCard",e)}Ke("MuiCard",["root"]);const SEe=e=>{const{classes:t}=e;return Me({root:["root"]},xEe,t)},wEe=ae(go,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),ho=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=SEe(s);return k.jsx(wEe,{className:fe(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function CEe(e){return qe("MuiCardActionArea",e)}const RR=Ke("MuiCardActionArea",["root","focusVisible","focusHighlight"]),EEe=e=>{const{classes:t}=e;return Me({root:["root"],focusHighlight:["focusHighlight"]},CEe,t)},TEe=ae(la,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${RR.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${RR.focusVisible} .${RR.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),OEe=ae("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(dt(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),IEe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=EEe(l);return k.jsxs(TEe,{className:fe(c.root,i),focusVisibleClassName:fe(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,k.jsx(OEe,{className:c.focusHighlight,ownerState:l})]})});function PEe(e){return qe("MuiCardActions",e)}Ke("MuiCardActions",["root","spacing"]);const AEe=e=>{const{classes:t,disableSpacing:n}=e;return Me({root:["root",!n&&"spacing"]},PEe,t)},MEe=ae("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),ul=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=AEe(s);return k.jsx(MEe,{className:fe(l.root,i),ownerState:s,ref:n,...a})});function REe(e){return qe("MuiCardContent",e)}Ke("MuiCardContent",["root"]);const DEe=e=>{const{classes:t}=e;return Me({root:["root"]},REe,t)},kEe=ae("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),ji=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=DEe(s);return k.jsx(kEe,{as:i,className:fe(l.root,o),ownerState:s,ref:n,...a})});function _Ee(e){return qe("MuiCardHeader",e)}const ZE=Ke("MuiCardHeader",["root","avatar","action","content","title","subheader"]),$Ee=e=>{const{classes:t}=e;return Me({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},_Ee,t)},NEe=ae("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ZE.title}`]:t.title},{[`& .${ZE.subheader}`]:t.subheader},t.root]})({display:"flex",alignItems:"center",padding:16}),LEe=ae("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),FEe=ae("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),jEe=ae("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${QE.root}:where(& .${ZE.title})`]:{display:"block"},[`.${QE.root}:where(& .${ZE.subheader})`]:{display:"block"}}),Zl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:f,slots:p={},slotProps:m={},...g}=r,y={...r,component:a,disableTypography:s},v=$Ee(y),w={slots:p,slotProps:{title:f,subheader:c,...m}};let C=u;const[E,I]=wt("title",{className:v.title,elementType:at,externalForwardedProps:w,ownerState:y,additionalProps:{variant:i?"body2":"h5",component:"span"}});C!=null&&C.type!==at&&!s&&(C=k.jsx(E,{...I,children:C}));let O=l;const[P,R]=wt("subheader",{className:v.subheader,elementType:at,externalForwardedProps:w,ownerState:y,additionalProps:{variant:i?"body2":"body1",color:"textSecondary",component:"span"}});O!=null&&O.type!==at&&!s&&(O=k.jsx(P,{...R,children:O}));const[D,M]=wt("root",{ref:n,className:v.root,elementType:NEe,externalForwardedProps:{...w,...g,component:a},ownerState:y}),[A,_]=wt("avatar",{className:v.avatar,elementType:LEe,externalForwardedProps:w,ownerState:y}),[N,B]=wt("content",{className:v.content,elementType:jEe,externalForwardedProps:w,ownerState:y}),[H,j]=wt("action",{className:v.action,elementType:FEe,externalForwardedProps:w,ownerState:y});return k.jsxs(D,{...M,children:[i&&k.jsx(A,{..._,children:i}),k.jsxs(N,{...B,children:[C,O]}),o&&k.jsx(H,{...j,children:o})]})});function BEe(e){return qe("MuiCardMedia",e)}Ke("MuiCardMedia",["root","media","img"]);const zEe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return Me({root:["root",n&&"media",r&&"img"]},BEe,t)},VEe=ae("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),HEe=["video","audio","picture","iframe","img"],UEe=["picture","img"],Nc=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,f=HEe.includes(a),p=!f&&s?{backgroundImage:`url("${s}")`,...c}:c,m={...r,component:a,isMediaComponent:f,isImageComponent:UEe.includes(a)},g=zEe(m);return k.jsx(VEe,{className:fe(g.root,i),as:a,role:!f&&s?"img":void 0,ref:n,style:p,ownerState:m,src:f?s||l:void 0,...u,children:o})});function GEe(e){return qe("PrivateSwitchBase",e)}Ke("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const qEe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Oe(o)}`],input:["input"]};return Me(i,GEe,t)},WEe=ae(la)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),KEe=ae("input",{shouldForwardProp:ui})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),gne=x.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:f,inputProps:p,inputRef:m,name:g,onBlur:y,onChange:v,onFocus:w,readOnly:C,required:E=!1,tabIndex:I,type:O,value:P,slots:R={},slotProps:D={},...M}=t,[A,_]=ia({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),N=cl(),B=se=>{w&&w(se),N&&N.onFocus&&N.onFocus(se)},H=se=>{y&&y(se),N&&N.onBlur&&N.onBlur(se)},j=se=>{if(se.nativeEvent.defaultPrevented)return;const ce=se.target.checked;_(ce),v&&v(se,ce)};let L=s;N&&typeof L>"u"&&(L=N.disabled);const V=O==="checkbox"||O==="radio",W={...t,checked:A,disabled:L,disableFocusRipple:l,edge:c},K=qEe(W),G={slots:R,slotProps:{input:p,...D}},[q,Y]=wt("root",{ref:n,elementType:WEe,className:K.root,shouldForwardComponentProp:!0,externalForwardedProps:{...G,component:"span",...M},getSlotProps:se=>({...se,onFocus:ce=>{var ye;(ye=se.onFocus)==null||ye.call(se,ce),B(ce)},onBlur:ce=>{var ye;(ye=se.onBlur)==null||ye.call(se,ce),H(ce)}}),ownerState:W,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:L,role:void 0,tabIndex:null}}),[Z,ie]=wt("input",{ref:m,elementType:KEe,className:K.input,externalForwardedProps:G,getSlotProps:se=>({...se,onChange:ce=>{var ye;(ye=se.onChange)==null||ye.call(se,ce),j(ce)}}),ownerState:W,additionalProps:{autoFocus:r,checked:o,defaultChecked:a,disabled:L,id:V?f:void 0,name:g,readOnly:C,required:E,tabIndex:I,type:O,...O==="checkbox"&&P===void 0?{}:{value:P}}});return k.jsxs(q,{...Y,children:[k.jsx(Z,{...ie}),A?i:u]})}),YEe=Ot(k.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),QEe=Ot(k.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),XEe=Ot(k.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function JEe(e){return qe("MuiCheckbox",e)}const DR=Ke("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),ZEe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Oe(r)}`,`size${Oe(o)}`]},a=Me(i,JEe,t);return{...t,...a}},eTe=ae(gne,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Oe(n.size)}`],n.color!=="default"&&t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{[`&.${DR.checked}, &.${DR.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${DR.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),tTe=k.jsx(QEe,{}),nTe=k.jsx(YEe,{}),rTe=k.jsx(XEe,{}),oTe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiCheckbox"}),{checkedIcon:o=tTe,color:i="primary",icon:a=nTe,indeterminate:s=!1,indeterminateIcon:l=rTe,inputProps:c,size:u="medium",disableRipple:f=!1,className:p,slots:m={},slotProps:g={},...y}=r,v=s?l:a,w=s?l:o,C={...r,disableRipple:f,color:i,indeterminate:s,size:u},E=ZEe(C),I=g.input??c,[O,P]=wt("root",{ref:n,elementType:eTe,className:fe(E.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:m,slotProps:g,...y},ownerState:C,additionalProps:{type:"checkbox",icon:x.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:x.cloneElement(w,{fontSize:w.props.fontSize??u}),disableRipple:f,slots:m,slotProps:{input:Wj(typeof I=="function"?I(C):I,{"data-indeterminate":s})}}});return k.jsx(O,{...P,classes:E})});function ZG(e){return e.substring(2).toLowerCase()}function iTe(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function yne(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=x.useRef(!1),s=x.useRef(null),l=x.useRef(!1),c=x.useRef(!1);x.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=en(Nf(t),s),f=Je(g=>{const y=c.current;c.current=!1;const v=Mr(s.current);if(!l.current||!s.current||"clientX"in g&&iTe(g,v))return;if(a.current){a.current=!1;return}let w;g.composedPath?w=g.composedPath().includes(s.current):w=!v.documentElement.contains(g.target)||s.current.contains(g.target),!w&&(n||!y)&&o(g)}),p=g=>y=>{c.current=!0;const v=t.props[g];v&&v(y)},m={ref:u};return i!==!1&&(m[i]=p(i)),x.useEffect(()=>{if(i!==!1){const g=ZG(i),y=Mr(s.current),v=()=>{a.current=!0};return y.addEventListener(g,f),y.addEventListener("touchmove",v),()=>{y.removeEventListener(g,f),y.removeEventListener("touchmove",v)}}},[f,i]),r!==!1&&(m[r]=p(r)),x.useEffect(()=>{if(r!==!1){const g=ZG(r),y=Mr(s.current);return y.addEventListener(g,f),()=>{y.removeEventListener(g,f)}}},[f,r]),x.cloneElement(t,m)}const Gu=T0e({createStyledComponent:ae("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Oe(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>pt({props:e,name:"MuiContainer"})});function aTe(e){const t=Mr(e);return t.body===e?ns(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Y0(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function e6(e){return parseInt(ns(e).getComputedStyle(e).paddingRight,10)||0}function sTe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function t6(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!sTe(a);s&&l&&Y0(a,o)})}function kR(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function lTe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(aTe(r)){const a=Ste(ns(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${e6(r)+a}px`;const s=Mr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${e6(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Mr(r).body;else{const a=r.parentElement,s=ns(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function cTe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class uTe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Y0(t.modalRef,!1);const o=cTe(n);t6(n,t.mount,t.modalRef,o,!0);const i=kR(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=kR(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=lTe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=kR(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Y0(t.modalRef,n),t6(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&Y0(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const dTe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function fTe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function pTe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function hTe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||pTe(e))}function mTe(e){const t=[],n=[];return Array.from(e.querySelectorAll(dTe)).forEach((r,o)=>{const i=fTe(r);i===-1||!hTe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function gTe(){return!0}function cB(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=mTe,isEnabled:a=gTe,open:s}=e,l=x.useRef(!1),c=x.useRef(null),u=x.useRef(null),f=x.useRef(null),p=x.useRef(null),m=x.useRef(!1),g=x.useRef(null),y=en(Nf(t),g),v=x.useRef(null);x.useEffect(()=>{!s||!g.current||(m.current=!n)},[n,s]),x.useEffect(()=>{if(!s||!g.current)return;const E=Mr(g.current);return g.current.contains(E.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),m.current&&g.current.focus()),()=>{o||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),x.useEffect(()=>{if(!s||!g.current)return;const E=Mr(g.current),I=R=>{v.current=R,!(r||!a()||R.key!=="Tab")&&E.activeElement===g.current&&R.shiftKey&&(l.current=!0,u.current&&u.current.focus())},O=()=>{var M,A;const R=g.current;if(R===null)return;if(!E.hasFocus()||!a()||l.current){l.current=!1;return}if(R.contains(E.activeElement)||r&&E.activeElement!==c.current&&E.activeElement!==u.current)return;if(E.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let D=[];if((E.activeElement===c.current||E.activeElement===u.current)&&(D=i(g.current)),D.length>0){const _=!!((M=v.current)!=null&&M.shiftKey&&((A=v.current)==null?void 0:A.key)==="Tab"),N=D[0],B=D[D.length-1];typeof N!="string"&&typeof B!="string"&&(_?B.focus():N.focus())}else R.focus()};E.addEventListener("focusin",O),E.addEventListener("keydown",I,!0);const P=setInterval(()=>{E.activeElement&&E.activeElement.tagName==="BODY"&&O()},50);return()=>{clearInterval(P),E.removeEventListener("focusin",O),E.removeEventListener("keydown",I,!0)}},[n,r,o,a,s,i]);const w=E=>{f.current===null&&(f.current=E.relatedTarget),m.current=!0,p.current=E.target;const I=t.props.onFocus;I&&I(E)},C=E=>{f.current===null&&(f.current=E.relatedTarget),m.current=!0};return k.jsxs(x.Fragment,{children:[k.jsx("div",{tabIndex:s?0:-1,onFocus:C,ref:c,"data-testid":"sentinelStart"}),x.cloneElement(t,{ref:y,onFocus:w}),k.jsx("div",{tabIndex:s?0:-1,onFocus:C,ref:u,"data-testid":"sentinelEnd"})]})}function yTe(e){return typeof e=="function"?e():e}function vTe(e){return e?e.props.hasOwnProperty("in"):!1}const n6=()=>{},w1=new uTe;function bTe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,f=x.useRef({}),p=x.useRef(null),m=x.useRef(null),g=en(m,u),[y,v]=x.useState(!c),w=vTe(s);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const E=()=>Mr(p.current),I=()=>(f.current.modalRef=m.current,f.current.mount=p.current,f.current),O=()=>{w1.mount(I(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},P=Je(()=>{const j=yTe(t)||E().body;w1.add(I(),j),m.current&&O()}),R=()=>w1.isTopModal(I()),D=Je(j=>{p.current=j,j&&(c&&R()?O():m.current&&Y0(m.current,C))}),M=x.useCallback(()=>{w1.remove(I(),C)},[C]);x.useEffect(()=>()=>{M()},[M]),x.useEffect(()=>{c?P():(!w||!o)&&M()},[c,M,w,o,P]);const A=j=>L=>{var V;(V=j.onKeyDown)==null||V.call(j,L),!(L.key!=="Escape"||L.which===229||!R())&&(n||(L.stopPropagation(),l&&l(L,"escapeKeyDown")))},_=j=>L=>{var V;(V=j.onClick)==null||V.call(j,L),L.target===L.currentTarget&&l&&l(L,"backdropClick")};return{getRootProps:(j={})=>{const L=HE(e);delete L.onTransitionEnter,delete L.onTransitionExited;const V={...L,...j};return{role:"presentation",...V,onKeyDown:A(V),ref:g}},getBackdropProps:(j={})=>{const L=j;return{"aria-hidden":!0,...L,onClick:_(L),open:c}},getTransitionProps:()=>{const j=()=>{v(!1),i&&i()},L=()=>{v(!0),a&&a(),o&&M()};return{onEnter:J3(j,(s==null?void 0:s.props.onEnter)??n6),onExited:J3(L,(s==null?void 0:s.props.onExited)??n6)}},rootRef:g,portalRef:D,isTopModal:R,exited:y,hasTransition:w}}function xTe(e){return qe("MuiModal",e)}Ke("MuiModal",["root","hidden","backdrop"]);const STe=e=>{const{open:t,exited:n,classes:r}=e;return Me({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},xTe,r)},wTe=ae("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(dt(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),CTe=ae(fne,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),cv=x.forwardRef(function(t,n){const r=pt({name:"MuiModal",props:t}),{BackdropComponent:o=CTe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:f,components:p={},componentsProps:m={},disableAutoFocus:g=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:v=!1,disablePortal:w=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:I=!1,keepMounted:O=!1,onClose:P,onTransitionEnter:R,onTransitionExited:D,open:M,slotProps:A={},slots:_={},theme:N,...B}=r,H={...r,closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:y,disableEscapeKeyDown:v,disablePortal:w,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:I,keepMounted:O},{getRootProps:j,getBackdropProps:L,getTransitionProps:V,portalRef:W,isTopModal:K,exited:G,hasTransition:q}=bTe({...H,rootRef:n}),Y={...H,exited:G},Z=STe(Y),ie={};if(c.props.tabIndex===void 0&&(ie.tabIndex="-1"),q){const{onEnter:le,onExited:de}=V();ie.onEnter=le,ie.onExited=de}const se={slots:{root:p.Root,backdrop:p.Backdrop,..._},slotProps:{...m,...A}},[ce,ye]=wt("root",{ref:n,elementType:wTe,externalForwardedProps:{...se,...B,component:f},getSlotProps:j,ownerState:Y,className:fe(s,Z==null?void 0:Z.root,!Y.open&&Y.exited&&(Z==null?void 0:Z.hidden))}),[Se,ne]=wt("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:se,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:le=>L({...le,onClick:de=>{le!=null&&le.onClick&&le.onClick(de)}}),className:fe(i==null?void 0:i.className,Z==null?void 0:Z.backdrop),ownerState:Y});return!O&&!M&&(!q||G)?null:k.jsx(une,{ref:W,container:u,disablePortal:w,children:k.jsxs(ce,{...ye,children:[!I&&o?k.jsx(Se,{...ne}):null,k.jsx(cB,{disableEnforceFocus:y,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:K,open:M,children:x.cloneElement(c,ie)})]})})});function ETe(e){return qe("MuiDialog",e)}const Q0=Ke("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),vne=x.createContext({}),TTe=ae(fne,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),OTe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Oe(n)}`],paper:["paper",`paperScroll${Oe(n)}`,`paperWidth${Oe(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Me(a,ETe,t)},ITe=ae(cv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),PTe=ae("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Oe(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),ATe=ae(go,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Oe(n.scroll)}`],t[`paperWidth${Oe(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(dt(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Q0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),Ix=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialog"}),o=Lr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:f,className:p,disableEscapeKeyDown:m=!1,fullScreen:g=!1,fullWidth:y=!1,maxWidth:v="sm",onClick:w,onClose:C,open:E,PaperComponent:I=go,PaperProps:O={},scroll:P="paper",slots:R={},slotProps:D={},TransitionComponent:M=gh,transitionDuration:A=i,TransitionProps:_,...N}=r,B={...r,disableEscapeKeyDown:m,fullScreen:g,fullWidth:y,maxWidth:v,scroll:P},H=OTe(B),j=x.useRef(),L=ue=>{j.current=ue.target===ue.currentTarget},V=ue=>{w&&w(ue),j.current&&(j.current=null,C&&C(ue,"backdropClick"))},W=bn(s),K=x.useMemo(()=>({titleId:W}),[W]),G={transition:M,...R},q={transition:_,paper:O,backdrop:u,...D},Y={slots:G,slotProps:q},[Z,ie]=wt("root",{elementType:ITe,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:B,className:fe(H.root,p),ref:n}),[se,ce]=wt("backdrop",{elementType:TTe,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:B}),[ye,Se]=wt("paper",{elementType:ATe,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:B,className:fe(H.paper,O.className)}),[ne,le]=wt("container",{elementType:PTe,externalForwardedProps:Y,ownerState:B,className:fe(H.container)}),[de,oe]=wt("transition",{elementType:gh,externalForwardedProps:Y,ownerState:B,additionalProps:{appear:!0,in:E,timeout:A,role:"presentation"}});return k.jsx(Z,{closeAfterTransition:!0,slots:{backdrop:se},slotProps:{backdrop:{transitionDuration:A,as:c,...ce}},disableEscapeKeyDown:m,onClose:C,open:E,onClick:V,...ie,...N,children:k.jsx(de,{...oe,children:k.jsx(ne,{onMouseDown:L,...le,children:k.jsx(ye,{as:I,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":W,"aria-modal":l,...Se,children:k.jsx(vne.Provider,{value:K,children:f})})})})})});function MTe(e){return qe("MuiDialogActions",e)}Ke("MuiDialogActions",["root","spacing"]);const RTe=e=>{const{classes:t,disableSpacing:n}=e;return Me({root:["root",!n&&"spacing"]},MTe,t)},DTe=ae("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Px=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=RTe(s);return k.jsx(DTe,{className:fe(l.root,o),ownerState:s,ref:n,...a})});function kTe(e){return qe("MuiDialogContent",e)}Ke("MuiDialogContent",["root","dividers"]);function _Te(e){return qe("MuiDialogTitle",e)}const $Te=Ke("MuiDialogTitle",["root"]),NTe=e=>{const{classes:t,dividers:n}=e;return Me({root:["root",n&&"dividers"]},kTe,t)},LTe=ae("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(dt(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${$Te.root} + &`]:{paddingTop:0}}}]}))),Ax=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=NTe(s);return k.jsx(LTe,{className:fe(l.root,o),ownerState:s,ref:n,...a})});function FTe(e){return qe("MuiDialogContentText",e)}Ke("MuiDialogContentText",["root"]);const jTe=e=>{const{classes:t}=e,r=Me({root:["root"]},FTe,t);return{...t,...r}},BTe=ae(at,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),r6=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogContentText"}),{children:o,className:i,...a}=r,s=jTe(a);return k.jsx(BTe,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:a,className:fe(s.root,i),...r,classes:s})}),zTe=e=>{const{classes:t}=e;return Me({root:["root"]},_Te,t)},VTe=ae(at,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),eT=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=zTe(s),{titleId:c=i}=x.useContext(vne);return k.jsx(VTe,{component:"h2",className:fe(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function HTe(e){return qe("MuiDivider",e)}const o6=Ke("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),UTe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Me({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},HTe,r)},GTe=ae("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(dt(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Nt(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),qTe=ae("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(dt(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Bi=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:f=l!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth",...g}=r,y={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:f,textAlign:p,variant:m},v=UTe(y);return k.jsx(GTe,{as:l,className:fe(v.root,a),role:f,ref:n,ownerState:y,"aria-orientation":f==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...g,children:i?k.jsx(qTe,{className:v.wrapper,ownerState:y,children:i}):null})});Bi&&(Bi.muiSkipListHighlight=!0);function WTe(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=ns(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function KTe(e){return typeof e=="function"?e():e}function C1(e,t,n){const r=KTe(n),o=WTe(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const YTe=x.forwardRef(function(t,n){const r=Lr(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:f=o,in:p,onEnter:m,onEntered:g,onEntering:y,onExit:v,onExited:w,onExiting:C,style:E,timeout:I=i,TransitionComponent:O=as,...P}=t,R=x.useRef(null),D=en(Nf(l),R,n),M=W=>K=>{W&&(K===void 0?W(R.current):W(R.current,K))},A=M((W,K)=>{C1(u,W,c),Xj(W),m&&m(W,K)}),_=M((W,K)=>{const G=Of({timeout:I,style:E,easing:f},{mode:"enter"});W.style.webkitTransition=r.transitions.create("-webkit-transform",{...G}),W.style.transition=r.transitions.create("transform",{...G}),W.style.webkitTransform="none",W.style.transform="none",y&&y(W,K)}),N=M(g),B=M(C),H=M(W=>{const K=Of({timeout:I,style:E,easing:f},{mode:"exit"});W.style.webkitTransition=r.transitions.create("-webkit-transform",K),W.style.transition=r.transitions.create("transform",K),C1(u,W,c),v&&v(W)}),j=M(W=>{W.style.webkitTransition="",W.style.transition="",w&&w(W)}),L=W=>{a&&a(R.current,W)},V=x.useCallback(()=>{R.current&&C1(u,R.current,c)},[u,c]);return x.useEffect(()=>{if(p||u==="down"||u==="right")return;const W=Lh(()=>{R.current&&C1(u,R.current,c)}),K=ns(R.current);return K.addEventListener("resize",W),()=>{W.clear(),K.removeEventListener("resize",W)}},[u,p,c]),x.useEffect(()=>{p||V()},[p,V]),k.jsx(O,{nodeRef:R,onEnter:A,onEntered:N,onEntering:_,onExit:H,onExited:j,onExiting:B,addEndListener:L,appear:s,in:p,timeout:I,...P,children:(W,{ownerState:K,...G})=>x.cloneElement(l,{ref:D,style:{visibility:W==="exited"&&!p?"hidden":void 0,...E,...l.props.style},...G})})});function QTe(e){return qe("MuiDrawer",e)}Ke("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const bne=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},XTe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root",`anchor${Oe(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Oe(n)}`,r!=="temporary"&&`paperAnchorDocked${Oe(n)}`]};return Me(o,QTe,t)},JTe=ae(cv,{name:"MuiDrawer",slot:"Root",overridesResolver:bne})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),ZTe=ae("div",{shouldForwardProp:ui,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:bne})({flex:"0 0 auto"}),eOe=ae(go,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Oe(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Oe(n.anchor)}`]]}})(dt(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),xne={left:"right",right:"left",top:"down",bottom:"up"};function tOe(e){return["left","right"].includes(e)}function nOe({direction:e},t){return e==="rtl"&&tOe(t)?xne[t]:t}const rOe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiDrawer"}),o=Lr(),i=vr(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:m,...g}={},onClose:y,open:v=!1,PaperProps:w={},SlideProps:C,TransitionComponent:E,transitionDuration:I=a,variant:O="temporary",slots:P={},slotProps:R={},...D}=r,M=x.useRef(!1);x.useEffect(()=>{M.current=!0},[]);const A=nOe({direction:i?"rtl":"ltr"},s),N={...r,anchor:s,elevation:f,open:v,variant:O,...D},B=XTe(N),H={slots:{transition:E,...P},slotProps:{paper:w,transition:C,...R,backdrop:Wj(R.backdrop||{...l,...m},{transitionDuration:I})}},[j,L]=wt("root",{ref:n,elementType:JTe,className:fe(B.root,B.modal,u),shouldForwardComponentProp:!0,ownerState:N,externalForwardedProps:{...H,...D,...g},additionalProps:{open:v,onClose:y,hideBackdrop:p,slots:{backdrop:H.slots.backdrop},slotProps:{backdrop:H.slotProps.backdrop}}}),[V,W]=wt("paper",{elementType:eOe,shouldForwardComponentProp:!0,className:fe(B.paper,w.className),ownerState:N,externalForwardedProps:H,additionalProps:{elevation:O==="temporary"?f:0,square:!0}}),[K,G]=wt("docked",{elementType:ZTe,ref:n,className:fe(B.root,B.docked,u),ownerState:N,externalForwardedProps:H,additionalProps:D}),[q,Y]=wt("transition",{elementType:YTe,ownerState:N,externalForwardedProps:H,additionalProps:{in:v,direction:xne[A],timeout:I,appear:M.current}}),Z=k.jsx(V,{...W,children:c});if(O==="permanent")return k.jsx(K,{...G,children:Z});const ie=k.jsx(q,{...Y,children:Z});return O==="persistent"?k.jsx(K,{...G,children:ie}):k.jsx(j,{...L,children:ie})});function oOe(e){return qe("MuiFab",e)}const i6=Ke("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),iOe=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Oe(o)}`,t==="inherit"?"colorInherit":t]},a=Me(i,oOe,r);return{...r,...a}},aOe=ae(la,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>ui(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Oe(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Oe(n.size)],t[n.color]]}})(dt(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${i6.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),dt(({theme:e})=>({variants:[...Object.entries(e.palette).filter(er(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),dt(({theme:e})=>({[`&.${i6.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Zu=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:f="large",variant:p="circular",...m}=r,g={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:f,variant:p},y=iOe(g);return k.jsx(aOe,{className:fe(y.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:fe(y.focusVisible,u),ownerState:g,ref:n,...m,classes:y,children:o})}),sOe=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Oe(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Me(l,T1e,t);return{...t,...c}},lOe=ae(cI,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...sI(e,t),!n.disableUnderline&&t.underline]}})(dt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ua.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ua.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ua.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ua.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ua.disabled}, .${Ua.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ua.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(er()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),cOe=ae(uI,{name:"MuiFilledInput",slot:"Input",overridesResolver:lI})(dt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),uB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:f,slots:p={},type:m="text",...g}=r,y={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:m},v=sOe(r),w={root:{ownerState:y},input:{ownerState:y}},C=f??a?si(w,f??a):w,E=p.root??i.Root??lOe,I=p.input??i.Input??cOe;return k.jsx(iw,{slots:{root:E,input:I},slotProps:C,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:m,...g,classes:v})});uB.muiName="Input";function uOe(e){return qe("MuiFormControl",e)}Ke("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const dOe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Oe(n)}`,r&&"fullWidth"]};return Me(o,uOe,t)},fOe=ae("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${Oe(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),jh=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:p=!1,margin:m="none",required:g=!1,size:y="medium",variant:v="outlined",...w}=r,C={...r,color:a,component:s,disabled:l,error:c,fullWidth:f,hiddenLabel:p,margin:m,required:g,size:y,variant:v},E=dOe(C),[I,O]=x.useState(()=>{let j=!1;return o&&x.Children.forEach(o,L=>{if(!Dg(L,["Input","Select"]))return;const V=Dg(L,["Select"])?L.props.input:L;V&&x1e(V.props)&&(j=!0)}),j}),[P,R]=x.useState(()=>{let j=!1;return o&&x.Children.forEach(o,L=>{Dg(L,["Input","Select"])&&(JE(L.props,!0)||JE(L.props.inputProps,!0))&&(j=!0)}),j}),[D,M]=x.useState(!1);l&&D&&M(!1);const A=u!==void 0&&!l?u:D;let _;x.useRef(!1);const N=x.useCallback(()=>{R(!0)},[]),B=x.useCallback(()=>{R(!1)},[]),H=x.useMemo(()=>({adornedStart:I,setAdornedStart:O,color:a,disabled:l,error:c,filled:P,focused:A,fullWidth:f,hiddenLabel:p,size:y,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:B,onFilled:N,registerEffect:_,required:g,variant:v}),[I,a,l,c,P,A,f,p,_,B,N,g,y,v]);return k.jsx(aI.Provider,{value:H,children:k.jsx(fOe,{as:s,ownerState:C,className:fe(E.root,i),ref:n,...w,children:o})})});function pOe(e){return qe("MuiFormControlLabel",e)}const mg=Ke("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),hOe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Oe(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Me(a,pOe,t)},mOe=ae("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mg.label}`]:t.label},t.root,t[`labelPlacement${Oe(n.labelPlacement)}`]]}})(dt(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${mg.disabled}`]:{cursor:"default"},[`& .${mg.label}`]:{[`&.${mg.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),gOe=ae("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(dt(({theme:e})=>({[`&.${mg.error}`]:{color:(e.vars||e).palette.error.main}}))),os=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:f,labelPlacement:p="end",name:m,onChange:g,required:y,slots:v={},slotProps:w={},value:C,...E}=r,I=cl(),O=l??s.props.disabled??(I==null?void 0:I.disabled),P=y??s.props.required,R={disabled:O,required:P};["checked","name","onChange","value","inputRef"].forEach(j=>{typeof s.props[j]>"u"&&typeof r[j]<"u"&&(R[j]=r[j])});const D=Ff({props:r,muiFormControl:I,states:["error"]}),M={...r,disabled:O,labelPlacement:p,required:P,error:D.error},A=hOe(M),_={slots:v,slotProps:{...a,...w}},[N,B]=wt("typography",{elementType:at,externalForwardedProps:_,ownerState:M});let H=f;return H!=null&&H.type!==at&&!c&&(H=k.jsx(N,{component:"span",...B,className:fe(A.label,B==null?void 0:B.className),children:H})),k.jsxs(mOe,{className:fe(A.root,i),ownerState:M,ref:n,...E,children:[x.cloneElement(s,R),P?k.jsxs("div",{children:[H,k.jsxs(gOe,{ownerState:M,"aria-hidden":!0,className:A.asterisk,children:[" ","*"]})]}):H]})});function yOe(e){return qe("MuiFormGroup",e)}Ke("MuiFormGroup",["root","row","error"]);const vOe=e=>{const{classes:t,row:n,error:r}=e;return Me({root:["root",n&&"row",r&&"error"]},yOe,t)},bOe=ae("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),Mx=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=cl(),l=Ff({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=vOe(c);return k.jsx(bOe,{className:fe(u.root,o),ownerState:c,ref:n,...a})});function xOe(e){return qe("MuiFormHelperText",e)}const a6=Ke("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var s6;const SOe=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Oe(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Me(c,xOe,t)},wOe=ae("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Oe(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${a6.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${a6.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),aw=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:f,required:p,variant:m,...g}=r,y=cl(),v=Ff({props:r,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete w.ownerState;const C=SOe(w);return k.jsx(wOe,{as:a,className:fe(C.root,i),ref:n,...g,ownerState:w,children:o===" "?s6||(s6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});function COe(e){return qe("MuiFormLabel",e)}const X0=Ke("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),EOe=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Oe(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Me(l,COe,t)},TOe=ae("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(dt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{[`&.${X0.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${X0.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${X0.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),OOe=ae("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(dt(({theme:e})=>({[`&.${X0.error}`]:{color:(e.vars||e).palette.error.main}}))),IOe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:f,required:p,...m}=r,g=cl(),y=Ff({props:r,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),v={...r,color:y.color||"primary",component:s,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},w=EOe(v);return k.jsxs(TOe,{as:s,ownerState:v,className:fe(w.root,i),ref:n,...m,children:[o,y.required&&k.jsxs(OOe,{ownerState:v,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})}),me=z0e({createStyledComponent:ae("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>pt({props:e,name:"MuiGrid"}),useTheme:Lr});function TN(e){return`scale(${e}, ${e**2})`}const POe={entering:{opacity:1,transform:TN(1)},entered:{opacity:1,transform:"none"}},_R=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),yh=x.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:p,onExiting:m,style:g,timeout:y="auto",TransitionComponent:v=as,...w}=t,C=_o(),E=x.useRef(),I=Lr(),O=x.useRef(null),P=en(O,Nf(i),n),R=j=>L=>{if(j){const V=O.current;L===void 0?j(V):j(V,L)}},D=R(u),M=R((j,L)=>{Xj(j);const{duration:V,delay:W,easing:K}=Of({style:g,timeout:y,easing:a},{mode:"enter"});let G;y==="auto"?(G=I.transitions.getAutoHeightDuration(j.clientHeight),E.current=G):G=V,j.style.transition=[I.transitions.create("opacity",{duration:G,delay:W}),I.transitions.create("transform",{duration:_R?G:G*.666,delay:W,easing:K})].join(","),l&&l(j,L)}),A=R(c),_=R(m),N=R(j=>{const{duration:L,delay:V,easing:W}=Of({style:g,timeout:y,easing:a},{mode:"exit"});let K;y==="auto"?(K=I.transitions.getAutoHeightDuration(j.clientHeight),E.current=K):K=L,j.style.transition=[I.transitions.create("opacity",{duration:K,delay:V}),I.transitions.create("transform",{duration:_R?K:K*.666,delay:_R?V:V||K*.333,easing:W})].join(","),j.style.opacity=0,j.style.transform=TN(.75),f&&f(j)}),B=R(p),H=j=>{y==="auto"&&C.start(E.current||0,j),r&&r(O.current,j)};return k.jsx(v,{appear:o,in:s,nodeRef:O,onEnter:M,onEntered:A,onEntering:D,onExit:N,onExited:B,onExiting:_,addEndListener:H,timeout:y==="auto"?null:y,...w,children:(j,{ownerState:L,...V})=>x.cloneElement(i,{style:{opacity:0,transform:TN(.75),visibility:j==="exited"&&!s?"hidden":void 0,...POe[j],...g,...i.props.style},ref:P,...V})})});yh&&(yh.muiSupportAuto=!0);function AOe(e){return qe("MuiImageList",e)}Ke("MuiImageList",["root","masonry","quilted","standard","woven"]);const Sne=x.createContext({}),MOe=e=>{const{classes:t,variant:n}=e;return Me({root:["root",n]},AOe,t)},ROe=ae("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),wne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:f="standard",...p}=r,m=x.useMemo(()=>({rowHeight:l,gap:c,variant:f}),[l,c,f]),g=f==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},y={...r,component:s,gap:c,rowHeight:l,variant:f},v=MOe(y);return k.jsx(ROe,{as:s,className:fe(v.root,v[f],i),ref:n,style:g,ownerState:y,...p,children:k.jsx(Sne.Provider,{value:m,children:o})})});function DOe(e){return qe("MuiImageListItem",e)}const $R=Ke("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),kOe=e=>{const{classes:t,variant:n}=e;return Me({root:["root",n],img:["img"]},DOe,t)},_Oe=ae("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${$R.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${$R.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${$R.img}`]:{height:"auto",flexGrow:1}}}]}),Cne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:f="auto",gap:p,variant:m}=x.useContext(Sne);let g="auto";m==="woven"?g=void 0:f!=="auto"&&(g=f*l+p*(l-1));const y={...r,cols:a,component:s,gap:p,rowHeight:f,rows:l,variant:m},v=kOe(y);return k.jsx(_Oe,{as:s,className:fe(v.root,v[m],i),ref:n,style:{height:g,gridColumnEnd:m!=="masonry"?`span ${a}`:void 0,gridRowEnd:m!=="masonry"?`span ${l}`:void 0,marginBottom:m==="masonry"?p:void 0,breakInside:m==="masonry"?"avoid":void 0,...c},ownerState:y,...u,children:x.Children.map(o,w=>x.isValidElement(w)?w.type==="img"||Dg(w,["Image"])?x.cloneElement(w,{className:fe(v.img,w.props.className)}):w:null)})});function $Oe(e){return qe("MuiImageListItemBar",e)}Ke("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const NOe=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Oe(n)}`,`actionPosition${Oe(o)}`],titleWrap:["titleWrap",`titleWrap${Oe(n)}`,r&&`titleWrapActionPos${Oe(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Oe(o)}`]};return Me(i,$Oe,t)},LOe=ae("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Oe(n.position)}`]]}})(dt(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),FOe=ae("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Oe(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Oe(n.actionPosition)}`]]}})(dt(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),jOe=ae("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(dt(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),BOe=ae("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(dt(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),zOe=ae("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Oe(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),VOe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,f={...r,position:c,actionPosition:i},p=NOe(f);return k.jsxs(LOe,{ownerState:f,className:fe(p.root,a),ref:n,...u,children:[k.jsxs(FOe,{ownerState:f,className:p.titleWrap,children:[k.jsx(jOe,{className:p.title,children:l}),s?k.jsx(BOe,{className:p.subtitle,children:s}):null]}),o?k.jsx(zOe,{ownerState:f,className:p.actionIcon,children:o}):null]})}),HOe=e=>{const{classes:t,disableUnderline:n}=e,o=Me({root:["root",!n&&"underline"],input:["input"]},C1e,t);return{...t,...o}},UOe=ae(cI,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...sI(e,t),!n.disableUnderline&&t.underline]}})(dt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Qd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Qd.disabled}, .${Qd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Qd.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(er()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),GOe=ae(uI,{name:"MuiInput",slot:"Input",overridesResolver:lI})({}),dB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:f={},type:p="text",...m}=r,g=HOe(r),v={root:{ownerState:{disableUnderline:o}}},w=u??a?si(u??a,v):v,C=f.root??i.Root??UOe,E=f.input??i.Input??GOe;return k.jsx(iw,{slots:{root:C,input:E},slotProps:w,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:p,...m,classes:g})});dB.muiName="Input";function qOe(e){return qe("MuiInputAdornment",e)}const ON=Ke("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var l6;const WOe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Oe(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},KOe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Oe(o)}`,a,r&&"hiddenLabel",i&&`size${Oe(i)}`]};return Me(s,qOe,t)},YOe=ae("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:WOe})(dt(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${ON.positionStart}&:not(.${ON.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),So=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...f}=r,p=cl()||{};let m=u;u&&p.variant,p&&!m&&(m=p.variant);const g={...r,hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:s,position:c,variant:m},y=KOe(g);return k.jsx(aI.Provider,{value:null,children:k.jsx(YOe,{as:a,ownerState:g,className:fe(y.root,i),ref:n,...f,children:typeof o=="string"&&!l?k.jsx(at,{color:"textSecondary",children:o}):k.jsxs(x.Fragment,{children:[c==="start"?l6||(l6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function QOe(e){return qe("MuiInputLabel",e)}Ke("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const XOe=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="medium"&&`size${Oe(r)}`,a],asterisk:[s&&"asterisk"]},c=Me(l,QOe,t);return{...t,...c}},JOe=ae(IOe,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${X0.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(dt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Bh=x.forwardRef(function(t,n){const r=pt({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=cl();let f=a;typeof f>"u"&&u&&(f=u.filled||u.focused||u.adornedStart);const p=Ff({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),m={...r,disableAnimation:o,formControl:u,shrink:f,size:p.size,variant:p.variant,required:p.required,focused:p.focused},g=XOe(m);return k.jsx(JOe,{"data-shrink":f,ref:n,className:fe(g.root,l),...c,ownerState:m,classes:g})});function ZOe(e){return qe("MuiLinearProgress",e)}Ke("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const IN=4,PN=sl`
0% {
left: -35%;
right: 100%;
@@ -187,9 +187,9 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
left: 100%;
right: -90%;
}
-`,JOe=typeof IN!="string"?kf`
- animation: ${IN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
- `:null,PN=il`
+`,eIe=typeof PN!="string"?$f`
+ animation: ${PN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
+ `:null,AN=sl`
0% {
left: -200%;
right: 100%;
@@ -204,9 +204,9 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
left: 107%;
right: -8%;
}
-`,ZOe=typeof PN!="string"?kf`
- animation: ${PN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
- `:null,AN=il`
+`,tIe=typeof AN!="string"?$f`
+ animation: ${AN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
+ `:null,MN=sl`
0% {
opacity: 1;
background-position: 0 -23px;
@@ -221,9 +221,9 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
opacity: 1;
background-position: -200px -23px;
}
-`,eIe=typeof AN!="string"?kf`
- animation: ${AN} 3s infinite linear;
- `:null,tIe=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Oe(r)}`,n],dashed:["dashed",`dashedColor${Oe(r)}`],bar1:["bar","bar1",`barColor${Oe(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar","bar2",n!=="buffer"&&`barColor${Oe(r)}`,n==="buffer"&&`color${Oe(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Me(o,XOe,t)},dB=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Vu(e.palette[t].main,.62):zu(e.palette[t].main,.5),nIe=ae("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Oe(n.color)}`],t[n.variant]]}})(dt(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{backgroundColor:dB(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),rIe=ae("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Oe(n.color)}`]]}})(dt(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(er()).map(([t])=>{const n=dB(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),eIe||{animation:`${AN} 3s infinite linear`}),oIe=ae("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${Oe(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(dt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${ON}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${ON}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:JOe||{animation:`${IN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),iIe=ae("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${Oe(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(dt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:dB(e,t),transition:`transform .${ON}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:ZOe||{animation:`${PN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),Cne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},f=tIe(u),h=vr(),m={},g={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){m["aria-valuenow"]=Math.round(a),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let y=a-100;h&&(y=-y),g.bar1.transform=`translateX(${y}%)`}if(l==="buffer"&&s!==void 0){let y=(s||0)-100;h&&(y=-y),g.bar2.transform=`translateX(${y}%)`}return k.jsxs(nIe,{className:fe(f.root,o),ownerState:u,role:"progressbar",...m,ref:n,...c,children:[l==="buffer"?k.jsx(rIe,{className:f.dashed,ownerState:u}):null,k.jsx(oIe,{className:f.bar1,ownerState:u,style:g.bar1}),l==="determinate"?null:k.jsx(iIe,{className:f.bar2,ownerState:u,style:g.bar2})]})}),Ks=x.createContext({});function aIe(e){return qe("MuiList",e)}Ke("MuiList",["root","padding","dense","subheader"]);const sIe=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Me({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},aIe,t)},lIe=ae("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),ai=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,f=x.useMemo(()=>({dense:s}),[s]),h={...r,component:a,dense:s,disablePadding:l},m=sIe(h);return k.jsx(Ks.Provider,{value:f,children:k.jsxs(lIe,{as:a,className:fe(m.root,i),ref:n,ownerState:h,...u,children:[c,o]})})});function cIe(e){return qe("MuiListItem",e)}Ke("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function uIe(e){return qe("MuiListItemButton",e)}const lg=Ke("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),dIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},fIe=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=Me({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},uIe,n);return{...n,...c}},pIe=ae(la,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:dIe})(dt(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${lg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${lg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Fl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:h=!1,className:m,...g}=r,y=x.useContext(Ks),v=x.useMemo(()=>({dense:l||y.dense||!1,alignItems:o,disableGutters:c}),[o,y.dense,l,c]),w=x.useRef(null);In(()=>{i&&w.current&&w.current.focus()},[i]);const C={...r,alignItems:o,dense:v.dense,disableGutters:c,divider:u,selected:h},E=fIe(C),I=en(w,n);return k.jsx(Ks.Provider,{value:v,children:k.jsx(pIe,{ref:I,href:g.href||g.to,component:(g.href||g.to)&&a==="div"?"button":a,focusVisibleClassName:fe(E.focusVisible,f),ownerState:C,className:fe(E.root,m),...g,classes:E,children:s})})});function hIe(e){return qe("MuiListItemSecondaryAction",e)}Ke("MuiListItemSecondaryAction",["root","disableGutters"]);const mIe=e=>{const{disableGutters:t,classes:n}=e;return Me({root:["root",t&&"disableGutters"]},hIe,n)},gIe=ae("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Ene=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=x.useContext(Ks),s={...r,disableGutters:a.disableGutters},l=mIe(s);return k.jsx(gIe,{className:fe(l.root,o),ownerState:s,ref:n,...i})});Ene.muiName="ListItemSecondaryAction";const yIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},vIe=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Me({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},cIe,n)},bIe=ae("div",{name:"MuiListItem",slot:"Root",overridesResolver:yIe})(dt(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${lg.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),xIe=ae("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Co=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:f,...h}={},dense:m=!1,disableGutters:g=!1,disablePadding:y=!1,divider:v=!1,secondaryAction:w,slotProps:C={},slots:E={},...I}=r,O=x.useContext(Ks),P=x.useMemo(()=>({dense:m||O.dense||!1,alignItems:o,disableGutters:g}),[o,O.dense,m,g]),R=x.useRef(null),D=x.Children.toArray(i),M=D.length&&Rg(D[D.length-1],["ListItemSecondaryAction"]),A={...r,alignItems:o,dense:P.dense,disableGutters:g,disablePadding:y,divider:v,hasSecondaryAction:M},_=vIe(A),N=en(R,n),B=E.root||l.Root||bIe,H=C.root||c.root||{},j={className:fe(_.root,H.className,a),...I};let L=s||"li";return M?(L=!j.component&&!s?"div":L,u==="li"&&(L==="li"?L="div":j.component==="li"&&(j.component="div")),k.jsx(Ks.Provider,{value:P,children:k.jsxs(xIe,{as:u,className:fe(_.container,f),ref:N,ownerState:A,...h,children:[k.jsx(B,{...H,...!Ox(B)&&{as:L,ownerState:{...A,...H.ownerState}},...j,children:D}),D.pop()]})})):k.jsx(Ks.Provider,{value:P,children:k.jsxs(B,{...H,as:L,ref:N,...!Ox(B)&&{ownerState:{...A,...H.ownerState}},...j,children:[D,w&&k.jsx(Ene,{children:w})]})})});function SIe(e){return qe("MuiListItemAvatar",e)}Ke("MuiListItemAvatar",["root","alignItemsFlexStart"]);const wIe=e=>{const{alignItems:t,classes:n}=e;return Me({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},SIe,n)},CIe=ae("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),fB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=x.useContext(Ks),s={...r,alignItems:a.alignItems},l=wIe(s);return k.jsx(CIe,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function EIe(e){return qe("MuiListItemIcon",e)}const c6=Ke("MuiListItemIcon",["root","alignItemsFlexStart"]),TIe=e=>{const{alignItems:t,classes:n}=e;return Me({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},EIe,n)},OIe=ae("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(dt(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),nl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=x.useContext(Ks),s={...r,alignItems:a.alignItems},l=TIe(s);return k.jsx(OIe,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function IIe(e){return qe("MuiListItemText",e)}const Np=Ke("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),PIe=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Me({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},IIe,t)},AIe=ae("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Np.primary}`]:t.primary},{[`& .${Np.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${YE.root}:where(& .${Np.primary})`]:{display:"block"},[`.${YE.root}:where(& .${Np.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Wr=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f,slots:h={},slotProps:m={},...g}=r,{dense:y}=x.useContext(Ks);let v=l??o,w=u;const C={...r,disableTypography:a,inset:s,primary:!!v,secondary:!!w,dense:y},E=PIe(C),I={slots:h,slotProps:{primary:c,secondary:f,...m}},[O,P]=wt("root",{className:fe(E.root,i),elementType:AIe,externalForwardedProps:{...I,...g},ownerState:C,ref:n}),[R,D]=wt("primary",{className:E.primary,elementType:at,externalForwardedProps:I,ownerState:C}),[M,A]=wt("secondary",{className:E.secondary,elementType:at,externalForwardedProps:I,ownerState:C});return v!=null&&v.type!==at&&!a&&(v=k.jsx(R,{variant:y?"body2":"body1",component:D!=null&&D.variant?void 0:"span",...D,children:v})),w!=null&&w.type!==at&&!a&&(w=k.jsx(M,{variant:"body2",color:"textSecondary",...A,children:w})),k.jsxs(O,{...P,children:[v,w]})});function $R(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function u6(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Tne(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Yb(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!Tne(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const uI=x.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu",...h}=t,m=x.useRef(null),g=x.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});In(()=>{o&&m.current.focus()},[o]),x.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(E,{direction:I})=>{const O=!m.current.style.width;if(E.clientHeight<m.current.clientHeight&&O){const P=`${xte(ns(E))}px`;m.current.style[I==="rtl"?"paddingLeft":"paddingRight"]=P,m.current.style.width=`calc(100% + ${P})`}return m.current}}),[]);const y=E=>{const I=m.current,O=E.key;if(E.ctrlKey||E.metaKey||E.altKey){u&&u(E);return}const R=Mr(I).activeElement;if(O==="ArrowDown")E.preventDefault(),Yb(I,R,c,l,$R);else if(O==="ArrowUp")E.preventDefault(),Yb(I,R,c,l,u6);else if(O==="Home")E.preventDefault(),Yb(I,null,c,l,$R);else if(O==="End")E.preventDefault(),Yb(I,null,c,l,u6);else if(O.length===1){const D=g.current,M=O.toLowerCase(),A=performance.now();D.keys.length>0&&(A-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&M!==D.keys[0]&&(D.repeating=!1)),D.lastTime=A,D.keys.push(M);const _=R&&!D.repeating&&Tne(R,D);D.previousKeyMatched&&(_||Yb(I,R,!1,l,$R,D))?E.preventDefault():D.previousKeyMatched=!1}u&&u(E)},v=en(m,n);let w=-1;x.Children.forEach(a,(E,I)=>{if(!x.isValidElement(E)){w===I&&(w+=1,w>=a.length&&(w=-1));return}E.props.disabled||(f==="selectedMenu"&&E.props.selected||w===-1)&&(w=I),w===I&&(E.props.disabled||E.props.muiSkipListHighlight||E.type.muiSkipListHighlight)&&(w+=1,w>=a.length&&(w=-1))});const C=x.Children.map(a,(E,I)=>{if(I===w){const O={};return i&&(O.autoFocus=!0),E.props.tabIndex===void 0&&f==="selectedMenu"&&(O.tabIndex=0),x.cloneElement(E,O)}return E});return k.jsx(ai,{role:"menu",ref:v,className:s,onKeyDown:y,tabIndex:o?0:-1,...h,children:C})});function MIe(e){return qe("MuiPopover",e)}Ke("MuiPopover",["root","paper"]);function d6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function f6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function p6(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function C1(e){return typeof e=="function"?e():e}const RIe=e=>{const{classes:t}=e;return Me({root:["root"],paper:["paper"]},MIe,t)},DIe=ae(lv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),One=ae(go,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),kIe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:f,elevation:h=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:v={},slotProps:w={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:E,transitionDuration:I="auto",TransitionProps:O={},disableScrollLock:P=!1,...R}=r,D=x.useRef(),M={...r,anchorOrigin:a,anchorReference:l,elevation:h,marginThreshold:m,transformOrigin:C,TransitionComponent:E,transitionDuration:I,TransitionProps:O},A=RIe(M),_=x.useCallback(()=>{if(l==="anchorPosition")return s;const le=C1(i),oe=(le&&le.nodeType===1?le:Mr(D.current).body).getBoundingClientRect();return{top:oe.top+d6(oe,a.vertical),left:oe.left+f6(oe,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),N=x.useCallback(le=>({vertical:d6(le,C.vertical),horizontal:f6(le,C.horizontal)}),[C.horizontal,C.vertical]),B=x.useCallback(le=>{const de={width:le.offsetWidth,height:le.offsetHeight},oe=N(de);if(l==="none")return{top:null,left:null,transformOrigin:p6(oe)};const ue=_();let pe=ue.top-oe.vertical,Ee=ue.left-oe.horizontal;const xe=pe+de.height,Re=Ee+de.width,he=ns(C1(i)),Pe=he.innerHeight-m,ve=he.innerWidth-m;if(m!==null&&pe<m){const Ie=pe-m;pe-=Ie,oe.vertical+=Ie}else if(m!==null&&xe>Pe){const Ie=xe-Pe;pe-=Ie,oe.vertical+=Ie}if(m!==null&&Ee<m){const Ie=Ee-m;Ee-=Ie,oe.horizontal+=Ie}else if(Re>ve){const Ie=Re-ve;Ee-=Ie,oe.horizontal+=Ie}return{top:`${Math.round(pe)}px`,left:`${Math.round(Ee)}px`,transformOrigin:p6(oe)}},[i,l,_,N,m]),[H,j]=x.useState(g),L=x.useCallback(()=>{const le=D.current;if(!le)return;const de=B(le);de.top!==null&&le.style.setProperty("top",de.top),de.left!==null&&(le.style.left=de.left),le.style.transformOrigin=de.transformOrigin,j(!0)},[B]);x.useEffect(()=>(P&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[i,P,L]);const V=()=>{L()},W=()=>{j(!1)};x.useEffect(()=>{g&&L()}),x.useImperativeHandle(o,()=>g?{updatePosition:()=>{L()}}:null,[g,L]),x.useEffect(()=>{if(!g)return;const le=$h(()=>{L()}),de=ns(C1(i));return de.addEventListener("resize",le),()=>{le.clear(),de.removeEventListener("resize",le)}},[i,g,L]);let K=I;const G={slots:{transition:E,...v},slotProps:{transition:O,paper:y,...w}},[q,Y]=wt("transition",{elementType:mh,externalForwardedProps:G,ownerState:M,getSlotProps:le=>({...le,onEntering:(de,oe)=>{var ue;(ue=le.onEntering)==null||ue.call(le,de,oe),V()},onExited:de=>{var oe;(oe=le.onExited)==null||oe.call(le,de),W()}}),additionalProps:{appear:!0,in:g}});I==="auto"&&!q.muiSupportAuto&&(K=void 0);const Z=f||(i?Mr(C1(i)).body:void 0),[ie,{slots:se,slotProps:ce,...ye}]=wt("root",{ref:n,elementType:DIe,externalForwardedProps:{...G,...R},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:qj(typeof w.backdrop=="function"?w.backdrop(M):w.backdrop,{invisible:!0})},container:Z,open:g},ownerState:M,className:fe(A.root,u)}),[Se,ne]=wt("paper",{ref:D,className:A.paper,elementType:One,externalForwardedProps:G,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:H?void 0:{opacity:0}},ownerState:M});return k.jsx(ie,{...ye,...!Ox(ie)&&{slots:se,slotProps:ce,disableScrollLock:P},children:k.jsx(q,{...Y,timeout:K,children:k.jsx(Se,{...ne,children:c})})})});function _Ie(e){return qe("MuiMenu",e)}Ke("MuiMenu",["root","paper","list"]);const $Ie={vertical:"top",horizontal:"right"},NIe={vertical:"top",horizontal:"left"},LIe=e=>{const{classes:t}=e;return Me({root:["root"],paper:["paper"],list:["list"]},_Ie,t)},FIe=ae(kIe,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jIe=ae(One,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),BIe=ae(uI,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ss=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:g,...y}={},variant:v="selectedMenu",slots:w={},slotProps:C={},...E}=r,I=vr(),O={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:y,variant:v},P=LIe(O),R=o&&!s&&u,D=x.useRef(null),M=(K,G)=>{D.current&&D.current.adjustStyleForScrollbar(K,{direction:I?"rtl":"ltr"}),g&&g(K,G)},A=K=>{K.key==="Tab"&&(K.preventDefault(),c&&c(K,"tabKeyDown"))};let _=-1;x.Children.map(i,(K,G)=>{x.isValidElement(K)&&(K.props.disabled||(v==="selectedMenu"&&K.props.selected||_===-1)&&(_=G))});const N={slots:w,slotProps:{list:l,transition:y,paper:f,...C}},B=Dn({elementType:w.root,externalSlotProps:C.root,ownerState:O,className:[P.root,a]}),[H,j]=wt("paper",{className:P.paper,elementType:jIe,externalForwardedProps:N,shouldForwardComponentProp:!0,ownerState:O}),[L,V]=wt("list",{className:fe(P.list,l.className),elementType:BIe,shouldForwardComponentProp:!0,externalForwardedProps:N,getSlotProps:K=>({...K,onKeyDown:G=>{var q;A(G),(q=K.onKeyDown)==null||q.call(K,G)}}),ownerState:O}),W=typeof N.slotProps.transition=="function"?N.slotProps.transition(O):N.slotProps.transition;return k.jsx(FIe,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:I?"right":"left"},transformOrigin:I?$Ie:NIe,slots:{root:w.root,paper:H,backdrop:w.backdrop,...w.transition&&{transition:w.transition}},slotProps:{root:B,paper:j,backdrop:typeof C.backdrop=="function"?C.backdrop(O):C.backdrop,transition:{...W,onEntering:(...K)=>{var G;M(...K),(G=W==null?void 0:W.onEntering)==null||G.call(W,...K)}}},open:u,ref:n,transitionDuration:m,ownerState:O,...E,classes:h,children:k.jsx(L,{actions:D,autoFocus:o&&(_===-1||s),autoFocusItem:R,variant:v,...V,children:i})})});function zIe(e){return qe("MuiMenuItem",e)}const Qb=Ke("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),VIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},HIe=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=Me({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},zIe,a);return{...a,...l}},UIe=ae(la,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:VIe})(dt(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qb.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qb.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Qb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${o6.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${o6.inset}`]:{marginLeft:52},[`& .${Np.root}`]:{marginTop:0,marginBottom:0},[`& .${Np.inset}`]:{paddingLeft:36},[`& .${c6.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${c6.root} svg`]:{fontSize:"1.25rem"}}}]}))),Jt=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:h,...m}=r,g=x.useContext(Ks),y=x.useMemo(()=>({dense:a||g.dense||!1,disableGutters:l}),[g.dense,a,l]),v=x.useRef(null);In(()=>{o&&v.current&&v.current.focus()},[o]);const w={...r,dense:y.dense,divider:s,disableGutters:l},C=HIe(r),E=en(v,n);let I;return r.disabled||(I=f!==void 0?f:-1),k.jsx(Ks.Provider,{value:y,children:k.jsx(UIe,{ref:E,role:u,tabIndex:I,component:i,focusVisibleClassName:fe(C.focusVisible,c),className:fe(C.root,h),...m,ownerState:w,classes:C})})});function GIe(e){return qe("MuiNativeSelect",e)}const pB=Ke("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),qIe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Oe(n)}`,i&&"iconOpen",r&&"disabled"]};return Me(s,GIe,t)},Ine=ae("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${pB.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),WIe=ae(Ine,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ui,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${pB.multiple}`]:t.multiple}]}})({}),Pne=ae("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${pB.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),KIe=ae(Pne,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Oe(n.variant)}`],n.open&&t.iconOpen]}})({}),YIe=x.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},f=qIe(u);return k.jsxs(x.Fragment,{children:[k.jsx(WIe,{ownerState:u,className:fe(f.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:k.jsx(KIe,{as:a,ownerState:u,className:f.icon})]})});var h6;const QIe=ae("fieldset",{shouldForwardProp:ui})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),XIe=ae("legend",{shouldForwardProp:ui})(dt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function JIe(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return k.jsx(QIe,{"aria-hidden":!0,className:r,ownerState:l,...a,children:k.jsx(XIe,{ownerState:l,children:s?k.jsx("span",{children:o}):h6||(h6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const ZIe=e=>{const{classes:t}=e,r=Me({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},w1e,t);return{...t,...r}},ePe=ae(lI,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:aI})(dt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rs.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Rs.focused} .${Rs.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(er()).map(([n])=>({props:{color:n},style:{[`&.${Rs.focused} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Rs.error} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Rs.disabled} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),tPe=ae(JIe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(dt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),nPe=ae(cI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:sI})(dt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),hB=x.forwardRef(function(t,n){var r;const o=pt({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:f={},type:h="text",...m}=o,g=ZIe(o),y=sl(),v=Nf({props:o,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:y,fullWidth:a,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:h},C=f.root??i.Root??ePe,E=f.input??i.Input??nPe;return k.jsx(iw,{slots:{root:C,input:E},renderSuffix:I=>k.jsx(tPe,{ownerState:w,className:g.notchedOutline,label:l!=null&&l!==""&&v.required?r||(r=k.jsxs(x.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(I.startAdornment||I.filled||I.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:h,...m,classes:{...g,notchedOutline:null}})});hB.muiName="Input";function rPe(e){return qe("MuiPagination",e)}Ke("MuiPagination",["root","ul","outlined","text"]);function oPe(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:f=!1,siblingCount:h=1,...m}=e,[g,y]=ia({controlled:c,default:o,name:n,state:"page"}),v=(M,A)=>{c||y(A),l&&l(M,A)},w=(M,A)=>{const _=A-M+1;return Array.from({length:_},(N,B)=>M+B)},C=w(1,Math.min(t,r)),E=w(Math.max(r-t+1,t+1),r),I=Math.max(Math.min(g-h,r-t-h*2-1),t+2),O=Math.min(Math.max(g+h,t+h*2+2),r-t-1),P=[...u?["first"]:[],...s?[]:["previous"],...C,...I>t+2?["start-ellipsis"]:t+1<r-t?[t+1]:[],...w(I,O),...O<r-t-1?["end-ellipsis"]:r-t>t?[r-t]:[],...E,...a?[]:["next"],...f?["last"]:[]],R=M=>{switch(M){case"first":return 1;case"previous":return g-1;case"next":return g+1;case"last":return r;default:return null}};return{items:P.map(M=>typeof M=="number"?{onClick:A=>{v(A,M)},type:"page",page:M,selected:M===g,disabled:i,"aria-current":M===g?"page":void 0}:{onClick:A=>{v(A,R(M))},type:M,page:R(M),selected:!1,disabled:i||!M.includes("ellipsis")&&(M==="next"||M==="last"?g>=r:g<=1)}),...m}}function iPe(e){return qe("MuiPaginationItem",e)}const Wi=Ke("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),Ane=Ot(k.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),Mne=Ot(k.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),aPe=Ot(k.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),sPe=Ot(k.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Rne=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Oe(n.size)}`],n.variant==="text"&&t[`text${Oe(n.color)}`],n.variant==="outlined"&&t[`outlined${Oe(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},lPe=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Oe(i)}`,l,a,n!=="standard"&&`color${Oe(n)}`,n!=="standard"&&`${l}${Oe(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return Me(c,iPe,t)},cPe=ae("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:Rne})(dt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Wi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),uPe=ae(la,{name:"MuiPaginationItem",slot:"Root",overridesResolver:Rne})(dt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Wi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Wi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wi.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Wi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Wi.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Wi.selected}`]:{[`&.${Wi.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Wi.selected}`]:{[`&.${Wi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(er(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Wi.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Wi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Wi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(er(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Wi.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:Nt(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:Nt(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),dPe=ae("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(dt(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),fPe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:f="circular",size:h="medium",slots:m={},slotProps:g={},type:y="page",variant:v="text",...w}=r,C={...r,color:i,disabled:l,selected:u,shape:f,size:h,type:y,variant:v},E=vr(),I=lPe(C),O={slots:{previous:m.previous??s.previous,next:m.next??s.next,first:m.first??s.first,last:m.last??s.last},slotProps:g},[P,R]=wt("previous",{elementType:aPe,externalForwardedProps:O,ownerState:C}),[D,M]=wt("next",{elementType:sPe,externalForwardedProps:O,ownerState:C}),[A,_]=wt("first",{elementType:Ane,externalForwardedProps:O,ownerState:C}),[N,B]=wt("last",{elementType:Mne,externalForwardedProps:O,ownerState:C}),H=E?{previous:"next",next:"previous",first:"last",last:"first"}[y]:y,j={previous:P,next:D,first:A,last:N}[H],L={previous:R,next:M,first:_,last:B}[H];return y==="start-ellipsis"||y==="end-ellipsis"?k.jsx(cPe,{ref:n,ownerState:C,className:fe(I.root,o),children:"…"}):k.jsxs(uPe,{ref:n,ownerState:C,component:a,disabled:l,className:fe(I.root,o),...w,children:[y==="page"&&c,j?k.jsx(dPe,{...L,className:I.icon,as:j}):null]})}),pPe=e=>{const{classes:t,variant:n}=e;return Me({root:["root",n],ul:["ul"]},rPe,t)},hPe=ae("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),mPe=ae("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function gPe(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const yPe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=gPe,hideNextButton:f=!1,hidePrevButton:h=!1,onChange:m,page:g,renderItem:y=A=>k.jsx(fPe,{...A}),shape:v="circular",showFirstButton:w=!1,showLastButton:C=!1,siblingCount:E=1,size:I="medium",variant:O="text",...P}=r,{items:R}=oPe({...r,componentName:"Pagination"}),D={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:f,hidePrevButton:h,renderItem:y,shape:v,showFirstButton:w,showLastButton:C,siblingCount:E,size:I,variant:O},M=pPe(D);return k.jsx(hPe,{"aria-label":"pagination navigation",className:fe(M.root,i),ownerState:D,ref:n,...P,children:k.jsx(mPe,{className:M.ul,ownerState:D,children:R.map((A,_)=>k.jsx("li",{children:y({...A,color:a,"aria-label":u(A.type,A.page,A.selected),shape:v,size:I,variant:O})},_))})})});function Dne(e){return qe("MuiSelect",e)}const Xb=Ke("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var m6;const vPe=ae(Ine,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Xb.select}`]:t.select},{[`&.${Xb.select}`]:t[n.variant]},{[`&.${Xb.error}`]:t.error},{[`&.${Xb.multiple}`]:t.multiple}]}})({[`&.${Xb.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),bPe=ae(Pne,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Oe(n.variant)}`],n.open&&t.iconOpen]}})({}),xPe=ae("input",{shouldForwardProp:e=>Nte(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function g6(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function SPe(e){return e==null||typeof e=="string"&&!e.trim()}const wPe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Oe(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Me(s,Dne,t)},CPe=x.forwardRef(function(t,n){var nt;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:f,displayEmpty:h,error:m=!1,IconComponent:g,inputRef:y,labelId:v,MenuProps:w={},multiple:C,name:E,onBlur:I,onChange:O,onClose:P,onFocus:R,onOpen:D,open:M,readOnly:A,renderValue:_,required:N,SelectDisplayProps:B={},tabIndex:H,type:j,value:L,variant:V="standard",...W}=t,[K,G]=ia({controlled:L,default:u,name:"Select"}),[q,Y]=ia({controlled:M,default:c,name:"Select"}),Z=x.useRef(null),ie=x.useRef(null),[se,ce]=x.useState(null),{current:ye}=x.useRef(M!=null),[Se,ne]=x.useState(),le=en(n,y),de=x.useCallback(lt=>{ie.current=lt,lt&&ce(lt)},[]),oe=se==null?void 0:se.parentNode;x.useImperativeHandle(le,()=>({focus:()=>{ie.current.focus()},node:Z.current,value:K}),[K]),x.useEffect(()=>{c&&q&&se&&!ye&&(ne(a?null:oe.clientWidth),ie.current.focus())},[se,a]),x.useEffect(()=>{i&&ie.current.focus()},[i]),x.useEffect(()=>{if(!v)return;const lt=Mr(ie.current).getElementById(v);if(lt){const vt=()=>{getSelection().isCollapsed&&ie.current.focus()};return lt.addEventListener("click",vt),()=>{lt.removeEventListener("click",vt)}}},[v]);const ue=(lt,vt)=>{lt?D&&D(vt):P&&P(vt),ye||(ne(a?null:oe.clientWidth),Y(lt))},pe=lt=>{lt.button===0&&(lt.preventDefault(),ie.current.focus(),ue(!0,lt))},Ee=lt=>{ue(!1,lt)},xe=x.Children.toArray(s),Re=lt=>{const vt=xe.find(bt=>bt.props.value===lt.target.value);vt!==void 0&&(G(vt.props.value),O&&O(lt,vt))},he=lt=>vt=>{let bt;if(vt.currentTarget.hasAttribute("tabindex")){if(C){bt=Array.isArray(K)?K.slice():[];const vn=K.indexOf(lt.props.value);vn===-1?bt.push(lt.props.value):bt.splice(vn,1)}else bt=lt.props.value;if(lt.props.onClick&&lt.props.onClick(vt),K!==bt&&(G(bt),O)){const vn=vt.nativeEvent||vt,kn=new vn.constructor(vn.type,vn);Object.defineProperty(kn,"target",{writable:!0,value:{value:bt,name:E}}),O(kn,lt)}C||ue(!1,vt)}},Pe=lt=>{A||[" ","ArrowUp","ArrowDown","Enter"].includes(lt.key)&&(lt.preventDefault(),ue(!0,lt))},ve=se!==null&&q,Ie=lt=>{!ve&&I&&(Object.defineProperty(lt,"target",{writable:!0,value:{value:K,name:E}}),I(lt))};delete W["aria-invalid"];let te,Te;const De=[];let Ve=!1;(XE({value:K})||h)&&(_?te=_(K):Ve=!0);const We=xe.map(lt=>{if(!x.isValidElement(lt))return null;let vt;if(C){if(!Array.isArray(K))throw new Error(Bu(2));vt=K.some(bt=>g6(bt,lt.props.value)),vt&&Ve&&De.push(lt.props.children)}else vt=g6(K,lt.props.value),vt&&Ve&&(Te=lt.props.children);return x.cloneElement(lt,{"aria-selected":vt?"true":"false",onClick:he(lt),onKeyUp:bt=>{bt.key===" "&&bt.preventDefault(),lt.props.onKeyUp&&lt.props.onKeyUp(bt)},role:"option",selected:vt,value:void 0,"data-value":lt.props.value})});Ve&&(C?De.length===0?te=null:te=De.reduce((lt,vt,bt)=>(lt.push(vt),bt<De.length-1&&lt.push(", "),lt),[]):te=Te);let rt=Se;!a&&ye&&se&&(rt=oe.clientWidth);let ut;typeof H<"u"?ut=H:ut=f?null:0;const Be=B.id||(E?`mui-component-select-${E}`:void 0),et={...t,variant:V,value:K,open:ve,error:m},Le=wPe(et),It={...w.PaperProps,...(nt=w.slotProps)==null?void 0:nt.paper},Lt=bn();return k.jsxs(x.Fragment,{children:[k.jsx(vPe,{as:"div",ref:de,tabIndex:ut,role:"combobox","aria-controls":ve?Lt:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[v,Be].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":N?"true":void 0,"aria-invalid":m?"true":void 0,onKeyDown:Pe,onMouseDown:f||A?null:pe,onBlur:Ie,onFocus:R,...B,ownerState:et,className:fe(B.className,Le.select,l),id:Be,children:SPe(te)?m6||(m6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):te}),k.jsx(xPe,{"aria-invalid":m,value:Array.isArray(K)?K.join(","):K,name:E,ref:Z,"aria-hidden":!0,onChange:Re,tabIndex:-1,disabled:f,className:Le.nativeInput,autoFocus:i,required:N,...W,ownerState:et}),k.jsx(bPe,{as:g,className:Le.icon,ownerState:et}),k.jsx(ss,{id:`menu-${E||""}`,anchorEl:oe,open:ve,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...w,slotProps:{...w.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:Lt,...w.MenuListProps},paper:{...It,style:{minWidth:rt,...It!=null?It.style:null}}},children:We})]})}),EPe=e=>{const{classes:t}=e,r=Me({root:["root"]},Dne,t);return{...t,...r}},mB={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ui(e)&&e!=="variant",slot:"Root"},TPe=ae(uB,mB)(""),OPe=ae(hB,mB)(""),IPe=ae(cB,mB)(""),Lf=x.forwardRef(function(t,n){const r=pt({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=une,id:f,input:h,inputProps:m,label:g,labelId:y,MenuProps:v,multiple:w=!1,native:C=!1,onClose:E,onOpen:I,open:O,renderValue:P,SelectDisplayProps:R,variant:D="outlined",...M}=r,A=C?YIe:CPe,_=sl(),N=Nf({props:r,muiFormControl:_,states:["variant","error"]}),B=N.variant||D,H={...r,variant:B,classes:a},j=EPe(H),{root:L,...V}=j,W=h||{standard:k.jsx(TPe,{ownerState:H}),outlined:k.jsx(OPe,{label:g,ownerState:H}),filled:k.jsx(IPe,{ownerState:H})}[B],K=en(n,_f(W));return k.jsx(x.Fragment,{children:x.cloneElement(W,{inputComponent:A,inputProps:{children:i,error:N.error,IconComponent:u,variant:B,type:void 0,multiple:w,...C?{id:f}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:y,MenuProps:v,onClose:E,onOpen:I,open:O,renderValue:P,SelectDisplayProps:{id:f,...R}},...m,classes:m?si(V,m.classes):V,...h?h.props.inputProps:{}},...(w&&C||c)&&B==="outlined"?{notched:!0}:{},ref:K,className:fe(W.props.className,s,j.root),...!h&&{variant:B},...M})})});Lf.muiName="Select";function PPe(e){return qe("MuiSkeleton",e)}Ke("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const APe=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return Me({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},PPe,t)},MN=il`
+`,nIe=typeof MN!="string"?$f`
+ animation: ${MN} 3s infinite linear;
+ `:null,rIe=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Oe(r)}`,n],dashed:["dashed",`dashedColor${Oe(r)}`],bar1:["bar","bar1",`barColor${Oe(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar","bar2",n!=="buffer"&&`barColor${Oe(r)}`,n==="buffer"&&`color${Oe(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Me(o,ZOe,t)},fB=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Hu(e.palette[t].main,.62):Vu(e.palette[t].main,.5),oIe=ae("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Oe(n.color)}`],t[n.variant]]}})(dt(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{backgroundColor:fB(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),iIe=ae("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Oe(n.color)}`]]}})(dt(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(er()).map(([t])=>{const n=fB(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),nIe||{animation:`${MN} 3s infinite linear`}),aIe=ae("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${Oe(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(dt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${IN}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${IN}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:eIe||{animation:`${PN} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),sIe=ae("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${Oe(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(dt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:fB(e,t),transition:`transform .${IN}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:tIe||{animation:`${AN} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),Ene=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},f=rIe(u),p=vr(),m={},g={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){m["aria-valuenow"]=Math.round(a),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let y=a-100;p&&(y=-y),g.bar1.transform=`translateX(${y}%)`}if(l==="buffer"&&s!==void 0){let y=(s||0)-100;p&&(y=-y),g.bar2.transform=`translateX(${y}%)`}return k.jsxs(oIe,{className:fe(f.root,o),ownerState:u,role:"progressbar",...m,ref:n,...c,children:[l==="buffer"?k.jsx(iIe,{className:f.dashed,ownerState:u}):null,k.jsx(aIe,{className:f.bar1,ownerState:u,style:g.bar1}),l==="determinate"?null:k.jsx(sIe,{className:f.bar2,ownerState:u,style:g.bar2})]})}),Ks=x.createContext({});function lIe(e){return qe("MuiList",e)}Ke("MuiList",["root","padding","dense","subheader"]);const cIe=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Me({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},lIe,t)},uIe=ae("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),ai=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,f=x.useMemo(()=>({dense:s}),[s]),p={...r,component:a,dense:s,disablePadding:l},m=cIe(p);return k.jsx(Ks.Provider,{value:f,children:k.jsxs(uIe,{as:a,className:fe(m.root,i),ref:n,ownerState:p,...u,children:[c,o]})})});function dIe(e){return qe("MuiListItem",e)}Ke("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function fIe(e){return qe("MuiListItemButton",e)}const cg=Ke("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),pIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},hIe=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=Me({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},fIe,n);return{...n,...c}},mIe=ae(la,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:pIe})(dt(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${cg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${cg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${cg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${cg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${cg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Bl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:p=!1,className:m,...g}=r,y=x.useContext(Ks),v=x.useMemo(()=>({dense:l||y.dense||!1,alignItems:o,disableGutters:c}),[o,y.dense,l,c]),w=x.useRef(null);In(()=>{i&&w.current&&w.current.focus()},[i]);const C={...r,alignItems:o,dense:v.dense,disableGutters:c,divider:u,selected:p},E=hIe(C),I=en(w,n);return k.jsx(Ks.Provider,{value:v,children:k.jsx(mIe,{ref:I,href:g.href||g.to,component:(g.href||g.to)&&a==="div"?"button":a,focusVisibleClassName:fe(E.focusVisible,f),ownerState:C,className:fe(E.root,m),...g,classes:E,children:s})})});function gIe(e){return qe("MuiListItemSecondaryAction",e)}Ke("MuiListItemSecondaryAction",["root","disableGutters"]);const yIe=e=>{const{disableGutters:t,classes:n}=e;return Me({root:["root",t&&"disableGutters"]},gIe,n)},vIe=ae("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Tne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=x.useContext(Ks),s={...r,disableGutters:a.disableGutters},l=yIe(s);return k.jsx(vIe,{className:fe(l.root,o),ownerState:s,ref:n,...i})});Tne.muiName="ListItemSecondaryAction";const bIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},xIe=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Me({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},dIe,n)},SIe=ae("div",{name:"MuiListItem",slot:"Root",overridesResolver:bIe})(dt(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${cg.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),wIe=ae("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Co=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:f,...p}={},dense:m=!1,disableGutters:g=!1,disablePadding:y=!1,divider:v=!1,secondaryAction:w,slotProps:C={},slots:E={},...I}=r,O=x.useContext(Ks),P=x.useMemo(()=>({dense:m||O.dense||!1,alignItems:o,disableGutters:g}),[o,O.dense,m,g]),R=x.useRef(null),D=x.Children.toArray(i),M=D.length&&Dg(D[D.length-1],["ListItemSecondaryAction"]),A={...r,alignItems:o,dense:P.dense,disableGutters:g,disablePadding:y,divider:v,hasSecondaryAction:M},_=xIe(A),N=en(R,n),B=E.root||l.Root||SIe,H=C.root||c.root||{},j={className:fe(_.root,H.className,a),...I};let L=s||"li";return M?(L=!j.component&&!s?"div":L,u==="li"&&(L==="li"?L="div":j.component==="li"&&(j.component="div")),k.jsx(Ks.Provider,{value:P,children:k.jsxs(wIe,{as:u,className:fe(_.container,f),ref:N,ownerState:A,...p,children:[k.jsx(B,{...H,...!Ox(B)&&{as:L,ownerState:{...A,...H.ownerState}},...j,children:D}),D.pop()]})})):k.jsx(Ks.Provider,{value:P,children:k.jsxs(B,{...H,as:L,ref:N,...!Ox(B)&&{ownerState:{...A,...H.ownerState}},...j,children:[D,w&&k.jsx(Tne,{children:w})]})})});function CIe(e){return qe("MuiListItemAvatar",e)}Ke("MuiListItemAvatar",["root","alignItemsFlexStart"]);const EIe=e=>{const{alignItems:t,classes:n}=e;return Me({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},CIe,n)},TIe=ae("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),pB=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=x.useContext(Ks),s={...r,alignItems:a.alignItems},l=EIe(s);return k.jsx(TIe,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function OIe(e){return qe("MuiListItemIcon",e)}const c6=Ke("MuiListItemIcon",["root","alignItemsFlexStart"]),IIe=e=>{const{alignItems:t,classes:n}=e;return Me({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},OIe,n)},PIe=ae("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(dt(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),rl=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=x.useContext(Ks),s={...r,alignItems:a.alignItems},l=IIe(s);return k.jsx(PIe,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function AIe(e){return qe("MuiListItemText",e)}const Fp=Ke("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),MIe=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Me({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},AIe,t)},RIe=ae("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Fp.primary}`]:t.primary},{[`& .${Fp.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${QE.root}:where(& .${Fp.primary})`]:{display:"block"},[`.${QE.root}:where(& .${Fp.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Wr=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f,slots:p={},slotProps:m={},...g}=r,{dense:y}=x.useContext(Ks);let v=l??o,w=u;const C={...r,disableTypography:a,inset:s,primary:!!v,secondary:!!w,dense:y},E=MIe(C),I={slots:p,slotProps:{primary:c,secondary:f,...m}},[O,P]=wt("root",{className:fe(E.root,i),elementType:RIe,externalForwardedProps:{...I,...g},ownerState:C,ref:n}),[R,D]=wt("primary",{className:E.primary,elementType:at,externalForwardedProps:I,ownerState:C}),[M,A]=wt("secondary",{className:E.secondary,elementType:at,externalForwardedProps:I,ownerState:C});return v!=null&&v.type!==at&&!a&&(v=k.jsx(R,{variant:y?"body2":"body1",component:D!=null&&D.variant?void 0:"span",...D,children:v})),w!=null&&w.type!==at&&!a&&(w=k.jsx(M,{variant:"body2",color:"textSecondary",...A,children:w})),k.jsxs(O,{...P,children:[v,w]})});function NR(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function u6(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function One(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Yb(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!One(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const dI=x.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu",...p}=t,m=x.useRef(null),g=x.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});In(()=>{o&&m.current.focus()},[o]),x.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(E,{direction:I})=>{const O=!m.current.style.width;if(E.clientHeight<m.current.clientHeight&&O){const P=`${Ste(ns(E))}px`;m.current.style[I==="rtl"?"paddingLeft":"paddingRight"]=P,m.current.style.width=`calc(100% + ${P})`}return m.current}}),[]);const y=E=>{const I=m.current,O=E.key;if(E.ctrlKey||E.metaKey||E.altKey){u&&u(E);return}const R=Mr(I).activeElement;if(O==="ArrowDown")E.preventDefault(),Yb(I,R,c,l,NR);else if(O==="ArrowUp")E.preventDefault(),Yb(I,R,c,l,u6);else if(O==="Home")E.preventDefault(),Yb(I,null,c,l,NR);else if(O==="End")E.preventDefault(),Yb(I,null,c,l,u6);else if(O.length===1){const D=g.current,M=O.toLowerCase(),A=performance.now();D.keys.length>0&&(A-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&M!==D.keys[0]&&(D.repeating=!1)),D.lastTime=A,D.keys.push(M);const _=R&&!D.repeating&&One(R,D);D.previousKeyMatched&&(_||Yb(I,R,!1,l,NR,D))?E.preventDefault():D.previousKeyMatched=!1}u&&u(E)},v=en(m,n);let w=-1;x.Children.forEach(a,(E,I)=>{if(!x.isValidElement(E)){w===I&&(w+=1,w>=a.length&&(w=-1));return}E.props.disabled||(f==="selectedMenu"&&E.props.selected||w===-1)&&(w=I),w===I&&(E.props.disabled||E.props.muiSkipListHighlight||E.type.muiSkipListHighlight)&&(w+=1,w>=a.length&&(w=-1))});const C=x.Children.map(a,(E,I)=>{if(I===w){const O={};return i&&(O.autoFocus=!0),E.props.tabIndex===void 0&&f==="selectedMenu"&&(O.tabIndex=0),x.cloneElement(E,O)}return E});return k.jsx(ai,{role:"menu",ref:v,className:s,onKeyDown:y,tabIndex:o?0:-1,...p,children:C})});function DIe(e){return qe("MuiPopover",e)}Ke("MuiPopover",["root","paper"]);function d6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function f6(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function p6(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function E1(e){return typeof e=="function"?e():e}const kIe=e=>{const{classes:t}=e;return Me({root:["root"],paper:["paper"]},DIe,t)},_Ie=ae(cv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ine=ae(go,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),$Ie=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:f,elevation:p=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:v={},slotProps:w={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:E,transitionDuration:I="auto",TransitionProps:O={},disableScrollLock:P=!1,...R}=r,D=x.useRef(),M={...r,anchorOrigin:a,anchorReference:l,elevation:p,marginThreshold:m,transformOrigin:C,TransitionComponent:E,transitionDuration:I,TransitionProps:O},A=kIe(M),_=x.useCallback(()=>{if(l==="anchorPosition")return s;const le=E1(i),oe=(le&&le.nodeType===1?le:Mr(D.current).body).getBoundingClientRect();return{top:oe.top+d6(oe,a.vertical),left:oe.left+f6(oe,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),N=x.useCallback(le=>({vertical:d6(le,C.vertical),horizontal:f6(le,C.horizontal)}),[C.horizontal,C.vertical]),B=x.useCallback(le=>{const de={width:le.offsetWidth,height:le.offsetHeight},oe=N(de);if(l==="none")return{top:null,left:null,transformOrigin:p6(oe)};const ue=_();let pe=ue.top-oe.vertical,Ee=ue.left-oe.horizontal;const xe=pe+de.height,Re=Ee+de.width,he=ns(E1(i)),Pe=he.innerHeight-m,ve=he.innerWidth-m;if(m!==null&&pe<m){const Ie=pe-m;pe-=Ie,oe.vertical+=Ie}else if(m!==null&&xe>Pe){const Ie=xe-Pe;pe-=Ie,oe.vertical+=Ie}if(m!==null&&Ee<m){const Ie=Ee-m;Ee-=Ie,oe.horizontal+=Ie}else if(Re>ve){const Ie=Re-ve;Ee-=Ie,oe.horizontal+=Ie}return{top:`${Math.round(pe)}px`,left:`${Math.round(Ee)}px`,transformOrigin:p6(oe)}},[i,l,_,N,m]),[H,j]=x.useState(g),L=x.useCallback(()=>{const le=D.current;if(!le)return;const de=B(le);de.top!==null&&le.style.setProperty("top",de.top),de.left!==null&&(le.style.left=de.left),le.style.transformOrigin=de.transformOrigin,j(!0)},[B]);x.useEffect(()=>(P&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[i,P,L]);const V=()=>{L()},W=()=>{j(!1)};x.useEffect(()=>{g&&L()}),x.useImperativeHandle(o,()=>g?{updatePosition:()=>{L()}}:null,[g,L]),x.useEffect(()=>{if(!g)return;const le=Lh(()=>{L()}),de=ns(E1(i));return de.addEventListener("resize",le),()=>{le.clear(),de.removeEventListener("resize",le)}},[i,g,L]);let K=I;const G={slots:{transition:E,...v},slotProps:{transition:O,paper:y,...w}},[q,Y]=wt("transition",{elementType:yh,externalForwardedProps:G,ownerState:M,getSlotProps:le=>({...le,onEntering:(de,oe)=>{var ue;(ue=le.onEntering)==null||ue.call(le,de,oe),V()},onExited:de=>{var oe;(oe=le.onExited)==null||oe.call(le,de),W()}}),additionalProps:{appear:!0,in:g}});I==="auto"&&!q.muiSupportAuto&&(K=void 0);const Z=f||(i?Mr(E1(i)).body:void 0),[ie,{slots:se,slotProps:ce,...ye}]=wt("root",{ref:n,elementType:_Ie,externalForwardedProps:{...G,...R},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:Wj(typeof w.backdrop=="function"?w.backdrop(M):w.backdrop,{invisible:!0})},container:Z,open:g},ownerState:M,className:fe(A.root,u)}),[Se,ne]=wt("paper",{ref:D,className:A.paper,elementType:Ine,externalForwardedProps:G,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:H?void 0:{opacity:0}},ownerState:M});return k.jsx(ie,{...ye,...!Ox(ie)&&{slots:se,slotProps:ce,disableScrollLock:P},children:k.jsx(q,{...Y,timeout:K,children:k.jsx(Se,{...ne,children:c})})})});function NIe(e){return qe("MuiMenu",e)}Ke("MuiMenu",["root","paper","list"]);const LIe={vertical:"top",horizontal:"right"},FIe={vertical:"top",horizontal:"left"},jIe=e=>{const{classes:t}=e;return Me({root:["root"],paper:["paper"],list:["list"]},NIe,t)},BIe=ae($Ie,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),zIe=ae(Ine,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),VIe=ae(dI,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ss=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:f={},PopoverClasses:p,transitionDuration:m="auto",TransitionProps:{onEntering:g,...y}={},variant:v="selectedMenu",slots:w={},slotProps:C={},...E}=r,I=vr(),O={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:y,variant:v},P=jIe(O),R=o&&!s&&u,D=x.useRef(null),M=(K,G)=>{D.current&&D.current.adjustStyleForScrollbar(K,{direction:I?"rtl":"ltr"}),g&&g(K,G)},A=K=>{K.key==="Tab"&&(K.preventDefault(),c&&c(K,"tabKeyDown"))};let _=-1;x.Children.map(i,(K,G)=>{x.isValidElement(K)&&(K.props.disabled||(v==="selectedMenu"&&K.props.selected||_===-1)&&(_=G))});const N={slots:w,slotProps:{list:l,transition:y,paper:f,...C}},B=Dn({elementType:w.root,externalSlotProps:C.root,ownerState:O,className:[P.root,a]}),[H,j]=wt("paper",{className:P.paper,elementType:zIe,externalForwardedProps:N,shouldForwardComponentProp:!0,ownerState:O}),[L,V]=wt("list",{className:fe(P.list,l.className),elementType:VIe,shouldForwardComponentProp:!0,externalForwardedProps:N,getSlotProps:K=>({...K,onKeyDown:G=>{var q;A(G),(q=K.onKeyDown)==null||q.call(K,G)}}),ownerState:O}),W=typeof N.slotProps.transition=="function"?N.slotProps.transition(O):N.slotProps.transition;return k.jsx(BIe,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:I?"right":"left"},transformOrigin:I?LIe:FIe,slots:{root:w.root,paper:H,backdrop:w.backdrop,...w.transition&&{transition:w.transition}},slotProps:{root:B,paper:j,backdrop:typeof C.backdrop=="function"?C.backdrop(O):C.backdrop,transition:{...W,onEntering:(...K)=>{var G;M(...K),(G=W==null?void 0:W.onEntering)==null||G.call(W,...K)}}},open:u,ref:n,transitionDuration:m,ownerState:O,...E,classes:p,children:k.jsx(L,{actions:D,autoFocus:o&&(_===-1||s),autoFocusItem:R,variant:v,...V,children:i})})});function HIe(e){return qe("MuiMenuItem",e)}const Qb=Ke("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),UIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},GIe=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=Me({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},HIe,a);return{...a,...l}},qIe=ae(la,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:UIe})(dt(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qb.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qb.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Qb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${o6.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${o6.inset}`]:{marginLeft:52},[`& .${Fp.root}`]:{marginTop:0,marginBottom:0},[`& .${Fp.inset}`]:{paddingLeft:36},[`& .${c6.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${c6.root} svg`]:{fontSize:"1.25rem"}}}]}))),Zt=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:p,...m}=r,g=x.useContext(Ks),y=x.useMemo(()=>({dense:a||g.dense||!1,disableGutters:l}),[g.dense,a,l]),v=x.useRef(null);In(()=>{o&&v.current&&v.current.focus()},[o]);const w={...r,dense:y.dense,divider:s,disableGutters:l},C=GIe(r),E=en(v,n);let I;return r.disabled||(I=f!==void 0?f:-1),k.jsx(Ks.Provider,{value:y,children:k.jsx(qIe,{ref:E,role:u,tabIndex:I,component:i,focusVisibleClassName:fe(C.focusVisible,c),className:fe(C.root,p),...m,ownerState:w,classes:C})})});function WIe(e){return qe("MuiNativeSelect",e)}const hB=Ke("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),KIe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Oe(n)}`,i&&"iconOpen",r&&"disabled"]};return Me(s,WIe,t)},Pne=ae("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${hB.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),YIe=ae(Pne,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ui,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${hB.multiple}`]:t.multiple}]}})({}),Ane=ae("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${hB.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),QIe=ae(Ane,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Oe(n.variant)}`],n.open&&t.iconOpen]}})({}),XIe=x.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},f=KIe(u);return k.jsxs(x.Fragment,{children:[k.jsx(YIe,{ownerState:u,className:fe(f.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:k.jsx(QIe,{as:a,ownerState:u,className:f.icon})]})});var h6;const JIe=ae("fieldset",{shouldForwardProp:ui})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),ZIe=ae("legend",{shouldForwardProp:ui})(dt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function ePe(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return k.jsx(JIe,{"aria-hidden":!0,className:r,ownerState:l,...a,children:k.jsx(ZIe,{ownerState:l,children:s?k.jsx("span",{children:o}):h6||(h6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const tPe=e=>{const{classes:t}=e,r=Me({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},E1e,t);return{...t,...r}},nPe=ae(cI,{shouldForwardProp:e=>ui(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:sI})(dt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rs.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Rs.focused} .${Rs.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(er()).map(([n])=>({props:{color:n},style:{[`&.${Rs.focused} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Rs.error} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Rs.disabled} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),rPe=ae(ePe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(dt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),oPe=ae(uI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:lI})(dt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),mB=x.forwardRef(function(t,n){var r;const o=pt({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:f={},type:p="text",...m}=o,g=tPe(o),y=cl(),v=Ff({props:o,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:y,fullWidth:a,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:p},C=f.root??i.Root??nPe,E=f.input??i.Input??oPe;return k.jsx(iw,{slots:{root:C,input:E},renderSuffix:I=>k.jsx(rPe,{ownerState:w,className:g.notchedOutline,label:l!=null&&l!==""&&v.required?r||(r=k.jsxs(x.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(I.startAdornment||I.filled||I.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:p,...m,classes:{...g,notchedOutline:null}})});mB.muiName="Input";function iPe(e){return qe("MuiPagination",e)}Ke("MuiPagination",["root","ul","outlined","text"]);function aPe(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:f=!1,siblingCount:p=1,...m}=e,[g,y]=ia({controlled:c,default:o,name:n,state:"page"}),v=(M,A)=>{c||y(A),l&&l(M,A)},w=(M,A)=>{const _=A-M+1;return Array.from({length:_},(N,B)=>M+B)},C=w(1,Math.min(t,r)),E=w(Math.max(r-t+1,t+1),r),I=Math.max(Math.min(g-p,r-t-p*2-1),t+2),O=Math.min(Math.max(g+p,t+p*2+2),r-t-1),P=[...u?["first"]:[],...s?[]:["previous"],...C,...I>t+2?["start-ellipsis"]:t+1<r-t?[t+1]:[],...w(I,O),...O<r-t-1?["end-ellipsis"]:r-t>t?[r-t]:[],...E,...a?[]:["next"],...f?["last"]:[]],R=M=>{switch(M){case"first":return 1;case"previous":return g-1;case"next":return g+1;case"last":return r;default:return null}};return{items:P.map(M=>typeof M=="number"?{onClick:A=>{v(A,M)},type:"page",page:M,selected:M===g,disabled:i,"aria-current":M===g?"page":void 0}:{onClick:A=>{v(A,R(M))},type:M,page:R(M),selected:!1,disabled:i||!M.includes("ellipsis")&&(M==="next"||M==="last"?g>=r:g<=1)}),...m}}function sPe(e){return qe("MuiPaginationItem",e)}const Wi=Ke("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),Mne=Ot(k.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),Rne=Ot(k.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),lPe=Ot(k.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),cPe=Ot(k.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Dne=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Oe(n.size)}`],n.variant==="text"&&t[`text${Oe(n.color)}`],n.variant==="outlined"&&t[`outlined${Oe(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},uPe=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Oe(i)}`,l,a,n!=="standard"&&`color${Oe(n)}`,n!=="standard"&&`${l}${Oe(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return Me(c,sPe,t)},dPe=ae("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:Dne})(dt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Wi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),fPe=ae(la,{name:"MuiPaginationItem",slot:"Root",overridesResolver:Dne})(dt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Wi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Wi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wi.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Wi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Wi.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Wi.selected}`]:{[`&.${Wi.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Wi.selected}`]:{[`&.${Wi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(er(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Wi.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Wi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Wi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(er(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Wi.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:Nt(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:Nt(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Nt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),pPe=ae("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(dt(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),hPe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:f="circular",size:p="medium",slots:m={},slotProps:g={},type:y="page",variant:v="text",...w}=r,C={...r,color:i,disabled:l,selected:u,shape:f,size:p,type:y,variant:v},E=vr(),I=uPe(C),O={slots:{previous:m.previous??s.previous,next:m.next??s.next,first:m.first??s.first,last:m.last??s.last},slotProps:g},[P,R]=wt("previous",{elementType:lPe,externalForwardedProps:O,ownerState:C}),[D,M]=wt("next",{elementType:cPe,externalForwardedProps:O,ownerState:C}),[A,_]=wt("first",{elementType:Mne,externalForwardedProps:O,ownerState:C}),[N,B]=wt("last",{elementType:Rne,externalForwardedProps:O,ownerState:C}),H=E?{previous:"next",next:"previous",first:"last",last:"first"}[y]:y,j={previous:P,next:D,first:A,last:N}[H],L={previous:R,next:M,first:_,last:B}[H];return y==="start-ellipsis"||y==="end-ellipsis"?k.jsx(dPe,{ref:n,ownerState:C,className:fe(I.root,o),children:"…"}):k.jsxs(fPe,{ref:n,ownerState:C,component:a,disabled:l,className:fe(I.root,o),...w,children:[y==="page"&&c,j?k.jsx(pPe,{...L,className:I.icon,as:j}):null]})}),mPe=e=>{const{classes:t,variant:n}=e;return Me({root:["root",n],ul:["ul"]},iPe,t)},gPe=ae("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),yPe=ae("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function vPe(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const bPe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=vPe,hideNextButton:f=!1,hidePrevButton:p=!1,onChange:m,page:g,renderItem:y=A=>k.jsx(hPe,{...A}),shape:v="circular",showFirstButton:w=!1,showLastButton:C=!1,siblingCount:E=1,size:I="medium",variant:O="text",...P}=r,{items:R}=aPe({...r,componentName:"Pagination"}),D={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:f,hidePrevButton:p,renderItem:y,shape:v,showFirstButton:w,showLastButton:C,siblingCount:E,size:I,variant:O},M=mPe(D);return k.jsx(gPe,{"aria-label":"pagination navigation",className:fe(M.root,i),ownerState:D,ref:n,...P,children:k.jsx(yPe,{className:M.ul,ownerState:D,children:R.map((A,_)=>k.jsx("li",{children:y({...A,color:a,"aria-label":u(A.type,A.page,A.selected),shape:v,size:I,variant:O})},_))})})});function kne(e){return qe("MuiSelect",e)}const Xb=Ke("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var m6;const xPe=ae(Pne,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Xb.select}`]:t.select},{[`&.${Xb.select}`]:t[n.variant]},{[`&.${Xb.error}`]:t.error},{[`&.${Xb.multiple}`]:t.multiple}]}})({[`&.${Xb.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SPe=ae(Ane,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Oe(n.variant)}`],n.open&&t.iconOpen]}})({}),wPe=ae("input",{shouldForwardProp:e=>Lte(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function g6(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function CPe(e){return e==null||typeof e=="string"&&!e.trim()}const EPe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Oe(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Me(s,kne,t)},TPe=x.forwardRef(function(t,n){var nt;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:f,displayEmpty:p,error:m=!1,IconComponent:g,inputRef:y,labelId:v,MenuProps:w={},multiple:C,name:E,onBlur:I,onChange:O,onClose:P,onFocus:R,onOpen:D,open:M,readOnly:A,renderValue:_,required:N,SelectDisplayProps:B={},tabIndex:H,type:j,value:L,variant:V="standard",...W}=t,[K,G]=ia({controlled:L,default:u,name:"Select"}),[q,Y]=ia({controlled:M,default:c,name:"Select"}),Z=x.useRef(null),ie=x.useRef(null),[se,ce]=x.useState(null),{current:ye}=x.useRef(M!=null),[Se,ne]=x.useState(),le=en(n,y),de=x.useCallback(lt=>{ie.current=lt,lt&&ce(lt)},[]),oe=se==null?void 0:se.parentNode;x.useImperativeHandle(le,()=>({focus:()=>{ie.current.focus()},node:Z.current,value:K}),[K]),x.useEffect(()=>{c&&q&&se&&!ye&&(ne(a?null:oe.clientWidth),ie.current.focus())},[se,a]),x.useEffect(()=>{i&&ie.current.focus()},[i]),x.useEffect(()=>{if(!v)return;const lt=Mr(ie.current).getElementById(v);if(lt){const vt=()=>{getSelection().isCollapsed&&ie.current.focus()};return lt.addEventListener("click",vt),()=>{lt.removeEventListener("click",vt)}}},[v]);const ue=(lt,vt)=>{lt?D&&D(vt):P&&P(vt),ye||(ne(a?null:oe.clientWidth),Y(lt))},pe=lt=>{lt.button===0&&(lt.preventDefault(),ie.current.focus(),ue(!0,lt))},Ee=lt=>{ue(!1,lt)},xe=x.Children.toArray(s),Re=lt=>{const vt=xe.find(bt=>bt.props.value===lt.target.value);vt!==void 0&&(G(vt.props.value),O&&O(lt,vt))},he=lt=>vt=>{let bt;if(vt.currentTarget.hasAttribute("tabindex")){if(C){bt=Array.isArray(K)?K.slice():[];const vn=K.indexOf(lt.props.value);vn===-1?bt.push(lt.props.value):bt.splice(vn,1)}else bt=lt.props.value;if(lt.props.onClick&&lt.props.onClick(vt),K!==bt&&(G(bt),O)){const vn=vt.nativeEvent||vt,kn=new vn.constructor(vn.type,vn);Object.defineProperty(kn,"target",{writable:!0,value:{value:bt,name:E}}),O(kn,lt)}C||ue(!1,vt)}},Pe=lt=>{A||[" ","ArrowUp","ArrowDown","Enter"].includes(lt.key)&&(lt.preventDefault(),ue(!0,lt))},ve=se!==null&&q,Ie=lt=>{!ve&&I&&(Object.defineProperty(lt,"target",{writable:!0,value:{value:K,name:E}}),I(lt))};delete W["aria-invalid"];let te,Te;const De=[];let Ve=!1;(JE({value:K})||p)&&(_?te=_(K):Ve=!0);const We=xe.map(lt=>{if(!x.isValidElement(lt))return null;let vt;if(C){if(!Array.isArray(K))throw new Error(zu(2));vt=K.some(bt=>g6(bt,lt.props.value)),vt&&Ve&&De.push(lt.props.children)}else vt=g6(K,lt.props.value),vt&&Ve&&(Te=lt.props.children);return x.cloneElement(lt,{"aria-selected":vt?"true":"false",onClick:he(lt),onKeyUp:bt=>{bt.key===" "&&bt.preventDefault(),lt.props.onKeyUp&&lt.props.onKeyUp(bt)},role:"option",selected:vt,value:void 0,"data-value":lt.props.value})});Ve&&(C?De.length===0?te=null:te=De.reduce((lt,vt,bt)=>(lt.push(vt),bt<De.length-1&&lt.push(", "),lt),[]):te=Te);let rt=Se;!a&&ye&&se&&(rt=oe.clientWidth);let ut;typeof H<"u"?ut=H:ut=f?null:0;const Be=B.id||(E?`mui-component-select-${E}`:void 0),et={...t,variant:V,value:K,open:ve,error:m},Le=EPe(et),It={...w.PaperProps,...(nt=w.slotProps)==null?void 0:nt.paper},Lt=bn();return k.jsxs(x.Fragment,{children:[k.jsx(xPe,{as:"div",ref:de,tabIndex:ut,role:"combobox","aria-controls":ve?Lt:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[v,Be].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":N?"true":void 0,"aria-invalid":m?"true":void 0,onKeyDown:Pe,onMouseDown:f||A?null:pe,onBlur:Ie,onFocus:R,...B,ownerState:et,className:fe(B.className,Le.select,l),id:Be,children:CPe(te)?m6||(m6=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):te}),k.jsx(wPe,{"aria-invalid":m,value:Array.isArray(K)?K.join(","):K,name:E,ref:Z,"aria-hidden":!0,onChange:Re,tabIndex:-1,disabled:f,className:Le.nativeInput,autoFocus:i,required:N,...W,ownerState:et}),k.jsx(SPe,{as:g,className:Le.icon,ownerState:et}),k.jsx(ss,{id:`menu-${E||""}`,anchorEl:oe,open:ve,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...w,slotProps:{...w.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:Lt,...w.MenuListProps},paper:{...It,style:{minWidth:rt,...It!=null?It.style:null}}},children:We})]})}),OPe=e=>{const{classes:t}=e,r=Me({root:["root"]},kne,t);return{...t,...r}},gB={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ui(e)&&e!=="variant",slot:"Root"},IPe=ae(dB,gB)(""),PPe=ae(mB,gB)(""),APe=ae(uB,gB)(""),jf=x.forwardRef(function(t,n){const r=pt({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=dne,id:f,input:p,inputProps:m,label:g,labelId:y,MenuProps:v,multiple:w=!1,native:C=!1,onClose:E,onOpen:I,open:O,renderValue:P,SelectDisplayProps:R,variant:D="outlined",...M}=r,A=C?XIe:TPe,_=cl(),N=Ff({props:r,muiFormControl:_,states:["variant","error"]}),B=N.variant||D,H={...r,variant:B,classes:a},j=OPe(H),{root:L,...V}=j,W=p||{standard:k.jsx(IPe,{ownerState:H}),outlined:k.jsx(PPe,{label:g,ownerState:H}),filled:k.jsx(APe,{ownerState:H})}[B],K=en(n,Nf(W));return k.jsx(x.Fragment,{children:x.cloneElement(W,{inputComponent:A,inputProps:{children:i,error:N.error,IconComponent:u,variant:B,type:void 0,multiple:w,...C?{id:f}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:y,MenuProps:v,onClose:E,onOpen:I,open:O,renderValue:P,SelectDisplayProps:{id:f,...R}},...m,classes:m?si(V,m.classes):V,...p?p.props.inputProps:{}},...(w&&C||c)&&B==="outlined"?{notched:!0}:{},ref:K,className:fe(W.props.className,s,j.root),...!p&&{variant:B},...M})})});jf.muiName="Select";function MPe(e){return qe("MuiSkeleton",e)}Ke("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const RPe=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return Me({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},MPe,t)},RN=sl`
0% {
opacity: 1;
}
@@ -235,7 +235,7 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
100% {
opacity: 1;
}
-`,RN=il`
+`,DN=sl`
0% {
transform: translateX(-100%);
}
@@ -248,24 +248,24 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
100% {
transform: translateX(100%);
}
-`,MPe=typeof MN!="string"?kf`
- animation: ${MN} 2s ease-in-out 0.5s infinite;
- `:null,RPe=typeof RN!="string"?kf`
+`,DPe=typeof RN!="string"?$f`
+ animation: ${RN} 2s ease-in-out 0.5s infinite;
+ `:null,kPe=typeof DN!="string"?$f`
&::after {
- animation: ${RN} 2s linear 0.5s infinite;
+ animation: ${DN} 2s linear 0.5s infinite;
}
- `:null,DPe=ae("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(dt(({theme:e})=>{const t=wxe(e.shape.borderRadius)||"px",n=Cxe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:Nt(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:MPe||{animation:`${MN} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(
+ `:null,_Pe=ae("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(dt(({theme:e})=>{const t=Exe(e.shape.borderRadius)||"px",n=Txe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:Nt(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:DPe||{animation:`${RN} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(
90deg,
transparent,
${(e.vars||e).palette.action.hover},
transparent
- )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:RPe||{"&::after":{animation:`${RN} 2s linear 0.5s infinite`}}}]}})),hE=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:s,style:l,variant:c="text",width:u,...f}=r,h={...r,animation:o,component:a,variant:c,hasChildren:!!f.children},m=APe(h);return k.jsx(DPe,{as:a,ref:n,className:fe(m.root,i),ownerState:h,...f,style:{width:u,height:s,...l}})});function kPe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=ko();x.useEffect(()=>{if(!o)return;function w(C){C.defaultPrevented||C.key==="Escape"&&(r==null||r(C,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[o,r]);const s=Je((w,C)=>{r==null||r(w,C)}),l=Je(w=>{!r||w==null||a.start(w,()=>{s(null,"timeout")})});x.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=w=>{r==null||r(w,"clickaway")},u=a.clear,f=x.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),h=w=>C=>{const E=w.onBlur;E==null||E(C),f()},m=w=>C=>{const E=w.onFocus;E==null||E(C),u()},g=w=>C=>{const E=w.onMouseEnter;E==null||E(C),u()},y=w=>C=>{const E=w.onMouseLeave;E==null||E(C),f()};return x.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",f),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",u)}},[n,o,f,u]),{getRootProps:(w={})=>{const C={...VE(e),...VE(w)};return{role:"presentation",...w,...C,onBlur:h(C),onFocus:m(C),onMouseEnter:g(C),onMouseLeave:y(C)}},onClickAway:c}}function _Pe(e){return qe("MuiSnackbarContent",e)}Ke("MuiSnackbarContent",["root","message","action"]);const $Pe=e=>{const{classes:t}=e;return Me({root:["root"],action:["action"],message:["message"]},_Pe,t)},NPe=ae(go,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=bte(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),LPe=ae("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),FPe=ae("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),jPe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=$Pe(c);return k.jsxs(NPe,{role:s,square:!0,elevation:6,className:fe(u.root,i),ownerState:c,ref:n,...l,children:[k.jsx(LPe,{className:u.message,ownerState:c,children:a}),o?k.jsx(FPe,{className:u.action,ownerState:c,children:o}):null]})});function BPe(e){return qe("MuiSnackbar",e)}Ke("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const zPe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Oe(n.vertical)}${Oe(n.horizontal)}`]};return Me(r,BPe,t)},VPe=ae("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Oe(n.anchorOrigin.vertical)}${Oe(n.anchorOrigin.horizontal)}`]]}})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),dI=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSnackbar"}),o=Lr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:f,ClickAwayListenerProps:h,ContentProps:m,disableWindowBlurListener:g=!1,message:y,onBlur:v,onClose:w,onFocus:C,onMouseEnter:E,onMouseLeave:I,open:O,resumeHideDuration:P,slots:R={},slotProps:D={},TransitionComponent:M,transitionDuration:A=i,TransitionProps:{onEnter:_,onExited:N,...B}={},...H}=r,j={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:g,TransitionComponent:M,transitionDuration:A},L=zPe(j),{getRootProps:V,onClickAway:W}=kPe({...j}),[K,G]=x.useState(!0),q=ue=>{G(!0),N&&N(ue)},Y=(ue,pe)=>{G(!1),_&&_(ue,pe)},Z={slots:{transition:M,...R},slotProps:{content:m,clickAwayListener:h,transition:B,...D}},[ie,se]=wt("root",{ref:n,className:[L.root,f],elementType:VPe,getSlotProps:V,externalForwardedProps:{...Z,...H},ownerState:j}),[ce,{ownerState:ye,...Se}]=wt("clickAwayListener",{elementType:gne,externalForwardedProps:Z,getSlotProps:ue=>({onClickAway:(...pe)=>{var Ee;(Ee=ue.onClickAway)==null||Ee.call(ue,...pe),W(...pe)}}),ownerState:j}),[ne,le]=wt("content",{elementType:jPe,shouldForwardComponentProp:!0,externalForwardedProps:Z,additionalProps:{message:y,action:a},ownerState:j}),[de,oe]=wt("transition",{elementType:mh,externalForwardedProps:Z,getSlotProps:ue=>({onEnter:(...pe)=>{var Ee;(Ee=ue.onEnter)==null||Ee.call(ue,...pe),Y(...pe)},onExited:(...pe)=>{var Ee;(Ee=ue.onExited)==null||Ee.call(ue,...pe),q(...pe)}}),additionalProps:{appear:!0,in:O,timeout:A,direction:s==="top"?"down":"up"},ownerState:j});return!O&&K?null:k.jsx(ce,{...Se,...R.clickAwayListener&&{ownerState:ye},children:k.jsx(ie,{...se,children:k.jsx(de,{...oe,children:u||k.jsx(ne,{...le})})})})});function HPe(e){return qe("MuiTooltip",e)}const eo=Ke("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function UPe(e){return Math.round(e*1e5)/1e5}const GPe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Oe(i.split("-")[0])}`],arrow:["arrow"]};return Me(a,HPe,t)},qPe=ae(sv,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${eo.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${eo.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${eo.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${eo.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${eo.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${eo.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${eo.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${eo.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),WPe=ae("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Oe(n.placement.split("-")[0])}`]]}})(dt(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Nt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${eo.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${eo.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${eo.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${UPe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${eo.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${eo.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),KPe=ae("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(dt(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Nt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let E1=!1;const y6=new tI;let Jb={x:0,y:0};function T1(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Go=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:f=!1,disableInteractive:h=!1,disableTouchListener:m=!1,enterDelay:g=100,enterNextDelay:y=0,enterTouchDelay:v=700,followCursor:w=!1,id:C,leaveDelay:E=0,leaveTouchDelay:I=1500,onClose:O,onOpen:P,open:R,placement:D="bottom",PopperComponent:M,PopperProps:A={},slotProps:_={},slots:N={},title:B,TransitionComponent:H,TransitionProps:j,...L}=r,V=x.isValidElement(i)?i:k.jsx("span",{children:i}),W=Lr(),K=vr(),[G,q]=x.useState(),[Y,Z]=x.useState(null),ie=x.useRef(!1),se=h||w,ce=ko(),ye=ko(),Se=ko(),ne=ko(),[le,de]=ia({controlled:R,default:!1,name:"Tooltip",state:"open"});let oe=le;const ue=bn(C),pe=x.useRef(),Ee=Je(()=>{pe.current!==void 0&&(document.body.style.WebkitUserSelect=pe.current,pe.current=void 0),ne.clear()});x.useEffect(()=>Ee,[Ee]);const xe=Kt=>{y6.clear(),E1=!0,de(!0),P&&!oe&&P(Kt)},Re=Je(Kt=>{y6.start(800+E,()=>{E1=!1}),de(!1),O&&oe&&O(Kt),ce.start(W.transitions.duration.shortest,()=>{ie.current=!1})}),he=Kt=>{ie.current&&Kt.type!=="touchstart"||(G&&G.removeAttribute("title"),ye.clear(),Se.clear(),g||E1&&y?ye.start(E1?y:g,()=>{xe(Kt)}):xe(Kt))},Pe=Kt=>{ye.clear(),Se.start(E,()=>{Re(Kt)})},[,ve]=x.useState(!1),Ie=Kt=>{zE(Kt.target)||(ve(!1),Pe(Kt))},te=Kt=>{G||q(Kt.currentTarget),zE(Kt.target)&&(ve(!0),he(Kt))},Te=Kt=>{ie.current=!0;const un=V.props;un.onTouchStart&&un.onTouchStart(Kt)},De=Kt=>{Te(Kt),Se.clear(),ce.clear(),Ee(),pe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ne.start(v,()=>{document.body.style.WebkitUserSelect=pe.current,he(Kt)})},Ve=Kt=>{V.props.onTouchEnd&&V.props.onTouchEnd(Kt),Ee(),Se.start(I,()=>{Re(Kt)})};x.useEffect(()=>{if(!oe)return;function Kt(un){un.key==="Escape"&&Re(un)}return document.addEventListener("keydown",Kt),()=>{document.removeEventListener("keydown",Kt)}},[Re,oe]);const We=en(_f(V),q,n);!B&&B!==0&&(oe=!1);const rt=x.useRef(),ut=Kt=>{const un=V.props;un.onMouseMove&&un.onMouseMove(Kt),Jb={x:Kt.clientX,y:Kt.clientY},rt.current&&rt.current.update()},Be={},et=typeof B=="string";c?(Be.title=!oe&&et&&!f?B:null,Be["aria-describedby"]=oe?ue:null):(Be["aria-label"]=et?B:null,Be["aria-labelledby"]=oe&&!et?ue:null);const Le={...Be,...L,...V.props,className:fe(L.className,V.props.className),onTouchStart:Te,ref:We,...w?{onMouseMove:ut}:{}},It={};m||(Le.onTouchStart=De,Le.onTouchEnd=Ve),f||(Le.onMouseOver=T1(he,Le.onMouseOver),Le.onMouseLeave=T1(Pe,Le.onMouseLeave),se||(It.onMouseOver=he,It.onMouseLeave=Pe)),u||(Le.onFocus=T1(te,Le.onFocus),Le.onBlur=T1(Ie,Le.onBlur),se||(It.onFocus=te,It.onBlur=Ie));const Lt={...r,isRtl:K,arrow:o,disableInteractive:se,placement:D,PopperComponentProp:M,touch:ie.current},nt=typeof _.popper=="function"?_.popper(Lt):_.popper,lt=x.useMemo(()=>{var un,gt;let Kt=[{name:"arrow",enabled:!!Y,options:{element:Y,padding:4}}];return(un=A.popperOptions)!=null&&un.modifiers&&(Kt=Kt.concat(A.popperOptions.modifiers)),(gt=nt==null?void 0:nt.popperOptions)!=null&&gt.modifiers&&(Kt=Kt.concat(nt.popperOptions.modifiers)),{...A.popperOptions,...nt==null?void 0:nt.popperOptions,modifiers:Kt}},[Y,A.popperOptions,nt==null?void 0:nt.popperOptions]),vt=GPe(Lt),bt=typeof _.transition=="function"?_.transition(Lt):_.transition,vn={slots:{popper:s.Popper,transition:s.Transition??H,tooltip:s.Tooltip,arrow:s.Arrow,...N},slotProps:{arrow:_.arrow??l.arrow,popper:{...A,...nt??l.popper},tooltip:_.tooltip??l.tooltip,transition:{...j,...bt??l.transition}}},[kn,Rr]=wt("popper",{elementType:qPe,externalForwardedProps:vn,ownerState:Lt,className:fe(vt.popper,A==null?void 0:A.className)}),[nr,Bn]=wt("transition",{elementType:mh,externalForwardedProps:vn,ownerState:Lt}),[yo,To]=wt("tooltip",{elementType:WPe,className:vt.tooltip,externalForwardedProps:vn,ownerState:Lt}),[oo,Oi]=wt("arrow",{elementType:KPe,className:vt.arrow,externalForwardedProps:vn,ownerState:Lt,ref:Z});return k.jsxs(x.Fragment,{children:[x.cloneElement(V,Le),k.jsx(kn,{as:M??sv,placement:D,anchorEl:w?{getBoundingClientRect:()=>({top:Jb.y,left:Jb.x,right:Jb.x,bottom:Jb.y,width:0,height:0})}:G,popperRef:rt,open:G?oe:!1,id:ue,transition:!0,...It,...Rr,popperOptions:lt,children:({TransitionProps:Kt})=>k.jsx(nr,{timeout:W.transitions.duration.shorter,...Kt,...Bn,children:k.jsxs(yo,{...To,children:[B,o?k.jsx(oo,{...Oi}):null]})})})]})}),Ft=q0e({createStyledComponent:ae("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>pt({props:e,name:"MuiStack"})}),sw=x.createContext({}),fI=x.createContext({});function YPe(e){return qe("MuiStep",e)}Ke("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const QPe=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return Me({root:["root",n,r&&"alternativeLabel",o&&"completed"]},YPe,t)},XPe=ae("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),Vm=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:f,last:h,...m}=r,{activeStep:g,connector:y,alternativeLabel:v,orientation:w,nonLinear:C}=x.useContext(sw);let[E=!1,I=!1,O=!1]=[o,l,c];g===f?E=o!==void 0?o:!0:!C&&g>f?I=l!==void 0?l:!0:!C&&g<f&&(O=c!==void 0?c:!0);const P=x.useMemo(()=>({index:f,last:h,expanded:u,icon:f+1,active:E,completed:I,disabled:O}),[f,h,u,E,I,O]),R={...r,active:E,orientation:w,alternativeLabel:v,completed:I,disabled:O,expanded:u,component:s},D=QPe(R),M=k.jsxs(XPe,{as:s,className:fe(D.root,a),ref:n,ownerState:R,...m,children:[y&&v&&f!==0?y:null,i]});return k.jsx(fI.Provider,{value:P,children:y&&!v&&f!==0?k.jsxs(x.Fragment,{children:[y,M]}):M})}),JPe=Ot(k.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),ZPe=Ot(k.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));function eAe(e){return qe("MuiStepIcon",e)}const NR=Ke("MuiStepIcon",["root","active","completed","error","text"]);var v6;const tAe=e=>{const{classes:t,active:n,completed:r,error:o}=e;return Me({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},eAe,t)},LR=ae(qE,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${NR.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${NR.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${NR.error}`]:{color:(e.vars||e).palette.error.main}}))),nAe=ae("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(dt(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),rAe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},f=tAe(u);if(typeof l=="number"||typeof l=="string"){const h=fe(i,f.root);return s?k.jsx(LR,{as:ZPe,className:h,ref:n,ownerState:u,...c}):a?k.jsx(LR,{as:JPe,className:h,ref:n,ownerState:u,...c}):k.jsxs(LR,{className:h,ref:n,ownerState:u,...c,children:[v6||(v6=k.jsx("circle",{cx:"12",cy:"12",r:"12"})),k.jsx(nAe,{className:f.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function oAe(e){return qe("MuiStepLabel",e)}const df=Ke("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),iAe=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return Me({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},oAe,t)},aAe=ae("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${df.alternativeLabel}`]:{flexDirection:"column"},[`&.${df.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),sAe=ae("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(dt(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${df.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${df.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${df.alternativeLabel}`]:{marginTop:16},[`&.${df.error}`]:{color:(e.vars||e).palette.error.main}}))),lAe=ae("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${df.alternativeLabel}`]:{paddingRight:0}}),cAe=ae("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(dt(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${df.alternativeLabel}`]:{textAlign:"center"}}))),Pp=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:f={},StepIconComponent:h,StepIconProps:m,...g}=r,{alternativeLabel:y,orientation:v}=x.useContext(sw),{active:w,disabled:C,completed:E,icon:I}=x.useContext(fI),O=l||I;let P=h;O&&!P&&(P=rAe);const R={...r,active:w,alternativeLabel:y,completed:E,disabled:C,error:s,orientation:v},D=iAe(R),M={slots:u,slotProps:{stepIcon:m,...a,...f}},[A,_]=wt("root",{elementType:aAe,externalForwardedProps:{...M,...g},ownerState:R,ref:n,className:fe(D.root,i)}),[N,B]=wt("label",{elementType:sAe,externalForwardedProps:M,ownerState:R}),[H,j]=wt("stepIcon",{elementType:P,externalForwardedProps:M,ownerState:R});return k.jsxs(A,{..._,children:[O||H?k.jsx(lAe,{className:D.iconContainer,ownerState:R,children:k.jsx(H,{completed:E,active:w,error:s,icon:O,...j})}):null,k.jsxs(cAe,{className:D.labelContainer,ownerState:R,children:[o?k.jsx(N,{...B,className:fe(D.label,B==null?void 0:B.className),children:o}):null,c]})]})});Pp.muiName="StepLabel";function uAe(e){return qe("MuiStepConnector",e)}Ke("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const dAe=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Oe(n)}`]};return Me(s,uAe,t)},fAe=ae("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),pAe=ae("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Oe(n.orientation)}`]]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),hAe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=x.useContext(sw),{active:l,disabled:c,completed:u}=x.useContext(fI),f={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},h=dAe(f);return k.jsx(fAe,{className:fe(h.root,o),ref:n,ownerState:f,...i,children:k.jsx(pAe,{className:h.line,ownerState:f})})});function mAe(e){return qe("MuiStepContent",e)}Ke("MuiStepContent",["root","last","transition"]);const gAe=e=>{const{classes:t,last:n}=e;return Me({root:["root",n&&"last"],transition:["transition"]},mAe,t)},yAe=ae("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(dt(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),vAe=ae(aa,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Hm=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=aa,transitionDuration:s="auto",TransitionProps:l,slots:c={},slotProps:u={},...f}=r,{orientation:h}=x.useContext(sw),{active:m,last:g,expanded:y}=x.useContext(fI),v={...r,last:g},w=gAe(v);let C=s;s==="auto"&&!a.muiSupportAuto&&(C=void 0);const E={slots:c,slotProps:{transition:l,...u}},[I,O]=wt("transition",{elementType:vAe,externalForwardedProps:E,ownerState:v,className:w.transition,additionalProps:{in:m||y,timeout:C,unmountOnExit:!0}});return k.jsx(yAe,{className:fe(w.root,i),ref:n,ownerState:v,...f,children:k.jsx(I,{as:a,...O,children:o})})});function bAe(e){return qe("MuiStepper",e)}Ke("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const xAe=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return Me({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},bAe,o)},SAe=ae("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),wAe=k.jsx(hAe,{}),CAe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=wAe,nonLinear:u=!1,orientation:f="horizontal",...h}=r,m={...r,nonLinear:u,alternativeLabel:i,orientation:f,component:l},g=xAe(m),y=x.Children.toArray(a).filter(Boolean),v=y.map((C,E)=>x.cloneElement(C,{index:E,last:E+1===y.length,...C.props})),w=x.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:f}),[o,i,c,u,f]);return k.jsx(sw.Provider,{value:w,children:k.jsx(SAe,{as:l,ownerState:m,className:fe(g.root,s),ref:n,...h,children:v})})});function EAe(e){return qe("MuiSwitch",e)}const Yi=Ke("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),TAe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Oe(n)}`,`size${Oe(r)}`],switchBase:["switchBase",`color${Oe(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Me(s,EAe,t);return{...t,...l}},OAe=ae("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Oe(n.edge)}`],t[`size${Oe(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Yi.thumb}`]:{width:16,height:16},[`& .${Yi.switchBase}`]:{padding:4,[`&.${Yi.checked}`]:{transform:"translateX(16px)"}}}}]}),IAe=ae(mne,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Yi.input}`]:t.input},n.color!=="default"&&t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Yi.checked}`]:{transform:"translateX(20px)"},[`&.${Yi.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Yi.checked} + .${Yi.track}`]:{opacity:.5},[`&.${Yi.disabled} + .${Yi.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Yi.input}`]:{left:"-100%",width:"300%"}})),dt(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(er(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Yi.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Yi.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Vu(e.palette[t].main,.62):zu(e.palette[t].main,.55)}`}},[`&.${Yi.checked} + .${Yi.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),PAe=ae("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(dt(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),AAe=ae("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(dt(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),qo=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,slots:c={},slotProps:u={},...f}=r,h={...r,color:i,edge:a,size:s},m=TAe(h),g={slots:c,slotProps:u},[y,v]=wt("root",{className:fe(m.root,o),elementType:OAe,externalForwardedProps:g,ownerState:h,additionalProps:{sx:l}}),[w,C]=wt("thumb",{className:m.thumb,elementType:AAe,externalForwardedProps:g,ownerState:h}),E=k.jsx(w,{...C}),[I,O]=wt("track",{className:m.track,elementType:PAe,externalForwardedProps:g,ownerState:h});return k.jsxs(y,{...v,children:[k.jsx(IAe,{type:"checkbox",icon:E,checkedIcon:E,ref:n,ownerState:h,...f,classes:{...m,root:m.switchBase},slots:{...c.switchBase&&{root:c.switchBase},...c.input&&{input:c.input}},slotProps:{...u.switchBase&&{root:typeof u.switchBase=="function"?u.switchBase(h):u.switchBase},...u.input&&{input:typeof u.input=="function"?u.input(h):u.input}}}),k.jsx(I,{...O})]})});function MAe(e){return qe("MuiTab",e)}const Es=Ke("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),RAe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Oe(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return Me(c,MAe,t)},DAe=ae(la,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Oe(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Es.iconWrapper}`]:t.iconWrapper},{[`& .${Es.icon}`]:t.icon}]}})(dt(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Es.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Es.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Es.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Es.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Es.selected}`]:{opacity:1},[`&.${Es.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Es.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Es.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Es.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Es.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),DN=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:h,onClick:m,onFocus:g,selected:y,selectionFollowsFocus:v,textColor:w="inherit",value:C,wrapped:E=!1,...I}=r,O={...r,disabled:i,disableFocusRipple:a,selected:y,icon:!!l,iconPosition:c,label:!!f,fullWidth:s,textColor:w,wrapped:E},P=RAe(O),R=l&&f&&x.isValidElement(l)?x.cloneElement(l,{className:fe(P.icon,l.props.className)}):l,D=A=>{!y&&h&&h(A,C),m&&m(A)},M=A=>{v&&!y&&h&&h(A,C),g&&g(A)};return k.jsxs(DAe,{focusRipple:!a,className:fe(P.root,o),ref:n,role:"tab","aria-selected":y,disabled:i,onClick:D,onFocus:M,ownerState:O,tabIndex:y?0:-1,...I,children:[c==="top"||c==="start"?k.jsxs(x.Fragment,{children:[R,f]}):k.jsxs(x.Fragment,{children:[f,R]}),u]})}),kne=x.createContext();function kAe(e){return qe("MuiTable",e)}Ke("MuiTable",["root","stickyHeader"]);const _Ae=e=>{const{classes:t,stickyHeader:n}=e;return Me({root:["root",n&&"stickyHeader"]},kAe,t)},$Ae=ae("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(dt(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),b6="table",Nc=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTable"}),{className:o,component:i=b6,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},f=_Ae(u),h=x.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return k.jsx(kne.Provider,{value:h,children:k.jsx($Ae,{as:i,role:i===b6?null:"table",ref:n,className:fe(f.root,o),ownerState:u,...c})})}),pI=x.createContext();function NAe(e){return qe("MuiTableBody",e)}Ke("MuiTableBody",["root"]);const LAe=e=>{const{classes:t}=e;return Me({root:["root"]},NAe,t)},FAe=ae("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),jAe={variant:"body"},x6="tbody",Lc=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableBody"}),{className:o,component:i=x6,...a}=r,s={...r,component:i},l=LAe(s);return k.jsx(pI.Provider,{value:jAe,children:k.jsx(FAe,{className:fe(l.root,o),as:i,ref:n,role:i===x6?null:"rowgroup",ownerState:s,...a})})});function BAe(e){return qe("MuiTableCell",e)}const zAe=Ke("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),VAe=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Oe(r)}`,o!=="normal"&&`padding${Oe(o)}`,`size${Oe(i)}`]};return Me(s,BAe,t)},HAe=ae("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Oe(n.size)}`],n.padding!=="normal"&&t[`padding${Oe(n.padding)}`],n.align!=="inherit"&&t[`align${Oe(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(dt(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
- ${e.palette.mode==="light"?Vu(Nt(e.palette.divider,1),.88):zu(Nt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${zAe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),ke=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:f,...h}=r,m=x.useContext(kne),g=x.useContext(pI),y=g&&g.variant==="head";let v;a?v=a:v=y?"th":"td";let w=l;v==="td"?w=void 0:!w&&y&&(w="col");const C=f||g&&g.variant,E={...r,align:o,component:v,padding:s||(m&&m.padding?m.padding:"normal"),size:c||(m&&m.size?m.size:"medium"),sortDirection:u,stickyHeader:C==="head"&&m&&m.stickyHeader,variant:C},I=VAe(E);let O=null;return u&&(O=u==="asc"?"ascending":"descending"),k.jsx(HAe,{as:v,ref:n,className:fe(I.root,i),"aria-sort":O,scope:w,ownerState:E,...h})});function UAe(e){return qe("MuiTableContainer",e)}Ke("MuiTableContainer",["root"]);const GAe=e=>{const{classes:t}=e;return Me({root:["root"]},UAe,t)},qAe=ae("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Fc=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=GAe(s);return k.jsx(qAe,{ref:n,as:i,className:fe(l.root,o),ownerState:s,...a})});function WAe(e){return qe("MuiTableHead",e)}Ke("MuiTableHead",["root"]);const KAe=e=>{const{classes:t}=e;return Me({root:["root"]},WAe,t)},YAe=ae("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),QAe={variant:"head"},S6="thead",Ff=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableHead"}),{className:o,component:i=S6,...a}=r,s={...r,component:i},l=KAe(s);return k.jsx(pI.Provider,{value:QAe,children:k.jsx(YAe,{as:i,className:fe(l.root,o),ref:n,role:i===S6?null:"rowgroup",ownerState:s,...a})})});function XAe(e){return qe("MuiToolbar",e)}Ke("MuiToolbar",["root","gutters","regular","dense"]);const JAe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Me({root:["root",!n&&"gutters",r]},XAe,t)},ZAe=ae("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(dt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),_ne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=JAe(c);return k.jsx(ZAe,{as:i,className:fe(u.root,o),ref:n,ownerState:c,...l})}),$ne=Ot(k.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),Nne=Ot(k.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),eMe=x.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:f,showLastButton:h,slots:m={},slotProps:g={},...y}=t,v=vr(),w=q=>{l(q,0)},C=q=>{l(q,c-1)},E=q=>{l(q,c+1)},I=q=>{l(q,Math.max(0,Math.ceil(o/u)-1))},O=m.firstButton??pn,P=m.lastButton??pn,R=m.nextButton??pn,D=m.previousButton??pn,M=m.firstButtonIcon??Ane,A=m.lastButtonIcon??Mne,_=m.nextButtonIcon??Nne,N=m.previousButtonIcon??$ne,B=v?P:O,H=v?R:D,j=v?D:R,L=v?O:P,V=v?g.lastButton:g.firstButton,W=v?g.nextButton:g.previousButton,K=v?g.previousButton:g.nextButton,G=v?g.firstButton:g.lastButton;return k.jsxs("div",{ref:n,...y,children:[f&&k.jsx(B,{onClick:w,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...V,children:v?k.jsx(A,{...g.lastButtonIcon}):k.jsx(M,{...g.firstButtonIcon})}),k.jsx(H,{onClick:C,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...W??r,children:v?k.jsx(_,{...g.nextButtonIcon}):k.jsx(N,{...g.previousButtonIcon})}),k.jsx(j,{onClick:E,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...K??s,children:v?k.jsx(N,{...g.previousButtonIcon}):k.jsx(_,{...g.nextButtonIcon})}),h&&k.jsx(L,{onClick:I,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...G,children:v?k.jsx(M,{...g.firstButtonIcon}):k.jsx(A,{...g.lastButtonIcon})})]})});function tMe(e){return qe("MuiTablePagination",e)}const th=Ke("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var w6;const nMe=ae(ke,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),rMe=ae(_ne,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${th.actions}`]:t.actions,...t.toolbar})})(dt(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${th.actions}`]:{flexShrink:0,marginLeft:20}}))),oMe=ae("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),iMe=ae("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(dt(({theme:e})=>({...e.typography.body2,flexShrink:0}))),aMe=ae(Lf,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${th.selectIcon}`]:t.selectIcon,[`& .${th.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${th.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),sMe=ae(Jt,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),lMe=ae("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(dt(({theme:e})=>({...e.typography.body2,flexShrink:0})));function cMe({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function uMe(e){return`Go to ${e} page`}const dMe=e=>{const{classes:t}=e;return Me({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},tMe,t)},Lne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=eMe,backIconButtonProps:i,colSpan:a,component:s=ke,count:l,disabled:c=!1,getItemAriaLabel:u=uMe,labelDisplayedRows:f=cMe,labelRowsPerPage:h="Rows per page:",nextIconButtonProps:m,onPageChange:g,onRowsPerPageChange:y,page:v,rowsPerPage:w,rowsPerPageOptions:C=[10,25,50,100],SelectProps:E={},showFirstButton:I=!1,showLastButton:O=!1,slotProps:P={},slots:R={},...D}=r,M=r,A=dMe(M),_=(P==null?void 0:P.select)??E,N=_.native?"option":sMe;let B;(s===ke||s==="td")&&(B=a||1e3);const H=bn(_.id),j=bn(_.labelId),L=()=>l===-1?(v+1)*w:w===-1?l:Math.min(l,(v+1)*w),V={slots:R,slotProps:P},[W,K]=wt("root",{ref:n,className:A.root,elementType:nMe,externalForwardedProps:{...V,component:s,...D},ownerState:M,additionalProps:{colSpan:B}}),[G,q]=wt("toolbar",{className:A.toolbar,elementType:rMe,externalForwardedProps:V,ownerState:M}),[Y,Z]=wt("spacer",{className:A.spacer,elementType:oMe,externalForwardedProps:V,ownerState:M}),[ie,se]=wt("selectLabel",{className:A.selectLabel,elementType:iMe,externalForwardedProps:V,ownerState:M,additionalProps:{id:j}}),[ce,ye]=wt("select",{className:A.select,elementType:aMe,externalForwardedProps:V,ownerState:M}),[Se,ne]=wt("menuItem",{className:A.menuItem,elementType:N,externalForwardedProps:V,ownerState:M}),[le,de]=wt("displayedRows",{className:A.displayedRows,elementType:lMe,externalForwardedProps:V,ownerState:M});return k.jsx(W,{...K,children:k.jsxs(G,{...q,children:[k.jsx(Y,{...Z}),C.length>1&&k.jsx(ie,{...se,children:h}),C.length>1&&k.jsx(ce,{variant:"standard",...!_.variant&&{input:w6||(w6=k.jsx(iw,{}))},value:w,onChange:y,id:H,labelId:j,..._,classes:{..._.classes,root:fe(A.input,A.selectRoot,(_.classes||{}).root),select:fe(A.select,(_.classes||{}).select),icon:fe(A.selectIcon,(_.classes||{}).icon)},disabled:c,...ye,children:C.map(oe=>x.createElement(Se,{...ne,key:oe.label?oe.label:oe,value:oe.value?oe.value:oe},oe.label?oe.label:oe))}),k.jsx(le,{...de,children:f({from:l===0?0:v*w+1,to:L(),count:l===-1?-1:l,page:v})}),k.jsx(o,{className:A.actions,backIconButtonProps:i,count:l,nextIconButtonProps:m,onPageChange:g,page:v,rowsPerPage:w,showFirstButton:I,showLastButton:O,slotProps:P.actions,slots:R.actions,getItemAriaLabel:u,disabled:c})]})})});function fMe(e){return qe("MuiTableRow",e)}const C6=Ke("MuiTableRow",["root","selected","hover","head","footer"]),pMe=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return Me({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},fMe,t)},hMe=ae("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(dt(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${C6.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${C6.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),E6="tr",ln=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableRow"}),{className:o,component:i=E6,hover:a=!1,selected:s=!1,...l}=r,c=x.useContext(pI),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},f=pMe(u);return k.jsx(hMe,{as:i,ref:n,className:fe(f.root,o),role:i===E6?null:"row",ownerState:u,...l})});function mMe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function gMe(e,t,n,r={},o=()=>{}){const{ease:i=mMe,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},f=h=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=h);const m=Math.min(1,(h-s)/a);if(t[e]=i(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(f),u)}const yMe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function vMe(e){const{onChange:t,...n}=e,r=x.useRef(),o=x.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return In(()=>{const a=$h(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=ns(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),x.useEffect(()=>{i(),t(r.current)},[t]),k.jsx("div",{style:yMe,...n,ref:o})}function bMe(e){return qe("MuiTabScrollButton",e)}const xMe=Ke("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),SMe=e=>{const{classes:t,orientation:n,disabled:r}=e;return Me({root:["root",n,r&&"disabled"]},bMe,t)},wMe=ae(la,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${xMe.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),CMe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,f=vr(),h={isRtl:f,...r},m=SMe(h),g=i.StartScrollButtonIcon??$ne,y=i.EndScrollButtonIcon??Nne,v=Dn({elementType:g,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),w=Dn({elementType:y,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return k.jsx(wMe,{component:"div",className:fe(m.root,o),ref:n,role:null,ownerState:h,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:s==="left"?k.jsx(g,{...v}):k.jsx(y,{...w})})});function EMe(e){return qe("MuiTabs",e)}const mE=Ke("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),T6=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,O6=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,O1=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},TMe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Me({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},EMe,l)},OMe=ae("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mE.scrollButtons}`]:t.scrollButtons},{[`& .${mE.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(dt(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${mE.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),IMe=ae("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),PMe=ae("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),AMe=ae("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(dt(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),MMe=ae(vMe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),I6={},Fne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTabs"}),o=Lr(),i=vr(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:g="primary",onChange:y,orientation:v="horizontal",ScrollButtonComponent:w,scrollButtons:C="auto",selectionFollowsFocus:E,slots:I={},slotProps:O={},TabIndicatorProps:P={},TabScrollButtonProps:R={},textColor:D="primary",value:M,variant:A="standard",visibleScrollbar:_=!1,...N}=r,B=A==="scrollable",H=v==="vertical",j=H?"scrollTop":"scrollLeft",L=H?"top":"left",V=H?"bottom":"right",W=H?"clientHeight":"clientWidth",K=H?"height":"width",G={...r,component:h,allowScrollButtonsMobile:m,indicatorColor:g,orientation:v,vertical:H,scrollButtons:C,textColor:D,variant:A,visibleScrollbar:_,fixed:!B,hideScrollbar:B&&!_,scrollableX:B&&!H,scrollableY:B&&H,centered:c&&!B,scrollButtonsHideMobile:!m},q=TMe(G),Y=Dn({elementType:I.StartScrollButtonIcon,externalSlotProps:O.startScrollButtonIcon,ownerState:G}),Z=Dn({elementType:I.EndScrollButtonIcon,externalSlotProps:O.endScrollButtonIcon,ownerState:G}),[ie,se]=x.useState(!1),[ce,ye]=x.useState(I6),[Se,ne]=x.useState(!1),[le,de]=x.useState(!1),[oe,ue]=x.useState(!1),[pe,Ee]=x.useState({overflow:"hidden",scrollbarWidth:0}),xe=new Map,Re=x.useRef(null),he=x.useRef(null),Pe={slots:I,slotProps:{indicator:P,scrollButton:R,...O}},ve=()=>{const gt=Re.current;let kt;if(gt){const Xt=gt.getBoundingClientRect();kt={clientWidth:gt.clientWidth,scrollLeft:gt.scrollLeft,scrollTop:gt.scrollTop,scrollWidth:gt.scrollWidth,top:Xt.top,bottom:Xt.bottom,left:Xt.left,right:Xt.right}}let Ut;if(gt&&M!==!1){const Xt=he.current.children;if(Xt.length>0){const Vn=Xt[xe.get(M)];Ut=Vn?Vn.getBoundingClientRect():null}}return{tabsMeta:kt,tabMeta:Ut}},Ie=Je(()=>{const{tabsMeta:gt,tabMeta:kt}=ve();let Ut=0,Xt;H?(Xt="top",kt&&gt&&(Ut=kt.top-gt.top+gt.scrollTop)):(Xt=i?"right":"left",kt&&gt&&(Ut=(i?-1:1)*(kt[Xt]-gt[Xt]+gt.scrollLeft)));const Vn={[Xt]:Ut,[K]:kt?kt[K]:0};if(typeof ce[Xt]!="number"||typeof ce[K]!="number")ye(Vn);else{const Xo=Math.abs(ce[Xt]-Vn[Xt]),Da=Math.abs(ce[K]-Vn[K]);(Xo>=1||Da>=1)&&ye(Vn)}}),te=(gt,{animation:kt=!0}={})=>{kt?gMe(j,Re.current,gt,{duration:o.transitions.duration.standard}):Re.current[j]=gt},Te=gt=>{let kt=Re.current[j];H?kt+=gt:kt+=gt*(i?-1:1),te(kt)},De=()=>{const gt=Re.current[W];let kt=0;const Ut=Array.from(he.current.children);for(let Xt=0;Xt<Ut.length;Xt+=1){const Vn=Ut[Xt];if(kt+Vn[W]>gt){Xt===0&&(kt=gt);break}kt+=Vn[W]}return kt},Ve=()=>{Te(-1*De())},We=()=>{Te(De())},[rt,{onChange:ut,...Be}]=wt("scrollbar",{className:fe(q.scrollableX,q.hideScrollbar),elementType:MMe,shouldForwardComponentProp:!0,externalForwardedProps:Pe,ownerState:G}),et=x.useCallback(gt=>{ut==null||ut(gt),Ee({overflow:null,scrollbarWidth:gt})},[ut]),[Le,It]=wt("scrollButtons",{className:fe(q.scrollButtons,R.className),elementType:CMe,externalForwardedProps:Pe,ownerState:G,additionalProps:{orientation:v,slots:{StartScrollButtonIcon:I.startScrollButtonIcon||I.StartScrollButtonIcon,EndScrollButtonIcon:I.endScrollButtonIcon||I.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Y,endScrollButtonIcon:Z}}}),Lt=()=>{const gt={};gt.scrollbarSizeListener=B?k.jsx(rt,{...Be,onChange:et}):null;const Ut=B&&(C==="auto"&&(Se||le)||C===!0);return gt.scrollButtonStart=Ut?k.jsx(Le,{direction:i?"right":"left",onClick:Ve,disabled:!Se,...It}):null,gt.scrollButtonEnd=Ut?k.jsx(Le,{direction:i?"left":"right",onClick:We,disabled:!le,...It}):null,gt},nt=Je(gt=>{const{tabsMeta:kt,tabMeta:Ut}=ve();if(!(!Ut||!kt)){if(Ut[L]<kt[L]){const Xt=kt[j]+(Ut[L]-kt[L]);te(Xt,{animation:gt})}else if(Ut[V]>kt[V]){const Xt=kt[j]+(Ut[V]-kt[V]);te(Xt,{animation:gt})}}}),lt=Je(()=>{B&&C!==!1&&ue(!oe)});x.useEffect(()=>{const gt=$h(()=>{Re.current&&Ie()});let kt;const Ut=Xo=>{Xo.forEach(Da=>{Da.removedNodes.forEach(ps=>{kt==null||kt.unobserve(ps)}),Da.addedNodes.forEach(ps=>{kt==null||kt.observe(ps)})}),gt(),lt()},Xt=ns(Re.current);Xt.addEventListener("resize",gt);let Vn;return typeof ResizeObserver<"u"&&(kt=new ResizeObserver(gt),Array.from(he.current.children).forEach(Xo=>{kt.observe(Xo)})),typeof MutationObserver<"u"&&(Vn=new MutationObserver(Ut),Vn.observe(he.current,{childList:!0})),()=>{gt.clear(),Xt.removeEventListener("resize",gt),Vn==null||Vn.disconnect(),kt==null||kt.disconnect()}},[Ie,lt]),x.useEffect(()=>{const gt=Array.from(he.current.children),kt=gt.length;if(typeof IntersectionObserver<"u"&&kt>0&&B&&C!==!1){const Ut=gt[0],Xt=gt[kt-1],Vn={root:Re.current,threshold:.99},Xo=Ii=>{ne(!Ii[0].isIntersecting)},Da=new IntersectionObserver(Xo,Vn);Da.observe(Ut);const ps=Ii=>{de(!Ii[0].isIntersecting)},ud=new IntersectionObserver(ps,Vn);return ud.observe(Xt),()=>{Da.disconnect(),ud.disconnect()}}},[B,C,oe,u==null?void 0:u.length]),x.useEffect(()=>{se(!0)},[]),x.useEffect(()=>{Ie()}),x.useEffect(()=>{nt(I6!==ce)},[nt,ce]),x.useImperativeHandle(l,()=>({updateIndicator:Ie,updateScrollButtons:lt}),[Ie,lt]);const[vt,bt]=wt("indicator",{className:fe(q.indicator,P.className),elementType:AMe,externalForwardedProps:Pe,ownerState:G,additionalProps:{style:ce}}),vn=k.jsx(vt,{...bt});let kn=0;const Rr=x.Children.map(u,gt=>{if(!x.isValidElement(gt))return null;const kt=gt.props.value===void 0?kn:gt.props.value;xe.set(kt,kn);const Ut=kt===M;return kn+=1,x.cloneElement(gt,{fullWidth:A==="fullWidth",indicator:Ut&&!ie&&vn,selected:Ut,selectionFollowsFocus:E,onChange:y,textColor:D,value:kt,...kn===1&&M===!1&&!gt.props.tabIndex?{tabIndex:0}:{}})}),nr=gt=>{if(gt.altKey||gt.shiftKey||gt.ctrlKey||gt.metaKey)return;const kt=he.current,Ut=Mr(kt).activeElement;if(Ut.getAttribute("role")!=="tab")return;let Vn=v==="horizontal"?"ArrowLeft":"ArrowUp",Xo=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&i&&(Vn="ArrowRight",Xo="ArrowLeft"),gt.key){case Vn:gt.preventDefault(),O1(kt,Ut,O6);break;case Xo:gt.preventDefault(),O1(kt,Ut,T6);break;case"Home":gt.preventDefault(),O1(kt,null,T6);break;case"End":gt.preventDefault(),O1(kt,null,O6);break}},Bn=Lt(),[yo,To]=wt("root",{ref:n,className:fe(q.root,f),elementType:OMe,externalForwardedProps:{...Pe,...N,component:h},ownerState:G}),[oo,Oi]=wt("scroller",{ref:Re,className:q.scroller,elementType:IMe,externalForwardedProps:Pe,ownerState:G,additionalProps:{style:{overflow:pe.overflow,[H?`margin${i?"Left":"Right"}`:"marginBottom"]:_?void 0:-pe.scrollbarWidth}}}),[Kt,un]=wt("list",{ref:he,className:fe(q.list,q.flexContainer),elementType:PMe,externalForwardedProps:Pe,ownerState:G,getSlotProps:gt=>({...gt,onKeyDown:kt=>{var Ut;nr(kt),(Ut=gt.onKeyDown)==null||Ut.call(gt,kt)}})});return k.jsxs(yo,{...To,children:[Bn.scrollButtonStart,Bn.scrollbarSizeListener,k.jsxs(oo,{...Oi,children:[k.jsx(Kt,{"aria-label":a,"aria-labelledby":s,"aria-orientation":v==="vertical"?"vertical":null,role:"tablist",...un,children:Rr}),ie&&vn]}),Bn.scrollButtonEnd]})});function RMe(e){return qe("MuiTextField",e)}Ke("MuiTextField",["root"]);const DMe={standard:uB,filled:cB,outlined:hB},kMe=e=>{const{classes:t}=e;return Me({root:["root"]},RMe,t)},_Me=ae(Fh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dn=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:g,id:y,InputLabelProps:v,inputProps:w,InputProps:C,inputRef:E,label:I,maxRows:O,minRows:P,multiline:R=!1,name:D,onBlur:M,onChange:A,onFocus:_,placeholder:N,required:B=!1,rows:H,select:j=!1,SelectProps:L,slots:V={},slotProps:W={},type:K,value:G,variant:q="outlined",...Y}=r,Z={...r,autoFocus:i,color:l,disabled:u,error:f,fullWidth:m,multiline:R,required:B,select:j,variant:q},ie=kMe(Z),se=bn(y),ce=g&&se?`${se}-helper-text`:void 0,ye=I&&se?`${se}-label`:void 0,Se=DMe[q],ne={slots:V,slotProps:{input:C,inputLabel:v,htmlInput:w,formHelperText:h,select:L,...W}},le={},de=ne.slotProps.inputLabel;q==="outlined"&&(de&&typeof de.shrink<"u"&&(le.notched=de.shrink),le.label=I),j&&((!L||!L.native)&&(le.id=void 0),le["aria-describedby"]=void 0);const[oe,ue]=wt("root",{elementType:_Me,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,...Y},ownerState:Z,className:fe(ie.root,s),ref:n,additionalProps:{disabled:u,error:f,fullWidth:m,required:B,color:l,variant:q}}),[pe,Ee]=wt("input",{elementType:Se,externalForwardedProps:ne,additionalProps:le,ownerState:Z}),[xe,Re]=wt("inputLabel",{elementType:jh,externalForwardedProps:ne,ownerState:Z}),[he,Pe]=wt("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:Z}),[ve,Ie]=wt("formHelperText",{elementType:aw,externalForwardedProps:ne,ownerState:Z}),[te,Te]=wt("select",{elementType:Lf,externalForwardedProps:ne,ownerState:Z}),De=k.jsx(pe,{"aria-describedby":ce,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:m,multiline:R,name:D,rows:H,maxRows:O,minRows:P,type:K,value:G,id:se,inputRef:E,onBlur:M,onChange:A,onFocus:_,placeholder:N,inputProps:Pe,slots:{input:V.htmlInput?he:void 0},...Ee});return k.jsxs(oe,{...ue,children:[I!=null&&I!==""&&k.jsx(xe,{htmlFor:se,id:ye,...Re,children:I}),j?k.jsx(te,{"aria-describedby":ce,id:se,labelId:ye,value:G,input:De,...Te,children:a}):De,g&&k.jsx(ve,{id:ce,...Ie,children:g})]})});function $Me(e){return qe("MuiToggleButton",e)}const Lp=Ke("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),jne=x.createContext({}),Bne=x.createContext(void 0);function NMe(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const LMe=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Oe(i)}`,a]};return Me(s,$Me,t)},FMe=ae(la,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Oe(n.size)}`]]}})(dt(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Lp.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${Lp.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{[`&.${Lp.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Zb=x.forwardRef(function(t,n){const{value:r,...o}=x.useContext(jne),i=x.useContext(Bne),a=ch({...o,selected:NMe(t.value,r)},t),s=pt({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:f=!1,disableFocusRipple:h=!1,fullWidth:m=!1,onChange:g,onClick:y,selected:v,size:w="medium",value:C,...E}=s,I={...s,color:u,disabled:f,disableFocusRipple:h,fullWidth:m,size:w},O=LMe(I),P=D=>{y&&(y(D,C),D.defaultPrevented)||g&&g(D,C)},R=i||"";return k.jsx(FMe,{className:fe(o.className,O.root,c,R),disabled:f,focusRipple:!h,ref:n,onClick:P,onChange:g,value:C,ownerState:I,"aria-pressed":v,...E,children:l})});function jMe(e){return qe("MuiToggleButtonGroup",e)}const jr=Ke("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),BMe=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Oe(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Me(i,jMe,t)},zMe=ae("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${jr.grouped}`]:t.grouped},{[`& .${jr.grouped}`]:t[`grouped${Oe(n.orientation)}`]},{[`& .${jr.firstButton}`]:t.firstButton},{[`& .${jr.lastButton}`]:t.lastButton},{[`& .${jr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(dt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${jr.grouped}`]:{[`&.${jr.selected} + .${jr.grouped}.${jr.selected}`]:{borderTop:0,marginTop:0}},[`& .${jr.firstButton},& .${jr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${jr.lastButton},& .${jr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${jr.lastButton}.${Lp.disabled},& .${jr.middleButton}.${Lp.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${jr.grouped}`]:{[`&.${jr.selected} + .${jr.grouped}.${jr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${jr.firstButton},& .${jr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${jr.lastButton},& .${jr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${jr.lastButton}.${Lp.disabled},& .${jr.middleButton}.${Lp.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),VMe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:f="horizontal",size:h="medium",value:m,...g}=r,y={...r,disabled:s,fullWidth:c,orientation:f,size:h},v=BMe(y),w=x.useCallback((R,D)=>{if(!u)return;const M=m&&m.indexOf(D);let A;m&&M>=0?(A=m.slice(),A.splice(M,1)):A=m?m.concat(D):[D],u(R,A)},[u,m]),C=x.useCallback((R,D)=>{u&&u(R,m===D?null:D)},[u,m]),E=x.useMemo(()=>({className:v.grouped,onChange:l?C:w,value:m,size:h,fullWidth:c,color:a,disabled:s}),[v.grouped,l,C,w,m,h,c,a,s]),I=Ste(o),O=I.length,P=R=>{const D=R===0,M=R===O-1;return D&&M?"":D?v.firstButton:M?v.lastButton:v.middleButton};return k.jsx(zMe,{role:"group",className:fe(v.root,i),ref:n,ownerState:y,...g,children:k.jsx(jne.Provider,{value:E,children:I.map((R,D)=>k.jsx(Bne.Provider,{value:P(D),children:R},D))})})}),Tf=yte({themeId:qs}),HMe=(e,t,n,r)=>{var i,a,s,l;const o=[n,{code:t,...r||{}}];if((a=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&a.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);nh(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(l=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&l.warn?e.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},P6={},kN=(e,t,n,r)=>{nh(n)&&P6[n]||(nh(n)&&(P6[n]=new Date),HMe(e,t,n,r))},zne=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},_N=(e,t,n)=>{e.loadNamespaces(t,zne(e,n))},A6=(e,t,n,r)=>{if(nh(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return _N(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,zne(e,r))},UMe=(e,t,n={})=>!t.languages||!t.languages.length?(kN(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),nh=e=>typeof e=="string",GMe=e=>typeof e=="object"&&e!==null,qMe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,WMe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},KMe=e=>WMe[e],YMe=e=>e.replace(qMe,KMe);let $N={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:YMe};const QMe=(e={})=>{$N={...$N,...e}},XMe=()=>$N;let Vne;const JMe=e=>{Vne=e},ZMe=()=>Vne,eRe={type:"3rdParty",init(e){QMe(e.options.react),JMe(e)}},tRe=x.createContext();class nRe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const rRe=(e,t)=>{const n=x.useRef();return x.useEffect(()=>{n.current=e},[e,t]),n.current},Hne=(e,t,n,r)=>e.getFixedT(t,n,r),oRe=(e,t,n,r)=>x.useCallback(Hne(e,t,n,r),[e,t,n,r]),je=(e,t={})=>{var I,O,P,R;const{i18n:n}=t,{i18n:r,defaultNS:o}=x.useContext(tRe)||{},i=n||r||ZMe();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new nRe),!i){kN(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const D=(A,_)=>nh(_)?_:GMe(_)&&nh(_.defaultValue)?_.defaultValue:Array.isArray(A)?A[A.length-1]:A,M=[D,{},!1];return M.t=D,M.i18n={},M.ready=!1,M}(I=i.options.react)!=null&&I.wait&&kN(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...XMe(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((O=i.options)==null?void 0:O.defaultNS);c=nh(c)?[c]:c||["translation"],(R=(P=i.reportNamespaces).addUsedNamespaces)==null||R.call(P,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(D=>UMe(D,i,a)),f=oRe(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),h=()=>f,m=()=>Hne(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[g,y]=x.useState(h);let v=c.join();t.lng&&(v=`${t.lng}${v}`);const w=rRe(v),C=x.useRef(!0);x.useEffect(()=>{const{bindI18n:D,bindI18nStore:M}=a;C.current=!0,!u&&!s&&(t.lng?A6(i,t.lng,c,()=>{C.current&&y(m)}):_N(i,c,()=>{C.current&&y(m)})),u&&w&&w!==v&&C.current&&y(m);const A=()=>{C.current&&y(m)};return D&&(i==null||i.on(D,A)),M&&(i==null||i.store.on(M,A)),()=>{C.current=!1,i&&(D==null||D.split(" ").forEach(_=>i.off(_,A))),M&&i&&M.split(" ").forEach(_=>i.store.off(_,A))}},[i,v]),x.useEffect(()=>{C.current&&u&&y(h)},[i,l,u]);const E=[g,i,u];if(E.t=g,E.i18n=i,E.ready=u,u||!u&&!s)return E;throw new Promise(D=>{t.lng?A6(i,t.lng,c,()=>D()):_N(i,c,()=>D())})},Qa=()=>{const[e]=je();return S(Zt,{sx:{textAlign:"center"},children:e("loading")})},Er=()=>S(Zt,{sx:{height:200,alignItems:"center",mt:2},component:Ft,direction:"column",justifyContent:"center",children:S(nw,{})}),gh=()=>S(nw,{size:20}),J0=Ot(k.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})),Du=Ot(k.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),lw=Ot(k.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"})),Ju=Ot(k.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"})),cw=Ot(k.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),Bi=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>S(lv,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(ho,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[S(Jl,{title:e,subheader:t,action:S(cw,{onClick:r})}),S(Fi,{children:o}),S(ll,{})]})}),Bh=e=>{const[t]=je(),n=e.height?e.height:"50vh";return S(Tt,{children:Q(Zt,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[S(at,{variant:"h6",mr:3,children:t("nothingHereYet")}),S(at,{mr:3,children:t("nothingHereYetAction")})]})})},gB=e=>{const[t]=je(),[n,r]=J.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?S(ct,{size:"small",variant:"contained",href:e.link,children:t("add")}):S(ct,{size:"small",variant:"contained",onClick:o,children:t("add")});return Q(Tt,{children:[Q(ho,{children:[S(Jl,{title:e.title,subheader:".",sx:{paddingBottom:0}}),S(Fi,{sx:{paddingTop:0,height:"500px"},children:S(Bh,{})}),S(ll,{children:a})]}),S(Bi,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function Une(e,t){return function(){return e.apply(t,arguments)}}const{toString:iRe}=Object.prototype,{getPrototypeOf:yB}=Object,{iterator:hI,toStringTag:Gne}=Symbol,mI=(e=>t=>{const n=iRe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zl=e=>(e=e.toLowerCase(),t=>mI(t)===e),gI=e=>t=>typeof t===e,{isArray:cv}=Array,Rx=gI("undefined");function aRe(e){return e!==null&&!Rx(e)&&e.constructor!==null&&!Rx(e.constructor)&&Oa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qne=Zl("ArrayBuffer");function sRe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qne(e.buffer),t}const lRe=gI("string"),Oa=gI("function"),Wne=gI("number"),yI=e=>e!==null&&typeof e=="object",cRe=e=>e===!0||e===!1,gE=e=>{if(mI(e)!=="object")return!1;const t=yB(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Gne in e)&&!(hI in e)},uRe=Zl("Date"),dRe=Zl("File"),fRe=Zl("Blob"),pRe=Zl("FileList"),hRe=e=>yI(e)&&Oa(e.pipe),mRe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Oa(e.append)&&((t=mI(e))==="formdata"||t==="object"&&Oa(e.toString)&&e.toString()==="[object FormData]"))},gRe=Zl("URLSearchParams"),[yRe,vRe,bRe,xRe]=["ReadableStream","Request","Response","Headers"].map(Zl),SRe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uw(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),cv(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function Kne(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Fp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yne=e=>!Rx(e)&&e!==Fp;function NN(){const{caseless:e}=Yne(this)&&this||{},t={},n=(r,o)=>{const i=e&&Kne(t,o)||o;gE(t[i])&&gE(r)?t[i]=NN(t[i],r):gE(r)?t[i]=NN({},r):cv(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&uw(arguments[r],n);return t}const wRe=(e,t,n,{allOwnKeys:r}={})=>(uw(t,(o,i)=>{n&&Oa(o)?e[i]=Une(o,n):e[i]=o},{allOwnKeys:r}),e),CRe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ERe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},TRe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&yB(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ORe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},IRe=e=>{if(!e)return null;if(cv(e))return e;let t=e.length;if(!Wne(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},PRe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&yB(Uint8Array)),ARe=(e,t)=>{const r=(e&&e[hI]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},MRe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},RRe=Zl("HTMLFormElement"),DRe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),M6=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kRe=Zl("RegExp"),Qne=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};uw(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},_Re=e=>{Qne(e,(t,n)=>{if(Oa(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Oa(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$Re=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return cv(e)?r(e):r(String(e).split(t)),n},NRe=()=>{},LRe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function FRe(e){return!!(e&&Oa(e.append)&&e[Gne]==="FormData"&&e[hI])}const jRe=e=>{const t=new Array(10),n=(r,o)=>{if(yI(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=cv(r)?[]:{};return uw(r,(a,s)=>{const l=n(a,o+1);!Rx(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},BRe=Zl("AsyncFunction"),zRe=e=>e&&(yI(e)||Oa(e))&&Oa(e.then)&&Oa(e.catch),Xne=((e,t)=>e?setImmediate:t?((n,r)=>(Fp.addEventListener("message",({source:o,data:i})=>{o===Fp&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Fp.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Oa(Fp.postMessage)),VRe=typeof queueMicrotask<"u"?queueMicrotask.bind(Fp):typeof process<"u"&&process.nextTick||Xne,HRe=e=>e!=null&&Oa(e[hI]),Ue={isArray:cv,isArrayBuffer:qne,isBuffer:aRe,isFormData:mRe,isArrayBufferView:sRe,isString:lRe,isNumber:Wne,isBoolean:cRe,isObject:yI,isPlainObject:gE,isReadableStream:yRe,isRequest:vRe,isResponse:bRe,isHeaders:xRe,isUndefined:Rx,isDate:uRe,isFile:dRe,isBlob:fRe,isRegExp:kRe,isFunction:Oa,isStream:hRe,isURLSearchParams:gRe,isTypedArray:PRe,isFileList:pRe,forEach:uw,merge:NN,extend:wRe,trim:SRe,stripBOM:CRe,inherits:ERe,toFlatObject:TRe,kindOf:mI,kindOfTest:Zl,endsWith:ORe,toArray:IRe,forEachEntry:ARe,matchAll:MRe,isHTMLForm:RRe,hasOwnProperty:M6,hasOwnProp:M6,reduceDescriptors:Qne,freezeMethods:_Re,toObjectSet:$Re,toCamelCase:DRe,noop:NRe,toFiniteNumber:LRe,findKey:Kne,global:Fp,isContextDefined:Yne,isSpecCompliantForm:FRe,toJSONObject:jRe,isAsyncFn:BRe,isThenable:zRe,setImmediate:Xne,asap:VRe,isIterable:HRe};function Sn(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Ue.inherits(Sn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ue.toJSONObject(this.config),code:this.code,status:this.status}}});const Jne=Sn.prototype,Zne={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zne[e]={value:e}});Object.defineProperties(Sn,Zne);Object.defineProperty(Jne,"isAxiosError",{value:!0});Sn.from=(e,t,n,r,o,i)=>{const a=Object.create(Jne);return Ue.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Sn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const URe=null;function LN(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function ere(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function R6(e,t,n){return e?e.concat(t).map(function(o,i){return o=ere(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function GRe(e){return Ue.isArray(e)&&!e.some(LN)}const qRe=Ue.toFlatObject(Ue,{},null,function(t){return/^is[A-Z]/.test(t)});function vI(e,t,n){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!Ue.isUndefined(v[y])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(o))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(Ue.isDate(g))return g.toISOString();if(!l&&Ue.isBlob(g))throw new Sn("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(g)||Ue.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,y,v){let w=g;if(g&&!v&&typeof g=="object"){if(Ue.endsWith(y,"{}"))y=r?y:y.slice(0,-2),g=JSON.stringify(g);else if(Ue.isArray(g)&&GRe(g)||(Ue.isFileList(g)||Ue.endsWith(y,"[]"))&&(w=Ue.toArray(g)))return y=ere(y),w.forEach(function(E,I){!(Ue.isUndefined(E)||E===null)&&t.append(a===!0?R6([y],I,i):a===null?y:y+"[]",c(E))}),!1}return LN(g)?!0:(t.append(R6(v,y,i),c(g)),!1)}const f=[],h=Object.assign(qRe,{defaultVisitor:u,convertValue:c,isVisitable:LN});function m(g,y){if(!Ue.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(g),Ue.forEach(g,function(w,C){(!(Ue.isUndefined(w)||w===null)&&o.call(t,w,Ue.isString(C)?C.trim():C,y,h))===!0&&m(w,y?y.concat(C):[C])}),f.pop()}}if(!Ue.isObject(e))throw new TypeError("data must be an object");return m(e),t}function D6(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function vB(e,t){this._pairs=[],e&&vI(e,this,t)}const tre=vB.prototype;tre.append=function(t,n){this._pairs.push([t,n])};tre.toString=function(t){const n=t?function(r){return t.call(this,r,D6)}:D6;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function WRe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nre(e,t,n){if(!t)return e;const r=n&&n.encode||WRe;Ue.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=Ue.isURLSearchParams(t)?t.toString():new vB(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class k6{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const rre={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},KRe=typeof URLSearchParams<"u"?URLSearchParams:vB,YRe=typeof FormData<"u"?FormData:null,QRe=typeof Blob<"u"?Blob:null,XRe={isBrowser:!0,classes:{URLSearchParams:KRe,FormData:YRe,Blob:QRe},protocols:["http","https","file","blob","url","data"]},bB=typeof window<"u"&&typeof document<"u",FN=typeof navigator=="object"&&navigator||void 0,JRe=bB&&(!FN||["ReactNative","NativeScript","NS"].indexOf(FN.product)<0),ZRe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eDe=bB&&window.location.href||"http://localhost",tDe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bB,hasStandardBrowserEnv:JRe,hasStandardBrowserWebWorkerEnv:ZRe,navigator:FN,origin:eDe},Symbol.toStringTag,{value:"Module"})),Ni={...tDe,...XRe};function nDe(e,t){return vI(e,new Ni.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Ni.isNode&&Ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function rDe(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function oDe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function ore(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=i>=n.length;return a=!a&&Ue.isArray(o)?o.length:a,l?(Ue.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Ue.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Ue.isArray(o[a])&&(o[a]=oDe(o[a])),!s)}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const n={};return Ue.forEachEntry(e,(r,o)=>{t(rDe(r),o,n,0)}),n}return null}function iDe(e,t,n){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const dw={transitional:rre,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Ue.isObject(t);if(i&&Ue.isHTMLForm(t)&&(t=new FormData(t)),Ue.isFormData(t))return o?JSON.stringify(ore(t)):t;if(Ue.isArrayBuffer(t)||Ue.isBuffer(t)||Ue.isStream(t)||Ue.isFile(t)||Ue.isBlob(t)||Ue.isReadableStream(t))return t;if(Ue.isArrayBufferView(t))return t.buffer;if(Ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return nDe(t,this.formSerializer).toString();if((s=Ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return vI(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),iDe(t)):t}],transformResponse:[function(t){const n=this.transitional||dw.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Ue.isResponse(t)||Ue.isReadableStream(t))return t;if(t&&Ue.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Sn.from(s,Sn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ni.classes.FormData,Blob:Ni.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],e=>{dw.headers[e]={}});const aDe=Ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sDe=e=>{const t={};let n,r,o;return e&&e.split(`
-`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&aDe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_6=Symbol("internals");function e0(e){return e&&String(e).trim().toLowerCase()}function yE(e){return e===!1||e==null?e:Ue.isArray(e)?e.map(yE):String(e)}function lDe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const cDe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function FR(e,t,n,r,o){if(Ue.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Ue.isString(t)){if(Ue.isString(r))return t.indexOf(r)!==-1;if(Ue.isRegExp(r))return r.test(t)}}function uDe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function dDe(e,t){const n=Ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}let Ia=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=e0(l);if(!u)throw new Error("header name must be a non-empty string");const f=Ue.findKey(o,u);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||l]=yE(s))}const a=(s,l)=>Ue.forEach(s,(c,u)=>i(c,u,l));if(Ue.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Ue.isString(t)&&(t=t.trim())&&!cDe(t))a(sDe(t),n);else if(Ue.isObject(t)&&Ue.isIterable(t)){let s={},l,c;for(const u of t){if(!Ue.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[c=u[0]]=(l=s[c])?Ue.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=e0(t),t){const r=Ue.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return lDe(o);if(Ue.isFunction(n))return n.call(this,o,r);if(Ue.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=e0(t),t){const r=Ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||FR(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=e0(a),a){const s=Ue.findKey(r,a);s&&(!n||FR(r,r[s],s,n))&&(delete r[s],o=!0)}}return Ue.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||FR(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Ue.forEach(this,(o,i)=>{const a=Ue.findKey(r,i);if(a){n[a]=yE(o),delete n[i];return}const s=t?uDe(i):String(i).trim();s!==i&&delete n[i],n[s]=yE(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ue.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
-`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[_6]=this[_6]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=e0(a);r[s]||(dDe(o,a),r[s]=!0)}return Ue.isArray(t)?t.forEach(i):i(t),this}};Ia.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ue.reduceDescriptors(Ia.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Ue.freezeMethods(Ia);function jR(e,t){const n=this||dw,r=t||n,o=Ia.from(r.headers);let i=r.data;return Ue.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ire(e){return!!(e&&e.__CANCEL__)}function uv(e,t,n){Sn.call(this,e??"canceled",Sn.ERR_CANCELED,t,n),this.name="CanceledError"}Ue.inherits(uv,Sn,{__CANCEL__:!0});function are(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Sn("Request failed with status code "+n.status,[Sn.ERR_BAD_REQUEST,Sn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fDe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function pDe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let f=i,h=0;for(;f!==o;)h+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const m=u&&c-u;return m?Math.round(h*1e3/m):void 0}}function hDe(e,t){let n=0,r=1e3/t,o,i;const a=(c,u=Date.now())=>{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-f)))},()=>o&&a(o)]}const eT=(e,t,n=3)=>{let r=0;const o=pDe(50,250);return hDe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},$6=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},N6=e=>(...t)=>Ue.asap(()=>e(...t)),mDe=Ni.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ni.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ni.origin),Ni.navigator&&/(msie|trident)/i.test(Ni.navigator.userAgent)):()=>!0,gDe=Ni.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Ue.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ue.isString(r)&&a.push("path="+r),Ue.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function yDe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vDe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function sre(e,t,n){let r=!yDe(t);return e&&(r||n==!1)?vDe(e,t):t}const L6=e=>e instanceof Ia?{...e}:e;function yh(e,t){t=t||{};const n={};function r(c,u,f,h){return Ue.isPlainObject(c)&&Ue.isPlainObject(u)?Ue.merge.call({caseless:h},c,u):Ue.isPlainObject(u)?Ue.merge({},u):Ue.isArray(u)?u.slice():u}function o(c,u,f,h){if(Ue.isUndefined(u)){if(!Ue.isUndefined(c))return r(void 0,c,f,h)}else return r(c,u,f,h)}function i(c,u){if(!Ue.isUndefined(u))return r(void 0,u)}function a(c,u){if(Ue.isUndefined(u)){if(!Ue.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u,f)=>o(L6(c),L6(u),f,!0)};return Ue.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=l[u]||o,h=f(e[u],t[u],u);Ue.isUndefined(h)&&f!==s||(n[u]=h)}),n}const lre=e=>{const t=yh({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Ia.from(a),t.url=nre(sre(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(Ue.isFormData(n)){if(Ni.hasStandardBrowserEnv||Ni.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ni.hasStandardBrowserEnv&&(r&&Ue.isFunction(r)&&(r=r(t)),r||r!==!1&&mDe(t.url))){const c=o&&i&&gDe.read(i);c&&a.set(o,c)}return t},bDe=typeof XMLHttpRequest<"u",xDe=bDe&&function(e){return new Promise(function(n,r){const o=lre(e);let i=o.data;const a=Ia.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,f,h,m,g;function y(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function w(){if(!v)return;const E=Ia.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),O={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:E,config:e,request:v};are(function(R){n(R),y()},function(R){r(R),y()},O),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new Sn("Request aborted",Sn.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new Sn("Network Error",Sn.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const O=o.transitional||rre;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new Sn(I,O.clarifyTimeoutError?Sn.ETIMEDOUT:Sn.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&Ue.forEach(a.toJSON(),function(I,O){v.setRequestHeader(O,I)}),Ue.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([h,g]=eT(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([f,m]=eT(l),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(u=E=>{v&&(r(!E||E.type?new uv(null,e,v):E),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const C=fDe(o.url);if(C&&Ni.protocols.indexOf(C)===-1){r(new Sn("Unsupported protocol "+C+":",Sn.ERR_BAD_REQUEST,e));return}v.send(i||null)})},SDe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Sn?u:new uv(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new Sn(`timeout ${t} of ms exceeded`,Sn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>Ue.asap(s),l}},wDe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},CDe=async function*(e,t){for await(const n of EDe(e))yield*wDe(n,t)},EDe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},F6=(e,t,n,r)=>{const o=CDe(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let f=u.byteLength;if(n){let h=i+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},bI=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cre=bI&&typeof ReadableStream=="function",TDe=bI&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ure=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ODe=cre&&ure(()=>{let e=!1;const t=new Request(Ni.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),j6=64*1024,jN=cre&&ure(()=>Ue.isReadableStream(new Response("").body)),tT={stream:jN&&(e=>e.body)};bI&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!tT[t]&&(tT[t]=Ue.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Sn(`Response type '${t}' is not supported`,Sn.ERR_NOT_SUPPORT,r)})})})(new Response);const IDe=async e=>{if(e==null)return 0;if(Ue.isBlob(e))return e.size;if(Ue.isSpecCompliantForm(e))return(await new Request(Ni.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Ue.isArrayBufferView(e)||Ue.isArrayBuffer(e))return e.byteLength;if(Ue.isURLSearchParams(e)&&(e=e+""),Ue.isString(e))return(await TDe(e)).byteLength},PDe=async(e,t)=>{const n=Ue.toFiniteNumber(e.getContentLength());return n??IDe(t)},ADe=bI&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=lre(e);c=c?(c+"").toLowerCase():"text";let m=SDe([o,i&&i.toAbortSignal()],a),g;const y=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let v;try{if(l&&ODe&&n!=="get"&&n!=="head"&&(v=await PDe(u,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),P;if(Ue.isFormData(r)&&(P=O.headers.get("content-type"))&&u.setContentType(P),O.body){const[R,D]=$6(v,eT(N6(l)));r=F6(O.body,j6,R,D)}}Ue.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let C=await fetch(g);const E=jN&&(c==="stream"||c==="response");if(jN&&(s||E&&y)){const O={};["status","statusText","headers"].forEach(M=>{O[M]=C[M]});const P=Ue.toFiniteNumber(C.headers.get("content-length")),[R,D]=s&&$6(P,eT(N6(s),!0))||[];C=new Response(F6(C.body,j6,R,()=>{D&&D(),y&&y()}),O)}c=c||"text";let I=await tT[Ue.findKey(tT,c)||"text"](C,e);return!E&&y&&y(),await new Promise((O,P)=>{are(O,P,{data:I,headers:Ia.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:g})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Sn("Network Error",Sn.ERR_NETWORK,e,g),{cause:w.cause||w}):Sn.from(w,w&&w.code,e,g)}}),BN={http:URe,xhr:xDe,fetch:ADe};Ue.forEach(BN,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const B6=e=>`- ${e}`,MDe=e=>Ue.isFunction(e)||e===null||e===!1,dre={getAdapter:e=>{e=Ue.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!MDe(n)&&(r=BN[(a=String(n)).toLowerCase()],r===void 0))throw new Sn(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
+ )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:kPe||{"&::after":{animation:`${DN} 2s linear 0.5s infinite`}}}]}})),mE=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:s,style:l,variant:c="text",width:u,...f}=r,p={...r,animation:o,component:a,variant:c,hasChildren:!!f.children},m=RPe(p);return k.jsx(_Pe,{as:a,ref:n,className:fe(m.root,i),ownerState:p,...f,style:{width:u,height:s,...l}})});function $Pe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=_o();x.useEffect(()=>{if(!o)return;function w(C){C.defaultPrevented||C.key==="Escape"&&(r==null||r(C,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[o,r]);const s=Je((w,C)=>{r==null||r(w,C)}),l=Je(w=>{!r||w==null||a.start(w,()=>{s(null,"timeout")})});x.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=w=>{r==null||r(w,"clickaway")},u=a.clear,f=x.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),p=w=>C=>{const E=w.onBlur;E==null||E(C),f()},m=w=>C=>{const E=w.onFocus;E==null||E(C),u()},g=w=>C=>{const E=w.onMouseEnter;E==null||E(C),u()},y=w=>C=>{const E=w.onMouseLeave;E==null||E(C),f()};return x.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",f),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",u)}},[n,o,f,u]),{getRootProps:(w={})=>{const C={...HE(e),...HE(w)};return{role:"presentation",...w,...C,onBlur:p(C),onFocus:m(C),onMouseEnter:g(C),onMouseLeave:y(C)}},onClickAway:c}}function NPe(e){return qe("MuiSnackbarContent",e)}Ke("MuiSnackbarContent",["root","message","action"]);const LPe=e=>{const{classes:t}=e;return Me({root:["root"],action:["action"],message:["message"]},NPe,t)},FPe=ae(go,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=xte(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),jPe=ae("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),BPe=ae("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),zPe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=LPe(c);return k.jsxs(FPe,{role:s,square:!0,elevation:6,className:fe(u.root,i),ownerState:c,ref:n,...l,children:[k.jsx(jPe,{className:u.message,ownerState:c,children:a}),o?k.jsx(BPe,{className:u.action,ownerState:c,children:o}):null]})});function VPe(e){return qe("MuiSnackbar",e)}Ke("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const HPe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Oe(n.vertical)}${Oe(n.horizontal)}`]};return Me(r,VPe,t)},UPe=ae("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Oe(n.anchorOrigin.vertical)}${Oe(n.anchorOrigin.horizontal)}`]]}})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),fI=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSnackbar"}),o=Lr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:f,ClickAwayListenerProps:p,ContentProps:m,disableWindowBlurListener:g=!1,message:y,onBlur:v,onClose:w,onFocus:C,onMouseEnter:E,onMouseLeave:I,open:O,resumeHideDuration:P,slots:R={},slotProps:D={},TransitionComponent:M,transitionDuration:A=i,TransitionProps:{onEnter:_,onExited:N,...B}={},...H}=r,j={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:g,TransitionComponent:M,transitionDuration:A},L=HPe(j),{getRootProps:V,onClickAway:W}=$Pe({...j}),[K,G]=x.useState(!0),q=ue=>{G(!0),N&&N(ue)},Y=(ue,pe)=>{G(!1),_&&_(ue,pe)},Z={slots:{transition:M,...R},slotProps:{content:m,clickAwayListener:p,transition:B,...D}},[ie,se]=wt("root",{ref:n,className:[L.root,f],elementType:UPe,getSlotProps:V,externalForwardedProps:{...Z,...H},ownerState:j}),[ce,{ownerState:ye,...Se}]=wt("clickAwayListener",{elementType:yne,externalForwardedProps:Z,getSlotProps:ue=>({onClickAway:(...pe)=>{var Ee;(Ee=ue.onClickAway)==null||Ee.call(ue,...pe),W(...pe)}}),ownerState:j}),[ne,le]=wt("content",{elementType:zPe,shouldForwardComponentProp:!0,externalForwardedProps:Z,additionalProps:{message:y,action:a},ownerState:j}),[de,oe]=wt("transition",{elementType:yh,externalForwardedProps:Z,getSlotProps:ue=>({onEnter:(...pe)=>{var Ee;(Ee=ue.onEnter)==null||Ee.call(ue,...pe),Y(...pe)},onExited:(...pe)=>{var Ee;(Ee=ue.onExited)==null||Ee.call(ue,...pe),q(...pe)}}),additionalProps:{appear:!0,in:O,timeout:A,direction:s==="top"?"down":"up"},ownerState:j});return!O&&K?null:k.jsx(ce,{...Se,...R.clickAwayListener&&{ownerState:ye},children:k.jsx(ie,{...se,children:k.jsx(de,{...oe,children:u||k.jsx(ne,{...le})})})})});function GPe(e){return qe("MuiTooltip",e)}const eo=Ke("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function qPe(e){return Math.round(e*1e5)/1e5}const WPe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Oe(i.split("-")[0])}`],arrow:["arrow"]};return Me(a,GPe,t)},KPe=ae(lv,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(dt(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${eo.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${eo.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${eo.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${eo.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${eo.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${eo.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${eo.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${eo.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),YPe=ae("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Oe(n.placement.split("-")[0])}`]]}})(dt(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Nt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${eo.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${eo.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${eo.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${qPe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${eo.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${eo.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${eo.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${eo.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),QPe=ae("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(dt(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Nt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let T1=!1;const y6=new nI;let Jb={x:0,y:0};function O1(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const qo=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:f=!1,disableInteractive:p=!1,disableTouchListener:m=!1,enterDelay:g=100,enterNextDelay:y=0,enterTouchDelay:v=700,followCursor:w=!1,id:C,leaveDelay:E=0,leaveTouchDelay:I=1500,onClose:O,onOpen:P,open:R,placement:D="bottom",PopperComponent:M,PopperProps:A={},slotProps:_={},slots:N={},title:B,TransitionComponent:H,TransitionProps:j,...L}=r,V=x.isValidElement(i)?i:k.jsx("span",{children:i}),W=Lr(),K=vr(),[G,q]=x.useState(),[Y,Z]=x.useState(null),ie=x.useRef(!1),se=p||w,ce=_o(),ye=_o(),Se=_o(),ne=_o(),[le,de]=ia({controlled:R,default:!1,name:"Tooltip",state:"open"});let oe=le;const ue=bn(C),pe=x.useRef(),Ee=Je(()=>{pe.current!==void 0&&(document.body.style.WebkitUserSelect=pe.current,pe.current=void 0),ne.clear()});x.useEffect(()=>Ee,[Ee]);const xe=Kt=>{y6.clear(),T1=!0,de(!0),P&&!oe&&P(Kt)},Re=Je(Kt=>{y6.start(800+E,()=>{T1=!1}),de(!1),O&&oe&&O(Kt),ce.start(W.transitions.duration.shortest,()=>{ie.current=!1})}),he=Kt=>{ie.current&&Kt.type!=="touchstart"||(G&&G.removeAttribute("title"),ye.clear(),Se.clear(),g||T1&&y?ye.start(T1?y:g,()=>{xe(Kt)}):xe(Kt))},Pe=Kt=>{ye.clear(),Se.start(E,()=>{Re(Kt)})},[,ve]=x.useState(!1),Ie=Kt=>{VE(Kt.target)||(ve(!1),Pe(Kt))},te=Kt=>{G||q(Kt.currentTarget),VE(Kt.target)&&(ve(!0),he(Kt))},Te=Kt=>{ie.current=!0;const un=V.props;un.onTouchStart&&un.onTouchStart(Kt)},De=Kt=>{Te(Kt),Se.clear(),ce.clear(),Ee(),pe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ne.start(v,()=>{document.body.style.WebkitUserSelect=pe.current,he(Kt)})},Ve=Kt=>{V.props.onTouchEnd&&V.props.onTouchEnd(Kt),Ee(),Se.start(I,()=>{Re(Kt)})};x.useEffect(()=>{if(!oe)return;function Kt(un){un.key==="Escape"&&Re(un)}return document.addEventListener("keydown",Kt),()=>{document.removeEventListener("keydown",Kt)}},[Re,oe]);const We=en(Nf(V),q,n);!B&&B!==0&&(oe=!1);const rt=x.useRef(),ut=Kt=>{const un=V.props;un.onMouseMove&&un.onMouseMove(Kt),Jb={x:Kt.clientX,y:Kt.clientY},rt.current&&rt.current.update()},Be={},et=typeof B=="string";c?(Be.title=!oe&&et&&!f?B:null,Be["aria-describedby"]=oe?ue:null):(Be["aria-label"]=et?B:null,Be["aria-labelledby"]=oe&&!et?ue:null);const Le={...Be,...L,...V.props,className:fe(L.className,V.props.className),onTouchStart:Te,ref:We,...w?{onMouseMove:ut}:{}},It={};m||(Le.onTouchStart=De,Le.onTouchEnd=Ve),f||(Le.onMouseOver=O1(he,Le.onMouseOver),Le.onMouseLeave=O1(Pe,Le.onMouseLeave),se||(It.onMouseOver=he,It.onMouseLeave=Pe)),u||(Le.onFocus=O1(te,Le.onFocus),Le.onBlur=O1(Ie,Le.onBlur),se||(It.onFocus=te,It.onBlur=Ie));const Lt={...r,isRtl:K,arrow:o,disableInteractive:se,placement:D,PopperComponentProp:M,touch:ie.current},nt=typeof _.popper=="function"?_.popper(Lt):_.popper,lt=x.useMemo(()=>{var un,gt;let Kt=[{name:"arrow",enabled:!!Y,options:{element:Y,padding:4}}];return(un=A.popperOptions)!=null&&un.modifiers&&(Kt=Kt.concat(A.popperOptions.modifiers)),(gt=nt==null?void 0:nt.popperOptions)!=null&&gt.modifiers&&(Kt=Kt.concat(nt.popperOptions.modifiers)),{...A.popperOptions,...nt==null?void 0:nt.popperOptions,modifiers:Kt}},[Y,A.popperOptions,nt==null?void 0:nt.popperOptions]),vt=WPe(Lt),bt=typeof _.transition=="function"?_.transition(Lt):_.transition,vn={slots:{popper:s.Popper,transition:s.Transition??H,tooltip:s.Tooltip,arrow:s.Arrow,...N},slotProps:{arrow:_.arrow??l.arrow,popper:{...A,...nt??l.popper},tooltip:_.tooltip??l.tooltip,transition:{...j,...bt??l.transition}}},[kn,Rr]=wt("popper",{elementType:KPe,externalForwardedProps:vn,ownerState:Lt,className:fe(vt.popper,A==null?void 0:A.className)}),[nr,Bn]=wt("transition",{elementType:yh,externalForwardedProps:vn,ownerState:Lt}),[yo,Oo]=wt("tooltip",{elementType:YPe,className:vt.tooltip,externalForwardedProps:vn,ownerState:Lt}),[oo,Ii]=wt("arrow",{elementType:QPe,className:vt.arrow,externalForwardedProps:vn,ownerState:Lt,ref:Z});return k.jsxs(x.Fragment,{children:[x.cloneElement(V,Le),k.jsx(kn,{as:M??lv,placement:D,anchorEl:w?{getBoundingClientRect:()=>({top:Jb.y,left:Jb.x,right:Jb.x,bottom:Jb.y,width:0,height:0})}:G,popperRef:rt,open:G?oe:!1,id:ue,transition:!0,...It,...Rr,popperOptions:lt,children:({TransitionProps:Kt})=>k.jsx(nr,{timeout:W.transitions.duration.shorter,...Kt,...Bn,children:k.jsxs(yo,{...Oo,children:[B,o?k.jsx(oo,{...Ii}):null]})})})]})}),Ft=K0e({createStyledComponent:ae("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>pt({props:e,name:"MuiStack"})}),sw=x.createContext({}),pI=x.createContext({});function XPe(e){return qe("MuiStep",e)}Ke("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const JPe=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return Me({root:["root",n,r&&"alternativeLabel",o&&"completed"]},XPe,t)},ZPe=ae("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),Hm=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:f,last:p,...m}=r,{activeStep:g,connector:y,alternativeLabel:v,orientation:w,nonLinear:C}=x.useContext(sw);let[E=!1,I=!1,O=!1]=[o,l,c];g===f?E=o!==void 0?o:!0:!C&&g>f?I=l!==void 0?l:!0:!C&&g<f&&(O=c!==void 0?c:!0);const P=x.useMemo(()=>({index:f,last:p,expanded:u,icon:f+1,active:E,completed:I,disabled:O}),[f,p,u,E,I,O]),R={...r,active:E,orientation:w,alternativeLabel:v,completed:I,disabled:O,expanded:u,component:s},D=JPe(R),M=k.jsxs(ZPe,{as:s,className:fe(D.root,a),ref:n,ownerState:R,...m,children:[y&&v&&f!==0?y:null,i]});return k.jsx(pI.Provider,{value:P,children:y&&!v&&f!==0?k.jsxs(x.Fragment,{children:[y,M]}):M})}),eAe=Ot(k.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),tAe=Ot(k.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));function nAe(e){return qe("MuiStepIcon",e)}const LR=Ke("MuiStepIcon",["root","active","completed","error","text"]);var v6;const rAe=e=>{const{classes:t,active:n,completed:r,error:o}=e;return Me({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},nAe,t)},FR=ae(WE,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${LR.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${LR.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${LR.error}`]:{color:(e.vars||e).palette.error.main}}))),oAe=ae("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(dt(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),iAe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},f=rAe(u);if(typeof l=="number"||typeof l=="string"){const p=fe(i,f.root);return s?k.jsx(FR,{as:tAe,className:p,ref:n,ownerState:u,...c}):a?k.jsx(FR,{as:eAe,className:p,ref:n,ownerState:u,...c}):k.jsxs(FR,{className:p,ref:n,ownerState:u,...c,children:[v6||(v6=k.jsx("circle",{cx:"12",cy:"12",r:"12"})),k.jsx(oAe,{className:f.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function aAe(e){return qe("MuiStepLabel",e)}const pf=Ke("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),sAe=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return Me({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},aAe,t)},lAe=ae("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${pf.alternativeLabel}`]:{flexDirection:"column"},[`&.${pf.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),cAe=ae("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(dt(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${pf.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${pf.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${pf.alternativeLabel}`]:{marginTop:16},[`&.${pf.error}`]:{color:(e.vars||e).palette.error.main}}))),uAe=ae("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${pf.alternativeLabel}`]:{paddingRight:0}}),dAe=ae("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(dt(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${pf.alternativeLabel}`]:{textAlign:"center"}}))),Mp=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:f={},StepIconComponent:p,StepIconProps:m,...g}=r,{alternativeLabel:y,orientation:v}=x.useContext(sw),{active:w,disabled:C,completed:E,icon:I}=x.useContext(pI),O=l||I;let P=p;O&&!P&&(P=iAe);const R={...r,active:w,alternativeLabel:y,completed:E,disabled:C,error:s,orientation:v},D=sAe(R),M={slots:u,slotProps:{stepIcon:m,...a,...f}},[A,_]=wt("root",{elementType:lAe,externalForwardedProps:{...M,...g},ownerState:R,ref:n,className:fe(D.root,i)}),[N,B]=wt("label",{elementType:cAe,externalForwardedProps:M,ownerState:R}),[H,j]=wt("stepIcon",{elementType:P,externalForwardedProps:M,ownerState:R});return k.jsxs(A,{..._,children:[O||H?k.jsx(uAe,{className:D.iconContainer,ownerState:R,children:k.jsx(H,{completed:E,active:w,error:s,icon:O,...j})}):null,k.jsxs(dAe,{className:D.labelContainer,ownerState:R,children:[o?k.jsx(N,{...B,className:fe(D.label,B==null?void 0:B.className),children:o}):null,c]})]})});Mp.muiName="StepLabel";function fAe(e){return qe("MuiStepConnector",e)}Ke("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const pAe=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Oe(n)}`]};return Me(s,fAe,t)},hAe=ae("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),mAe=ae("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Oe(n.orientation)}`]]}})(dt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),gAe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=x.useContext(sw),{active:l,disabled:c,completed:u}=x.useContext(pI),f={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},p=pAe(f);return k.jsx(hAe,{className:fe(p.root,o),ref:n,ownerState:f,...i,children:k.jsx(mAe,{className:p.line,ownerState:f})})});function yAe(e){return qe("MuiStepContent",e)}Ke("MuiStepContent",["root","last","transition"]);const vAe=e=>{const{classes:t,last:n}=e;return Me({root:["root",n&&"last"],transition:["transition"]},yAe,t)},bAe=ae("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(dt(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),xAe=ae(aa,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Um=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=aa,transitionDuration:s="auto",TransitionProps:l,slots:c={},slotProps:u={},...f}=r,{orientation:p}=x.useContext(sw),{active:m,last:g,expanded:y}=x.useContext(pI),v={...r,last:g},w=vAe(v);let C=s;s==="auto"&&!a.muiSupportAuto&&(C=void 0);const E={slots:c,slotProps:{transition:l,...u}},[I,O]=wt("transition",{elementType:xAe,externalForwardedProps:E,ownerState:v,className:w.transition,additionalProps:{in:m||y,timeout:C,unmountOnExit:!0}});return k.jsx(bAe,{className:fe(w.root,i),ref:n,ownerState:v,...f,children:k.jsx(I,{as:a,...O,children:o})})});function SAe(e){return qe("MuiStepper",e)}Ke("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const wAe=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return Me({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},SAe,o)},CAe=ae("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),EAe=k.jsx(gAe,{}),TAe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=EAe,nonLinear:u=!1,orientation:f="horizontal",...p}=r,m={...r,nonLinear:u,alternativeLabel:i,orientation:f,component:l},g=wAe(m),y=x.Children.toArray(a).filter(Boolean),v=y.map((C,E)=>x.cloneElement(C,{index:E,last:E+1===y.length,...C.props})),w=x.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:f}),[o,i,c,u,f]);return k.jsx(sw.Provider,{value:w,children:k.jsx(CAe,{as:l,ownerState:m,className:fe(g.root,s),ref:n,...p,children:v})})});function OAe(e){return qe("MuiSwitch",e)}const Yi=Ke("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),IAe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Oe(n)}`,`size${Oe(r)}`],switchBase:["switchBase",`color${Oe(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Me(s,OAe,t);return{...t,...l}},PAe=ae("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Oe(n.edge)}`],t[`size${Oe(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Yi.thumb}`]:{width:16,height:16},[`& .${Yi.switchBase}`]:{padding:4,[`&.${Yi.checked}`]:{transform:"translateX(16px)"}}}}]}),AAe=ae(gne,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Yi.input}`]:t.input},n.color!=="default"&&t[`color${Oe(n.color)}`]]}})(dt(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Yi.checked}`]:{transform:"translateX(20px)"},[`&.${Yi.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Yi.checked} + .${Yi.track}`]:{opacity:.5},[`&.${Yi.disabled} + .${Yi.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Yi.input}`]:{left:"-100%",width:"300%"}})),dt(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(er(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Yi.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Yi.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Hu(e.palette[t].main,.62):Vu(e.palette[t].main,.55)}`}},[`&.${Yi.checked} + .${Yi.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),MAe=ae("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(dt(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),RAe=ae("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(dt(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Wo=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,slots:c={},slotProps:u={},...f}=r,p={...r,color:i,edge:a,size:s},m=IAe(p),g={slots:c,slotProps:u},[y,v]=wt("root",{className:fe(m.root,o),elementType:PAe,externalForwardedProps:g,ownerState:p,additionalProps:{sx:l}}),[w,C]=wt("thumb",{className:m.thumb,elementType:RAe,externalForwardedProps:g,ownerState:p}),E=k.jsx(w,{...C}),[I,O]=wt("track",{className:m.track,elementType:MAe,externalForwardedProps:g,ownerState:p});return k.jsxs(y,{...v,children:[k.jsx(AAe,{type:"checkbox",icon:E,checkedIcon:E,ref:n,ownerState:p,...f,classes:{...m,root:m.switchBase},slots:{...c.switchBase&&{root:c.switchBase},...c.input&&{input:c.input}},slotProps:{...u.switchBase&&{root:typeof u.switchBase=="function"?u.switchBase(p):u.switchBase},...u.input&&{input:typeof u.input=="function"?u.input(p):u.input}}}),k.jsx(I,{...O})]})});function DAe(e){return qe("MuiTab",e)}const Es=Ke("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),kAe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Oe(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return Me(c,DAe,t)},_Ae=ae(la,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Oe(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Es.iconWrapper}`]:t.iconWrapper},{[`& .${Es.icon}`]:t.icon}]}})(dt(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Es.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Es.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Es.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Es.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Es.selected}`]:{opacity:1},[`&.${Es.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Es.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Es.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Es.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Es.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),kN=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:p,onClick:m,onFocus:g,selected:y,selectionFollowsFocus:v,textColor:w="inherit",value:C,wrapped:E=!1,...I}=r,O={...r,disabled:i,disableFocusRipple:a,selected:y,icon:!!l,iconPosition:c,label:!!f,fullWidth:s,textColor:w,wrapped:E},P=kAe(O),R=l&&f&&x.isValidElement(l)?x.cloneElement(l,{className:fe(P.icon,l.props.className)}):l,D=A=>{!y&&p&&p(A,C),m&&m(A)},M=A=>{v&&!y&&p&&p(A,C),g&&g(A)};return k.jsxs(_Ae,{focusRipple:!a,className:fe(P.root,o),ref:n,role:"tab","aria-selected":y,disabled:i,onClick:D,onFocus:M,ownerState:O,tabIndex:y?0:-1,...I,children:[c==="top"||c==="start"?k.jsxs(x.Fragment,{children:[R,f]}):k.jsxs(x.Fragment,{children:[f,R]}),u]})}),_ne=x.createContext();function $Ae(e){return qe("MuiTable",e)}Ke("MuiTable",["root","stickyHeader"]);const NAe=e=>{const{classes:t,stickyHeader:n}=e;return Me({root:["root",n&&"stickyHeader"]},$Ae,t)},LAe=ae("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(dt(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),b6="table",Lc=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTable"}),{className:o,component:i=b6,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},f=NAe(u),p=x.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return k.jsx(_ne.Provider,{value:p,children:k.jsx(LAe,{as:i,role:i===b6?null:"table",ref:n,className:fe(f.root,o),ownerState:u,...c})})}),hI=x.createContext();function FAe(e){return qe("MuiTableBody",e)}Ke("MuiTableBody",["root"]);const jAe=e=>{const{classes:t}=e;return Me({root:["root"]},FAe,t)},BAe=ae("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),zAe={variant:"body"},x6="tbody",Fc=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableBody"}),{className:o,component:i=x6,...a}=r,s={...r,component:i},l=jAe(s);return k.jsx(hI.Provider,{value:zAe,children:k.jsx(BAe,{className:fe(l.root,o),as:i,ref:n,role:i===x6?null:"rowgroup",ownerState:s,...a})})});function VAe(e){return qe("MuiTableCell",e)}const HAe=Ke("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),UAe=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Oe(r)}`,o!=="normal"&&`padding${Oe(o)}`,`size${Oe(i)}`]};return Me(s,VAe,t)},GAe=ae("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Oe(n.size)}`],n.padding!=="normal"&&t[`padding${Oe(n.padding)}`],n.align!=="inherit"&&t[`align${Oe(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(dt(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
+ ${e.palette.mode==="light"?Hu(Nt(e.palette.divider,1),.88):Vu(Nt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${HAe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),ke=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:f,...p}=r,m=x.useContext(_ne),g=x.useContext(hI),y=g&&g.variant==="head";let v;a?v=a:v=y?"th":"td";let w=l;v==="td"?w=void 0:!w&&y&&(w="col");const C=f||g&&g.variant,E={...r,align:o,component:v,padding:s||(m&&m.padding?m.padding:"normal"),size:c||(m&&m.size?m.size:"medium"),sortDirection:u,stickyHeader:C==="head"&&m&&m.stickyHeader,variant:C},I=UAe(E);let O=null;return u&&(O=u==="asc"?"ascending":"descending"),k.jsx(GAe,{as:v,ref:n,className:fe(I.root,i),"aria-sort":O,scope:w,ownerState:E,...p})});function qAe(e){return qe("MuiTableContainer",e)}Ke("MuiTableContainer",["root"]);const WAe=e=>{const{classes:t}=e;return Me({root:["root"]},qAe,t)},KAe=ae("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),jc=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=WAe(s);return k.jsx(KAe,{ref:n,as:i,className:fe(l.root,o),ownerState:s,...a})});function YAe(e){return qe("MuiTableHead",e)}Ke("MuiTableHead",["root"]);const QAe=e=>{const{classes:t}=e;return Me({root:["root"]},YAe,t)},XAe=ae("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),JAe={variant:"head"},S6="thead",Bf=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableHead"}),{className:o,component:i=S6,...a}=r,s={...r,component:i},l=QAe(s);return k.jsx(hI.Provider,{value:JAe,children:k.jsx(XAe,{as:i,className:fe(l.root,o),ref:n,role:i===S6?null:"rowgroup",ownerState:s,...a})})});function ZAe(e){return qe("MuiToolbar",e)}Ke("MuiToolbar",["root","gutters","regular","dense"]);const eMe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Me({root:["root",!n&&"gutters",r]},ZAe,t)},tMe=ae("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(dt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),$ne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=eMe(c);return k.jsx(tMe,{as:i,className:fe(u.root,o),ref:n,ownerState:c,...l})}),Nne=Ot(k.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),Lne=Ot(k.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),nMe=x.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:f,showLastButton:p,slots:m={},slotProps:g={},...y}=t,v=vr(),w=q=>{l(q,0)},C=q=>{l(q,c-1)},E=q=>{l(q,c+1)},I=q=>{l(q,Math.max(0,Math.ceil(o/u)-1))},O=m.firstButton??pn,P=m.lastButton??pn,R=m.nextButton??pn,D=m.previousButton??pn,M=m.firstButtonIcon??Mne,A=m.lastButtonIcon??Rne,_=m.nextButtonIcon??Lne,N=m.previousButtonIcon??Nne,B=v?P:O,H=v?R:D,j=v?D:R,L=v?O:P,V=v?g.lastButton:g.firstButton,W=v?g.nextButton:g.previousButton,K=v?g.previousButton:g.nextButton,G=v?g.firstButton:g.lastButton;return k.jsxs("div",{ref:n,...y,children:[f&&k.jsx(B,{onClick:w,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...V,children:v?k.jsx(A,{...g.lastButtonIcon}):k.jsx(M,{...g.firstButtonIcon})}),k.jsx(H,{onClick:C,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...W??r,children:v?k.jsx(_,{...g.nextButtonIcon}):k.jsx(N,{...g.previousButtonIcon})}),k.jsx(j,{onClick:E,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...K??s,children:v?k.jsx(N,{...g.previousButtonIcon}):k.jsx(_,{...g.nextButtonIcon})}),p&&k.jsx(L,{onClick:I,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...G,children:v?k.jsx(M,{...g.firstButtonIcon}):k.jsx(A,{...g.lastButtonIcon})})]})});function rMe(e){return qe("MuiTablePagination",e)}const rh=Ke("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var w6;const oMe=ae(ke,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(dt(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),iMe=ae($ne,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${rh.actions}`]:t.actions,...t.toolbar})})(dt(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${rh.actions}`]:{flexShrink:0,marginLeft:20}}))),aMe=ae("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),sMe=ae("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(dt(({theme:e})=>({...e.typography.body2,flexShrink:0}))),lMe=ae(jf,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${rh.selectIcon}`]:t.selectIcon,[`& .${rh.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${rh.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),cMe=ae(Zt,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),uMe=ae("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(dt(({theme:e})=>({...e.typography.body2,flexShrink:0})));function dMe({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function fMe(e){return`Go to ${e} page`}const pMe=e=>{const{classes:t}=e;return Me({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},rMe,t)},Fne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=nMe,backIconButtonProps:i,colSpan:a,component:s=ke,count:l,disabled:c=!1,getItemAriaLabel:u=fMe,labelDisplayedRows:f=dMe,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:m,onPageChange:g,onRowsPerPageChange:y,page:v,rowsPerPage:w,rowsPerPageOptions:C=[10,25,50,100],SelectProps:E={},showFirstButton:I=!1,showLastButton:O=!1,slotProps:P={},slots:R={},...D}=r,M=r,A=pMe(M),_=(P==null?void 0:P.select)??E,N=_.native?"option":cMe;let B;(s===ke||s==="td")&&(B=a||1e3);const H=bn(_.id),j=bn(_.labelId),L=()=>l===-1?(v+1)*w:w===-1?l:Math.min(l,(v+1)*w),V={slots:R,slotProps:P},[W,K]=wt("root",{ref:n,className:A.root,elementType:oMe,externalForwardedProps:{...V,component:s,...D},ownerState:M,additionalProps:{colSpan:B}}),[G,q]=wt("toolbar",{className:A.toolbar,elementType:iMe,externalForwardedProps:V,ownerState:M}),[Y,Z]=wt("spacer",{className:A.spacer,elementType:aMe,externalForwardedProps:V,ownerState:M}),[ie,se]=wt("selectLabel",{className:A.selectLabel,elementType:sMe,externalForwardedProps:V,ownerState:M,additionalProps:{id:j}}),[ce,ye]=wt("select",{className:A.select,elementType:lMe,externalForwardedProps:V,ownerState:M}),[Se,ne]=wt("menuItem",{className:A.menuItem,elementType:N,externalForwardedProps:V,ownerState:M}),[le,de]=wt("displayedRows",{className:A.displayedRows,elementType:uMe,externalForwardedProps:V,ownerState:M});return k.jsx(W,{...K,children:k.jsxs(G,{...q,children:[k.jsx(Y,{...Z}),C.length>1&&k.jsx(ie,{...se,children:p}),C.length>1&&k.jsx(ce,{variant:"standard",...!_.variant&&{input:w6||(w6=k.jsx(iw,{}))},value:w,onChange:y,id:H,labelId:j,..._,classes:{..._.classes,root:fe(A.input,A.selectRoot,(_.classes||{}).root),select:fe(A.select,(_.classes||{}).select),icon:fe(A.selectIcon,(_.classes||{}).icon)},disabled:c,...ye,children:C.map(oe=>x.createElement(Se,{...ne,key:oe.label?oe.label:oe,value:oe.value?oe.value:oe},oe.label?oe.label:oe))}),k.jsx(le,{...de,children:f({from:l===0?0:v*w+1,to:L(),count:l===-1?-1:l,page:v})}),k.jsx(o,{className:A.actions,backIconButtonProps:i,count:l,nextIconButtonProps:m,onPageChange:g,page:v,rowsPerPage:w,showFirstButton:I,showLastButton:O,slotProps:P.actions,slots:R.actions,getItemAriaLabel:u,disabled:c})]})})});function hMe(e){return qe("MuiTableRow",e)}const C6=Ke("MuiTableRow",["root","selected","hover","head","footer"]),mMe=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return Me({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},hMe,t)},gMe=ae("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(dt(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${C6.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${C6.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),E6="tr",cn=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTableRow"}),{className:o,component:i=E6,hover:a=!1,selected:s=!1,...l}=r,c=x.useContext(hI),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},f=mMe(u);return k.jsx(gMe,{as:i,ref:n,className:fe(f.root,o),role:i===E6?null:"row",ownerState:u,...l})});function yMe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function vMe(e,t,n,r={},o=()=>{}){const{ease:i=yMe,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},f=p=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=p);const m=Math.min(1,(p-s)/a);if(t[e]=i(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(f),u)}const bMe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function xMe(e){const{onChange:t,...n}=e,r=x.useRef(),o=x.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return In(()=>{const a=Lh(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=ns(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),x.useEffect(()=>{i(),t(r.current)},[t]),k.jsx("div",{style:bMe,...n,ref:o})}function SMe(e){return qe("MuiTabScrollButton",e)}const wMe=Ke("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),CMe=e=>{const{classes:t,orientation:n,disabled:r}=e;return Me({root:["root",n,r&&"disabled"]},SMe,t)},EMe=ae(la,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${wMe.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),TMe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,f=vr(),p={isRtl:f,...r},m=CMe(p),g=i.StartScrollButtonIcon??Nne,y=i.EndScrollButtonIcon??Lne,v=Dn({elementType:g,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),w=Dn({elementType:y,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return k.jsx(EMe,{component:"div",className:fe(m.root,o),ref:n,role:null,ownerState:p,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:s==="left"?k.jsx(g,{...v}):k.jsx(y,{...w})})});function OMe(e){return qe("MuiTabs",e)}const gE=Ke("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),T6=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,O6=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,I1=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},IMe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Me({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},OMe,l)},PMe=ae("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gE.scrollButtons}`]:t.scrollButtons},{[`& .${gE.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(dt(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${gE.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),AMe=ae("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),MMe=ae("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),RMe=ae("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(dt(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),DMe=ae(xMe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),I6={},jne=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTabs"}),o=Lr(),i=vr(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:f,component:p="div",allowScrollButtonsMobile:m=!1,indicatorColor:g="primary",onChange:y,orientation:v="horizontal",ScrollButtonComponent:w,scrollButtons:C="auto",selectionFollowsFocus:E,slots:I={},slotProps:O={},TabIndicatorProps:P={},TabScrollButtonProps:R={},textColor:D="primary",value:M,variant:A="standard",visibleScrollbar:_=!1,...N}=r,B=A==="scrollable",H=v==="vertical",j=H?"scrollTop":"scrollLeft",L=H?"top":"left",V=H?"bottom":"right",W=H?"clientHeight":"clientWidth",K=H?"height":"width",G={...r,component:p,allowScrollButtonsMobile:m,indicatorColor:g,orientation:v,vertical:H,scrollButtons:C,textColor:D,variant:A,visibleScrollbar:_,fixed:!B,hideScrollbar:B&&!_,scrollableX:B&&!H,scrollableY:B&&H,centered:c&&!B,scrollButtonsHideMobile:!m},q=IMe(G),Y=Dn({elementType:I.StartScrollButtonIcon,externalSlotProps:O.startScrollButtonIcon,ownerState:G}),Z=Dn({elementType:I.EndScrollButtonIcon,externalSlotProps:O.endScrollButtonIcon,ownerState:G}),[ie,se]=x.useState(!1),[ce,ye]=x.useState(I6),[Se,ne]=x.useState(!1),[le,de]=x.useState(!1),[oe,ue]=x.useState(!1),[pe,Ee]=x.useState({overflow:"hidden",scrollbarWidth:0}),xe=new Map,Re=x.useRef(null),he=x.useRef(null),Pe={slots:I,slotProps:{indicator:P,scrollButton:R,...O}},ve=()=>{const gt=Re.current;let kt;if(gt){const Jt=gt.getBoundingClientRect();kt={clientWidth:gt.clientWidth,scrollLeft:gt.scrollLeft,scrollTop:gt.scrollTop,scrollWidth:gt.scrollWidth,top:Jt.top,bottom:Jt.bottom,left:Jt.left,right:Jt.right}}let Ht;if(gt&&M!==!1){const Jt=he.current.children;if(Jt.length>0){const Vn=Jt[xe.get(M)];Ht=Vn?Vn.getBoundingClientRect():null}}return{tabsMeta:kt,tabMeta:Ht}},Ie=Je(()=>{const{tabsMeta:gt,tabMeta:kt}=ve();let Ht=0,Jt;H?(Jt="top",kt&&gt&&(Ht=kt.top-gt.top+gt.scrollTop)):(Jt=i?"right":"left",kt&&gt&&(Ht=(i?-1:1)*(kt[Jt]-gt[Jt]+gt.scrollLeft)));const Vn={[Jt]:Ht,[K]:kt?kt[K]:0};if(typeof ce[Jt]!="number"||typeof ce[K]!="number")ye(Vn);else{const Xo=Math.abs(ce[Jt]-Vn[Jt]),Da=Math.abs(ce[K]-Vn[K]);(Xo>=1||Da>=1)&&ye(Vn)}}),te=(gt,{animation:kt=!0}={})=>{kt?vMe(j,Re.current,gt,{duration:o.transitions.duration.standard}):Re.current[j]=gt},Te=gt=>{let kt=Re.current[j];H?kt+=gt:kt+=gt*(i?-1:1),te(kt)},De=()=>{const gt=Re.current[W];let kt=0;const Ht=Array.from(he.current.children);for(let Jt=0;Jt<Ht.length;Jt+=1){const Vn=Ht[Jt];if(kt+Vn[W]>gt){Jt===0&&(kt=gt);break}kt+=Vn[W]}return kt},Ve=()=>{Te(-1*De())},We=()=>{Te(De())},[rt,{onChange:ut,...Be}]=wt("scrollbar",{className:fe(q.scrollableX,q.hideScrollbar),elementType:DMe,shouldForwardComponentProp:!0,externalForwardedProps:Pe,ownerState:G}),et=x.useCallback(gt=>{ut==null||ut(gt),Ee({overflow:null,scrollbarWidth:gt})},[ut]),[Le,It]=wt("scrollButtons",{className:fe(q.scrollButtons,R.className),elementType:TMe,externalForwardedProps:Pe,ownerState:G,additionalProps:{orientation:v,slots:{StartScrollButtonIcon:I.startScrollButtonIcon||I.StartScrollButtonIcon,EndScrollButtonIcon:I.endScrollButtonIcon||I.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Y,endScrollButtonIcon:Z}}}),Lt=()=>{const gt={};gt.scrollbarSizeListener=B?k.jsx(rt,{...Be,onChange:et}):null;const Ht=B&&(C==="auto"&&(Se||le)||C===!0);return gt.scrollButtonStart=Ht?k.jsx(Le,{direction:i?"right":"left",onClick:Ve,disabled:!Se,...It}):null,gt.scrollButtonEnd=Ht?k.jsx(Le,{direction:i?"left":"right",onClick:We,disabled:!le,...It}):null,gt},nt=Je(gt=>{const{tabsMeta:kt,tabMeta:Ht}=ve();if(!(!Ht||!kt)){if(Ht[L]<kt[L]){const Jt=kt[j]+(Ht[L]-kt[L]);te(Jt,{animation:gt})}else if(Ht[V]>kt[V]){const Jt=kt[j]+(Ht[V]-kt[V]);te(Jt,{animation:gt})}}}),lt=Je(()=>{B&&C!==!1&&ue(!oe)});x.useEffect(()=>{const gt=Lh(()=>{Re.current&&Ie()});let kt;const Ht=Xo=>{Xo.forEach(Da=>{Da.removedNodes.forEach(ps=>{kt==null||kt.unobserve(ps)}),Da.addedNodes.forEach(ps=>{kt==null||kt.observe(ps)})}),gt(),lt()},Jt=ns(Re.current);Jt.addEventListener("resize",gt);let Vn;return typeof ResizeObserver<"u"&&(kt=new ResizeObserver(gt),Array.from(he.current.children).forEach(Xo=>{kt.observe(Xo)})),typeof MutationObserver<"u"&&(Vn=new MutationObserver(Ht),Vn.observe(he.current,{childList:!0})),()=>{gt.clear(),Jt.removeEventListener("resize",gt),Vn==null||Vn.disconnect(),kt==null||kt.disconnect()}},[Ie,lt]),x.useEffect(()=>{const gt=Array.from(he.current.children),kt=gt.length;if(typeof IntersectionObserver<"u"&&kt>0&&B&&C!==!1){const Ht=gt[0],Jt=gt[kt-1],Vn={root:Re.current,threshold:.99},Xo=Pi=>{ne(!Pi[0].isIntersecting)},Da=new IntersectionObserver(Xo,Vn);Da.observe(Ht);const ps=Pi=>{de(!Pi[0].isIntersecting)},fd=new IntersectionObserver(ps,Vn);return fd.observe(Jt),()=>{Da.disconnect(),fd.disconnect()}}},[B,C,oe,u==null?void 0:u.length]),x.useEffect(()=>{se(!0)},[]),x.useEffect(()=>{Ie()}),x.useEffect(()=>{nt(I6!==ce)},[nt,ce]),x.useImperativeHandle(l,()=>({updateIndicator:Ie,updateScrollButtons:lt}),[Ie,lt]);const[vt,bt]=wt("indicator",{className:fe(q.indicator,P.className),elementType:RMe,externalForwardedProps:Pe,ownerState:G,additionalProps:{style:ce}}),vn=k.jsx(vt,{...bt});let kn=0;const Rr=x.Children.map(u,gt=>{if(!x.isValidElement(gt))return null;const kt=gt.props.value===void 0?kn:gt.props.value;xe.set(kt,kn);const Ht=kt===M;return kn+=1,x.cloneElement(gt,{fullWidth:A==="fullWidth",indicator:Ht&&!ie&&vn,selected:Ht,selectionFollowsFocus:E,onChange:y,textColor:D,value:kt,...kn===1&&M===!1&&!gt.props.tabIndex?{tabIndex:0}:{}})}),nr=gt=>{if(gt.altKey||gt.shiftKey||gt.ctrlKey||gt.metaKey)return;const kt=he.current,Ht=Mr(kt).activeElement;if(Ht.getAttribute("role")!=="tab")return;let Vn=v==="horizontal"?"ArrowLeft":"ArrowUp",Xo=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&i&&(Vn="ArrowRight",Xo="ArrowLeft"),gt.key){case Vn:gt.preventDefault(),I1(kt,Ht,O6);break;case Xo:gt.preventDefault(),I1(kt,Ht,T6);break;case"Home":gt.preventDefault(),I1(kt,null,T6);break;case"End":gt.preventDefault(),I1(kt,null,O6);break}},Bn=Lt(),[yo,Oo]=wt("root",{ref:n,className:fe(q.root,f),elementType:PMe,externalForwardedProps:{...Pe,...N,component:p},ownerState:G}),[oo,Ii]=wt("scroller",{ref:Re,className:q.scroller,elementType:AMe,externalForwardedProps:Pe,ownerState:G,additionalProps:{style:{overflow:pe.overflow,[H?`margin${i?"Left":"Right"}`:"marginBottom"]:_?void 0:-pe.scrollbarWidth}}}),[Kt,un]=wt("list",{ref:he,className:fe(q.list,q.flexContainer),elementType:MMe,externalForwardedProps:Pe,ownerState:G,getSlotProps:gt=>({...gt,onKeyDown:kt=>{var Ht;nr(kt),(Ht=gt.onKeyDown)==null||Ht.call(gt,kt)}})});return k.jsxs(yo,{...Oo,children:[Bn.scrollButtonStart,Bn.scrollbarSizeListener,k.jsxs(oo,{...Ii,children:[k.jsx(Kt,{"aria-label":a,"aria-labelledby":s,"aria-orientation":v==="vertical"?"vertical":null,role:"tablist",...un,children:Rr}),ie&&vn]}),Bn.scrollButtonEnd]})});function kMe(e){return qe("MuiTextField",e)}Ke("MuiTextField",["root"]);const _Me={standard:dB,filled:uB,outlined:mB},$Me=e=>{const{classes:t}=e;return Me({root:["root"]},kMe,t)},NMe=ae(jh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dn=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:p,fullWidth:m=!1,helperText:g,id:y,InputLabelProps:v,inputProps:w,InputProps:C,inputRef:E,label:I,maxRows:O,minRows:P,multiline:R=!1,name:D,onBlur:M,onChange:A,onFocus:_,placeholder:N,required:B=!1,rows:H,select:j=!1,SelectProps:L,slots:V={},slotProps:W={},type:K,value:G,variant:q="outlined",...Y}=r,Z={...r,autoFocus:i,color:l,disabled:u,error:f,fullWidth:m,multiline:R,required:B,select:j,variant:q},ie=$Me(Z),se=bn(y),ce=g&&se?`${se}-helper-text`:void 0,ye=I&&se?`${se}-label`:void 0,Se=_Me[q],ne={slots:V,slotProps:{input:C,inputLabel:v,htmlInput:w,formHelperText:p,select:L,...W}},le={},de=ne.slotProps.inputLabel;q==="outlined"&&(de&&typeof de.shrink<"u"&&(le.notched=de.shrink),le.label=I),j&&((!L||!L.native)&&(le.id=void 0),le["aria-describedby"]=void 0);const[oe,ue]=wt("root",{elementType:NMe,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,...Y},ownerState:Z,className:fe(ie.root,s),ref:n,additionalProps:{disabled:u,error:f,fullWidth:m,required:B,color:l,variant:q}}),[pe,Ee]=wt("input",{elementType:Se,externalForwardedProps:ne,additionalProps:le,ownerState:Z}),[xe,Re]=wt("inputLabel",{elementType:Bh,externalForwardedProps:ne,ownerState:Z}),[he,Pe]=wt("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:Z}),[ve,Ie]=wt("formHelperText",{elementType:aw,externalForwardedProps:ne,ownerState:Z}),[te,Te]=wt("select",{elementType:jf,externalForwardedProps:ne,ownerState:Z}),De=k.jsx(pe,{"aria-describedby":ce,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:m,multiline:R,name:D,rows:H,maxRows:O,minRows:P,type:K,value:G,id:se,inputRef:E,onBlur:M,onChange:A,onFocus:_,placeholder:N,inputProps:Pe,slots:{input:V.htmlInput?he:void 0},...Ee});return k.jsxs(oe,{...ue,children:[I!=null&&I!==""&&k.jsx(xe,{htmlFor:se,id:ye,...Re,children:I}),j?k.jsx(te,{"aria-describedby":ce,id:se,labelId:ye,value:G,input:De,...Te,children:a}):De,g&&k.jsx(ve,{id:ce,...Ie,children:g})]})});function LMe(e){return qe("MuiToggleButton",e)}const jp=Ke("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Bne=x.createContext({}),zne=x.createContext(void 0);function FMe(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const jMe=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Oe(i)}`,a]};return Me(s,LMe,t)},BMe=ae(la,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Oe(n.size)}`]]}})(dt(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${jp.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${jp.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(er()).map(([t])=>({props:{color:t},style:{[`&.${jp.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Nt(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Nt(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Zb=x.forwardRef(function(t,n){const{value:r,...o}=x.useContext(Bne),i=x.useContext(zne),a=dh({...o,selected:FMe(t.value,r)},t),s=pt({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:f=!1,disableFocusRipple:p=!1,fullWidth:m=!1,onChange:g,onClick:y,selected:v,size:w="medium",value:C,...E}=s,I={...s,color:u,disabled:f,disableFocusRipple:p,fullWidth:m,size:w},O=jMe(I),P=D=>{y&&(y(D,C),D.defaultPrevented)||g&&g(D,C)},R=i||"";return k.jsx(BMe,{className:fe(o.className,O.root,c,R),disabled:f,focusRipple:!p,ref:n,onClick:P,onChange:g,value:C,ownerState:I,"aria-pressed":v,...E,children:l})});function zMe(e){return qe("MuiToggleButtonGroup",e)}const jr=Ke("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),VMe=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Oe(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Me(i,zMe,t)},HMe=ae("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${jr.grouped}`]:t.grouped},{[`& .${jr.grouped}`]:t[`grouped${Oe(n.orientation)}`]},{[`& .${jr.firstButton}`]:t.firstButton},{[`& .${jr.lastButton}`]:t.lastButton},{[`& .${jr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(dt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${jr.grouped}`]:{[`&.${jr.selected} + .${jr.grouped}.${jr.selected}`]:{borderTop:0,marginTop:0}},[`& .${jr.firstButton},& .${jr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${jr.lastButton},& .${jr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${jr.lastButton}.${jp.disabled},& .${jr.middleButton}.${jp.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${jr.grouped}`]:{[`&.${jr.selected} + .${jr.grouped}.${jr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${jr.firstButton},& .${jr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${jr.lastButton},& .${jr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${jr.lastButton}.${jp.disabled},& .${jr.middleButton}.${jp.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),UMe=x.forwardRef(function(t,n){const r=pt({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:f="horizontal",size:p="medium",value:m,...g}=r,y={...r,disabled:s,fullWidth:c,orientation:f,size:p},v=VMe(y),w=x.useCallback((R,D)=>{if(!u)return;const M=m&&m.indexOf(D);let A;m&&M>=0?(A=m.slice(),A.splice(M,1)):A=m?m.concat(D):[D],u(R,A)},[u,m]),C=x.useCallback((R,D)=>{u&&u(R,m===D?null:D)},[u,m]),E=x.useMemo(()=>({className:v.grouped,onChange:l?C:w,value:m,size:p,fullWidth:c,color:a,disabled:s}),[v.grouped,l,C,w,m,p,c,a,s]),I=wte(o),O=I.length,P=R=>{const D=R===0,M=R===O-1;return D&&M?"":D?v.firstButton:M?v.lastButton:v.middleButton};return k.jsx(HMe,{role:"group",className:fe(v.root,i),ref:n,ownerState:y,...g,children:k.jsx(Bne.Provider,{value:E,children:I.map((R,D)=>k.jsx(zne.Provider,{value:P(D),children:R},D))})})}),If=vte({themeId:qs}),GMe=(e,t,n,r)=>{var i,a,s,l;const o=[n,{code:t,...r||{}}];if((a=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&a.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);oh(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(l=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&l.warn?e.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},P6={},_N=(e,t,n,r)=>{oh(n)&&P6[n]||(oh(n)&&(P6[n]=new Date),GMe(e,t,n,r))},Vne=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},$N=(e,t,n)=>{e.loadNamespaces(t,Vne(e,n))},A6=(e,t,n,r)=>{if(oh(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return $N(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Vne(e,r))},qMe=(e,t,n={})=>!t.languages||!t.languages.length?(_N(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),oh=e=>typeof e=="string",WMe=e=>typeof e=="object"&&e!==null,KMe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,YMe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},QMe=e=>YMe[e],XMe=e=>e.replace(KMe,QMe);let NN={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:XMe};const JMe=(e={})=>{NN={...NN,...e}},ZMe=()=>NN;let Hne;const eRe=e=>{Hne=e},tRe=()=>Hne,nRe={type:"3rdParty",init(e){JMe(e.options.react),eRe(e)}},rRe=x.createContext();class oRe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const iRe=(e,t)=>{const n=x.useRef();return x.useEffect(()=>{n.current=e},[e,t]),n.current},Une=(e,t,n,r)=>e.getFixedT(t,n,r),aRe=(e,t,n,r)=>x.useCallback(Une(e,t,n,r),[e,t,n,r]),je=(e,t={})=>{var I,O,P,R;const{i18n:n}=t,{i18n:r,defaultNS:o}=x.useContext(rRe)||{},i=n||r||tRe();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new oRe),!i){_N(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const D=(A,_)=>oh(_)?_:WMe(_)&&oh(_.defaultValue)?_.defaultValue:Array.isArray(A)?A[A.length-1]:A,M=[D,{},!1];return M.t=D,M.i18n={},M.ready=!1,M}(I=i.options.react)!=null&&I.wait&&_N(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...ZMe(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((O=i.options)==null?void 0:O.defaultNS);c=oh(c)?[c]:c||["translation"],(R=(P=i.reportNamespaces).addUsedNamespaces)==null||R.call(P,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(D=>qMe(D,i,a)),f=aRe(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),p=()=>f,m=()=>Une(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[g,y]=x.useState(p);let v=c.join();t.lng&&(v=`${t.lng}${v}`);const w=iRe(v),C=x.useRef(!0);x.useEffect(()=>{const{bindI18n:D,bindI18nStore:M}=a;C.current=!0,!u&&!s&&(t.lng?A6(i,t.lng,c,()=>{C.current&&y(m)}):$N(i,c,()=>{C.current&&y(m)})),u&&w&&w!==v&&C.current&&y(m);const A=()=>{C.current&&y(m)};return D&&(i==null||i.on(D,A)),M&&(i==null||i.store.on(M,A)),()=>{C.current=!1,i&&(D==null||D.split(" ").forEach(_=>i.off(_,A))),M&&i&&M.split(" ").forEach(_=>i.store.off(_,A))}},[i,v]),x.useEffect(()=>{C.current&&u&&y(p)},[i,l,u]);const E=[g,i,u];if(E.t=g,E.i18n=i,E.ready=u,u||!u&&!s)return E;throw new Promise(D=>{t.lng?A6(i,t.lng,c,()=>D()):$N(i,c,()=>D())})},Qa=()=>{const[e]=je();return S(Xt,{sx:{textAlign:"center"},children:e("loading")})},Er=()=>S(Xt,{sx:{height:200,alignItems:"center",mt:2},component:Ft,direction:"column",justifyContent:"center",children:S(nw,{})}),vh=()=>S(nw,{size:20}),J0=Ot(k.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})),ku=Ot(k.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),lw=Ot(k.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"})),ed=Ot(k.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"})),cw=Ot(k.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),di=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>S(cv,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(ho,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[S(Zl,{title:e,subheader:t,action:S(cw,{onClick:r})}),S(ji,{children:o}),S(ul,{})]})}),zh=e=>{const[t]=je(),n=e.height?e.height:"50vh";return S(Tt,{children:Q(Xt,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[S(at,{variant:"h6",mr:3,children:t("nothingHereYet")}),S(at,{mr:3,children:t("nothingHereYetAction")})]})})},yB=e=>{const[t]=je(),[n,r]=J.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?S(ct,{size:"small",variant:"contained",href:e.link,children:t("add")}):S(ct,{size:"small",variant:"contained",onClick:o,children:t("add")});return Q(Tt,{children:[Q(ho,{children:[S(Zl,{title:e.title,subheader:".",sx:{paddingBottom:0}}),S(ji,{sx:{paddingTop:0,height:"500px"},children:S(zh,{})}),S(ul,{children:a})]}),S(di,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function Gne(e,t){return function(){return e.apply(t,arguments)}}const{toString:sRe}=Object.prototype,{getPrototypeOf:vB}=Object,{iterator:mI,toStringTag:qne}=Symbol,gI=(e=>t=>{const n=sRe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ec=e=>(e=e.toLowerCase(),t=>gI(t)===e),yI=e=>t=>typeof t===e,{isArray:uv}=Array,Rx=yI("undefined");function lRe(e){return e!==null&&!Rx(e)&&e.constructor!==null&&!Rx(e.constructor)&&Oa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Wne=ec("ArrayBuffer");function cRe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wne(e.buffer),t}const uRe=yI("string"),Oa=yI("function"),Kne=yI("number"),vI=e=>e!==null&&typeof e=="object",dRe=e=>e===!0||e===!1,yE=e=>{if(gI(e)!=="object")return!1;const t=vB(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qne in e)&&!(mI in e)},fRe=ec("Date"),pRe=ec("File"),hRe=ec("Blob"),mRe=ec("FileList"),gRe=e=>vI(e)&&Oa(e.pipe),yRe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Oa(e.append)&&((t=gI(e))==="formdata"||t==="object"&&Oa(e.toString)&&e.toString()==="[object FormData]"))},vRe=ec("URLSearchParams"),[bRe,xRe,SRe,wRe]=["ReadableStream","Request","Response","Headers"].map(ec),CRe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uw(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),uv(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function Yne(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Bp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qne=e=>!Rx(e)&&e!==Bp;function LN(){const{caseless:e}=Qne(this)&&this||{},t={},n=(r,o)=>{const i=e&&Yne(t,o)||o;yE(t[i])&&yE(r)?t[i]=LN(t[i],r):yE(r)?t[i]=LN({},r):uv(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&uw(arguments[r],n);return t}const ERe=(e,t,n,{allOwnKeys:r}={})=>(uw(t,(o,i)=>{n&&Oa(o)?e[i]=Gne(o,n):e[i]=o},{allOwnKeys:r}),e),TRe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ORe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},IRe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&vB(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},PRe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ARe=e=>{if(!e)return null;if(uv(e))return e;let t=e.length;if(!Kne(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},MRe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vB(Uint8Array)),RRe=(e,t)=>{const r=(e&&e[mI]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},DRe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},kRe=ec("HTMLFormElement"),_Re=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),M6=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$Re=ec("RegExp"),Xne=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};uw(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},NRe=e=>{Xne(e,(t,n)=>{if(Oa(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Oa(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},LRe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return uv(e)?r(e):r(String(e).split(t)),n},FRe=()=>{},jRe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function BRe(e){return!!(e&&Oa(e.append)&&e[qne]==="FormData"&&e[mI])}const zRe=e=>{const t=new Array(10),n=(r,o)=>{if(vI(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=uv(r)?[]:{};return uw(r,(a,s)=>{const l=n(a,o+1);!Rx(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},VRe=ec("AsyncFunction"),HRe=e=>e&&(vI(e)||Oa(e))&&Oa(e.then)&&Oa(e.catch),Jne=((e,t)=>e?setImmediate:t?((n,r)=>(Bp.addEventListener("message",({source:o,data:i})=>{o===Bp&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Bp.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Oa(Bp.postMessage)),URe=typeof queueMicrotask<"u"?queueMicrotask.bind(Bp):typeof process<"u"&&process.nextTick||Jne,GRe=e=>e!=null&&Oa(e[mI]),Ue={isArray:uv,isArrayBuffer:Wne,isBuffer:lRe,isFormData:yRe,isArrayBufferView:cRe,isString:uRe,isNumber:Kne,isBoolean:dRe,isObject:vI,isPlainObject:yE,isReadableStream:bRe,isRequest:xRe,isResponse:SRe,isHeaders:wRe,isUndefined:Rx,isDate:fRe,isFile:pRe,isBlob:hRe,isRegExp:$Re,isFunction:Oa,isStream:gRe,isURLSearchParams:vRe,isTypedArray:MRe,isFileList:mRe,forEach:uw,merge:LN,extend:ERe,trim:CRe,stripBOM:TRe,inherits:ORe,toFlatObject:IRe,kindOf:gI,kindOfTest:ec,endsWith:PRe,toArray:ARe,forEachEntry:RRe,matchAll:DRe,isHTMLForm:kRe,hasOwnProperty:M6,hasOwnProp:M6,reduceDescriptors:Xne,freezeMethods:NRe,toObjectSet:LRe,toCamelCase:_Re,noop:FRe,toFiniteNumber:jRe,findKey:Yne,global:Bp,isContextDefined:Qne,isSpecCompliantForm:BRe,toJSONObject:zRe,isAsyncFn:VRe,isThenable:HRe,setImmediate:Jne,asap:URe,isIterable:GRe};function Sn(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Ue.inherits(Sn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ue.toJSONObject(this.config),code:this.code,status:this.status}}});const Zne=Sn.prototype,ere={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ere[e]={value:e}});Object.defineProperties(Sn,ere);Object.defineProperty(Zne,"isAxiosError",{value:!0});Sn.from=(e,t,n,r,o,i)=>{const a=Object.create(Zne);return Ue.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Sn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const qRe=null;function FN(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function tre(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function R6(e,t,n){return e?e.concat(t).map(function(o,i){return o=tre(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function WRe(e){return Ue.isArray(e)&&!e.some(FN)}const KRe=Ue.toFlatObject(Ue,{},null,function(t){return/^is[A-Z]/.test(t)});function bI(e,t,n){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!Ue.isUndefined(v[y])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(o))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(Ue.isDate(g))return g.toISOString();if(!l&&Ue.isBlob(g))throw new Sn("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(g)||Ue.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,y,v){let w=g;if(g&&!v&&typeof g=="object"){if(Ue.endsWith(y,"{}"))y=r?y:y.slice(0,-2),g=JSON.stringify(g);else if(Ue.isArray(g)&&WRe(g)||(Ue.isFileList(g)||Ue.endsWith(y,"[]"))&&(w=Ue.toArray(g)))return y=tre(y),w.forEach(function(E,I){!(Ue.isUndefined(E)||E===null)&&t.append(a===!0?R6([y],I,i):a===null?y:y+"[]",c(E))}),!1}return FN(g)?!0:(t.append(R6(v,y,i),c(g)),!1)}const f=[],p=Object.assign(KRe,{defaultVisitor:u,convertValue:c,isVisitable:FN});function m(g,y){if(!Ue.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(g),Ue.forEach(g,function(w,C){(!(Ue.isUndefined(w)||w===null)&&o.call(t,w,Ue.isString(C)?C.trim():C,y,p))===!0&&m(w,y?y.concat(C):[C])}),f.pop()}}if(!Ue.isObject(e))throw new TypeError("data must be an object");return m(e),t}function D6(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function bB(e,t){this._pairs=[],e&&bI(e,this,t)}const nre=bB.prototype;nre.append=function(t,n){this._pairs.push([t,n])};nre.toString=function(t){const n=t?function(r){return t.call(this,r,D6)}:D6;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function YRe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rre(e,t,n){if(!t)return e;const r=n&&n.encode||YRe;Ue.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=Ue.isURLSearchParams(t)?t.toString():new bB(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class k6{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ore={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},QRe=typeof URLSearchParams<"u"?URLSearchParams:bB,XRe=typeof FormData<"u"?FormData:null,JRe=typeof Blob<"u"?Blob:null,ZRe={isBrowser:!0,classes:{URLSearchParams:QRe,FormData:XRe,Blob:JRe},protocols:["http","https","file","blob","url","data"]},xB=typeof window<"u"&&typeof document<"u",jN=typeof navigator=="object"&&navigator||void 0,eDe=xB&&(!jN||["ReactNative","NativeScript","NS"].indexOf(jN.product)<0),tDe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nDe=xB&&window.location.href||"http://localhost",rDe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xB,hasStandardBrowserEnv:eDe,hasStandardBrowserWebWorkerEnv:tDe,navigator:jN,origin:nDe},Symbol.toStringTag,{value:"Module"})),Li={...rDe,...ZRe};function oDe(e,t){return bI(e,new Li.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Li.isNode&&Ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function iDe(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function aDe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function ire(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=i>=n.length;return a=!a&&Ue.isArray(o)?o.length:a,l?(Ue.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Ue.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Ue.isArray(o[a])&&(o[a]=aDe(o[a])),!s)}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const n={};return Ue.forEachEntry(e,(r,o)=>{t(iDe(r),o,n,0)}),n}return null}function sDe(e,t,n){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const dw={transitional:ore,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Ue.isObject(t);if(i&&Ue.isHTMLForm(t)&&(t=new FormData(t)),Ue.isFormData(t))return o?JSON.stringify(ire(t)):t;if(Ue.isArrayBuffer(t)||Ue.isBuffer(t)||Ue.isStream(t)||Ue.isFile(t)||Ue.isBlob(t)||Ue.isReadableStream(t))return t;if(Ue.isArrayBufferView(t))return t.buffer;if(Ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return oDe(t,this.formSerializer).toString();if((s=Ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return bI(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),sDe(t)):t}],transformResponse:[function(t){const n=this.transitional||dw.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Ue.isResponse(t)||Ue.isReadableStream(t))return t;if(t&&Ue.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Sn.from(s,Sn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Li.classes.FormData,Blob:Li.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],e=>{dw.headers[e]={}});const lDe=Ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cDe=e=>{const t={};let n,r,o;return e&&e.split(`
+`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&lDe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_6=Symbol("internals");function e0(e){return e&&String(e).trim().toLowerCase()}function vE(e){return e===!1||e==null?e:Ue.isArray(e)?e.map(vE):String(e)}function uDe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const dDe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function jR(e,t,n,r,o){if(Ue.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Ue.isString(t)){if(Ue.isString(r))return t.indexOf(r)!==-1;if(Ue.isRegExp(r))return r.test(t)}}function fDe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function pDe(e,t){const n=Ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}let Ia=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=e0(l);if(!u)throw new Error("header name must be a non-empty string");const f=Ue.findKey(o,u);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||l]=vE(s))}const a=(s,l)=>Ue.forEach(s,(c,u)=>i(c,u,l));if(Ue.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Ue.isString(t)&&(t=t.trim())&&!dDe(t))a(cDe(t),n);else if(Ue.isObject(t)&&Ue.isIterable(t)){let s={},l,c;for(const u of t){if(!Ue.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[c=u[0]]=(l=s[c])?Ue.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=e0(t),t){const r=Ue.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return uDe(o);if(Ue.isFunction(n))return n.call(this,o,r);if(Ue.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=e0(t),t){const r=Ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||jR(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=e0(a),a){const s=Ue.findKey(r,a);s&&(!n||jR(r,r[s],s,n))&&(delete r[s],o=!0)}}return Ue.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||jR(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Ue.forEach(this,(o,i)=>{const a=Ue.findKey(r,i);if(a){n[a]=vE(o),delete n[i];return}const s=t?fDe(i):String(i).trim();s!==i&&delete n[i],n[s]=vE(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ue.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
+`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[_6]=this[_6]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=e0(a);r[s]||(pDe(o,a),r[s]=!0)}return Ue.isArray(t)?t.forEach(i):i(t),this}};Ia.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ue.reduceDescriptors(Ia.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Ue.freezeMethods(Ia);function BR(e,t){const n=this||dw,r=t||n,o=Ia.from(r.headers);let i=r.data;return Ue.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function are(e){return!!(e&&e.__CANCEL__)}function dv(e,t,n){Sn.call(this,e??"canceled",Sn.ERR_CANCELED,t,n),this.name="CanceledError"}Ue.inherits(dv,Sn,{__CANCEL__:!0});function sre(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Sn("Request failed with status code "+n.status,[Sn.ERR_BAD_REQUEST,Sn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function hDe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mDe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const m=u&&c-u;return m?Math.round(p*1e3/m):void 0}}function gDe(e,t){let n=0,r=1e3/t,o,i;const a=(c,u=Date.now())=>{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-f)))},()=>o&&a(o)]}const tT=(e,t,n=3)=>{let r=0;const o=mDe(50,250);return gDe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},$6=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},N6=e=>(...t)=>Ue.asap(()=>e(...t)),yDe=Li.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Li.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Li.origin),Li.navigator&&/(msie|trident)/i.test(Li.navigator.userAgent)):()=>!0,vDe=Li.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Ue.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ue.isString(r)&&a.push("path="+r),Ue.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function bDe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xDe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lre(e,t,n){let r=!bDe(t);return e&&(r||n==!1)?xDe(e,t):t}const L6=e=>e instanceof Ia?{...e}:e;function bh(e,t){t=t||{};const n={};function r(c,u,f,p){return Ue.isPlainObject(c)&&Ue.isPlainObject(u)?Ue.merge.call({caseless:p},c,u):Ue.isPlainObject(u)?Ue.merge({},u):Ue.isArray(u)?u.slice():u}function o(c,u,f,p){if(Ue.isUndefined(u)){if(!Ue.isUndefined(c))return r(void 0,c,f,p)}else return r(c,u,f,p)}function i(c,u){if(!Ue.isUndefined(u))return r(void 0,u)}function a(c,u){if(Ue.isUndefined(u)){if(!Ue.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u,f)=>o(L6(c),L6(u),f,!0)};return Ue.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=l[u]||o,p=f(e[u],t[u],u);Ue.isUndefined(p)&&f!==s||(n[u]=p)}),n}const cre=e=>{const t=bh({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Ia.from(a),t.url=rre(lre(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(Ue.isFormData(n)){if(Li.hasStandardBrowserEnv||Li.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Li.hasStandardBrowserEnv&&(r&&Ue.isFunction(r)&&(r=r(t)),r||r!==!1&&yDe(t.url))){const c=o&&i&&vDe.read(i);c&&a.set(o,c)}return t},SDe=typeof XMLHttpRequest<"u",wDe=SDe&&function(e){return new Promise(function(n,r){const o=cre(e);let i=o.data;const a=Ia.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,f,p,m,g;function y(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function w(){if(!v)return;const E=Ia.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),O={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:E,config:e,request:v};sre(function(R){n(R),y()},function(R){r(R),y()},O),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new Sn("Request aborted",Sn.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new Sn("Network Error",Sn.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const O=o.transitional||ore;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new Sn(I,O.clarifyTimeoutError?Sn.ETIMEDOUT:Sn.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&Ue.forEach(a.toJSON(),function(I,O){v.setRequestHeader(O,I)}),Ue.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([p,g]=tT(c,!0),v.addEventListener("progress",p)),l&&v.upload&&([f,m]=tT(l),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(u=E=>{v&&(r(!E||E.type?new dv(null,e,v):E),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const C=hDe(o.url);if(C&&Li.protocols.indexOf(C)===-1){r(new Sn("Unsupported protocol "+C+":",Sn.ERR_BAD_REQUEST,e));return}v.send(i||null)})},CDe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Sn?u:new dv(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new Sn(`timeout ${t} of ms exceeded`,Sn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>Ue.asap(s),l}},EDe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},TDe=async function*(e,t){for await(const n of ODe(e))yield*EDe(n,t)},ODe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},F6=(e,t,n,r)=>{const o=TDe(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let f=u.byteLength;if(n){let p=i+=f;n(p)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},xI=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ure=xI&&typeof ReadableStream=="function",IDe=xI&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dre=(e,...t)=>{try{return!!e(...t)}catch{return!1}},PDe=ure&&dre(()=>{let e=!1;const t=new Request(Li.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),j6=64*1024,BN=ure&&dre(()=>Ue.isReadableStream(new Response("").body)),nT={stream:BN&&(e=>e.body)};xI&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!nT[t]&&(nT[t]=Ue.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Sn(`Response type '${t}' is not supported`,Sn.ERR_NOT_SUPPORT,r)})})})(new Response);const ADe=async e=>{if(e==null)return 0;if(Ue.isBlob(e))return e.size;if(Ue.isSpecCompliantForm(e))return(await new Request(Li.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Ue.isArrayBufferView(e)||Ue.isArrayBuffer(e))return e.byteLength;if(Ue.isURLSearchParams(e)&&(e=e+""),Ue.isString(e))return(await IDe(e)).byteLength},MDe=async(e,t)=>{const n=Ue.toFiniteNumber(e.getContentLength());return n??ADe(t)},RDe=xI&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:p}=cre(e);c=c?(c+"").toLowerCase():"text";let m=CDe([o,i&&i.toAbortSignal()],a),g;const y=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let v;try{if(l&&PDe&&n!=="get"&&n!=="head"&&(v=await MDe(u,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),P;if(Ue.isFormData(r)&&(P=O.headers.get("content-type"))&&u.setContentType(P),O.body){const[R,D]=$6(v,tT(N6(l)));r=F6(O.body,j6,R,D)}}Ue.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...p,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let C=await fetch(g);const E=BN&&(c==="stream"||c==="response");if(BN&&(s||E&&y)){const O={};["status","statusText","headers"].forEach(M=>{O[M]=C[M]});const P=Ue.toFiniteNumber(C.headers.get("content-length")),[R,D]=s&&$6(P,tT(N6(s),!0))||[];C=new Response(F6(C.body,j6,R,()=>{D&&D(),y&&y()}),O)}c=c||"text";let I=await nT[Ue.findKey(nT,c)||"text"](C,e);return!E&&y&&y(),await new Promise((O,P)=>{sre(O,P,{data:I,headers:Ia.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:g})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Sn("Network Error",Sn.ERR_NETWORK,e,g),{cause:w.cause||w}):Sn.from(w,w&&w.code,e,g)}}),zN={http:qRe,xhr:wDe,fetch:RDe};Ue.forEach(zN,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const B6=e=>`- ${e}`,DDe=e=>Ue.isFunction(e)||e===null||e===!1,fre={getAdapter:e=>{e=Ue.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!DDe(n)&&(r=zN[(a=String(n)).toLowerCase()],r===void 0))throw new Sn(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
`+i.map(B6).join(`
-`):" "+B6(i[0]):"as no adapter specified";throw new Sn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:BN};function BR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new uv(null,e)}function z6(e){return BR(e),e.headers=Ia.from(e.headers),e.data=jR.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dre.getAdapter(e.adapter||dw.adapter)(e).then(function(r){return BR(e),r.data=jR.call(e,e.transformResponse,r),r.headers=Ia.from(r.headers),r},function(r){return ire(r)||(BR(e),r&&r.response&&(r.response.data=jR.call(e,e.transformResponse,r.response),r.response.headers=Ia.from(r.response.headers))),Promise.reject(r)})}const fre="1.9.0",xI={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xI[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const V6={};xI.transitional=function(t,n,r){function o(i,a){return"[Axios v"+fre+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Sn(o(a," has been removed"+(n?" in "+n:"")),Sn.ERR_DEPRECATED);return n&&!V6[a]&&(V6[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};xI.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function RDe(e,t,n){if(typeof e!="object")throw new Sn("options must be an object",Sn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new Sn("option "+i+" must be "+l,Sn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Sn("Unknown option "+i,Sn.ERR_BAD_OPTION)}}const vE={assertOptions:RDe,validators:xI},uc=vE.validators;let rh=class{constructor(t){this.defaults=t||{},this.interceptors={request:new k6,response:new k6}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
-`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yh(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&vE.assertOptions(r,{silentJSONParsing:uc.transitional(uc.boolean),forcedJSONParsing:uc.transitional(uc.boolean),clarifyTimeoutError:uc.transitional(uc.boolean)},!1),o!=null&&(Ue.isFunction(o)?n.paramsSerializer={serialize:o}:vE.assertOptions(o,{encode:uc.function,serialize:uc.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),vE.assertOptions(n,{baseUrl:uc.spelling("baseURL"),withXsrfToken:uc.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Ue.merge(i.common,i[n.method]);i&&Ue.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Ia.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let u,f=0,h;if(!l){const g=[z6.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,c),h=g.length,u=Promise.resolve(n);f<h;)u=u.then(g[f++],g[f++]);return u}h=s.length;let m=n;for(f=0;f<h;){const g=s[f++],y=s[f++];try{m=g(m)}catch(v){y.call(this,v);break}}try{u=z6.call(this,m)}catch(g){return Promise.reject(g)}for(f=0,h=c.length;f<h;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=yh(this.defaults,t);const n=sre(t.baseURL,t.url,t.allowAbsoluteUrls);return nre(n,t.params,t.paramsSerializer)}};Ue.forEach(["delete","get","head","options"],function(t){rh.prototype[t]=function(n,r){return this.request(yh(r||{},{method:t,url:n,data:(r||{}).data}))}});Ue.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(yh(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}rh.prototype[t]=n(),rh.prototype[t+"Form"]=n(!0)});let DDe=class pre{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new uv(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pre(function(o){t=o}),cancel:t}}};function kDe(e){return function(n){return e.apply(null,n)}}function _De(e){return Ue.isObject(e)&&e.isAxiosError===!0}const zN={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zN).forEach(([e,t])=>{zN[t]=e});function hre(e){const t=new rh(e),n=Une(rh.prototype.request,t);return Ue.extend(n,rh.prototype,t,{allOwnKeys:!0}),Ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return hre(yh(e,o))},n}const it=hre(dw);it.Axios=rh;it.CanceledError=uv;it.CancelToken=DDe;it.isCancel=ire;it.VERSION=fre;it.toFormData=vI;it.AxiosError=Sn;it.Cancel=it.CanceledError;it.all=function(t){return Promise.all(t)};it.spread=kDe;it.isAxiosError=_De;it.mergeConfig=yh;it.AxiosHeaders=Ia;it.formToJSON=e=>ore(Ue.isHTMLForm(e)?new FormData(e):e);it.getAdapter=dre.getAdapter;it.HttpStatusCode=zN;it.default=it;const{Axios:dAt,AxiosError:fAt,CanceledError:pAt,isCancel:hAt,CancelToken:mAt,VERSION:gAt,all:yAt,Cancel:vAt,isAxiosError:bAt,spread:xAt,toFormData:SAt,AxiosHeaders:wAt,HttpStatusCode:CAt,formToJSON:EAt,getAdapter:TAt,mergeConfig:OAt}=it,_g={protein:4,carbohydrates:4,fat:9};class qa{constructor(t){Ce(this,"bodyWeight",0);Ce(this,"energy",0);Ce(this,"protein",0);Ce(this,"carbohydrates",0);Ce(this,"carbohydratesSugar",0);Ce(this,"fat",0);Ce(this,"fatSaturated",0);Ce(this,"fiber",0);Ce(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*_g.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*_g.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*_g.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new qa,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function Zn(e){return e.toISOString().split("T")[0]}function xa(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function nT(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function Dx(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function VN(e){if(e==null)return null;const[t,n]=e.split(":",2),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function $De(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return Zn(t)}class mre{constructor(t,n,r,o){Ce(this,"items",[]);Ce(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return nT(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>xa(t.datetime,new Date))}get plannedNutritionalValues(){const t=new qa;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new qa;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class xB{fromJson(t){return new mre(t.id,t.order,VN(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:nT(t.time)}}}const bE=-1;class SI{constructor(t){Ce(this,"id");Ce(this,"creationDate");Ce(this,"start");Ce(this,"end");Ce(this,"description");Ce(this,"onlyLogging");Ce(this,"goalEnergy");Ce(this,"goalProtein");Ce(this,"goalCarbohydrates");Ce(this,"goalFiber");Ce(this,"goalSodium");Ce(this,"goalFat");Ce(this,"goalFatsSaturated");Ce(this,"meals",[]);Ce(this,"diaryEntries",[]);this.id=t.id??null,this.creationDate=t.creationDate??new Date,this.start=t.start??this.creationDate,this.end=t.end??null,this.description=t.description??"",this.onlyLogging=t.onlyLogging??!1,this.goalEnergy=t.goalEnergy??null,this.goalProtein=t.goalProtein??null,this.goalCarbohydrates=t.goalCarbohydrates??null,this.goalFiber=t.goalFiber??null,this.goalSodium=t.goalSodium??null,this.goalFat=t.goalFat??null,this.goalFatsSaturated=t.goalFatsSaturated??null}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new qa({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new qa;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>xa(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new qa};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new qa({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}copyWith(t){return new SI({id:t.id!==void 0?t.id:this.id,creationDate:t.creationDate!==void 0?t.creationDate:this.creationDate,start:t.start!==void 0?t.start:this.start,end:t.end!==void 0?t.end:this.end,description:t.description!==void 0?t.description:this.description,onlyLogging:t.onlyLogging!==void 0?t.onlyLogging:this.onlyLogging,goalEnergy:t.goalEnergy!==void 0?t.goalEnergy:this.goalEnergy,goalProtein:t.goalProtein!==void 0?t.goalProtein:this.goalProtein,goalCarbohydrates:t.goalCarbohydrates!==void 0?t.goalCarbohydrates:this.goalCarbohydrates,goalFiber:t.goalFiber!==void 0?t.goalFiber:this.goalFiber,goalSodium:t.goalSodium!==void 0?t.goalSodium:this.goalSodium,goalFat:t.goalFat!==void 0?t.goalFat:this.goalFat,goalFatsSaturated:t.goalFatsSaturated!==void 0?t.goalFatsSaturated:this.goalFatsSaturated})}pseudoMealOthers(t){const n=new mre(bE,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>xa(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new qa)}}class NDe{fromJson(t){return new SI({id:t.id,creationDate:new Date(t.creation_date),start:new Date(t.start),end:t.end!==null?new Date(t.end):null,description:t.description,onlyLogging:t.only_logging,goalEnergy:t.goal_energy,goalProtein:t.goal_protein,goalCarbohydrates:t.goal_carbohydrates,goalFiber:t.goal_fiber,goalSodium:null,goalFat:t.goal_fat,goalFatsSaturated:null})}toJson(t){return{...t.id!=null?{id:t.id}:{},start:Zn(t.start),end:t.end?Zn(t.end):null,description:t.description,only_logging:t.onlyLogging,goal_energy:t.goalEnergy,goal_protein:t.goalProtein,goal_carbohydrates:t.goalCarbohydrates,goal_fiber:t.goalFiber,goal_sodium:t.goalSodium,goal_fat:t.goalFat,goal_fats_saturated:t.goalFatsSaturated}}}const ly=new NDe;class gre{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class SB{fromJson(t){return new gre(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:Zn(t.date),weight:t.weight}}}const LDe="/static/react",wB="",FDe="",jDe=void 0;var xE={exports:{}},BDe=xE.exports,H6;function zDe(){return H6||(H6=1,function(e){(function(t){let n;function r(u,f){const h=u.charCodeAt(f);if(isNaN(h))throw new RangeError("Index "+f+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(h<55296||h>57343)return[u.charAt(f),f];if(h>=55296&&h<=56319){if(u.length<=f+1)return[" ",f];const g=u.charCodeAt(f+1);return g<56320||g>57343?[" ",f]:[u.charAt(f)+u.charAt(f+1),f+1]}if(f===0)return[" ",f];const m=u.charCodeAt(f-1);if(m<55296||m>56319)return[" ",f];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const f=unescape(encodeURIComponent(u+""));let h="";for(let m,g,y=0,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";f.charAt(y|0)||(v="=",y%1);h+=v.charAt(63&m>>8-y%1*8)){if(g=f.charCodeAt(y+=3/4),g>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");m=m<<8|g}return h}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,f){let h=s(u,f);if((f&&f.fallback!==void 0?f.fallback:o.defaults.fallback)===!0&&h===""){let g="";for(let y=0;y<u.length;y++){const v=r(u,y);y=v[1],g+=v[0]}h=s(n(g),f)}return h}const i={bg:{Й:"Y",й:"y",X:"H",x:"h",Ц:"Ts",ц:"ts",Щ:"Sht",щ:"sht",Ъ:"A",ъ:"a",Ь:"Y",ь:"y"},de:{Ä:"AE",ä:"ae",Ö:"OE",ö:"oe",Ü:"UE",ü:"ue"},sr:{đ:"dj",Đ:"DJ"},uk:{И:"Y",и:"y",Й:"Y",й:"y",Ц:"Ts",ц:"ts",Х:"Kh",х:"kh",Щ:"Shch",щ:"shch",Г:"H",г:"h"}};let a={};function s(u,f){if(typeof u!="string")throw new Error("slug() requires a string argument, received "+typeof u);typeof f=="string"&&(f={replacement:f}),f=f?Object.assign({},f):{},f.mode=f.mode||o.defaults.mode;const h=o.defaults.modes[f.mode],m=["replacement","multicharmap","charmap","remove","lower","trim"];for(let C,E=0,I=m.length;E<I;E++)C=m[E],f[C]=C in f?f[C]:h[C];const g=i[f.locale]||a;let y=[];for(const C in f.multicharmap){if(!Object.prototype.hasOwnProperty.call(f.multicharmap,C))continue;const E=C.length;y.indexOf(E)===-1&&y.push(E)}y=y.sort(function(C,E){return E-C});const v=f.mode==="rfc3986"?/[^\w\s\-.~]/:/[^A-Za-z0-9\s]/;let w="";for(let C,E=0,I=u.length;E<I;E++){C=u[E];let O=!1;for(let P=0;P<y.length;P++){const R=y[P],D=u.substr(E,R);if(f.multicharmap[D]){E+=R-1,C=f.multicharmap[D],O=!0;break}}O||(g[C]?C=g[C]:f.charmap[C]?C=f.charmap[C].replace(f.replacement," "):C.includes(f.replacement)?C=C.replace(f.replacement," "):C=C.replace(v,"")),w+=C}return f.remove&&(w=w.replace(f.remove,"")),f.trim&&(w=w.trim()),w=w.replace(/\s+/g,f.replacement),f.lower&&(w=w.toLowerCase()),w}const l={फ़:"Fi",ग़:"Ghi",ख़:"Khi",क़:"Qi",ड़:"ugDha",ढ़:"ugDhha",य़:"Yi",ज़:"Za",בִי:"i",בֵ:"e",בֵי:"e",בֶ:"e",בַ:"a",בָ:"a",בֹ:"o",וֹ:"o",בֻ:"u",וּ:"u",בּ:"b",כּ:"k",ךּ:"k",פּ:"p",שׁ:"sh",שׂ:"s",בְ:"e",חֱ:"e",חֲ:"a",חֳ:"o",בִ:"i"},c={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ő:"O",Ø:"O",Ō:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ő:"o",ø:"o",ō:"o",Œ:"OE",œ:"oe",ù:"u",ú:"u",û:"u",ü:"u",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",α:"a",β:"b",γ:"g",δ:"d",ε:"e",ζ:"z",η:"h",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"3",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"w",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"h",ώ:"w",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"H",Θ:"Th",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"3",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"W",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"H",Ώ:"W",Ϊ:"I",Ϋ:"Y",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"u",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"J",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"U",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"K",Ļ:"L",Ņ:"N",Ū:"U",أ:"a",إ:"i",ب:"b",ت:"t",ث:"th",ج:"g",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"d",ط:"t",ظ:"th",ع:"aa",غ:"gh",ف:"f",ق:"k",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"o",ي:"y",ء:"aa",ة:"a",آ:"a",ا:"a",پ:"p",ژ:"zh",گ:"g",چ:"ch",ک:"k",ی:"i",ė:"e",į:"i",ų:"u",Ė:"E",Į:"I",Ų:"U",ț:"t",Ț:"T",ţ:"t",Ţ:"T",ș:"s",Ș:"S",ă:"a",Ă:"A",Ạ:"A",Ả:"A",Ầ:"A",Ấ:"A",Ậ:"A",Ẩ:"A",Ẫ:"A",Ằ:"A",Ắ:"A",Ặ:"A",Ẳ:"A",Ẵ:"A",Ẹ:"E",Ẻ:"E",Ẽ:"E",Ề:"E",Ế:"E",Ệ:"E",Ể:"E",Ễ:"E",Ị:"I",Ỉ:"I",Ĩ:"I",Ọ:"O",Ỏ:"O",Ồ:"O",Ố:"O",Ộ:"O",Ổ:"O",Ỗ:"O",Ơ:"O",Ờ:"O",Ớ:"O",Ợ:"O",Ở:"O",Ỡ:"O",Ụ:"U",Ủ:"U",Ũ:"U",Ư:"U",Ừ:"U",Ứ:"U",Ự:"U",Ử:"U",Ữ:"U",Ỳ:"Y",Ỵ:"Y",Ỷ:"Y",Ỹ:"Y",Đ:"D",ạ:"a",ả:"a",ầ:"a",ấ:"a",ậ:"a",ẩ:"a",ẫ:"a",ằ:"a",ắ:"a",ặ:"a",ẳ:"a",ẵ:"a",ẹ:"e",ẻ:"e",ẽ:"e",ề:"e",ế:"e",ệ:"e",ể:"e",ễ:"e",ị:"i",ỉ:"i",ĩ:"i",ọ:"o",ỏ:"o",ồ:"o",ố:"o",ộ:"o",ổ:"o",ỗ:"o",ơ:"o",ờ:"o",ớ:"o",ợ:"o",ở:"o",ỡ:"o",ụ:"u",ủ:"u",ũ:"u",ư:"u",ừ:"u",ứ:"u",ự:"u",ử:"u",ữ:"u",ỳ:"y",ỵ:"y",ỷ:"y",ỹ:"y",đ:"d",Ә:"AE",ә:"ae",Ғ:"GH",ғ:"gh",Қ:"KH",қ:"kh",Ң:"NG",ң:"ng",Ү:"UE",ү:"ue",Ұ:"U",ұ:"u",Һ:"H",һ:"h",Ө:"OE",ө:"oe",ђ:"dj",ј:"j",љ:"lj",њ:"nj",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Љ:"Lj",Њ:"Nj",Ћ:"C",Џ:"Dz",nj:"nj",lj:"lj",Nj:"NJ",Lj:"LJ",अ:"a",आ:"aa",ए:"e",ई:"ii",ऍ:"ei",ऎ:"ae",ऐ:"ai",इ:"i",ओ:"o",ऑ:"oi",ऒ:"oii",ऊ:"uu",औ:"ou",उ:"u",ब:"B",भ:"Bha",च:"Ca",छ:"Chha",ड:"Da",ढ:"Dha",फ:"Fa",ग:"Ga",घ:"Gha",ग़:"Ghi",ह:"Ha",ज:"Ja",झ:"Jha",क:"Ka",ख:"Kha",ख़:"Khi",ल:"L",ळ:"Li",ऌ:"Li",ऴ:"Lii",ॡ:"Lii",म:"Ma",न:"Na",ङ:"Na",ञ:"Nia",ण:"Nae",ऩ:"Ni",ॐ:"oms",प:"Pa",क़:"Qi",र:"Ra",ऋ:"Ri",ॠ:"Ri",ऱ:"Ri",स:"Sa",श:"Sha",ष:"Shha",ट:"Ta",त:"Ta",ठ:"Tha",द:"Tha",थ:"Tha",ध:"Thha",ड़:"ugDha",ढ़:"ugDhha",व:"Va",य:"Ya",य़:"Yi",ज़:"Za",ə:"e",Ə:"E",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",ב:"v",גּ:"g",ג:"g",ד:"d",דּ:"d",ה:"h",ו:"v",ז:"z",ח:"h",ט:"t",י:"y",כ:"kh",ך:"kh",ל:"l",מ:"m",ם:"m",נ:"n",ן:"n",ס:"s",פ:"f",ף:"f",ץ:"ts",צ:"ts",ק:"k",ר:"r",תּ:"t",ת:"t"};o.charmap=Object.assign({},c),o.multicharmap=Object.assign({},l),o.defaults={charmap:o.charmap,mode:"pretty",modes:{rfc3986:{replacement:"-",remove:null,lower:!0,charmap:o.charmap,multicharmap:o.multicharmap,trim:!0},pretty:{replacement:"-",remove:null,lower:!0,charmap:o.charmap,multicharmap:o.multicharmap,trim:!0}},multicharmap:o.multicharmap,fallback:!0},o.reset=function(){o.defaults.modes.rfc3986.charmap=o.defaults.modes.pretty.charmap=o.charmap=o.defaults.charmap=Object.assign({},c),o.defaults.modes.rfc3986.multicharmap=o.defaults.modes.pretty.multicharmap=o.multicharmap=o.defaults.multicharmap=Object.assign({},l),a=""},o.extend=function(u){const f=Object.keys(u),h={},m={};for(let g=0;g<f.length;g++)f[g].length>1?h[f[g]]=u[f[g]]:m[f[g]]=u[f[g]];Object.assign(o.charmap,m),Object.assign(o.multicharmap,h)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(BDe)}(xE)),xE.exports}var VDe=zDe();const yre=Gn(VDe);function ft(e,t){t=t||{};const r=[t.server||FDe,"api","v2",e];if(t.id&&r.push(t.id.toString()),t.objectMethod&&r.push(t.objectMethod),r.push(""),t.query){const o=[];for(const i in t.query)Object.hasOwn(t.query,i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var Qt=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_EDIT=3]="ROUTINE_EDIT",e[e.ROUTINE_DETAIL_TABLE=4]="ROUTINE_DETAIL_TABLE",e[e.ROUTINE_EDIT_PROGRESSION=5]="ROUTINE_EDIT_PROGRESSION",e[e.ROUTINE_ADD=6]="ROUTINE_ADD",e[e.ROUTINE_LOGS_OVERVIEW=7]="ROUTINE_LOGS_OVERVIEW",e[e.ROUTINE_STATS_OVERVIEW=8]="ROUTINE_STATS_OVERVIEW",e[e.ROUTINE_PDF_TABLE=9]="ROUTINE_PDF_TABLE",e[e.ROUTINE_PDF_LOGS=10]="ROUTINE_PDF_LOGS",e[e.ROUTINE_ICAL=11]="ROUTINE_ICAL",e[e.ROUTINE_COPY=12]="ROUTINE_COPY",e[e.ROUTINE_ADD_LOG=13]="ROUTINE_ADD_LOG",e[e.TEMPLATE_DETAIL=14]="TEMPLATE_DETAIL",e[e.PRIVATE_TEMPLATE_OVERVIEW=15]="PRIVATE_TEMPLATE_OVERVIEW",e[e.PUBLIC_TEMPLATE_OVERVIEW=16]="PUBLIC_TEMPLATE_OVERVIEW",e[e.EXERCISE_DETAIL=17]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=18]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=19]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=20]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=21]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=22]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=23]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=24]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=25]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=26]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=27]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=28]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=29]="INGREDIENT_DETAIL",e[e.CALENDAR=30]="CALENDAR",e))(Qt||{});function cn(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 4:return`/${r}/routine/${n.id}/table`;case 3:return`/${r}/routine/${n.id}/edit`;case 5:return`/${r}/routine/${n.id}/edit/progression/${n.id2}`;case 6:return`/${r}/routine/add`;case 12:return`/${r}/routine/${n.id}/copy`;case 9:return`/${r}/routine/${n.id}/pdf/table`;case 10:return`/${r}/routine/${n.id}/pdf/log`;case 11:return`/${r}/routine/${n.id}/ical`;case 7:return`/${r}/routine/${n.id}/logs`;case 8:return`/${r}/routine/${n.id}/statistics`;case 13:return`/${r}/routine/${n.id}/day/${n.id2}/add-logs`;case 30:return`/${r}/routine/calendar`;case 14:return`/${r}/routine/templates/${n.id}/view`;case 15:return`/${r}/routine/templates/overview/private`;case 16:return`/${r}/routine/templates/overview/public`;case 19:return`/${r}/exercise/contribute`;case 17:return n.slug?`/${r}/exercise/${n.id}/view/${yre(n.slug)}`:`/${r}/exercise/${n.id}/view`;case 18:return`/${r}/exercise/overview`;case 20:return`/${r}/weight/overview`;case 21:return`/${r}/weight/add`;case 22:return`/${r}/measurement/overview`;case 23:return`/${r}/measurement/category/${n.id}`;case 24:return`/${r}/nutrition/overview`;case 25:return`/${r}/nutrition/${n.id}/view`;case 28:return`/${r}/nutrition/${n.id}/${n.date}`;case 26:return`/${r}/nutrition/${n.id}/pdf`;case 27:return`/${r}/nutrition/${n.id}/copy`;case 29:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function HDe(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const o=n[r].trim();if(o.substring(0,e.length+1)===e+"="){t=decodeURIComponent(o.substring(e.length+1));break}}}return t}function ht(e){e=e||jDe;const t="csrftoken",n={};n["Content-Type"]="application/json",e&&(n.Authorization=`Token ${e}`);const r=HDe(t);return r!=null&&(n["X-CSRFToken"]=r),n}const wI="weightentry",UDe=async(e="")=>{const t=$De(e),n=ft(wI,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await it.get(n,{headers:ht()});return r.results.map(o=>new SB().fromJson(o))},GDe=async e=>(await it.delete(ft(wI,{id:e}),{headers:ht()})).status,qDe=async e=>{const t=new SB,n=await it.patch(ft(wI,{id:e.id}),t.toJson(e),{headers:ht()});return t.fromJson(n)},WDe=async e=>{const t=new SB,n=await it.post(ft(wI),t.toJson(e),{headers:ht()});return t.fromJson(n.data)},gn=e=>typeof e=="string",t0=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},U6=e=>e==null?"":""+e,KDe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},YDe=/###/g,G6=e=>e&&e.indexOf("###")>-1?e.replace(YDe,"."):e,q6=e=>!e||gn(e),Z0=(e,t,n)=>{const r=gn(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(q6(e))return{};const i=G6(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return q6(e)?{}:{obj:e,k:G6(r[o])}},W6=(e,t,n)=>{const{obj:r,k:o}=Z0(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=Z0(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Z0(e,a,Object),s!=null&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},QDe=(e,t,n,r)=>{const{obj:o,k:i}=Z0(e,t,Object);o[i]=o[i]||[],o[i].push(n)},rT=(e,t)=>{const{obj:n,k:r}=Z0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},XDe=(e,t,n)=>{const r=rT(e,n);return r!==void 0?r:rT(t,n)},vre=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?gn(e[r])||e[r]instanceof String||gn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):vre(e[r],t[r],n):e[r]=t[r]);return e},Um=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var JDe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const ZDe=e=>gn(e)?e.replace(/[&<>"'\/]/g,t=>JDe[t]):e;class eke{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const tke=[" ",",","?","!",";"],nke=new eke(20),rke=(e,t,n)=>{t=t||"",n=n||"";const r=tke.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=nke.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},HN=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let a,s="";for(let l=i;l<r.length;++l)if(l!==i&&(s+=n),s+=r[l],a=o[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;i+=l-i+1;break}o=a}return o},kx=e=>e==null?void 0:e.replace("_","-"),oke={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class oT{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||oke,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(gn(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new oT(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new oT(this.logger,t)}}var xc=new oT;let CI=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let a=0;a<i;a++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let a=0;a<i;a++)o.apply(o,[t,...n])})}};class K6 extends CI{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){var c,u;const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):gn(r)&&i?s.push(...r.split(i)):s.push(r)));const l=rT(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!gn(r)?l:HN((u=(c=this.data)==null?void 0:c[t])==null?void 0:u[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),W6(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(gn(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,a={silent:!1,skipCopy:!1}){let s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=rT(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?vre(l,r,i):l={...l,...r},W6(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var bre={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{var a;t=((a=this.processors[i])==null?void 0:a.process(t,n,r,o))??t}),t}};const Y6={},Q6=e=>!gn(e)&&typeof e!="boolean"&&typeof e!="number";class iT extends CI{constructor(t,n={}){super(),KDe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=xc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);return(o==null?void 0:o.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!rke(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:gn(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:gn(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],o),c=l[l.length-1];let u=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=o.lng||this.language,h=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return h?i?{res:`${c}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${u}${s}`:i?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:s;const m=this.resolve(t,o);let g=m==null?void 0:m.res;const y=(m==null?void 0:m.usedKey)||s,v=(m==null?void 0:m.exactUsedKey)||s,w=["[object Number]","[object Function]","[object RegExp]"],C=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,I=o.count!==void 0&&!gn(o.count),O=iT.hasDefaultValue(o),P=I?this.pluralResolver.getSuffix(f,o.count,o):"",R=o.ordinal&&I?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",D=I&&!o.ordinal&&o.count===0,M=D&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${R}`]||o.defaultValue;let A=g;E&&!g&&O&&(A=M);const _=Q6(A),N=Object.prototype.toString.apply(A);if(E&&A&&_&&w.indexOf(N)<0&&!(gn(C)&&Array.isArray(A))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,A,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(m.res=B,m.usedParams=this.getUsedParamsDetails(o),m):B}if(a){const B=Array.isArray(A),H=B?[]:{},j=B?v:y;for(const L in A)if(Object.prototype.hasOwnProperty.call(A,L)){const V=`${j}${a}${L}`;O&&!g?H[L]=this.translate(V,{...o,defaultValue:Q6(M)?M[L]:void 0,joinArrays:!1,ns:l}):H[L]=this.translate(V,{...o,joinArrays:!1,ns:l}),H[L]===V&&(H[L]=A[L])}g=H}}else if(E&&gn(C)&&Array.isArray(g))g=g.join(C),g&&(g=this.extendTranslation(g,t,o,r));else{let B=!1,H=!1;!this.isValidLookup(g)&&O&&(B=!0,g=M),this.isValidLookup(g)||(H=!0,g=s);const L=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:g,V=O&&M!==g&&this.options.updateMissing;if(H||B||V){if(this.logger.log(V?"updateKey":"missingKey",f,c,s,V?M:g),a){const q=this.resolve(s,{...o,keySeparator:!1});q&&q.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let W=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let q=0;q<K.length;q++)W.push(K[q]);else this.options.saveMissingTo==="all"?W=this.languageUtils.toResolveHierarchy(o.lng||this.language):W.push(o.lng||this.language);const G=(q,Y,Z)=>{var se;const ie=O&&Z!==g?Z:L;this.options.missingKeyHandler?this.options.missingKeyHandler(q,c,Y,ie,V,o):(se=this.backendConnector)!=null&&se.saveMissing&&this.backendConnector.saveMissing(q,c,Y,ie,V,o),this.emit("missingKey",q,c,Y,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?W.forEach(q=>{const Y=this.pluralResolver.getSuffixes(q,o);D&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(Z=>{G([q],s+Z,o[`defaultValue${Z}`]||M)})}):G(W,s,M))}g=this.extendTranslation(g,t,o,m,r),H&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${s}`),(H||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${s}`:s,B?g:void 0,o))}return i?(m.res=g,m.usedParams=this.getUsedParamsDetails(o),m):g}extendTranslation(t,n,r,o,i){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=gn(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const m=t.match(this.interpolator.nestingRegexp);f=m&&m.length}let h=r.replace&&!gn(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||o.usedLng,r),u){const m=t.match(this.interpolator.nestingRegexp),g=m&&m.length;f<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...m)=>(i==null?void 0:i[0])===m[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):this.translate(...m,n),r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,s=gn(a)?[a]:a;return t!=null&&(s!=null&&s.length)&&r.applyPostProcessor!==!1&&(t=bre.handle(s,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,a,s;return gn(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!gn(n.count),m=h&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(gn(n.context)||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{var w,C;this.isValidLookup(r)||(s=v,!Y6[`${y[0]}-${v}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((C=this.utils)!=null&&C.hasLoadedNamespace(s))&&(Y6[`${y[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${y.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(E=>{var P;if(this.isValidLookup(r))return;a=E;const I=[u];if((P=this.i18nFormat)!=null&&P.addLookupKeys)this.i18nFormat.addLookupKeys(I,u,E,v,n);else{let R;h&&(R=this.pluralResolver.getSuffix(E,n.count,n));const D=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(I.push(u+R),n.ordinal&&R.indexOf(M)===0&&I.push(u+R.replace(M,this.options.pluralSeparator)),m&&I.push(u+D)),g){const A=`${u}${this.options.contextSeparator}${n.context}`;I.push(A),h&&(I.push(A+R),n.ordinal&&R.indexOf(M)===0&&I.push(A+R.replace(M,this.options.pluralSeparator)),m&&I.push(A+D))}}let O;for(;O=I.pop();)this.isValidLookup(r)||(i=O,r=this.getResource(E,v,O,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!gn(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class X6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=xc.create("languageUtils")}getScriptPartFromCode(t){if(t=kx(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=kx(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(gn(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),gn(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return gn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):gn(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}const J6={zero:0,one:1,two:2,few:3,many:4,other:5},Z6={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ike{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=xc.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=kx(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Z6;if(!t.match(/-|_/))return Z6;const l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,n)}return this.pluralRulesCache[i]=a,a}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>J6[o]-J6[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const eq=(e,t,n,r=".",o=!0)=>{let i=XDe(e,t,n);return!i&&o&&gn(n)&&(i=HN(e,n,r),i===void 0&&(i=HN(t,n,r))),i},zR=e=>e.replace(/\$/g,"$$$$");class ake{constructor(t={}){var n;this.logger=xc.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:v,maxReplaces:w,alwaysFormat:C}=t.interpolation;this.escape=n!==void 0?n:ZDe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Um(i):a||"{{",this.suffix=s?Um(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?Um(h):m||Um("$t("),this.nestingSuffix=g?Um(g):y||Um(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=w||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){var m;let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const C=eq(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,r,{...o,...n,interpolationkey:g}):C}const y=g.split(this.formatSeparator),v=y.shift().trim(),w=y.join(this.formatSeparator).trim();return this.format(eq(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...o,...n,interpolationkey:v})};this.resetRegExp();const u=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((m=o==null?void 0:o.interpolation)==null?void 0:m.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>zR(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?zR(this.escape(g)):zR(g)}].forEach(g=>{for(s=0;i=g.regex.exec(t);){const y=i[1].trim();if(a=c(y),a===void 0)if(typeof u=="function"){const w=u(t,i,o);a=gn(w)?w:""}else if(o&&Object.prototype.hasOwnProperty.call(o,y))a="";else if(f){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),a="";else!gn(a)&&!this.useRawValueToEscape&&(a=U6(a));const v=g.safeValue(a);if(t=t.replace(i[0],v),f?(g.regex.lastIndex+=a.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let h=`{${f[1]}`;l=f[0],h=this.interpolate(h,a);const m=h.match(/'/g),g=h.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!g||g.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),c&&(a={...c,...a})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${u}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!gn(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!gn(i))return i;gn(i)||(i=U6(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,f)=>this.format(u,f,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const ske=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},tq=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(kx(r),o),t[a]=s),s(n)}},lke=e=>(t,n,r)=>e(kx(n),r)(t);let cke=class{constructor(t={}){this.logger=xc.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?tq:lke;this.formats={number:r((o,i)=>{const a=new Intl.NumberFormat(o,{...i});return s=>a.format(s)}),currency:r((o,i)=>{const a=new Intl.NumberFormat(o,{...i,style:"currency"});return s=>a.format(s)}),datetime:r((o,i)=>{const a=new Intl.DateTimeFormat(o,{...i});return s=>a.format(s)}),relativetime:r((o,i)=>{const a=new Intl.RelativeTimeFormat(o,{...i});return s=>a.format(s,i.range||"day")}),list:r((o,i)=>{const a=new Intl.ListFormat(o,{...i});return s=>a.format(s)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=tq(n)}format(t,n,r,o={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{var f;const{formatName:c,formatOptions:u}=ske(l);if(this.formats[c]){let h=s;try{const m=((f=o==null?void 0:o.formatParams)==null?void 0:f[o.interpolationkey])||{},g=m.locale||m.lng||o.locale||o.lng||r;h=this.formats[c](s,g,{...u,...o,...m})}catch(m){this.logger.warn(m)}return h}else this.logger.warn(`there was no format function for ${c}`);return s},t)}};const uke=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class dke extends CI{constructor(t,n,r,o={}){var i,a;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=xc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(a=(i=this.backend)==null?void 0:i.init)==null||a.call(i,r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(f=>{const h=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,u=!1,a[h]===void 0&&(a[h]=!0),i[h]===void 0&&(i[h]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{QDe(l.loaded,[i],a),uke(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{s[c][f]===void 0&&(s[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,o=0,i=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();gn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),gn(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i,a={},s=()=>{}){var l,c,u,f,h;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((f=(u=this.services)==null?void 0:u.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const m={...a,isUpdate:i},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(t,n,r,o,m):y=g(t,n,r,o),y&&typeof y.then=="function"?y.then(v=>s(null,v)).catch(s):s(null,y)}catch(y){s(y)}else g(t,n,r,o,s,m)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const nq=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),gn(e[1])&&(t.defaultValue=e[1]),gn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),rq=e=>{var t,n;return gn(e.ns)&&(e.ns=[e.ns]),gn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),gn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},I1=()=>{},fke=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class _x extends CI{constructor(t={},n){if(super(),this.options=rq(t),this.services={},this.logger=xc,this.modules={external:[]},fke(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(gn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=nq();this.options={...r,...this.options,...rq(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?xc.init(o(this.modules.logger),this.options):xc.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=cke;const u=new X6(this.options);this.store=new K6(this.options.resources,this.options);const f=this.services;f.logger=xc,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new ike(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new ake(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new dke(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new iT(this.services,this.options),this.translator.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=I1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const s=t0(),l=()=>{const c=(u,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),n(u,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,n=I1){var i,a;let r=n;const o=gn(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&s.indexOf(f)<0&&s.push(f)})};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>l(u)),(a=(i=this.options.preload)==null?void 0:i.forEach)==null||a.call(i,c=>l(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const o=t0();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=I1),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&bre.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=t0();this.emit("languageChanging",t);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},i=(s,l)=>{l?this.isLanguageChangingTo===t&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(s,(...c)=>this.t(...c))},a=s=>{var u,f;!t&&!s&&this.services.languageDetector&&(s=[]);const l=gn(s)?s:s&&s[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(gn(s)?[s]:s);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),(f=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||f.call(u,c)),this.loadResources(c,h=>{i(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),r}getFixedT(t,n,r){const o=(i,a,...s)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([i,a].concat(s)):l={...a},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const c=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(i)?u=i.map(f=>`${l.keyPrefix}${c}${f}`):u=l.keyPrefix?`${l.keyPrefix}${c}${i}`:i,this.t(u,l)};return gn(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=t0();return this.options.ns?(gn(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=t0();gn(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){var o,i;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new X6(nq());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){return new _x(t,n)}cloneInstance(t={},n=I1){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new _x(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const s=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,f)=>(u[f]={...l[c][f]},u),l[c]),l),{});i.store=new K6(s,o),i.services.resourceStore=i.store}return i.translator=new iT(i.services,o),i.translator.on("*",(s,...l)=>{i.emit(s,...l)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const hr=_x.createInstance();hr.createInstance=_x.createInstance;hr.createInstance;hr.dir;hr.init;hr.loadResources;hr.reloadResources;hr.use;hr.changeLanguage;hr.getFixedT;hr.t;hr.exists;hr.setDefaultNamespace;hr.hasLoadedNamespace;hr.loadNamespaces;hr.loadLanguages;const pke=22;function hke(e,t=pke){return e.length>t?e.slice(0,t)+"…":e}function mke(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function CB(e){return e===void 0?(console.warn("called getTranslationKey with undefined name"),""):`server.${mke(e)}`}class gke{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}get translatedName(){return hr.t(CB(this.nameEn),{defaultValue:this.nameEn})}getName(){return this.nameEn?`${this.name} (${this.translatedName})`:this.name}}class xre{fromJson(t){return new gke(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const yke="muscle",vke=async()=>{const e=ft(yke),{data:t}=await it.get(e,{headers:ht()}),n=new xre;return t.results.map(r=>n.fromJson(r))},{slice:bke,forEach:xke}=[];function Ske(e){return xke.call(bke.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const oq=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,wke=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!oq.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!oq.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},iq={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=wke(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var Cke={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return iq.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&iq.create(n,e,r,o,i)}},Eke={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s<a.length;s++){const l=a[s].indexOf("=");l>0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let Gm=null;const aq=()=>{if(Gm!==null)return Gm;try{if(Gm=typeof window<"u"&&window.localStorage!==null,!Gm)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Gm=!1}return Gm};var Tke={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&aq())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&aq()&&window.localStorage.setItem(n,e)}};let qm=null;const sq=()=>{if(qm!==null)return qm;try{if(qm=typeof window<"u"&&window.sessionStorage!==null,!qm)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{qm=!1}return qm};var Oke={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&sq())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&sq()&&window.sessionStorage.setItem(n,e)}},Ike={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},Pke={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Ake={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},Mke={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let Sre=!1;try{document.cookie,Sre=!0}catch{}const wre=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Sre||wre.splice(1,1);const Rke=()=>({order:wre,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Cre{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Ske(n,this.options||{},Rke()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Cke),this.addDetector(Eke),this.addDetector(Tke),this.addDetector(Oke),this.addDetector(Ike),this.addDetector(Pke),this.addDetector(Ake),this.addDetector(Mke)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Cre.type="languageDetector";function UN(e){"@babel/helpers - typeof";return UN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UN(e)}function Ere(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":UN(XMLHttpRequest))==="object"}function Dke(e){return!!e&&typeof e.then=="function"}function kke(e){return Dke(e)?e:Promise.resolve(e)}function lq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lq(Object(n),!0).forEach(function(r){_ke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ke(e,t,n){return(t=$ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ke(e){var t=Nke(e,"string");return vh(t)=="symbol"?t:t+""}function Nke(e,t){if(vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vh(e){"@babel/helpers - typeof";return vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(e)}var Of=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Of=global.fetch:typeof window<"u"&&window.fetch&&(Of=window.fetch);var $x;Ere()&&(typeof global<"u"&&global.XMLHttpRequest?$x=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&($x=window.XMLHttpRequest));var aT;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?aT=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(aT=window.ActiveXObject));typeof Of!="function"&&(Of=void 0);if(!Of&&!$x&&!aT)try{iSe(()=>import("./browser-ponyfill-DBa4LM7e.js").then(e=>e.b),[]).then(function(e){Of=e.default}).catch(function(){})}catch{}var GN=function(t,n){if(n&&vh(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},uq=function(t,n,r,o){var i=function(l){if(!l.ok)return r(l.statusText||"Error",{status:l.status});l.text().then(function(c){r(null,{status:l.status,data:c})}).catch(r)};if(o){var a=o(t,n);if(a instanceof Promise){a.then(i).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(i).catch(r):Of(t,n).then(i).catch(r)},dq=!1,Lke=function(t,n,r,o){t.queryStringParams&&(n=GN(n,t.queryStringParams));var i=cq({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=cq({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},dq?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{uq(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),uq(n,s,o,l),dq=!0}catch(u){o(u)}}},Fke=function(t,n,r,o){r&&vh(r)==="object"&&(r=GN("",r).slice(1)),t.queryStringParams&&(n=GN(n,t.queryStringParams));try{var i=$x?new $x:new aT("MSXML2.XMLHTTP.3.0");i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},jke=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},Of&&n.indexOf("file:")!==0)return Lke(t,n,r,o);if(Ere()||typeof ActiveXObject=="function")return Fke(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function cy(e){"@babel/helpers - typeof";return cy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cy(e)}function fq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function VR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fq(Object(n),!0).forEach(function(r){Tre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ore(r.key),r)}}function Vke(e,t,n){return t&&zke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tre(e,t,n){return(t=Ore(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ore(e){var t=Hke(e,"string");return cy(t)=="symbol"?t:t+""}function Hke(e,t){if(cy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Uke=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,o){return Tre({},r,o||"")},parseLoadPayload:function(n,r){},request:jke,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Ire=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Bke(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Vke(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=VR(VR(VR({},Uke()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);cy(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=kke(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+n+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+n+"; status code: "+f.status,!1);if(!f&&u&&u.message){var h=u.message.toLowerCase(),m=["failed","fetch","network","load"].find(function(v){return h.indexOf(v)>-1});if(m)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var g,y;try{typeof f.data=="string"?g=a.options.parse(f.data,o,i):g=f.data}catch{y="failed parsing "+n+" to json"}if(y)return r(y,!1);r(null,g)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],f=[];n.forEach(function(h){var m=s.options.addPath;typeof s.options.addPath=="function"&&(m=s.options.addPath(h,r));var g=s.services.interpolator.interpolate(m,{lng:h,ns:r});s.options.request(s.options,g,l,function(y,v){c+=1,u.push(y),f.push(v),c===n.length&&typeof a=="function"&&a(u,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(f){var h=i.toResolveHierarchy(f);h.forEach(function(m){l.indexOf(m)<0&&l.push(m)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(f){o.read(u,f,"read",null,null,function(h,m){h&&a.warn("loading namespace ".concat(f," for language ").concat(u," failed"),h),!h&&m&&a.log("loaded namespace ".concat(f," for language ").concat(u),m),o.loaded("".concat(u,"|").concat(f),h,m)})})})}}}])}();Ire.type="backend";hr.use(Ire).use(Cre).use(eRe).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});class Gke{constructor(t,n){this.id=t,this.name=n}get translatedName(){return hr.t(CB(this.name),{defaultValue:this.name})}}class Pre{fromJson(t){return new Gke(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const qke="equipment",Wke=async()=>{const e=ft(qke),{data:t}=await it.get(e,{headers:ht()}),n=new Pre;return t.results.map(r=>n.fromJson(r))};class Kke{constructor(t,n){this.id=t,this.name=n}get translatedName(){return hr.t(CB(this.name),{defaultValue:this.name})}}class Are{fromJson(t){return new Kke(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const Yke="exercisecategory",Qke=async()=>{const e=ft(Yke),{data:t}=await it.get(e,{headers:ht()}),n=new Are;return t.results.map(r=>n.fromJson(r))};var Cu=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(Cu||{});class Xke{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class qN{fromJson(t){return new Xke(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class Jke{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class Mre{fromJson(t){return new Jke(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class WN{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class Rre{fromJson(t){return new WN(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class Dre{constructor(t,n,r,o,i,a,s,l){Ce(this,"notes",[]);Ce(this,"aliases",[]);Ce(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return hke(this.name)}get nameSlug(){return yre(this.name)}}class EB{fromJson(t){var n,r;return new Dre(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new Rre().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new Mre().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class Zke{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class kre{fromJson(t){return new Zke(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class TB{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class e2e{fromJson(t){return new TB(t.id,t.short_name,t.full_name)}toJson(t){return{}}}const bh=2,_re="en",t2e=new TB(bh,_re,"English"),n2e=21,r2e=1,o2e=1,i2e=2,a2e="variations",s2e="detail",l2e="permission",dv="measurements",fv="measurements-categories";var st=(e=>(e.ROUTINE_OVERVIEW="routine-overview",e.ROUTINE_DETAIL="routine-detail",e.SESSION_SEARCH="session-search",e.SESSIONS_FULL="sessions-full",e.ROUTINE_LOGS="routine-logs",e.ROUTINE_LOG_DATA="routine-log-data",e.ROUTINE_STATS="routine-stats",e.ROUTINES_ACTIVE="routines-active",e.ROUTINES_SHALLOW="routines-shallow",e.PRIVATE_TEMPLATES="private-templates",e.PUBLIC_TEMPLATES="public-templates",e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_DIARY="nutritional-plan-diary",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e.ROUTINE_WEIGHT_UNITS="weight-units",e.ROUTINE_REP_UNITS="rep-units",e.QUERY_PROFILE="profile",e.EXERCISES="exercises",e.EXERCISE_VARIATIONS="variations",e.EXERCISE_DETAIL="detail",e.LANGUAGES="languages",e.CATEGORIES="categories",e.EQUIPMENT="equipment",e.MUSCLES="muscles",e.QUERY_NOTES="notes",e))(st||{}),St=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e.ROUTINE="routine",e.WEIGHT_CONFIG="weight-config",e.MAX_WEIGHT_CONFIG="max-weight-config",e.REPETITIONS_CONFIG="repetitions-config",e.MAX_REPS_CONFIG="max-repetitions-config",e.RIR_CONFIG="rir-config",e.MAX_RIR_CONFIG="max-rir-config",e.NR_OF_SETS_CONFIG="sets-config",e.MAX_NR_OF_SETS_CONFIG="max-sets-config",e.REST_CONFIG="rest-config",e.MAX_REST_CONFIG="max-rest-config",e.DAY="day",e.SLOT="slot",e.SLOT_ENTRY="slot-entry",e.SESSION="workoutsession",e.WORKOUT_LOG="workoutlog",e.PRIVATE_TEMPLATE="templates",e.PUBLIC_TEMPLATE="public-templates",e.API_PROFILE_PATH="userprofile",e))(St||{});const KN="999",c2e=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],u2e=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],d2e=["#2a4c7d","#d45089","#ffa600"],YN={pageSizeOptions:[5,10,25,50,100],pageSize:10},f2e="Europe/Berlin",uy="en",EI=3e3,$re=500;class p2e{constructor(t,n,r,o,i,a,s,l,c,u,f){Ce(this,"translations",[]);Ce(this,"videos",[]);Ce(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),f&&(this.authors=f)}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}getTranslation(t){const n=t!=null?t.id:bh;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===bh)),r||this.translations[0]}}class Nre{fromJson(t){const n=new Are,r=new Pre,o=new xre,i=new qN,a=new EB,s=new kre,l=new p2e(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.translations.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===bh)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new qN().toJson(n))}}}const OB="exerciseinfo",IB="exercise";function Lre(e){const t=new Nre,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const h2e=async()=>{const e=ft(OB,{query:{limit:900}}),t=await it.get(e,{headers:ht()});return Lre(t.data)},pv=async e=>{const t=new Nre,n=ft(OB,{id:e}),r=await it.get(n,{headers:ht()});return t.fromJson(r.data)},m2e=async e=>{if(!e)return[];const t=ft(OB,{query:{variations:e}}),n=await it.get(t,{headers:ht()});return Lre(n.data)},g2e=async(e,t,n,r,o,i)=>{const a=ft(IB),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await it.post(a,s,{headers:ht()})).data.id},PB=async(e,t)=>{const n=ft(IB,{id:e});return(await it.patch(n,t,{headers:ht()})).status},pq=async(e,t)=>{const r=ft(IB,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await it.delete(r,{headers:ht()})).status},AB="exercise-translation",y2e="exercise/search",v2e=async(e,t=_re,n=!0)=>{const r=[t];t!==uy&&n&&r.push(uy);const o=ft(y2e,{query:{term:e,language:r.join(",")}}),{data:i}=await it.get(o);return i.suggestions},QN=async e=>{const{exerciseId:t,languageId:n,name:r,description:o,author:i}=e,a=ft(AB),s={exercise:t,language:n,name:r,description:o,license_author:i},l=await it.post(a,s,{headers:ht()});return new EB().fromJson(l.data)},b2e=async e=>{const{id:t,exerciseId:n,languageId:r,name:o,description:i}=e,a=ft(AB,{id:t}),s={exercise:n,language:r,name:o,description:i},l=await it.patch(a,s,{headers:ht()});return new EB().fromJson(l.data)},x2e=async e=>{const t=ft(AB,{id:e});return(await it.delete(t,{headers:ht()})).status},S2e="language",w2e=async()=>{const e=ft(S2e),{data:t}=await it.get(e,{headers:ht()}),n=new e2e;return t.results.map(r=>n.fromJson(r))},Gu=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},Fre="exerciseimage",jre=async e=>{const t=ft(Fre),n=ht();n["Content-Type"]="multipart/form-data";const r=await it.post(t,{exercise:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new qN().fromJson(r.data)},C2e=async e=>{const t=ft(Fre,{id:e}),n=ht();return(await it.delete(t,{headers:n})).status},Bre="exercisealias",XN=async(e,t)=>{const n=ft(Bre),r=await it.post(n,{translation:e,alias:t},{headers:ht()});return new Mre().fromJson(r.data)},E2e=async e=>(await it.delete(ft(Bre,{id:e}),{headers:ht()})).status,zre="video",T2e=async(e,t,n)=>{const r=ft(zre),o=ht();o["Content-Type"]="multipart/form-data";const i=await it.post(r,{exercise:e,license_author:t,video:n},{headers:o});return new kre().fromJson(i.data)},O2e=async e=>{const t=ft(zre,{id:e}),n=ht();return(await it.delete(t,{headers:n})).status},Qi="r",I2e="+",P2e="-",JN=["weight","repetitions","rir","rest"],A2e=[{value:"abs",label:"Absolute"},{value:"percent",label:"Percent"}],M2e=[{value:I2e,label:"Add"},{value:P2e,label:"Subtract"},{value:Qi,label:"Replace"}],Vre=[{value:"",label:"-/-"},...[0,.5,1,1.5,2,2.5,3,3.5,4].map(e=>({value:e,label:e.toString()})),{value:4.5,label:"4+"}],Hre=[...Vre];class R2e{constructor(t){Ce(this,"id");Ce(this,"slotEntryId");Ce(this,"iteration");Ce(this,"value");Ce(this,"operation");Ce(this,"step");Ce(this,"repeat");Ce(this,"requirements");this.id=t.id,this.slotEntryId=t.slotEntryId,this.iteration=t.iteration,this.value=t.value,this.operation=t.operation??"r",this.step=t.step??"abs",this.repeat=t.repeat??!1,this.requirements=t.requirements??null}get replace(){return this.operation==="r"}}class MB{constructor(){Ce(this,"fromJson",t=>new R2e({id:t.id,slotEntryId:t.slot_entry,iteration:t.iteration,value:parseFloat(t.value),operation:t.operation,step:t.step,repeat:t.repeat,requirements:t.requirements}));Ce(this,"toJson",t=>({slot_entry:t.slotEntryId,iteration:t.iteration,value:t.value,operation:t.operation,step:t.step,repeat:t.repeat,requirements:t.requirements}))}}class D2e{constructor(t){Ce(this,"id");Ce(this,"slotId");Ce(this,"exerciseId");Ce(this,"repetitionUnitId");Ce(this,"repetitionRounding");Ce(this,"weightUnitId");Ce(this,"weightRounding");Ce(this,"order");Ce(this,"comment");Ce(this,"type");Ce(this,"config");Ce(this,"weightConfigs",[]);Ce(this,"maxWeightConfigs",[]);Ce(this,"repetitionsConfigs",[]);Ce(this,"maxRepetitionsConfigs",[]);Ce(this,"restTimeConfigs",[]);Ce(this,"maxRestTimeConfigs",[]);Ce(this,"nrOfSetsConfigs",[]);Ce(this,"maxNrOfSetsConfigs",[]);Ce(this,"rirConfigs",[]);Ce(this,"maxRirConfigs",[]);Ce(this,"exercise");Ce(this,"repetitionUnit",null);Ce(this,"weightUnit",null);this.id=t.id,this.slotId=t.slotId,this.exerciseId=t.exerciseId,this.exercise=t.exercise,this.repetitionUnitId=t.repetitionUnitId,this.repetitionRounding=t.repetitionRounding,this.weightUnitId=t.weightUnitId,this.weightRounding=t.weightRounding,this.order=t.order,this.comment=t.comment,this.type=t.type,this.config=t.config,t.configs!==void 0&&(this.weightConfigs=t.configs.weightConfigs??[],this.maxWeightConfigs=t.configs.maxWeightConfigs??[],this.repetitionsConfigs=t.configs.repetitionsConfigs??[],this.maxRepetitionsConfigs=t.configs.maxRepetitionsConfigs??[],this.restTimeConfigs=t.configs.restTimeConfigs??[],this.maxRestTimeConfigs=t.configs.maxRestTimeConfigs??[],this.nrOfSetsConfigs=t.configs.nrOfSetsConfigs??[],this.maxNrOfSetsConfigs=t.configs.maxNrOfSetsConfigs??[],this.rirConfigs=t.configs.rirConfigs??[],this.maxRirConfigs=t.configs.maxRirConfigs??[])}get hasProgressionRules(){return this.weightConfigs.length>1||this.maxWeightConfigs.length>1||this.repetitionsConfigs.length>1||this.maxRepetitionsConfigs.length>1||this.restTimeConfigs.length>1||this.maxRestTimeConfigs.length>1||this.nrOfSetsConfigs.length>1||this.maxNrOfSetsConfigs.length>1||this.rirConfigs.length>1||this.maxRirConfigs.length>1}}class k2e{constructor(){Ce(this,"fromJson",t=>{const n=new MB,r={weightConfigs:[],maxWeightConfigs:[],repetitionsConfigs:[],maxRepetitionsConfigs:[],restTimeConfigs:[],maxRestTimeConfigs:[],nrOfSetsConfigs:[],maxNrOfSetsConfigs:[],rirConfigs:[],maxRirConfigs:[]};return Object.hasOwn(t,"weight_configs")&&(r.weightConfigs=t.weight_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_weight_configs")&&(r.maxWeightConfigs=t.max_weight_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"repetitions_configs")&&(r.repetitionsConfigs=t.repetitions_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_repetitions_configs")&&(r.maxRepetitionsConfigs=t.max_repetitions_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"set_nr_configs")&&(r.nrOfSetsConfigs=t.set_nr_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_set_nr_configs")&&(r.maxNrOfSetsConfigs=t.max_set_nr_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"rest_configs")&&(r.restTimeConfigs=t.rest_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_rest_configs")&&(r.maxRestTimeConfigs=t.max_rest_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"rir_configs")&&(r.rirConfigs=t.rir_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_rir_configs")&&(r.maxRirConfigs=t.max_rir_configs.map(o=>n.fromJson(o))),new D2e({id:t.id,slotId:t.slot,exerciseId:t.exercise,repetitionUnitId:t.repetition_unit,repetitionRounding:t.repetition_rounding,weightUnitId:t.weight_unit,weightRounding:t.weight_rounding,order:t.order,comment:t.comment,type:t.type,config:t.config,configs:r})});Ce(this,"toJson",t=>({slot:t.slotId,exercise:t.exerciseId,repetition_unit:t.repetitionUnitId,repetition_rounding:t.repetitionRounding,weight_unit:t.weightUnitId,weight_rounding:t.weightRounding,order:t.order,comment:t.comment,type:t.type,config:t.config}))}}const RB=new k2e;class _2e{constructor({id:t,dayId:n,order:r,comment:o,config:i,entries:a=[]}){Ce(this,"id");Ce(this,"dayId");Ce(this,"order");Ce(this,"comment");Ce(this,"config");Ce(this,"entries",[]);this.id=t,this.dayId=n,this.order=r,this.comment=o,this.config=i,this.entries=a}}class DB{constructor(){Ce(this,"fromJson",t=>new _2e({id:t.id,dayId:t.day,order:t.order,comment:t.comment,config:t.config,entries:Object.hasOwn(t,"entries")?t.entries.map(n=>RB.fromJson(n)):[]}))}toJson(t){return{id:t.id,day:t.dayId,order:t.order,comment:t.order,config:t.config}}}class Ure{constructor({id:t,order:n,name:r,description:o,isRest:i,needLogsToAdvance:a,type:s,config:l,slots:c=[]}){Ce(this,"id");Ce(this,"order");Ce(this,"name");Ce(this,"description");Ce(this,"isRest");Ce(this,"needLogsToAdvance");Ce(this,"type");Ce(this,"config");Ce(this,"slots",[]);this.id=t,this.order=n,this.name=r,this.description=o,this.isRest=i,this.needLogsToAdvance=a,this.type=s,this.config=l,this.slots=c}get isSpecialType(){return this.type!=="custom"}getDisplayName(){return this.isRest?hr.t("routines.restDay"):this.name}}const Gre=e=>e===null||e.isRest?hr.t("routines.restDay"):e.getDisplayName();class TI{constructor(){Ce(this,"fromJson",t=>new Ure({id:t.id,order:t.order,name:t.name,description:t.description,isRest:t.is_rest,needLogsToAdvance:t.need_logs_to_advance,type:t.type,config:t.config,slots:Object.hasOwn(t,"slots")?t.slots.map(n=>new DB().fromJson(n)):[]}));Ce(this,"toJson",t=>({order:t.order,description:t.description,is_rest:t.isRest,need_logs_to_advance:t.needLogsToAdvance,type:t.type,config:t.config}))}}class qre{constructor(t){Ce(this,"exercises",{});Ce(this,"muscle",{});Ce(this,"upper_body",0);Ce(this,"lower_body",0);Ce(this,"total",0);Object.assign(this,t)}}class SE{constructor(t){Ce(this,"mesocycle",new qre);Ce(this,"iteration",{});Ce(this,"weekly",{});Ce(this,"daily",{});Object.assign(this,t)}}class $2e{constructor(t){Ce(this,"volume",new SE);Ce(this,"intensity",new SE);Ce(this,"sets",new SE);Object.assign(this,t)}}class N2e{fromJson(t){const n=o=>{const i={};for(const s in o.exercises)i[parseInt(s)]=parseFloat(o.exercises[s]);const a={};for(const s in o.muscle)a[parseInt(s)]=parseFloat(o.muscle[s]);return new qre({exercises:i,muscle:a,upper_body:parseFloat(o.upper_body),lower_body:parseFloat(o.lower_body),total:parseFloat(o.total)})},r=o=>{const i={};for(const l in o.iteration)i[l]=n(o.iteration[l]);const a={};for(const l in o.weekly)a[l]=n(o.weekly[l]);const s={};for(const l in o.daily)s[l]=n(o.daily[l]);return new SE({mesocycle:n(o.mesocycle),iteration:i,weekly:a,daily:s})};return new $2e({volume:r(t.volume),intensity:r(t.intensity),sets:r(t.sets)})}}class zh extends Error{}class L2e extends zh{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class F2e extends zh{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class j2e extends zh{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class mg extends zh{}class Wre extends zh{constructor(t){super(`Invalid unit ${t}`)}}class ki extends zh{}class Nd extends zh{constructor(){super("Zone is an abstract class")}}const Rt="numeric",Yl="short",Xa="long",sT={year:Rt,month:Rt,day:Rt},Kre={year:Rt,month:Yl,day:Rt},B2e={year:Rt,month:Yl,day:Rt,weekday:Yl},Yre={year:Rt,month:Xa,day:Rt},Qre={year:Rt,month:Xa,day:Rt,weekday:Xa},Xre={hour:Rt,minute:Rt},Jre={hour:Rt,minute:Rt,second:Rt},Zre={hour:Rt,minute:Rt,second:Rt,timeZoneName:Yl},eoe={hour:Rt,minute:Rt,second:Rt,timeZoneName:Xa},toe={hour:Rt,minute:Rt,hourCycle:"h23"},noe={hour:Rt,minute:Rt,second:Rt,hourCycle:"h23"},roe={hour:Rt,minute:Rt,second:Rt,hourCycle:"h23",timeZoneName:Yl},ooe={hour:Rt,minute:Rt,second:Rt,hourCycle:"h23",timeZoneName:Xa},ioe={year:Rt,month:Rt,day:Rt,hour:Rt,minute:Rt},aoe={year:Rt,month:Rt,day:Rt,hour:Rt,minute:Rt,second:Rt},soe={year:Rt,month:Yl,day:Rt,hour:Rt,minute:Rt},loe={year:Rt,month:Yl,day:Rt,hour:Rt,minute:Rt,second:Rt},z2e={year:Rt,month:Yl,day:Rt,weekday:Yl,hour:Rt,minute:Rt},coe={year:Rt,month:Xa,day:Rt,hour:Rt,minute:Rt,timeZoneName:Yl},uoe={year:Rt,month:Xa,day:Rt,hour:Rt,minute:Rt,second:Rt,timeZoneName:Yl},doe={year:Rt,month:Xa,day:Rt,weekday:Xa,hour:Rt,minute:Rt,timeZoneName:Xa},foe={year:Rt,month:Xa,day:Rt,weekday:Xa,hour:Rt,minute:Rt,second:Rt,timeZoneName:Xa};class fw{get type(){throw new Nd}get name(){throw new Nd}get ianaName(){return this.name}get isUniversal(){throw new Nd}offsetName(t,n){throw new Nd}formatOffset(t,n){throw new Nd}offset(t){throw new Nd}equals(t){throw new Nd}get isValid(){throw new Nd}}let HR=null;class OI extends fw{static get instance(){return HR===null&&(HR=new OI),HR}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Coe(t,n,r)}formatOffset(t,n){return ex(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const ZN=new Map;function V2e(e){let t=ZN.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ZN.set(e,t)),t}const H2e={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function U2e(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function G2e(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],s=H2e[i];i==="era"?r[s]=a:mn(s)||(r[s]=parseInt(a,10))}return r}const UR=new Map;class qu extends fw{static create(t){let n=UR.get(t);return n===void 0&&UR.set(t,n=new qu(t)),n}static resetCache(){UR.clear(),ZN.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=qu.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Coe(t,n,r,this.name)}formatOffset(t,n){return ex(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const r=V2e(this.name);let[o,i,a,s,l,c,u]=r.formatToParts?G2e(r,n):U2e(r,n);s==="BC"&&(o=-Math.abs(o)+1);const h=PI({year:o,month:i,day:a,hour:l===24?0:l,minute:c,second:u,millisecond:0});let m=+n;const g=m%1e3;return m-=g>=0?g:1e3+g,(h-m)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let hq={};function q2e(e,t={}){const n=JSON.stringify([e,t]);let r=hq[n];return r||(r=new Intl.ListFormat(e,t),hq[n]=r),r}const eL=new Map;function tL(e,t={}){const n=JSON.stringify([e,t]);let r=eL.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),eL.set(n,r)),r}const nL=new Map;function W2e(e,t={}){const n=JSON.stringify([e,t]);let r=nL.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),nL.set(n,r)),r}const rL=new Map;function K2e(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=rL.get(o);return i===void 0&&(i=new Intl.RelativeTimeFormat(e,t),rL.set(o,i)),i}let _0=null;function Y2e(){return _0||(_0=new Intl.DateTimeFormat().resolvedOptions().locale,_0)}const oL=new Map;function poe(e){let t=oL.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),oL.set(e,t)),t}const iL=new Map;function Q2e(e){let t=iL.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...hoe,...t}),iL.set(e,t)}return t}function X2e(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=tL(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=tL(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function J2e(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Z2e(e){const t=[];for(let n=1;n<=12;n++){const r=xt.utc(2009,n,1);t.push(e(r))}return t}function e_e(e){const t=[];for(let n=1;n<=7;n++){const r=xt.utc(2016,11,13+n);t.push(e(r))}return t}function P1(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function t_e(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||poe(e.locale).numberingSystem==="latn"}class n_e{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=W2e(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):LB(t,3);return Ao(n,this.padTo)}}}class r_e{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&qu.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=tL(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class o_e{constructor(t,n,r){this.opts={style:"long",...r},!n&&Soe()&&(this.rtf=K2e(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):O_e(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const hoe={firstDay:1,minimalDays:4,weekend:[6,7]};class ur{static fromOpts(t){return ur.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||to.defaultLocale,s=a||(i?"en-US":Y2e()),l=n||to.defaultNumberingSystem,c=r||to.defaultOutputCalendar,u=sL(o)||to.defaultWeekSettings;return new ur(s,l,c,u,a)}static resetCache(){_0=null,eL.clear(),nL.clear(),rL.clear(),oL.clear(),iL.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return ur.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=X2e(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=J2e(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=t_e(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:ur.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,sL(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return P1(this,t,Ooe,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=Z2e(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return P1(this,t,Aoe,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=e_e(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return P1(this,void 0,()=>Moe,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[xt.utc(2016,11,13,9),xt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return P1(this,t,Roe,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[xt.utc(-40,1,1),xt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new n_e(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new r_e(t,this.intl,n)}relFormatter(t={}){return new o_e(this.intl,this.isEnglish(),t)}listFormatter(t={}){return q2e(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||poe(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:woe()?Q2e(this.locale):hoe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let GR=null;class ea extends fw{static get utcInstance(){return GR===null&&(GR=new ea(0)),GR}static instance(t){return t===0?ea.utcInstance:new ea(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ea(AI(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ex(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ex(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return ex(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class i_e extends fw{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Yd(e,t){if(mn(e)||e===null)return t;if(e instanceof fw)return e;if(d_e(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?OI.instance:n==="utc"||n==="gmt"?ea.utcInstance:ea.parseSpecifier(n)||qu.create(e)}else return gf(e)?ea.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new i_e(e)}const kB={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},mq={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},a_e=kB.hanidec.replace(/[\[|\]]/g,"").split("");function s_e(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(kB.hanidec)!==-1)t+=a_e.indexOf(e[n]);else for(const o in mq){const[i,a]=mq[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}const aL=new Map;function l_e(){aL.clear()}function ml({numberingSystem:e},t=""){const n=e||"latn";let r=aL.get(n);r===void 0&&(r=new Map,aL.set(n,r));let o=r.get(t);return o===void 0&&(o=new RegExp(`${kB[n]}${t}`),r.set(t,o)),o}let gq=()=>Date.now(),yq="system",vq=null,bq=null,xq=null,Sq=60,wq,Cq=null;class to{static get now(){return gq}static set now(t){gq=t}static set defaultZone(t){yq=t}static get defaultZone(){return Yd(yq,OI.instance)}static get defaultLocale(){return vq}static set defaultLocale(t){vq=t}static get defaultNumberingSystem(){return bq}static set defaultNumberingSystem(t){bq=t}static get defaultOutputCalendar(){return xq}static set defaultOutputCalendar(t){xq=t}static get defaultWeekSettings(){return Cq}static set defaultWeekSettings(t){Cq=sL(t)}static get twoDigitCutoffYear(){return Sq}static set twoDigitCutoffYear(t){Sq=t%100}static get throwOnInvalid(){return wq}static set throwOnInvalid(t){wq=t}static resetCaches(){ur.resetCache(),qu.resetCache(),xt.resetCache(),l_e()}}class kl{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const moe=[0,31,59,90,120,151,181,212,243,273,304,334],goe=[0,31,60,91,121,152,182,213,244,274,305,335];function zs(e,t){return new kl("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function _B(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function yoe(e,t,n){return n+(pw(e)?goe:moe)[t-1]}function voe(e,t){const n=pw(e)?goe:moe,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function $B(e,t){return(e-t+7)%7+1}function lT(e,t=4,n=1){const{year:r,month:o,day:i}=e,a=yoe(r,o,i),s=$B(_B(r,o,i),n);let l=Math.floor((a-s+14-t)/7),c;return l<1?(c=r-1,l=Nx(c,t,n)):l>Nx(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...MI(e)}}function Eq(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=$B(_B(r,1,t),n),s=$g(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=$g(c)):l>s?(c=r+1,l-=$g(r)):c=r;const{month:u,day:f}=voe(c,l);return{year:c,month:u,day:f,...MI(e)}}function qR(e){const{year:t,month:n,day:r}=e,o=yoe(t,n,r);return{year:t,ordinal:o,...MI(e)}}function Tq(e){const{year:t,ordinal:n}=e,{month:r,day:o}=voe(t,n);return{year:t,month:r,day:o,...MI(e)}}function Oq(e,t){if(!mn(e.localWeekday)||!mn(e.localWeekNumber)||!mn(e.localWeekYear)){if(!mn(e.weekday)||!mn(e.weekNumber)||!mn(e.weekYear))throw new mg("Cannot mix locale-based week fields with ISO-based week fields");return mn(e.localWeekday)||(e.weekday=e.localWeekday),mn(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),mn(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function c_e(e,t=4,n=1){const r=II(e.weekYear),o=Vs(e.weekNumber,1,Nx(e.weekYear,t,n)),i=Vs(e.weekday,1,7);return r?o?i?!1:zs("weekday",e.weekday):zs("week",e.weekNumber):zs("weekYear",e.weekYear)}function u_e(e){const t=II(e.year),n=Vs(e.ordinal,1,$g(e.year));return t?n?!1:zs("ordinal",e.ordinal):zs("year",e.year)}function boe(e){const t=II(e.year),n=Vs(e.month,1,12),r=Vs(e.day,1,cT(e.year,e.month));return t?n?r?!1:zs("day",e.day):zs("month",e.month):zs("year",e.year)}function xoe(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Vs(t,0,23)||t===24&&n===0&&r===0&&o===0,a=Vs(n,0,59),s=Vs(r,0,59),l=Vs(o,0,999);return i?a?s?l?!1:zs("millisecond",o):zs("second",r):zs("minute",n):zs("hour",t)}function mn(e){return typeof e>"u"}function gf(e){return typeof e=="number"}function II(e){return typeof e=="number"&&e%1===0}function d_e(e){return typeof e=="string"}function f_e(e){return Object.prototype.toString.call(e)==="[object Date]"}function Soe(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function woe(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function p_e(e){return Array.isArray(e)?e:[e]}function Iq(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function h_e(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function dy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sL(e){if(e==null)return null;if(typeof e!="object")throw new ki("Week settings must be an object");if(!Vs(e.firstDay,1,7)||!Vs(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Vs(t,1,7)))throw new ki("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Vs(e,t,n){return II(e)&&e>=t&&e<=n}function m_e(e,t){return e-t*Math.floor(e/t)}function Ao(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Hd(e){if(!(mn(e)||e===null||e===""))return parseInt(e,10)}function mp(e){if(!(mn(e)||e===null||e===""))return parseFloat(e)}function NB(e){if(!(mn(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function LB(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function pw(e){return e%4===0&&(e%100!==0||e%400===0)}function $g(e){return pw(e)?366:365}function cT(e,t){const n=m_e(t-1,12)+1,r=e+(t-n)/12;return n===2?pw(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function PI(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Pq(e,t,n){return-$B(_B(e,1,t),n)+t-1}function Nx(e,t=4,n=1){const r=Pq(e,t,n),o=Pq(e+1,t,n);return($g(e)-r+o)/7}function lL(e){return e>99?e:e>to.twoDigitCutoffYear?1900+e:2e3+e}function Coe(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function AI(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function Eoe(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new ki(`Invalid unit value ${e}`);return t}function uT(e,t){const n={};for(const r in e)if(dy(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=Eoe(o)}return n}function ex(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Ao(n,2)}:${Ao(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Ao(n,2)}${Ao(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function MI(e){return h_e(e,["hour","minute","second","millisecond"])}const g_e=["January","February","March","April","May","June","July","August","September","October","November","December"],Toe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],y_e=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ooe(e){switch(e){case"narrow":return[...y_e];case"short":return[...Toe];case"long":return[...g_e];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Ioe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Poe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],v_e=["M","T","W","T","F","S","S"];function Aoe(e){switch(e){case"narrow":return[...v_e];case"short":return[...Poe];case"long":return[...Ioe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Moe=["AM","PM"],b_e=["Before Christ","Anno Domini"],x_e=["BC","AD"],S_e=["B","A"];function Roe(e){switch(e){case"narrow":return[...S_e];case"short":return[...x_e];case"long":return[...b_e];default:return null}}function w_e(e){return Moe[e.hour<12?0:1]}function C_e(e,t){return Aoe(t)[e.weekday-1]}function E_e(e,t){return Ooe(t)[e.month-1]}function T_e(e,t){return Roe(t)[e.year<0?0:1]}function O_e(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const f=e==="days";switch(t){case 1:return f?"tomorrow":`next ${o[e][0]}`;case-1:return f?"yesterday":`last ${o[e][0]}`;case 0:return f?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function Aq(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const I_e={D:sT,DD:Kre,DDD:Yre,DDDD:Qre,t:Xre,tt:Jre,ttt:Zre,tttt:eoe,T:toe,TT:noe,TTT:roe,TTTT:ooe,f:ioe,ff:soe,fff:coe,ffff:doe,F:aoe,FF:loe,FFF:uoe,FFFF:foe};class Li{static create(t,n={}){return new Li(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const s=t.charAt(a);s==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return I_e[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Ao(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(m,g)=>this.loc.extract(t,m,g),a=m=>t.isOffsetFixed&&t.offset===0&&m.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,m.format):"",s=()=>r?w_e(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(m,g)=>r?E_e(t,m):i(g?{month:m}:{month:m,day:"numeric"},"month"),c=(m,g)=>r?C_e(t,m):i(g?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),u=m=>{const g=Li.macroTokenToFormatOpts(m);return g?this.formatWithSystemDefault(t,g):m},f=m=>r?T_e(t,m):i({era:m},"era"),h=m=>{switch(m){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(m)}};return Aq(Li.parseFormat(n),h)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=Li.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return Aq(i,o(s))}}const Doe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function hv(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function mv(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function gv(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function koe(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=Hd(t[n+o]);return[r,null,n+o]}}const _oe=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,P_e=`(?:${_oe.source}?(?:\\[(${Doe.source})\\])?)?`,FB=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,$oe=RegExp(`${FB.source}${P_e}`),jB=RegExp(`(?:T${$oe.source})?`),A_e=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,M_e=/(\d{4})-?W(\d\d)(?:-?(\d))?/,R_e=/(\d{4})-?(\d{3})/,D_e=koe("weekYear","weekNumber","weekDay"),k_e=koe("year","ordinal"),__e=/(\d{4})-(\d\d)-(\d\d)/,Noe=RegExp(`${FB.source} ?(?:${_oe.source}|(${Doe.source}))?`),$_e=RegExp(`(?: ${Noe.source})?`);function Ng(e,t,n){const r=e[t];return mn(r)?n:Hd(r)}function N_e(e,t){return[{year:Ng(e,t),month:Ng(e,t+1,1),day:Ng(e,t+2,1)},null,t+3]}function yv(e,t){return[{hours:Ng(e,t,0),minutes:Ng(e,t+1,0),seconds:Ng(e,t+2,0),milliseconds:NB(e[t+3])},null,t+4]}function hw(e,t){const n=!e[t]&&!e[t+1],r=AI(e[t+1],e[t+2]),o=n?null:ea.instance(r);return[{},o,t+3]}function mw(e,t){const n=e[t]?qu.create(e[t]):null;return[{},n,t+1]}const L_e=RegExp(`^T?${FB.source}$`),F_e=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function j_e(e){const[t,n,r,o,i,a,s,l,c]=e,u=t[0]==="-",f=l&&l[0]==="-",h=(m,g=!1)=>m!==void 0&&(g||m&&u)?-m:m;return[{years:h(mp(n)),months:h(mp(r)),weeks:h(mp(o)),days:h(mp(i)),hours:h(mp(a)),minutes:h(mp(s)),seconds:h(mp(l),l==="-0"),milliseconds:h(NB(c),f)}]}const B_e={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function BB(e,t,n,r,o,i,a){const s={year:t.length===2?lL(Hd(t)):Hd(t),month:Toe.indexOf(n)+1,day:Hd(r),hour:Hd(o),minute:Hd(i)};return a&&(s.second=Hd(a)),e&&(s.weekday=e.length>3?Ioe.indexOf(e)+1:Poe.indexOf(e)+1),s}const z_e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function V_e(e){const[,t,n,r,o,i,a,s,l,c,u,f]=e,h=BB(t,o,r,n,i,a,s);let m;return l?m=B_e[l]:c?m=0:m=AI(u,f),[h,new ea(m)]}function H_e(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const U_e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,G_e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,q_e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Mq(e){const[,t,n,r,o,i,a,s]=e;return[BB(t,o,r,n,i,a,s),ea.utcInstance]}function W_e(e){const[,t,n,r,o,i,a,s]=e;return[BB(t,s,n,r,o,i,a),ea.utcInstance]}const K_e=hv(A_e,jB),Y_e=hv(M_e,jB),Q_e=hv(R_e,jB),X_e=hv($oe),Loe=mv(N_e,yv,hw,mw),J_e=mv(D_e,yv,hw,mw),Z_e=mv(k_e,yv,hw,mw),e$e=mv(yv,hw,mw);function t$e(e){return gv(e,[K_e,Loe],[Y_e,J_e],[Q_e,Z_e],[X_e,e$e])}function n$e(e){return gv(H_e(e),[z_e,V_e])}function r$e(e){return gv(e,[U_e,Mq],[G_e,Mq],[q_e,W_e])}function o$e(e){return gv(e,[F_e,j_e])}const i$e=mv(yv);function a$e(e){return gv(e,[L_e,i$e])}const s$e=hv(__e,$_e),l$e=hv(Noe),c$e=mv(yv,hw,mw);function u$e(e){return gv(e,[s$e,Loe],[l$e,c$e])}const Rq="Invalid Duration",Foe={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},d$e={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Foe},Ts=146097/400,Wm=146097/4800,f$e={years:{quarters:4,months:12,weeks:Ts/7,days:Ts,hours:Ts*24,minutes:Ts*24*60,seconds:Ts*24*60*60,milliseconds:Ts*24*60*60*1e3},quarters:{months:3,weeks:Ts/28,days:Ts/4,hours:Ts*24/4,minutes:Ts*24*60/4,seconds:Ts*24*60*60/4,milliseconds:Ts*24*60*60*1e3/4},months:{weeks:Wm/7,days:Wm,hours:Wm*24,minutes:Wm*24*60,seconds:Wm*24*60*60,milliseconds:Wm*24*60*60*1e3},...Foe},jp=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],p$e=jp.slice(0).reverse();function Ld(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Xn(r)}function joe(e,t){let n=t.milliseconds??0;for(const r of p$e.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Dq(e,t){const n=joe(e,t)<0?-1:1;jp.reduceRight((r,o)=>{if(mn(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),jp.reduce((r,o)=>{if(mn(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function h$e(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Xn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?f$e:d$e;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||ur.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Xn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ki(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Xn({values:uT(t,Xn.normalizeUnit),loc:ur.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(gf(t))return Xn.fromMillis(t);if(Xn.isDuration(t))return t;if(typeof t=="object")return Xn.fromObject(t);throw new ki(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=o$e(t);return r?Xn.fromObject(r,n):Xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=a$e(t);return r?Xn.fromObject(r,n):Xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the Duration is invalid");const r=t instanceof kl?t:new kl(t,n);if(to.throwOnInvalid)throw new j2e(r);return new Xn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Wre(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Li.create(this.loc,r).formatDurationFromString(this,t):Rq}toHuman(t={}){if(!this.isValid)return Rq;const n=jp.map(r=>{const o=this.values[r];return mn(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=LB(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},xt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?joe(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t),r={};for(const o of jp)(dy(n.values,o)||dy(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Ld(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Eoe(t(this.values[r],r));return Ld(this,{values:n},!0)}get(t){return this[Xn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...uT(t,Xn.normalizeUnit)};return Ld(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Ld(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Dq(this.matrix,t),Ld(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=h$e(this.normalize().shiftToAll().toObject());return Ld(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Xn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of jp)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;gf(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else gf(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return Dq(this.matrix,n),Ld(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Ld(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of jp)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Km="Invalid Interval";function m$e(e,t){return!e||!e.isValid?uo.invalid("missing or invalid start"):!t||!t.isValid?uo.invalid("missing or invalid end"):t<e?uo.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class uo{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the Interval is invalid");const r=t instanceof kl?t:new kl(t,n);if(to.throwOnInvalid)throw new F2e(r);return new uo({invalid:r})}static fromDateTimes(t,n){const r=n0(t),o=n0(n),i=m$e(r,o);return i??new uo({start:r,end:o})}static after(t,n){const r=Xn.fromDurationLike(n),o=n0(t);return uo.fromDateTimes(o,o.plus(r))}static before(t,n){const r=Xn.fromDurationLike(n),o=n0(t);return uo.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=xt.fromISO(r,n),a=i.isValid}catch{a=!1}let s,l;try{s=xt.fromISO(o,n),l=s.isValid}catch{l=!1}if(a&&l)return uo.fromDateTimes(i,s);if(a){const c=Xn.fromISO(o,n);if(c.isValid)return uo.after(i,c)}else if(l){const c=Xn.fromISO(r,n);if(c.isValid)return uo.before(s,c)}}return uo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?uo.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(n0).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,s=+a>+this.e?this.e:a;r.push(uo.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Xn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const s=this.start.plus(n.mapUnits(l=>l*o));i=+s>+this.e?this.e:s,a.push(uo.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:uo.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return uo.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(uo.fromDateTimes(n,l.time)),n=null);return uo.merge(o)}difference(...t){return uo.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Km}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=sT,n={}){return this.isValid?Li.create(this.s.loc.clone(n),t).formatInterval(this):Km}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Km}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Km}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Km}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Km}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Xn.invalid(this.invalidReason)}mapEndpoints(t){return uo.fromDateTimes(t(this.s),t(this.e))}}class $0{static hasDST(t=to.defaultZone){const n=xt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return qu.isValidZone(t)}static normalizeZone(t){return Yd(t,to.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||ur.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||ur.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||ur.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||ur.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||ur.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||ur.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||ur.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ur.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return ur.create(n,null,"gregory").eras(t)}static features(){return{relative:Soe(),localeWeek:woe()}}}function kq(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Xn.fromMillis(r).as("days"))}function g$e(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=kq(l,c);return(u-u%7)/7}],["days",kq]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function y$e(e,t,n,r){let[o,i,a,s]=g$e(e,t,n);const l=t-o,c=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);c.length===0&&(a<t&&(a=o.plus({[s]:1})),a!==o&&(i[s]=(i[s]||0)+l/(a-o)));const u=Xn.fromObject(i,r);return c.length>0?Xn.fromMillis(l,r).shiftTo(...c).plus(u):u}const v$e="missing Intl.DateTimeFormat.formatToParts support";function or(e,t=n=>n){return{regex:e,deser:([n])=>t(s_e(n))}}const b$e=" ",Boe=`[ ${b$e}]`,zoe=new RegExp(Boe,"g");function x$e(e){return e.replace(/\./g,"\\.?").replace(zoe,Boe)}function _q(e){return e.replace(/\./g,"").replace(zoe," ").toLowerCase()}function gl(e,t){return e===null?null:{regex:RegExp(e.map(x$e).join("|")),deser:([n])=>e.findIndex(r=>_q(n)===_q(r))+t}}function $q(e,t){return{regex:e,deser:([,n,r])=>AI(n,r),groups:t}}function A1(e){return{regex:e,deser:([t])=>t}}function S$e(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function w$e(e,t){const n=ml(t),r=ml(t,"{2}"),o=ml(t,"{3}"),i=ml(t,"{4}"),a=ml(t,"{6}"),s=ml(t,"{1,2}"),l=ml(t,"{1,3}"),c=ml(t,"{1,6}"),u=ml(t,"{1,9}"),f=ml(t,"{2,4}"),h=ml(t,"{4,6}"),m=v=>({regex:RegExp(S$e(v.val)),deser:([w])=>w,literal:!0}),y=(v=>{if(e.literal)return m(v);switch(v.val){case"G":return gl(t.eras("short"),0);case"GG":return gl(t.eras("long"),0);case"y":return or(c);case"yy":return or(f,lL);case"yyyy":return or(i);case"yyyyy":return or(h);case"yyyyyy":return or(a);case"M":return or(s);case"MM":return or(r);case"MMM":return gl(t.months("short",!0),1);case"MMMM":return gl(t.months("long",!0),1);case"L":return or(s);case"LL":return or(r);case"LLL":return gl(t.months("short",!1),1);case"LLLL":return gl(t.months("long",!1),1);case"d":return or(s);case"dd":return or(r);case"o":return or(l);case"ooo":return or(o);case"HH":return or(r);case"H":return or(s);case"hh":return or(r);case"h":return or(s);case"mm":return or(r);case"m":return or(s);case"q":return or(s);case"qq":return or(r);case"s":return or(s);case"ss":return or(r);case"S":return or(l);case"SSS":return or(o);case"u":return A1(u);case"uu":return A1(s);case"uuu":return or(n);case"a":return gl(t.meridiems(),0);case"kkkk":return or(i);case"kk":return or(f,lL);case"W":return or(s);case"WW":return or(r);case"E":case"c":return or(n);case"EEE":return gl(t.weekdays("short",!1),1);case"EEEE":return gl(t.weekdays("long",!1),1);case"ccc":return gl(t.weekdays("short",!0),1);case"cccc":return gl(t.weekdays("long",!0),1);case"Z":case"ZZ":return $q(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return $q(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return A1(/[a-z_+-/]{1,256}?/i);case" ":return A1(/[^\S\n\r]/);default:return m(v)}})(e)||{invalidReason:v$e};return y.token=e,y}const C$e={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function E$e(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=C$e[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function T$e(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function O$e(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(dy(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function I$e(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return mn(e.z)||(n=qu.create(e.z)),mn(e.Z)||(n||(n=new ea(e.Z)),r=e.Z),mn(e.q)||(e.M=(e.q-1)*3+1),mn(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),mn(e.u)||(e.S=NB(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let WR=null;function P$e(){return WR||(WR=xt.fromMillis(1555555555555)),WR}function A$e(e,t){if(e.literal)return e;const n=Li.macroTokenToFormatOpts(e.val),r=Goe(n,t);return r==null||r.includes(void 0)?e:r}function Voe(e,t){return Array.prototype.concat(...e.map(n=>A$e(n,t)))}class Hoe{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Voe(Li.parseFormat(n),t),this.units=this.tokens.map(r=>w$e(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=T$e(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=O$e(t,this.regex,this.handlers),[o,i,a]=r?I$e(r):[null,null,void 0];if(dy(r,"a")&&dy(r,"H"))throw new mg("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Uoe(e,t,n){return new Hoe(e,n).explainFromTokens(t)}function M$e(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=Uoe(e,t,n);return[r,o,i,a]}function Goe(e,t){if(!e)return null;const r=Li.create(t,e).dtFormatter(P$e()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>E$e(a,e,i))}const KR="Invalid DateTime",R$e=864e13;function N0(e){return new kl("unsupported zone",`the zone "${e.name}" is not supported`)}function YR(e){return e.weekData===null&&(e.weekData=lT(e.c)),e.weekData}function QR(e){return e.localWeekData===null&&(e.localWeekData=lT(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function gp(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new xt({...n,...t,old:n})}function qoe(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function M1(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function wE(e,t,n){return qoe(PI(e),t,n)}function Nq(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,cT(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=PI(i);let[l,c]=qoe(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function Ym(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=xt.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return xt.invalid(new kl("unparsable",`the input "${o}" can't be parsed as ${r}`))}function R1(e,t,n=!0){return e.isValid?Li.create(ur.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function XR(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Ao(e.c.year,n?6:4),t?(r+="-",r+=Ao(e.c.month),r+="-",r+=Ao(e.c.day)):(r+=Ao(e.c.month),r+=Ao(e.c.day)),r}function Lq(e,t,n,r,o,i){let a=Ao(e.c.hour);return t?(a+=":",a+=Ao(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Ao(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Ao(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Ao(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Ao(Math.trunc(-e.o/60)),a+=":",a+=Ao(Math.trunc(-e.o%60))):(a+="+",a+=Ao(Math.trunc(e.o/60)),a+=":",a+=Ao(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const Woe={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},D$e={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},k$e={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Koe=["year","month","day","hour","minute","second","millisecond"],_$e=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],$$e=["year","ordinal","hour","minute","second","millisecond"];function N$e(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Wre(e);return t}function Fq(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return N$e(e)}}function L$e(e){if(L0===void 0&&(L0=to.now()),e.type!=="iana")return e.offset(L0);const t=e.name;let n=cL.get(t);return n===void 0&&(n=e.offset(L0),cL.set(t,n)),n}function jq(e,t){const n=Yd(t.zone,to.defaultZone);if(!n.isValid)return xt.invalid(N0(n));const r=ur.fromObject(t);let o,i;if(mn(e.year))o=to.now();else{for(const l of Koe)mn(e[l])&&(e[l]=Woe[l]);const a=boe(e)||xoe(e);if(a)return xt.invalid(a);const s=L$e(n);[o,i]=wE(e,s,n)}return new xt({ts:o,zone:n,loc:r,o:i})}function Bq(e,t,n){const r=mn(n.round)?!0:n.round,o=(a,s)=>(a=LB(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function zq(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let L0;const cL=new Map;class xt{constructor(t){const n=t.zone||to.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new kl("invalid input"):null)||(n.isValid?null:N0(n));this.ts=mn(t.ts)?to.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=gf(t.o)&&!t.old?t.o:n.offset(this.ts);o=M1(this.ts,s),r=Number.isNaN(o.year)?new kl("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||ur.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new xt({})}static local(){const[t,n]=zq(arguments),[r,o,i,a,s,l,c]=n;return jq({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=zq(arguments),[r,o,i,a,s,l,c]=n;return t.zone=ea.utcInstance,jq({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=f_e(t)?t.valueOf():NaN;if(Number.isNaN(r))return xt.invalid("invalid input");const o=Yd(n.zone,to.defaultZone);return o.isValid?new xt({ts:r,zone:o,loc:ur.fromObject(n)}):xt.invalid(N0(o))}static fromMillis(t,n={}){if(gf(t))return t<-864e13||t>R$e?xt.invalid("Timestamp out of range"):new xt({ts:t,zone:Yd(n.zone,to.defaultZone),loc:ur.fromObject(n)});throw new ki(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(gf(t))return new xt({ts:t*1e3,zone:Yd(n.zone,to.defaultZone),loc:ur.fromObject(n)});throw new ki("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Yd(n.zone,to.defaultZone);if(!r.isValid)return xt.invalid(N0(r));const o=ur.fromObject(n),i=uT(t,Fq),{minDaysInFirstWeek:a,startOfWeek:s}=Oq(i,o),l=to.now(),c=mn(n.specificOffset)?r.offset(l):n.specificOffset,u=!mn(i.ordinal),f=!mn(i.year),h=!mn(i.month)||!mn(i.day),m=f||h,g=i.weekYear||i.weekNumber;if((m||u)&&g)throw new mg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new mg("Can't mix ordinal dates with month/day");const y=g||i.weekday&&!m;let v,w,C=M1(l,c);y?(v=_$e,w=D$e,C=lT(C,a,s)):u?(v=$$e,w=k$e,C=qR(C)):(v=Koe,w=Woe);let E=!1;for(const A of v){const _=i[A];mn(_)?E?i[A]=w[A]:i[A]=C[A]:E=!0}const I=y?c_e(i,a,s):u?u_e(i):boe(i),O=I||xoe(i);if(O)return xt.invalid(O);const P=y?Eq(i,a,s):u?Tq(i):i,[R,D]=wE(P,c,r),M=new xt({ts:R,zone:r,o:D,loc:o});return i.weekday&&m&&t.weekday!==M.weekday?xt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${M.toISO()}`):M.isValid?M:xt.invalid(M.invalid)}static fromISO(t,n={}){const[r,o]=t$e(t);return Ym(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=n$e(t);return Ym(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=r$e(t);return Ym(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(mn(t)||mn(n))throw new ki("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=ur.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=M$e(a,t,n);return u?xt.invalid(u):Ym(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return xt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=u$e(t);return Ym(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the DateTime is invalid");const r=t instanceof kl?t:new kl(t,n);if(to.throwOnInvalid)throw new L2e(r);return new xt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=Goe(t,ur.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return Voe(Li.parseFormat(t),ur.fromObject(n)).map(o=>o.val).join("")}static resetCache(){L0=void 0,cL.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?YR(this).weekYear:NaN}get weekNumber(){return this.isValid?YR(this).weekNumber:NaN}get weekday(){return this.isValid?YR(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?QR(this).weekday:NaN}get localWeekNumber(){return this.isValid?QR(this).weekNumber:NaN}get localWeekYear(){return this.isValid?QR(this).weekYear:NaN}get ordinal(){return this.isValid?qR(this.c).ordinal:NaN}get monthShort(){return this.isValid?$0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?$0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?$0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?$0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=PI(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=M1(l,a),f=M1(c,s);return u.hour===f.hour&&u.minute===f.minute&&u.second===f.second&&u.millisecond===f.millisecond?[gp(this,{ts:l}),gp(this,{ts:c})]:[this]}get isInLeapYear(){return pw(this.year)}get daysInMonth(){return cT(this.year,this.month)}get daysInYear(){return this.isValid?$g(this.year):NaN}get weeksInWeekYear(){return this.isValid?Nx(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Nx(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Li.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(ea.instance(t),n)}toLocal(){return this.setZone(to.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Yd(t,to.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=wE(a,i,t)}return gp(this,{ts:o,zone:t})}else return xt.invalid(N0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return gp(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=uT(t,Fq),{minDaysInFirstWeek:r,startOfWeek:o}=Oq(n,this.loc),i=!mn(n.weekYear)||!mn(n.weekNumber)||!mn(n.weekday),a=!mn(n.ordinal),s=!mn(n.year),l=!mn(n.month)||!mn(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new mg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new mg("Can't mix ordinal dates with month/day");let f;i?f=Eq({...lT(this.c,r,o),...n},r,o):mn(n.ordinal)?(f={...this.toObject(),...n},mn(n.day)&&(f.day=Math.min(cT(f.year,f.month),f.day))):f=Tq({...qR(this.c),...n});const[h,m]=wE(f,this.o,this.zone);return gp(this,{ts:h,o:m})}plus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t);return gp(this,Nq(this,n))}minus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t).negate();return gp(this,Nq(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Xn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?Li.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):KR}toLocaleString(t=sT,n={}){return this.isValid?Li.create(this.loc.clone(n),t).formatDateTime(this):KR}toLocaleParts(t={}){return this.isValid?Li.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let s=XR(this,a);return s+="T",s+=Lq(this,a,n,r,o,i),s}toISODate({format:t="extended"}={}){return this.isValid?XR(this,t==="extended"):null}toISOWeekDate(){return R1(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+Lq(this,a==="extended",n,t,r,i):null}toRFC2822(){return R1(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return R1(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?XR(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),R1(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():KR}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return Xn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=p_e(n).map(Xn.normalizeUnit),a=t.valueOf()>this.valueOf(),s=a?this:t,l=a?t:this,c=y$e(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(xt.now(),t,n)}until(t){return this.isValid?uo.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||xt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),Bq(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?Bq(t.base||xt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(xt.isDateTime))throw new ki("min requires all arguments be DateTimes");return Iq(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(xt.isDateTime))throw new ki("max requires all arguments be DateTimes");return Iq(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=ur.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return Uoe(a,t,n)}static fromStringExplain(t,n,r={}){return xt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=ur.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new Hoe(i,t)}static fromFormatParser(t,n,r={}){if(mn(t)||mn(n))throw new ki("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=ur.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new ki(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?xt.invalid(u):Ym(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return sT}static get DATE_MED(){return Kre}static get DATE_MED_WITH_WEEKDAY(){return B2e}static get DATE_FULL(){return Yre}static get DATE_HUGE(){return Qre}static get TIME_SIMPLE(){return Xre}static get TIME_WITH_SECONDS(){return Jre}static get TIME_WITH_SHORT_OFFSET(){return Zre}static get TIME_WITH_LONG_OFFSET(){return eoe}static get TIME_24_SIMPLE(){return toe}static get TIME_24_WITH_SECONDS(){return noe}static get TIME_24_WITH_SHORT_OFFSET(){return roe}static get TIME_24_WITH_LONG_OFFSET(){return ooe}static get DATETIME_SHORT(){return ioe}static get DATETIME_SHORT_WITH_SECONDS(){return aoe}static get DATETIME_MED(){return soe}static get DATETIME_MED_WITH_SECONDS(){return loe}static get DATETIME_MED_WITH_WEEKDAY(){return z2e}static get DATETIME_FULL(){return coe}static get DATETIME_FULL_WITH_SECONDS(){return uoe}static get DATETIME_HUGE(){return doe}static get DATETIME_HUGE_WITH_SECONDS(){return foe}}function n0(e){if(xt.isDateTime(e))return e;if(e&&e.valueOf&&gf(e.valueOf()))return xt.fromJSDate(e);if(e&&typeof e=="object")return xt.fromObject(e);throw new ki(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Vq=3,Hq=25,Uq=1e3,Gq=1,qq=16,F$e=12;class j$e{constructor(t){Ce(this,"id");Ce(this,"name");Ce(this,"description");Ce(this,"created");Ce(this,"start");Ce(this,"end");Ce(this,"fitInWeek");Ce(this,"isTemplate");Ce(this,"isPublic");Ce(this,"days",[]);Ce(this,"dayData",[]);this.id=t.id,this.name=t.name,this.description=t.description,this.created=t.created,this.start=t.start,this.end=t.end,this.fitInWeek=t.fitInWeek,this.isTemplate=t.isTemplate??!1,this.isPublic=t.isPublic??!1,this.days=t.days??[],this.dayData=t.dayData??[]}get exercises(){return this.days.flatMap(t=>t.slots.flatMap(n=>n.entries.flatMap(r=>r.exercise)))}get dayDataCurrentIteration(){const t=this.getIteration()??1;return this.dayData.filter(n=>n.iteration===t)}get groupedDayDataByIteration(){const t={};for(const n of this.dayData)t[n.iteration]||(t[n.iteration]=[]),t[n.iteration].push(n);return t}get duration(){const t=xt.fromJSDate(this.end).diff(xt.fromJSDate(this.start),["weeks","days"]),n=Math.floor(t.weeks),r=Math.floor(t.days);return{weeks:n,days:r}}get durationText(){const t=this.duration.days,n=this.duration.weeks;return t===0?hr.t("durationWeeks",{number:n}):hr.t("durationWeeksDays",{nrWeeks:n,nrDays:t})}get mainMuscles(){return this.days.flatMap(n=>n.slots.flatMap(r=>r.entries.flatMap(o=>{var i;return((i=o.exercise)==null?void 0:i.muscles)||[]}))).filter((n,r,o)=>r===o.findIndex(i=>i.id===n.id))}get secondaryMuscles(){return this.days.flatMap(n=>n.slots.flatMap(r=>r.entries.flatMap(o=>{var i;return((i=o.exercise)==null?void 0:i.musclesSecondary)||[]}))).filter((n,r,o)=>r===o.findIndex(i=>i.id===n.id))}get cycleLength(){return this.dayDataCurrentIteration.length}getIteration(t){const n=t??new Date,r=this.dayData.find(o=>xa(o.date,n));return r?r.iteration:null}getSetConfigData(t,n,r){const o=this.dayData.find(a=>{var s;return((s=a.day)==null?void 0:s.id)===t&&a.iteration===n});if(!o)return null;const i=o.slots.find(a=>a.setConfigs.some(s=>s.slotEntryId===r));return(i==null?void 0:i.setConfigs.find(a=>a.slotEntryId===r))||null}getDayData(t,n){return this.dayData.filter(r=>{var o;return((o=r.day)==null?void 0:o.id)===t&&r.date.getDate()===n.getDate()&&r.date.getMonth()===n.getMonth()&&r.date.getFullYear()===n.getFullYear()})}}class B$e{fromJson(t){return new j$e({id:t.id,name:t.name,description:t.description,created:new Date(t.created),start:new Date(t.start),end:new Date(t.end),fitInWeek:t.fit_in_week,isTemplate:t.is_template,isPublic:t.is_public,days:t.days?t.days.map(n=>new Ure(n)):[]})}toJson(t){return{id:t.id,name:t.name,description:t.description,start:Zn(t.start),end:Zn(t.end),fit_in_week:t.fitInWeek}}}const vv=new B$e;class z$e{constructor(t){Ce(this,"exercise");Ce(this,"weightUnit",null);Ce(this,"repetitionsUnit",null);Ce(this,"exerciseId");Ce(this,"slotEntryId");Ce(this,"type");Ce(this,"nrOfSets");Ce(this,"maxNrOfSets");Ce(this,"weight");Ce(this,"maxWeight");Ce(this,"weightUnitId",null);Ce(this,"weightRounding",null);Ce(this,"repetitions");Ce(this,"maxRepetitions");Ce(this,"repetitionsUnitId",null);Ce(this,"repetitionsRounding",null);Ce(this,"rir");Ce(this,"maxRir");Ce(this,"rpe");Ce(this,"restTime");Ce(this,"maxRestTime");Ce(this,"textRepr");Ce(this,"comment");this.exerciseId=t.exerciseId,this.exercise=t.exercise,this.slotEntryId=t.slotEntryId,this.type=t.type,this.nrOfSets=t.nrOfSets,this.maxNrOfSets=t.maxNrOfSets??null,this.weight=t.weight??null,this.maxWeight=t.maxWeight??null,this.weightUnitId=t.weightUnitId,this.weightUnit=t.weightUnit??null,this.weightRounding=t.weightRounding,this.repetitions=t.repetitions??null,this.maxRepetitions=t.maxRepetitions??null,this.repetitionsUnitId=t.repetitionsUnitId,this.repetitionsUnit=t.repetitionsUnit??null,this.repetitionsRounding=t.repetitionsRounding,this.rir=t.rir??null,this.maxRir=t.maxRir??null,this.rpe=t.rpe??null,this.restTime=t.restTime??null,this.maxRestTime=t.maxRestTime??null,this.textRepr=t.textRepr,this.comment=t.comment}get isSpecialType(){return this.type!=="normal"}}class V$e{constructor(){Ce(this,"fromJson",t=>new z$e({exerciseId:t.exercise,slotEntryId:t.slot_entry_id,type:t.type,nrOfSets:t.sets,maxNrOfSets:t.max_sets!==null?parseInt(t.max_sets):null,weight:t.weight!==null?parseFloat(t.weight):null,maxWeight:t.max_weight!==null?parseFloat(t.max_weight):null,weightUnitId:t.weight_unit,weightRounding:t.weight_rounding!==null?parseFloat(t.weight_rounding):null,repetitions:t.repetitions!==null?parseFloat(t.repetitions):null,maxRepetitions:t.max_repetitions!==null?parseFloat(t.max_repetitions):null,repetitionsUnitId:t.repetitions_unit,repetitionsRounding:t.repetitions_rounding!==null?parseFloat(t.repetitions_rounding):null,rir:t.rir!==null?parseFloat(t.rir):null,maxRir:t.max_rir!==null?parseFloat(t.max_rir):null,rpe:t.rpe!==null?parseFloat(t.rpe):null,restTime:t.rest!==null?parseInt(t.rest):null,maxRestTime:t.max_rest!==null?parseInt(t.max_rest):null,textRepr:t.text_repr,comment:t.comment}))}}class H$e{constructor(t,n,r,o,i){Ce(this,"exercises",[]);this.comment=t,this.isSuperset=n,this.exerciseIds=r,this.setConfigs=o,this.exercises=i??[]}}class U$e{constructor(){Ce(this,"fromJson",t=>new H$e(t.comment,t.is_superset,t.exercises,t.sets.map(n=>new V$e().fromJson(n))))}}class G$e{constructor(t,n,r,o,i){Ce(this,"slots",[]);this.iteration=t,this.date=n,this.label=r,this.day=o,this.slots=i??[]}}class q$e{constructor(){Ce(this,"fromJson",t=>new G$e(t.iteration,new Date(t.date),t.label,t.day!=null?new TI().fromJson(t.day):null,t.slots.map(n=>new U$e().fromJson(n))))}}class W$e{constructor(t){Ce(this,"id");Ce(this,"date");Ce(this,"iteration");Ce(this,"exerciseId");Ce(this,"slotEntryId");Ce(this,"sessionId");Ce(this,"routineId");Ce(this,"repetitionUnitObj");Ce(this,"repetitionUnitId");Ce(this,"repetitions");Ce(this,"repetitionsTarget");Ce(this,"weightUnitObj");Ce(this,"weightUnitId");Ce(this,"weight");Ce(this,"weightTarget");Ce(this,"rir");Ce(this,"rirTarget");Ce(this,"restTime");Ce(this,"restTimeTarget");Ce(this,"exerciseObj");this.id=t.id,this.date=typeof t.date=="string"?new Date(t.date):t.date,this.iteration=t.iteration,this.slotEntryId=t.slotEntryId,this.sessionId=t.sessionId||null,this.routineId=t.routineId||null,this.exerciseObj=t.exercise,this.exerciseId=t.exerciseId,this.repetitionUnitObj=t.repetitionsUnit||null,this.repetitionUnitId=t.repetitionsUnitId||null,this.repetitions=t.repetitions,this.repetitionsTarget=t.repetitionsTarget||null,this.weightUnitObj=t.weightUnit||null,this.weightUnitId=t.weightUnitId||null,this.weight=t.weight,this.weightTarget=t.weightTarget||null,this.rir=t.rir,this.rirTarget=t.rirTarget||null,this.restTime=t.restTime||null,this.restTimeTarget=t.restTimeTarget||null}get rirString(){return this.rir===null?"-/-":this.rir.toString()}}class RI{constructor(){Ce(this,"fromJson",t=>new W$e({id:t.id,date:t.date,iteration:t.iteration,exerciseId:t.exercise,slotEntryId:t.slot_entry,sessionId:t.session,routineId:t.routine,repetitionsUnitId:t.repetitions_unit,repetitions:t.repetitions===null?null:Number.parseFloat(t.repetitions),repetitionsTarget:t.repetitions_target===null?null:Number.parseFloat(t.repetitions_target),weightUnitId:t.weight_unit,weight:t.weight===null?null:Number.parseFloat(t.weight),weightTarget:t.weight_target===null?null:Number.parseFloat(t.weight_target),rir:t.rir===null?null:Number.parseFloat(t.rir),rirTarget:t.rir_target===null?null:Number.parseFloat(t.rir_target),restTime:t.rest,restTimeTarget:t.rest_target}));Ce(this,"toJson",t=>({id:t.id,iteration:t.iteration,date:t.date.toISOString(),slot_entry:t.slotEntryId,exercise:t.exerciseId,routine:t.routineId,repetitions_unit:t.repetitionUnitId,repetitions:t.repetitions,repetitions_target:t.repetitionsTarget,weight_unit:t.weightUnitId,weight:t.weight,weight_target:t.weightTarget,rir:t.rir,rir_target:t.rirTarget,rest:t.restTime,rest_target:t.restTimeTarget}))}}const Wq=1e3,uL="1",cg="2",dL="3";class K$e{constructor(t){Ce(this,"id");Ce(this,"dayId");Ce(this,"routineId");Ce(this,"date");Ce(this,"notes");Ce(this,"impression");Ce(this,"timeStart");Ce(this,"timeEnd");Ce(this,"dayObj");Ce(this,"logs",[]);this.id=t.id,this.dayId=t.dayId,this.routineId=t.routineId,this.date=t.date,this.notes=t.notes,this.impression=t.impression,this.timeStart=t.timeStart,this.timeEnd=t.timeEnd,t.dayObj&&(this.dayObj=t.dayObj),this.logs=t.logs??[]}get impressionString(){switch(this.impression){case uL:return hr.t("routines.impressionBad");case cg:return hr.t("routines.impressionNeutral");case dL:return hr.t("routines.impressionGood");default:return""}}get textRepresentation(){const t=this.timeStart&&this.timeEnd?`${this.timeStart.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} - ${this.timeEnd.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} /`:"",n=this.notes??"";return`${this.impressionString} ${t} ${n}`}}class gw{constructor(){Ce(this,"fromJson",t=>new K$e({id:t.id,dayId:t.day,routineId:t.routine,date:new Date(t.date),notes:t.notes!==void 0?t.notes:null,impression:t.impression,timeStart:t.time_start!==void 0?VN(t.time_start):null,timeEnd:t.time_end!==void 0?VN(t.time_end):null,dayObj:t.dayObj,logs:t.logs}));Ce(this,"toJson",t=>({id:t.id,day:t.dayId,date:Zn(t.date),routine:t.routineId,notes:t.notes,impression:t.impression,time_start:Dx(t.timeStart),time_end:Dx(t.timeEnd)}))}}class Y$e{constructor(t,n){this.session=t,this.logs=n}}class Q$e{constructor(){Ce(this,"fromJson",t=>new Y$e(new gw().fromJson(t.session),t.logs.map(n=>new RI().fromJson(n))))}}class X$e{constructor(t,n){Ce(this,"id");Ce(this,"name");this.id=t,this.name=n}}class J$e{fromJson(t){return new X$e(t.id,t.name)}toJson(t){return{}}}class Z$e{constructor(t,n){Ce(this,"id");Ce(this,"name");this.id=t,this.name=n}}class eNe{fromJson(t){return new Z$e(t.id,t.name)}toJson(t){return{}}}const tNe="setting-repetitionunit",nNe="setting-weightunit",Yoe=async()=>{const e=ft(tNe),{data:t}=await it.get(e,{headers:ht()}),n=new J$e;return t.results.map(r=>n.fromJson(r))},Qoe=async()=>{const e=ft(nNe),{data:t}=await it.get(e,{headers:ht()}),n=new eNe;return t.results.map(r=>n.fromJson(r))},rNe="structure",oNe="logs",iNe="stats",aNe="date-sequence-display",D1={},Xoe=async e=>{var f;const t=await it.get(ft(St.ROUTINE,{id:e}),{headers:ht()}),n=vv.fromJson(t.data),r=await Promise.all([Yoe(),Qoe(),mNe(e),gNe(e)]),o=r[0],i=r[1],a=r[2],s=r[3],l=new Set;for(const h of a.filter(m=>m.day!==null&&m.iteration===1))for(const m of h.slots)for(const g of m.setConfigs)l.add(g.exerciseId);const c=Array.from(l).map(h=>pv(h));(await Promise.all(c)).forEach(h=>{D1[h.id]=h});for(const h of a)for(const m of h.slots){for(const g of m.setConfigs)g.exercise=D1[g.exerciseId],g.repetitionsUnitId!==null&&(g.repetitionsUnit=o.find(y=>y.id===g.repetitionsUnitId)??null),g.weightUnitId!==null&&(g.weightUnit=i.find(y=>y.id===g.weightUnitId)??null);for(const g of m.exerciseIds)(f=m.exercises)==null||f.push(D1[g])}for(const h of s)for(const m of h.slots)for(const g of m.entries)g.exercise=D1[g.exerciseId],g.repetitionUnitId!==null&&(g.repetitionUnit=o.find(y=>y.id===g.repetitionUnitId)??null),g.weightUnitId!==null&&(g.weightUnit=i.find(y=>y.id===g.weightUnitId)??null);return n.dayData=a,n.days=s,n},sNe=async()=>{const e=ft(St.ROUTINE,{query:{limit:"1",is_template:!1}}),t=await it.get(e,{headers:ht()});return t.data.count===0?null:await Xoe(t.data.results[0].id)},lNe=async e=>await Xoe(e),cNe=async()=>{const e=ft(St.ROUTINE,{query:{is_public:!1}});return(await it.get(e,{headers:ht()})).data.results.map(n=>vv.fromJson(n))},uNe=async()=>{const e=ft(St.PRIVATE_TEMPLATE);return(await it.get(e,{headers:ht()})).data.results.map(n=>vv.fromJson(n))},dNe=async()=>{const e=ft(St.PUBLIC_TEMPLATE);return(await it.get(e,{headers:ht()})).data.results.map(n=>vv.fromJson(n))},fNe=async e=>{const t=await it.post(ft(St.ROUTINE),e,{headers:ht()});return vv.fromJson(t.data)},pNe=async e=>{const t=await it.patch(ft(St.ROUTINE,{id:e.id}),e,{headers:ht()});return vv.fromJson(t.data)},hNe=async e=>(await it.delete(ft(St.ROUTINE,{id:e}),{headers:ht()})).status,mNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:aNe}),{headers:ht()}),n=new q$e;return t.data.map(r=>n.fromJson(r))},gNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:rNe}),{headers:ht()}),n=new TI;return t.data.days.map(r=>n.fromJson(r))},yNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:oNe}),{headers:ht()}),n=new Q$e;return t.data.map(r=>n.fromJson(r))},vNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:iNe}),{headers:ht()});return new N2e().fromJson(t.data)};class bNe{constructor(t,n,r,o){Ce(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class DI{fromJson(t){return new bNe(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class xNe{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class kI{fromJson(t){return new xNe(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}async function*xh(e,t){for(t==null&&(t=ht());;){const r=(await it.get(e,{headers:t})).data;if(yield r.results,e=r.next,!e)break}}const yw="measurement-category",vw="measurement",SNe=async e=>{const{filtersetQueryCategories:t={},filtersetQueryEntries:n={}}=e||{},r=new DI,o=new kI,i=[];for await(const c of xh(ft(yw,{query:{...t}}),ht()))for(const u of c)i.push(r.fromJson(u));const a=i.map(async c=>{const u=[],f=ft(vw,{query:{category:c.id,...n}});for await(const h of xh(f,ht()))for(const m of h)u.push(o.fromJson(m));return u}),s=await Promise.all(a);let l;return s.forEach(c=>{c.length>0&&(l=c[0].category,i.findLast(u=>u.id===l).entries=c)}),i},wNe=async e=>{const{data:t}=await it.get(ft(yw,{id:e}),{headers:ht()}),n=new DI().fromJson(t),r=new kI,o=[],i=ft(vw,{query:{category:n.id}});for await(const a of xh(i,ht()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},CNe=async e=>{const t=await it.post(ft(yw),{name:e.name,unit:e.unit},{headers:ht()});return new DI().fromJson(t.data)},ENe=async e=>{const t=await it.patch(ft(yw,{id:e.id}),{name:e.name,unit:e.unit},{headers:ht()});return new DI().fromJson(t.data)},TNe=async e=>{await it.delete(ft(yw,{id:e}),{headers:ht()})},ONe=async e=>{await it.delete(ft(vw,{id:e}),{headers:ht()})},INe=async e=>{const t=await it.patch(ft(vw,{id:e.id}),{date:Zn(e.date),value:e.value,notes:e.notes},{headers:ht()});return new kI().fromJson(t.data)},PNe=async e=>{const t=await it.post(ft(vw),{category:e.categoryId,date:Zn(e.date),value:e.value,notes:e.notes},{headers:ht()});return new kI().fromJson(t.data)};class ANe{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class MNe{fromJson(t){return new ANe(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class RNe{constructor(t,n,r,o,i,a,s,l,c,u,f,h,m=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=f,this.sodium=h,this.image=m}}class Joe{fromJson(t){return new RNe(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new MNe().fromJson(t.image))}}const DNe=async e=>{const{data:t}=await it.get(ft(St.INGREDIENT_PATH,{id:e}),{headers:ht()});return new Joe().fromJson(t)},Zoe=async e=>{if(e.length===0)return[];const t=ft(St.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new Joe,r=[];for await(const o of xh(t,ht()))for(const i of o)r.push(n.fromJson(i));return r},kNe=async(e,t,n=!0)=>{const r=[t];t!==uy&&n&&r.push(uy);const o=ft(St.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await it.get(o);return i.suggestions};class _Ne{constructor(t,n,r,o,i,a,s){Ce(this,"ingredient",null);Ce(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?qa.fromIngredient(this.ingredient,this.amount,this.weightUnit):new qa}}class zB{fromJson(t){return new _Ne(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}const $Ne=async e=>{const t=await it.post(ft(St.MEAL_ITEM),e,{headers:ht()});return new zB().fromJson(t.data)},NNe=async e=>{const t=await it.patch(ft(St.MEAL_ITEM,{id:e.id}),e,{headers:ht()});return new zB().fromJson(t.data)},LNe=async e=>{await it.delete(ft(St.MEAL_ITEM,{id:e}),{headers:ht()})};class FNe{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class jNe{fromJson(t){return new FNe(t.id,parseFloat(t.amount),t.gram)}}const eie=async e=>{if(e===null)return null;const{data:t}=await it.get(ft(St.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:ht()});return new jNe().fromJson(t)},BNe=async e=>{const t=await it.post(ft(St.MEAL),e,{headers:ht()});return new xB().fromJson(t.data)},zNe=async e=>{const t=await it.patch(ft(St.MEAL,{id:e.id}),e,{headers:ht()});return new xB().fromJson(t.data)},VNe=async e=>{await it.delete(ft(St.MEAL,{id:e}),{headers:ht()})},HNe=async e=>{let t=[];const n=new xB,r=new zB,{data:o}=await it.get(ft(St.MEAL,{query:{plan:e}}),{headers:ht()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await it.get(ft(St.MEAL_ITEM,{query:{meal:a.id}}),{headers:ht()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await Zoe(t);for(const u of l)u.weightUnit=await eie(u.weightUnitId),u.ingredient=c.find(f=>f.id===u.ingredientId);a.items=l}return i},UNe=async e=>(await it.delete(ft(St.WORKOUT_LOG,{id:e}),{headers:ht()})).status,GNe=async e=>{const t=new RI,n=await it.patch(ft(St.WORKOUT_LOG,{id:e.id}),t.toJson(e),{headers:ht()});return t.fromJson(n.data)},qNe=async e=>{const t=new RI,n=[];for(const r of e){const o=await it.post(ft(St.WORKOUT_LOG),{...r},{headers:ht()});n.push(t.fromJson(o.data))}return n},WNe=async e=>{const t=await it.patch(ft(St.SLOT_ENTRY,{id:e.id}),e,{headers:ht()});return RB.fromJson(t.data)},KNe=async e=>{await it.delete(ft(St.SLOT_ENTRY,{id:e}),{headers:ht()})},YNe=async e=>{const t=await it.post(ft(St.SLOT_ENTRY),e,{headers:ht()});return RB.fromJson(t.data)},QNe=async e=>{const t=await it.patch(ft(St.DAY,{id:e.id}),e,{headers:ht()});return new TI().fromJson(t.data)},XNe=async e=>{for(const t of e)await it.patch(ft(St.DAY,{id:t.id}),{order:t.order},{headers:ht()})},JNe=async e=>{const t=await it.post(ft(St.DAY),e,{headers:ht()});return new TI().fromJson(t.data)},ZNe=async e=>{await it.delete(ft(St.DAY,{id:e}),{headers:ht()})},eLe=async e=>{const t=await it.post(ft(St.SLOT),e,{headers:ht()});return new DB().fromJson(t.data)},tLe=async e=>{const t=await it.patch(ft(St.SLOT,{id:e.id}),e,{headers:ht()});return new DB().fromJson(t.data)},nLe=async e=>{for(const t of e)await it.patch(ft(St.SLOT,{id:t.id}),{order:t.order},{headers:ht()})},rLe=async e=>{await it.delete(ft(St.SLOT,{id:e}),{headers:ht()})},oLe=async({values:e,maxValues:t})=>{const n=async r=>{const{toAdd:o,toEdit:i,toDelete:a,apiPath:s}=r;for(const l of o)await tc(l,s);for(const l of i)await ec(l,s);for(const l of a)await Vc(l,s)};e!==void 0&&await n(e),t!==void 0&&await n(t)},ec=async(e,t)=>{const n=await it.patch(ft(t,{id:e.id}),e,{headers:ht()});return new MB().fromJson(n.data)},tc=async(e,t)=>{const n=await it.post(ft(t),e,{headers:ht()});return new MB().fromJson(n.data)},Vc=async(e,t)=>await it.delete(ft(t,{id:e}),{headers:ht()}),iLe=async e=>await ec(e,St.WEIGHT_CONFIG),aLe=async e=>await tc(e,St.WEIGHT_CONFIG),sLe=async e=>await Vc(e,St.WEIGHT_CONFIG),lLe=async e=>await ec(e,St.MAX_WEIGHT_CONFIG),cLe=async e=>await tc(e,St.MAX_WEIGHT_CONFIG),uLe=async e=>await Vc(e,St.MAX_WEIGHT_CONFIG),dLe=async e=>await ec(e,St.REPETITIONS_CONFIG),fLe=async e=>await tc(e,St.REPETITIONS_CONFIG),pLe=async e=>await Vc(e,St.REPETITIONS_CONFIG),hLe=async e=>await ec(e,St.MAX_REPS_CONFIG),mLe=async e=>await tc(e,St.MAX_REPS_CONFIG),gLe=async e=>await Vc(e,St.MAX_REPS_CONFIG),yLe=async e=>await ec(e,St.NR_OF_SETS_CONFIG),vLe=async e=>await tc(e,St.NR_OF_SETS_CONFIG),bLe=async e=>await Vc(e,St.NR_OF_SETS_CONFIG),xLe=async e=>await ec(e,St.MAX_NR_OF_SETS_CONFIG),SLe=async e=>await tc(e,St.MAX_NR_OF_SETS_CONFIG),wLe=async e=>await ec(e,St.RIR_CONFIG),CLe=async e=>await tc(e,St.RIR_CONFIG),ELe=async e=>await Vc(e,St.RIR_CONFIG),TLe=async e=>await ec(e,St.MAX_RIR_CONFIG),OLe=async e=>await tc(e,St.MAX_RIR_CONFIG),ILe=async e=>await Vc(e,St.MAX_RIR_CONFIG),PLe=async e=>await ec(e,St.REST_CONFIG),ALe=async e=>await tc(e,St.REST_CONFIG),MLe=async e=>await Vc(e,St.REST_CONFIG),RLe=async e=>await ec(e,St.MAX_REST_CONFIG),DLe=async e=>await tc(e,St.MAX_REST_CONFIG),kLe=async e=>await Vc(e,St.MAX_REST_CONFIG),_Le=async e=>{const t=await it.get(ft(St.SESSION,{query:e}),{headers:ht()});return t.data.count===1?new gw().fromJson(t.data.results[0]):null},$Le=async e=>{const{filtersetQuerySessions:t={},filtersetQueryLogs:n={}}=e||{},r=new gw,o=new RI,i=[],a=[],s={};for await(const l of xh(ft(St.WORKOUT_LOG,{query:{limit:KN,...n}}),ht()))for(const c of l)a.push(o.fromJson(c));for(const l of a)s[l.exerciseId]||(s[l.exerciseId]=await pv(l.exerciseId)),l.exerciseObj=s[l.exerciseId];for await(const l of xh(ft(St.SESSION,{query:{limit:KN,...t}}),ht()))for(const c of l){const u=r.fromJson(c);u.logs=a.filter(f=>f.sessionId===u.id),i.push(u)}return i},NLe=async e=>{const t=await it.post(ft(St.SESSION),e,{headers:ht()});return new gw().fromJson(t.data)},LLe=async e=>{const t=await it.patch(ft(St.SESSION,{id:e.id}),e,{headers:ht()});return new gw().fromJson(t.data)};class FLe{constructor(t,n,r,o,i,a,s,l,c){Ce(this,"ingredient",null);Ce(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?qa.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new qa)}}class VB{fromJson(t){return new FLe(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const tie=async e=>{const t=new VB,{filtersetQuery:n={},loadUnit:r=!0,loadIngredient:o=!0}=e||{},i=ft(St.NUTRITIONAL_DIARY,{query:{limit:KN,...n}}),a=[];for await(const s of xh(i,ht()))for(const l of s){const c=t.fromJson(l);r&&(c.weightUnit=await eie(c.weightUnitId)),o&&(c.ingredient=await DNe(c.ingredientId)),a.push(c)}return a},nie=async e=>{const t=await it.post(ft(St.NUTRITIONAL_DIARY),e,{headers:ht()});return new VB().fromJson(t.data)},jLe=async e=>{const t=await it.patch(ft(St.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:ht()});return new VB().fromJson(t.data)};class BLe{constructor(t){Ce(this,"username");Ce(this,"email");Ce(this,"emailVerified");Ce(this,"dateJoined");Ce(this,"isTrustworthy");Ce(this,"useMetric");Ce(this,"height");Ce(this,"weightRounding");Ce(this,"repetitionsRounding");this.username=t.username,this.email=t.email,this.emailVerified=t.emailVerified,this.dateJoined=t.dateJoined,this.isTrustworthy=t.isTrustworthy,this.useMetric=t.useMetric,this.height=t.height,this.weightRounding=t.weightRounding,this.repetitionsRounding=t.repetitionsRounding}}class rie{constructor(){Ce(this,"fromJson",t=>new BLe({username:t.username,email:t.email,emailVerified:t.email_verified,dateJoined:new Date(t.date_joined),isTrustworthy:t.is_trustworthy,useMetric:t.weight_unit==="kg",height:t.height,weightRounding:t.weight_rounding!==null?parseFloat(t.weight_rounding):null,repetitionsRounding:t.repetitions_rounding!==null?parseFloat(t.repetitions_rounding):null}));Ce(this,"toJson",t=>({email:t.email,height:t.height,weight_unit:t.useMetric?"kg":"lb",weight_rounding:t.weightRounding,repetitions_rounding:t.repetitionsRounding}))}}const zLe="userprofile",VLe=async()=>{const e=ft(zLe),t=new rie;try{const n=await it.get(e,{headers:ht()});return t.fromJson(n.data)}catch{return null}},HLe=async e=>{const t=await it.post(ft(St.API_PROFILE_PATH),e,{headers:ht()});return new rie().fromJson(t.data)},bv="nutritionplan",ULe=async()=>{const{data:e}=await it.get(ft(bv),{headers:ht()});return e.results.map(t=>ly.fromJson(t))},GLe=async()=>{const{data:e}=await it.get(ft(bv,{query:{limit:"1"}}),{headers:ht()});return e.count===0?null:await HB(e.results[0].id)},HB=async(e,t)=>{if(e===null)return null;const{filtersetQueryLogs:n={}}=t||{},{data:r}=await it.get(ft(bv,{id:e}),{headers:ht()}),o=[],i=ly.fromJson(r),a=await Promise.all([HNe(e),tie({filtersetQuery:{plan:e,...n}})]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{o.includes(l.ingredientId)||o.push(l.ingredientId)});const s=await Zoe(o);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},qLe=async e=>{const t=await it.post(ft(bv),ly.toJson(e),{headers:ht()});return ly.fromJson(t.data)},WLe=async e=>{const t=await it.patch(ft(bv,{id:e.id}),ly.toJson(e),{headers:ht()});return ly.fromJson(t.data)},KLe=async e=>{await it.delete(ft(bv,{id:e}),{headers:ht()})};function YLe(){return yr({queryKey:[st.NUTRITIONAL_PLANS],queryFn:()=>ULe()})}function QLe(){return yr({queryKey:[st.NUTRITIONAL_PLAN,"last"],queryFn:()=>GLe()})}function XLe(e){return yr({queryKey:[st.NUTRITIONAL_PLAN,e],queryFn:()=>HB(e)})}function JLe(e,t,n=!0){return yr({queryKey:[st.NUTRITIONAL_PLAN,e,t],queryFn:()=>HB(e,{filtersetQueryLogs:{datetime__eq:Zn(new Date(t))}}),enabled:n})}const ZLe=()=>{const e=Mt();return Dt({mutationFn:t=>qLe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[st.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN]})}})},eFe=e=>{const t=Mt();return Dt({mutationFn:n=>KLe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},tFe=e=>{const t=Mt();return Dt({mutationFn:n=>WLe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLANS]})}})},nFe=e=>yr({queryFn:()=>tie(e),queryKey:[st.NUTRITIONAL_PLAN_DIARY,JSON.stringify(e||{})]}),rFe=e=>{const t=Mt();return Dt({mutationFn:n=>nie(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})})},oie=e=>{const t=Mt();return Dt({mutationFn:n=>Promise.all(n.map(r=>nie(r))),onSuccess:()=>t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})})},oFe=e=>{const t=Mt();return Dt({mutationFn:n=>jLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})})},iFe=e=>{const t=Mt();return Dt({mutationFn:n=>BNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},aFe=e=>{const t=Mt();return Dt({mutationFn:n=>VNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},sFe=e=>{const t=Mt();return Dt({mutationFn:n=>zNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},lFe=e=>{const t=Mt();return Dt({mutationFn:n=>$Ne(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},cFe=e=>{const t=Mt();return Dt({mutationFn:n=>NNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},uFe=e=>{const t=Mt();return Dt({mutationFn:n=>LNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})};function _i(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function iie(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function $n(e,t){return iie(e,t,"gram")}function JR(e,t){return iie(e,t,"percent")}const Lg=e=>{const{i18n:t}=je(),n=e.planned>0;return Q(Tt,{children:[S(Cne,{variant:"determinate",value:e.percentage<100?e.percentage:100}),Q(at,{variant:"caption",children:[e.title," — ",$n(e.logged,t.language),n&&Q(Tt,{children:[" / ",$n(e.planned,t.language)]})]})]})};var ZR,Kq;function Aa(){if(Kq)return ZR;Kq=1;var e=Array.isArray;return ZR=e,ZR}var eD,Yq;function aie(){if(Yq)return eD;Yq=1;var e=typeof f1=="object"&&f1&&f1.Object===Object&&f1;return eD=e,eD}var tD,Qq;function Hc(){if(Qq)return tD;Qq=1;var e=aie(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return tD=n,tD}var nD,Xq;function bw(){if(Xq)return nD;Xq=1;var e=Hc(),t=e.Symbol;return nD=t,nD}var rD,Jq;function dFe(){if(Jq)return rD;Jq=1;var e=bw(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(a){var s=n.call(a,o),l=a[o];try{a[o]=void 0;var c=!0}catch{}var u=r.call(a);return c&&(s?a[o]=l:delete a[o]),u}return rD=i,rD}var oD,Zq;function fFe(){if(Zq)return oD;Zq=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return oD=n,oD}var iD,eW;function Zu(){if(eW)return iD;eW=1;var e=bw(),t=dFe(),n=fFe(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?o:r:i&&i in Object(s)?t(s):n(s)}return iD=a,iD}var aD,tW;function ed(){if(tW)return aD;tW=1;function e(t){return t!=null&&typeof t=="object"}return aD=e,aD}var sD,nW;function xv(){if(nW)return sD;nW=1;var e=Zu(),t=ed(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return sD=r,sD}var lD,rW;function UB(){if(rW)return lD;rW=1;var e=Aa(),t=xv(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,a){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||a!=null&&i in Object(a)}return lD=o,lD}var cD,oW;function jf(){if(oW)return cD;oW=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return cD=e,cD}var uD,iW;function GB(){if(iW)return uD;iW=1;var e=Zu(),t=jf(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==r||l==o||l==n||l==i}return uD=a,uD}var dD,aW;function pFe(){if(aW)return dD;aW=1;var e=Hc(),t=e["__core-js_shared__"];return dD=t,dD}var fD,sW;function hFe(){if(sW)return fD;sW=1;var e=pFe(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return fD=n,fD}var pD,lW;function sie(){if(lW)return pD;lW=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return pD=n,pD}var hD,cW;function mFe(){if(cW)return hD;cW=1;var e=GB(),t=hFe(),n=jf(),r=sie(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=RegExp("^"+l.call(c).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!n(h)||t(h))return!1;var m=e(h)?u:i;return m.test(r(h))}return hD=f,hD}var mD,uW;function gFe(){if(uW)return mD;uW=1;function e(t,n){return t==null?void 0:t[n]}return mD=e,mD}var gD,dW;function Vh(){if(dW)return gD;dW=1;var e=mFe(),t=gFe();function n(r,o){var i=t(r,o);return e(i)?i:void 0}return gD=n,gD}var yD,fW;function _I(){if(fW)return yD;fW=1;var e=Vh(),t=e(Object,"create");return yD=t,yD}var vD,pW;function yFe(){if(pW)return vD;pW=1;var e=_I();function t(){this.__data__=e?e(null):{},this.size=0}return vD=t,vD}var bD,hW;function vFe(){if(hW)return bD;hW=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return bD=e,bD}var xD,mW;function bFe(){if(mW)return xD;mW=1;var e=_I(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return r.call(a,i)?a[i]:void 0}return xD=o,xD}var SD,gW;function xFe(){if(gW)return SD;gW=1;var e=_I(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var i=this.__data__;return e?i[o]!==void 0:n.call(i,o)}return SD=r,SD}var wD,yW;function SFe(){if(yW)return wD;yW=1;var e=_I(),t="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&o===void 0?t:o,this}return wD=n,wD}var CD,vW;function wFe(){if(vW)return CD;vW=1;var e=yFe(),t=vFe(),n=bFe(),r=xFe(),o=SFe();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,CD=i,CD}var ED,bW;function CFe(){if(bW)return ED;bW=1;function e(){this.__data__=[],this.size=0}return ED=e,ED}var TD,xW;function qB(){if(xW)return TD;xW=1;function e(t,n){return t===n||t!==t&&n!==n}return TD=e,TD}var OD,SW;function $I(){if(SW)return OD;SW=1;var e=qB();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return OD=t,OD}var ID,wW;function EFe(){if(wW)return ID;wW=1;var e=$I(),t=Array.prototype,n=t.splice;function r(o){var i=this.__data__,a=e(i,o);if(a<0)return!1;var s=i.length-1;return a==s?i.pop():n.call(i,a,1),--this.size,!0}return ID=r,ID}var PD,CW;function TFe(){if(CW)return PD;CW=1;var e=$I();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return PD=t,PD}var AD,EW;function OFe(){if(EW)return AD;EW=1;var e=$I();function t(n){return e(this.__data__,n)>-1}return AD=t,AD}var MD,TW;function IFe(){if(TW)return MD;TW=1;var e=$I();function t(n,r){var o=this.__data__,i=e(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return MD=t,MD}var RD,OW;function NI(){if(OW)return RD;OW=1;var e=CFe(),t=EFe(),n=TFe(),r=OFe(),o=IFe();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,RD=i,RD}var DD,IW;function WB(){if(IW)return DD;IW=1;var e=Vh(),t=Hc(),n=e(t,"Map");return DD=n,DD}var kD,PW;function PFe(){if(PW)return kD;PW=1;var e=wFe(),t=NI(),n=WB();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return kD=r,kD}var _D,AW;function AFe(){if(AW)return _D;AW=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return _D=e,_D}var $D,MW;function LI(){if(MW)return $D;MW=1;var e=AFe();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return $D=t,$D}var ND,RW;function MFe(){if(RW)return ND;RW=1;var e=LI();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return ND=t,ND}var LD,DW;function RFe(){if(DW)return LD;DW=1;var e=LI();function t(n){return e(this,n).get(n)}return LD=t,LD}var FD,kW;function DFe(){if(kW)return FD;kW=1;var e=LI();function t(n){return e(this,n).has(n)}return FD=t,FD}var jD,_W;function kFe(){if(_W)return jD;_W=1;var e=LI();function t(n,r){var o=e(this,n),i=o.size;return o.set(n,r),this.size+=o.size==i?0:1,this}return jD=t,jD}var BD,$W;function KB(){if($W)return BD;$W=1;var e=PFe(),t=MFe(),n=RFe(),r=DFe(),o=kFe();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,BD=i,BD}var zD,NW;function lie(){if(NW)return zD;NW=1;var e=KB(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var a=arguments,s=o?o.apply(this,a):a[0],l=i.cache;if(l.has(s))return l.get(s);var c=r.apply(this,a);return i.cache=l.set(s,c)||l,c};return i.cache=new(n.Cache||e),i}return n.Cache=e,zD=n,zD}var VD,LW;function _Fe(){if(LW)return VD;LW=1;var e=lie(),t=500;function n(r){var o=e(r,function(a){return i.size===t&&i.clear(),a}),i=o.cache;return o}return VD=n,VD}var HD,FW;function $Fe(){if(FW)return HD;FW=1;var e=_Fe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(a,s,l,c){i.push(l?c.replace(n,"$1"):s||a)}),i});return HD=r,HD}var UD,jW;function YB(){if(jW)return UD;jW=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=Array(o);++r<o;)i[r]=n(t[r],r,t);return i}return UD=e,UD}var GD,BW;function NFe(){if(BW)return GD;BW=1;var e=bw(),t=YB(),n=Aa(),r=xv(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function a(s){if(typeof s=="string")return s;if(n(s))return t(s,a)+"";if(r(s))return i?i.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return GD=a,GD}var qD,zW;function cie(){if(zW)return qD;zW=1;var e=NFe();function t(n){return n==null?"":e(n)}return qD=t,qD}var WD,VW;function uie(){if(VW)return WD;VW=1;var e=Aa(),t=UB(),n=$Fe(),r=cie();function o(i,a){return e(i)?i:t(i,a)?[i]:n(r(i))}return WD=o,WD}var KD,HW;function FI(){if(HW)return KD;HW=1;var e=xv();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return KD=t,KD}var YD,UW;function QB(){if(UW)return YD;UW=1;var e=uie(),t=FI();function n(r,o){o=e(o,r);for(var i=0,a=o.length;r!=null&&i<a;)r=r[t(o[i++])];return i&&i==a?r:void 0}return YD=n,YD}var QD,GW;function die(){if(GW)return QD;GW=1;var e=QB();function t(n,r,o){var i=n==null?void 0:e(n,r);return i===void 0?o:i}return QD=t,QD}var LFe=die();const Ja=Gn(LFe);var XD,qW;function FFe(){if(qW)return XD;qW=1;function e(t){return t==null}return XD=e,XD}var jFe=FFe();const on=Gn(jFe);var JD,WW;function BFe(){if(WW)return JD;WW=1;var e=Zu(),t=Aa(),n=ed(),r="[object String]";function o(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return JD=o,JD}var zFe=BFe();const Sh=Gn(zFe);var VFe=GB();const rn=Gn(VFe);var HFe=jf();const Sv=Gn(HFe);var ZD={exports:{}},cr={};/**
+`):" "+B6(i[0]):"as no adapter specified";throw new Sn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:zN};function zR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new dv(null,e)}function z6(e){return zR(e),e.headers=Ia.from(e.headers),e.data=BR.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fre.getAdapter(e.adapter||dw.adapter)(e).then(function(r){return zR(e),r.data=BR.call(e,e.transformResponse,r),r.headers=Ia.from(r.headers),r},function(r){return are(r)||(zR(e),r&&r.response&&(r.response.data=BR.call(e,e.transformResponse,r.response),r.response.headers=Ia.from(r.response.headers))),Promise.reject(r)})}const pre="1.9.0",SI={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{SI[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const V6={};SI.transitional=function(t,n,r){function o(i,a){return"[Axios v"+pre+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Sn(o(a," has been removed"+(n?" in "+n:"")),Sn.ERR_DEPRECATED);return n&&!V6[a]&&(V6[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};SI.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function kDe(e,t,n){if(typeof e!="object")throw new Sn("options must be an object",Sn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new Sn("option "+i+" must be "+l,Sn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Sn("Unknown option "+i,Sn.ERR_BAD_OPTION)}}const bE={assertOptions:kDe,validators:SI},dc=bE.validators;let ih=class{constructor(t){this.defaults=t||{},this.interceptors={request:new k6,response:new k6}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
+`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=bh(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&bE.assertOptions(r,{silentJSONParsing:dc.transitional(dc.boolean),forcedJSONParsing:dc.transitional(dc.boolean),clarifyTimeoutError:dc.transitional(dc.boolean)},!1),o!=null&&(Ue.isFunction(o)?n.paramsSerializer={serialize:o}:bE.assertOptions(o,{encode:dc.function,serialize:dc.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bE.assertOptions(n,{baseUrl:dc.spelling("baseURL"),withXsrfToken:dc.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Ue.merge(i.common,i[n.method]);i&&Ue.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Ia.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let u,f=0,p;if(!l){const g=[z6.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,c),p=g.length,u=Promise.resolve(n);f<p;)u=u.then(g[f++],g[f++]);return u}p=s.length;let m=n;for(f=0;f<p;){const g=s[f++],y=s[f++];try{m=g(m)}catch(v){y.call(this,v);break}}try{u=z6.call(this,m)}catch(g){return Promise.reject(g)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=bh(this.defaults,t);const n=lre(t.baseURL,t.url,t.allowAbsoluteUrls);return rre(n,t.params,t.paramsSerializer)}};Ue.forEach(["delete","get","head","options"],function(t){ih.prototype[t]=function(n,r){return this.request(bh(r||{},{method:t,url:n,data:(r||{}).data}))}});Ue.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(bh(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ih.prototype[t]=n(),ih.prototype[t+"Form"]=n(!0)});let _De=class hre{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new dv(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new hre(function(o){t=o}),cancel:t}}};function $De(e){return function(n){return e.apply(null,n)}}function NDe(e){return Ue.isObject(e)&&e.isAxiosError===!0}const VN={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(VN).forEach(([e,t])=>{VN[t]=e});function mre(e){const t=new ih(e),n=Gne(ih.prototype.request,t);return Ue.extend(n,ih.prototype,t,{allOwnKeys:!0}),Ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return mre(bh(e,o))},n}const it=mre(dw);it.Axios=ih;it.CanceledError=dv;it.CancelToken=_De;it.isCancel=are;it.VERSION=pre;it.toFormData=bI;it.AxiosError=Sn;it.Cancel=it.CanceledError;it.all=function(t){return Promise.all(t)};it.spread=$De;it.isAxiosError=NDe;it.mergeConfig=bh;it.AxiosHeaders=Ia;it.formToJSON=e=>ire(Ue.isHTMLForm(e)?new FormData(e):e);it.getAdapter=fre.getAdapter;it.HttpStatusCode=VN;it.default=it;const{Axios:dAt,AxiosError:fAt,CanceledError:pAt,isCancel:hAt,CancelToken:mAt,VERSION:gAt,all:yAt,Cancel:vAt,isAxiosError:bAt,spread:xAt,toFormData:SAt,AxiosHeaders:wAt,HttpStatusCode:CAt,formToJSON:EAt,getAdapter:TAt,mergeConfig:OAt}=it,$g={protein:4,carbohydrates:4,fat:9};class qa{constructor(t){Ce(this,"bodyWeight",0);Ce(this,"energy",0);Ce(this,"protein",0);Ce(this,"carbohydrates",0);Ce(this,"carbohydratesSugar",0);Ce(this,"fat",0);Ce(this,"fatSaturated",0);Ce(this,"fiber",0);Ce(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*$g.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*$g.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*$g.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new qa,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function Zn(e){return e.toISOString().split("T")[0]}function xa(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function rT(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function Dx(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function HN(e){if(e==null)return null;const[t,n]=e.split(":",2),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function LDe(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return Zn(t)}class gre{constructor(t,n,r,o){Ce(this,"items",[]);Ce(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return rT(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>xa(t.datetime,new Date))}get plannedNutritionalValues(){const t=new qa;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new qa;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class SB{fromJson(t){return new gre(t.id,t.order,HN(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:rT(t.time)}}}const xE=-1;class wI{constructor(t){Ce(this,"id");Ce(this,"creationDate");Ce(this,"start");Ce(this,"end");Ce(this,"description");Ce(this,"onlyLogging");Ce(this,"goalEnergy");Ce(this,"goalProtein");Ce(this,"goalCarbohydrates");Ce(this,"goalFiber");Ce(this,"goalSodium");Ce(this,"goalFat");Ce(this,"goalFatsSaturated");Ce(this,"meals",[]);Ce(this,"diaryEntries",[]);this.id=t.id??null,this.creationDate=t.creationDate??new Date,this.start=t.start??this.creationDate,this.end=t.end??null,this.description=t.description??"",this.onlyLogging=t.onlyLogging??!1,this.goalEnergy=t.goalEnergy??null,this.goalProtein=t.goalProtein??null,this.goalCarbohydrates=t.goalCarbohydrates??null,this.goalFiber=t.goalFiber??null,this.goalSodium=t.goalSodium??null,this.goalFat=t.goalFat??null,this.goalFatsSaturated=t.goalFatsSaturated??null}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new qa({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new qa;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>xa(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new qa};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new qa({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}copyWith(t){return new wI({id:t.id!==void 0?t.id:this.id,creationDate:t.creationDate!==void 0?t.creationDate:this.creationDate,start:t.start!==void 0?t.start:this.start,end:t.end!==void 0?t.end:this.end,description:t.description!==void 0?t.description:this.description,onlyLogging:t.onlyLogging!==void 0?t.onlyLogging:this.onlyLogging,goalEnergy:t.goalEnergy!==void 0?t.goalEnergy:this.goalEnergy,goalProtein:t.goalProtein!==void 0?t.goalProtein:this.goalProtein,goalCarbohydrates:t.goalCarbohydrates!==void 0?t.goalCarbohydrates:this.goalCarbohydrates,goalFiber:t.goalFiber!==void 0?t.goalFiber:this.goalFiber,goalSodium:t.goalSodium!==void 0?t.goalSodium:this.goalSodium,goalFat:t.goalFat!==void 0?t.goalFat:this.goalFat,goalFatsSaturated:t.goalFatsSaturated!==void 0?t.goalFatsSaturated:this.goalFatsSaturated})}pseudoMealOthers(t){const n=new gre(xE,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>xa(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new qa)}}class FDe{fromJson(t){return new wI({id:t.id,creationDate:new Date(t.creation_date),start:new Date(t.start),end:t.end!==null?new Date(t.end):null,description:t.description,onlyLogging:t.only_logging,goalEnergy:t.goal_energy,goalProtein:t.goal_protein,goalCarbohydrates:t.goal_carbohydrates,goalFiber:t.goal_fiber,goalSodium:null,goalFat:t.goal_fat,goalFatsSaturated:null})}toJson(t){return{...t.id!=null?{id:t.id}:{},start:Zn(t.start),end:t.end?Zn(t.end):null,description:t.description,only_logging:t.onlyLogging,goal_energy:t.goalEnergy,goal_protein:t.goalProtein,goal_carbohydrates:t.goalCarbohydrates,goal_fiber:t.goalFiber,goal_sodium:t.goalSodium,goal_fat:t.goalFat,goal_fats_saturated:t.goalFatsSaturated}}}const cy=new FDe;class yre{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class wB{fromJson(t){return new yre(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:Zn(t.date),weight:t.weight}}}const jDe="/static/react",CB="",BDe="",zDe=void 0;var SE={exports:{}},VDe=SE.exports,H6;function HDe(){return H6||(H6=1,function(e){(function(t){let n;function r(u,f){const p=u.charCodeAt(f);if(isNaN(p))throw new RangeError("Index "+f+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(p<55296||p>57343)return[u.charAt(f),f];if(p>=55296&&p<=56319){if(u.length<=f+1)return[" ",f];const g=u.charCodeAt(f+1);return g<56320||g>57343?[" ",f]:[u.charAt(f)+u.charAt(f+1),f+1]}if(f===0)return[" ",f];const m=u.charCodeAt(f-1);if(m<55296||m>56319)return[" ",f];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const f=unescape(encodeURIComponent(u+""));let p="";for(let m,g,y=0,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";f.charAt(y|0)||(v="=",y%1);p+=v.charAt(63&m>>8-y%1*8)){if(g=f.charCodeAt(y+=3/4),g>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");m=m<<8|g}return p}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,f){let p=s(u,f);if((f&&f.fallback!==void 0?f.fallback:o.defaults.fallback)===!0&&p===""){let g="";for(let y=0;y<u.length;y++){const v=r(u,y);y=v[1],g+=v[0]}p=s(n(g),f)}return p}const i={bg:{Й:"Y",й:"y",X:"H",x:"h",Ц:"Ts",ц:"ts",Щ:"Sht",щ:"sht",Ъ:"A",ъ:"a",Ь:"Y",ь:"y"},de:{Ä:"AE",ä:"ae",Ö:"OE",ö:"oe",Ü:"UE",ü:"ue"},sr:{đ:"dj",Đ:"DJ"},uk:{И:"Y",и:"y",Й:"Y",й:"y",Ц:"Ts",ц:"ts",Х:"Kh",х:"kh",Щ:"Shch",щ:"shch",Г:"H",г:"h"}};let a={};function s(u,f){if(typeof u!="string")throw new Error("slug() requires a string argument, received "+typeof u);typeof f=="string"&&(f={replacement:f}),f=f?Object.assign({},f):{},f.mode=f.mode||o.defaults.mode;const p=o.defaults.modes[f.mode],m=["replacement","multicharmap","charmap","remove","lower","trim"];for(let C,E=0,I=m.length;E<I;E++)C=m[E],f[C]=C in f?f[C]:p[C];const g=i[f.locale]||a;let y=[];for(const C in f.multicharmap){if(!Object.prototype.hasOwnProperty.call(f.multicharmap,C))continue;const E=C.length;y.indexOf(E)===-1&&y.push(E)}y=y.sort(function(C,E){return E-C});const v=f.mode==="rfc3986"?/[^\w\s\-.~]/:/[^A-Za-z0-9\s]/;let w="";for(let C,E=0,I=u.length;E<I;E++){C=u[E];let O=!1;for(let P=0;P<y.length;P++){const R=y[P],D=u.substr(E,R);if(f.multicharmap[D]){E+=R-1,C=f.multicharmap[D],O=!0;break}}O||(g[C]?C=g[C]:f.charmap[C]?C=f.charmap[C].replace(f.replacement," "):C.includes(f.replacement)?C=C.replace(f.replacement," "):C=C.replace(v,"")),w+=C}return f.remove&&(w=w.replace(f.remove,"")),f.trim&&(w=w.trim()),w=w.replace(/\s+/g,f.replacement),f.lower&&(w=w.toLowerCase()),w}const l={फ़:"Fi",ग़:"Ghi",ख़:"Khi",क़:"Qi",ड़:"ugDha",ढ़:"ugDhha",य़:"Yi",ज़:"Za",בִי:"i",בֵ:"e",בֵי:"e",בֶ:"e",בַ:"a",בָ:"a",בֹ:"o",וֹ:"o",בֻ:"u",וּ:"u",בּ:"b",כּ:"k",ךּ:"k",פּ:"p",שׁ:"sh",שׂ:"s",בְ:"e",חֱ:"e",חֲ:"a",חֳ:"o",בִ:"i"},c={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ő:"O",Ø:"O",Ō:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ő:"o",ø:"o",ō:"o",Œ:"OE",œ:"oe",ù:"u",ú:"u",û:"u",ü:"u",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",α:"a",β:"b",γ:"g",δ:"d",ε:"e",ζ:"z",η:"h",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"3",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"w",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"h",ώ:"w",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"H",Θ:"Th",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"3",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"W",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"H",Ώ:"W",Ϊ:"I",Ϋ:"Y",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"u",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"J",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"U",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"K",Ļ:"L",Ņ:"N",Ū:"U",أ:"a",إ:"i",ب:"b",ت:"t",ث:"th",ج:"g",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"d",ط:"t",ظ:"th",ع:"aa",غ:"gh",ف:"f",ق:"k",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"o",ي:"y",ء:"aa",ة:"a",آ:"a",ا:"a",پ:"p",ژ:"zh",گ:"g",چ:"ch",ک:"k",ی:"i",ė:"e",į:"i",ų:"u",Ė:"E",Į:"I",Ų:"U",ț:"t",Ț:"T",ţ:"t",Ţ:"T",ș:"s",Ș:"S",ă:"a",Ă:"A",Ạ:"A",Ả:"A",Ầ:"A",Ấ:"A",Ậ:"A",Ẩ:"A",Ẫ:"A",Ằ:"A",Ắ:"A",Ặ:"A",Ẳ:"A",Ẵ:"A",Ẹ:"E",Ẻ:"E",Ẽ:"E",Ề:"E",Ế:"E",Ệ:"E",Ể:"E",Ễ:"E",Ị:"I",Ỉ:"I",Ĩ:"I",Ọ:"O",Ỏ:"O",Ồ:"O",Ố:"O",Ộ:"O",Ổ:"O",Ỗ:"O",Ơ:"O",Ờ:"O",Ớ:"O",Ợ:"O",Ở:"O",Ỡ:"O",Ụ:"U",Ủ:"U",Ũ:"U",Ư:"U",Ừ:"U",Ứ:"U",Ự:"U",Ử:"U",Ữ:"U",Ỳ:"Y",Ỵ:"Y",Ỷ:"Y",Ỹ:"Y",Đ:"D",ạ:"a",ả:"a",ầ:"a",ấ:"a",ậ:"a",ẩ:"a",ẫ:"a",ằ:"a",ắ:"a",ặ:"a",ẳ:"a",ẵ:"a",ẹ:"e",ẻ:"e",ẽ:"e",ề:"e",ế:"e",ệ:"e",ể:"e",ễ:"e",ị:"i",ỉ:"i",ĩ:"i",ọ:"o",ỏ:"o",ồ:"o",ố:"o",ộ:"o",ổ:"o",ỗ:"o",ơ:"o",ờ:"o",ớ:"o",ợ:"o",ở:"o",ỡ:"o",ụ:"u",ủ:"u",ũ:"u",ư:"u",ừ:"u",ứ:"u",ự:"u",ử:"u",ữ:"u",ỳ:"y",ỵ:"y",ỷ:"y",ỹ:"y",đ:"d",Ә:"AE",ә:"ae",Ғ:"GH",ғ:"gh",Қ:"KH",қ:"kh",Ң:"NG",ң:"ng",Ү:"UE",ү:"ue",Ұ:"U",ұ:"u",Һ:"H",һ:"h",Ө:"OE",ө:"oe",ђ:"dj",ј:"j",љ:"lj",њ:"nj",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Љ:"Lj",Њ:"Nj",Ћ:"C",Џ:"Dz",nj:"nj",lj:"lj",Nj:"NJ",Lj:"LJ",अ:"a",आ:"aa",ए:"e",ई:"ii",ऍ:"ei",ऎ:"ae",ऐ:"ai",इ:"i",ओ:"o",ऑ:"oi",ऒ:"oii",ऊ:"uu",औ:"ou",उ:"u",ब:"B",भ:"Bha",च:"Ca",छ:"Chha",ड:"Da",ढ:"Dha",फ:"Fa",ग:"Ga",घ:"Gha",ग़:"Ghi",ह:"Ha",ज:"Ja",झ:"Jha",क:"Ka",ख:"Kha",ख़:"Khi",ल:"L",ळ:"Li",ऌ:"Li",ऴ:"Lii",ॡ:"Lii",म:"Ma",न:"Na",ङ:"Na",ञ:"Nia",ण:"Nae",ऩ:"Ni",ॐ:"oms",प:"Pa",क़:"Qi",र:"Ra",ऋ:"Ri",ॠ:"Ri",ऱ:"Ri",स:"Sa",श:"Sha",ष:"Shha",ट:"Ta",त:"Ta",ठ:"Tha",द:"Tha",थ:"Tha",ध:"Thha",ड़:"ugDha",ढ़:"ugDhha",व:"Va",य:"Ya",य़:"Yi",ज़:"Za",ə:"e",Ə:"E",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",ב:"v",גּ:"g",ג:"g",ד:"d",דּ:"d",ה:"h",ו:"v",ז:"z",ח:"h",ט:"t",י:"y",כ:"kh",ך:"kh",ל:"l",מ:"m",ם:"m",נ:"n",ן:"n",ס:"s",פ:"f",ף:"f",ץ:"ts",צ:"ts",ק:"k",ר:"r",תּ:"t",ת:"t"};o.charmap=Object.assign({},c),o.multicharmap=Object.assign({},l),o.defaults={charmap:o.charmap,mode:"pretty",modes:{rfc3986:{replacement:"-",remove:null,lower:!0,charmap:o.charmap,multicharmap:o.multicharmap,trim:!0},pretty:{replacement:"-",remove:null,lower:!0,charmap:o.charmap,multicharmap:o.multicharmap,trim:!0}},multicharmap:o.multicharmap,fallback:!0},o.reset=function(){o.defaults.modes.rfc3986.charmap=o.defaults.modes.pretty.charmap=o.charmap=o.defaults.charmap=Object.assign({},c),o.defaults.modes.rfc3986.multicharmap=o.defaults.modes.pretty.multicharmap=o.multicharmap=o.defaults.multicharmap=Object.assign({},l),a=""},o.extend=function(u){const f=Object.keys(u),p={},m={};for(let g=0;g<f.length;g++)f[g].length>1?p[f[g]]=u[f[g]]:m[f[g]]=u[f[g]];Object.assign(o.charmap,m),Object.assign(o.multicharmap,p)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(VDe)}(SE)),SE.exports}var UDe=HDe();const vre=Gn(UDe);function ft(e,t){t=t||{};const r=[t.server||BDe,"api","v2",e];if(t.id&&r.push(t.id.toString()),t.objectMethod&&r.push(t.objectMethod),r.push(""),t.query){const o=[];for(const i in t.query)Object.hasOwn(t.query,i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var Yt=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_EDIT=3]="ROUTINE_EDIT",e[e.ROUTINE_DETAIL_TABLE=4]="ROUTINE_DETAIL_TABLE",e[e.ROUTINE_EDIT_PROGRESSION=5]="ROUTINE_EDIT_PROGRESSION",e[e.ROUTINE_ADD=6]="ROUTINE_ADD",e[e.ROUTINE_LOGS_OVERVIEW=7]="ROUTINE_LOGS_OVERVIEW",e[e.ROUTINE_STATS_OVERVIEW=8]="ROUTINE_STATS_OVERVIEW",e[e.ROUTINE_PDF_TABLE=9]="ROUTINE_PDF_TABLE",e[e.ROUTINE_PDF_LOGS=10]="ROUTINE_PDF_LOGS",e[e.ROUTINE_ICAL=11]="ROUTINE_ICAL",e[e.ROUTINE_COPY=12]="ROUTINE_COPY",e[e.ROUTINE_ADD_LOG=13]="ROUTINE_ADD_LOG",e[e.TEMPLATE_DETAIL=14]="TEMPLATE_DETAIL",e[e.PRIVATE_TEMPLATE_OVERVIEW=15]="PRIVATE_TEMPLATE_OVERVIEW",e[e.PUBLIC_TEMPLATE_OVERVIEW=16]="PUBLIC_TEMPLATE_OVERVIEW",e[e.EXERCISE_DETAIL=17]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=18]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=19]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=20]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=21]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=22]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=23]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=24]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=25]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=26]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=27]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=28]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=29]="INGREDIENT_DETAIL",e[e.CALENDAR=30]="CALENDAR",e))(Yt||{});function on(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 4:return`/${r}/routine/${n.id}/table`;case 3:return`/${r}/routine/${n.id}/edit`;case 5:return`/${r}/routine/${n.id}/edit/progression/${n.id2}`;case 6:return`/${r}/routine/add`;case 12:return`/${r}/routine/${n.id}/copy`;case 9:return`/${r}/routine/${n.id}/pdf/table`;case 10:return`/${r}/routine/${n.id}/pdf/log`;case 11:return`/${r}/routine/${n.id}/ical`;case 7:return`/${r}/routine/${n.id}/logs`;case 8:return`/${r}/routine/${n.id}/statistics`;case 13:return`/${r}/routine/${n.id}/day/${n.id2}/add-logs`;case 30:return`/${r}/routine/calendar`;case 14:return`/${r}/routine/templates/${n.id}/view`;case 15:return`/${r}/routine/templates/overview/private`;case 16:return`/${r}/routine/templates/overview/public`;case 19:return`/${r}/exercise/contribute`;case 17:return n.slug?`/${r}/exercise/${n.id}/view/${vre(n.slug)}`:`/${r}/exercise/${n.id}/view`;case 18:return`/${r}/exercise/overview`;case 20:return`/${r}/weight/overview`;case 21:return`/${r}/weight/add`;case 22:return`/${r}/measurement/overview`;case 23:return`/${r}/measurement/category/${n.id}`;case 24:return`/${r}/nutrition/overview`;case 25:return`/${r}/nutrition/${n.id}/view`;case 28:return`/${r}/nutrition/${n.id}/${n.date}`;case 26:return`/${r}/nutrition/${n.id}/pdf`;case 27:return`/${r}/nutrition/${n.id}/copy`;case 29:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function GDe(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const o=n[r].trim();if(o.substring(0,e.length+1)===e+"="){t=decodeURIComponent(o.substring(e.length+1));break}}}return t}function ht(e){e=e||zDe;const t="csrftoken",n={};n["Content-Type"]="application/json",e&&(n.Authorization=`Token ${e}`);const r=GDe(t);return r!=null&&(n["X-CSRFToken"]=r),n}const CI="weightentry",qDe=async(e="")=>{const t=LDe(e),n=ft(CI,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await it.get(n,{headers:ht()});return r.results.map(o=>new wB().fromJson(o))},WDe=async e=>(await it.delete(ft(CI,{id:e}),{headers:ht()})).status,KDe=async e=>{const t=new wB,n=await it.patch(ft(CI,{id:e.id}),t.toJson(e),{headers:ht()});return t.fromJson(n)},YDe=async e=>{const t=new wB,n=await it.post(ft(CI),t.toJson(e),{headers:ht()});return t.fromJson(n.data)},gn=e=>typeof e=="string",t0=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},U6=e=>e==null?"":""+e,QDe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},XDe=/###/g,G6=e=>e&&e.indexOf("###")>-1?e.replace(XDe,"."):e,q6=e=>!e||gn(e),Z0=(e,t,n)=>{const r=gn(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(q6(e))return{};const i=G6(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return q6(e)?{}:{obj:e,k:G6(r[o])}},W6=(e,t,n)=>{const{obj:r,k:o}=Z0(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=Z0(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Z0(e,a,Object),s!=null&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},JDe=(e,t,n,r)=>{const{obj:o,k:i}=Z0(e,t,Object);o[i]=o[i]||[],o[i].push(n)},oT=(e,t)=>{const{obj:n,k:r}=Z0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ZDe=(e,t,n)=>{const r=oT(e,n);return r!==void 0?r:oT(t,n)},bre=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?gn(e[r])||e[r]instanceof String||gn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):bre(e[r],t[r],n):e[r]=t[r]);return e},Gm=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var eke={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const tke=e=>gn(e)?e.replace(/[&<>"'\/]/g,t=>eke[t]):e;class nke{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const rke=[" ",",","?","!",";"],oke=new nke(20),ike=(e,t,n)=>{t=t||"",n=n||"";const r=rke.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=oke.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},UN=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let a,s="";for(let l=i;l<r.length;++l)if(l!==i&&(s+=n),s+=r[l],a=o[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;i+=l-i+1;break}o=a}return o},kx=e=>e==null?void 0:e.replace("_","-"),ake={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class iT{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||ake,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(gn(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new iT(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new iT(this.logger,t)}}var Sc=new iT;let EI=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let a=0;a<i;a++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let a=0;a<i;a++)o.apply(o,[t,...n])})}};class K6 extends EI{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){var c,u;const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):gn(r)&&i?s.push(...r.split(i)):s.push(r)));const l=oT(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!gn(r)?l:UN((u=(c=this.data)==null?void 0:c[t])==null?void 0:u[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),W6(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(gn(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,a={silent:!1,skipCopy:!1}){let s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=oT(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?bre(l,r,i):l={...l,...r},W6(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var xre={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{var a;t=((a=this.processors[i])==null?void 0:a.process(t,n,r,o))??t}),t}};const Y6={},Q6=e=>!gn(e)&&typeof e!="boolean"&&typeof e!="number";class aT extends EI{constructor(t,n={}){super(),QDe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Sc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);return(o==null?void 0:o.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!ike(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:gn(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:gn(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],o),c=l[l.length-1];let u=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return p?i?{res:`${c}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${u}${s}`:i?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:s;const m=this.resolve(t,o);let g=m==null?void 0:m.res;const y=(m==null?void 0:m.usedKey)||s,v=(m==null?void 0:m.exactUsedKey)||s,w=["[object Number]","[object Function]","[object RegExp]"],C=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,I=o.count!==void 0&&!gn(o.count),O=aT.hasDefaultValue(o),P=I?this.pluralResolver.getSuffix(f,o.count,o):"",R=o.ordinal&&I?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",D=I&&!o.ordinal&&o.count===0,M=D&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${R}`]||o.defaultValue;let A=g;E&&!g&&O&&(A=M);const _=Q6(A),N=Object.prototype.toString.apply(A);if(E&&A&&_&&w.indexOf(N)<0&&!(gn(C)&&Array.isArray(A))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,A,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(m.res=B,m.usedParams=this.getUsedParamsDetails(o),m):B}if(a){const B=Array.isArray(A),H=B?[]:{},j=B?v:y;for(const L in A)if(Object.prototype.hasOwnProperty.call(A,L)){const V=`${j}${a}${L}`;O&&!g?H[L]=this.translate(V,{...o,defaultValue:Q6(M)?M[L]:void 0,joinArrays:!1,ns:l}):H[L]=this.translate(V,{...o,joinArrays:!1,ns:l}),H[L]===V&&(H[L]=A[L])}g=H}}else if(E&&gn(C)&&Array.isArray(g))g=g.join(C),g&&(g=this.extendTranslation(g,t,o,r));else{let B=!1,H=!1;!this.isValidLookup(g)&&O&&(B=!0,g=M),this.isValidLookup(g)||(H=!0,g=s);const L=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:g,V=O&&M!==g&&this.options.updateMissing;if(H||B||V){if(this.logger.log(V?"updateKey":"missingKey",f,c,s,V?M:g),a){const q=this.resolve(s,{...o,keySeparator:!1});q&&q.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let W=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let q=0;q<K.length;q++)W.push(K[q]);else this.options.saveMissingTo==="all"?W=this.languageUtils.toResolveHierarchy(o.lng||this.language):W.push(o.lng||this.language);const G=(q,Y,Z)=>{var se;const ie=O&&Z!==g?Z:L;this.options.missingKeyHandler?this.options.missingKeyHandler(q,c,Y,ie,V,o):(se=this.backendConnector)!=null&&se.saveMissing&&this.backendConnector.saveMissing(q,c,Y,ie,V,o),this.emit("missingKey",q,c,Y,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?W.forEach(q=>{const Y=this.pluralResolver.getSuffixes(q,o);D&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(Z=>{G([q],s+Z,o[`defaultValue${Z}`]||M)})}):G(W,s,M))}g=this.extendTranslation(g,t,o,m,r),H&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${s}`),(H||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${s}`:s,B?g:void 0,o))}return i?(m.res=g,m.usedParams=this.getUsedParamsDetails(o),m):g}extendTranslation(t,n,r,o,i){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=gn(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const m=t.match(this.interpolator.nestingRegexp);f=m&&m.length}let p=r.replace&&!gn(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||o.usedLng,r),u){const m=t.match(this.interpolator.nestingRegexp),g=m&&m.length;f<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...m)=>(i==null?void 0:i[0])===m[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):this.translate(...m,n),r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,s=gn(a)?[a]:a;return t!=null&&(s!=null&&s.length)&&r.applyPostProcessor!==!1&&(t=xre.handle(s,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,a,s;return gn(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!gn(n.count),m=p&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(gn(n.context)||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{var w,C;this.isValidLookup(r)||(s=v,!Y6[`${y[0]}-${v}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((C=this.utils)!=null&&C.hasLoadedNamespace(s))&&(Y6[`${y[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${y.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(E=>{var P;if(this.isValidLookup(r))return;a=E;const I=[u];if((P=this.i18nFormat)!=null&&P.addLookupKeys)this.i18nFormat.addLookupKeys(I,u,E,v,n);else{let R;p&&(R=this.pluralResolver.getSuffix(E,n.count,n));const D=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(I.push(u+R),n.ordinal&&R.indexOf(M)===0&&I.push(u+R.replace(M,this.options.pluralSeparator)),m&&I.push(u+D)),g){const A=`${u}${this.options.contextSeparator}${n.context}`;I.push(A),p&&(I.push(A+R),n.ordinal&&R.indexOf(M)===0&&I.push(A+R.replace(M,this.options.pluralSeparator)),m&&I.push(A+D))}}let O;for(;O=I.pop();)this.isValidLookup(r)||(i=O,r=this.getResource(E,v,O,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!gn(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class X6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Sc.create("languageUtils")}getScriptPartFromCode(t){if(t=kx(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=kx(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(gn(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),gn(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return gn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):gn(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}const J6={zero:0,one:1,two:2,few:3,many:4,other:5},Z6={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ske{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Sc.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=kx(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Z6;if(!t.match(/-|_/))return Z6;const l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,n)}return this.pluralRulesCache[i]=a,a}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>J6[o]-J6[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const eq=(e,t,n,r=".",o=!0)=>{let i=ZDe(e,t,n);return!i&&o&&gn(n)&&(i=UN(e,n,r),i===void 0&&(i=UN(t,n,r))),i},VR=e=>e.replace(/\$/g,"$$$$");class lke{constructor(t={}){var n;this.logger=Sc.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:v,maxReplaces:w,alwaysFormat:C}=t.interpolation;this.escape=n!==void 0?n:tke,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Gm(i):a||"{{",this.suffix=s?Gm(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?Gm(p):m||Gm("$t("),this.nestingSuffix=g?Gm(g):y||Gm(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=w||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){var m;let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const C=eq(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,r,{...o,...n,interpolationkey:g}):C}const y=g.split(this.formatSeparator),v=y.shift().trim(),w=y.join(this.formatSeparator).trim();return this.format(eq(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...o,...n,interpolationkey:v})};this.resetRegExp();const u=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((m=o==null?void 0:o.interpolation)==null?void 0:m.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>VR(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?VR(this.escape(g)):VR(g)}].forEach(g=>{for(s=0;i=g.regex.exec(t);){const y=i[1].trim();if(a=c(y),a===void 0)if(typeof u=="function"){const w=u(t,i,o);a=gn(w)?w:""}else if(o&&Object.prototype.hasOwnProperty.call(o,y))a="";else if(f){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),a="";else!gn(a)&&!this.useRawValueToEscape&&(a=U6(a));const v=g.safeValue(a);if(t=t.replace(i[0],v),f?(g.regex.lastIndex+=a.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,a);const m=p.match(/'/g),g=p.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!g||g.length%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),c&&(a={...c,...a})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${u}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!gn(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!gn(i))return i;gn(i)||(i=U6(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,f)=>this.format(u,f,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const cke=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},tq=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(kx(r),o),t[a]=s),s(n)}},uke=e=>(t,n,r)=>e(kx(n),r)(t);let dke=class{constructor(t={}){this.logger=Sc.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?tq:uke;this.formats={number:r((o,i)=>{const a=new Intl.NumberFormat(o,{...i});return s=>a.format(s)}),currency:r((o,i)=>{const a=new Intl.NumberFormat(o,{...i,style:"currency"});return s=>a.format(s)}),datetime:r((o,i)=>{const a=new Intl.DateTimeFormat(o,{...i});return s=>a.format(s)}),relativetime:r((o,i)=>{const a=new Intl.RelativeTimeFormat(o,{...i});return s=>a.format(s,i.range||"day")}),list:r((o,i)=>{const a=new Intl.ListFormat(o,{...i});return s=>a.format(s)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=tq(n)}format(t,n,r,o={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{var f;const{formatName:c,formatOptions:u}=cke(l);if(this.formats[c]){let p=s;try{const m=((f=o==null?void 0:o.formatParams)==null?void 0:f[o.interpolationkey])||{},g=m.locale||m.lng||o.locale||o.lng||r;p=this.formats[c](s,g,{...u,...o,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${c}`);return s},t)}};const fke=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class pke extends EI{constructor(t,n,r,o={}){var i,a;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Sc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(a=(i=this.backend)==null?void 0:i.init)==null||a.call(i,r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(f=>{const p=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,u=!1,a[p]===void 0&&(a[p]=!0),i[p]===void 0&&(i[p]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{JDe(l.loaded,[i],a),fke(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{s[c][f]===void 0&&(s[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,o=0,i=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();gn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),gn(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i,a={},s=()=>{}){var l,c,u,f,p;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((f=(u=this.services)==null?void 0:u.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((p=this.backend)!=null&&p.create){const m={...a,isUpdate:i},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(t,n,r,o,m):y=g(t,n,r,o),y&&typeof y.then=="function"?y.then(v=>s(null,v)).catch(s):s(null,y)}catch(y){s(y)}else g(t,n,r,o,s,m)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const nq=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),gn(e[1])&&(t.defaultValue=e[1]),gn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),rq=e=>{var t,n;return gn(e.ns)&&(e.ns=[e.ns]),gn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),gn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},P1=()=>{},hke=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class _x extends EI{constructor(t={},n){if(super(),this.options=rq(t),this.services={},this.logger=Sc,this.modules={external:[]},hke(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(gn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=nq();this.options={...r,...this.options,...rq(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Sc.init(o(this.modules.logger),this.options):Sc.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=dke;const u=new X6(this.options);this.store=new K6(this.options.resources,this.options);const f=this.services;f.logger=Sc,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new ske(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new lke(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new pke(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(p,...m)=>{this.emit(p,...m)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new aT(this.services,this.options),this.translator.on("*",(p,...m)=>{this.emit(p,...m)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=P1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const s=t0(),l=()=>{const c=(u,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),n(u,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,n=P1){var i,a;let r=n;const o=gn(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&s.indexOf(f)<0&&s.push(f)})};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>l(u)),(a=(i=this.options.preload)==null?void 0:i.forEach)==null||a.call(i,c=>l(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const o=t0();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=P1),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&xre.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=t0();this.emit("languageChanging",t);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},i=(s,l)=>{l?this.isLanguageChangingTo===t&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(s,(...c)=>this.t(...c))},a=s=>{var u,f;!t&&!s&&this.services.languageDetector&&(s=[]);const l=gn(s)?s:s&&s[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(gn(s)?[s]:s);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),(f=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||f.call(u,c)),this.loadResources(c,p=>{i(p,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),r}getFixedT(t,n,r){const o=(i,a,...s)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([i,a].concat(s)):l={...a},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const c=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(i)?u=i.map(f=>`${l.keyPrefix}${c}${f}`):u=l.keyPrefix?`${l.keyPrefix}${c}${i}`:i,this.t(u,l)};return gn(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=t0();return this.options.ns?(gn(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=t0();gn(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){var o,i;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new X6(nq());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){return new _x(t,n)}cloneInstance(t={},n=P1){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new _x(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const s=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,f)=>(u[f]={...l[c][f]},u),l[c]),l),{});i.store=new K6(s,o),i.services.resourceStore=i.store}return i.translator=new aT(i.services,o),i.translator.on("*",(s,...l)=>{i.emit(s,...l)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const lr=_x.createInstance();lr.createInstance=_x.createInstance;lr.createInstance;lr.dir;lr.init;lr.loadResources;lr.reloadResources;lr.use;lr.changeLanguage;lr.getFixedT;lr.t;lr.exists;lr.setDefaultNamespace;lr.hasLoadedNamespace;lr.loadNamespaces;lr.loadLanguages;const mke=22;function gke(e,t=mke){return e.length>t?e.slice(0,t)+"…":e}function yke(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function EB(e){return e===void 0?(console.warn("called getTranslationKey with undefined name"),""):`server.${yke(e)}`}class vke{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}get translatedName(){return lr.t(EB(this.nameEn),{defaultValue:this.nameEn})}getName(){return this.nameEn?`${this.name} (${this.translatedName})`:this.name}}class Sre{fromJson(t){return new vke(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const bke="muscle",xke=async()=>{const e=ft(bke),{data:t}=await it.get(e,{headers:ht()}),n=new Sre;return t.results.map(r=>n.fromJson(r))},{slice:Ske,forEach:wke}=[];function Cke(e){return wke.call(Ske.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const oq=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Eke=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!oq.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!oq.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},iq={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=Eke(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var Tke={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return iq.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&iq.create(n,e,r,o,i)}},Oke={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s<a.length;s++){const l=a[s].indexOf("=");l>0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let qm=null;const aq=()=>{if(qm!==null)return qm;try{if(qm=typeof window<"u"&&window.localStorage!==null,!qm)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{qm=!1}return qm};var Ike={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&aq())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&aq()&&window.localStorage.setItem(n,e)}};let Wm=null;const sq=()=>{if(Wm!==null)return Wm;try{if(Wm=typeof window<"u"&&window.sessionStorage!==null,!Wm)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Wm=!1}return Wm};var Pke={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&sq())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&sq()&&window.sessionStorage.setItem(n,e)}},Ake={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},Mke={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Rke={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},Dke={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let wre=!1;try{document.cookie,wre=!0}catch{}const Cre=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];wre||Cre.splice(1,1);const kke=()=>({order:Cre,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Ere{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Cke(n,this.options||{},kke()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Tke),this.addDetector(Oke),this.addDetector(Ike),this.addDetector(Pke),this.addDetector(Ake),this.addDetector(Mke),this.addDetector(Rke),this.addDetector(Dke)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Ere.type="languageDetector";function GN(e){"@babel/helpers - typeof";return GN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},GN(e)}function Tre(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":GN(XMLHttpRequest))==="object"}function _ke(e){return!!e&&typeof e.then=="function"}function $ke(e){return _ke(e)?e:Promise.resolve(e)}function lq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lq(Object(n),!0).forEach(function(r){Nke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nke(e,t,n){return(t=Lke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lke(e){var t=Fke(e,"string");return xh(t)=="symbol"?t:t+""}function Fke(e,t){if(xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xh(e){"@babel/helpers - typeof";return xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xh(e)}var Pf=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Pf=global.fetch:typeof window<"u"&&window.fetch&&(Pf=window.fetch);var $x;Tre()&&(typeof global<"u"&&global.XMLHttpRequest?$x=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&($x=window.XMLHttpRequest));var sT;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?sT=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(sT=window.ActiveXObject));typeof Pf!="function"&&(Pf=void 0);if(!Pf&&!$x&&!sT)try{sSe(()=>import("./browser-ponyfill-DY7zmnFW.js").then(e=>e.b),[]).then(function(e){Pf=e.default}).catch(function(){})}catch{}var qN=function(t,n){if(n&&xh(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},uq=function(t,n,r,o){var i=function(l){if(!l.ok)return r(l.statusText||"Error",{status:l.status});l.text().then(function(c){r(null,{status:l.status,data:c})}).catch(r)};if(o){var a=o(t,n);if(a instanceof Promise){a.then(i).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(i).catch(r):Pf(t,n).then(i).catch(r)},dq=!1,jke=function(t,n,r,o){t.queryStringParams&&(n=qN(n,t.queryStringParams));var i=cq({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=cq({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},dq?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{uq(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),uq(n,s,o,l),dq=!0}catch(u){o(u)}}},Bke=function(t,n,r,o){r&&xh(r)==="object"&&(r=qN("",r).slice(1)),t.queryStringParams&&(n=qN(n,t.queryStringParams));try{var i=$x?new $x:new sT("MSXML2.XMLHTTP.3.0");i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},zke=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},Pf&&n.indexOf("file:")!==0)return jke(t,n,r,o);if(Tre()||typeof ActiveXObject=="function")return Bke(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function uy(e){"@babel/helpers - typeof";return uy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uy(e)}function fq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function HR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fq(Object(n),!0).forEach(function(r){Ore(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ire(r.key),r)}}function Uke(e,t,n){return t&&Hke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ore(e,t,n){return(t=Ire(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ire(e){var t=Gke(e,"string");return uy(t)=="symbol"?t:t+""}function Gke(e,t){if(uy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qke=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,o){return Ore({},r,o||"")},parseLoadPayload:function(n,r){},request:zke,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Pre=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Vke(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Uke(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=HR(HR(HR({},qke()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);uy(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=$ke(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+n+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+n+"; status code: "+f.status,!1);if(!f&&u&&u.message){var p=u.message.toLowerCase(),m=["failed","fetch","network","load"].find(function(v){return p.indexOf(v)>-1});if(m)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var g,y;try{typeof f.data=="string"?g=a.options.parse(f.data,o,i):g=f.data}catch{y="failed parsing "+n+" to json"}if(y)return r(y,!1);r(null,g)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],f=[];n.forEach(function(p){var m=s.options.addPath;typeof s.options.addPath=="function"&&(m=s.options.addPath(p,r));var g=s.services.interpolator.interpolate(m,{lng:p,ns:r});s.options.request(s.options,g,l,function(y,v){c+=1,u.push(y),f.push(v),c===n.length&&typeof a=="function"&&a(u,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(f){var p=i.toResolveHierarchy(f);p.forEach(function(m){l.indexOf(m)<0&&l.push(m)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(f){o.read(u,f,"read",null,null,function(p,m){p&&a.warn("loading namespace ".concat(f," for language ").concat(u," failed"),p),!p&&m&&a.log("loaded namespace ".concat(f," for language ").concat(u),m),o.loaded("".concat(u,"|").concat(f),p,m)})})})}}}])}();Pre.type="backend";lr.use(Pre).use(Ere).use(nRe).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});class Wke{constructor(t,n){this.id=t,this.name=n}get translatedName(){return lr.t(EB(this.name),{defaultValue:this.name})}}class Are{fromJson(t){return new Wke(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const Kke="equipment",Yke=async()=>{const e=ft(Kke),{data:t}=await it.get(e,{headers:ht()}),n=new Are;return t.results.map(r=>n.fromJson(r))};class Qke{constructor(t,n){this.id=t,this.name=n}get translatedName(){return lr.t(EB(this.name),{defaultValue:this.name})}}class Mre{fromJson(t){return new Qke(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const Xke="exercisecategory",Jke=async()=>{const e=ft(Xke),{data:t}=await it.get(e,{headers:ht()}),n=new Mre;return t.results.map(r=>n.fromJson(r))};var Eu=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(Eu||{});class Zke{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class WN{fromJson(t){return new Zke(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class e2e{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class Rre{fromJson(t){return new e2e(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class KN{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class Dre{fromJson(t){return new KN(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class kre{constructor(t,n,r,o,i,a,s,l){Ce(this,"notes",[]);Ce(this,"aliases",[]);Ce(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return gke(this.name)}get nameSlug(){return vre(this.name)}}class TB{fromJson(t){var n,r;return new kre(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new Dre().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new Rre().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class t2e{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class _re{fromJson(t){return new t2e(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class OB{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class n2e{fromJson(t){return new OB(t.id,t.short_name,t.full_name)}toJson(t){return{}}}const Sh=2,$re="en",r2e=new OB(Sh,$re,"English"),o2e=21,i2e=1,a2e=1,s2e=2,l2e="variations",c2e="detail",u2e="permission",fv="measurements",pv="measurements-categories";var st=(e=>(e.ROUTINE_OVERVIEW="routine-overview",e.ROUTINE_DETAIL="routine-detail",e.SESSION_SEARCH="session-search",e.SESSIONS_FULL="sessions-full",e.ROUTINE_LOGS="routine-logs",e.ROUTINE_LOG_DATA="routine-log-data",e.ROUTINE_STATS="routine-stats",e.ROUTINES_ACTIVE="routines-active",e.ROUTINES_SHALLOW="routines-shallow",e.PRIVATE_TEMPLATES="private-templates",e.PUBLIC_TEMPLATES="public-templates",e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_DIARY="nutritional-plan-diary",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e.ROUTINE_WEIGHT_UNITS="weight-units",e.ROUTINE_REP_UNITS="rep-units",e.QUERY_PROFILE="profile",e.EXERCISES="exercises",e.EXERCISE_VARIATIONS="variations",e.EXERCISE_DETAIL="detail",e.LANGUAGES="languages",e.CATEGORIES="categories",e.EQUIPMENT="equipment",e.MUSCLES="muscles",e.QUERY_NOTES="notes",e))(st||{}),St=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e.ROUTINE="routine",e.WEIGHT_CONFIG="weight-config",e.MAX_WEIGHT_CONFIG="max-weight-config",e.REPETITIONS_CONFIG="repetitions-config",e.MAX_REPS_CONFIG="max-repetitions-config",e.RIR_CONFIG="rir-config",e.MAX_RIR_CONFIG="max-rir-config",e.NR_OF_SETS_CONFIG="sets-config",e.MAX_NR_OF_SETS_CONFIG="max-sets-config",e.REST_CONFIG="rest-config",e.MAX_REST_CONFIG="max-rest-config",e.DAY="day",e.SLOT="slot",e.SLOT_ENTRY="slot-entry",e.SESSION="workoutsession",e.WORKOUT_LOG="workoutlog",e.PRIVATE_TEMPLATE="templates",e.PUBLIC_TEMPLATE="public-templates",e.API_PROFILE_PATH="userprofile",e))(St||{});const YN="999",d2e=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],f2e=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],p2e=["#2a4c7d","#d45089","#ffa600"],QN={pageSizeOptions:[5,10,25,50,100],pageSize:10},h2e="Europe/Berlin",dy="en",TI=3e3,Nre=500;class m2e{constructor(t,n,r,o,i,a,s,l,c,u,f){Ce(this,"translations",[]);Ce(this,"videos",[]);Ce(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),f&&(this.authors=f)}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}getTranslation(t){const n=t!=null?t.id:Sh;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===Sh)),r||this.translations[0]}}class Lre{fromJson(t){const n=new Mre,r=new Are,o=new Sre,i=new WN,a=new TB,s=new _re,l=new m2e(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.translations.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===Sh)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new WN().toJson(n))}}}const IB="exerciseinfo",PB="exercise";function Fre(e){const t=new Lre,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const g2e=async()=>{const e=ft(IB,{query:{limit:900}}),t=await it.get(e,{headers:ht()});return Fre(t.data)},hv=async e=>{const t=new Lre,n=ft(IB,{id:e}),r=await it.get(n,{headers:ht()});return t.fromJson(r.data)},y2e=async e=>{if(!e)return[];const t=ft(IB,{query:{variations:e}}),n=await it.get(t,{headers:ht()});return Fre(n.data)},v2e=async(e,t,n,r,o,i)=>{const a=ft(PB),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await it.post(a,s,{headers:ht()})).data.id},AB=async(e,t)=>{const n=ft(PB,{id:e});return(await it.patch(n,t,{headers:ht()})).status},pq=async(e,t)=>{const r=ft(PB,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await it.delete(r,{headers:ht()})).status},MB="exercise-translation",b2e="exercise/search",x2e=async(e,t=$re,n=!0)=>{const r=[t];t!==dy&&n&&r.push(dy);const o=ft(b2e,{query:{term:e,language:r.join(",")}}),{data:i}=await it.get(o);return i.suggestions},XN=async e=>{const{exerciseId:t,languageId:n,name:r,description:o,author:i}=e,a=ft(MB),s={exercise:t,language:n,name:r,description:o,license_author:i},l=await it.post(a,s,{headers:ht()});return new TB().fromJson(l.data)},S2e=async e=>{const{id:t,exerciseId:n,languageId:r,name:o,description:i}=e,a=ft(MB,{id:t}),s={exercise:n,language:r,name:o,description:i},l=await it.patch(a,s,{headers:ht()});return new TB().fromJson(l.data)},w2e=async e=>{const t=ft(MB,{id:e});return(await it.delete(t,{headers:ht()})).status},C2e="language",E2e=async()=>{const e=ft(C2e),{data:t}=await it.get(e,{headers:ht()}),n=new n2e;return t.results.map(r=>n.fromJson(r))},qu=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},jre="exerciseimage",Bre=async e=>{const t=ft(jre),n=ht();n["Content-Type"]="multipart/form-data";const r=await it.post(t,{exercise:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new WN().fromJson(r.data)},T2e=async e=>{const t=ft(jre,{id:e}),n=ht();return(await it.delete(t,{headers:n})).status},zre="exercisealias",JN=async(e,t)=>{const n=ft(zre),r=await it.post(n,{translation:e,alias:t},{headers:ht()});return new Rre().fromJson(r.data)},O2e=async e=>(await it.delete(ft(zre,{id:e}),{headers:ht()})).status,Vre="video",I2e=async(e,t,n)=>{const r=ft(Vre),o=ht();o["Content-Type"]="multipart/form-data";const i=await it.post(r,{exercise:e,license_author:t,video:n},{headers:o});return new _re().fromJson(i.data)},P2e=async e=>{const t=ft(Vre,{id:e}),n=ht();return(await it.delete(t,{headers:n})).status},Qi="r",A2e="+",M2e="-",ZN=["weight","repetitions","rir","rest"],R2e=[{value:"abs",label:"Absolute"},{value:"percent",label:"Percent"}],D2e=[{value:A2e,label:"Add"},{value:M2e,label:"Subtract"},{value:Qi,label:"Replace"}],Hre=[{value:"",label:"-/-"},...[0,.5,1,1.5,2,2.5,3,3.5,4].map(e=>({value:e,label:e.toString()})),{value:4.5,label:"4+"}],Ure=[...Hre];class k2e{constructor(t){Ce(this,"id");Ce(this,"slotEntryId");Ce(this,"iteration");Ce(this,"value");Ce(this,"operation");Ce(this,"step");Ce(this,"repeat");Ce(this,"requirements");this.id=t.id,this.slotEntryId=t.slotEntryId,this.iteration=t.iteration,this.value=t.value,this.operation=t.operation??"r",this.step=t.step??"abs",this.repeat=t.repeat??!1,this.requirements=t.requirements??null}get replace(){return this.operation==="r"}}class RB{constructor(){Ce(this,"fromJson",t=>new k2e({id:t.id,slotEntryId:t.slot_entry,iteration:t.iteration,value:parseFloat(t.value),operation:t.operation,step:t.step,repeat:t.repeat,requirements:t.requirements}));Ce(this,"toJson",t=>({slot_entry:t.slotEntryId,iteration:t.iteration,value:t.value,operation:t.operation,step:t.step,repeat:t.repeat,requirements:t.requirements}))}}class _2e{constructor(t){Ce(this,"id");Ce(this,"slotId");Ce(this,"exerciseId");Ce(this,"repetitionUnitId");Ce(this,"repetitionRounding");Ce(this,"weightUnitId");Ce(this,"weightRounding");Ce(this,"order");Ce(this,"comment");Ce(this,"type");Ce(this,"config");Ce(this,"weightConfigs",[]);Ce(this,"maxWeightConfigs",[]);Ce(this,"repetitionsConfigs",[]);Ce(this,"maxRepetitionsConfigs",[]);Ce(this,"restTimeConfigs",[]);Ce(this,"maxRestTimeConfigs",[]);Ce(this,"nrOfSetsConfigs",[]);Ce(this,"maxNrOfSetsConfigs",[]);Ce(this,"rirConfigs",[]);Ce(this,"maxRirConfigs",[]);Ce(this,"exercise");Ce(this,"repetitionUnit",null);Ce(this,"weightUnit",null);this.id=t.id,this.slotId=t.slotId,this.exerciseId=t.exerciseId,this.exercise=t.exercise,this.repetitionUnitId=t.repetitionUnitId,this.repetitionRounding=t.repetitionRounding,this.weightUnitId=t.weightUnitId,this.weightRounding=t.weightRounding,this.order=t.order,this.comment=t.comment,this.type=t.type,this.config=t.config,t.configs!==void 0&&(this.weightConfigs=t.configs.weightConfigs??[],this.maxWeightConfigs=t.configs.maxWeightConfigs??[],this.repetitionsConfigs=t.configs.repetitionsConfigs??[],this.maxRepetitionsConfigs=t.configs.maxRepetitionsConfigs??[],this.restTimeConfigs=t.configs.restTimeConfigs??[],this.maxRestTimeConfigs=t.configs.maxRestTimeConfigs??[],this.nrOfSetsConfigs=t.configs.nrOfSetsConfigs??[],this.maxNrOfSetsConfigs=t.configs.maxNrOfSetsConfigs??[],this.rirConfigs=t.configs.rirConfigs??[],this.maxRirConfigs=t.configs.maxRirConfigs??[])}get hasProgressionRules(){return this.weightConfigs.length>1||this.maxWeightConfigs.length>1||this.repetitionsConfigs.length>1||this.maxRepetitionsConfigs.length>1||this.restTimeConfigs.length>1||this.maxRestTimeConfigs.length>1||this.nrOfSetsConfigs.length>1||this.maxNrOfSetsConfigs.length>1||this.rirConfigs.length>1||this.maxRirConfigs.length>1}}class $2e{constructor(){Ce(this,"fromJson",t=>{const n=new RB,r={weightConfigs:[],maxWeightConfigs:[],repetitionsConfigs:[],maxRepetitionsConfigs:[],restTimeConfigs:[],maxRestTimeConfigs:[],nrOfSetsConfigs:[],maxNrOfSetsConfigs:[],rirConfigs:[],maxRirConfigs:[]};return Object.hasOwn(t,"weight_configs")&&(r.weightConfigs=t.weight_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_weight_configs")&&(r.maxWeightConfigs=t.max_weight_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"repetitions_configs")&&(r.repetitionsConfigs=t.repetitions_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_repetitions_configs")&&(r.maxRepetitionsConfigs=t.max_repetitions_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"set_nr_configs")&&(r.nrOfSetsConfigs=t.set_nr_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_set_nr_configs")&&(r.maxNrOfSetsConfigs=t.max_set_nr_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"rest_configs")&&(r.restTimeConfigs=t.rest_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_rest_configs")&&(r.maxRestTimeConfigs=t.max_rest_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"rir_configs")&&(r.rirConfigs=t.rir_configs.map(o=>n.fromJson(o))),Object.hasOwn(t,"max_rir_configs")&&(r.maxRirConfigs=t.max_rir_configs.map(o=>n.fromJson(o))),new _2e({id:t.id,slotId:t.slot,exerciseId:t.exercise,repetitionUnitId:t.repetition_unit,repetitionRounding:t.repetition_rounding,weightUnitId:t.weight_unit,weightRounding:t.weight_rounding,order:t.order,comment:t.comment,type:t.type,config:t.config,configs:r})});Ce(this,"toJson",t=>({slot:t.slotId,exercise:t.exerciseId,repetition_unit:t.repetitionUnitId,repetition_rounding:t.repetitionRounding,weight_unit:t.weightUnitId,weight_rounding:t.weightRounding,order:t.order,comment:t.comment,type:t.type,config:t.config}))}}const DB=new $2e;class N2e{constructor({id:t,dayId:n,order:r,comment:o,config:i,entries:a=[]}){Ce(this,"id");Ce(this,"dayId");Ce(this,"order");Ce(this,"comment");Ce(this,"config");Ce(this,"entries",[]);this.id=t,this.dayId=n,this.order=r,this.comment=o,this.config=i,this.entries=a}}class kB{constructor(){Ce(this,"fromJson",t=>new N2e({id:t.id,dayId:t.day,order:t.order,comment:t.comment,config:t.config,entries:Object.hasOwn(t,"entries")?t.entries.map(n=>DB.fromJson(n)):[]}))}toJson(t){return{id:t.id,day:t.dayId,order:t.order,comment:t.order,config:t.config}}}class Gre{constructor({id:t,order:n,name:r,description:o,isRest:i,needLogsToAdvance:a,type:s,config:l,slots:c=[]}){Ce(this,"id");Ce(this,"order");Ce(this,"name");Ce(this,"description");Ce(this,"isRest");Ce(this,"needLogsToAdvance");Ce(this,"type");Ce(this,"config");Ce(this,"slots",[]);this.id=t,this.order=n,this.name=r,this.description=o,this.isRest=i,this.needLogsToAdvance=a,this.type=s,this.config=l,this.slots=c}get isSpecialType(){return this.type!=="custom"}getDisplayName(){return this.isRest?lr.t("routines.restDay"):this.name}}const qre=e=>e===null||e.isRest?lr.t("routines.restDay"):e.getDisplayName();class OI{constructor(){Ce(this,"fromJson",t=>new Gre({id:t.id,order:t.order,name:t.name,description:t.description,isRest:t.is_rest,needLogsToAdvance:t.need_logs_to_advance,type:t.type,config:t.config,slots:Object.hasOwn(t,"slots")?t.slots.map(n=>new kB().fromJson(n)):[]}));Ce(this,"toJson",t=>({order:t.order,description:t.description,is_rest:t.isRest,need_logs_to_advance:t.needLogsToAdvance,type:t.type,config:t.config}))}}class Wre{constructor(t){Ce(this,"exercises",{});Ce(this,"muscle",{});Ce(this,"upper_body",0);Ce(this,"lower_body",0);Ce(this,"total",0);Object.assign(this,t)}}class wE{constructor(t){Ce(this,"mesocycle",new Wre);Ce(this,"iteration",{});Ce(this,"weekly",{});Ce(this,"daily",{});Object.assign(this,t)}}class L2e{constructor(t){Ce(this,"volume",new wE);Ce(this,"intensity",new wE);Ce(this,"sets",new wE);Object.assign(this,t)}}class F2e{fromJson(t){const n=o=>{const i={};for(const s in o.exercises)i[parseInt(s)]=parseFloat(o.exercises[s]);const a={};for(const s in o.muscle)a[parseInt(s)]=parseFloat(o.muscle[s]);return new Wre({exercises:i,muscle:a,upper_body:parseFloat(o.upper_body),lower_body:parseFloat(o.lower_body),total:parseFloat(o.total)})},r=o=>{const i={};for(const l in o.iteration)i[l]=n(o.iteration[l]);const a={};for(const l in o.weekly)a[l]=n(o.weekly[l]);const s={};for(const l in o.daily)s[l]=n(o.daily[l]);return new wE({mesocycle:n(o.mesocycle),iteration:i,weekly:a,daily:s})};return new L2e({volume:r(t.volume),intensity:r(t.intensity),sets:r(t.sets)})}}class Vh extends Error{}class j2e extends Vh{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class B2e extends Vh{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class z2e extends Vh{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class gg extends Vh{}class Kre extends Vh{constructor(t){super(`Invalid unit ${t}`)}}class _i extends Vh{}class Fd extends Vh{constructor(){super("Zone is an abstract class")}}const Rt="numeric",Ql="short",Xa="long",lT={year:Rt,month:Rt,day:Rt},Yre={year:Rt,month:Ql,day:Rt},V2e={year:Rt,month:Ql,day:Rt,weekday:Ql},Qre={year:Rt,month:Xa,day:Rt},Xre={year:Rt,month:Xa,day:Rt,weekday:Xa},Jre={hour:Rt,minute:Rt},Zre={hour:Rt,minute:Rt,second:Rt},eoe={hour:Rt,minute:Rt,second:Rt,timeZoneName:Ql},toe={hour:Rt,minute:Rt,second:Rt,timeZoneName:Xa},noe={hour:Rt,minute:Rt,hourCycle:"h23"},roe={hour:Rt,minute:Rt,second:Rt,hourCycle:"h23"},ooe={hour:Rt,minute:Rt,second:Rt,hourCycle:"h23",timeZoneName:Ql},ioe={hour:Rt,minute:Rt,second:Rt,hourCycle:"h23",timeZoneName:Xa},aoe={year:Rt,month:Rt,day:Rt,hour:Rt,minute:Rt},soe={year:Rt,month:Rt,day:Rt,hour:Rt,minute:Rt,second:Rt},loe={year:Rt,month:Ql,day:Rt,hour:Rt,minute:Rt},coe={year:Rt,month:Ql,day:Rt,hour:Rt,minute:Rt,second:Rt},H2e={year:Rt,month:Ql,day:Rt,weekday:Ql,hour:Rt,minute:Rt},uoe={year:Rt,month:Xa,day:Rt,hour:Rt,minute:Rt,timeZoneName:Ql},doe={year:Rt,month:Xa,day:Rt,hour:Rt,minute:Rt,second:Rt,timeZoneName:Ql},foe={year:Rt,month:Xa,day:Rt,weekday:Xa,hour:Rt,minute:Rt,timeZoneName:Xa},poe={year:Rt,month:Xa,day:Rt,weekday:Xa,hour:Rt,minute:Rt,second:Rt,timeZoneName:Xa};class fw{get type(){throw new Fd}get name(){throw new Fd}get ianaName(){return this.name}get isUniversal(){throw new Fd}offsetName(t,n){throw new Fd}formatOffset(t,n){throw new Fd}offset(t){throw new Fd}equals(t){throw new Fd}get isValid(){throw new Fd}}let UR=null;class II extends fw{static get instance(){return UR===null&&(UR=new II),UR}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Eoe(t,n,r)}formatOffset(t,n){return ex(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const eL=new Map;function U2e(e){let t=eL.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),eL.set(e,t)),t}const G2e={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function q2e(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function W2e(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],s=G2e[i];i==="era"?r[s]=a:mn(s)||(r[s]=parseInt(a,10))}return r}const GR=new Map;class Wu extends fw{static create(t){let n=GR.get(t);return n===void 0&&GR.set(t,n=new Wu(t)),n}static resetCache(){GR.clear(),eL.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Wu.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Eoe(t,n,r,this.name)}formatOffset(t,n){return ex(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const r=U2e(this.name);let[o,i,a,s,l,c,u]=r.formatToParts?W2e(r,n):q2e(r,n);s==="BC"&&(o=-Math.abs(o)+1);const p=AI({year:o,month:i,day:a,hour:l===24?0:l,minute:c,second:u,millisecond:0});let m=+n;const g=m%1e3;return m-=g>=0?g:1e3+g,(p-m)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let hq={};function K2e(e,t={}){const n=JSON.stringify([e,t]);let r=hq[n];return r||(r=new Intl.ListFormat(e,t),hq[n]=r),r}const tL=new Map;function nL(e,t={}){const n=JSON.stringify([e,t]);let r=tL.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),tL.set(n,r)),r}const rL=new Map;function Y2e(e,t={}){const n=JSON.stringify([e,t]);let r=rL.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),rL.set(n,r)),r}const oL=new Map;function Q2e(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=oL.get(o);return i===void 0&&(i=new Intl.RelativeTimeFormat(e,t),oL.set(o,i)),i}let _0=null;function X2e(){return _0||(_0=new Intl.DateTimeFormat().resolvedOptions().locale,_0)}const iL=new Map;function hoe(e){let t=iL.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),iL.set(e,t)),t}const aL=new Map;function J2e(e){let t=aL.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...moe,...t}),aL.set(e,t)}return t}function Z2e(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=nL(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=nL(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function e_e(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function t_e(e){const t=[];for(let n=1;n<=12;n++){const r=xt.utc(2009,n,1);t.push(e(r))}return t}function n_e(e){const t=[];for(let n=1;n<=7;n++){const r=xt.utc(2016,11,13+n);t.push(e(r))}return t}function A1(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function r_e(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||hoe(e.locale).numberingSystem==="latn"}class o_e{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Y2e(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):FB(t,3);return Mo(n,this.padTo)}}}class i_e{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&Wu.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=nL(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class a_e{constructor(t,n,r){this.opts={style:"long",...r},!n&&woe()&&(this.rtf=Q2e(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):P_e(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const moe={firstDay:1,minimalDays:4,weekend:[6,7]};class dr{static fromOpts(t){return dr.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||to.defaultLocale,s=a||(i?"en-US":X2e()),l=n||to.defaultNumberingSystem,c=r||to.defaultOutputCalendar,u=lL(o)||to.defaultWeekSettings;return new dr(s,l,c,u,a)}static resetCache(){_0=null,tL.clear(),rL.clear(),oL.clear(),iL.clear(),aL.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return dr.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=Z2e(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=e_e(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=r_e(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:dr.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,lL(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return A1(this,t,Ioe,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=t_e(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return A1(this,t,Moe,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=n_e(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return A1(this,void 0,()=>Roe,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[xt.utc(2016,11,13,9),xt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return A1(this,t,Doe,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[xt.utc(-40,1,1),xt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new o_e(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new i_e(t,this.intl,n)}relFormatter(t={}){return new a_e(this.intl,this.isEnglish(),t)}listFormatter(t={}){return K2e(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||hoe(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Coe()?J2e(this.locale):moe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let qR=null;class ea extends fw{static get utcInstance(){return qR===null&&(qR=new ea(0)),qR}static instance(t){return t===0?ea.utcInstance:new ea(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ea(MI(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ex(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ex(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return ex(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class s_e extends fw{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Xd(e,t){if(mn(e)||e===null)return t;if(e instanceof fw)return e;if(p_e(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?II.instance:n==="utc"||n==="gmt"?ea.utcInstance:ea.parseSpecifier(n)||Wu.create(e)}else return vf(e)?ea.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new s_e(e)}const _B={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},mq={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},l_e=_B.hanidec.replace(/[\[|\]]/g,"").split("");function c_e(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(_B.hanidec)!==-1)t+=l_e.indexOf(e[n]);else for(const o in mq){const[i,a]=mq[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}const sL=new Map;function u_e(){sL.clear()}function yl({numberingSystem:e},t=""){const n=e||"latn";let r=sL.get(n);r===void 0&&(r=new Map,sL.set(n,r));let o=r.get(t);return o===void 0&&(o=new RegExp(`${_B[n]}${t}`),r.set(t,o)),o}let gq=()=>Date.now(),yq="system",vq=null,bq=null,xq=null,Sq=60,wq,Cq=null;class to{static get now(){return gq}static set now(t){gq=t}static set defaultZone(t){yq=t}static get defaultZone(){return Xd(yq,II.instance)}static get defaultLocale(){return vq}static set defaultLocale(t){vq=t}static get defaultNumberingSystem(){return bq}static set defaultNumberingSystem(t){bq=t}static get defaultOutputCalendar(){return xq}static set defaultOutputCalendar(t){xq=t}static get defaultWeekSettings(){return Cq}static set defaultWeekSettings(t){Cq=lL(t)}static get twoDigitCutoffYear(){return Sq}static set twoDigitCutoffYear(t){Sq=t%100}static get throwOnInvalid(){return wq}static set throwOnInvalid(t){wq=t}static resetCaches(){dr.resetCache(),Wu.resetCache(),xt.resetCache(),u_e()}}class $l{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const goe=[0,31,59,90,120,151,181,212,243,273,304,334],yoe=[0,31,60,91,121,152,182,213,244,274,305,335];function zs(e,t){return new $l("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function $B(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function voe(e,t,n){return n+(pw(e)?yoe:goe)[t-1]}function boe(e,t){const n=pw(e)?yoe:goe,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function NB(e,t){return(e-t+7)%7+1}function cT(e,t=4,n=1){const{year:r,month:o,day:i}=e,a=voe(r,o,i),s=NB($B(r,o,i),n);let l=Math.floor((a-s+14-t)/7),c;return l<1?(c=r-1,l=Nx(c,t,n)):l>Nx(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...RI(e)}}function Eq(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=NB($B(r,1,t),n),s=Ng(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=Ng(c)):l>s?(c=r+1,l-=Ng(r)):c=r;const{month:u,day:f}=boe(c,l);return{year:c,month:u,day:f,...RI(e)}}function WR(e){const{year:t,month:n,day:r}=e,o=voe(t,n,r);return{year:t,ordinal:o,...RI(e)}}function Tq(e){const{year:t,ordinal:n}=e,{month:r,day:o}=boe(t,n);return{year:t,month:r,day:o,...RI(e)}}function Oq(e,t){if(!mn(e.localWeekday)||!mn(e.localWeekNumber)||!mn(e.localWeekYear)){if(!mn(e.weekday)||!mn(e.weekNumber)||!mn(e.weekYear))throw new gg("Cannot mix locale-based week fields with ISO-based week fields");return mn(e.localWeekday)||(e.weekday=e.localWeekday),mn(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),mn(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function d_e(e,t=4,n=1){const r=PI(e.weekYear),o=Vs(e.weekNumber,1,Nx(e.weekYear,t,n)),i=Vs(e.weekday,1,7);return r?o?i?!1:zs("weekday",e.weekday):zs("week",e.weekNumber):zs("weekYear",e.weekYear)}function f_e(e){const t=PI(e.year),n=Vs(e.ordinal,1,Ng(e.year));return t?n?!1:zs("ordinal",e.ordinal):zs("year",e.year)}function xoe(e){const t=PI(e.year),n=Vs(e.month,1,12),r=Vs(e.day,1,uT(e.year,e.month));return t?n?r?!1:zs("day",e.day):zs("month",e.month):zs("year",e.year)}function Soe(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Vs(t,0,23)||t===24&&n===0&&r===0&&o===0,a=Vs(n,0,59),s=Vs(r,0,59),l=Vs(o,0,999);return i?a?s?l?!1:zs("millisecond",o):zs("second",r):zs("minute",n):zs("hour",t)}function mn(e){return typeof e>"u"}function vf(e){return typeof e=="number"}function PI(e){return typeof e=="number"&&e%1===0}function p_e(e){return typeof e=="string"}function h_e(e){return Object.prototype.toString.call(e)==="[object Date]"}function woe(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Coe(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function m_e(e){return Array.isArray(e)?e:[e]}function Iq(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function g_e(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function fy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function lL(e){if(e==null)return null;if(typeof e!="object")throw new _i("Week settings must be an object");if(!Vs(e.firstDay,1,7)||!Vs(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Vs(t,1,7)))throw new _i("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Vs(e,t,n){return PI(e)&&e>=t&&e<=n}function y_e(e,t){return e-t*Math.floor(e/t)}function Mo(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Gd(e){if(!(mn(e)||e===null||e===""))return parseInt(e,10)}function yp(e){if(!(mn(e)||e===null||e===""))return parseFloat(e)}function LB(e){if(!(mn(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function FB(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function pw(e){return e%4===0&&(e%100!==0||e%400===0)}function Ng(e){return pw(e)?366:365}function uT(e,t){const n=y_e(t-1,12)+1,r=e+(t-n)/12;return n===2?pw(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function AI(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Pq(e,t,n){return-NB($B(e,1,t),n)+t-1}function Nx(e,t=4,n=1){const r=Pq(e,t,n),o=Pq(e+1,t,n);return(Ng(e)-r+o)/7}function cL(e){return e>99?e:e>to.twoDigitCutoffYear?1900+e:2e3+e}function Eoe(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function MI(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function Toe(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new _i(`Invalid unit value ${e}`);return t}function dT(e,t){const n={};for(const r in e)if(fy(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=Toe(o)}return n}function ex(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Mo(n,2)}:${Mo(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Mo(n,2)}${Mo(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function RI(e){return g_e(e,["hour","minute","second","millisecond"])}const v_e=["January","February","March","April","May","June","July","August","September","October","November","December"],Ooe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],b_e=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ioe(e){switch(e){case"narrow":return[...b_e];case"short":return[...Ooe];case"long":return[...v_e];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Poe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Aoe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],x_e=["M","T","W","T","F","S","S"];function Moe(e){switch(e){case"narrow":return[...x_e];case"short":return[...Aoe];case"long":return[...Poe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Roe=["AM","PM"],S_e=["Before Christ","Anno Domini"],w_e=["BC","AD"],C_e=["B","A"];function Doe(e){switch(e){case"narrow":return[...C_e];case"short":return[...w_e];case"long":return[...S_e];default:return null}}function E_e(e){return Roe[e.hour<12?0:1]}function T_e(e,t){return Moe(t)[e.weekday-1]}function O_e(e,t){return Ioe(t)[e.month-1]}function I_e(e,t){return Doe(t)[e.year<0?0:1]}function P_e(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const f=e==="days";switch(t){case 1:return f?"tomorrow":`next ${o[e][0]}`;case-1:return f?"yesterday":`last ${o[e][0]}`;case 0:return f?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function Aq(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const A_e={D:lT,DD:Yre,DDD:Qre,DDDD:Xre,t:Jre,tt:Zre,ttt:eoe,tttt:toe,T:noe,TT:roe,TTT:ooe,TTTT:ioe,f:aoe,ff:loe,fff:uoe,ffff:foe,F:soe,FF:coe,FFF:doe,FFFF:poe};class Fi{static create(t,n={}){return new Fi(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const s=t.charAt(a);s==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return A_e[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Mo(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(m,g)=>this.loc.extract(t,m,g),a=m=>t.isOffsetFixed&&t.offset===0&&m.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,m.format):"",s=()=>r?E_e(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(m,g)=>r?O_e(t,m):i(g?{month:m}:{month:m,day:"numeric"},"month"),c=(m,g)=>r?T_e(t,m):i(g?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),u=m=>{const g=Fi.macroTokenToFormatOpts(m);return g?this.formatWithSystemDefault(t,g):m},f=m=>r?I_e(t,m):i({era:m},"era"),p=m=>{switch(m){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(m)}};return Aq(Fi.parseFormat(n),p)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=Fi.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return Aq(i,o(s))}}const koe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function mv(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function gv(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function yv(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function _oe(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=Gd(t[n+o]);return[r,null,n+o]}}const $oe=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,M_e=`(?:${$oe.source}?(?:\\[(${koe.source})\\])?)?`,jB=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Noe=RegExp(`${jB.source}${M_e}`),BB=RegExp(`(?:T${Noe.source})?`),R_e=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,D_e=/(\d{4})-?W(\d\d)(?:-?(\d))?/,k_e=/(\d{4})-?(\d{3})/,__e=_oe("weekYear","weekNumber","weekDay"),$_e=_oe("year","ordinal"),N_e=/(\d{4})-(\d\d)-(\d\d)/,Loe=RegExp(`${jB.source} ?(?:${$oe.source}|(${koe.source}))?`),L_e=RegExp(`(?: ${Loe.source})?`);function Lg(e,t,n){const r=e[t];return mn(r)?n:Gd(r)}function F_e(e,t){return[{year:Lg(e,t),month:Lg(e,t+1,1),day:Lg(e,t+2,1)},null,t+3]}function vv(e,t){return[{hours:Lg(e,t,0),minutes:Lg(e,t+1,0),seconds:Lg(e,t+2,0),milliseconds:LB(e[t+3])},null,t+4]}function hw(e,t){const n=!e[t]&&!e[t+1],r=MI(e[t+1],e[t+2]),o=n?null:ea.instance(r);return[{},o,t+3]}function mw(e,t){const n=e[t]?Wu.create(e[t]):null;return[{},n,t+1]}const j_e=RegExp(`^T?${jB.source}$`),B_e=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function z_e(e){const[t,n,r,o,i,a,s,l,c]=e,u=t[0]==="-",f=l&&l[0]==="-",p=(m,g=!1)=>m!==void 0&&(g||m&&u)?-m:m;return[{years:p(yp(n)),months:p(yp(r)),weeks:p(yp(o)),days:p(yp(i)),hours:p(yp(a)),minutes:p(yp(s)),seconds:p(yp(l),l==="-0"),milliseconds:p(LB(c),f)}]}const V_e={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zB(e,t,n,r,o,i,a){const s={year:t.length===2?cL(Gd(t)):Gd(t),month:Ooe.indexOf(n)+1,day:Gd(r),hour:Gd(o),minute:Gd(i)};return a&&(s.second=Gd(a)),e&&(s.weekday=e.length>3?Poe.indexOf(e)+1:Aoe.indexOf(e)+1),s}const H_e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function U_e(e){const[,t,n,r,o,i,a,s,l,c,u,f]=e,p=zB(t,o,r,n,i,a,s);let m;return l?m=V_e[l]:c?m=0:m=MI(u,f),[p,new ea(m)]}function G_e(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const q_e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,W_e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,K_e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Mq(e){const[,t,n,r,o,i,a,s]=e;return[zB(t,o,r,n,i,a,s),ea.utcInstance]}function Y_e(e){const[,t,n,r,o,i,a,s]=e;return[zB(t,s,n,r,o,i,a),ea.utcInstance]}const Q_e=mv(R_e,BB),X_e=mv(D_e,BB),J_e=mv(k_e,BB),Z_e=mv(Noe),Foe=gv(F_e,vv,hw,mw),e$e=gv(__e,vv,hw,mw),t$e=gv($_e,vv,hw,mw),n$e=gv(vv,hw,mw);function r$e(e){return yv(e,[Q_e,Foe],[X_e,e$e],[J_e,t$e],[Z_e,n$e])}function o$e(e){return yv(G_e(e),[H_e,U_e])}function i$e(e){return yv(e,[q_e,Mq],[W_e,Mq],[K_e,Y_e])}function a$e(e){return yv(e,[B_e,z_e])}const s$e=gv(vv);function l$e(e){return yv(e,[j_e,s$e])}const c$e=mv(N_e,L_e),u$e=mv(Loe),d$e=gv(vv,hw,mw);function f$e(e){return yv(e,[c$e,Foe],[u$e,d$e])}const Rq="Invalid Duration",joe={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},p$e={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...joe},Ts=146097/400,Km=146097/4800,h$e={years:{quarters:4,months:12,weeks:Ts/7,days:Ts,hours:Ts*24,minutes:Ts*24*60,seconds:Ts*24*60*60,milliseconds:Ts*24*60*60*1e3},quarters:{months:3,weeks:Ts/28,days:Ts/4,hours:Ts*24/4,minutes:Ts*24*60/4,seconds:Ts*24*60*60/4,milliseconds:Ts*24*60*60*1e3/4},months:{weeks:Km/7,days:Km,hours:Km*24,minutes:Km*24*60,seconds:Km*24*60*60,milliseconds:Km*24*60*60*1e3},...joe},zp=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],m$e=zp.slice(0).reverse();function jd(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Xn(r)}function Boe(e,t){let n=t.milliseconds??0;for(const r of m$e.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Dq(e,t){const n=Boe(e,t)<0?-1:1;zp.reduceRight((r,o)=>{if(mn(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),zp.reduce((r,o)=>{if(mn(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function g$e(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Xn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?h$e:p$e;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||dr.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Xn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new _i(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Xn({values:dT(t,Xn.normalizeUnit),loc:dr.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(vf(t))return Xn.fromMillis(t);if(Xn.isDuration(t))return t;if(typeof t=="object")return Xn.fromObject(t);throw new _i(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=a$e(t);return r?Xn.fromObject(r,n):Xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=l$e(t);return r?Xn.fromObject(r,n):Xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new _i("need to specify a reason the Duration is invalid");const r=t instanceof $l?t:new $l(t,n);if(to.throwOnInvalid)throw new z2e(r);return new Xn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Kre(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Fi.create(this.loc,r).formatDurationFromString(this,t):Rq}toHuman(t={}){if(!this.isValid)return Rq;const n=zp.map(r=>{const o=this.values[r];return mn(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=FB(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},xt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Boe(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t),r={};for(const o of zp)(fy(n.values,o)||fy(this.values,o))&&(r[o]=n.get(o)+this.get(o));return jd(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Toe(t(this.values[r],r));return jd(this,{values:n},!0)}get(t){return this[Xn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...dT(t,Xn.normalizeUnit)};return jd(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return jd(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Dq(this.matrix,t),jd(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=g$e(this.normalize().shiftToAll().toObject());return jd(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Xn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of zp)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;vf(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else vf(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return Dq(this.matrix,n),jd(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return jd(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of zp)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Ym="Invalid Interval";function y$e(e,t){return!e||!e.isValid?uo.invalid("missing or invalid start"):!t||!t.isValid?uo.invalid("missing or invalid end"):t<e?uo.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class uo{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new _i("need to specify a reason the Interval is invalid");const r=t instanceof $l?t:new $l(t,n);if(to.throwOnInvalid)throw new B2e(r);return new uo({invalid:r})}static fromDateTimes(t,n){const r=n0(t),o=n0(n),i=y$e(r,o);return i??new uo({start:r,end:o})}static after(t,n){const r=Xn.fromDurationLike(n),o=n0(t);return uo.fromDateTimes(o,o.plus(r))}static before(t,n){const r=Xn.fromDurationLike(n),o=n0(t);return uo.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=xt.fromISO(r,n),a=i.isValid}catch{a=!1}let s,l;try{s=xt.fromISO(o,n),l=s.isValid}catch{l=!1}if(a&&l)return uo.fromDateTimes(i,s);if(a){const c=Xn.fromISO(o,n);if(c.isValid)return uo.after(i,c)}else if(l){const c=Xn.fromISO(r,n);if(c.isValid)return uo.before(s,c)}}return uo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?uo.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(n0).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,s=+a>+this.e?this.e:a;r.push(uo.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Xn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const s=this.start.plus(n.mapUnits(l=>l*o));i=+s>+this.e?this.e:s,a.push(uo.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:uo.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return uo.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(uo.fromDateTimes(n,l.time)),n=null);return uo.merge(o)}difference(...t){return uo.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ym}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=lT,n={}){return this.isValid?Fi.create(this.s.loc.clone(n),t).formatInterval(this):Ym}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Ym}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ym}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Ym}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Ym}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Xn.invalid(this.invalidReason)}mapEndpoints(t){return uo.fromDateTimes(t(this.s),t(this.e))}}class $0{static hasDST(t=to.defaultZone){const n=xt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Wu.isValidZone(t)}static normalizeZone(t){return Xd(t,to.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||dr.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||dr.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||dr.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||dr.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||dr.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||dr.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||dr.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return dr.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return dr.create(n,null,"gregory").eras(t)}static features(){return{relative:woe(),localeWeek:Coe()}}}function kq(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Xn.fromMillis(r).as("days"))}function v$e(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=kq(l,c);return(u-u%7)/7}],["days",kq]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function b$e(e,t,n,r){let[o,i,a,s]=v$e(e,t,n);const l=t-o,c=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);c.length===0&&(a<t&&(a=o.plus({[s]:1})),a!==o&&(i[s]=(i[s]||0)+l/(a-o)));const u=Xn.fromObject(i,r);return c.length>0?Xn.fromMillis(l,r).shiftTo(...c).plus(u):u}const x$e="missing Intl.DateTimeFormat.formatToParts support";function or(e,t=n=>n){return{regex:e,deser:([n])=>t(c_e(n))}}const S$e=" ",zoe=`[ ${S$e}]`,Voe=new RegExp(zoe,"g");function w$e(e){return e.replace(/\./g,"\\.?").replace(Voe,zoe)}function _q(e){return e.replace(/\./g,"").replace(Voe," ").toLowerCase()}function vl(e,t){return e===null?null:{regex:RegExp(e.map(w$e).join("|")),deser:([n])=>e.findIndex(r=>_q(n)===_q(r))+t}}function $q(e,t){return{regex:e,deser:([,n,r])=>MI(n,r),groups:t}}function M1(e){return{regex:e,deser:([t])=>t}}function C$e(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function E$e(e,t){const n=yl(t),r=yl(t,"{2}"),o=yl(t,"{3}"),i=yl(t,"{4}"),a=yl(t,"{6}"),s=yl(t,"{1,2}"),l=yl(t,"{1,3}"),c=yl(t,"{1,6}"),u=yl(t,"{1,9}"),f=yl(t,"{2,4}"),p=yl(t,"{4,6}"),m=v=>({regex:RegExp(C$e(v.val)),deser:([w])=>w,literal:!0}),y=(v=>{if(e.literal)return m(v);switch(v.val){case"G":return vl(t.eras("short"),0);case"GG":return vl(t.eras("long"),0);case"y":return or(c);case"yy":return or(f,cL);case"yyyy":return or(i);case"yyyyy":return or(p);case"yyyyyy":return or(a);case"M":return or(s);case"MM":return or(r);case"MMM":return vl(t.months("short",!0),1);case"MMMM":return vl(t.months("long",!0),1);case"L":return or(s);case"LL":return or(r);case"LLL":return vl(t.months("short",!1),1);case"LLLL":return vl(t.months("long",!1),1);case"d":return or(s);case"dd":return or(r);case"o":return or(l);case"ooo":return or(o);case"HH":return or(r);case"H":return or(s);case"hh":return or(r);case"h":return or(s);case"mm":return or(r);case"m":return or(s);case"q":return or(s);case"qq":return or(r);case"s":return or(s);case"ss":return or(r);case"S":return or(l);case"SSS":return or(o);case"u":return M1(u);case"uu":return M1(s);case"uuu":return or(n);case"a":return vl(t.meridiems(),0);case"kkkk":return or(i);case"kk":return or(f,cL);case"W":return or(s);case"WW":return or(r);case"E":case"c":return or(n);case"EEE":return vl(t.weekdays("short",!1),1);case"EEEE":return vl(t.weekdays("long",!1),1);case"ccc":return vl(t.weekdays("short",!0),1);case"cccc":return vl(t.weekdays("long",!0),1);case"Z":case"ZZ":return $q(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return $q(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return M1(/[a-z_+-/]{1,256}?/i);case" ":return M1(/[^\S\n\r]/);default:return m(v)}})(e)||{invalidReason:x$e};return y.token=e,y}const T$e={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function O$e(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=T$e[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function I$e(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function P$e(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(fy(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function A$e(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return mn(e.z)||(n=Wu.create(e.z)),mn(e.Z)||(n||(n=new ea(e.Z)),r=e.Z),mn(e.q)||(e.M=(e.q-1)*3+1),mn(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),mn(e.u)||(e.S=LB(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let KR=null;function M$e(){return KR||(KR=xt.fromMillis(1555555555555)),KR}function R$e(e,t){if(e.literal)return e;const n=Fi.macroTokenToFormatOpts(e.val),r=qoe(n,t);return r==null||r.includes(void 0)?e:r}function Hoe(e,t){return Array.prototype.concat(...e.map(n=>R$e(n,t)))}class Uoe{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Hoe(Fi.parseFormat(n),t),this.units=this.tokens.map(r=>E$e(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=I$e(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=P$e(t,this.regex,this.handlers),[o,i,a]=r?A$e(r):[null,null,void 0];if(fy(r,"a")&&fy(r,"H"))throw new gg("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Goe(e,t,n){return new Uoe(e,n).explainFromTokens(t)}function D$e(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=Goe(e,t,n);return[r,o,i,a]}function qoe(e,t){if(!e)return null;const r=Fi.create(t,e).dtFormatter(M$e()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>O$e(a,e,i))}const YR="Invalid DateTime",k$e=864e13;function N0(e){return new $l("unsupported zone",`the zone "${e.name}" is not supported`)}function QR(e){return e.weekData===null&&(e.weekData=cT(e.c)),e.weekData}function XR(e){return e.localWeekData===null&&(e.localWeekData=cT(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function vp(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new xt({...n,...t,old:n})}function Woe(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function R1(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function CE(e,t,n){return Woe(AI(e),t,n)}function Nq(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,uT(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=AI(i);let[l,c]=Woe(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function Qm(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=xt.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return xt.invalid(new $l("unparsable",`the input "${o}" can't be parsed as ${r}`))}function D1(e,t,n=!0){return e.isValid?Fi.create(dr.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function JR(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Mo(e.c.year,n?6:4),t?(r+="-",r+=Mo(e.c.month),r+="-",r+=Mo(e.c.day)):(r+=Mo(e.c.month),r+=Mo(e.c.day)),r}function Lq(e,t,n,r,o,i){let a=Mo(e.c.hour);return t?(a+=":",a+=Mo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Mo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Mo(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Mo(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Mo(Math.trunc(-e.o/60)),a+=":",a+=Mo(Math.trunc(-e.o%60))):(a+="+",a+=Mo(Math.trunc(e.o/60)),a+=":",a+=Mo(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const Koe={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},_$e={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},$$e={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Yoe=["year","month","day","hour","minute","second","millisecond"],N$e=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],L$e=["year","ordinal","hour","minute","second","millisecond"];function F$e(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Kre(e);return t}function Fq(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return F$e(e)}}function j$e(e){if(L0===void 0&&(L0=to.now()),e.type!=="iana")return e.offset(L0);const t=e.name;let n=uL.get(t);return n===void 0&&(n=e.offset(L0),uL.set(t,n)),n}function jq(e,t){const n=Xd(t.zone,to.defaultZone);if(!n.isValid)return xt.invalid(N0(n));const r=dr.fromObject(t);let o,i;if(mn(e.year))o=to.now();else{for(const l of Yoe)mn(e[l])&&(e[l]=Koe[l]);const a=xoe(e)||Soe(e);if(a)return xt.invalid(a);const s=j$e(n);[o,i]=CE(e,s,n)}return new xt({ts:o,zone:n,loc:r,o:i})}function Bq(e,t,n){const r=mn(n.round)?!0:n.round,o=(a,s)=>(a=FB(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function zq(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let L0;const uL=new Map;class xt{constructor(t){const n=t.zone||to.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new $l("invalid input"):null)||(n.isValid?null:N0(n));this.ts=mn(t.ts)?to.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=vf(t.o)&&!t.old?t.o:n.offset(this.ts);o=R1(this.ts,s),r=Number.isNaN(o.year)?new $l("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||dr.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new xt({})}static local(){const[t,n]=zq(arguments),[r,o,i,a,s,l,c]=n;return jq({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=zq(arguments),[r,o,i,a,s,l,c]=n;return t.zone=ea.utcInstance,jq({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=h_e(t)?t.valueOf():NaN;if(Number.isNaN(r))return xt.invalid("invalid input");const o=Xd(n.zone,to.defaultZone);return o.isValid?new xt({ts:r,zone:o,loc:dr.fromObject(n)}):xt.invalid(N0(o))}static fromMillis(t,n={}){if(vf(t))return t<-864e13||t>k$e?xt.invalid("Timestamp out of range"):new xt({ts:t,zone:Xd(n.zone,to.defaultZone),loc:dr.fromObject(n)});throw new _i(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(vf(t))return new xt({ts:t*1e3,zone:Xd(n.zone,to.defaultZone),loc:dr.fromObject(n)});throw new _i("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Xd(n.zone,to.defaultZone);if(!r.isValid)return xt.invalid(N0(r));const o=dr.fromObject(n),i=dT(t,Fq),{minDaysInFirstWeek:a,startOfWeek:s}=Oq(i,o),l=to.now(),c=mn(n.specificOffset)?r.offset(l):n.specificOffset,u=!mn(i.ordinal),f=!mn(i.year),p=!mn(i.month)||!mn(i.day),m=f||p,g=i.weekYear||i.weekNumber;if((m||u)&&g)throw new gg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(p&&u)throw new gg("Can't mix ordinal dates with month/day");const y=g||i.weekday&&!m;let v,w,C=R1(l,c);y?(v=N$e,w=_$e,C=cT(C,a,s)):u?(v=L$e,w=$$e,C=WR(C)):(v=Yoe,w=Koe);let E=!1;for(const A of v){const _=i[A];mn(_)?E?i[A]=w[A]:i[A]=C[A]:E=!0}const I=y?d_e(i,a,s):u?f_e(i):xoe(i),O=I||Soe(i);if(O)return xt.invalid(O);const P=y?Eq(i,a,s):u?Tq(i):i,[R,D]=CE(P,c,r),M=new xt({ts:R,zone:r,o:D,loc:o});return i.weekday&&m&&t.weekday!==M.weekday?xt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${M.toISO()}`):M.isValid?M:xt.invalid(M.invalid)}static fromISO(t,n={}){const[r,o]=r$e(t);return Qm(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=o$e(t);return Qm(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=i$e(t);return Qm(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(mn(t)||mn(n))throw new _i("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=dr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=D$e(a,t,n);return u?xt.invalid(u):Qm(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return xt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=f$e(t);return Qm(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new _i("need to specify a reason the DateTime is invalid");const r=t instanceof $l?t:new $l(t,n);if(to.throwOnInvalid)throw new j2e(r);return new xt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=qoe(t,dr.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return Hoe(Fi.parseFormat(t),dr.fromObject(n)).map(o=>o.val).join("")}static resetCache(){L0=void 0,uL.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?QR(this).weekYear:NaN}get weekNumber(){return this.isValid?QR(this).weekNumber:NaN}get weekday(){return this.isValid?QR(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?XR(this).weekday:NaN}get localWeekNumber(){return this.isValid?XR(this).weekNumber:NaN}get localWeekYear(){return this.isValid?XR(this).weekYear:NaN}get ordinal(){return this.isValid?WR(this.c).ordinal:NaN}get monthShort(){return this.isValid?$0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?$0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?$0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?$0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=AI(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=R1(l,a),f=R1(c,s);return u.hour===f.hour&&u.minute===f.minute&&u.second===f.second&&u.millisecond===f.millisecond?[vp(this,{ts:l}),vp(this,{ts:c})]:[this]}get isInLeapYear(){return pw(this.year)}get daysInMonth(){return uT(this.year,this.month)}get daysInYear(){return this.isValid?Ng(this.year):NaN}get weeksInWeekYear(){return this.isValid?Nx(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Nx(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Fi.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(ea.instance(t),n)}toLocal(){return this.setZone(to.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Xd(t,to.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=CE(a,i,t)}return vp(this,{ts:o,zone:t})}else return xt.invalid(N0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return vp(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=dT(t,Fq),{minDaysInFirstWeek:r,startOfWeek:o}=Oq(n,this.loc),i=!mn(n.weekYear)||!mn(n.weekNumber)||!mn(n.weekday),a=!mn(n.ordinal),s=!mn(n.year),l=!mn(n.month)||!mn(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new gg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new gg("Can't mix ordinal dates with month/day");let f;i?f=Eq({...cT(this.c,r,o),...n},r,o):mn(n.ordinal)?(f={...this.toObject(),...n},mn(n.day)&&(f.day=Math.min(uT(f.year,f.month),f.day))):f=Tq({...WR(this.c),...n});const[p,m]=CE(f,this.o,this.zone);return vp(this,{ts:p,o:m})}plus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t);return vp(this,Nq(this,n))}minus(t){if(!this.isValid)return this;const n=Xn.fromDurationLike(t).negate();return vp(this,Nq(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Xn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?Fi.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):YR}toLocaleString(t=lT,n={}){return this.isValid?Fi.create(this.loc.clone(n),t).formatDateTime(this):YR}toLocaleParts(t={}){return this.isValid?Fi.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let s=JR(this,a);return s+="T",s+=Lq(this,a,n,r,o,i),s}toISODate({format:t="extended"}={}){return this.isValid?JR(this,t==="extended"):null}toISOWeekDate(){return D1(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+Lq(this,a==="extended",n,t,r,i):null}toRFC2822(){return D1(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return D1(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?JR(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),D1(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():YR}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return Xn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=m_e(n).map(Xn.normalizeUnit),a=t.valueOf()>this.valueOf(),s=a?this:t,l=a?t:this,c=b$e(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(xt.now(),t,n)}until(t){return this.isValid?uo.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||xt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),Bq(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?Bq(t.base||xt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(xt.isDateTime))throw new _i("min requires all arguments be DateTimes");return Iq(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(xt.isDateTime))throw new _i("max requires all arguments be DateTimes");return Iq(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=dr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return Goe(a,t,n)}static fromStringExplain(t,n,r={}){return xt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=dr.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new Uoe(i,t)}static fromFormatParser(t,n,r={}){if(mn(t)||mn(n))throw new _i("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=dr.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new _i(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?xt.invalid(u):Qm(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return lT}static get DATE_MED(){return Yre}static get DATE_MED_WITH_WEEKDAY(){return V2e}static get DATE_FULL(){return Qre}static get DATE_HUGE(){return Xre}static get TIME_SIMPLE(){return Jre}static get TIME_WITH_SECONDS(){return Zre}static get TIME_WITH_SHORT_OFFSET(){return eoe}static get TIME_WITH_LONG_OFFSET(){return toe}static get TIME_24_SIMPLE(){return noe}static get TIME_24_WITH_SECONDS(){return roe}static get TIME_24_WITH_SHORT_OFFSET(){return ooe}static get TIME_24_WITH_LONG_OFFSET(){return ioe}static get DATETIME_SHORT(){return aoe}static get DATETIME_SHORT_WITH_SECONDS(){return soe}static get DATETIME_MED(){return loe}static get DATETIME_MED_WITH_SECONDS(){return coe}static get DATETIME_MED_WITH_WEEKDAY(){return H2e}static get DATETIME_FULL(){return uoe}static get DATETIME_FULL_WITH_SECONDS(){return doe}static get DATETIME_HUGE(){return foe}static get DATETIME_HUGE_WITH_SECONDS(){return poe}}function n0(e){if(xt.isDateTime(e))return e;if(e&&e.valueOf&&vf(e.valueOf()))return xt.fromJSDate(e);if(e&&typeof e=="object")return xt.fromObject(e);throw new _i(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Vq=3,Hq=25,Uq=1e3,Gq=1,qq=16,B$e=12;class ol{constructor(t){Ce(this,"id");Ce(this,"name");Ce(this,"description");Ce(this,"created");Ce(this,"start");Ce(this,"end");Ce(this,"fitInWeek");Ce(this,"isTemplate");Ce(this,"isPublic");Ce(this,"days",[]);Ce(this,"dayData",[]);this.id=t.id??null,this.name=t.name,this.description=t.description,this.created=t.created,this.start=t.start,this.end=t.end,this.fitInWeek=t.fitInWeek,this.isTemplate=t.isTemplate??!1,this.isPublic=t.isPublic??!1,this.days=t.days??[],this.dayData=t.dayData??[]}get isNotTemplate(){return!this.isTemplate}get exercises(){return this.days.flatMap(t=>t.slots.flatMap(n=>n.entries.flatMap(r=>r.exercise)))}get dayDataCurrentIteration(){const t=this.getIteration()??1;return this.dayData.filter(n=>n.iteration===t)}get groupedDayDataByIteration(){const t={};for(const n of this.dayData)t[n.iteration]||(t[n.iteration]=[]),t[n.iteration].push(n);return t}get duration(){const t=xt.fromJSDate(this.end).diff(xt.fromJSDate(this.start),["weeks","days"]),n=Math.floor(t.weeks),r=Math.floor(t.days);return{weeks:n,days:r}}get durationText(){const t=this.duration.days,n=this.duration.weeks;return t===0?lr.t("durationWeeks",{number:n}):lr.t("durationWeeksDays",{nrWeeks:n,nrDays:t})}get mainMuscles(){return this.days.flatMap(n=>n.slots.flatMap(r=>r.entries.flatMap(o=>{var i;return((i=o.exercise)==null?void 0:i.muscles)||[]}))).filter((n,r,o)=>r===o.findIndex(i=>i.id===n.id))}get secondaryMuscles(){return this.days.flatMap(n=>n.slots.flatMap(r=>r.entries.flatMap(o=>{var i;return((i=o.exercise)==null?void 0:i.musclesSecondary)||[]}))).filter((n,r,o)=>r===o.findIndex(i=>i.id===n.id))}get cycleLength(){return this.dayDataCurrentIteration.length}static fromJson(t){return Wq.fromJson(t)}static clone(t){return new ol({id:t.id,name:t.name,description:t.description,created:new Date,start:new Date(t.start),end:new Date(t.end),fitInWeek:t.fitInWeek,isTemplate:t.isTemplate,isPublic:t.isPublic})}toJson(){return Wq.toJson(this)}getIteration(t){const n=t??new Date,r=this.dayData.find(o=>xa(o.date,n));return r?r.iteration:null}getSetConfigData(t,n,r){const o=this.dayData.find(a=>{var s;return((s=a.day)==null?void 0:s.id)===t&&a.iteration===n});if(!o)return null;const i=o.slots.find(a=>a.setConfigs.some(s=>s.slotEntryId===r));return(i==null?void 0:i.setConfigs.find(a=>a.slotEntryId===r))||null}getDayData(t,n){return this.dayData.filter(r=>{var o;return((o=r.day)==null?void 0:o.id)===t&&r.date.getDate()===n.getDate()&&r.date.getMonth()===n.getMonth()&&r.date.getFullYear()===n.getFullYear()})}}class z$e{fromJson(t){return new ol({id:t.id,name:t.name,description:t.description,created:new Date(t.created),start:new Date(t.start),end:new Date(t.end),fitInWeek:t.fit_in_week,isTemplate:t.is_template,isPublic:t.is_public,days:t.days?t.days.map(n=>new Gre(n)):[]})}toJson(t){return{...t.id!=null?{id:t.id}:{},name:t.name,description:t.description,start:Zn(t.start),end:Zn(t.end),fit_in_week:t.fitInWeek,is_template:t.isTemplate,is_public:t.isPublic}}}const Wq=new z$e;class V$e{constructor(t){Ce(this,"exercise");Ce(this,"weightUnit",null);Ce(this,"repetitionsUnit",null);Ce(this,"exerciseId");Ce(this,"slotEntryId");Ce(this,"type");Ce(this,"nrOfSets");Ce(this,"maxNrOfSets");Ce(this,"weight");Ce(this,"maxWeight");Ce(this,"weightUnitId",null);Ce(this,"weightRounding",null);Ce(this,"repetitions");Ce(this,"maxRepetitions");Ce(this,"repetitionsUnitId",null);Ce(this,"repetitionsRounding",null);Ce(this,"rir");Ce(this,"maxRir");Ce(this,"rpe");Ce(this,"restTime");Ce(this,"maxRestTime");Ce(this,"textRepr");Ce(this,"comment");this.exerciseId=t.exerciseId,this.exercise=t.exercise,this.slotEntryId=t.slotEntryId,this.type=t.type,this.nrOfSets=t.nrOfSets,this.maxNrOfSets=t.maxNrOfSets??null,this.weight=t.weight??null,this.maxWeight=t.maxWeight??null,this.weightUnitId=t.weightUnitId,this.weightUnit=t.weightUnit??null,this.weightRounding=t.weightRounding,this.repetitions=t.repetitions??null,this.maxRepetitions=t.maxRepetitions??null,this.repetitionsUnitId=t.repetitionsUnitId,this.repetitionsUnit=t.repetitionsUnit??null,this.repetitionsRounding=t.repetitionsRounding,this.rir=t.rir??null,this.maxRir=t.maxRir??null,this.rpe=t.rpe??null,this.restTime=t.restTime??null,this.maxRestTime=t.maxRestTime??null,this.textRepr=t.textRepr,this.comment=t.comment}get isSpecialType(){return this.type!=="normal"}}class H$e{constructor(){Ce(this,"fromJson",t=>new V$e({exerciseId:t.exercise,slotEntryId:t.slot_entry_id,type:t.type,nrOfSets:t.sets,maxNrOfSets:t.max_sets!==null?parseInt(t.max_sets):null,weight:t.weight!==null?parseFloat(t.weight):null,maxWeight:t.max_weight!==null?parseFloat(t.max_weight):null,weightUnitId:t.weight_unit,weightRounding:t.weight_rounding!==null?parseFloat(t.weight_rounding):null,repetitions:t.repetitions!==null?parseFloat(t.repetitions):null,maxRepetitions:t.max_repetitions!==null?parseFloat(t.max_repetitions):null,repetitionsUnitId:t.repetitions_unit,repetitionsRounding:t.repetitions_rounding!==null?parseFloat(t.repetitions_rounding):null,rir:t.rir!==null?parseFloat(t.rir):null,maxRir:t.max_rir!==null?parseFloat(t.max_rir):null,rpe:t.rpe!==null?parseFloat(t.rpe):null,restTime:t.rest!==null?parseInt(t.rest):null,maxRestTime:t.max_rest!==null?parseInt(t.max_rest):null,textRepr:t.text_repr,comment:t.comment}))}}class U$e{constructor(t,n,r,o,i){Ce(this,"exercises",[]);this.comment=t,this.isSuperset=n,this.exerciseIds=r,this.setConfigs=o,this.exercises=i??[]}}class G$e{constructor(){Ce(this,"fromJson",t=>new U$e(t.comment,t.is_superset,t.exercises,t.sets.map(n=>new H$e().fromJson(n))))}}class q$e{constructor(t,n,r,o,i){Ce(this,"slots",[]);this.iteration=t,this.date=n,this.label=r,this.day=o,this.slots=i??[]}}class W$e{constructor(){Ce(this,"fromJson",t=>new q$e(t.iteration,new Date(t.date),t.label,t.day!=null?new OI().fromJson(t.day):null,t.slots.map(n=>new G$e().fromJson(n))))}}class K$e{constructor(t){Ce(this,"id");Ce(this,"date");Ce(this,"iteration");Ce(this,"exerciseId");Ce(this,"slotEntryId");Ce(this,"sessionId");Ce(this,"routineId");Ce(this,"repetitionUnitObj");Ce(this,"repetitionUnitId");Ce(this,"repetitions");Ce(this,"repetitionsTarget");Ce(this,"weightUnitObj");Ce(this,"weightUnitId");Ce(this,"weight");Ce(this,"weightTarget");Ce(this,"rir");Ce(this,"rirTarget");Ce(this,"restTime");Ce(this,"restTimeTarget");Ce(this,"exerciseObj");this.id=t.id,this.date=typeof t.date=="string"?new Date(t.date):t.date,this.iteration=t.iteration,this.slotEntryId=t.slotEntryId,this.sessionId=t.sessionId||null,this.routineId=t.routineId||null,this.exerciseObj=t.exercise,this.exerciseId=t.exerciseId,this.repetitionUnitObj=t.repetitionsUnit||null,this.repetitionUnitId=t.repetitionsUnitId||null,this.repetitions=t.repetitions,this.repetitionsTarget=t.repetitionsTarget||null,this.weightUnitObj=t.weightUnit||null,this.weightUnitId=t.weightUnitId||null,this.weight=t.weight,this.weightTarget=t.weightTarget||null,this.rir=t.rir,this.rirTarget=t.rirTarget||null,this.restTime=t.restTime||null,this.restTimeTarget=t.restTimeTarget||null}get rirString(){return this.rir===null?"-/-":this.rir.toString()}}class DI{constructor(){Ce(this,"fromJson",t=>new K$e({id:t.id,date:t.date,iteration:t.iteration,exerciseId:t.exercise,slotEntryId:t.slot_entry,sessionId:t.session,routineId:t.routine,repetitionsUnitId:t.repetitions_unit,repetitions:t.repetitions===null?null:Number.parseFloat(t.repetitions),repetitionsTarget:t.repetitions_target===null?null:Number.parseFloat(t.repetitions_target),weightUnitId:t.weight_unit,weight:t.weight===null?null:Number.parseFloat(t.weight),weightTarget:t.weight_target===null?null:Number.parseFloat(t.weight_target),rir:t.rir===null?null:Number.parseFloat(t.rir),rirTarget:t.rir_target===null?null:Number.parseFloat(t.rir_target),restTime:t.rest,restTimeTarget:t.rest_target}));Ce(this,"toJson",t=>({id:t.id,iteration:t.iteration,date:t.date.toISOString(),slot_entry:t.slotEntryId,exercise:t.exerciseId,routine:t.routineId,repetitions_unit:t.repetitionUnitId,repetitions:t.repetitions,repetitions_target:t.repetitionsTarget,weight_unit:t.weightUnitId,weight:t.weight,weight_target:t.weightTarget,rir:t.rir,rir_target:t.rirTarget,rest:t.restTime,rest_target:t.restTimeTarget}))}}const Kq=1e3,dL="1",ug="2",fL="3";class Y$e{constructor(t){Ce(this,"id");Ce(this,"dayId");Ce(this,"routineId");Ce(this,"date");Ce(this,"notes");Ce(this,"impression");Ce(this,"timeStart");Ce(this,"timeEnd");Ce(this,"dayObj");Ce(this,"logs",[]);this.id=t.id,this.dayId=t.dayId,this.routineId=t.routineId,this.date=t.date,this.notes=t.notes,this.impression=t.impression,this.timeStart=t.timeStart,this.timeEnd=t.timeEnd,t.dayObj&&(this.dayObj=t.dayObj),this.logs=t.logs??[]}get impressionString(){switch(this.impression){case dL:return lr.t("routines.impressionBad");case ug:return lr.t("routines.impressionNeutral");case fL:return lr.t("routines.impressionGood");default:return""}}get textRepresentation(){const t=this.timeStart&&this.timeEnd?`${this.timeStart.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} - ${this.timeEnd.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} /`:"",n=this.notes??"";return`${this.impressionString} ${t} ${n}`}}class gw{constructor(){Ce(this,"fromJson",t=>new Y$e({id:t.id,dayId:t.day,routineId:t.routine,date:new Date(t.date),notes:t.notes!==void 0?t.notes:null,impression:t.impression,timeStart:t.time_start!==void 0?HN(t.time_start):null,timeEnd:t.time_end!==void 0?HN(t.time_end):null,dayObj:t.dayObj,logs:t.logs}));Ce(this,"toJson",t=>({id:t.id,day:t.dayId,date:Zn(t.date),routine:t.routineId,notes:t.notes,impression:t.impression,time_start:Dx(t.timeStart),time_end:Dx(t.timeEnd)}))}}class Q$e{constructor(t,n){this.session=t,this.logs=n}}class X$e{constructor(){Ce(this,"fromJson",t=>new Q$e(new gw().fromJson(t.session),t.logs.map(n=>new DI().fromJson(n))))}}class J$e{constructor(t,n){Ce(this,"id");Ce(this,"name");this.id=t,this.name=n}}class Z$e{fromJson(t){return new J$e(t.id,t.name)}toJson(t){return{}}}class eNe{constructor(t,n){Ce(this,"id");Ce(this,"name");this.id=t,this.name=n}}class tNe{fromJson(t){return new eNe(t.id,t.name)}toJson(t){return{}}}const nNe="setting-repetitionunit",rNe="setting-weightunit",Qoe=async()=>{const e=ft(nNe),{data:t}=await it.get(e,{headers:ht()}),n=new Z$e;return t.results.map(r=>n.fromJson(r))},Xoe=async()=>{const e=ft(rNe),{data:t}=await it.get(e,{headers:ht()}),n=new tNe;return t.results.map(r=>n.fromJson(r))},oNe="structure",iNe="logs",aNe="stats",sNe="date-sequence-display",k1={},Joe=async e=>{var f;const t=await it.get(ft(St.ROUTINE,{id:e}),{headers:ht()}),n=ol.fromJson(t.data),r=await Promise.all([Qoe(),Xoe(),gNe(e),yNe(e)]),o=r[0],i=r[1],a=r[2],s=r[3],l=new Set;for(const p of a.filter(m=>m.day!==null&&m.iteration===1))for(const m of p.slots)for(const g of m.setConfigs)l.add(g.exerciseId);const c=Array.from(l).map(p=>hv(p));(await Promise.all(c)).forEach(p=>{k1[p.id]=p});for(const p of a)for(const m of p.slots){for(const g of m.setConfigs)g.exercise=k1[g.exerciseId],g.repetitionsUnitId!==null&&(g.repetitionsUnit=o.find(y=>y.id===g.repetitionsUnitId)??null),g.weightUnitId!==null&&(g.weightUnit=i.find(y=>y.id===g.weightUnitId)??null);for(const g of m.exerciseIds)(f=m.exercises)==null||f.push(k1[g])}for(const p of s)for(const m of p.slots)for(const g of m.entries)g.exercise=k1[g.exerciseId],g.repetitionUnitId!==null&&(g.repetitionUnit=o.find(y=>y.id===g.repetitionUnitId)??null),g.weightUnitId!==null&&(g.weightUnit=i.find(y=>y.id===g.weightUnitId)??null);return n.dayData=a,n.days=s,n},lNe=async()=>{const e=ft(St.ROUTINE,{query:{limit:"1",is_template:!1}}),t=await it.get(e,{headers:ht()});return t.data.count===0?null:await Joe(t.data.results[0].id)},cNe=async e=>await Joe(e),uNe=async()=>{const e=ft(St.ROUTINE,{query:{is_public:!1}});return(await it.get(e,{headers:ht()})).data.results.map(n=>ol.fromJson(n)).filter(n=>n.isNotTemplate)},dNe=async()=>{const e=ft(St.PRIVATE_TEMPLATE);return(await it.get(e,{headers:ht()})).data.results.map(n=>ol.fromJson(n))},fNe=async()=>{const e=ft(St.PUBLIC_TEMPLATE);return(await it.get(e,{headers:ht()})).data.results.map(n=>ol.fromJson(n))},pNe=async e=>{const t=await it.post(ft(St.ROUTINE),e.toJson(),{headers:ht()});return ol.fromJson(t.data)},hNe=async e=>{const t=await it.patch(ft(St.ROUTINE,{id:e.id}),e.toJson(),{headers:ht()});return ol.fromJson(t.data)},mNe=async e=>(await it.delete(ft(St.ROUTINE,{id:e}),{headers:ht()})).status,gNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:sNe}),{headers:ht()}),n=new W$e;return t.data.map(r=>n.fromJson(r))},yNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:oNe}),{headers:ht()}),n=new OI;return t.data.days.map(r=>n.fromJson(r))},vNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:iNe}),{headers:ht()}),n=new X$e;return t.data.map(r=>n.fromJson(r))},bNe=async e=>{const t=await it.get(ft(St.ROUTINE,{id:e,objectMethod:aNe}),{headers:ht()});return new F2e().fromJson(t.data)};class xNe{constructor(t,n,r,o){Ce(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class kI{fromJson(t){return new xNe(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class SNe{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class _I{fromJson(t){return new SNe(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}async function*wh(e,t){for(t==null&&(t=ht());;){const r=(await it.get(e,{headers:t})).data;if(yield r.results,e=r.next,!e)break}}const yw="measurement-category",vw="measurement",wNe=async e=>{const{filtersetQueryCategories:t={},filtersetQueryEntries:n={}}=e||{},r=new kI,o=new _I,i=[];for await(const c of wh(ft(yw,{query:{...t}}),ht()))for(const u of c)i.push(r.fromJson(u));const a=i.map(async c=>{const u=[],f=ft(vw,{query:{category:c.id,...n}});for await(const p of wh(f,ht()))for(const m of p)u.push(o.fromJson(m));return u}),s=await Promise.all(a);let l;return s.forEach(c=>{c.length>0&&(l=c[0].category,i.findLast(u=>u.id===l).entries=c)}),i},CNe=async e=>{const{data:t}=await it.get(ft(yw,{id:e}),{headers:ht()}),n=new kI().fromJson(t),r=new _I,o=[],i=ft(vw,{query:{category:n.id}});for await(const a of wh(i,ht()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},ENe=async e=>{const t=await it.post(ft(yw),{name:e.name,unit:e.unit},{headers:ht()});return new kI().fromJson(t.data)},TNe=async e=>{const t=await it.patch(ft(yw,{id:e.id}),{name:e.name,unit:e.unit},{headers:ht()});return new kI().fromJson(t.data)},ONe=async e=>{await it.delete(ft(yw,{id:e}),{headers:ht()})},INe=async e=>{await it.delete(ft(vw,{id:e}),{headers:ht()})},PNe=async e=>{const t=await it.patch(ft(vw,{id:e.id}),{date:Zn(e.date),value:e.value,notes:e.notes},{headers:ht()});return new _I().fromJson(t.data)},ANe=async e=>{const t=await it.post(ft(vw),{category:e.categoryId,date:Zn(e.date),value:e.value,notes:e.notes},{headers:ht()});return new _I().fromJson(t.data)};class MNe{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class RNe{fromJson(t){return new MNe(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class DNe{constructor(t,n,r,o,i,a,s,l,c,u,f,p,m=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=f,this.sodium=p,this.image=m}}class Zoe{fromJson(t){return new DNe(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new RNe().fromJson(t.image))}}const kNe=async e=>{const{data:t}=await it.get(ft(St.INGREDIENT_PATH,{id:e}),{headers:ht()});return new Zoe().fromJson(t)},eie=async e=>{if(e.length===0)return[];const t=ft(St.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new Zoe,r=[];for await(const o of wh(t,ht()))for(const i of o)r.push(n.fromJson(i));return r},_Ne=async(e,t,n=!0)=>{const r=[t];t!==dy&&n&&r.push(dy);const o=ft(St.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await it.get(o);return i.suggestions};class $Ne{constructor(t,n,r,o,i,a,s){Ce(this,"ingredient",null);Ce(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?qa.fromIngredient(this.ingredient,this.amount,this.weightUnit):new qa}}class VB{fromJson(t){return new $Ne(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}const NNe=async e=>{const t=await it.post(ft(St.MEAL_ITEM),e,{headers:ht()});return new VB().fromJson(t.data)},LNe=async e=>{const t=await it.patch(ft(St.MEAL_ITEM,{id:e.id}),e,{headers:ht()});return new VB().fromJson(t.data)},FNe=async e=>{await it.delete(ft(St.MEAL_ITEM,{id:e}),{headers:ht()})};class jNe{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class BNe{fromJson(t){return new jNe(t.id,parseFloat(t.amount),t.gram)}}const tie=async e=>{if(e===null)return null;const{data:t}=await it.get(ft(St.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:ht()});return new BNe().fromJson(t)},zNe=async e=>{const t=await it.post(ft(St.MEAL),e,{headers:ht()});return new SB().fromJson(t.data)},VNe=async e=>{const t=await it.patch(ft(St.MEAL,{id:e.id}),e,{headers:ht()});return new SB().fromJson(t.data)},HNe=async e=>{await it.delete(ft(St.MEAL,{id:e}),{headers:ht()})},UNe=async e=>{let t=[];const n=new SB,r=new VB,{data:o}=await it.get(ft(St.MEAL,{query:{plan:e}}),{headers:ht()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await it.get(ft(St.MEAL_ITEM,{query:{meal:a.id}}),{headers:ht()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await eie(t);for(const u of l)u.weightUnit=await tie(u.weightUnitId),u.ingredient=c.find(f=>f.id===u.ingredientId);a.items=l}return i},GNe=async e=>(await it.delete(ft(St.WORKOUT_LOG,{id:e}),{headers:ht()})).status,qNe=async e=>{const t=new DI,n=await it.patch(ft(St.WORKOUT_LOG,{id:e.id}),t.toJson(e),{headers:ht()});return t.fromJson(n.data)},WNe=async e=>{const t=new DI,n=[];for(const r of e){const o=await it.post(ft(St.WORKOUT_LOG),{...r},{headers:ht()});n.push(t.fromJson(o.data))}return n},KNe=async e=>{const t=await it.patch(ft(St.SLOT_ENTRY,{id:e.id}),e,{headers:ht()});return DB.fromJson(t.data)},YNe=async e=>{await it.delete(ft(St.SLOT_ENTRY,{id:e}),{headers:ht()})},QNe=async e=>{const t=await it.post(ft(St.SLOT_ENTRY),e,{headers:ht()});return DB.fromJson(t.data)},XNe=async e=>{const t=await it.patch(ft(St.DAY,{id:e.id}),e,{headers:ht()});return new OI().fromJson(t.data)},JNe=async e=>{for(const t of e)await it.patch(ft(St.DAY,{id:t.id}),{order:t.order},{headers:ht()})},ZNe=async e=>{const t=await it.post(ft(St.DAY),e,{headers:ht()});return new OI().fromJson(t.data)},eLe=async e=>{await it.delete(ft(St.DAY,{id:e}),{headers:ht()})},tLe=async e=>{const t=await it.post(ft(St.SLOT),e,{headers:ht()});return new kB().fromJson(t.data)},nLe=async e=>{const t=await it.patch(ft(St.SLOT,{id:e.id}),e,{headers:ht()});return new kB().fromJson(t.data)},rLe=async e=>{for(const t of e)await it.patch(ft(St.SLOT,{id:t.id}),{order:t.order},{headers:ht()})},oLe=async e=>{await it.delete(ft(St.SLOT,{id:e}),{headers:ht()})},iLe=async({values:e,maxValues:t})=>{const n=async r=>{const{toAdd:o,toEdit:i,toDelete:a,apiPath:s}=r;for(const l of o)await nc(l,s);for(const l of i)await tc(l,s);for(const l of a)await Hc(l,s)};e!==void 0&&await n(e),t!==void 0&&await n(t)},tc=async(e,t)=>{const n=await it.patch(ft(t,{id:e.id}),e,{headers:ht()});return new RB().fromJson(n.data)},nc=async(e,t)=>{const n=await it.post(ft(t),e,{headers:ht()});return new RB().fromJson(n.data)},Hc=async(e,t)=>await it.delete(ft(t,{id:e}),{headers:ht()}),aLe=async e=>await tc(e,St.WEIGHT_CONFIG),sLe=async e=>await nc(e,St.WEIGHT_CONFIG),lLe=async e=>await Hc(e,St.WEIGHT_CONFIG),cLe=async e=>await tc(e,St.MAX_WEIGHT_CONFIG),uLe=async e=>await nc(e,St.MAX_WEIGHT_CONFIG),dLe=async e=>await Hc(e,St.MAX_WEIGHT_CONFIG),fLe=async e=>await tc(e,St.REPETITIONS_CONFIG),pLe=async e=>await nc(e,St.REPETITIONS_CONFIG),hLe=async e=>await Hc(e,St.REPETITIONS_CONFIG),mLe=async e=>await tc(e,St.MAX_REPS_CONFIG),gLe=async e=>await nc(e,St.MAX_REPS_CONFIG),yLe=async e=>await Hc(e,St.MAX_REPS_CONFIG),vLe=async e=>await tc(e,St.NR_OF_SETS_CONFIG),bLe=async e=>await nc(e,St.NR_OF_SETS_CONFIG),xLe=async e=>await Hc(e,St.NR_OF_SETS_CONFIG),SLe=async e=>await tc(e,St.MAX_NR_OF_SETS_CONFIG),wLe=async e=>await nc(e,St.MAX_NR_OF_SETS_CONFIG),CLe=async e=>await tc(e,St.RIR_CONFIG),ELe=async e=>await nc(e,St.RIR_CONFIG),TLe=async e=>await Hc(e,St.RIR_CONFIG),OLe=async e=>await tc(e,St.MAX_RIR_CONFIG),ILe=async e=>await nc(e,St.MAX_RIR_CONFIG),PLe=async e=>await Hc(e,St.MAX_RIR_CONFIG),ALe=async e=>await tc(e,St.REST_CONFIG),MLe=async e=>await nc(e,St.REST_CONFIG),RLe=async e=>await Hc(e,St.REST_CONFIG),DLe=async e=>await tc(e,St.MAX_REST_CONFIG),kLe=async e=>await nc(e,St.MAX_REST_CONFIG),_Le=async e=>await Hc(e,St.MAX_REST_CONFIG),$Le=async e=>{const t=await it.get(ft(St.SESSION,{query:e}),{headers:ht()});return t.data.count===1?new gw().fromJson(t.data.results[0]):null},NLe=async e=>{const{filtersetQuerySessions:t={},filtersetQueryLogs:n={}}=e||{},r=new gw,o=new DI,i=[],a=[],s={};for await(const l of wh(ft(St.WORKOUT_LOG,{query:{limit:YN,...n}}),ht()))for(const c of l)a.push(o.fromJson(c));for(const l of a)s[l.exerciseId]||(s[l.exerciseId]=await hv(l.exerciseId)),l.exerciseObj=s[l.exerciseId];for await(const l of wh(ft(St.SESSION,{query:{limit:YN,...t}}),ht()))for(const c of l){const u=r.fromJson(c);u.logs=a.filter(f=>f.sessionId===u.id),i.push(u)}return i},LLe=async e=>{const t=await it.post(ft(St.SESSION),e,{headers:ht()});return new gw().fromJson(t.data)},FLe=async e=>{const t=await it.patch(ft(St.SESSION,{id:e.id}),e,{headers:ht()});return new gw().fromJson(t.data)};class jLe{constructor(t,n,r,o,i,a,s,l,c){Ce(this,"ingredient",null);Ce(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?qa.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new qa)}}class HB{fromJson(t){return new jLe(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const nie=async e=>{const t=new HB,{filtersetQuery:n={},loadUnit:r=!0,loadIngredient:o=!0}=e||{},i=ft(St.NUTRITIONAL_DIARY,{query:{limit:YN,...n}}),a=[];for await(const s of wh(i,ht()))for(const l of s){const c=t.fromJson(l);r&&(c.weightUnit=await tie(c.weightUnitId)),o&&(c.ingredient=await kNe(c.ingredientId)),a.push(c)}return a},rie=async e=>{const t=await it.post(ft(St.NUTRITIONAL_DIARY),e,{headers:ht()});return new HB().fromJson(t.data)},BLe=async e=>{const t=await it.patch(ft(St.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:ht()});return new HB().fromJson(t.data)};class zLe{constructor(t){Ce(this,"username");Ce(this,"email");Ce(this,"emailVerified");Ce(this,"dateJoined");Ce(this,"isTrustworthy");Ce(this,"useMetric");Ce(this,"height");Ce(this,"weightRounding");Ce(this,"repetitionsRounding");this.username=t.username,this.email=t.email,this.emailVerified=t.emailVerified,this.dateJoined=t.dateJoined,this.isTrustworthy=t.isTrustworthy,this.useMetric=t.useMetric,this.height=t.height,this.weightRounding=t.weightRounding,this.repetitionsRounding=t.repetitionsRounding}}class oie{constructor(){Ce(this,"fromJson",t=>new zLe({username:t.username,email:t.email,emailVerified:t.email_verified,dateJoined:new Date(t.date_joined),isTrustworthy:t.is_trustworthy,useMetric:t.weight_unit==="kg",height:t.height,weightRounding:t.weight_rounding!==null?parseFloat(t.weight_rounding):null,repetitionsRounding:t.repetitions_rounding!==null?parseFloat(t.repetitions_rounding):null}));Ce(this,"toJson",t=>({email:t.email,height:t.height,weight_unit:t.useMetric?"kg":"lb",weight_rounding:t.weightRounding,repetitions_rounding:t.repetitionsRounding}))}}const VLe="userprofile",HLe=async()=>{const e=ft(VLe),t=new oie;try{const n=await it.get(e,{headers:ht()});return t.fromJson(n.data)}catch{return null}},ULe=async e=>{const t=await it.post(ft(St.API_PROFILE_PATH),e,{headers:ht()});return new oie().fromJson(t.data)},bv="nutritionplan",GLe=async()=>{const{data:e}=await it.get(ft(bv),{headers:ht()});return e.results.map(t=>cy.fromJson(t))},qLe=async()=>{const{data:e}=await it.get(ft(bv,{query:{limit:"1"}}),{headers:ht()});return e.count===0?null:await UB(e.results[0].id)},UB=async(e,t)=>{if(e===null)return null;const{filtersetQueryLogs:n={}}=t||{},{data:r}=await it.get(ft(bv,{id:e}),{headers:ht()}),o=[],i=cy.fromJson(r),a=await Promise.all([UNe(e),nie({filtersetQuery:{plan:e,...n}})]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{o.includes(l.ingredientId)||o.push(l.ingredientId)});const s=await eie(o);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},WLe=async e=>{const t=await it.post(ft(bv),cy.toJson(e),{headers:ht()});return cy.fromJson(t.data)},KLe=async e=>{const t=await it.patch(ft(bv,{id:e.id}),cy.toJson(e),{headers:ht()});return cy.fromJson(t.data)},YLe=async e=>{await it.delete(ft(bv,{id:e}),{headers:ht()})};function QLe(){return yr({queryKey:[st.NUTRITIONAL_PLANS],queryFn:()=>GLe()})}function XLe(){return yr({queryKey:[st.NUTRITIONAL_PLAN,"last"],queryFn:()=>qLe()})}function JLe(e){return yr({queryKey:[st.NUTRITIONAL_PLAN,e],queryFn:()=>UB(e)})}function ZLe(e,t,n=!0){return yr({queryKey:[st.NUTRITIONAL_PLAN,e,t],queryFn:()=>UB(e,{filtersetQueryLogs:{datetime__eq:Zn(new Date(t))}}),enabled:n})}const eFe=()=>{const e=Mt();return Dt({mutationFn:t=>WLe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[st.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN]})}})},tFe=e=>{const t=Mt();return Dt({mutationFn:n=>YLe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},nFe=e=>{const t=Mt();return Dt({mutationFn:n=>KLe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLANS]})}})},rFe=e=>yr({queryFn:()=>nie(e),queryKey:[st.NUTRITIONAL_PLAN_DIARY,JSON.stringify(e||{})]}),oFe=e=>{const t=Mt();return Dt({mutationFn:n=>rie(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})})},iie=e=>{const t=Mt();return Dt({mutationFn:n=>Promise.all(n.map(r=>rie(r))),onSuccess:()=>t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})})},iFe=e=>{const t=Mt();return Dt({mutationFn:n=>BLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})})},aFe=e=>{const t=Mt();return Dt({mutationFn:n=>zNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},sFe=e=>{const t=Mt();return Dt({mutationFn:n=>HNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},lFe=e=>{const t=Mt();return Dt({mutationFn:n=>VNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},cFe=e=>{const t=Mt();return Dt({mutationFn:n=>NNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},uFe=e=>{const t=Mt();return Dt({mutationFn:n=>LNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})},dFe=e=>{const t=Mt();return Dt({mutationFn:n=>FNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.NUTRITIONAL_PLAN,e]})}})};function $i(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function aie(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function $n(e,t){return aie(e,t,"gram")}function ZR(e,t){return aie(e,t,"percent")}const Fg=e=>{const{i18n:t}=je(),n=e.planned>0;return Q(Tt,{children:[S(Ene,{variant:"determinate",value:e.percentage<100?e.percentage:100}),Q(at,{variant:"caption",children:[e.title," — ",$n(e.logged,t.language),n&&Q(Tt,{children:[" / ",$n(e.planned,t.language)]})]})]})};var eD,Yq;function Aa(){if(Yq)return eD;Yq=1;var e=Array.isArray;return eD=e,eD}var tD,Qq;function sie(){if(Qq)return tD;Qq=1;var e=typeof p1=="object"&&p1&&p1.Object===Object&&p1;return tD=e,tD}var nD,Xq;function Uc(){if(Xq)return nD;Xq=1;var e=sie(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return nD=n,nD}var rD,Jq;function bw(){if(Jq)return rD;Jq=1;var e=Uc(),t=e.Symbol;return rD=t,rD}var oD,Zq;function fFe(){if(Zq)return oD;Zq=1;var e=bw(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(a){var s=n.call(a,o),l=a[o];try{a[o]=void 0;var c=!0}catch{}var u=r.call(a);return c&&(s?a[o]=l:delete a[o]),u}return oD=i,oD}var iD,eW;function pFe(){if(eW)return iD;eW=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return iD=n,iD}var aD,tW;function td(){if(tW)return aD;tW=1;var e=bw(),t=fFe(),n=pFe(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?o:r:i&&i in Object(s)?t(s):n(s)}return aD=a,aD}var sD,nW;function nd(){if(nW)return sD;nW=1;function e(t){return t!=null&&typeof t=="object"}return sD=e,sD}var lD,rW;function xv(){if(rW)return lD;rW=1;var e=td(),t=nd(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return lD=r,lD}var cD,oW;function GB(){if(oW)return cD;oW=1;var e=Aa(),t=xv(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,a){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||a!=null&&i in Object(a)}return cD=o,cD}var uD,iW;function zf(){if(iW)return uD;iW=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return uD=e,uD}var dD,aW;function qB(){if(aW)return dD;aW=1;var e=td(),t=zf(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==r||l==o||l==n||l==i}return dD=a,dD}var fD,sW;function hFe(){if(sW)return fD;sW=1;var e=Uc(),t=e["__core-js_shared__"];return fD=t,fD}var pD,lW;function mFe(){if(lW)return pD;lW=1;var e=hFe(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return pD=n,pD}var hD,cW;function lie(){if(cW)return hD;cW=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return hD=n,hD}var mD,uW;function gFe(){if(uW)return mD;uW=1;var e=qB(),t=mFe(),n=zf(),r=lie(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=RegExp("^"+l.call(c).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||t(p))return!1;var m=e(p)?u:i;return m.test(r(p))}return mD=f,mD}var gD,dW;function yFe(){if(dW)return gD;dW=1;function e(t,n){return t==null?void 0:t[n]}return gD=e,gD}var yD,fW;function Hh(){if(fW)return yD;fW=1;var e=gFe(),t=yFe();function n(r,o){var i=t(r,o);return e(i)?i:void 0}return yD=n,yD}var vD,pW;function $I(){if(pW)return vD;pW=1;var e=Hh(),t=e(Object,"create");return vD=t,vD}var bD,hW;function vFe(){if(hW)return bD;hW=1;var e=$I();function t(){this.__data__=e?e(null):{},this.size=0}return bD=t,bD}var xD,mW;function bFe(){if(mW)return xD;mW=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return xD=e,xD}var SD,gW;function xFe(){if(gW)return SD;gW=1;var e=$I(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return r.call(a,i)?a[i]:void 0}return SD=o,SD}var wD,yW;function SFe(){if(yW)return wD;yW=1;var e=$I(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var i=this.__data__;return e?i[o]!==void 0:n.call(i,o)}return wD=r,wD}var CD,vW;function wFe(){if(vW)return CD;vW=1;var e=$I(),t="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&o===void 0?t:o,this}return CD=n,CD}var ED,bW;function CFe(){if(bW)return ED;bW=1;var e=vFe(),t=bFe(),n=xFe(),r=SFe(),o=wFe();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,ED=i,ED}var TD,xW;function EFe(){if(xW)return TD;xW=1;function e(){this.__data__=[],this.size=0}return TD=e,TD}var OD,SW;function WB(){if(SW)return OD;SW=1;function e(t,n){return t===n||t!==t&&n!==n}return OD=e,OD}var ID,wW;function NI(){if(wW)return ID;wW=1;var e=WB();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return ID=t,ID}var PD,CW;function TFe(){if(CW)return PD;CW=1;var e=NI(),t=Array.prototype,n=t.splice;function r(o){var i=this.__data__,a=e(i,o);if(a<0)return!1;var s=i.length-1;return a==s?i.pop():n.call(i,a,1),--this.size,!0}return PD=r,PD}var AD,EW;function OFe(){if(EW)return AD;EW=1;var e=NI();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return AD=t,AD}var MD,TW;function IFe(){if(TW)return MD;TW=1;var e=NI();function t(n){return e(this.__data__,n)>-1}return MD=t,MD}var RD,OW;function PFe(){if(OW)return RD;OW=1;var e=NI();function t(n,r){var o=this.__data__,i=e(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return RD=t,RD}var DD,IW;function LI(){if(IW)return DD;IW=1;var e=EFe(),t=TFe(),n=OFe(),r=IFe(),o=PFe();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,DD=i,DD}var kD,PW;function KB(){if(PW)return kD;PW=1;var e=Hh(),t=Uc(),n=e(t,"Map");return kD=n,kD}var _D,AW;function AFe(){if(AW)return _D;AW=1;var e=CFe(),t=LI(),n=KB();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _D=r,_D}var $D,MW;function MFe(){if(MW)return $D;MW=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return $D=e,$D}var ND,RW;function FI(){if(RW)return ND;RW=1;var e=MFe();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return ND=t,ND}var LD,DW;function RFe(){if(DW)return LD;DW=1;var e=FI();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return LD=t,LD}var FD,kW;function DFe(){if(kW)return FD;kW=1;var e=FI();function t(n){return e(this,n).get(n)}return FD=t,FD}var jD,_W;function kFe(){if(_W)return jD;_W=1;var e=FI();function t(n){return e(this,n).has(n)}return jD=t,jD}var BD,$W;function _Fe(){if($W)return BD;$W=1;var e=FI();function t(n,r){var o=e(this,n),i=o.size;return o.set(n,r),this.size+=o.size==i?0:1,this}return BD=t,BD}var zD,NW;function YB(){if(NW)return zD;NW=1;var e=AFe(),t=RFe(),n=DFe(),r=kFe(),o=_Fe();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,zD=i,zD}var VD,LW;function cie(){if(LW)return VD;LW=1;var e=YB(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var a=arguments,s=o?o.apply(this,a):a[0],l=i.cache;if(l.has(s))return l.get(s);var c=r.apply(this,a);return i.cache=l.set(s,c)||l,c};return i.cache=new(n.Cache||e),i}return n.Cache=e,VD=n,VD}var HD,FW;function $Fe(){if(FW)return HD;FW=1;var e=cie(),t=500;function n(r){var o=e(r,function(a){return i.size===t&&i.clear(),a}),i=o.cache;return o}return HD=n,HD}var UD,jW;function NFe(){if(jW)return UD;jW=1;var e=$Fe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(a,s,l,c){i.push(l?c.replace(n,"$1"):s||a)}),i});return UD=r,UD}var GD,BW;function QB(){if(BW)return GD;BW=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=Array(o);++r<o;)i[r]=n(t[r],r,t);return i}return GD=e,GD}var qD,zW;function LFe(){if(zW)return qD;zW=1;var e=bw(),t=QB(),n=Aa(),r=xv(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function a(s){if(typeof s=="string")return s;if(n(s))return t(s,a)+"";if(r(s))return i?i.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return qD=a,qD}var WD,VW;function uie(){if(VW)return WD;VW=1;var e=LFe();function t(n){return n==null?"":e(n)}return WD=t,WD}var KD,HW;function die(){if(HW)return KD;HW=1;var e=Aa(),t=GB(),n=NFe(),r=uie();function o(i,a){return e(i)?i:t(i,a)?[i]:n(r(i))}return KD=o,KD}var YD,UW;function jI(){if(UW)return YD;UW=1;var e=xv();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return YD=t,YD}var QD,GW;function XB(){if(GW)return QD;GW=1;var e=die(),t=jI();function n(r,o){o=e(o,r);for(var i=0,a=o.length;r!=null&&i<a;)r=r[t(o[i++])];return i&&i==a?r:void 0}return QD=n,QD}var XD,qW;function fie(){if(qW)return XD;qW=1;var e=XB();function t(n,r,o){var i=n==null?void 0:e(n,r);return i===void 0?o:i}return XD=t,XD}var FFe=fie();const Ja=Gn(FFe);var JD,WW;function jFe(){if(WW)return JD;WW=1;function e(t){return t==null}return JD=e,JD}var BFe=jFe();const an=Gn(BFe);var ZD,KW;function zFe(){if(KW)return ZD;KW=1;var e=td(),t=Aa(),n=nd(),r="[object String]";function o(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return ZD=o,ZD}var VFe=zFe();const Ch=Gn(VFe);var HFe=qB();const rn=Gn(HFe);var UFe=zf();const Sv=Gn(UFe);var ek={exports:{}},ur={};/**
* @license React
* react-is.production.min.js
*
@@ -273,52 +273,52 @@ export default theme;`}function J$(e={},...t){const{breakpoints:n,mixins:r={},sp
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var KW;function UFe(){if(KW)return cr;KW=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var w=v.$$typeof;switch(w){case e:switch(v=v.type,v){case n:case o:case r:case c:case u:return v;default:switch(v=v&&v.$$typeof,v){case s:case a:case l:case h:case f:case i:return v;default:return w}}case t:return w}}}return cr.ContextConsumer=a,cr.ContextProvider=i,cr.Element=e,cr.ForwardRef=l,cr.Fragment=n,cr.Lazy=h,cr.Memo=f,cr.Portal=t,cr.Profiler=o,cr.StrictMode=r,cr.Suspense=c,cr.SuspenseList=u,cr.isAsyncMode=function(){return!1},cr.isConcurrentMode=function(){return!1},cr.isContextConsumer=function(v){return y(v)===a},cr.isContextProvider=function(v){return y(v)===i},cr.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},cr.isForwardRef=function(v){return y(v)===l},cr.isFragment=function(v){return y(v)===n},cr.isLazy=function(v){return y(v)===h},cr.isMemo=function(v){return y(v)===f},cr.isPortal=function(v){return y(v)===t},cr.isProfiler=function(v){return y(v)===o},cr.isStrictMode=function(v){return y(v)===r},cr.isSuspense=function(v){return y(v)===c},cr.isSuspenseList=function(v){return y(v)===u},cr.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===o||v===r||v===c||v===u||v===m||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===f||v.$$typeof===i||v.$$typeof===a||v.$$typeof===l||v.$$typeof===g||v.getModuleId!==void 0)},cr.typeOf=y,cr}var YW;function GFe(){return YW||(YW=1,ZD.exports=UFe()),ZD.exports}var qFe=GFe(),ek,QW;function fie(){if(QW)return ek;QW=1;var e=Zu(),t=ed(),n="[object Number]";function r(o){return typeof o=="number"||t(o)&&e(o)==n}return ek=r,ek}var tk,XW;function WFe(){if(XW)return tk;XW=1;var e=fie();function t(n){return e(n)&&n!=+n}return tk=t,tk}var KFe=WFe();const wv=Gn(KFe);var YFe=fie();const QFe=Gn(YFe);var ta=function(t){return t===0?0:t>0?1:-1},Bp=function(t){return Sh(t)&&t.indexOf("%")===t.length-1},mt=function(t){return QFe(t)&&!wv(t)},Vo=function(t){return mt(t)||Sh(t)},XFe=0,Bf=function(t){var n=++XFe;return"".concat(t||"").concat(n)},na=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!mt(t)&&!Sh(t))return r;var i;if(Bp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return wv(i)&&(i=r),o&&i>n&&(i=n),i},Qd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},JFe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o<n;o++)if(!r[t[o]])r[t[o]]=!0;else return!0;return!1},no=function(t,n){return mt(t)&&mt(n)?function(r){return t+r*(n-t)}:function(){return n}};function dT(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Ja(r,t))===n})}var ZFe=function(t){if(!t||!t.length)return null;for(var n=t.length,r=0,o=0,i=0,a=0,s=1/0,l=-1/0,c=0,u=0,f=0;f<n;f++)c=t[f].cx||0,u=t[f].cy||0,r+=c,o+=u,i+=c*u,a+=c*c,s=Math.min(s,c),l=Math.max(l,c);var h=n*a!==r*r?(n*i-r*o)/(n*a-r*r):0;return{xmin:s,xmax:l,a:h,b:(o-h*r)/n}},eje=function(t,n){return mt(t)&&mt(n)?t-n:Sh(t)&&Sh(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Fg(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function fL(e){"@babel/helpers - typeof";return fL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fL(e)}var tje=["viewBox","children"],nje=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","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","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","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","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],JW=["points","pathLength"],nk={svg:tje,polygon:JW,polyline:JW},XB=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],fT=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(x.isValidElement(t)&&(r=t.props),!Sv(r))return null;var o={};return Object.keys(r).forEach(function(i){XB.includes(i)&&(o[i]=n||function(a){return r[i](r,a)})}),o},rje=function(t,n,r){return function(o){return t(n,r,o),null}},If=function(t,n,r){if(!Sv(t)||fL(t)!=="object")return null;var o=null;return Object.keys(t).forEach(function(i){var a=t[i];XB.includes(i)&&typeof a=="function"&&(o||(o={}),o[i]=rje(a,n,r))}),o},oje=["children"],ije=["children"];function ZW(e,t){if(e==null)return{};var n=aje(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pL(e){"@babel/helpers - typeof";return pL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pL(e)}var e8={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ku=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},t8=null,rk=null,JB=function e(t){if(t===t8&&Array.isArray(rk))return rk;var n=[];return x.Children.forEach(t,function(r){on(r)||(qFe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),rk=n,t8=t,n};function sa(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return ku(o)}):r=[ku(t)],JB(e).forEach(function(o){var i=Ja(o,"type.displayName")||Ja(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function Va(e,t){var n=sa(e,t);return n&&n[0]}var n8=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!mt(r)||r<=0||!mt(o)||o<=0)},sje=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],lje=function(t){return t&&t.type&&Sh(t.type)&&sje.indexOf(t.type)>=0},pie=function(t){return t&&pL(t)==="object"&&"clipDot"in t},cje=function(t,n,r,o){var i,a=(i=nk==null?void 0:nk[o])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!rn(t)&&(o&&a.includes(n)||nje.includes(n))||r&&XB.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(x.isValidElement(t)&&(o=t.props),!Sv(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;cje((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},hL=function e(t,n){if(t===n)return!0;var r=x.Children.count(t);if(r!==x.Children.count(n))return!1;if(r===0)return!0;if(r===1)return r8(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o<r;o++){var i=t[o],a=n[o];if(Array.isArray(i)||Array.isArray(a)){if(!e(i,a))return!1}else if(!r8(i,a))return!1}return!0},r8=function(t,n){if(on(t)&&on(n))return!0;if(!on(t)&&!on(n)){var r=t.props||{},o=r.children,i=ZW(r,oje),a=n.props||{},s=a.children,l=ZW(a,ije);return o&&s?Fg(i,l)&&hL(o,s):!o&&!s?Fg(i,l):!1}return!1},o8=function(t,n){var r=[],o={};return JB(t).forEach(function(i,a){if(lje(i))r.push(i);else if(i){var s=ku(i.type),l=n[s]||{},c=l.handler,u=l.once;if(c&&(!u||!o[s])){var f=c(i,s,a);r.push(f),o[s]=!0}}}),r},uje=function(t){var n=t&&t.type;return n&&e8[n]?e8[n]:null},dje=function(t,n){return JB(n).indexOf(t)},fje=["children","width","height","viewBox","className","style","title","desc"];function mL(){return mL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mL.apply(this,arguments)}function pje(e,t){if(e==null)return{};var n=hje(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gL(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=pje(e,fje),u=o||{width:n,height:r,x:0,y:0},f=fe("recharts-surface",i);return J.createElement("svg",mL({},zt(c,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),J.createElement("title",null,s),J.createElement("desc",null,l),t)}var mje=["children","className"];function yL(){return yL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yL.apply(this,arguments)}function gje(e,t){if(e==null)return{};var n=yje(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var wn=J.forwardRef(function(e,t){var n=e.children,r=e.className,o=gje(e,mje),i=fe("recharts-layer",r);return J.createElement("g",yL({className:i},zt(o,!0),{ref:t}),n)}),jl=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i]},ok,i8;function vje(){if(i8)return ok;i8=1;function e(t,n,r){var o=-1,i=t.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(i);++o<i;)a[o]=t[o+n];return a}return ok=e,ok}var ik,a8;function bje(){if(a8)return ik;a8=1;var e=vje();function t(n,r,o){var i=n.length;return o=o===void 0?i:o,!r&&o>=i?n:e(n,r,o)}return ik=t,ik}var ak,s8;function hie(){if(s8)return ak;s8=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+o+i+"]");function l(c){return s.test(c)}return ak=l,ak}var sk,l8;function xje(){if(l8)return sk;l8=1;function e(t){return t.split("")}return sk=e,sk}var lk,c8;function Sje(){if(c8)return lk;c8=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="["+e+"]",s="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+l+")",u="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",g=c+"?",y="["+i+"]?",v="(?:"+m+"(?:"+[u,f,h].join("|")+")"+y+g+")*",w=y+g+v,C="(?:"+[u+s+"?",s,f,h,a].join("|")+")",E=RegExp(l+"(?="+l+")|"+C+w,"g");function I(O){return O.match(E)||[]}return lk=I,lk}var ck,u8;function wje(){if(u8)return ck;u8=1;var e=xje(),t=hie(),n=Sje();function r(o){return t(o)?n(o):e(o)}return ck=r,ck}var uk,d8;function Cje(){if(d8)return uk;d8=1;var e=bje(),t=hie(),n=wje(),r=cie();function o(i){return function(a){a=r(a);var s=t(a)?n(a):void 0,l=s?s[0]:a.charAt(0),c=s?e(s,1).join(""):a.slice(1);return l[i]()+c}}return uk=o,uk}var dk,f8;function Eje(){if(f8)return dk;f8=1;var e=Cje(),t=e("toUpperCase");return dk=t,dk}var Tje=Eje();const jI=Gn(Tje);function $r(e){return function(){return e}}const mie=Math.cos,pT=Math.sin,nc=Math.sqrt,hT=Math.PI,BI=2*hT,vL=Math.PI,bL=2*vL,Ap=1e-6,Oje=bL-Ap;function gie(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Ije(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gie;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}class Pje{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gie:Ije(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,o){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(t,n,r,o,i,a){this._append`C${+t},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(t,n,r,o,i){if(t=+t,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,s=this._y1,l=r-t,c=o-n,u=a-t,f=s-n,h=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Ap)if(!(Math.abs(f*l-c*u)>Ap)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,g=o-s,y=l*l+c*c,v=m*m+g*g,w=Math.sqrt(y),C=Math.sqrt(h),E=i*Math.tan((vL-Math.acos((y+h-v)/(2*w*C)))/2),I=E/C,O=E/w;Math.abs(I-1)>Ap&&this._append`L${t+I*u},${n+I*f}`,this._append`A${i},${i},0,0,${+(f*m>u*g)},${this._x1=t+O*l},${this._y1=n+O*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,f=1^a,h=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Ap||Math.abs(this._y1-u)>Ap)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%bL+bL),h>Oje?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:h>Ap&&this._append`A${r},${r},0,${+(h>=vL)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function ZB(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Pje(t)}function ez(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function yie(e){this._context=e}yie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function zI(e){return new yie(e)}function vie(e){return e[0]}function bie(e){return e[1]}function xie(e,t){var n=$r(!0),r=null,o=zI,i=null,a=ZB(s);e=typeof e=="function"?e:e===void 0?vie:$r(e),t=typeof t=="function"?t:t===void 0?bie:$r(t);function s(l){var c,u=(l=ez(l)).length,f,h=!1,m;for(r==null&&(i=o(m=a())),c=0;c<=u;++c)!(c<u&&n(f=l[c],c,l))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(f,c,l),+t(f,c,l));if(m)return i=null,m+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:$r(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:$r(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:$r(!!l),s):n},s.curve=function(l){return arguments.length?(o=l,r!=null&&(i=o(r)),s):o},s.context=function(l){return arguments.length?(l==null?r=i=null:i=o(r=l),s):r},s}function k1(e,t,n){var r=null,o=$r(!0),i=null,a=zI,s=null,l=ZB(c);e=typeof e=="function"?e:e===void 0?vie:$r(+e),t=typeof t=="function"?t:$r(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?bie:$r(+n);function c(f){var h,m,g,y=(f=ez(f)).length,v,w=!1,C,E=new Array(y),I=new Array(y);for(i==null&&(s=a(C=l())),h=0;h<=y;++h){if(!(h<y&&o(v=f[h],h,f))===w)if(w=!w)m=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=h-1;g>=m;--g)s.point(E[g],I[g]);s.lineEnd(),s.areaEnd()}w&&(E[h]=+e(v,h,f),I[h]=+t(v,h,f),s.point(r?+r(v,h,f):E[h],n?+n(v,h,f):I[h]))}if(C)return s=null,C+""||null}function u(){return xie().defined(o).curve(a).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:$r(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:$r(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:$r(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:$r(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:$r(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:$r(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(f){return arguments.length?(o=typeof f=="function"?f:$r(!!f),c):o},c.curve=function(f){return arguments.length?(a=f,i!=null&&(s=a(i)),c):a},c.context=function(f){return arguments.length?(f==null?i=s=null:s=a(i=f),c):i},c}class Sie{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Aje(e){return new Sie(e,!0)}function Mje(e){return new Sie(e,!1)}const tz={draw(e,t){const n=nc(t/hT);e.moveTo(n,0),e.arc(0,0,n,0,BI)}},Rje={draw(e,t){const n=nc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},wie=nc(1/3),Dje=wie*2,kje={draw(e,t){const n=nc(t/Dje),r=n*wie;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},_je={draw(e,t){const n=nc(t),r=-n/2;e.rect(r,r,n,n)}},$je=.8908130915292852,Cie=pT(hT/10)/pT(7*hT/10),Nje=pT(BI/10)*Cie,Lje=-mie(BI/10)*Cie,Fje={draw(e,t){const n=nc(t*$je),r=Nje*n,o=Lje*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=BI*i/5,s=mie(a),l=pT(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},fk=nc(3),jje={draw(e,t){const n=-nc(t/(fk*3));e.moveTo(0,n*2),e.lineTo(-fk*n,-n),e.lineTo(fk*n,-n),e.closePath()}},Os=-.5,Is=nc(3)/2,xL=1/nc(12),Bje=(xL/2+1)*3,zje={draw(e,t){const n=nc(t/Bje),r=n/2,o=n*xL,i=r,a=n*xL+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Os*r-Is*o,Is*r+Os*o),e.lineTo(Os*i-Is*a,Is*i+Os*a),e.lineTo(Os*s-Is*l,Is*s+Os*l),e.lineTo(Os*r+Is*o,Os*o-Is*r),e.lineTo(Os*i+Is*a,Os*a-Is*i),e.lineTo(Os*s+Is*l,Os*l-Is*s),e.closePath()}};function Vje(e,t){let n=null,r=ZB(o);e=typeof e=="function"?e:$r(e||tz),t=typeof t=="function"?t:$r(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:$r(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:$r(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function mT(){}function gT(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Eie(e){this._context=e}Eie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gT(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hje(e){return new Eie(e)}function Tie(e){this._context=e}Tie.prototype={areaStart:mT,areaEnd:mT,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:gT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Uje(e){return new Tie(e)}function Oie(e){this._context=e}Oie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:gT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Gje(e){return new Oie(e)}function Iie(e){this._context=e}Iie.prototype={areaStart:mT,areaEnd:mT,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function qje(e){return new Iie(e)}function p8(e){return e<0?-1:1}function h8(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(p8(i)+p8(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function m8(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function pk(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function yT(e){this._context=e}yT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:pk(this,this._t0,m8(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,pk(this,m8(this,n=h8(this,e,t)),n);break;default:pk(this,this._t0,n=h8(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Pie(e){this._context=new Aie(e)}(Pie.prototype=Object.create(yT.prototype)).point=function(e,t){yT.prototype.point.call(this,t,e)};function Aie(e){this._context=e}Aie.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function Wje(e){return new yT(e)}function Kje(e){return new Pie(e)}function Mie(e){this._context=e}Mie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=g8(e),o=g8(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function g8(e){var t,n=e.length-1,r,o=new Array(n),i=new Array(n),a=new Array(n);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[n-1]=2,i[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=o[t]/i[t-1],i[t]-=r,a[t]-=r*a[t-1];for(o[n-1]=a[n-1]/i[n-1],t=n-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function Yje(e){return new Mie(e)}function VI(e,t){this._context=e,this._t=t}VI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Qje(e){return new VI(e,.5)}function Xje(e){return new VI(e,0)}function Jje(e){return new VI(e,1)}function fy(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n<a;++n)for(o=i,i=e[t[n]],r=0;r<s;++r)i[r][1]+=i[r][0]=isNaN(o[r][1])?o[r][0]:o[r][1]}function SL(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Zje(e,t){return e[t]}function eBe(e){const t=[];return t.key=e,t}function tBe(){var e=$r([]),t=SL,n=fy,r=Zje;function o(i){var a=Array.from(e.apply(this,arguments),eBe),s,l=a.length,c=-1,u;for(const f of i)for(s=0,++c;s<l;++s)(a[s][c]=[0,+r(f,a[s].key,c,i)]).data=f;for(s=0,u=ez(t(a));s<l;++s)a[u[s]].index=s;return n(a,u),a}return o.keys=function(i){return arguments.length?(e=typeof i=="function"?i:$r(Array.from(i)),o):e},o.value=function(i){return arguments.length?(r=typeof i=="function"?i:$r(+i),o):r},o.order=function(i){return arguments.length?(t=i==null?SL:typeof i=="function"?i:$r(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(n=i??fy,o):n},o}function nBe(e,t){if((r=e.length)>0){for(var n,r,o=0,i=e[0].length,a;o<i;++o){for(a=n=0;n<r;++n)a+=e[n][o][1]||0;if(a)for(n=0;n<r;++n)e[n][o][1]/=a}fy(e,t)}}function rBe(e,t){if((o=e.length)>0){for(var n=0,r=e[t[0]],o,i=r.length;n<i;++n){for(var a=0,s=0;a<o;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}fy(e,t)}}function oBe(e,t){if(!(!((a=e.length)>0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r<i;++r){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],f=u[r][1]||0,h=u[r-1][1]||0,m=(f-h)/2,g=0;g<s;++g){var y=e[t[g]],v=y[r][1]||0,w=y[r-1][1]||0;m+=v-w}l+=f,c+=m*f}o[r-1][1]+=o[r-1][0]=n,l&&(n-=c/l)}o[r-1][1]+=o[r-1][0]=n,fy(e,t)}}function Lx(e){"@babel/helpers - typeof";return Lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lx(e)}var iBe=["type","size","sizeType"];function wL(){return wL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wL.apply(this,arguments)}function y8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function v8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y8(Object(n),!0).forEach(function(r){aBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aBe(e,t,n){return t=sBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sBe(e){var t=lBe(e,"string");return Lx(t)=="symbol"?t:t+""}function lBe(e,t){if(Lx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cBe(e,t){if(e==null)return{};var n=uBe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Rie={symbolCircle:tz,symbolCross:Rje,symbolDiamond:kje,symbolSquare:_je,symbolStar:Fje,symbolTriangle:jje,symbolWye:zje},dBe=Math.PI/180,fBe=function(t){var n="symbol".concat(jI(t));return Rie[n]||tz},pBe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*dBe;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},hBe=function(t,n){Rie["symbol".concat(jI(t))]=n},HI=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=cBe(t,iBe),c=v8(v8({},l),{},{type:r,size:i,sizeType:s}),u=function(){var v=fBe(r),w=Vje().type(v).size(pBe(i,s,r));return w()},f=c.className,h=c.cx,m=c.cy,g=zt(c,!0);return h===+h&&m===+m&&i===+i?J.createElement("path",wL({},g,{className:fe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(m,")"),d:u()})):null};HI.registerSymbol=hBe;function py(e){"@babel/helpers - typeof";return py=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},py(e)}function CL(){return CL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CL.apply(this,arguments)}function b8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b8(Object(n),!0).forEach(function(r){Fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kie(r.key),r)}}function vBe(e,t,n){return t&&yBe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bBe(e,t,n){return t=vT(t),xBe(e,Die()?Reflect.construct(t,n||[],vT(e).constructor):t.apply(e,n))}function xBe(e,t){if(t&&(py(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SBe(e)}function SBe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Die(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Die=function(){return!!e})()}function vT(e){return vT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vT(e)}function wBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EL(e,t)}function EL(e,t){return EL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},EL(e,t)}function Fx(e,t,n){return t=kie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kie(e){var t=CBe(e,"string");return py(t)=="symbol"?t:t+""}function CBe(e,t){if(py(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(py(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yl=32,nz=function(e){function t(){return gBe(this,t),bBe(this,t,arguments)}return wBe(t,e),vBe(t,[{key:"renderIcon",value:function(r){var o=this.props.inactiveColor,i=yl/2,a=yl/6,s=yl/3,l=r.inactive?o:r.color;if(r.type==="plainline")return J.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:yl,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return J.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
+ */var YW;function GFe(){if(YW)return ur;YW=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var w=v.$$typeof;switch(w){case e:switch(v=v.type,v){case n:case o:case r:case c:case u:return v;default:switch(v=v&&v.$$typeof,v){case s:case a:case l:case p:case f:case i:return v;default:return w}}case t:return w}}}return ur.ContextConsumer=a,ur.ContextProvider=i,ur.Element=e,ur.ForwardRef=l,ur.Fragment=n,ur.Lazy=p,ur.Memo=f,ur.Portal=t,ur.Profiler=o,ur.StrictMode=r,ur.Suspense=c,ur.SuspenseList=u,ur.isAsyncMode=function(){return!1},ur.isConcurrentMode=function(){return!1},ur.isContextConsumer=function(v){return y(v)===a},ur.isContextProvider=function(v){return y(v)===i},ur.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},ur.isForwardRef=function(v){return y(v)===l},ur.isFragment=function(v){return y(v)===n},ur.isLazy=function(v){return y(v)===p},ur.isMemo=function(v){return y(v)===f},ur.isPortal=function(v){return y(v)===t},ur.isProfiler=function(v){return y(v)===o},ur.isStrictMode=function(v){return y(v)===r},ur.isSuspense=function(v){return y(v)===c},ur.isSuspenseList=function(v){return y(v)===u},ur.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===o||v===r||v===c||v===u||v===m||typeof v=="object"&&v!==null&&(v.$$typeof===p||v.$$typeof===f||v.$$typeof===i||v.$$typeof===a||v.$$typeof===l||v.$$typeof===g||v.getModuleId!==void 0)},ur.typeOf=y,ur}var QW;function qFe(){return QW||(QW=1,ek.exports=GFe()),ek.exports}var WFe=qFe(),tk,XW;function pie(){if(XW)return tk;XW=1;var e=td(),t=nd(),n="[object Number]";function r(o){return typeof o=="number"||t(o)&&e(o)==n}return tk=r,tk}var nk,JW;function KFe(){if(JW)return nk;JW=1;var e=pie();function t(n){return e(n)&&n!=+n}return nk=t,nk}var YFe=KFe();const wv=Gn(YFe);var QFe=pie();const XFe=Gn(QFe);var ta=function(t){return t===0?0:t>0?1:-1},Vp=function(t){return Ch(t)&&t.indexOf("%")===t.length-1},mt=function(t){return XFe(t)&&!wv(t)},Ho=function(t){return mt(t)||Ch(t)},JFe=0,Vf=function(t){var n=++JFe;return"".concat(t||"").concat(n)},na=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!mt(t)&&!Ch(t))return r;var i;if(Vp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return wv(i)&&(i=r),o&&i>n&&(i=n),i},Jd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},ZFe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o<n;o++)if(!r[t[o]])r[t[o]]=!0;else return!0;return!1},no=function(t,n){return mt(t)&&mt(n)?function(r){return t+r*(n-t)}:function(){return n}};function fT(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Ja(r,t))===n})}var eje=function(t){if(!t||!t.length)return null;for(var n=t.length,r=0,o=0,i=0,a=0,s=1/0,l=-1/0,c=0,u=0,f=0;f<n;f++)c=t[f].cx||0,u=t[f].cy||0,r+=c,o+=u,i+=c*u,a+=c*c,s=Math.min(s,c),l=Math.max(l,c);var p=n*a!==r*r?(n*i-r*o)/(n*a-r*r):0;return{xmin:s,xmax:l,a:p,b:(o-p*r)/n}},tje=function(t,n){return mt(t)&&mt(n)?t-n:Ch(t)&&Ch(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function jg(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function pL(e){"@babel/helpers - typeof";return pL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pL(e)}var nje=["viewBox","children"],rje=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","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","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","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","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],ZW=["points","pathLength"],rk={svg:nje,polygon:ZW,polyline:ZW},JB=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],pT=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(x.isValidElement(t)&&(r=t.props),!Sv(r))return null;var o={};return Object.keys(r).forEach(function(i){JB.includes(i)&&(o[i]=n||function(a){return r[i](r,a)})}),o},oje=function(t,n,r){return function(o){return t(n,r,o),null}},Af=function(t,n,r){if(!Sv(t)||pL(t)!=="object")return null;var o=null;return Object.keys(t).forEach(function(i){var a=t[i];JB.includes(i)&&typeof a=="function"&&(o||(o={}),o[i]=oje(a,n,r))}),o},ije=["children"],aje=["children"];function e8(e,t){if(e==null)return{};var n=sje(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hL(e){"@babel/helpers - typeof";return hL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hL(e)}var t8={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},_u=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},n8=null,ok=null,ZB=function e(t){if(t===n8&&Array.isArray(ok))return ok;var n=[];return x.Children.forEach(t,function(r){an(r)||(WFe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),ok=n,n8=t,n};function sa(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return _u(o)}):r=[_u(t)],ZB(e).forEach(function(o){var i=Ja(o,"type.displayName")||Ja(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function Va(e,t){var n=sa(e,t);return n&&n[0]}var r8=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!mt(r)||r<=0||!mt(o)||o<=0)},lje=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],cje=function(t){return t&&t.type&&Ch(t.type)&&lje.indexOf(t.type)>=0},hie=function(t){return t&&hL(t)==="object"&&"clipDot"in t},uje=function(t,n,r,o){var i,a=(i=rk==null?void 0:rk[o])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!rn(t)&&(o&&a.includes(n)||rje.includes(n))||r&&JB.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(x.isValidElement(t)&&(o=t.props),!Sv(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;uje((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},mL=function e(t,n){if(t===n)return!0;var r=x.Children.count(t);if(r!==x.Children.count(n))return!1;if(r===0)return!0;if(r===1)return o8(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o<r;o++){var i=t[o],a=n[o];if(Array.isArray(i)||Array.isArray(a)){if(!e(i,a))return!1}else if(!o8(i,a))return!1}return!0},o8=function(t,n){if(an(t)&&an(n))return!0;if(!an(t)&&!an(n)){var r=t.props||{},o=r.children,i=e8(r,ije),a=n.props||{},s=a.children,l=e8(a,aje);return o&&s?jg(i,l)&&mL(o,s):!o&&!s?jg(i,l):!1}return!1},i8=function(t,n){var r=[],o={};return ZB(t).forEach(function(i,a){if(cje(i))r.push(i);else if(i){var s=_u(i.type),l=n[s]||{},c=l.handler,u=l.once;if(c&&(!u||!o[s])){var f=c(i,s,a);r.push(f),o[s]=!0}}}),r},dje=function(t){var n=t&&t.type;return n&&t8[n]?t8[n]:null},fje=function(t,n){return ZB(n).indexOf(t)},pje=["children","width","height","viewBox","className","style","title","desc"];function gL(){return gL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gL.apply(this,arguments)}function hje(e,t){if(e==null)return{};var n=mje(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yL(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=hje(e,pje),u=o||{width:n,height:r,x:0,y:0},f=fe("recharts-surface",i);return J.createElement("svg",gL({},zt(c,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),J.createElement("title",null,s),J.createElement("desc",null,l),t)}var gje=["children","className"];function vL(){return vL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vL.apply(this,arguments)}function yje(e,t){if(e==null)return{};var n=vje(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var wn=J.forwardRef(function(e,t){var n=e.children,r=e.className,o=yje(e,gje),i=fe("recharts-layer",r);return J.createElement("g",vL({className:i},zt(o,!0),{ref:t}),n)}),zl=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i]},ik,a8;function bje(){if(a8)return ik;a8=1;function e(t,n,r){var o=-1,i=t.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(i);++o<i;)a[o]=t[o+n];return a}return ik=e,ik}var ak,s8;function xje(){if(s8)return ak;s8=1;var e=bje();function t(n,r,o){var i=n.length;return o=o===void 0?i:o,!r&&o>=i?n:e(n,r,o)}return ak=t,ak}var sk,l8;function mie(){if(l8)return sk;l8=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+o+i+"]");function l(c){return s.test(c)}return sk=l,sk}var lk,c8;function Sje(){if(c8)return lk;c8=1;function e(t){return t.split("")}return lk=e,lk}var ck,u8;function wje(){if(u8)return ck;u8=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="["+e+"]",s="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+l+")",u="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",g=c+"?",y="["+i+"]?",v="(?:"+m+"(?:"+[u,f,p].join("|")+")"+y+g+")*",w=y+g+v,C="(?:"+[u+s+"?",s,f,p,a].join("|")+")",E=RegExp(l+"(?="+l+")|"+C+w,"g");function I(O){return O.match(E)||[]}return ck=I,ck}var uk,d8;function Cje(){if(d8)return uk;d8=1;var e=Sje(),t=mie(),n=wje();function r(o){return t(o)?n(o):e(o)}return uk=r,uk}var dk,f8;function Eje(){if(f8)return dk;f8=1;var e=xje(),t=mie(),n=Cje(),r=uie();function o(i){return function(a){a=r(a);var s=t(a)?n(a):void 0,l=s?s[0]:a.charAt(0),c=s?e(s,1).join(""):a.slice(1);return l[i]()+c}}return dk=o,dk}var fk,p8;function Tje(){if(p8)return fk;p8=1;var e=Eje(),t=e("toUpperCase");return fk=t,fk}var Oje=Tje();const BI=Gn(Oje);function $r(e){return function(){return e}}const gie=Math.cos,hT=Math.sin,rc=Math.sqrt,mT=Math.PI,zI=2*mT,bL=Math.PI,xL=2*bL,Rp=1e-6,Ije=xL-Rp;function yie(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Pje(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return yie;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}class Aje{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?yie:Pje(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,o){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(t,n,r,o,i,a){this._append`C${+t},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(t,n,r,o,i){if(t=+t,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,s=this._y1,l=r-t,c=o-n,u=a-t,f=s-n,p=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Rp)if(!(Math.abs(f*l-c*u)>Rp)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,g=o-s,y=l*l+c*c,v=m*m+g*g,w=Math.sqrt(y),C=Math.sqrt(p),E=i*Math.tan((bL-Math.acos((y+p-v)/(2*w*C)))/2),I=E/C,O=E/w;Math.abs(I-1)>Rp&&this._append`L${t+I*u},${n+I*f}`,this._append`A${i},${i},0,0,${+(f*m>u*g)},${this._x1=t+O*l},${this._y1=n+O*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,f=1^a,p=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Rp||Math.abs(this._y1-u)>Rp)&&this._append`L${c},${u}`,r&&(p<0&&(p=p%xL+xL),p>Ije?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:p>Rp&&this._append`A${r},${r},0,${+(p>=bL)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function ez(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Aje(t)}function tz(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vie(e){this._context=e}vie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function VI(e){return new vie(e)}function bie(e){return e[0]}function xie(e){return e[1]}function Sie(e,t){var n=$r(!0),r=null,o=VI,i=null,a=ez(s);e=typeof e=="function"?e:e===void 0?bie:$r(e),t=typeof t=="function"?t:t===void 0?xie:$r(t);function s(l){var c,u=(l=tz(l)).length,f,p=!1,m;for(r==null&&(i=o(m=a())),c=0;c<=u;++c)!(c<u&&n(f=l[c],c,l))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(f,c,l),+t(f,c,l));if(m)return i=null,m+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:$r(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:$r(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:$r(!!l),s):n},s.curve=function(l){return arguments.length?(o=l,r!=null&&(i=o(r)),s):o},s.context=function(l){return arguments.length?(l==null?r=i=null:i=o(r=l),s):r},s}function _1(e,t,n){var r=null,o=$r(!0),i=null,a=VI,s=null,l=ez(c);e=typeof e=="function"?e:e===void 0?bie:$r(+e),t=typeof t=="function"?t:$r(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?xie:$r(+n);function c(f){var p,m,g,y=(f=tz(f)).length,v,w=!1,C,E=new Array(y),I=new Array(y);for(i==null&&(s=a(C=l())),p=0;p<=y;++p){if(!(p<y&&o(v=f[p],p,f))===w)if(w=!w)m=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=p-1;g>=m;--g)s.point(E[g],I[g]);s.lineEnd(),s.areaEnd()}w&&(E[p]=+e(v,p,f),I[p]=+t(v,p,f),s.point(r?+r(v,p,f):E[p],n?+n(v,p,f):I[p]))}if(C)return s=null,C+""||null}function u(){return Sie().defined(o).curve(a).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:$r(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:$r(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:$r(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:$r(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:$r(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:$r(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(f){return arguments.length?(o=typeof f=="function"?f:$r(!!f),c):o},c.curve=function(f){return arguments.length?(a=f,i!=null&&(s=a(i)),c):a},c.context=function(f){return arguments.length?(f==null?i=s=null:s=a(i=f),c):i},c}class wie{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Mje(e){return new wie(e,!0)}function Rje(e){return new wie(e,!1)}const nz={draw(e,t){const n=rc(t/mT);e.moveTo(n,0),e.arc(0,0,n,0,zI)}},Dje={draw(e,t){const n=rc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Cie=rc(1/3),kje=Cie*2,_je={draw(e,t){const n=rc(t/kje),r=n*Cie;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},$je={draw(e,t){const n=rc(t),r=-n/2;e.rect(r,r,n,n)}},Nje=.8908130915292852,Eie=hT(mT/10)/hT(7*mT/10),Lje=hT(zI/10)*Eie,Fje=-gie(zI/10)*Eie,jje={draw(e,t){const n=rc(t*Nje),r=Lje*n,o=Fje*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=zI*i/5,s=gie(a),l=hT(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},pk=rc(3),Bje={draw(e,t){const n=-rc(t/(pk*3));e.moveTo(0,n*2),e.lineTo(-pk*n,-n),e.lineTo(pk*n,-n),e.closePath()}},Os=-.5,Is=rc(3)/2,SL=1/rc(12),zje=(SL/2+1)*3,Vje={draw(e,t){const n=rc(t/zje),r=n/2,o=n*SL,i=r,a=n*SL+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Os*r-Is*o,Is*r+Os*o),e.lineTo(Os*i-Is*a,Is*i+Os*a),e.lineTo(Os*s-Is*l,Is*s+Os*l),e.lineTo(Os*r+Is*o,Os*o-Is*r),e.lineTo(Os*i+Is*a,Os*a-Is*i),e.lineTo(Os*s+Is*l,Os*l-Is*s),e.closePath()}};function Hje(e,t){let n=null,r=ez(o);e=typeof e=="function"?e:$r(e||nz),t=typeof t=="function"?t:$r(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:$r(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:$r(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function gT(){}function yT(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Tie(e){this._context=e}Tie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yT(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Uje(e){return new Tie(e)}function Oie(e){this._context=e}Oie.prototype={areaStart:gT,areaEnd:gT,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:yT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Gje(e){return new Oie(e)}function Iie(e){this._context=e}Iie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qje(e){return new Iie(e)}function Pie(e){this._context=e}Pie.prototype={areaStart:gT,areaEnd:gT,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Wje(e){return new Pie(e)}function h8(e){return e<0?-1:1}function m8(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(h8(i)+h8(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function g8(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function hk(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function vT(e){this._context=e}vT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:hk(this,this._t0,g8(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,hk(this,g8(this,n=m8(this,e,t)),n);break;default:hk(this,this._t0,n=m8(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Aie(e){this._context=new Mie(e)}(Aie.prototype=Object.create(vT.prototype)).point=function(e,t){vT.prototype.point.call(this,t,e)};function Mie(e){this._context=e}Mie.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function Kje(e){return new vT(e)}function Yje(e){return new Aie(e)}function Rie(e){this._context=e}Rie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=y8(e),o=y8(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function y8(e){var t,n=e.length-1,r,o=new Array(n),i=new Array(n),a=new Array(n);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[n-1]=2,i[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=o[t]/i[t-1],i[t]-=r,a[t]-=r*a[t-1];for(o[n-1]=a[n-1]/i[n-1],t=n-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function Qje(e){return new Rie(e)}function HI(e,t){this._context=e,this._t=t}HI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Xje(e){return new HI(e,.5)}function Jje(e){return new HI(e,0)}function Zje(e){return new HI(e,1)}function py(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n<a;++n)for(o=i,i=e[t[n]],r=0;r<s;++r)i[r][1]+=i[r][0]=isNaN(o[r][1])?o[r][0]:o[r][1]}function wL(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function eBe(e,t){return e[t]}function tBe(e){const t=[];return t.key=e,t}function nBe(){var e=$r([]),t=wL,n=py,r=eBe;function o(i){var a=Array.from(e.apply(this,arguments),tBe),s,l=a.length,c=-1,u;for(const f of i)for(s=0,++c;s<l;++s)(a[s][c]=[0,+r(f,a[s].key,c,i)]).data=f;for(s=0,u=tz(t(a));s<l;++s)a[u[s]].index=s;return n(a,u),a}return o.keys=function(i){return arguments.length?(e=typeof i=="function"?i:$r(Array.from(i)),o):e},o.value=function(i){return arguments.length?(r=typeof i=="function"?i:$r(+i),o):r},o.order=function(i){return arguments.length?(t=i==null?wL:typeof i=="function"?i:$r(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(n=i??py,o):n},o}function rBe(e,t){if((r=e.length)>0){for(var n,r,o=0,i=e[0].length,a;o<i;++o){for(a=n=0;n<r;++n)a+=e[n][o][1]||0;if(a)for(n=0;n<r;++n)e[n][o][1]/=a}py(e,t)}}function oBe(e,t){if((o=e.length)>0){for(var n=0,r=e[t[0]],o,i=r.length;n<i;++n){for(var a=0,s=0;a<o;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}py(e,t)}}function iBe(e,t){if(!(!((a=e.length)>0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r<i;++r){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],f=u[r][1]||0,p=u[r-1][1]||0,m=(f-p)/2,g=0;g<s;++g){var y=e[t[g]],v=y[r][1]||0,w=y[r-1][1]||0;m+=v-w}l+=f,c+=m*f}o[r-1][1]+=o[r-1][0]=n,l&&(n-=c/l)}o[r-1][1]+=o[r-1][0]=n,py(e,t)}}function Lx(e){"@babel/helpers - typeof";return Lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lx(e)}var aBe=["type","size","sizeType"];function CL(){return CL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CL.apply(this,arguments)}function v8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function b8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v8(Object(n),!0).forEach(function(r){sBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sBe(e,t,n){return t=lBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lBe(e){var t=cBe(e,"string");return Lx(t)=="symbol"?t:t+""}function cBe(e,t){if(Lx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uBe(e,t){if(e==null)return{};var n=dBe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Die={symbolCircle:nz,symbolCross:Dje,symbolDiamond:_je,symbolSquare:$je,symbolStar:jje,symbolTriangle:Bje,symbolWye:Vje},fBe=Math.PI/180,pBe=function(t){var n="symbol".concat(BI(t));return Die[n]||nz},hBe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*fBe;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},mBe=function(t,n){Die["symbol".concat(BI(t))]=n},UI=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=uBe(t,aBe),c=b8(b8({},l),{},{type:r,size:i,sizeType:s}),u=function(){var v=pBe(r),w=Hje().type(v).size(hBe(i,s,r));return w()},f=c.className,p=c.cx,m=c.cy,g=zt(c,!0);return p===+p&&m===+m&&i===+i?J.createElement("path",CL({},g,{className:fe("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(m,")"),d:u()})):null};UI.registerSymbol=mBe;function hy(e){"@babel/helpers - typeof";return hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hy(e)}function EL(){return EL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EL.apply(this,arguments)}function x8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x8(Object(n),!0).forEach(function(r){Fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_ie(r.key),r)}}function bBe(e,t,n){return t&&vBe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xBe(e,t,n){return t=bT(t),SBe(e,kie()?Reflect.construct(t,n||[],bT(e).constructor):t.apply(e,n))}function SBe(e,t){if(t&&(hy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wBe(e)}function wBe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kie=function(){return!!e})()}function bT(e){return bT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bT(e)}function CBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TL(e,t)}function TL(e,t){return TL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},TL(e,t)}function Fx(e,t,n){return t=_ie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ie(e){var t=EBe(e,"string");return hy(t)=="symbol"?t:t+""}function EBe(e,t){if(hy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bl=32,rz=function(e){function t(){return yBe(this,t),xBe(this,t,arguments)}return CBe(t,e),bBe(t,[{key:"renderIcon",value:function(r){var o=this.props.inactiveColor,i=bl/2,a=bl/6,s=bl/3,l=r.inactive?o:r.color;if(r.type==="plainline")return J.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:bl,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return J.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
A`).concat(a,",").concat(a,",0,1,1,").concat(2*s,",").concat(i,`
- H`).concat(yl,"M").concat(2*s,",").concat(i,`
- A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return J.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(yl/8,"h").concat(yl,"v").concat(yl*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(J.isValidElement(r.legendIcon)){var c=mBe({},r);return delete c.legendIcon,J.cloneElement(r.legendIcon,c)}return J.createElement(HI,{fill:l,cx:i,cy:i,size:yl,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,o=this.props,i=o.payload,a=o.iconSize,s=o.layout,l=o.formatter,c=o.inactiveColor,u={x:0,y:0,width:yl,height:yl},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,g){var y=m.formatter||l,v=fe(Fx(Fx({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",m.inactive));if(m.type==="none")return null;var w=rn(m.value)?null:m.value;jl(!rn(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var C=m.inactive?c:m.color;return J.createElement("li",CL({className:v,style:f,key:"legend-item-".concat(g)},If(r.props,m,g)),J.createElement(gL,{width:a,height:a,viewBox:u,style:h},r.renderIcon(m)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},y?y(w,m,g):w))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return J.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(x.PureComponent);Fx(nz,"displayName","Legend");Fx(nz,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var hk,x8;function EBe(){if(x8)return hk;x8=1;var e=NI();function t(){this.__data__=new e,this.size=0}return hk=t,hk}var mk,S8;function TBe(){if(S8)return mk;S8=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return mk=e,mk}var gk,w8;function OBe(){if(w8)return gk;w8=1;function e(t){return this.__data__.get(t)}return gk=e,gk}var yk,C8;function IBe(){if(C8)return yk;C8=1;function e(t){return this.__data__.has(t)}return yk=e,yk}var vk,E8;function PBe(){if(E8)return vk;E8=1;var e=NI(),t=WB(),n=KB(),r=200;function o(i,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<r-1)return l.push([i,a]),this.size=++s.size,this;s=this.__data__=new n(l)}return s.set(i,a),this.size=s.size,this}return vk=o,vk}var bk,T8;function _ie(){if(T8)return bk;T8=1;var e=NI(),t=EBe(),n=TBe(),r=OBe(),o=IBe(),i=PBe();function a(s){var l=this.__data__=new e(s);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,bk=a,bk}var xk,O8;function ABe(){if(O8)return xk;O8=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return xk=t,xk}var Sk,I8;function MBe(){if(I8)return Sk;I8=1;function e(t){return this.__data__.has(t)}return Sk=e,Sk}var wk,P8;function $ie(){if(P8)return wk;P8=1;var e=KB(),t=ABe(),n=MBe();function r(o){var i=-1,a=o==null?0:o.length;for(this.__data__=new e;++i<a;)this.add(o[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,wk=r,wk}var Ck,A8;function Nie(){if(A8)return Ck;A8=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return Ck=e,Ck}var Ek,M8;function Lie(){if(M8)return Ek;M8=1;function e(t,n){return t.has(n)}return Ek=e,Ek}var Tk,R8;function Fie(){if(R8)return Tk;R8=1;var e=$ie(),t=Nie(),n=Lie(),r=1,o=2;function i(a,s,l,c,u,f){var h=l&r,m=a.length,g=s.length;if(m!=g&&!(h&&g>m))return!1;var y=f.get(a),v=f.get(s);if(y&&v)return y==s&&v==a;var w=-1,C=!0,E=l&o?new e:void 0;for(f.set(a,s),f.set(s,a);++w<m;){var I=a[w],O=s[w];if(c)var P=h?c(O,I,w,s,a,f):c(I,O,w,a,s,f);if(P!==void 0){if(P)continue;C=!1;break}if(E){if(!t(s,function(R,D){if(!n(E,D)&&(I===R||u(I,R,l,c,f)))return E.push(D)})){C=!1;break}}else if(!(I===O||u(I,O,l,c,f))){C=!1;break}}return f.delete(a),f.delete(s),C}return Tk=i,Tk}var Ok,D8;function RBe(){if(D8)return Ok;D8=1;var e=Hc(),t=e.Uint8Array;return Ok=t,Ok}var Ik,k8;function DBe(){if(k8)return Ik;k8=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,i){r[++n]=[i,o]}),r}return Ik=e,Ik}var Pk,_8;function rz(){if(_8)return Pk;_8=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return Pk=e,Pk}var Ak,$8;function kBe(){if($8)return Ak;$8=1;var e=bw(),t=RBe(),n=qB(),r=Fie(),o=DBe(),i=rz(),a=1,s=2,l="[object Boolean]",c="[object Date]",u="[object Error]",f="[object Map]",h="[object Number]",m="[object RegExp]",g="[object Set]",y="[object String]",v="[object Symbol]",w="[object ArrayBuffer]",C="[object DataView]",E=e?e.prototype:void 0,I=E?E.valueOf:void 0;function O(P,R,D,M,A,_,N){switch(D){case C:if(P.byteLength!=R.byteLength||P.byteOffset!=R.byteOffset)return!1;P=P.buffer,R=R.buffer;case w:return!(P.byteLength!=R.byteLength||!_(new t(P),new t(R)));case l:case c:case h:return n(+P,+R);case u:return P.name==R.name&&P.message==R.message;case m:case y:return P==R+"";case f:var B=o;case g:var H=M&a;if(B||(B=i),P.size!=R.size&&!H)return!1;var j=N.get(P);if(j)return j==R;M|=s,N.set(P,R);var L=r(B(P),B(R),M,A,_,N);return N.delete(P),L;case v:if(I)return I.call(P)==I.call(R)}return!1}return Ak=O,Ak}var Mk,N8;function jie(){if(N8)return Mk;N8=1;function e(t,n){for(var r=-1,o=n.length,i=t.length;++r<o;)t[i+r]=n[r];return t}return Mk=e,Mk}var Rk,L8;function _Be(){if(L8)return Rk;L8=1;var e=jie(),t=Aa();function n(r,o,i){var a=o(r);return t(r)?a:e(a,i(r))}return Rk=n,Rk}var Dk,F8;function $Be(){if(F8)return Dk;F8=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=0,a=[];++r<o;){var s=t[r];n(s,r,t)&&(a[i++]=s)}return a}return Dk=e,Dk}var kk,j8;function NBe(){if(j8)return kk;j8=1;function e(){return[]}return kk=e,kk}var _k,B8;function LBe(){if(B8)return _k;B8=1;var e=$Be(),t=NBe(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(a){return a==null?[]:(a=Object(a),e(o(a),function(s){return r.call(a,s)}))}:t;return _k=i,_k}var $k,z8;function FBe(){if(z8)return $k;z8=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return $k=e,$k}var Nk,V8;function jBe(){if(V8)return Nk;V8=1;var e=Zu(),t=ed(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return Nk=r,Nk}var Lk,H8;function oz(){if(H8)return Lk;H8=1;var e=jBe(),t=ed(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(a){return t(a)&&r.call(a,"callee")&&!o.call(a,"callee")};return Lk=i,Lk}var F0={exports:{}},Fk,U8;function BBe(){if(U8)return Fk;U8=1;function e(){return!1}return Fk=e,Fk}F0.exports;var G8;function Bie(){return G8||(G8=1,function(e,t){var n=Hc(),r=BBe(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||r;e.exports=c}(F0,F0.exports)),F0.exports}var jk,q8;function iz(){if(q8)return jk;q8=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var i=typeof r;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return jk=n,jk}var Bk,W8;function az(){if(W8)return Bk;W8=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Bk=t,Bk}var zk,K8;function zBe(){if(K8)return zk;K8=1;var e=Zu(),t=az(),n=ed(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",u="[object Number]",f="[object Object]",h="[object RegExp]",m="[object Set]",g="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",C="[object Float32Array]",E="[object Float64Array]",I="[object Int8Array]",O="[object Int16Array]",P="[object Int32Array]",R="[object Uint8Array]",D="[object Uint8ClampedArray]",M="[object Uint16Array]",A="[object Uint32Array]",_={};_[C]=_[E]=_[I]=_[O]=_[P]=_[R]=_[D]=_[M]=_[A]=!0,_[r]=_[o]=_[v]=_[i]=_[w]=_[a]=_[s]=_[l]=_[c]=_[u]=_[f]=_[h]=_[m]=_[g]=_[y]=!1;function N(B){return n(B)&&t(B.length)&&!!_[e(B)]}return zk=N,zk}var Vk,Y8;function zie(){if(Y8)return Vk;Y8=1;function e(t){return function(n){return t(n)}}return Vk=e,Vk}var j0={exports:{}};j0.exports;var Q8;function VBe(){return Q8||(Q8=1,function(e,t){var n=aie(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(j0,j0.exports)),j0.exports}var Hk,X8;function Vie(){if(X8)return Hk;X8=1;var e=zBe(),t=zie(),n=VBe(),r=n&&n.isTypedArray,o=r?t(r):e;return Hk=o,Hk}var Uk,J8;function HBe(){if(J8)return Uk;J8=1;var e=FBe(),t=oz(),n=Aa(),r=Bie(),o=iz(),i=Vie(),a=Object.prototype,s=a.hasOwnProperty;function l(c,u){var f=n(c),h=!f&&t(c),m=!f&&!h&&r(c),g=!f&&!h&&!m&&i(c),y=f||h||m||g,v=y?e(c.length,String):[],w=v.length;for(var C in c)(u||s.call(c,C))&&!(y&&(C=="length"||m&&(C=="offset"||C=="parent")||g&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||o(C,w)))&&v.push(C);return v}return Uk=l,Uk}var Gk,Z8;function UBe(){if(Z8)return Gk;Z8=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return Gk=t,Gk}var qk,e9;function Hie(){if(e9)return qk;e9=1;function e(t,n){return function(r){return t(n(r))}}return qk=e,qk}var Wk,t9;function GBe(){if(t9)return Wk;t9=1;var e=Hie(),t=e(Object.keys,Object);return Wk=t,Wk}var Kk,n9;function qBe(){if(n9)return Kk;n9=1;var e=UBe(),t=GBe(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))r.call(i,s)&&s!="constructor"&&a.push(s);return a}return Kk=o,Kk}var Yk,r9;function xw(){if(r9)return Yk;r9=1;var e=GB(),t=az();function n(r){return r!=null&&t(r.length)&&!e(r)}return Yk=n,Yk}var Qk,o9;function UI(){if(o9)return Qk;o9=1;var e=HBe(),t=qBe(),n=xw();function r(o){return n(o)?e(o):t(o)}return Qk=r,Qk}var Xk,i9;function WBe(){if(i9)return Xk;i9=1;var e=_Be(),t=LBe(),n=UI();function r(o){return e(o,n,t)}return Xk=r,Xk}var Jk,a9;function KBe(){if(a9)return Jk;a9=1;var e=WBe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(i,a,s,l,c,u){var f=s&t,h=e(i),m=h.length,g=e(a),y=g.length;if(m!=y&&!f)return!1;for(var v=m;v--;){var w=h[v];if(!(f?w in a:r.call(a,w)))return!1}var C=u.get(i),E=u.get(a);if(C&&E)return C==a&&E==i;var I=!0;u.set(i,a),u.set(a,i);for(var O=f;++v<m;){w=h[v];var P=i[w],R=a[w];if(l)var D=f?l(R,P,w,a,i,u):l(P,R,w,i,a,u);if(!(D===void 0?P===R||c(P,R,s,l,u):D)){I=!1;break}O||(O=w=="constructor")}if(I&&!O){var M=i.constructor,A=a.constructor;M!=A&&"constructor"in i&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof A=="function"&&A instanceof A)&&(I=!1)}return u.delete(i),u.delete(a),I}return Jk=o,Jk}var Zk,s9;function YBe(){if(s9)return Zk;s9=1;var e=Vh(),t=Hc(),n=e(t,"DataView");return Zk=n,Zk}var e2,l9;function QBe(){if(l9)return e2;l9=1;var e=Vh(),t=Hc(),n=e(t,"Promise");return e2=n,e2}var t2,c9;function Uie(){if(c9)return t2;c9=1;var e=Vh(),t=Hc(),n=e(t,"Set");return t2=n,t2}var n2,u9;function XBe(){if(u9)return n2;u9=1;var e=Vh(),t=Hc(),n=e(t,"WeakMap");return n2=n,n2}var r2,d9;function JBe(){if(d9)return r2;d9=1;var e=YBe(),t=WB(),n=QBe(),r=Uie(),o=XBe(),i=Zu(),a=sie(),s="[object Map]",l="[object Object]",c="[object Promise]",u="[object Set]",f="[object WeakMap]",h="[object DataView]",m=a(e),g=a(t),y=a(n),v=a(r),w=a(o),C=i;return(e&&C(new e(new ArrayBuffer(1)))!=h||t&&C(new t)!=s||n&&C(n.resolve())!=c||r&&C(new r)!=u||o&&C(new o)!=f)&&(C=function(E){var I=i(E),O=I==l?E.constructor:void 0,P=O?a(O):"";if(P)switch(P){case m:return h;case g:return s;case y:return c;case v:return u;case w:return f}return I}),r2=C,r2}var o2,f9;function ZBe(){if(f9)return o2;f9=1;var e=_ie(),t=Fie(),n=kBe(),r=KBe(),o=JBe(),i=Aa(),a=Bie(),s=Vie(),l=1,c="[object Arguments]",u="[object Array]",f="[object Object]",h=Object.prototype,m=h.hasOwnProperty;function g(y,v,w,C,E,I){var O=i(y),P=i(v),R=O?u:o(y),D=P?u:o(v);R=R==c?f:R,D=D==c?f:D;var M=R==f,A=D==f,_=R==D;if(_&&a(y)){if(!a(v))return!1;O=!0,M=!1}if(_&&!M)return I||(I=new e),O||s(y)?t(y,v,w,C,E,I):n(y,v,R,w,C,E,I);if(!(w&l)){var N=M&&m.call(y,"__wrapped__"),B=A&&m.call(v,"__wrapped__");if(N||B){var H=N?y.value():y,j=B?v.value():v;return I||(I=new e),E(H,j,w,C,I)}}return _?(I||(I=new e),r(y,v,w,C,E,I)):!1}return o2=g,o2}var i2,p9;function sz(){if(p9)return i2;p9=1;var e=ZBe(),t=ed();function n(r,o,i,a,s){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,i,a,n,s)}return i2=n,i2}var a2,h9;function eze(){if(h9)return a2;h9=1;var e=_ie(),t=sz(),n=1,r=2;function o(i,a,s,l){var c=s.length,u=c,f=!l;if(i==null)return!u;for(i=Object(i);c--;){var h=s[c];if(f&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++c<u;){h=s[c];var m=h[0],g=i[m],y=h[1];if(f&&h[2]){if(g===void 0&&!(m in i))return!1}else{var v=new e;if(l)var w=l(g,y,m,i,a,v);if(!(w===void 0?t(y,g,n|r,l,v):w))return!1}}return!0}return a2=o,a2}var s2,m9;function Gie(){if(m9)return s2;m9=1;var e=jf();function t(n){return n===n&&!e(n)}return s2=t,s2}var l2,g9;function tze(){if(g9)return l2;g9=1;var e=Gie(),t=UI();function n(r){for(var o=t(r),i=o.length;i--;){var a=o[i],s=r[a];o[i]=[a,s,e(s)]}return o}return l2=n,l2}var c2,y9;function qie(){if(y9)return c2;y9=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return c2=e,c2}var u2,v9;function nze(){if(v9)return u2;v9=1;var e=eze(),t=tze(),n=qie();function r(o){var i=t(o);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(a){return a===o||e(a,o,i)}}return u2=r,u2}var d2,b9;function rze(){if(b9)return d2;b9=1;function e(t,n){return t!=null&&n in Object(t)}return d2=e,d2}var f2,x9;function oze(){if(x9)return f2;x9=1;var e=uie(),t=oz(),n=Aa(),r=iz(),o=az(),i=FI();function a(s,l,c){l=e(l,s);for(var u=-1,f=l.length,h=!1;++u<f;){var m=i(l[u]);if(!(h=s!=null&&c(s,m)))break;s=s[m]}return h||++u!=f?h:(f=s==null?0:s.length,!!f&&o(f)&&r(m,f)&&(n(s)||t(s)))}return f2=a,f2}var p2,S9;function ize(){if(S9)return p2;S9=1;var e=rze(),t=oze();function n(r,o){return r!=null&&t(r,o,e)}return p2=n,p2}var h2,w9;function aze(){if(w9)return h2;w9=1;var e=sz(),t=die(),n=ize(),r=UB(),o=Gie(),i=qie(),a=FI(),s=1,l=2;function c(u,f){return r(u)&&o(f)?i(a(u),f):function(h){var m=t(h,u);return m===void 0&&m===f?n(h,u):e(f,m,s|l)}}return h2=c,h2}var m2,C9;function Cv(){if(C9)return m2;C9=1;function e(t){return t}return m2=e,m2}var g2,E9;function sze(){if(E9)return g2;E9=1;function e(t){return function(n){return n==null?void 0:n[t]}}return g2=e,g2}var y2,T9;function lze(){if(T9)return y2;T9=1;var e=QB();function t(n){return function(r){return e(r,n)}}return y2=t,y2}var v2,O9;function cze(){if(O9)return v2;O9=1;var e=sze(),t=lze(),n=UB(),r=FI();function o(i){return n(i)?e(r(i)):t(i)}return v2=o,v2}var b2,I9;function Uc(){if(I9)return b2;I9=1;var e=nze(),t=aze(),n=Cv(),r=Aa(),o=cze();function i(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):o(a)}return b2=i,b2}var x2,P9;function Wie(){if(P9)return x2;P9=1;function e(t,n,r,o){for(var i=t.length,a=r+(o?1:-1);o?a--:++a<i;)if(n(t[a],a,t))return a;return-1}return x2=e,x2}var S2,A9;function uze(){if(A9)return S2;A9=1;function e(t){return t!==t}return S2=e,S2}var w2,M9;function dze(){if(M9)return w2;M9=1;function e(t,n,r){for(var o=r-1,i=t.length;++o<i;)if(t[o]===n)return o;return-1}return w2=e,w2}var C2,R9;function fze(){if(R9)return C2;R9=1;var e=Wie(),t=uze(),n=dze();function r(o,i,a){return i===i?n(o,i,a):e(o,t,a)}return C2=r,C2}var E2,D9;function pze(){if(D9)return E2;D9=1;var e=fze();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return E2=t,E2}var T2,k9;function hze(){if(k9)return T2;k9=1;function e(t,n,r){for(var o=-1,i=t==null?0:t.length;++o<i;)if(r(n,t[o]))return!0;return!1}return T2=e,T2}var O2,_9;function mze(){if(_9)return O2;_9=1;function e(){}return O2=e,O2}var I2,$9;function gze(){if($9)return I2;$9=1;var e=Uie(),t=mze(),n=rz(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return I2=o,I2}var P2,N9;function yze(){if(N9)return P2;N9=1;var e=$ie(),t=pze(),n=hze(),r=Lie(),o=gze(),i=rz(),a=200;function s(l,c,u){var f=-1,h=t,m=l.length,g=!0,y=[],v=y;if(u)g=!1,h=n;else if(m>=a){var w=c?null:o(l);if(w)return i(w);g=!1,h=r,v=new e}else v=c?[]:y;e:for(;++f<m;){var C=l[f],E=c?c(C):C;if(C=u||C!==0?C:0,g&&E===E){for(var I=v.length;I--;)if(v[I]===E)continue e;c&&v.push(E),y.push(C)}else h(v,E,u)||(v!==y&&v.push(E),y.push(C))}return y}return P2=s,P2}var A2,L9;function vze(){if(L9)return A2;L9=1;var e=Uc(),t=yze();function n(r,o){return r&&r.length?t(r,e(o,2)):[]}return A2=n,A2}var bze=vze();const F9=Gn(bze);function Kie(e,t,n){return t===!0?F9(e,n):rn(t)?F9(e,t):e}function hy(e){"@babel/helpers - typeof";return hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hy(e)}var xze=["ref"];function j9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j9(Object(n),!0).forEach(function(r){GI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j9(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qie(r.key),r)}}function wze(e,t,n){return t&&B9(e.prototype,t),n&&B9(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cze(e,t,n){return t=bT(t),Eze(e,Yie()?Reflect.construct(t,n||[],bT(e).constructor):t.apply(e,n))}function Eze(e,t){if(t&&(hy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tze(e)}function Tze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yie=function(){return!!e})()}function bT(e){return bT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bT(e)}function Oze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TL(e,t)}function TL(e,t){return TL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},TL(e,t)}function GI(e,t,n){return t=Qie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qie(e){var t=Ize(e,"string");return hy(t)=="symbol"?t:t+""}function Ize(e,t){if(hy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Pze(e,t){if(e==null)return{};var n=Aze(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Aze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mze(e){return e.value}function Rze(e,t){if(J.isValidElement(e))return J.cloneElement(e,t);if(typeof e=="function")return J.createElement(e,t);t.ref;var n=Pze(t,xze);return J.createElement(nz,n)}var z9=1,Oc=function(e){function t(){var n;Sze(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=Cze(this,t,[].concat(o)),GI(n,"lastBoundingBox",{width:-1,height:-1}),n}return Oze(t,e),wze(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,o=this.getBBox();o?(Math.abs(o.width-this.lastBoundingBox.width)>z9||Math.abs(o.height-this.lastBoundingBox.height)>z9)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?yu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();f={left:((c||0)-m.width)/2}}else f=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();h={top:((u||0)-g.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return yu(yu({},f),h)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,f=yu(yu({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return J.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){r.wrapperNode=m}},Rze(i,yu(yu({},this.props),{},{payload:Kie(u,c,Mze)})))}}],[{key:"getWithHeight",value:function(r,o){var i=yu(yu({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&mt(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(x.PureComponent);GI(Oc,"displayName","Legend");GI(Oc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var M2,V9;function Dze(){if(V9)return M2;V9=1;var e=bw(),t=oz(),n=Aa(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return M2=o,M2}var R2,H9;function Xie(){if(H9)return R2;H9=1;var e=jie(),t=Dze();function n(r,o,i,a,s){var l=-1,c=r.length;for(i||(i=t),s||(s=[]);++l<c;){var u=r[l];o>0&&i(u)?o>1?n(u,o-1,i,a,s):e(s,u):a||(s[s.length]=u)}return s}return R2=n,R2}var D2,U9;function kze(){if(U9)return D2;U9=1;function e(t){return function(n,r,o){for(var i=-1,a=Object(n),s=o(n),l=s.length;l--;){var c=s[t?l:++i];if(r(a[c],c,a)===!1)break}return n}}return D2=e,D2}var k2,G9;function _ze(){if(G9)return k2;G9=1;var e=kze(),t=e();return k2=t,k2}var _2,q9;function Jie(){if(q9)return _2;q9=1;var e=_ze(),t=UI();function n(r,o){return r&&e(r,o,t)}return _2=n,_2}var $2,W9;function $ze(){if(W9)return $2;W9=1;var e=xw();function t(n,r){return function(o,i){if(o==null)return o;if(!e(o))return n(o,i);for(var a=o.length,s=r?a:-1,l=Object(o);(r?s--:++s<a)&&i(l[s],s,l)!==!1;);return o}}return $2=t,$2}var N2,K9;function lz(){if(K9)return N2;K9=1;var e=Jie(),t=$ze(),n=t(e);return N2=n,N2}var L2,Y9;function Zie(){if(Y9)return L2;Y9=1;var e=lz(),t=xw();function n(r,o){var i=-1,a=t(r)?Array(r.length):[];return e(r,function(s,l,c){a[++i]=o(s,l,c)}),a}return L2=n,L2}var F2,Q9;function Nze(){if(Q9)return F2;Q9=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return F2=e,F2}var j2,X9;function Lze(){if(X9)return j2;X9=1;var e=xv();function t(n,r){if(n!==r){var o=n!==void 0,i=n===null,a=n===n,s=e(n),l=r!==void 0,c=r===null,u=r===r,f=e(r);if(!c&&!f&&!s&&n>r||s&&l&&u&&!c&&!f||i&&l&&u||!o&&u||!a)return 1;if(!i&&!s&&!f&&n<r||f&&o&&a&&!i&&!s||c&&o&&a||!l&&a||!u)return-1}return 0}return j2=t,j2}var B2,J9;function Fze(){if(J9)return B2;J9=1;var e=Lze();function t(n,r,o){for(var i=-1,a=n.criteria,s=r.criteria,l=a.length,c=o.length;++i<l;){var u=e(a[i],s[i]);if(u){if(i>=c)return u;var f=o[i];return u*(f=="desc"?-1:1)}}return n.index-r.index}return B2=t,B2}var z2,Z9;function jze(){if(Z9)return z2;Z9=1;var e=YB(),t=QB(),n=Uc(),r=Zie(),o=Nze(),i=zie(),a=Fze(),s=Cv(),l=Aa();function c(u,f,h){f.length?f=e(f,function(y){return l(y)?function(v){return t(v,y.length===1?y[0]:y)}:y}):f=[s];var m=-1;f=e(f,i(n));var g=r(u,function(y,v,w){var C=e(f,function(E){return E(y)});return{criteria:C,index:++m,value:y}});return o(g,function(y,v){return a(y,v,h)})}return z2=c,z2}var V2,e7;function Bze(){if(e7)return V2;e7=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return V2=e,V2}var H2,t7;function zze(){if(t7)return H2;t7=1;var e=Bze(),t=Math.max;function n(r,o,i){return o=t(o===void 0?r.length-1:o,0),function(){for(var a=arguments,s=-1,l=t(a.length-o,0),c=Array(l);++s<l;)c[s]=a[o+s];s=-1;for(var u=Array(o+1);++s<o;)u[s]=a[s];return u[o]=i(c),e(r,this,u)}}return H2=n,H2}var U2,n7;function Vze(){if(n7)return U2;n7=1;function e(t){return function(){return t}}return U2=e,U2}var G2,r7;function eae(){if(r7)return G2;r7=1;var e=Vh(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return G2=t,G2}var q2,o7;function Hze(){if(o7)return q2;o7=1;var e=Vze(),t=eae(),n=Cv(),r=t?function(o,i){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return q2=r,q2}var W2,i7;function Uze(){if(i7)return W2;i7=1;var e=800,t=16,n=Date.now;function r(o){var i=0,a=0;return function(){var s=n(),l=t-(s-a);if(a=s,l>0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return W2=r,W2}var K2,a7;function Gze(){if(a7)return K2;a7=1;var e=Hze(),t=Uze(),n=t(e);return K2=n,K2}var Y2,s7;function qze(){if(s7)return Y2;s7=1;var e=Cv(),t=zze(),n=Gze();function r(o,i){return n(t(o,i,e),o+"")}return Y2=r,Y2}var Q2,l7;function qI(){if(l7)return Q2;l7=1;var e=qB(),t=xw(),n=iz(),r=jf();function o(i,a,s){if(!r(s))return!1;var l=typeof a;return(l=="number"?t(s)&&n(a,s.length):l=="string"&&a in s)?e(s[a],i):!1}return Q2=o,Q2}var X2,c7;function Wze(){if(c7)return X2;c7=1;var e=Xie(),t=jze(),n=qze(),r=qI(),o=n(function(i,a){if(i==null)return[];var s=a.length;return s>1&&r(i,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(i,e(a,1),[])});return X2=o,X2}var Kze=Wze();const cz=Gn(Kze);function jx(e){"@babel/helpers - typeof";return jx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jx(e)}function OL(){return OL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OL.apply(this,arguments)}function Yze(e,t){return Zze(e)||Jze(e,t)||Xze(e,t)||Qze()}function Qze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xze(e,t){if(e){if(typeof e=="string")return u7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u7(e,t)}}function u7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jze(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function Zze(e){if(Array.isArray(e))return e}function d7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function J2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d7(Object(n),!0).forEach(function(r){eVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eVe(e,t,n){return t=tVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tVe(e){var t=nVe(e,"string");return jx(t)=="symbol"?t:t+""}function nVe(e,t){if(jx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rVe(e){return Array.isArray(e)&&Vo(e[0])&&Vo(e[1])?e.join(" ~ "):e}var oVe=function(t){var n=t.separator,r=n===void 0?" : ":n,o=t.contentStyle,i=o===void 0?{}:o,a=t.itemStyle,s=a===void 0?{}:a,l=t.labelStyle,c=l===void 0?{}:l,u=t.payload,f=t.formatter,h=t.itemSorter,m=t.wrapperClassName,g=t.labelClassName,y=t.label,v=t.labelFormatter,w=t.accessibilityLayer,C=w===void 0?!1:w,E=function(){if(u&&u.length){var N={padding:0,margin:0},B=(h?cz(u,h):u).map(function(H,j){if(H.type==="none")return null;var L=J2({display:"block",paddingTop:4,paddingBottom:4,color:H.color||"#000"},s),V=H.formatter||f||rVe,W=H.value,K=H.name,G=W,q=K;if(V&&G!=null&&q!=null){var Y=V(W,K,H,j,u);if(Array.isArray(Y)){var Z=Yze(Y,2);G=Z[0],q=Z[1]}else G=Y}return J.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(j),style:L},Vo(q)?J.createElement("span",{className:"recharts-tooltip-item-name"},q):null,Vo(q)?J.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,J.createElement("span",{className:"recharts-tooltip-item-value"},G),J.createElement("span",{className:"recharts-tooltip-item-unit"},H.unit||""))});return J.createElement("ul",{className:"recharts-tooltip-item-list",style:N},B)}return null},I=J2({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),O=J2({margin:0},c),P=!on(y),R=P?y:"",D=fe("recharts-default-tooltip",m),M=fe("recharts-tooltip-label",g);P&&v&&u!==void 0&&u!==null&&(R=v(y,u));var A=C?{role:"status","aria-live":"assertive"}:{};return J.createElement("div",OL({className:D,style:I},A),J.createElement("p",{className:M,style:O},J.isValidElement(R)?R:"".concat(R)),E())};function Bx(e){"@babel/helpers - typeof";return Bx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bx(e)}function _1(e,t,n){return t=iVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iVe(e){var t=aVe(e,"string");return Bx(t)=="symbol"?t:t+""}function aVe(e,t){if(Bx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r0="recharts-tooltip-wrapper",sVe={visibility:"hidden"};function lVe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return fe(r0,_1(_1(_1(_1({},"".concat(r0,"-right"),mt(n)&&t&&mt(t.x)&&n>=t.x),"".concat(r0,"-left"),mt(n)&&t&&mt(t.x)&&n<t.x),"".concat(r0,"-bottom"),mt(r)&&t&&mt(t.y)&&r>=t.y),"".concat(r0,"-top"),mt(r)&&t&&mt(t.y)&&r<t.y))}function f7(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&mt(i[r]))return i[r];var u=n[r]-s-o,f=n[r]+o;if(t[r])return a[r]?u:f;if(a[r]){var h=u,m=l[r];return h<m?Math.max(f,l[r]):Math.max(u,l[r])}var g=f+s,y=l[r]+c;return g>y?Math.max(u,l[r]):Math.max(f,l[r])}function cVe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function uVe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,f;return a.height>0&&a.width>0&&n?(u=f7({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),f=f7({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=cVe({translateX:u,translateY:f,useTranslate3d:s})):c=sVe,{cssProperties:c,cssClasses:lVe({translateX:u,translateY:f,coordinate:n})}}function my(e){"@babel/helpers - typeof";return my=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my(e)}function p7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function h7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p7(Object(n),!0).forEach(function(r){PL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fVe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nae(r.key),r)}}function pVe(e,t,n){return t&&fVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hVe(e,t,n){return t=xT(t),mVe(e,tae()?Reflect.construct(t,n||[],xT(e).constructor):t.apply(e,n))}function mVe(e,t){if(t&&(my(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gVe(e)}function gVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tae=function(){return!!e})()}function xT(e){return xT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xT(e)}function yVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IL(e,t)}function IL(e,t){return IL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},IL(e,t)}function PL(e,t,n){return t=nae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nae(e){var t=vVe(e,"string");return my(t)=="symbol"?t:t+""}function vVe(e,t){if(my(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(my(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var m7=1,bVe=function(e){function t(){var n;dVe(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=hVe(this,t,[].concat(o)),PL(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),PL(n,"handleKeyDown",function(a){if(a.key==="Escape"){var s,l,c,u;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(c=(u=n.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0}})}}),n}return yVe(t,e),pVe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>m7||Math.abs(r.height-this.state.lastBoundingBox.height)>m7)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,f=o.hasPayload,h=o.isAnimationActive,m=o.offset,g=o.position,y=o.reverseDirection,v=o.useTranslate3d,w=o.viewBox,C=o.wrapperStyle,E=uVe({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:m,position:g,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),I=E.cssClasses,O=E.cssProperties,P=h7(h7({transition:h&&i?"transform ".concat(s,"ms ").concat(l):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},C);return J.createElement("div",{tabIndex:-1,className:I,style:P,ref:function(D){r.wrapperNode=D}},c)}}])}(x.PureComponent),xVe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},td={isSsr:xVe()};function gy(e){"@babel/helpers - typeof";return gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gy(e)}function g7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function y7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g7(Object(n),!0).forEach(function(r){uz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wVe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oae(r.key),r)}}function CVe(e,t,n){return t&&wVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EVe(e,t,n){return t=ST(t),TVe(e,rae()?Reflect.construct(t,n||[],ST(e).constructor):t.apply(e,n))}function TVe(e,t){if(t&&(gy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OVe(e)}function OVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rae=function(){return!!e})()}function ST(e){return ST=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ST(e)}function IVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AL(e,t)}function AL(e,t){return AL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},AL(e,t)}function uz(e,t,n){return t=oae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oae(e){var t=PVe(e,"string");return gy(t)=="symbol"?t:t+""}function PVe(e,t){if(gy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function AVe(e){return e.dataKey}function MVe(e,t){return J.isValidElement(e)?J.cloneElement(e,t):typeof e=="function"?J.createElement(e,t):J.createElement(oVe,t)}var ba=function(e){function t(){return SVe(this,t),EVe(this,t,arguments)}return IVe(t,e),CVe(t,[{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.content,u=o.coordinate,f=o.filterNull,h=o.isAnimationActive,m=o.offset,g=o.payload,y=o.payloadUniqBy,v=o.position,w=o.reverseDirection,C=o.useTranslate3d,E=o.viewBox,I=o.wrapperStyle,O=g??[];f&&O.length&&(O=Kie(g.filter(function(R){return R.value!=null&&(R.hide!==!0||r.props.includeHidden)}),y,AVe));var P=O.length>0;return J.createElement(bVe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:h,active:i,coordinate:u,hasPayload:P,offset:m,position:v,reverseDirection:w,useTranslate3d:C,viewBox:E,wrapperStyle:I},MVe(c,y7(y7({},this.props),{},{payload:O})))}}])}(x.PureComponent);uz(ba,"displayName","Tooltip");uz(ba,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!td.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Z2,v7;function RVe(){if(v7)return Z2;v7=1;var e=Hc(),t=function(){return e.Date.now()};return Z2=t,Z2}var e_,b7;function DVe(){if(b7)return e_;b7=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return e_=t,e_}var t_,x7;function kVe(){if(x7)return t_;x7=1;var e=DVe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return t_=n,t_}var n_,S7;function iae(){if(S7)return n_;S7=1;var e=kVe(),t=jf(),n=xv(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=t(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=e(c);var f=i.test(c);return f||a.test(c)?s(c.slice(2),f?2:8):o.test(c)?r:+c}return n_=l,n_}var r_,w7;function aae(){if(w7)return r_;w7=1;var e=jf(),t=RVe(),n=iae(),r="Expected a function",o=Math.max,i=Math.min;function a(s,l,c){var u,f,h,m,g,y,v=0,w=!1,C=!1,E=!0;if(typeof s!="function")throw new TypeError(r);l=n(l)||0,e(c)&&(w=!!c.leading,C="maxWait"in c,h=C?o(n(c.maxWait)||0,l):h,E="trailing"in c?!!c.trailing:E);function I(B){var H=u,j=f;return u=f=void 0,v=B,m=s.apply(j,H),m}function O(B){return v=B,g=setTimeout(D,l),w?I(B):m}function P(B){var H=B-y,j=B-v,L=l-H;return C?i(L,h-j):L}function R(B){var H=B-y,j=B-v;return y===void 0||H>=l||H<0||C&&j>=h}function D(){var B=t();if(R(B))return M(B);g=setTimeout(D,P(B))}function M(B){return g=void 0,E&&u?I(B):(u=f=void 0,m)}function A(){g!==void 0&&clearTimeout(g),v=0,u=y=f=g=void 0}function _(){return g===void 0?m:M(t())}function N(){var B=t(),H=R(B);if(u=arguments,f=this,y=B,H){if(g===void 0)return O(y);if(C)return clearTimeout(g),g=setTimeout(D,l),I(y)}return g===void 0&&(g=setTimeout(D,l)),m}return N.cancel=A,N.flush=_,N}return r_=a,r_}var o_,C7;function _Ve(){if(C7)return o_;C7=1;var e=aae(),t=jf(),n="Expected a function";function r(o,i,a){var s=!0,l=!0;if(typeof o!="function")throw new TypeError(n);return t(a)&&(s="leading"in a?!!a.leading:s,l="trailing"in a?!!a.trailing:l),e(o,i,{leading:s,maxWait:i,trailing:l})}return o_=r,o_}var $Ve=_Ve();const sae=Gn($Ve);function zx(e){"@babel/helpers - typeof";return zx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zx(e)}function E7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E7(Object(n),!0).forEach(function(r){NVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NVe(e,t,n){return t=LVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LVe(e){var t=FVe(e,"string");return zx(t)=="symbol"?t:t+""}function FVe(e,t){if(zx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jVe(e,t){return HVe(e)||VVe(e,t)||zVe(e,t)||BVe()}function BVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zVe(e,t){if(e){if(typeof e=="string")return T7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T7(e,t)}}function T7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VVe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function HVe(e){if(Array.isArray(e))return e}var nd=x.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,o=r===void 0?{width:-1,height:-1}:r,i=e.width,a=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,u=c===void 0?0:c,f=e.minHeight,h=e.maxHeight,m=e.children,g=e.debounce,y=g===void 0?0:g,v=e.id,w=e.className,C=e.onResize,E=e.style,I=E===void 0?{}:E,O=x.useRef(null),P=x.useRef();P.current=C,x.useImperativeHandle(t,function(){return Object.defineProperty(O.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),O.current},configurable:!0})});var R=x.useState({containerWidth:o.width,containerHeight:o.height}),D=jVe(R,2),M=D[0],A=D[1],_=x.useCallback(function(B,H){A(function(j){var L=Math.round(B),V=Math.round(H);return j.containerWidth===L&&j.containerHeight===V?j:{containerWidth:L,containerHeight:V}})},[]);x.useEffect(function(){var B=function(K){var G,q=K[0].contentRect,Y=q.width,Z=q.height;_(Y,Z),(G=P.current)===null||G===void 0||G.call(P,Y,Z)};y>0&&(B=sae(B,y,{trailing:!0,leading:!1}));var H=new ResizeObserver(B),j=O.current.getBoundingClientRect(),L=j.width,V=j.height;return _(L,V),H.observe(O.current),function(){H.disconnect()}},[_,y]);var N=x.useMemo(function(){var B=M.containerWidth,H=M.containerHeight;if(B<0||H<0)return null;jl(Bp(a)||Bp(l),`The width(%s) and height(%s) are both fixed numbers,
- maybe you don't need to use a ResponsiveContainer.`,a,l),jl(!n||n>0,"The aspect(%s) must be greater than zero.",n);var j=Bp(a)?B:a,L=Bp(l)?H:l;n&&n>0&&(j?L=j/n:L&&(j=L*n),h&&L>h&&(L=h)),jl(j>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
+ H`).concat(bl,"M").concat(2*s,",").concat(i,`
+ A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return J.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(bl/8,"h").concat(bl,"v").concat(bl*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(J.isValidElement(r.legendIcon)){var c=gBe({},r);return delete c.legendIcon,J.cloneElement(r.legendIcon,c)}return J.createElement(UI,{fill:l,cx:i,cy:i,size:bl,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,o=this.props,i=o.payload,a=o.iconSize,s=o.layout,l=o.formatter,c=o.inactiveColor,u={x:0,y:0,width:bl,height:bl},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,g){var y=m.formatter||l,v=fe(Fx(Fx({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",m.inactive));if(m.type==="none")return null;var w=rn(m.value)?null:m.value;zl(!rn(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var C=m.inactive?c:m.color;return J.createElement("li",EL({className:v,style:f,key:"legend-item-".concat(g)},Af(r.props,m,g)),J.createElement(yL,{width:a,height:a,viewBox:u,style:p},r.renderIcon(m)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},y?y(w,m,g):w))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return J.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(x.PureComponent);Fx(rz,"displayName","Legend");Fx(rz,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var mk,S8;function TBe(){if(S8)return mk;S8=1;var e=LI();function t(){this.__data__=new e,this.size=0}return mk=t,mk}var gk,w8;function OBe(){if(w8)return gk;w8=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return gk=e,gk}var yk,C8;function IBe(){if(C8)return yk;C8=1;function e(t){return this.__data__.get(t)}return yk=e,yk}var vk,E8;function PBe(){if(E8)return vk;E8=1;function e(t){return this.__data__.has(t)}return vk=e,vk}var bk,T8;function ABe(){if(T8)return bk;T8=1;var e=LI(),t=KB(),n=YB(),r=200;function o(i,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<r-1)return l.push([i,a]),this.size=++s.size,this;s=this.__data__=new n(l)}return s.set(i,a),this.size=s.size,this}return bk=o,bk}var xk,O8;function $ie(){if(O8)return xk;O8=1;var e=LI(),t=TBe(),n=OBe(),r=IBe(),o=PBe(),i=ABe();function a(s){var l=this.__data__=new e(s);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,xk=a,xk}var Sk,I8;function MBe(){if(I8)return Sk;I8=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Sk=t,Sk}var wk,P8;function RBe(){if(P8)return wk;P8=1;function e(t){return this.__data__.has(t)}return wk=e,wk}var Ck,A8;function Nie(){if(A8)return Ck;A8=1;var e=YB(),t=MBe(),n=RBe();function r(o){var i=-1,a=o==null?0:o.length;for(this.__data__=new e;++i<a;)this.add(o[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Ck=r,Ck}var Ek,M8;function Lie(){if(M8)return Ek;M8=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return Ek=e,Ek}var Tk,R8;function Fie(){if(R8)return Tk;R8=1;function e(t,n){return t.has(n)}return Tk=e,Tk}var Ok,D8;function jie(){if(D8)return Ok;D8=1;var e=Nie(),t=Lie(),n=Fie(),r=1,o=2;function i(a,s,l,c,u,f){var p=l&r,m=a.length,g=s.length;if(m!=g&&!(p&&g>m))return!1;var y=f.get(a),v=f.get(s);if(y&&v)return y==s&&v==a;var w=-1,C=!0,E=l&o?new e:void 0;for(f.set(a,s),f.set(s,a);++w<m;){var I=a[w],O=s[w];if(c)var P=p?c(O,I,w,s,a,f):c(I,O,w,a,s,f);if(P!==void 0){if(P)continue;C=!1;break}if(E){if(!t(s,function(R,D){if(!n(E,D)&&(I===R||u(I,R,l,c,f)))return E.push(D)})){C=!1;break}}else if(!(I===O||u(I,O,l,c,f))){C=!1;break}}return f.delete(a),f.delete(s),C}return Ok=i,Ok}var Ik,k8;function DBe(){if(k8)return Ik;k8=1;var e=Uc(),t=e.Uint8Array;return Ik=t,Ik}var Pk,_8;function kBe(){if(_8)return Pk;_8=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,i){r[++n]=[i,o]}),r}return Pk=e,Pk}var Ak,$8;function oz(){if($8)return Ak;$8=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return Ak=e,Ak}var Mk,N8;function _Be(){if(N8)return Mk;N8=1;var e=bw(),t=DBe(),n=WB(),r=jie(),o=kBe(),i=oz(),a=1,s=2,l="[object Boolean]",c="[object Date]",u="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",g="[object Set]",y="[object String]",v="[object Symbol]",w="[object ArrayBuffer]",C="[object DataView]",E=e?e.prototype:void 0,I=E?E.valueOf:void 0;function O(P,R,D,M,A,_,N){switch(D){case C:if(P.byteLength!=R.byteLength||P.byteOffset!=R.byteOffset)return!1;P=P.buffer,R=R.buffer;case w:return!(P.byteLength!=R.byteLength||!_(new t(P),new t(R)));case l:case c:case p:return n(+P,+R);case u:return P.name==R.name&&P.message==R.message;case m:case y:return P==R+"";case f:var B=o;case g:var H=M&a;if(B||(B=i),P.size!=R.size&&!H)return!1;var j=N.get(P);if(j)return j==R;M|=s,N.set(P,R);var L=r(B(P),B(R),M,A,_,N);return N.delete(P),L;case v:if(I)return I.call(P)==I.call(R)}return!1}return Mk=O,Mk}var Rk,L8;function Bie(){if(L8)return Rk;L8=1;function e(t,n){for(var r=-1,o=n.length,i=t.length;++r<o;)t[i+r]=n[r];return t}return Rk=e,Rk}var Dk,F8;function $Be(){if(F8)return Dk;F8=1;var e=Bie(),t=Aa();function n(r,o,i){var a=o(r);return t(r)?a:e(a,i(r))}return Dk=n,Dk}var kk,j8;function NBe(){if(j8)return kk;j8=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=0,a=[];++r<o;){var s=t[r];n(s,r,t)&&(a[i++]=s)}return a}return kk=e,kk}var _k,B8;function LBe(){if(B8)return _k;B8=1;function e(){return[]}return _k=e,_k}var $k,z8;function FBe(){if(z8)return $k;z8=1;var e=NBe(),t=LBe(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(a){return a==null?[]:(a=Object(a),e(o(a),function(s){return r.call(a,s)}))}:t;return $k=i,$k}var Nk,V8;function jBe(){if(V8)return Nk;V8=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return Nk=e,Nk}var Lk,H8;function BBe(){if(H8)return Lk;H8=1;var e=td(),t=nd(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return Lk=r,Lk}var Fk,U8;function iz(){if(U8)return Fk;U8=1;var e=BBe(),t=nd(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(a){return t(a)&&r.call(a,"callee")&&!o.call(a,"callee")};return Fk=i,Fk}var F0={exports:{}},jk,G8;function zBe(){if(G8)return jk;G8=1;function e(){return!1}return jk=e,jk}F0.exports;var q8;function zie(){return q8||(q8=1,function(e,t){var n=Uc(),r=zBe(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||r;e.exports=c}(F0,F0.exports)),F0.exports}var Bk,W8;function az(){if(W8)return Bk;W8=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var i=typeof r;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return Bk=n,Bk}var zk,K8;function sz(){if(K8)return zk;K8=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return zk=t,zk}var Vk,Y8;function VBe(){if(Y8)return Vk;Y8=1;var e=td(),t=sz(),n=nd(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",u="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",g="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",C="[object Float32Array]",E="[object Float64Array]",I="[object Int8Array]",O="[object Int16Array]",P="[object Int32Array]",R="[object Uint8Array]",D="[object Uint8ClampedArray]",M="[object Uint16Array]",A="[object Uint32Array]",_={};_[C]=_[E]=_[I]=_[O]=_[P]=_[R]=_[D]=_[M]=_[A]=!0,_[r]=_[o]=_[v]=_[i]=_[w]=_[a]=_[s]=_[l]=_[c]=_[u]=_[f]=_[p]=_[m]=_[g]=_[y]=!1;function N(B){return n(B)&&t(B.length)&&!!_[e(B)]}return Vk=N,Vk}var Hk,Q8;function Vie(){if(Q8)return Hk;Q8=1;function e(t){return function(n){return t(n)}}return Hk=e,Hk}var j0={exports:{}};j0.exports;var X8;function HBe(){return X8||(X8=1,function(e,t){var n=sie(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(j0,j0.exports)),j0.exports}var Uk,J8;function Hie(){if(J8)return Uk;J8=1;var e=VBe(),t=Vie(),n=HBe(),r=n&&n.isTypedArray,o=r?t(r):e;return Uk=o,Uk}var Gk,Z8;function UBe(){if(Z8)return Gk;Z8=1;var e=jBe(),t=iz(),n=Aa(),r=zie(),o=az(),i=Hie(),a=Object.prototype,s=a.hasOwnProperty;function l(c,u){var f=n(c),p=!f&&t(c),m=!f&&!p&&r(c),g=!f&&!p&&!m&&i(c),y=f||p||m||g,v=y?e(c.length,String):[],w=v.length;for(var C in c)(u||s.call(c,C))&&!(y&&(C=="length"||m&&(C=="offset"||C=="parent")||g&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||o(C,w)))&&v.push(C);return v}return Gk=l,Gk}var qk,e9;function GBe(){if(e9)return qk;e9=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return qk=t,qk}var Wk,t9;function Uie(){if(t9)return Wk;t9=1;function e(t,n){return function(r){return t(n(r))}}return Wk=e,Wk}var Kk,n9;function qBe(){if(n9)return Kk;n9=1;var e=Uie(),t=e(Object.keys,Object);return Kk=t,Kk}var Yk,r9;function WBe(){if(r9)return Yk;r9=1;var e=GBe(),t=qBe(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))r.call(i,s)&&s!="constructor"&&a.push(s);return a}return Yk=o,Yk}var Qk,o9;function xw(){if(o9)return Qk;o9=1;var e=qB(),t=sz();function n(r){return r!=null&&t(r.length)&&!e(r)}return Qk=n,Qk}var Xk,i9;function GI(){if(i9)return Xk;i9=1;var e=UBe(),t=WBe(),n=xw();function r(o){return n(o)?e(o):t(o)}return Xk=r,Xk}var Jk,a9;function KBe(){if(a9)return Jk;a9=1;var e=$Be(),t=FBe(),n=GI();function r(o){return e(o,n,t)}return Jk=r,Jk}var Zk,s9;function YBe(){if(s9)return Zk;s9=1;var e=KBe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(i,a,s,l,c,u){var f=s&t,p=e(i),m=p.length,g=e(a),y=g.length;if(m!=y&&!f)return!1;for(var v=m;v--;){var w=p[v];if(!(f?w in a:r.call(a,w)))return!1}var C=u.get(i),E=u.get(a);if(C&&E)return C==a&&E==i;var I=!0;u.set(i,a),u.set(a,i);for(var O=f;++v<m;){w=p[v];var P=i[w],R=a[w];if(l)var D=f?l(R,P,w,a,i,u):l(P,R,w,i,a,u);if(!(D===void 0?P===R||c(P,R,s,l,u):D)){I=!1;break}O||(O=w=="constructor")}if(I&&!O){var M=i.constructor,A=a.constructor;M!=A&&"constructor"in i&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof A=="function"&&A instanceof A)&&(I=!1)}return u.delete(i),u.delete(a),I}return Zk=o,Zk}var e2,l9;function QBe(){if(l9)return e2;l9=1;var e=Hh(),t=Uc(),n=e(t,"DataView");return e2=n,e2}var t2,c9;function XBe(){if(c9)return t2;c9=1;var e=Hh(),t=Uc(),n=e(t,"Promise");return t2=n,t2}var n2,u9;function Gie(){if(u9)return n2;u9=1;var e=Hh(),t=Uc(),n=e(t,"Set");return n2=n,n2}var r2,d9;function JBe(){if(d9)return r2;d9=1;var e=Hh(),t=Uc(),n=e(t,"WeakMap");return r2=n,r2}var o2,f9;function ZBe(){if(f9)return o2;f9=1;var e=QBe(),t=KB(),n=XBe(),r=Gie(),o=JBe(),i=td(),a=lie(),s="[object Map]",l="[object Object]",c="[object Promise]",u="[object Set]",f="[object WeakMap]",p="[object DataView]",m=a(e),g=a(t),y=a(n),v=a(r),w=a(o),C=i;return(e&&C(new e(new ArrayBuffer(1)))!=p||t&&C(new t)!=s||n&&C(n.resolve())!=c||r&&C(new r)!=u||o&&C(new o)!=f)&&(C=function(E){var I=i(E),O=I==l?E.constructor:void 0,P=O?a(O):"";if(P)switch(P){case m:return p;case g:return s;case y:return c;case v:return u;case w:return f}return I}),o2=C,o2}var i2,p9;function eze(){if(p9)return i2;p9=1;var e=$ie(),t=jie(),n=_Be(),r=YBe(),o=ZBe(),i=Aa(),a=zie(),s=Hie(),l=1,c="[object Arguments]",u="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function g(y,v,w,C,E,I){var O=i(y),P=i(v),R=O?u:o(y),D=P?u:o(v);R=R==c?f:R,D=D==c?f:D;var M=R==f,A=D==f,_=R==D;if(_&&a(y)){if(!a(v))return!1;O=!0,M=!1}if(_&&!M)return I||(I=new e),O||s(y)?t(y,v,w,C,E,I):n(y,v,R,w,C,E,I);if(!(w&l)){var N=M&&m.call(y,"__wrapped__"),B=A&&m.call(v,"__wrapped__");if(N||B){var H=N?y.value():y,j=B?v.value():v;return I||(I=new e),E(H,j,w,C,I)}}return _?(I||(I=new e),r(y,v,w,C,E,I)):!1}return i2=g,i2}var a2,h9;function lz(){if(h9)return a2;h9=1;var e=eze(),t=nd();function n(r,o,i,a,s){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,i,a,n,s)}return a2=n,a2}var s2,m9;function tze(){if(m9)return s2;m9=1;var e=$ie(),t=lz(),n=1,r=2;function o(i,a,s,l){var c=s.length,u=c,f=!l;if(i==null)return!u;for(i=Object(i);c--;){var p=s[c];if(f&&p[2]?p[1]!==i[p[0]]:!(p[0]in i))return!1}for(;++c<u;){p=s[c];var m=p[0],g=i[m],y=p[1];if(f&&p[2]){if(g===void 0&&!(m in i))return!1}else{var v=new e;if(l)var w=l(g,y,m,i,a,v);if(!(w===void 0?t(y,g,n|r,l,v):w))return!1}}return!0}return s2=o,s2}var l2,g9;function qie(){if(g9)return l2;g9=1;var e=zf();function t(n){return n===n&&!e(n)}return l2=t,l2}var c2,y9;function nze(){if(y9)return c2;y9=1;var e=qie(),t=GI();function n(r){for(var o=t(r),i=o.length;i--;){var a=o[i],s=r[a];o[i]=[a,s,e(s)]}return o}return c2=n,c2}var u2,v9;function Wie(){if(v9)return u2;v9=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return u2=e,u2}var d2,b9;function rze(){if(b9)return d2;b9=1;var e=tze(),t=nze(),n=Wie();function r(o){var i=t(o);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(a){return a===o||e(a,o,i)}}return d2=r,d2}var f2,x9;function oze(){if(x9)return f2;x9=1;function e(t,n){return t!=null&&n in Object(t)}return f2=e,f2}var p2,S9;function ize(){if(S9)return p2;S9=1;var e=die(),t=iz(),n=Aa(),r=az(),o=sz(),i=jI();function a(s,l,c){l=e(l,s);for(var u=-1,f=l.length,p=!1;++u<f;){var m=i(l[u]);if(!(p=s!=null&&c(s,m)))break;s=s[m]}return p||++u!=f?p:(f=s==null?0:s.length,!!f&&o(f)&&r(m,f)&&(n(s)||t(s)))}return p2=a,p2}var h2,w9;function aze(){if(w9)return h2;w9=1;var e=oze(),t=ize();function n(r,o){return r!=null&&t(r,o,e)}return h2=n,h2}var m2,C9;function sze(){if(C9)return m2;C9=1;var e=lz(),t=fie(),n=aze(),r=GB(),o=qie(),i=Wie(),a=jI(),s=1,l=2;function c(u,f){return r(u)&&o(f)?i(a(u),f):function(p){var m=t(p,u);return m===void 0&&m===f?n(p,u):e(f,m,s|l)}}return m2=c,m2}var g2,E9;function Cv(){if(E9)return g2;E9=1;function e(t){return t}return g2=e,g2}var y2,T9;function lze(){if(T9)return y2;T9=1;function e(t){return function(n){return n==null?void 0:n[t]}}return y2=e,y2}var v2,O9;function cze(){if(O9)return v2;O9=1;var e=XB();function t(n){return function(r){return e(r,n)}}return v2=t,v2}var b2,I9;function uze(){if(I9)return b2;I9=1;var e=lze(),t=cze(),n=GB(),r=jI();function o(i){return n(i)?e(r(i)):t(i)}return b2=o,b2}var x2,P9;function Gc(){if(P9)return x2;P9=1;var e=rze(),t=sze(),n=Cv(),r=Aa(),o=uze();function i(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):o(a)}return x2=i,x2}var S2,A9;function Kie(){if(A9)return S2;A9=1;function e(t,n,r,o){for(var i=t.length,a=r+(o?1:-1);o?a--:++a<i;)if(n(t[a],a,t))return a;return-1}return S2=e,S2}var w2,M9;function dze(){if(M9)return w2;M9=1;function e(t){return t!==t}return w2=e,w2}var C2,R9;function fze(){if(R9)return C2;R9=1;function e(t,n,r){for(var o=r-1,i=t.length;++o<i;)if(t[o]===n)return o;return-1}return C2=e,C2}var E2,D9;function pze(){if(D9)return E2;D9=1;var e=Kie(),t=dze(),n=fze();function r(o,i,a){return i===i?n(o,i,a):e(o,t,a)}return E2=r,E2}var T2,k9;function hze(){if(k9)return T2;k9=1;var e=pze();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return T2=t,T2}var O2,_9;function mze(){if(_9)return O2;_9=1;function e(t,n,r){for(var o=-1,i=t==null?0:t.length;++o<i;)if(r(n,t[o]))return!0;return!1}return O2=e,O2}var I2,$9;function gze(){if($9)return I2;$9=1;function e(){}return I2=e,I2}var P2,N9;function yze(){if(N9)return P2;N9=1;var e=Gie(),t=gze(),n=oz(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return P2=o,P2}var A2,L9;function vze(){if(L9)return A2;L9=1;var e=Nie(),t=hze(),n=mze(),r=Fie(),o=yze(),i=oz(),a=200;function s(l,c,u){var f=-1,p=t,m=l.length,g=!0,y=[],v=y;if(u)g=!1,p=n;else if(m>=a){var w=c?null:o(l);if(w)return i(w);g=!1,p=r,v=new e}else v=c?[]:y;e:for(;++f<m;){var C=l[f],E=c?c(C):C;if(C=u||C!==0?C:0,g&&E===E){for(var I=v.length;I--;)if(v[I]===E)continue e;c&&v.push(E),y.push(C)}else p(v,E,u)||(v!==y&&v.push(E),y.push(C))}return y}return A2=s,A2}var M2,F9;function bze(){if(F9)return M2;F9=1;var e=Gc(),t=vze();function n(r,o){return r&&r.length?t(r,e(o,2)):[]}return M2=n,M2}var xze=bze();const j9=Gn(xze);function Yie(e,t,n){return t===!0?j9(e,n):rn(t)?j9(e,t):e}function my(e){"@babel/helpers - typeof";return my=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my(e)}var Sze=["ref"];function B9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B9(Object(n),!0).forEach(function(r){qI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B9(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xie(r.key),r)}}function Cze(e,t,n){return t&&z9(e.prototype,t),n&&z9(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eze(e,t,n){return t=xT(t),Tze(e,Qie()?Reflect.construct(t,n||[],xT(e).constructor):t.apply(e,n))}function Tze(e,t){if(t&&(my(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oze(e)}function Oze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qie=function(){return!!e})()}function xT(e){return xT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xT(e)}function Ize(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OL(e,t)}function OL(e,t){return OL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},OL(e,t)}function qI(e,t,n){return t=Xie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xie(e){var t=Pze(e,"string");return my(t)=="symbol"?t:t+""}function Pze(e,t){if(my(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(my(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Aze(e,t){if(e==null)return{};var n=Mze(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rze(e){return e.value}function Dze(e,t){if(J.isValidElement(e))return J.cloneElement(e,t);if(typeof e=="function")return J.createElement(e,t);t.ref;var n=Aze(t,Sze);return J.createElement(rz,n)}var V9=1,Ic=function(e){function t(){var n;wze(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=Eze(this,t,[].concat(o)),qI(n,"lastBoundingBox",{width:-1,height:-1}),n}return Ize(t,e),Cze(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,o=this.getBBox();o?(Math.abs(o.width-this.lastBoundingBox.width)>V9||Math.abs(o.height-this.lastBoundingBox.height)>V9)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?vu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,f,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();f={left:((c||0)-m.width)/2}}else f=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();p={top:((u||0)-g.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return vu(vu({},f),p)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,f=vu(vu({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return J.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){r.wrapperNode=m}},Dze(i,vu(vu({},this.props),{},{payload:Yie(u,c,Rze)})))}}],[{key:"getWithHeight",value:function(r,o){var i=vu(vu({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&mt(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(x.PureComponent);qI(Ic,"displayName","Legend");qI(Ic,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var R2,H9;function kze(){if(H9)return R2;H9=1;var e=bw(),t=iz(),n=Aa(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return R2=o,R2}var D2,U9;function Jie(){if(U9)return D2;U9=1;var e=Bie(),t=kze();function n(r,o,i,a,s){var l=-1,c=r.length;for(i||(i=t),s||(s=[]);++l<c;){var u=r[l];o>0&&i(u)?o>1?n(u,o-1,i,a,s):e(s,u):a||(s[s.length]=u)}return s}return D2=n,D2}var k2,G9;function _ze(){if(G9)return k2;G9=1;function e(t){return function(n,r,o){for(var i=-1,a=Object(n),s=o(n),l=s.length;l--;){var c=s[t?l:++i];if(r(a[c],c,a)===!1)break}return n}}return k2=e,k2}var _2,q9;function $ze(){if(q9)return _2;q9=1;var e=_ze(),t=e();return _2=t,_2}var $2,W9;function Zie(){if(W9)return $2;W9=1;var e=$ze(),t=GI();function n(r,o){return r&&e(r,o,t)}return $2=n,$2}var N2,K9;function Nze(){if(K9)return N2;K9=1;var e=xw();function t(n,r){return function(o,i){if(o==null)return o;if(!e(o))return n(o,i);for(var a=o.length,s=r?a:-1,l=Object(o);(r?s--:++s<a)&&i(l[s],s,l)!==!1;);return o}}return N2=t,N2}var L2,Y9;function cz(){if(Y9)return L2;Y9=1;var e=Zie(),t=Nze(),n=t(e);return L2=n,L2}var F2,Q9;function eae(){if(Q9)return F2;Q9=1;var e=cz(),t=xw();function n(r,o){var i=-1,a=t(r)?Array(r.length):[];return e(r,function(s,l,c){a[++i]=o(s,l,c)}),a}return F2=n,F2}var j2,X9;function Lze(){if(X9)return j2;X9=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return j2=e,j2}var B2,J9;function Fze(){if(J9)return B2;J9=1;var e=xv();function t(n,r){if(n!==r){var o=n!==void 0,i=n===null,a=n===n,s=e(n),l=r!==void 0,c=r===null,u=r===r,f=e(r);if(!c&&!f&&!s&&n>r||s&&l&&u&&!c&&!f||i&&l&&u||!o&&u||!a)return 1;if(!i&&!s&&!f&&n<r||f&&o&&a&&!i&&!s||c&&o&&a||!l&&a||!u)return-1}return 0}return B2=t,B2}var z2,Z9;function jze(){if(Z9)return z2;Z9=1;var e=Fze();function t(n,r,o){for(var i=-1,a=n.criteria,s=r.criteria,l=a.length,c=o.length;++i<l;){var u=e(a[i],s[i]);if(u){if(i>=c)return u;var f=o[i];return u*(f=="desc"?-1:1)}}return n.index-r.index}return z2=t,z2}var V2,e7;function Bze(){if(e7)return V2;e7=1;var e=QB(),t=XB(),n=Gc(),r=eae(),o=Lze(),i=Vie(),a=jze(),s=Cv(),l=Aa();function c(u,f,p){f.length?f=e(f,function(y){return l(y)?function(v){return t(v,y.length===1?y[0]:y)}:y}):f=[s];var m=-1;f=e(f,i(n));var g=r(u,function(y,v,w){var C=e(f,function(E){return E(y)});return{criteria:C,index:++m,value:y}});return o(g,function(y,v){return a(y,v,p)})}return V2=c,V2}var H2,t7;function zze(){if(t7)return H2;t7=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return H2=e,H2}var U2,n7;function Vze(){if(n7)return U2;n7=1;var e=zze(),t=Math.max;function n(r,o,i){return o=t(o===void 0?r.length-1:o,0),function(){for(var a=arguments,s=-1,l=t(a.length-o,0),c=Array(l);++s<l;)c[s]=a[o+s];s=-1;for(var u=Array(o+1);++s<o;)u[s]=a[s];return u[o]=i(c),e(r,this,u)}}return U2=n,U2}var G2,r7;function Hze(){if(r7)return G2;r7=1;function e(t){return function(){return t}}return G2=e,G2}var q2,o7;function tae(){if(o7)return q2;o7=1;var e=Hh(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return q2=t,q2}var W2,i7;function Uze(){if(i7)return W2;i7=1;var e=Hze(),t=tae(),n=Cv(),r=t?function(o,i){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return W2=r,W2}var K2,a7;function Gze(){if(a7)return K2;a7=1;var e=800,t=16,n=Date.now;function r(o){var i=0,a=0;return function(){var s=n(),l=t-(s-a);if(a=s,l>0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return K2=r,K2}var Y2,s7;function qze(){if(s7)return Y2;s7=1;var e=Uze(),t=Gze(),n=t(e);return Y2=n,Y2}var Q2,l7;function Wze(){if(l7)return Q2;l7=1;var e=Cv(),t=Vze(),n=qze();function r(o,i){return n(t(o,i,e),o+"")}return Q2=r,Q2}var X2,c7;function WI(){if(c7)return X2;c7=1;var e=WB(),t=xw(),n=az(),r=zf();function o(i,a,s){if(!r(s))return!1;var l=typeof a;return(l=="number"?t(s)&&n(a,s.length):l=="string"&&a in s)?e(s[a],i):!1}return X2=o,X2}var J2,u7;function Kze(){if(u7)return J2;u7=1;var e=Jie(),t=Bze(),n=Wze(),r=WI(),o=n(function(i,a){if(i==null)return[];var s=a.length;return s>1&&r(i,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(i,e(a,1),[])});return J2=o,J2}var Yze=Kze();const uz=Gn(Yze);function jx(e){"@babel/helpers - typeof";return jx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jx(e)}function IL(){return IL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IL.apply(this,arguments)}function Qze(e,t){return eVe(e)||Zze(e,t)||Jze(e,t)||Xze()}function Xze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jze(e,t){if(e){if(typeof e=="string")return d7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d7(e,t)}}function d7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zze(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function eVe(e){if(Array.isArray(e))return e}function f7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Z2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f7(Object(n),!0).forEach(function(r){tVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tVe(e,t,n){return t=nVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nVe(e){var t=rVe(e,"string");return jx(t)=="symbol"?t:t+""}function rVe(e,t){if(jx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oVe(e){return Array.isArray(e)&&Ho(e[0])&&Ho(e[1])?e.join(" ~ "):e}var iVe=function(t){var n=t.separator,r=n===void 0?" : ":n,o=t.contentStyle,i=o===void 0?{}:o,a=t.itemStyle,s=a===void 0?{}:a,l=t.labelStyle,c=l===void 0?{}:l,u=t.payload,f=t.formatter,p=t.itemSorter,m=t.wrapperClassName,g=t.labelClassName,y=t.label,v=t.labelFormatter,w=t.accessibilityLayer,C=w===void 0?!1:w,E=function(){if(u&&u.length){var N={padding:0,margin:0},B=(p?uz(u,p):u).map(function(H,j){if(H.type==="none")return null;var L=Z2({display:"block",paddingTop:4,paddingBottom:4,color:H.color||"#000"},s),V=H.formatter||f||oVe,W=H.value,K=H.name,G=W,q=K;if(V&&G!=null&&q!=null){var Y=V(W,K,H,j,u);if(Array.isArray(Y)){var Z=Qze(Y,2);G=Z[0],q=Z[1]}else G=Y}return J.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(j),style:L},Ho(q)?J.createElement("span",{className:"recharts-tooltip-item-name"},q):null,Ho(q)?J.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,J.createElement("span",{className:"recharts-tooltip-item-value"},G),J.createElement("span",{className:"recharts-tooltip-item-unit"},H.unit||""))});return J.createElement("ul",{className:"recharts-tooltip-item-list",style:N},B)}return null},I=Z2({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),O=Z2({margin:0},c),P=!an(y),R=P?y:"",D=fe("recharts-default-tooltip",m),M=fe("recharts-tooltip-label",g);P&&v&&u!==void 0&&u!==null&&(R=v(y,u));var A=C?{role:"status","aria-live":"assertive"}:{};return J.createElement("div",IL({className:D,style:I},A),J.createElement("p",{className:M,style:O},J.isValidElement(R)?R:"".concat(R)),E())};function Bx(e){"@babel/helpers - typeof";return Bx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bx(e)}function $1(e,t,n){return t=aVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aVe(e){var t=sVe(e,"string");return Bx(t)=="symbol"?t:t+""}function sVe(e,t){if(Bx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r0="recharts-tooltip-wrapper",lVe={visibility:"hidden"};function cVe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return fe(r0,$1($1($1($1({},"".concat(r0,"-right"),mt(n)&&t&&mt(t.x)&&n>=t.x),"".concat(r0,"-left"),mt(n)&&t&&mt(t.x)&&n<t.x),"".concat(r0,"-bottom"),mt(r)&&t&&mt(t.y)&&r>=t.y),"".concat(r0,"-top"),mt(r)&&t&&mt(t.y)&&r<t.y))}function p7(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&mt(i[r]))return i[r];var u=n[r]-s-o,f=n[r]+o;if(t[r])return a[r]?u:f;if(a[r]){var p=u,m=l[r];return p<m?Math.max(f,l[r]):Math.max(u,l[r])}var g=f+s,y=l[r]+c;return g>y?Math.max(u,l[r]):Math.max(f,l[r])}function uVe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function dVe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,f;return a.height>0&&a.width>0&&n?(u=p7({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),f=p7({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=uVe({translateX:u,translateY:f,useTranslate3d:s})):c=lVe,{cssProperties:c,cssClasses:cVe({translateX:u,translateY:f,coordinate:n})}}function gy(e){"@babel/helpers - typeof";return gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gy(e)}function h7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function m7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h7(Object(n),!0).forEach(function(r){AL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pVe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rae(r.key),r)}}function hVe(e,t,n){return t&&pVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mVe(e,t,n){return t=ST(t),gVe(e,nae()?Reflect.construct(t,n||[],ST(e).constructor):t.apply(e,n))}function gVe(e,t){if(t&&(gy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yVe(e)}function yVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nae=function(){return!!e})()}function ST(e){return ST=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ST(e)}function vVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PL(e,t)}function PL(e,t){return PL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},PL(e,t)}function AL(e,t,n){return t=rae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rae(e){var t=bVe(e,"string");return gy(t)=="symbol"?t:t+""}function bVe(e,t){if(gy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var g7=1,xVe=function(e){function t(){var n;fVe(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=mVe(this,t,[].concat(o)),AL(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),AL(n,"handleKeyDown",function(a){if(a.key==="Escape"){var s,l,c,u;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(c=(u=n.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0}})}}),n}return vVe(t,e),hVe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>g7||Math.abs(r.height-this.state.lastBoundingBox.height)>g7)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,f=o.hasPayload,p=o.isAnimationActive,m=o.offset,g=o.position,y=o.reverseDirection,v=o.useTranslate3d,w=o.viewBox,C=o.wrapperStyle,E=dVe({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:m,position:g,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),I=E.cssClasses,O=E.cssProperties,P=m7(m7({transition:p&&i?"transform ".concat(s,"ms ").concat(l):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},C);return J.createElement("div",{tabIndex:-1,className:I,style:P,ref:function(D){r.wrapperNode=D}},c)}}])}(x.PureComponent),SVe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},rd={isSsr:SVe()};function yy(e){"@babel/helpers - typeof";return yy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yy(e)}function y7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function v7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y7(Object(n),!0).forEach(function(r){dz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CVe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iae(r.key),r)}}function EVe(e,t,n){return t&&CVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TVe(e,t,n){return t=wT(t),OVe(e,oae()?Reflect.construct(t,n||[],wT(e).constructor):t.apply(e,n))}function OVe(e,t){if(t&&(yy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IVe(e)}function IVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oae=function(){return!!e})()}function wT(e){return wT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wT(e)}function PVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ML(e,t)}function ML(e,t){return ML=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},ML(e,t)}function dz(e,t,n){return t=iae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iae(e){var t=AVe(e,"string");return yy(t)=="symbol"?t:t+""}function AVe(e,t){if(yy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MVe(e){return e.dataKey}function RVe(e,t){return J.isValidElement(e)?J.cloneElement(e,t):typeof e=="function"?J.createElement(e,t):J.createElement(iVe,t)}var ba=function(e){function t(){return wVe(this,t),TVe(this,t,arguments)}return PVe(t,e),EVe(t,[{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.content,u=o.coordinate,f=o.filterNull,p=o.isAnimationActive,m=o.offset,g=o.payload,y=o.payloadUniqBy,v=o.position,w=o.reverseDirection,C=o.useTranslate3d,E=o.viewBox,I=o.wrapperStyle,O=g??[];f&&O.length&&(O=Yie(g.filter(function(R){return R.value!=null&&(R.hide!==!0||r.props.includeHidden)}),y,MVe));var P=O.length>0;return J.createElement(xVe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:p,active:i,coordinate:u,hasPayload:P,offset:m,position:v,reverseDirection:w,useTranslate3d:C,viewBox:E,wrapperStyle:I},RVe(c,v7(v7({},this.props),{},{payload:O})))}}])}(x.PureComponent);dz(ba,"displayName","Tooltip");dz(ba,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!rd.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var e_,b7;function DVe(){if(b7)return e_;b7=1;var e=Uc(),t=function(){return e.Date.now()};return e_=t,e_}var t_,x7;function kVe(){if(x7)return t_;x7=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return t_=t,t_}var n_,S7;function _Ve(){if(S7)return n_;S7=1;var e=kVe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return n_=n,n_}var r_,w7;function aae(){if(w7)return r_;w7=1;var e=_Ve(),t=zf(),n=xv(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=t(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=e(c);var f=i.test(c);return f||a.test(c)?s(c.slice(2),f?2:8):o.test(c)?r:+c}return r_=l,r_}var o_,C7;function sae(){if(C7)return o_;C7=1;var e=zf(),t=DVe(),n=aae(),r="Expected a function",o=Math.max,i=Math.min;function a(s,l,c){var u,f,p,m,g,y,v=0,w=!1,C=!1,E=!0;if(typeof s!="function")throw new TypeError(r);l=n(l)||0,e(c)&&(w=!!c.leading,C="maxWait"in c,p=C?o(n(c.maxWait)||0,l):p,E="trailing"in c?!!c.trailing:E);function I(B){var H=u,j=f;return u=f=void 0,v=B,m=s.apply(j,H),m}function O(B){return v=B,g=setTimeout(D,l),w?I(B):m}function P(B){var H=B-y,j=B-v,L=l-H;return C?i(L,p-j):L}function R(B){var H=B-y,j=B-v;return y===void 0||H>=l||H<0||C&&j>=p}function D(){var B=t();if(R(B))return M(B);g=setTimeout(D,P(B))}function M(B){return g=void 0,E&&u?I(B):(u=f=void 0,m)}function A(){g!==void 0&&clearTimeout(g),v=0,u=y=f=g=void 0}function _(){return g===void 0?m:M(t())}function N(){var B=t(),H=R(B);if(u=arguments,f=this,y=B,H){if(g===void 0)return O(y);if(C)return clearTimeout(g),g=setTimeout(D,l),I(y)}return g===void 0&&(g=setTimeout(D,l)),m}return N.cancel=A,N.flush=_,N}return o_=a,o_}var i_,E7;function $Ve(){if(E7)return i_;E7=1;var e=sae(),t=zf(),n="Expected a function";function r(o,i,a){var s=!0,l=!0;if(typeof o!="function")throw new TypeError(n);return t(a)&&(s="leading"in a?!!a.leading:s,l="trailing"in a?!!a.trailing:l),e(o,i,{leading:s,maxWait:i,trailing:l})}return i_=r,i_}var NVe=$Ve();const lae=Gn(NVe);function zx(e){"@babel/helpers - typeof";return zx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zx(e)}function T7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function N1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T7(Object(n),!0).forEach(function(r){LVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LVe(e,t,n){return t=FVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FVe(e){var t=jVe(e,"string");return zx(t)=="symbol"?t:t+""}function jVe(e,t){if(zx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BVe(e,t){return UVe(e)||HVe(e,t)||VVe(e,t)||zVe()}function zVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VVe(e,t){if(e){if(typeof e=="string")return O7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O7(e,t)}}function O7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HVe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function UVe(e){if(Array.isArray(e))return e}var od=x.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,o=r===void 0?{width:-1,height:-1}:r,i=e.width,a=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,u=c===void 0?0:c,f=e.minHeight,p=e.maxHeight,m=e.children,g=e.debounce,y=g===void 0?0:g,v=e.id,w=e.className,C=e.onResize,E=e.style,I=E===void 0?{}:E,O=x.useRef(null),P=x.useRef();P.current=C,x.useImperativeHandle(t,function(){return Object.defineProperty(O.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),O.current},configurable:!0})});var R=x.useState({containerWidth:o.width,containerHeight:o.height}),D=BVe(R,2),M=D[0],A=D[1],_=x.useCallback(function(B,H){A(function(j){var L=Math.round(B),V=Math.round(H);return j.containerWidth===L&&j.containerHeight===V?j:{containerWidth:L,containerHeight:V}})},[]);x.useEffect(function(){var B=function(K){var G,q=K[0].contentRect,Y=q.width,Z=q.height;_(Y,Z),(G=P.current)===null||G===void 0||G.call(P,Y,Z)};y>0&&(B=lae(B,y,{trailing:!0,leading:!1}));var H=new ResizeObserver(B),j=O.current.getBoundingClientRect(),L=j.width,V=j.height;return _(L,V),H.observe(O.current),function(){H.disconnect()}},[_,y]);var N=x.useMemo(function(){var B=M.containerWidth,H=M.containerHeight;if(B<0||H<0)return null;zl(Vp(a)||Vp(l),`The width(%s) and height(%s) are both fixed numbers,
+ maybe you don't need to use a ResponsiveContainer.`,a,l),zl(!n||n>0,"The aspect(%s) must be greater than zero.",n);var j=Vp(a)?B:a,L=Vp(l)?H:l;n&&n>0&&(j?L=j/n:L&&(j=L*n),p&&L>p&&(L=p)),zl(j>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
- height and width.`,j,L,a,l,u,f,n);var V=!Array.isArray(m)&&ku(m.type).endsWith("Chart");return J.Children.map(m,function(W){return J.isValidElement(W)?x.cloneElement(W,$1({width:j,height:L},V?{style:$1({height:"100%",width:"100%",maxHeight:L,maxWidth:j},W.props.style)}:{})):W})},[n,m,l,h,f,u,M,a]);return J.createElement("div",{id:v?"".concat(v):void 0,className:fe("recharts-responsive-container",w),style:$1($1({},I),{},{width:a,height:l,minWidth:u,minHeight:f,maxHeight:h}),ref:O},N)}),Ev=function(t){return null};Ev.displayName="Cell";function Vx(e){"@babel/helpers - typeof";return Vx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vx(e)}function O7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ML(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O7(Object(n),!0).forEach(function(r){UVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UVe(e,t,n){return t=GVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GVe(e){var t=qVe(e,"string");return Vx(t)=="symbol"?t:t+""}function qVe(e,t){if(Vx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qm={widthCache:{},cacheCount:0},WVe=2e3,KVe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},I7="recharts_measurement_span";function YVe(e){var t=ML({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var tx=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||td.isSsr)return{width:0,height:0};var r=YVe(n),o=JSON.stringify({text:t,copyStyle:r});if(Qm.widthCache[o])return Qm.widthCache[o];try{var i=document.getElementById(I7);i||(i=document.createElement("span"),i.setAttribute("id",I7),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=ML(ML({},KVe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return Qm.widthCache[o]=l,++Qm.cacheCount>WVe&&(Qm.cacheCount=0,Qm.widthCache={}),l}catch{return{width:0,height:0}}},QVe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Hx(e){"@babel/helpers - typeof";return Hx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hx(e)}function wT(e,t){return eHe(e)||ZVe(e,t)||JVe(e,t)||XVe()}function XVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JVe(e,t){if(e){if(typeof e=="string")return P7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P7(e,t)}}function P7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZVe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function eHe(e){if(Array.isArray(e))return e}function tHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rHe(r.key),r)}}function nHe(e,t,n){return t&&A7(e.prototype,t),n&&A7(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rHe(e){var t=oHe(e,"string");return Hx(t)=="symbol"?t:t+""}function oHe(e,t){if(Hx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var M7=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,R7=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iHe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,aHe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,lae={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},sHe=Object.keys(lae),gg="NaN";function lHe(e,t){return e*lae[t]}var N1=function(){function e(t,n){tHe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!iHe.test(n)&&(this.num=NaN,this.unit=""),sHe.includes(n)&&(this.num=lHe(t,n),this.unit="px")}return nHe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,o=(r=aHe.exec(n))!==null&&r!==void 0?r:[],i=wT(o,3),a=i[1],s=i[2];return new e(parseFloat(a),s??"")}}])}();function cae(e){if(e.includes(gg))return gg;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=M7.exec(t))!==null&&n!==void 0?n:[],o=wT(r,4),i=o[1],a=o[2],s=o[3],l=N1.parse(i??""),c=N1.parse(s??""),u=a==="*"?l.multiply(c):l.divide(c);if(u.isNaN())return gg;t=t.replace(M7,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=R7.exec(t))!==null&&f!==void 0?f:[],m=wT(h,4),g=m[1],y=m[2],v=m[3],w=N1.parse(g??""),C=N1.parse(v??""),E=y==="+"?w.add(C):w.subtract(C);if(E.isNaN())return gg;t=t.replace(R7,E.toString())}return t}var D7=/\(([^()]*)\)/;function cHe(e){for(var t=e;t.includes("(");){var n=D7.exec(t),r=wT(n,2),o=r[1];t=t.replace(D7,cae(o))}return t}function uHe(e){var t=e.replace(/\s+/g,"");return t=cHe(t),t=cae(t),t}function dHe(e){try{return uHe(e)}catch{return gg}}function i_(e){var t=dHe(e.slice(5,-1));return t===gg?"":t}var fHe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],pHe=["dx","dy","angle","className","breakAll"];function RL(){return RL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RL.apply(this,arguments)}function k7(e,t){if(e==null)return{};var n=hHe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _7(e,t){return vHe(e)||yHe(e,t)||gHe(e,t)||mHe()}function mHe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gHe(e,t){if(e){if(typeof e=="string")return $7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $7(e,t)}}function $7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yHe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function vHe(e){if(Array.isArray(e))return e}var uae=/[ \f\n\r\t\v\u2028\u2029]+/,dae=function(t){var n=t.children,r=t.breakAll,o=t.style;try{var i=[];on(n)||(r?i=n.toString().split(""):i=n.toString().split(uae));var a=i.map(function(l){return{word:l,width:tx(l,o).width}}),s=r?0:tx(" ",o).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}},bHe=function(t,n,r,o,i){var a=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=mt(a),f=s,h=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return j.reduce(function(L,V){var W=V.word,K=V.width,G=L[L.length-1];if(G&&(o==null||i||G.width+K+r<Number(o)))G.words.push(W),G.width+=K+r;else{var q={words:[W],width:K};L.push(q)}return L},[])},m=h(n),g=function(j){return j.reduce(function(L,V){return L.width>V.width?L:V})};if(!u)return m;for(var y="…",v=function(j){var L=f.slice(0,j),V=dae({breakAll:c,style:l,children:L+y}).wordsWithComputedWidth,W=h(V),K=W.length>a||g(W).width>Number(o);return[K,W]},w=0,C=f.length-1,E=0,I;w<=C&&E<=f.length-1;){var O=Math.floor((w+C)/2),P=O-1,R=v(P),D=_7(R,2),M=D[0],A=D[1],_=v(O),N=_7(_,1),B=N[0];if(!M&&!B&&(w=O+1),M&&B&&(C=O-1),!M&&B){I=A;break}E++}return I||m},N7=function(t){var n=on(t)?[]:t.toString().split(uae);return[{words:n}]},xHe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!td.isSsr){var l,c,u=dae({breakAll:a,children:o,style:i});if(u){var f=u.wordsWithComputedWidth,h=u.spaceWidth;l=f,c=h}else return N7(o);return bHe({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return N7(o)},L7="#808080",wh=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,f=u===void 0?!1:u,h=t.textAnchor,m=h===void 0?"start":h,g=t.verticalAnchor,y=g===void 0?"end":g,v=t.fill,w=v===void 0?L7:v,C=k7(t,fHe),E=x.useMemo(function(){return xHe({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:f,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,f,C.style,C.width]),I=C.dx,O=C.dy,P=C.angle,R=C.className,D=C.breakAll,M=k7(C,pHe);if(!Vo(r)||!Vo(i))return null;var A=r+(mt(I)?I:0),_=i+(mt(O)?O:0),N;switch(y){case"start":N=i_("calc(".concat(c,")"));break;case"middle":N=i_("calc(".concat((E.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=i_("calc(".concat(E.length-1," * -").concat(s,")"));break}var B=[];if(f){var H=E[0].width,j=C.width;B.push("scale(".concat((mt(j)?j/H:1)/H,")"))}return P&&B.push("rotate(".concat(P,", ").concat(A,", ").concat(_,")")),B.length&&(M.transform=B.join(" ")),J.createElement("text",RL({},zt(M,!0),{x:A,y:_,className:fe("recharts-text",R),textAnchor:m,fill:w.includes("url")?L7:w}),E.map(function(L,V){var W=L.words.join(D?"":" ");return J.createElement("tspan",{x:A,dy:V===0?N:s,key:"".concat(W,"-").concat(V)},W)}))};function yf(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function SHe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function dz(e){let t,n,r;e.length!==2?(t=yf,n=(s,l)=>yf(e(s),l),r=(s,l)=>e(s)-l):(t=e===yf||e===SHe?e:wHe,n=e,r=e);function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){const f=o(s,l,c,u-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function wHe(){return 0}function fae(e){return e===null?NaN:+e}function*CHe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const EHe=dz(yf),Sw=EHe.right;dz(fae).center;class F7 extends Map{constructor(t,n=IHe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(j7(this,t))}has(t){return super.has(j7(this,t))}set(t,n){return super.set(THe(this,t),n)}delete(t){return super.delete(OHe(this,t))}}function j7({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function THe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function OHe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function IHe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function PHe(e=yf){if(e===yf)return pae;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function pae(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const AHe=Math.sqrt(50),MHe=Math.sqrt(10),RHe=Math.sqrt(2);function CT(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=AHe?10:i>=MHe?5:i>=RHe?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?CT(e,t,n*2):[s,l,c]}function DL(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,i,a]=r?CT(t,e,n):CT(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(i-c)/-a;else for(let c=0;c<s;++c)l[c]=(i-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(o+c)/-a;else for(let c=0;c<s;++c)l[c]=(o+c)*a;return l}function kL(e,t,n){return t=+t,e=+e,n=+n,CT(e,t,n)[2]}function _L(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?kL(t,e,n):kL(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function B7(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function z7(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function hae(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?pae:PHe(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(t-c*f/l+h)),g=Math.min(r,Math.floor(t+(l-c)*f/l+h));hae(e,t,m,g,o)}const i=e[t];let a=n,s=r;for(o0(e,n,t),o(e[r],i)>0&&o0(e,n,r);a<s;){for(o0(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[n],i)===0?o0(e,n,s):(++s,o0(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function o0(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function DHe(e,t,n){if(e=Float64Array.from(CHe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return z7(e);if(t>=1)return B7(e);var r,o=(r-1)*t,i=Math.floor(o),a=B7(hae(e,i).subarray(0,i+1)),s=z7(e.subarray(i+1));return a+(s-a)*(o-i)}}function kHe(e,t,n=fae){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function _He(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function cl(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function rd(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const $L=Symbol("implicit");function fz(){var e=new F7,t=[],n=[],r=$L;function o(i){let a=e.get(i);if(a===void 0){if(r!==$L)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new F7;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return fz(t,n).unknown(r)},cl.apply(o,arguments),o}function Ux(){var e=fz().unknown(void 0),t=e.domain,n=e.range,r=0,o=1,i,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function f(){var h=t().length,m=o<r,g=m?o:r,y=m?r:o;i=(y-g)/Math.max(1,h-l+c*2),s&&(i=Math.floor(i)),g+=(y-g-i*(h-l))*u,a=i*(1-l),s&&(g=Math.round(g),a=Math.round(a));var v=_He(h).map(function(w){return g+i*w});return n(m?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,o]=h,r=+r,o=+o,f()):[r,o]},e.rangeRound=function(h){return[r,o]=h,r=+r,o=+o,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,f()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),f()):u},e.copy=function(){return Ux(t(),[r,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},cl.apply(f(),arguments)}function mae(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return mae(t())},e}function nx(){return mae(Ux.apply(null,arguments).paddingInner(1))}function pz(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gae(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ww(){}var Gx=.7,ET=1/Gx,jg="\\s*([+-]?\\d+)\\s*",qx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ic="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$He=/^#([0-9a-f]{3,8})$/,NHe=new RegExp(`^rgb\\(${jg},${jg},${jg}\\)$`),LHe=new RegExp(`^rgb\\(${Ic},${Ic},${Ic}\\)$`),FHe=new RegExp(`^rgba\\(${jg},${jg},${jg},${qx}\\)$`),jHe=new RegExp(`^rgba\\(${Ic},${Ic},${Ic},${qx}\\)$`),BHe=new RegExp(`^hsl\\(${qx},${Ic},${Ic}\\)$`),zHe=new RegExp(`^hsla\\(${qx},${Ic},${Ic},${qx}\\)$`),V7={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};pz(ww,Wx,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:H7,formatHex:H7,formatHex8:VHe,formatHsl:HHe,formatRgb:U7,toString:U7});function H7(){return this.rgb().formatHex()}function VHe(){return this.rgb().formatHex8()}function HHe(){return yae(this).formatHsl()}function U7(){return this.rgb().formatRgb()}function Wx(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=$He.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?G7(t):n===3?new wa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?L1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?L1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=NHe.exec(e))?new wa(t[1],t[2],t[3],1):(t=LHe.exec(e))?new wa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=FHe.exec(e))?L1(t[1],t[2],t[3],t[4]):(t=jHe.exec(e))?L1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=BHe.exec(e))?K7(t[1],t[2]/100,t[3]/100,1):(t=zHe.exec(e))?K7(t[1],t[2]/100,t[3]/100,t[4]):V7.hasOwnProperty(e)?G7(V7[e]):e==="transparent"?new wa(NaN,NaN,NaN,0):null}function G7(e){return new wa(e>>16&255,e>>8&255,e&255,1)}function L1(e,t,n,r){return r<=0&&(e=t=n=NaN),new wa(e,t,n,r)}function UHe(e){return e instanceof ww||(e=Wx(e)),e?(e=e.rgb(),new wa(e.r,e.g,e.b,e.opacity)):new wa}function NL(e,t,n,r){return arguments.length===1?UHe(e):new wa(e,t,n,r??1)}function wa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}pz(wa,NL,gae(ww,{brighter(e){return e=e==null?ET:Math.pow(ET,e),new wa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gx:Math.pow(Gx,e),new wa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wa(oh(this.r),oh(this.g),oh(this.b),TT(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:q7,formatHex:q7,formatHex8:GHe,formatRgb:W7,toString:W7}));function q7(){return`#${zp(this.r)}${zp(this.g)}${zp(this.b)}`}function GHe(){return`#${zp(this.r)}${zp(this.g)}${zp(this.b)}${zp((isNaN(this.opacity)?1:this.opacity)*255)}`}function W7(){const e=TT(this.opacity);return`${e===1?"rgb(":"rgba("}${oh(this.r)}, ${oh(this.g)}, ${oh(this.b)}${e===1?")":`, ${e})`}`}function TT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zp(e){return e=oh(e),(e<16?"0":"")+e.toString(16)}function K7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dl(e,t,n,r)}function yae(e){if(e instanceof Dl)return new Dl(e.h,e.s,e.l,e.opacity);if(e instanceof ww||(e=Wx(e)),!e)return new Dl;if(e instanceof Dl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n<r)*6:n===i?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Dl(a,s,l,e.opacity)}function qHe(e,t,n,r){return arguments.length===1?yae(e):new Dl(e,t,n,r??1)}function Dl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}pz(Dl,qHe,gae(ww,{brighter(e){return e=e==null?ET:Math.pow(ET,e),new Dl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gx:Math.pow(Gx,e),new Dl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new wa(a_(e>=240?e-240:e+120,o,r),a_(e,o,r),a_(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Dl(Y7(this.h),F1(this.s),F1(this.l),TT(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=TT(this.opacity);return`${e===1?"hsl(":"hsla("}${Y7(this.h)}, ${F1(this.s)*100}%, ${F1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Y7(e){return e=(e||0)%360,e<0?e+360:e}function F1(e){return Math.max(0,Math.min(1,e||0))}function a_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const hz=e=>()=>e;function WHe(e,t){return function(n){return e+n*t}}function KHe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function YHe(e){return(e=+e)==1?vae:function(t,n){return n-t?KHe(t,n,e):hz(isNaN(t)?n:t)}}function vae(e,t){var n=t-e;return n?WHe(e,n):hz(isNaN(e)?t:e)}const Q7=function e(t){var n=YHe(t);function r(o,i){var a=n((o=NL(o)).r,(i=NL(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=vae(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function QHe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function XHe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function JHe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=Tv(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<r;++a)i[a]=o[a](s);return i}}function ZHe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function OT(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function e5e(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Tv(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var LL=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,s_=new RegExp(LL.source,"g");function t5e(e){return function(){return e}}function n5e(e){return function(t){return e(t)+""}}function r5e(e,t){var n=LL.lastIndex=s_.lastIndex=0,r,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=LL.exec(e))&&(o=s_.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:OT(r,o)})),n=s_.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?n5e(l[0].x):t5e(t):(t=l.length,function(c){for(var u=0,f;u<t;++u)s[(f=l[u]).i]=f.x(c);return s.join("")})}function Tv(e,t){var n=typeof t,r;return t==null||n==="boolean"?hz(t):(n==="number"?OT:n==="string"?(r=Wx(t))?(t=r,Q7):r5e:t instanceof Wx?Q7:t instanceof Date?ZHe:XHe(t)?QHe:Array.isArray(t)?JHe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?e5e:OT)(e,t)}function mz(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function o5e(e,t){t===void 0&&(t=e,e=Tv);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[s](a-s)}}function i5e(e){return function(){return e}}function IT(e){return+e}var X7=[0,1];function ra(e){return e}function FL(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:i5e(isNaN(t)?NaN:.5)}function a5e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function s5e(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=FL(o,r),i=n(a,i)):(r=FL(r,o),i=n(i,a)),function(s){return i(r(s))}}function l5e(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=FL(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(s){var l=Sw(e,s,1,r)-1;return i[l](o[l](s))}}function Cw(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function WI(){var e=X7,t=X7,n=Tv,r,o,i,a=ra,s,l,c;function u(){var h=Math.min(e.length,t.length);return a!==ra&&(a=a5e(e[0],e[h-1])),s=h>2?l5e:s5e,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?i:(l||(l=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(o((c||(c=s(t,e.map(r),OT)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,IT),u()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=mz,u()},f.clamp=function(h){return arguments.length?(a=h?!0:ra,u()):a!==ra},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,m){return r=h,o=m,u()}}function gz(){return WI()(ra,ra)}function c5e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function PT(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function yy(e){return e=PT(Math.abs(e)),e?e[1]:NaN}function u5e(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function d5e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var f5e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kx(e){if(!(t=f5e.exec(e)))throw new Error("invalid format: "+e);var t;return new yz({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kx.prototype=yz.prototype;function yz(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}yz.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function p5e(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var bae;function h5e(e,t){var n=PT(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(bae=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+PT(e,Math.max(0,t+i-1))[0]}function J7(e,t){var n=PT(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Z7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:c5e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>J7(e*100,t),r:J7,s:h5e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function eK(e){return e}var tK=Array.prototype.map,nK=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function m5e(e){var t=e.grouping===void 0||e.thousands===void 0?eK:u5e(tK.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?eK:d5e(tK.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Kx(f);var h=f.fill,m=f.align,g=f.sign,y=f.symbol,v=f.zero,w=f.width,C=f.comma,E=f.precision,I=f.trim,O=f.type;O==="n"?(C=!0,O="g"):Z7[O]||(E===void 0&&(E=12),I=!0,O="g"),(v||h==="0"&&m==="=")&&(v=!0,h="0",m="=");var P=y==="$"?n:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",R=y==="$"?r:/[%p]/.test(O)?a:"",D=Z7[O],M=/[defgprs%]/.test(O);E=E===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function A(_){var N=P,B=R,H,j,L;if(O==="c")B=D(_)+B,_="";else{_=+_;var V=_<0||1/_<0;if(_=isNaN(_)?l:D(Math.abs(_),E),I&&(_=p5e(_)),V&&+_==0&&g!=="+"&&(V=!1),N=(V?g==="("?g:s:g==="-"||g==="("?"":g)+N,B=(O==="s"?nK[8+bae/3]:"")+B+(V&&g==="("?")":""),M){for(H=-1,j=_.length;++H<j;)if(L=_.charCodeAt(H),48>L||L>57){B=(L===46?o+_.slice(H+1):_.slice(H))+B,_=_.slice(0,H);break}}}C&&!v&&(_=t(_,1/0));var W=N.length+_.length+B.length,K=W<w?new Array(w-W+1).join(h):"";switch(C&&v&&(_=t(K+_,K.length?w-B.length:1/0),K=""),m){case"<":_=N+_+B+K;break;case"=":_=N+K+_+B;break;case"^":_=K.slice(0,W=K.length>>1)+N+_+B+K.slice(W);break;default:_=K+N+_+B;break}return i(_)}return A.toString=function(){return f+""},A}function u(f,h){var m=c((f=Kx(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(yy(h)/3)))*3,y=Math.pow(10,-g),v=nK[8+g/3];return function(w){return m(y*w)+v}}return{format:c,formatPrefix:u}}var j1,vz,xae;g5e({thousands:",",grouping:[3],currency:["$",""]});function g5e(e){return j1=m5e(e),vz=j1.format,xae=j1.formatPrefix,j1}function y5e(e){return Math.max(0,-yy(Math.abs(e)))}function v5e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yy(t)/3)))*3-yy(Math.abs(e)))}function b5e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yy(t)-yy(e))+1}function Sae(e,t,n,r){var o=_L(e,t,n),i;switch(r=Kx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=v5e(o,a))&&(r.precision=i),xae(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=b5e(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=y5e(o))&&(r.precision=i-(r.type==="%")*2);break}}return vz(r)}function zf(e){var t=e.domain;return e.ticks=function(n){var r=t();return DL(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return Sae(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=o,o=i,i=c);u-- >0;){if(c=kL(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function AT(){var e=gz();return e.copy=function(){return Cw(e,AT())},cl.apply(e,arguments),zf(e)}function wae(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,IT),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return wae(e).unknown(t)},e=arguments.length?Array.from(e,IT):[0,1],zf(n)}function Cae(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),e[n]=t.floor(o),e[r]=t.ceil(i),e}function rK(e){return Math.log(e)}function oK(e){return Math.exp(e)}function x5e(e){return-Math.log(-e)}function S5e(e){return-Math.exp(-e)}function w5e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function C5e(e){return e===10?w5e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function E5e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function iK(e){return(t,n)=>-e(-t,n)}function bz(e){const t=e(rK,oK),n=t.domain;let r=10,o,i;function a(){return o=E5e(r),i=C5e(r),n()[0]<0?(o=iK(o),i=iK(i),e(x5e,S5e)):e(rK,oK),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let h=o(c),m=o(u),g,y;const v=s==null?10:+s;let w=[];if(!(r%1)&&m-h<v){if(h=Math.floor(h),m=Math.ceil(m),c>0){for(;h<=m;++h)for(g=1;g<r;++g)if(y=h<0?g/i(-h):g*i(h),!(y<c)){if(y>u)break;w.push(y)}}else for(;h<=m;++h)for(g=r-1;g>=1;--g)if(y=h>0?g/i(-h):g*i(h),!(y<c)){if(y>u)break;w.push(y)}w.length*2<v&&(w=DL(c,u,v))}else w=DL(h,m,Math.min(m-h,v)).map(i);return f?w.reverse():w},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kx(l)).precision==null&&(l.trim=!0),l=vz(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*r<r-.5&&(f*=r),f<=c?l(u):""}},t.nice=()=>n(Cae(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function Eae(){const e=bz(WI()).domain([1,10]);return e.copy=()=>Cw(e,Eae()).base(e.base()),cl.apply(e,arguments),e}function aK(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function sK(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function xz(e){var t=1,n=e(aK(t),sK(t));return n.constant=function(r){return arguments.length?e(aK(t=+r),sK(t)):t},zf(n)}function Tae(){var e=xz(WI());return e.copy=function(){return Cw(e,Tae()).constant(e.constant())},cl.apply(e,arguments)}function lK(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function T5e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function O5e(e){return e<0?-e*e:e*e}function Sz(e){var t=e(ra,ra),n=1;function r(){return n===1?e(ra,ra):n===.5?e(T5e,O5e):e(lK(n),lK(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},zf(t)}function wz(){var e=Sz(WI());return e.copy=function(){return Cw(e,wz()).exponent(e.exponent())},cl.apply(e,arguments),e}function I5e(){return wz.apply(null,arguments).exponent(.5)}function cK(e){return Math.sign(e)*e*e}function P5e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Oae(){var e=gz(),t=[0,1],n=!1,r;function o(i){var a=P5e(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(cK(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,IT)).map(cK)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return Oae(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},cl.apply(o,arguments),zf(o)}function Iae(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=kHe(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?r:t[Sw(n,a)]}return i.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},i.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(yf),o()},i.range=function(a){return arguments.length?(t=Array.from(a),o()):t.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Iae().domain(e).range(t).unknown(r)},cl.apply(i,arguments)}function Pae(){var e=0,t=1,n=1,r=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[Sw(r,l,0,n)]:i}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(o=Array.from(l)).length-1,s()):o.slice()},a.invertExtent=function(l){var c=o.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Pae().domain([e,t]).range(o).unknown(i)},cl.apply(zf(a),arguments)}function Aae(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[Sw(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Aae().domain(e).range(t).unknown(n)},cl.apply(o,arguments)}const l_=new Date,c_=new Date;function Yo(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<a);return l},o.filter=i=>Yo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(l_.setTime(+i),c_.setTime(+a),e(l_),e(c_),Math.floor(n(l_,c_))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const MT=Yo(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);MT.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yo(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):MT);MT.range;const Au=1e3,Hs=Au*60,Mu=Hs*60,Wu=Mu*24,Cz=Wu*7,uK=Wu*30,u_=Wu*365,Vp=Yo(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Au)},(e,t)=>(t-e)/Au,e=>e.getUTCSeconds());Vp.range;const Ez=Yo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Au)},(e,t)=>{e.setTime(+e+t*Hs)},(e,t)=>(t-e)/Hs,e=>e.getMinutes());Ez.range;const Tz=Yo(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Hs)},(e,t)=>(t-e)/Hs,e=>e.getUTCMinutes());Tz.range;const Oz=Yo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Au-e.getMinutes()*Hs)},(e,t)=>{e.setTime(+e+t*Mu)},(e,t)=>(t-e)/Mu,e=>e.getHours());Oz.range;const Iz=Yo(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Mu)},(e,t)=>(t-e)/Mu,e=>e.getUTCHours());Iz.range;const Ew=Yo(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hs)/Wu,e=>e.getDate()-1);Ew.range;const KI=Yo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wu,e=>e.getUTCDate()-1);KI.range;const Mae=Yo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wu,e=>Math.floor(e/Wu));Mae.range;function Hh(e){return Yo(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Hs)/Cz)}const YI=Hh(0),RT=Hh(1),A5e=Hh(2),M5e=Hh(3),vy=Hh(4),R5e=Hh(5),D5e=Hh(6);YI.range;RT.range;A5e.range;M5e.range;vy.range;R5e.range;D5e.range;function Uh(e){return Yo(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Cz)}const QI=Uh(0),DT=Uh(1),k5e=Uh(2),_5e=Uh(3),by=Uh(4),$5e=Uh(5),N5e=Uh(6);QI.range;DT.range;k5e.range;_5e.range;by.range;$5e.range;N5e.range;const Pz=Yo(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Pz.range;const Az=Yo(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Az.range;const Ku=Yo(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ku.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yo(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ku.range;const Yu=Yo(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Yu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yo(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Yu.range;function Rae(e,t,n,r,o,i){const a=[[Vp,1,Au],[Vp,5,5*Au],[Vp,15,15*Au],[Vp,30,30*Au],[i,1,Hs],[i,5,5*Hs],[i,15,15*Hs],[i,30,30*Hs],[o,1,Mu],[o,3,3*Mu],[o,6,6*Mu],[o,12,12*Mu],[r,1,Wu],[r,2,2*Wu],[n,1,Cz],[t,1,uK],[t,3,3*uK],[e,1,u_]];function s(c,u,f){const h=u<c;h&&([c,u]=[u,c]);const m=f&&typeof f.range=="function"?f:l(c,u,f),g=m?m.range(c,+u+1):[];return h?g.reverse():g}function l(c,u,f){const h=Math.abs(u-c)/f,m=dz(([,,v])=>v).right(a,h);if(m===a.length)return e.every(_L(c/u_,u/u_,f));if(m===0)return MT.every(Math.max(_L(c,u,f),1));const[g,y]=a[h/a[m-1][2]<a[m][2]/h?m-1:m];return g.every(y)}return[s,l]}const[L5e,F5e]=Rae(Yu,Az,QI,Mae,Iz,Tz),[j5e,B5e]=Rae(Ku,Pz,YI,Ew,Oz,Ez);function d_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function f_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i0(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function z5e(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=a0(o),u=s0(o),f=a0(i),h=s0(i),m=a0(a),g=s0(a),y=a0(s),v=s0(s),w=a0(l),C=s0(l),E={a:V,A:W,b:K,B:G,c:null,d:gK,e:gK,f:uUe,g:xUe,G:wUe,H:sUe,I:lUe,j:cUe,L:Dae,m:dUe,M:fUe,p:q,q:Y,Q:bK,s:xK,S:pUe,u:hUe,U:mUe,V:gUe,w:yUe,W:vUe,x:null,X:null,y:bUe,Y:SUe,Z:CUe,"%":vK},I={a:Z,A:ie,b:se,B:ce,c:null,d:yK,e:yK,f:IUe,g:LUe,G:jUe,H:EUe,I:TUe,j:OUe,L:_ae,m:PUe,M:AUe,p:ye,q:Se,Q:bK,s:xK,S:MUe,u:RUe,U:DUe,V:kUe,w:_Ue,W:$Ue,x:null,X:null,y:NUe,Y:FUe,Z:BUe,"%":vK},O={a:A,A:_,b:N,B,c:H,d:hK,e:hK,f:rUe,g:pK,G:fK,H:mK,I:mK,j:Z5e,L:nUe,m:J5e,M:eUe,p:M,q:X5e,Q:iUe,s:aUe,S:tUe,u:q5e,U:W5e,V:K5e,w:G5e,W:Y5e,x:j,X:L,y:pK,Y:fK,Z:Q5e,"%":oUe};E.x=P(n,E),E.X=P(r,E),E.c=P(t,E),I.x=P(n,I),I.X=P(r,I),I.c=P(t,I);function P(ne,le){return function(de){var oe=[],ue=-1,pe=0,Ee=ne.length,xe,Re,he;for(de instanceof Date||(de=new Date(+de));++ue<Ee;)ne.charCodeAt(ue)===37&&(oe.push(ne.slice(pe,ue)),(Re=dK[xe=ne.charAt(++ue)])!=null?xe=ne.charAt(++ue):Re=xe==="e"?" ":"0",(he=le[xe])&&(xe=he(de,Re)),oe.push(xe),pe=ue+1);return oe.push(ne.slice(pe,ue)),oe.join("")}}function R(ne,le){return function(de){var oe=i0(1900,void 0,1),ue=D(oe,ne,de+="",0),pe,Ee;if(ue!=de.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(oe.s*1e3+("L"in oe?oe.L:0));if(le&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+oe.p*12),oe.m===void 0&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?(pe=f_(i0(oe.y,0,1)),Ee=pe.getUTCDay(),pe=Ee>4||Ee===0?DT.ceil(pe):DT(pe),pe=KI.offset(pe,(oe.V-1)*7),oe.y=pe.getUTCFullYear(),oe.m=pe.getUTCMonth(),oe.d=pe.getUTCDate()+(oe.w+6)%7):(pe=d_(i0(oe.y,0,1)),Ee=pe.getDay(),pe=Ee>4||Ee===0?RT.ceil(pe):RT(pe),pe=Ew.offset(pe,(oe.V-1)*7),oe.y=pe.getFullYear(),oe.m=pe.getMonth(),oe.d=pe.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),Ee="Z"in oe?f_(i0(oe.y,0,1)).getUTCDay():d_(i0(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(Ee+5)%7:oe.w+oe.U*7-(Ee+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,f_(oe)):d_(oe)}}function D(ne,le,de,oe){for(var ue=0,pe=le.length,Ee=de.length,xe,Re;ue<pe;){if(oe>=Ee)return-1;if(xe=le.charCodeAt(ue++),xe===37){if(xe=le.charAt(ue++),Re=O[xe in dK?le.charAt(ue++):xe],!Re||(oe=Re(ne,de,oe))<0)return-1}else if(xe!=de.charCodeAt(oe++))return-1}return oe}function M(ne,le,de){var oe=c.exec(le.slice(de));return oe?(ne.p=u.get(oe[0].toLowerCase()),de+oe[0].length):-1}function A(ne,le,de){var oe=m.exec(le.slice(de));return oe?(ne.w=g.get(oe[0].toLowerCase()),de+oe[0].length):-1}function _(ne,le,de){var oe=f.exec(le.slice(de));return oe?(ne.w=h.get(oe[0].toLowerCase()),de+oe[0].length):-1}function N(ne,le,de){var oe=w.exec(le.slice(de));return oe?(ne.m=C.get(oe[0].toLowerCase()),de+oe[0].length):-1}function B(ne,le,de){var oe=y.exec(le.slice(de));return oe?(ne.m=v.get(oe[0].toLowerCase()),de+oe[0].length):-1}function H(ne,le,de){return D(ne,t,le,de)}function j(ne,le,de){return D(ne,n,le,de)}function L(ne,le,de){return D(ne,r,le,de)}function V(ne){return a[ne.getDay()]}function W(ne){return i[ne.getDay()]}function K(ne){return l[ne.getMonth()]}function G(ne){return s[ne.getMonth()]}function q(ne){return o[+(ne.getHours()>=12)]}function Y(ne){return 1+~~(ne.getMonth()/3)}function Z(ne){return a[ne.getUTCDay()]}function ie(ne){return i[ne.getUTCDay()]}function se(ne){return l[ne.getUTCMonth()]}function ce(ne){return s[ne.getUTCMonth()]}function ye(ne){return o[+(ne.getUTCHours()>=12)]}function Se(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var le=P(ne+="",E);return le.toString=function(){return ne},le},parse:function(ne){var le=R(ne+="",!1);return le.toString=function(){return ne},le},utcFormat:function(ne){var le=P(ne+="",I);return le.toString=function(){return ne},le},utcParse:function(ne){var le=R(ne+="",!0);return le.toString=function(){return ne},le}}}var dK={"-":"",_:" ",0:"0"},di=/^\s*\d+/,V5e=/^%/,H5e=/[\\^$*+?|[\]().{}]/g;function tr(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function U5e(e){return e.replace(H5e,"\\$&")}function a0(e){return new RegExp("^(?:"+e.map(U5e).join("|")+")","i")}function s0(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function G5e(e,t,n){var r=di.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function q5e(e,t,n){var r=di.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function W5e(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function K5e(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Y5e(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function fK(e,t,n){var r=di.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function pK(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Q5e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function X5e(e,t,n){var r=di.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function J5e(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function hK(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Z5e(e,t,n){var r=di.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function mK(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function eUe(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function tUe(e,t,n){var r=di.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function nUe(e,t,n){var r=di.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function rUe(e,t,n){var r=di.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oUe(e,t,n){var r=V5e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function iUe(e,t,n){var r=di.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function aUe(e,t,n){var r=di.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function gK(e,t){return tr(e.getDate(),t,2)}function sUe(e,t){return tr(e.getHours(),t,2)}function lUe(e,t){return tr(e.getHours()%12||12,t,2)}function cUe(e,t){return tr(1+Ew.count(Ku(e),e),t,3)}function Dae(e,t){return tr(e.getMilliseconds(),t,3)}function uUe(e,t){return Dae(e,t)+"000"}function dUe(e,t){return tr(e.getMonth()+1,t,2)}function fUe(e,t){return tr(e.getMinutes(),t,2)}function pUe(e,t){return tr(e.getSeconds(),t,2)}function hUe(e){var t=e.getDay();return t===0?7:t}function mUe(e,t){return tr(YI.count(Ku(e)-1,e),t,2)}function kae(e){var t=e.getDay();return t>=4||t===0?vy(e):vy.ceil(e)}function gUe(e,t){return e=kae(e),tr(vy.count(Ku(e),e)+(Ku(e).getDay()===4),t,2)}function yUe(e){return e.getDay()}function vUe(e,t){return tr(RT.count(Ku(e)-1,e),t,2)}function bUe(e,t){return tr(e.getFullYear()%100,t,2)}function xUe(e,t){return e=kae(e),tr(e.getFullYear()%100,t,2)}function SUe(e,t){return tr(e.getFullYear()%1e4,t,4)}function wUe(e,t){var n=e.getDay();return e=n>=4||n===0?vy(e):vy.ceil(e),tr(e.getFullYear()%1e4,t,4)}function CUe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+tr(t/60|0,"0",2)+tr(t%60,"0",2)}function yK(e,t){return tr(e.getUTCDate(),t,2)}function EUe(e,t){return tr(e.getUTCHours(),t,2)}function TUe(e,t){return tr(e.getUTCHours()%12||12,t,2)}function OUe(e,t){return tr(1+KI.count(Yu(e),e),t,3)}function _ae(e,t){return tr(e.getUTCMilliseconds(),t,3)}function IUe(e,t){return _ae(e,t)+"000"}function PUe(e,t){return tr(e.getUTCMonth()+1,t,2)}function AUe(e,t){return tr(e.getUTCMinutes(),t,2)}function MUe(e,t){return tr(e.getUTCSeconds(),t,2)}function RUe(e){var t=e.getUTCDay();return t===0?7:t}function DUe(e,t){return tr(QI.count(Yu(e)-1,e),t,2)}function $ae(e){var t=e.getUTCDay();return t>=4||t===0?by(e):by.ceil(e)}function kUe(e,t){return e=$ae(e),tr(by.count(Yu(e),e)+(Yu(e).getUTCDay()===4),t,2)}function _Ue(e){return e.getUTCDay()}function $Ue(e,t){return tr(DT.count(Yu(e)-1,e),t,2)}function NUe(e,t){return tr(e.getUTCFullYear()%100,t,2)}function LUe(e,t){return e=$ae(e),tr(e.getUTCFullYear()%100,t,2)}function FUe(e,t){return tr(e.getUTCFullYear()%1e4,t,4)}function jUe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?by(e):by.ceil(e),tr(e.getUTCFullYear()%1e4,t,4)}function BUe(){return"+0000"}function vK(){return"%"}function bK(e){return+e}function xK(e){return Math.floor(+e/1e3)}var Xm,Nae,Lae;zUe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function zUe(e){return Xm=z5e(e),Nae=Xm.format,Xm.parse,Lae=Xm.utcFormat,Xm.utcParse,Xm}function VUe(e){return new Date(e)}function HUe(e){return e instanceof Date?+e:+new Date(+e)}function Mz(e,t,n,r,o,i,a,s,l,c){var u=gz(),f=u.invert,h=u.domain,m=c(".%L"),g=c(":%S"),y=c("%I:%M"),v=c("%I %p"),w=c("%a %d"),C=c("%b %d"),E=c("%B"),I=c("%Y");function O(P){return(l(P)<P?m:s(P)<P?g:a(P)<P?y:i(P)<P?v:r(P)<P?o(P)<P?w:C:n(P)<P?E:I)(P)}return u.invert=function(P){return new Date(f(P))},u.domain=function(P){return arguments.length?h(Array.from(P,HUe)):h().map(VUe)},u.ticks=function(P){var R=h();return e(R[0],R[R.length-1],P??10)},u.tickFormat=function(P,R){return R==null?O:c(R)},u.nice=function(P){var R=h();return(!P||typeof P.range!="function")&&(P=t(R[0],R[R.length-1],P??10)),P?h(Cae(R,P)):u},u.copy=function(){return Cw(u,Mz(e,t,n,r,o,i,a,s,l,c))},u}function UUe(){return cl.apply(Mz(j5e,B5e,Ku,Pz,YI,Ew,Oz,Ez,Vp,Nae).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function GUe(){return cl.apply(Mz(L5e,F5e,Yu,Az,QI,KI,Iz,Tz,Vp,Lae).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function XI(){var e=0,t=1,n,r,o,i,a=ra,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:a(o===0?.5:(f=(i(f)-n)*o,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),o=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(a=f,c):a};function u(f){return function(h){var m,g;return arguments.length?([m,g]=h,a=f(m,g),c):[a(0),a(1)]}}return c.range=u(Tv),c.rangeRound=u(mz),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return i=f,n=f(e),r=f(t),o=n===r?0:1/(r-n),c}}function Vf(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Fae(){var e=zf(XI()(ra));return e.copy=function(){return Vf(e,Fae())},rd.apply(e,arguments)}function jae(){var e=bz(XI()).domain([1,10]);return e.copy=function(){return Vf(e,jae()).base(e.base())},rd.apply(e,arguments)}function Bae(){var e=xz(XI());return e.copy=function(){return Vf(e,Bae()).constant(e.constant())},rd.apply(e,arguments)}function Rz(){var e=Sz(XI());return e.copy=function(){return Vf(e,Rz()).exponent(e.exponent())},rd.apply(e,arguments)}function qUe(){return Rz.apply(null,arguments).exponent(.5)}function zae(){var e=[],t=ra;function n(r){if(r!=null&&!isNaN(r=+r))return t((Sw(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let o of r)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(yf),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,o)=>t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>DHe(e,i/r))},n.copy=function(){return zae(t).domain(e)},rd.apply(n,arguments)}function JI(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=ra,u,f=!1,h;function m(y){return isNaN(y=+y)?h:(y=.5+((y=+u(y))-i)*(r*y<r*i?s:l),c(f?Math.max(0,Math.min(1,y)):y))}m.domain=function(y){return arguments.length?([e,t,n]=y,o=u(e=+e),i=u(t=+t),a=u(n=+n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m):[e,t,n]},m.clamp=function(y){return arguments.length?(f=!!y,m):f},m.interpolator=function(y){return arguments.length?(c=y,m):c};function g(y){return function(v){var w,C,E;return arguments.length?([w,C,E]=v,c=o5e(y,[w,C,E]),m):[c(0),c(.5),c(1)]}}return m.range=g(Tv),m.rangeRound=g(mz),m.unknown=function(y){return arguments.length?(h=y,m):h},function(y){return u=y,o=y(e),i=y(t),a=y(n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m}}function Vae(){var e=zf(JI()(ra));return e.copy=function(){return Vf(e,Vae())},rd.apply(e,arguments)}function Hae(){var e=bz(JI()).domain([.1,1,10]);return e.copy=function(){return Vf(e,Hae()).base(e.base())},rd.apply(e,arguments)}function Uae(){var e=xz(JI());return e.copy=function(){return Vf(e,Uae()).constant(e.constant())},rd.apply(e,arguments)}function Dz(){var e=Sz(JI());return e.copy=function(){return Vf(e,Dz()).exponent(e.exponent())},rd.apply(e,arguments)}function WUe(){return Dz.apply(null,arguments).exponent(.5)}const SK=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ux,scaleDiverging:Vae,scaleDivergingLog:Hae,scaleDivergingPow:Dz,scaleDivergingSqrt:WUe,scaleDivergingSymlog:Uae,scaleIdentity:wae,scaleImplicit:$L,scaleLinear:AT,scaleLog:Eae,scaleOrdinal:fz,scalePoint:nx,scalePow:wz,scaleQuantile:Iae,scaleQuantize:Pae,scaleRadial:Oae,scaleSequential:Fae,scaleSequentialLog:jae,scaleSequentialPow:Rz,scaleSequentialQuantile:zae,scaleSequentialSqrt:qUe,scaleSequentialSymlog:Bae,scaleSqrt:I5e,scaleSymlog:Tae,scaleThreshold:Aae,scaleTime:UUe,scaleUtc:GUe,tickFormat:Sae},Symbol.toStringTag,{value:"Module"}));var p_,wK;function ZI(){if(wK)return p_;wK=1;var e=xv();function t(n,r,o){for(var i=-1,a=n.length;++i<a;){var s=n[i],l=r(s);if(l!=null&&(c===void 0?l===l&&!e(l):o(l,c)))var c=l,u=s}return u}return p_=t,p_}var h_,CK;function Gae(){if(CK)return h_;CK=1;function e(t,n){return t>n}return h_=e,h_}var m_,EK;function KUe(){if(EK)return m_;EK=1;var e=ZI(),t=Gae(),n=Cv();function r(o){return o&&o.length?e(o,n,t):void 0}return m_=r,m_}var YUe=KUe();const ff=Gn(YUe);var g_,TK;function qae(){if(TK)return g_;TK=1;function e(t,n){return t<n}return g_=e,g_}var y_,OK;function QUe(){if(OK)return y_;OK=1;var e=ZI(),t=qae(),n=Cv();function r(o){return o&&o.length?e(o,n,t):void 0}return y_=r,y_}var XUe=QUe();const eP=Gn(XUe);var v_,IK;function JUe(){if(IK)return v_;IK=1;var e=YB(),t=Uc(),n=Zie(),r=Aa();function o(i,a){var s=r(i)?e:n;return s(i,t(a,3))}return v_=o,v_}var b_,PK;function ZUe(){if(PK)return b_;PK=1;var e=Xie(),t=JUe();function n(r,o){return e(t(r,o),1)}return b_=n,b_}var e4e=ZUe();const t4e=Gn(e4e);var x_,AK;function n4e(){if(AK)return x_;AK=1;var e=sz();function t(n,r){return e(n,r)}return x_=t,x_}var r4e=n4e();const Pf=Gn(r4e);var Ov=1e9,o4e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},_z,Kr=!0,rl="[DecimalError] ",ih=rl+"Invalid argument: ",kz=rl+"Exponent out of range: ",Iv=Math.floor,Mp=Math.pow,i4e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wa,ni=1e7,zr=7,Wae=9007199254740991,kT=Iv(Wae/zr),jt={};jt.absoluteValue=jt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};jt.comparedTo=jt.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=r<o?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};jt.decimalPlaces=jt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*zr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};jt.dividedBy=jt.div=function(e){return _u(this,new this.constructor(e))};jt.dividedToIntegerBy=jt.idiv=function(e){var t=this,n=t.constructor;return Ar(_u(t,new n(e),0,1),n.precision)};jt.equals=jt.eq=function(e){return!this.cmp(e)};jt.exponent=function(){return _o(this)};jt.greaterThan=jt.gt=function(e){return this.cmp(e)>0};jt.greaterThanOrEqualTo=jt.gte=function(e){return this.cmp(e)>=0};jt.isInteger=jt.isint=function(){return this.e>this.d.length-2};jt.isNegative=jt.isneg=function(){return this.s<0};jt.isPositive=jt.ispos=function(){return this.s>0};jt.isZero=function(){return this.s===0};jt.lessThan=jt.lt=function(e){return this.cmp(e)<0};jt.lessThanOrEqualTo=jt.lte=function(e){return this.cmp(e)<1};jt.logarithm=jt.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Wa))throw Error(rl+"NaN");if(n.s<1)throw Error(rl+(n.s?"NaN":"-Infinity"));return n.eq(Wa)?new r(0):(Kr=!1,t=_u(Yx(n,i),Yx(e,i),i),Kr=!0,Ar(t,o))};jt.minus=jt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Qae(t,e):Kae(t,(e.s=-e.s,e))};jt.modulo=jt.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(rl+"NaN");return n.s?(Kr=!1,t=_u(n,e,0,1).times(e),Kr=!0,n.minus(t)):Ar(new r(n),o)};jt.naturalExponential=jt.exp=function(){return Yae(this)};jt.naturalLogarithm=jt.ln=function(){return Yx(this)};jt.negated=jt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};jt.plus=jt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Kae(t,e):Qae(t,(e.s=-e.s,e))};jt.precision=jt.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ih+e);if(t=_o(o)+1,r=o.d.length-1,n=r*zr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};jt.squareRoot=jt.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(rl+"NaN")}for(e=_o(s),Kr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=Sc(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Iv((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(_u(s,i,a+2)).times(.5),Sc(i.d).slice(0,a)===(t=Sc(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(Ar(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Kr=!0,Ar(r,n)};jt.times=jt.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,f=u.constructor,h=u.d,m=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,n=u.e+e.e,l=h.length,c=m.length,l<c&&(i=h,h=m,m=i,a=l,l=c,c=a),i=[],a=l+c,r=a;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+m[r]*h[o-r-1]+t,i[o--]=s%ni|0,t=s/ni|0;i[o]=(i[o]+t)%ni|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Kr?Ar(e,f.precision):e};jt.toDecimalPlaces=jt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(jc(e,0,Ov),t===void 0?t=r.rounding:jc(t,0,8),Ar(n,e+_o(n)+1,t))};jt.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=Ch(r,!0):(jc(e,0,Ov),t===void 0?t=o.rounding:jc(t,0,8),r=Ar(new o(r),e+1,t),n=Ch(r,!0,e+1)),n};jt.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?Ch(o):(jc(e,0,Ov),t===void 0?t=i.rounding:jc(t,0,8),r=Ar(new i(o),e+_o(o)+1,t),n=Ch(r.abs(),!1,e+_o(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};jt.toInteger=jt.toint=function(){var e=this,t=e.constructor;return Ar(new t(e),_o(e)+1,t.rounding)};jt.toNumber=function(){return+this};jt.toPower=jt.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(Wa);if(s=new l(s),!s.s){if(e.s<1)throw Error(rl+"Infinity");return s}if(s.eq(Wa))return s;if(r=l.precision,e.eq(Wa))return Ar(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=Wae){for(o=new l(Wa),t=Math.ceil(r/zr+4),Kr=!1;n%2&&(o=o.times(s),RK(o.d,t)),n=Iv(n/2),n!==0;)s=s.times(s),RK(s.d,t);return Kr=!0,e.s<0?new l(Wa).div(o):Ar(o,r)}}else if(i<0)throw Error(rl+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Kr=!1,o=e.times(Yx(s,r+c)),Kr=!0,o=Yae(o),o.s=i,o};jt.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=_o(o),r=Ch(o,n<=i.toExpNeg||n>=i.toExpPos)):(jc(e,1,Ov),t===void 0?t=i.rounding:jc(t,0,8),o=Ar(new i(o),e,t),n=_o(o),r=Ch(o,e<=n||n<=i.toExpNeg,e)),r};jt.toSignificantDigits=jt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(jc(e,1,Ov),t===void 0?t=r.rounding:jc(t,0,8)),Ar(new r(n),e,t)};jt.toString=jt.valueOf=jt.val=jt.toJSON=jt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=_o(e),n=e.constructor;return Ch(e,t<=n.toExpNeg||t>=n.toExpPos)};function Kae(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Kr?Ar(t,f):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(f/zr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/ni|0,l[i]%=ni;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Kr?Ar(t,f):t}function jc(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ih+e)}function Sc(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)r=e[t]+"",n=zr-r.length,n&&(i+=Ud(n)),i+=r;a=e[t],r=a+"",n=zr-r.length,n&&(i+=Ud(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}var _u=function(){function e(r,o){var i,a=0,s=r.length;for(r=r.slice();s--;)i=r[s]*o+a,r[s]=i%ni|0,a=i/ni|0;return a&&r.unshift(a),r}function t(r,o,i,a){var s,l;if(i!=a)l=i>a?1:-1;else for(s=l=0;s<i;s++)if(r[s]!=o[s]){l=r[s]>o[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]<o[i]?1:0,r[i]=a*ni+r[i]-o[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,o,i,a){var s,l,c,u,f,h,m,g,y,v,w,C,E,I,O,P,R,D,M=r.constructor,A=r.s==o.s?1:-1,_=r.d,N=o.d;if(!r.s)return new M(r);if(!o.s)throw Error(rl+"Division by zero");for(l=r.e-o.e,R=N.length,O=_.length,m=new M(A),g=m.d=[],c=0;N[c]==(_[c]||0);)++c;if(N[c]>(_[c]||0)&&--l,i==null?C=i=M.precision:a?C=i+(_o(r)-_o(o))+1:C=i,C<0)return new M(0);if(C=C/zr+2|0,c=0,R==1)for(u=0,N=N[0],C++;(c<O||u)&&C--;c++)E=u*ni+(_[c]||0),g[c]=E/N|0,u=E%N|0;else{for(u=ni/(N[0]+1)|0,u>1&&(N=e(N,u),_=e(_,u),R=N.length,O=_.length),I=R,y=_.slice(0,R),v=y.length;v<R;)y[v++]=0;D=N.slice(),D.unshift(0),P=N[0],N[1]>=ni/2&&++P;do u=0,s=t(N,y,R,v),s<0?(w=y[0],R!=v&&(w=w*ni+(y[1]||0)),u=w/P|0,u>1?(u>=ni&&(u=ni-1),f=e(N,u),h=f.length,v=y.length,s=t(f,y,h,v),s==1&&(u--,n(f,R<h?D:N,h))):(u==0&&(s=u=1),f=N.slice()),h=f.length,h<v&&f.unshift(0),n(y,f,v),s==-1&&(v=y.length,s=t(N,y,R,v),s<1&&(u++,n(y,R<v?D:N,v))),v=y.length):s===0&&(u++,y=[0]),g[c++]=u,s&&y[0]?y[v++]=_[I]||0:(y=[_[I]],v=1);while((I++<O||y[0]!==void 0)&&C--)}return g[0]||g.shift(),m.e=l,Ar(m,a?i+_o(m)+1:i)}}();function Yae(e,t){var n,r,o,i,a,s,l=0,c=0,u=e.constructor,f=u.precision;if(_o(e)>16)throw Error(kz+_o(e));if(!e.s)return new u(Wa);for(Kr=!1,s=f,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Mp(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(Wa),u.precision=s;;){if(o=Ar(o.times(e),s),n=n.times(++l),a=i.plus(_u(o,n,s)),Sc(a.d).slice(0,s)===Sc(i.d).slice(0,s)){for(;c--;)i=Ar(i.times(i),s);return u.precision=f,t==null?(Kr=!0,Ar(i,f)):i}i=a}}function _o(e){for(var t=e.e*zr,n=e.d[0];n>=10;n/=10)t++;return t}function S_(e,t,n){if(t>e.LN10.sd())throw Kr=!0,n&&(e.precision=n),Error(rl+"LN10 precision limit exceeded");return Ar(new e(e.LN10),t)}function Ud(e){for(var t="";e--;)t+="0";return t}function Yx(e,t){var n,r,o,i,a,s,l,c,u,f=1,h=10,m=e,g=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(rl+(m.s?"NaN":"-Infinity"));if(m.eq(Wa))return new y(0);if(t==null?(Kr=!1,c=v):c=t,m.eq(10))return t==null&&(Kr=!0),S_(y,c);if(c+=h,y.precision=c,n=Sc(g),r=n.charAt(0),i=_o(m),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Sc(m.d),r=n.charAt(0),f++;i=_o(m),r>1?(m=new y("0."+n),i++):m=new y(r+"."+n.slice(1))}else return l=S_(y,c+2,v).times(i+""),m=Yx(new y(r+"."+n.slice(1)),c-h).plus(l),y.precision=v,t==null?(Kr=!0,Ar(m,v)):m;for(s=a=m=_u(m.minus(Wa),m.plus(Wa),c),u=Ar(m.times(m),c),o=3;;){if(a=Ar(a.times(u),c),l=s.plus(_u(a,new y(o),c)),Sc(l.d).slice(0,c)===Sc(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(S_(y,c+2,v).times(i+""))),s=_u(s,new y(f),c),y.precision=v,t==null?(Kr=!0,Ar(s,v)):s;s=l,o+=2}}function MK(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=Iv(n/zr),e.d=[],r=(n+1)%zr,n<0&&(r+=zr),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=zr;r<o;)e.d.push(+t.slice(r,r+=zr));t=t.slice(r),r=zr-t.length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),Kr&&(e.e>kT||e.e<-kT))throw Error(kz+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ar(e,t,n){var r,o,i,a,s,l,c,u,f=e.d;for(a=1,i=f[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=zr,o=t,c=f[u=0];else{if(u=Math.ceil((r+1)/zr),i=f.length,u>=i)return e;for(c=i=f[u],a=1;i>=10;i/=10)a++;r%=zr,o=r-zr+a}if(n!==void 0&&(i=Mp(10,a-o-1),s=c/i%10|0,l=t<0||f[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/Mp(10,a-o):0:f[u-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return l?(i=_o(e),f.length=1,t=t-i-1,f[0]=Mp(10,(zr-t%zr)%zr),e.e=Iv(-t/zr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=u,i=1,u--):(f.length=u+1,i=Mp(10,zr-r),f[u]=o>0?(c/Mp(10,a-o)%Mp(10,o)|0)*i:0),l)for(;;)if(u==0){(f[0]+=i)==ni&&(f[0]=1,++e.e);break}else{if(f[u]+=i,f[u]!=ni)break;f[u--]=0,i=1}for(r=f.length;f[--r]===0;)f.pop();if(Kr&&(e.e>kT||e.e<-kT))throw Error(kz+_o(e));return e}function Qae(e,t){var n,r,o,i,a,s,l,c,u,f,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Kr?Ar(t,m):t;if(l=e.d,f=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=f.length):(n=f,r=c,s=l.length),o=Math.max(Math.ceil(m/zr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=f.length,u=o<s,u&&(s=o),o=0;o<s;o++)if(l[o]!=f[o]){u=l[o]<f[o];break}a=0}for(u&&(n=l,l=f,f=n,t.s=-t.s),s=l.length,o=f.length-s;o>0;--o)l[s++]=0;for(o=f.length;o>a;){if(l[--o]<f[o]){for(i=o;i&&l[--i]===0;)l[i]=ni-1;--l[i],l[o]+=ni}l[o]-=f[o]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Kr?Ar(t,m):t):new h(0)}function Ch(e,t,n){var r,o=_o(e),i=Sc(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+Ud(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+Ud(-o-1)+i,n&&(r=n-a)>0&&(i+=Ud(r))):o>=a?(i+=Ud(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+Ud(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=Ud(r))),e.s<0?"-"+i:i}function RK(e,t){if(e.length>t)return e.length=t,!0}function Xae(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(ih+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return MK(a,i.toString())}else if(typeof i!="string")throw Error(ih+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,i4e.test(i))MK(a,i);else throw Error(ih+i)}if(o.prototype=jt,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=Xae,o.config=o.set=a4e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return o.config(e),o}function a4e(e){if(!e||typeof e!="object")throw Error(rl+"Object expected");var t,n,r,o=["precision",1,Ov,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((r=e[n=o[t]])!==void 0)if(Iv(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(ih+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ih+n+": "+r);return this}var _z=Xae(o4e);Wa=new _z(1);const Cr=_z;function s4e(e){return d4e(e)||u4e(e)||c4e(e)||l4e()}function l4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c4e(e,t){if(e){if(typeof e=="string")return jL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jL(e,t)}}function u4e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function d4e(e){if(Array.isArray(e))return jL(e)}function jL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f4e=function(t){return t},Jae={},Zae=function(t){return t===Jae},DK=function(t){return function n(){return arguments.length===0||arguments.length===1&&Zae(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},p4e=function e(t,n){return t===1?n:DK(function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.filter(function(s){return s!==Jae}).length;return a>=t?n.apply(void 0,o):e(t-a,DK(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var u=o.map(function(f){return Zae(f)?l.shift():f});return n.apply(void 0,s4e(u).concat(l))}))})},tP=function(t){return p4e(t.length,t)},BL=function(t,n){for(var r=[],o=t;o<n;++o)r[o-t]=o;return r},h4e=tP(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),m4e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return f4e;var o=n.reverse(),i=o[0],a=o.slice(1);return function(){return a.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},zL=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},ese=function(t){var n=null,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n&&i.every(function(s,l){return s===n[l]})||(n=i,r=t.apply(void 0,i)),r}};function g4e(e){var t;return e===0?t=1:t=Math.floor(new Cr(e).abs().log(10).toNumber())+1,t}function y4e(e,t,n){for(var r=new Cr(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i}var v4e=tP(function(e,t,n){var r=+e,o=+t;return r+n*(o-r)}),b4e=tP(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),x4e=tP(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const nP={rangeStep:y4e,getDigitCount:g4e,interpolateNumber:v4e,uninterpolateNumber:b4e,uninterpolateTruncation:x4e};function VL(e){return C4e(e)||w4e(e)||tse(e)||S4e()}function S4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w4e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function C4e(e){if(Array.isArray(e))return HL(e)}function Qx(e,t){return O4e(e)||T4e(e,t)||tse(e,t)||E4e()}function E4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tse(e,t){if(e){if(typeof e=="string")return HL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HL(e,t)}}function HL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T4e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function O4e(e){if(Array.isArray(e))return e}function nse(e){var t=Qx(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function rse(e,t,n){if(e.lte(0))return new Cr(0);var r=nP.getDigitCount(e.toNumber()),o=new Cr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new Cr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new Cr(Math.ceil(l))}function I4e(e,t,n){var r=1,o=new Cr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new Cr(10).pow(nP.getDigitCount(e)-1),o=new Cr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new Cr(Math.floor(e)))}else e===0?o=new Cr(Math.floor((t-1)/2)):n||(o=new Cr(Math.floor(e)));var a=Math.floor((t-1)/2),s=m4e(h4e(function(l){return o.add(new Cr(l-a).mul(r)).toNumber()}),BL);return s(0,t)}function ose(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Cr(0),tickMin:new Cr(0),tickMax:new Cr(0)};var i=rse(new Cr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new Cr(0):(a=new Cr(e).add(t).div(2),a=a.sub(new Cr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new Cr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?ose(e,t,n,r,o+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new Cr(s).mul(i)),tickMax:a.add(new Cr(l).mul(i))})}function P4e(e){var t=Qx(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=nse([n,r]),l=Qx(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var f=u===1/0?[c].concat(VL(BL(0,o-1).map(function(){return 1/0}))):[].concat(VL(BL(0,o-1).map(function(){return-1/0})),[u]);return n>r?zL(f):f}if(c===u)return I4e(c,o,i);var h=ose(c,u,a,i),m=h.step,g=h.tickMin,y=h.tickMax,v=nP.rangeStep(g,y.add(new Cr(.1).mul(m)),m);return n>r?zL(v):v}function A4e(e,t){var n=Qx(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=nse([r,o]),s=Qx(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),f=rse(new Cr(c).sub(l).div(u-1),i,0),h=[].concat(VL(nP.rangeStep(new Cr(l),new Cr(c).sub(new Cr(.99).mul(f)),f)),[c]);return r>o?zL(h):h}var M4e=ese(P4e),R4e=ese(A4e),D4e="Invariant failed";function Af(e,t){throw new Error(D4e)}var k4e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function xy(e){"@babel/helpers - typeof";return xy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xy(e)}function _T(){return _T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_T.apply(this,arguments)}function _4e(e,t){return F4e(e)||L4e(e,t)||N4e(e,t)||$4e()}function $4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N4e(e,t){if(e){if(typeof e=="string")return kK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kK(e,t)}}function kK(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L4e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function F4e(e){if(Array.isArray(e))return e}function j4e(e,t){if(e==null)return{};var n=B4e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B4e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function z4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V4e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sse(r.key),r)}}function H4e(e,t,n){return t&&V4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U4e(e,t,n){return t=$T(t),G4e(e,ise()?Reflect.construct(t,n||[],$T(e).constructor):t.apply(e,n))}function G4e(e,t){if(t&&(xy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q4e(e)}function q4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ise(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ise=function(){return!!e})()}function $T(e){return $T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$T(e)}function W4e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UL(e,t)}function UL(e,t){return UL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},UL(e,t)}function ase(e,t,n){return t=sse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sse(e){var t=K4e(e,"string");return xy(t)=="symbol"?t:t+""}function K4e(e,t){if(xy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pv=function(e){function t(){return z4e(this,t),U4e(this,t,arguments)}return W4e(t,e),H4e(t,[{key:"render",value:function(){var r=this.props,o=r.offset,i=r.layout,a=r.width,s=r.dataKey,l=r.data,c=r.dataPointFormatter,u=r.xAxis,f=r.yAxis,h=j4e(r,k4e),m=zt(h,!1);this.props.direction==="x"&&u.type!=="number"&&Af();var g=l.map(function(y){var v=c(y,s),w=v.x,C=v.y,E=v.value,I=v.errorVal;if(!I)return null;var O=[],P,R;if(Array.isArray(I)){var D=_4e(I,2);P=D[0],R=D[1]}else P=R=I;if(i==="vertical"){var M=u.scale,A=C+o,_=A+a,N=A-a,B=M(E-P),H=M(E+R);O.push({x1:H,y1:_,x2:H,y2:N}),O.push({x1:B,y1:A,x2:H,y2:A}),O.push({x1:B,y1:_,x2:B,y2:N})}else if(i==="horizontal"){var j=f.scale,L=w+o,V=L-a,W=L+a,K=j(E-P),G=j(E+R);O.push({x1:V,y1:G,x2:W,y2:G}),O.push({x1:L,y1:K,x2:L,y2:G}),O.push({x1:V,y1:K,x2:W,y2:K})}return J.createElement(wn,_T({className:"recharts-errorBar",key:"bar-".concat(O.map(function(q){return"".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))},m),O.map(function(q){return J.createElement("line",_T({},q,{key:"line-".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))}))});return J.createElement(wn,{className:"recharts-errorBars"},g)}}])}(J.Component);ase(Pv,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});ase(Pv,"displayName","ErrorBar");function Xx(e){"@babel/helpers - typeof";return Xx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xx(e)}function _K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_K(Object(n),!0).forEach(function(r){Y4e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_K(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y4e(e,t,n){return t=Q4e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q4e(e){var t=X4e(e,"string");return Xx(t)=="symbol"?t:t+""}function X4e(e,t){if(Xx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lse=function(t){var n=t.children,r=t.formattedGraphicalItems,o=t.legendWidth,i=t.legendContent,a=Va(n,Oc);if(!a)return null;var s=Oc.defaultProps,l=s!==void 0?yp(yp({},s),a.props):{},c;return a.props&&a.props.payload?c=a.props&&a.props.payload:i==="children"?c=(r||[]).reduce(function(u,f){var h=f.item,m=f.props,g=m.sectors||m.data||[];return u.concat(g.map(function(y){return{type:a.props.iconType||h.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):c=(r||[]).map(function(u){var f=u.item,h=f.type.defaultProps,m=h!==void 0?yp(yp({},h),f.props):{},g=m.dataKey,y=m.name,v=m.legendType,w=m.hide;return{inactive:w,dataKey:g,type:l.iconType||v||"square",color:$z(f),value:y||g,payload:m}}),yp(yp(yp({},l),Oc.getWithHeight(a,o)),{},{payload:c,item:a})};function Jx(e){"@babel/helpers - typeof";return Jx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jx(e)}function $K(e){return t3e(e)||e3e(e)||Z4e(e)||J4e()}function J4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z4e(e,t){if(e){if(typeof e=="string")return GL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GL(e,t)}}function e3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t3e(e){if(Array.isArray(e))return GL(e)}function GL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function NK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function po(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NK(Object(n),!0).forEach(function(r){Bg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bg(e,t,n){return t=n3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n3e(e){var t=r3e(e,"string");return Jx(t)=="symbol"?t:t+""}function r3e(e,t){if(Jx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vr(e,t,n){return on(e)||on(t)?n:Vo(t)?Ja(e,t,n):rn(t)?t(e):n}function rx(e,t,n,r){var o=t4e(e,function(s){return Vr(s,t)});if(n==="number"){var i=o.filter(function(s){return mt(s)||parseFloat(s)});return i.length?[eP(i),ff(i)]:[1/0,-1/0]}var a=r?o.filter(function(s){return!on(s)}):o;return a.map(function(s){return Vo(s)||s instanceof Date?s:""})}var o3e=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c<s;c++){var u=c>0?o[c-1].coordinate:o[s-1].coordinate,f=o[c].coordinate,h=c>=s-1?o[0].coordinate:o[c+1].coordinate,m=void 0;if(ta(f-u)!==ta(h-f)){var g=[];if(ta(h-f)===ta(l[1]-l[0])){m=h;var y=f+l[1]-l[0];g[0]=Math.min(y,(y+u)/2),g[1]=Math.max(y,(y+u)/2)}else{m=u;var v=h+l[1]-l[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var w=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(t>w[0]&&t<=w[1]||t>=g[0]&&t<=g[1]){a=o[c].index;break}}else{var C=Math.min(u,h),E=Math.max(u,h);if(t>(C+f)/2&&t<=(E+f)/2){a=o[c].index;break}}}else for(var I=0;I<s;I++)if(I===0&&t<=(r[I].coordinate+r[I+1].coordinate)/2||I>0&&I<s-1&&t>(r[I].coordinate+r[I-1].coordinate)/2&&t<=(r[I].coordinate+r[I+1].coordinate)/2||I===s-1&&t>(r[I].coordinate+r[I-1].coordinate)/2){a=r[I].index;break}return a},$z=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},i3e=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l<c;l++)for(var u=i[s[l]].stackGroups,f=Object.keys(u),h=0,m=f.length;h<m;h++){var g=u[f[h]],y=g.items,v=g.cateAxisId,w=y.filter(function(R){return ku(R.type).indexOf("Bar")>=0});if(w&&w.length){var C=w[0].type.defaultProps,E=C!==void 0?po(po({},C),w[0].props):w[0].props,I=E.barSize,O=E[v];a[O]||(a[O]=[]);var P=on(I)?n:I;a[O].push({item:w[0],stackList:w.slice(1),barSize:on(P)?void 0:na(P,r,0)})}}return a},a3e=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=na(n,o,0,!0),u,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,m=o/l,g=a.reduce(function(I,O){return I+O.barSize||0},0);g+=(l-1)*c,g>=o&&(g-=(l-1)*c,c=0),g>=o&&m>0&&(h=!0,m*=.9,g=l*m);var y=(o-g)/2>>0,v={offset:y-c,size:0};u=a.reduce(function(I,O){var P={item:O.item,position:{offset:v.offset+v.size+c,size:h?m:O.barSize}},R=[].concat($K(I),[P]);return v=R[R.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(D){R.push({item:D,position:v})}),R},f)}else{var w=na(r,o,0,!0);o-2*w-(l-1)*c<=0&&(c=0);var C=(o-2*w-(l-1)*c)/l;C>1&&(C>>=0);var E=s===+s?Math.min(C,s):C;u=a.reduce(function(I,O,P){var R=[].concat($K(I),[{item:O.item,position:{offset:w+(C+c)*P+(C-E)/2,size:E}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(D){R.push({item:D,position:R[R.length-1].position})}),R},f)}return u},s3e=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=lse({children:i,legendWidth:l});if(c){var u=o||{},f=u.width,h=u.height,m=c.align,g=c.verticalAlign,y=c.layout;if((y==="vertical"||y==="horizontal"&&g==="middle")&&m!=="center"&&mt(t[m]))return po(po({},t),{},Bg({},m,t[m]+(f||0)));if((y==="horizontal"||y==="vertical"&&m==="center")&&g!=="middle"&&mt(t[g]))return po(po({},t),{},Bg({},g,t[g]+(h||0)))}return t},l3e=function(t,n,r){return on(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},cse=function(t,n,r,o,i){var a=n.props.children,s=sa(a,Pv).filter(function(c){return l3e(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var f=Vr(u,r);if(on(f))return c;var h=Array.isArray(f)?[eP(f),ff(f)]:[f,f],m=l.reduce(function(g,y){var v=Vr(u,y,0),w=h[0]-Math.abs(Array.isArray(v)?v[0]:v),C=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,g[0]),Math.max(C,g[1])]},[1/0,-1/0]);return[Math.min(m[0],c[0]),Math.max(m[1],c[1])]},[1/0,-1/0])}return null},c3e=function(t,n,r,o,i){var a=n.map(function(s){return cse(t,s,r,i,o)}).filter(function(s){return!on(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},use=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&cse(t,l,c,o)||rx(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,f=c.length;u<f;u++)s[c[u]]||(s[c[u]]=!0,l.push(c[u]));return l},[])},dse=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},fse=function(t,n,r,o){if(o)return t.map(function(l){return l.coordinate});var i,a,s=t.map(function(l){return l.coordinate===n&&(i=!0),l.coordinate===r&&(a=!0),l.coordinate});return i||s.push(n),a||s.push(r),s},Ru=function(t,n,r){if(!t)return null;var o=t.scale,i=t.duplicateDomain,a=t.type,s=t.range,l=t.realScaleType==="scaleBand"?o.bandwidth()/2:2,c=(n||r)&&a==="category"&&o.bandwidth?o.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?ta(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(f){var h=i?i.indexOf(f):f;return{coordinate:o(h)+c,value:f,offset:c}});return u.filter(function(f){return!wv(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:o(f)+c,value:f,index:h,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(f){return{coordinate:o(f)+c,value:f,offset:c}}):o.domain().map(function(f,h){return{coordinate:o(f)+c,value:i?i[f]:f,index:h,offset:c}})},w_=new WeakMap,B1=function(t,n){if(typeof n!="function")return t;w_.has(t)||w_.set(t,new WeakMap);var r=w_.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},pse=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Ux(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:AT(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:nx(),realScaleType:"point"}:i==="category"?{scale:Ux(),realScaleType:"band"}:{scale:AT(),realScaleType:"linear"};if(Sh(o)){var l="scale".concat(jI(o));return{scale:(SK[l]||nx)(),realScaleType:SK[l]?l:"point"}}return rn(o)?{scale:o}:{scale:nx(),realScaleType:"point"}},LK=1e-4,hse=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-LK,a=Math.max(o[0],o[1])+LK,s=t(n[0]),l=t(n[r-1]);(s<i||s>a||l<i||l>a)&&t.domain([n[0],n[r-1]])}},u3e=function(t,n){if(!t)return null;for(var r=0,o=t.length;r<o;r++)if(t[r].item===n)return t[r].position;return null},d3e=function(t,n){if(!n||n.length!==2||!mt(n[0])||!mt(n[1]))return t;var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!mt(t[0])||t[0]<r)&&(i[0]=r),(!mt(t[1])||t[1]>o)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]<r&&(i[1]=r),i},f3e=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r<o;++r)for(var i=0,a=0,s=0;s<n;++s){var l=wv(t[s][r][1])?t[s][r][0]:t[s][r][1];l>=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},p3e=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r<o;++r)for(var i=0,a=0;a<n;++a){var s=wv(t[a][r][1])?t[a][r][0]:t[a][r][1];s>=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},h3e={sign:f3e,expand:nBe,none:fy,silhouette:rBe,wiggle:oBe,positive:p3e},m3e=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=h3e[r],a=tBe().keys(o).value(function(s,l){return+Vr(s,l,0)}).order(SL).offset(i);return a(t)},g3e=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(f,h){var m,g=(m=h.type)!==null&&m!==void 0&&m.defaultProps?po(po({},h.type.defaultProps),h.props):h.props,y=g.stackId,v=g.hide;if(v)return f;var w=g[r],C=f[w]||{hasStack:!1,stackGroups:{}};if(Vo(y)){var E=C.stackGroups[y]||{numericAxisId:r,cateAxisId:o,items:[]};E.items.push(h),C.hasStack=!0,C.stackGroups[y]=E}else C.stackGroups[Bf("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[h]};return po(po({},f),{},Bg({},w,C))},l),u={};return Object.keys(c).reduce(function(f,h){var m=c[h];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(y,v){var w=m.stackGroups[v];return po(po({},y),{},Bg({},v,{numericAxisId:r,cateAxisId:o,items:w.items,stackedData:m3e(t,w.items,i)}))},g)}return po(po({},f),{},Bg({},h,m))},u)},mse=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=M4e(c,i,s);return t.domain([eP(u),ff(u)]),{niceTicks:u}}if(i&&o==="number"){var f=t.domain(),h=R4e(f,i,s);return{niceTicks:h}}return null};function Sy(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!on(o[t.dataKey])){var s=dT(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=Vr(o,on(a)?t.dataKey:a);return on(l)?null:t.scale(l)}var FK=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=Vr(a,n.dataKey,n.domain[s]);return on(l)?null:n.scale(l)-i/2+o},y3e=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},v3e=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Vo(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},b3e=function(t){return t.reduce(function(n,r){return[eP(r.concat([n[0]]).filter(mt)),ff(r.concat([n[1]]).filter(mt))]},[1/0,-1/0])},gse=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var f=b3e(u.slice(n,r+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},jK=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,BK=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qL=function(t,n,r){if(rn(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(mt(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(jK.test(t[0])){var i=+jK.exec(t[0])[1];o[0]=n[0]-i}else rn(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(mt(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(BK.test(t[1])){var a=+BK.exec(t[1])[1];o[1]=n[1]+a}else rn(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},NT=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=cz(n,function(f){return f.coordinate}),a=1/0,s=1,l=i.length;s<l;s++){var c=i[s],u=i[s-1];a=Math.min((c.coordinate||0)-(u.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0},zK=function(t,n,r){return!t||!t.length||Pf(t,Ja(r,"type.defaultProps.domain"))?n:t},yse=function(t,n){var r=t.type.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,o=r.dataKey,i=r.name,a=r.unit,s=r.formatter,l=r.tooltipType,c=r.chartType,u=r.hide;return po(po({},zt(t,!1)),{},{dataKey:o,unit:a,formatter:s,name:i||o,color:$z(t),value:Vr(n,o),type:l,payload:n,chartType:c,hide:u})};function Zx(e){"@babel/helpers - typeof";return Zx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zx(e)}function VK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VK(Object(n),!0).forEach(function(r){vse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vse(e,t,n){return t=x3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x3e(e){var t=S3e(e,"string");return Zx(t)=="symbol"?t:t+""}function S3e(e,t){if(Zx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w3e(e,t){return O3e(e)||T3e(e,t)||E3e(e,t)||C3e()}function C3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E3e(e,t){if(e){if(typeof e=="string")return HK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HK(e,t)}}function HK(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T3e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function O3e(e){if(Array.isArray(e))return e}var LT=Math.PI/180,I3e=function(t){return t*180/Math.PI},Nr=function(t,n,r,o){return{x:t+Math.cos(-LT*o)*r,y:n+Math.sin(-LT*o)*r}},bse=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},P3e=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=na(t.cx,a,a/2),f=na(t.cy,s,s/2),h=bse(a,s,r),m=na(t.innerRadius,h,0),g=na(t.outerRadius,h,h*.8),y=Object.keys(n);return y.reduce(function(v,w){var C=n[w],E=C.domain,I=C.reversed,O;if(on(C.range))o==="angleAxis"?O=[l,c]:o==="radiusAxis"&&(O=[m,g]),I&&(O=[O[1],O[0]]);else{O=C.range;var P=O,R=w3e(P,2);l=R[0],c=R[1]}var D=pse(C,i),M=D.realScaleType,A=D.scale;A.domain(E).range(O),hse(A);var _=mse(A,Su(Su({},C),{},{realScaleType:M})),N=Su(Su(Su({},C),_),{},{range:O,radius:g,realScaleType:M,scale:A,cx:u,cy:f,innerRadius:m,outerRadius:g,startAngle:l,endAngle:c});return Su(Su({},v),{},vse({},w,N))},{})},A3e=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},M3e=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=A3e({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:I3e(c),angleInRadian:c}},R3e=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},D3e=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},UK=function(t,n){var r=t.x,o=t.y,i=M3e({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(a<l||a>c)return!1;if(a===0)return!0;var u=R3e(n),f=u.startAngle,h=u.endAngle,m=s,g;if(f<=h){for(;m>h;)m-=360;for(;m<f;)m+=360;g=m>=f&&m<=h}else{for(;m>f;)m-=360;for(;m<h;)m+=360;g=m>=h&&m<=f}return g?Su(Su({},n),{},{radius:a,angle:D3e(m,n)}):null},xse=function(t){return!x.isValidElement(t)&&!rn(t)&&typeof t!="boolean"?t.className:""};function eS(e){"@babel/helpers - typeof";return eS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eS(e)}var k3e=["offset"];function _3e(e){return F3e(e)||L3e(e)||N3e(e)||$3e()}function $3e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N3e(e,t){if(e){if(typeof e=="string")return WL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WL(e,t)}}function L3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F3e(e){if(Array.isArray(e))return WL(e)}function WL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j3e(e,t){if(e==null)return{};var n=B3e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function GK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GK(Object(n),!0).forEach(function(r){z3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z3e(e,t,n){return t=V3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V3e(e){var t=H3e(e,"string");return eS(t)=="symbol"?t:t+""}function H3e(e,t){if(eS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(eS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tS(){return tS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tS.apply(this,arguments)}var U3e=function(t){var n=t.value,r=t.formatter,o=on(t.children)?n:t.children;return rn(r)?r(o):o},G3e=function(t,n){var r=ta(n-t),o=Math.min(Math.abs(n-t),360);return r*o},q3e=function(t,n,r){var o=t.position,i=t.viewBox,a=t.offset,s=t.className,l=i,c=l.cx,u=l.cy,f=l.innerRadius,h=l.outerRadius,m=l.startAngle,g=l.endAngle,y=l.clockWise,v=(f+h)/2,w=G3e(m,g),C=w>=0?1:-1,E,I;o==="insideStart"?(E=m+C*a,I=y):o==="insideEnd"?(E=g-C*a,I=!y):o==="end"&&(E=g+C*a,I=y),I=w<=0?I:!I;var O=Nr(c,u,v,E),P=Nr(c,u,v,E+(I?1:-1)*359),R="M".concat(O.x,",").concat(O.y,`
+ height and width.`,j,L,a,l,u,f,n);var V=!Array.isArray(m)&&_u(m.type).endsWith("Chart");return J.Children.map(m,function(W){return J.isValidElement(W)?x.cloneElement(W,N1({width:j,height:L},V?{style:N1({height:"100%",width:"100%",maxHeight:L,maxWidth:j},W.props.style)}:{})):W})},[n,m,l,p,f,u,M,a]);return J.createElement("div",{id:v?"".concat(v):void 0,className:fe("recharts-responsive-container",w),style:N1(N1({},I),{},{width:a,height:l,minWidth:u,minHeight:f,maxHeight:p}),ref:O},N)}),Ev=function(t){return null};Ev.displayName="Cell";function Vx(e){"@babel/helpers - typeof";return Vx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vx(e)}function I7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function RL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I7(Object(n),!0).forEach(function(r){GVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GVe(e,t,n){return t=qVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qVe(e){var t=WVe(e,"string");return Vx(t)=="symbol"?t:t+""}function WVe(e,t){if(Vx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xm={widthCache:{},cacheCount:0},KVe=2e3,YVe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},P7="recharts_measurement_span";function QVe(e){var t=RL({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var tx=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||rd.isSsr)return{width:0,height:0};var r=QVe(n),o=JSON.stringify({text:t,copyStyle:r});if(Xm.widthCache[o])return Xm.widthCache[o];try{var i=document.getElementById(P7);i||(i=document.createElement("span"),i.setAttribute("id",P7),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=RL(RL({},YVe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return Xm.widthCache[o]=l,++Xm.cacheCount>KVe&&(Xm.cacheCount=0,Xm.widthCache={}),l}catch{return{width:0,height:0}}},XVe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Hx(e){"@babel/helpers - typeof";return Hx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hx(e)}function CT(e,t){return tHe(e)||eHe(e,t)||ZVe(e,t)||JVe()}function JVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZVe(e,t){if(e){if(typeof e=="string")return A7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A7(e,t)}}function A7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eHe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function tHe(e){if(Array.isArray(e))return e}function nHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oHe(r.key),r)}}function rHe(e,t,n){return t&&M7(e.prototype,t),n&&M7(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oHe(e){var t=iHe(e,"string");return Hx(t)=="symbol"?t:t+""}function iHe(e,t){if(Hx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var R7=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,D7=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,aHe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,sHe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,cae={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},lHe=Object.keys(cae),yg="NaN";function cHe(e,t){return e*cae[t]}var L1=function(){function e(t,n){nHe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!aHe.test(n)&&(this.num=NaN,this.unit=""),lHe.includes(n)&&(this.num=cHe(t,n),this.unit="px")}return rHe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,o=(r=sHe.exec(n))!==null&&r!==void 0?r:[],i=CT(o,3),a=i[1],s=i[2];return new e(parseFloat(a),s??"")}}])}();function uae(e){if(e.includes(yg))return yg;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=R7.exec(t))!==null&&n!==void 0?n:[],o=CT(r,4),i=o[1],a=o[2],s=o[3],l=L1.parse(i??""),c=L1.parse(s??""),u=a==="*"?l.multiply(c):l.divide(c);if(u.isNaN())return yg;t=t.replace(R7,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,p=(f=D7.exec(t))!==null&&f!==void 0?f:[],m=CT(p,4),g=m[1],y=m[2],v=m[3],w=L1.parse(g??""),C=L1.parse(v??""),E=y==="+"?w.add(C):w.subtract(C);if(E.isNaN())return yg;t=t.replace(D7,E.toString())}return t}var k7=/\(([^()]*)\)/;function uHe(e){for(var t=e;t.includes("(");){var n=k7.exec(t),r=CT(n,2),o=r[1];t=t.replace(k7,uae(o))}return t}function dHe(e){var t=e.replace(/\s+/g,"");return t=uHe(t),t=uae(t),t}function fHe(e){try{return dHe(e)}catch{return yg}}function a_(e){var t=fHe(e.slice(5,-1));return t===yg?"":t}var pHe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],hHe=["dx","dy","angle","className","breakAll"];function DL(){return DL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DL.apply(this,arguments)}function _7(e,t){if(e==null)return{};var n=mHe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $7(e,t){return bHe(e)||vHe(e,t)||yHe(e,t)||gHe()}function gHe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yHe(e,t){if(e){if(typeof e=="string")return N7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N7(e,t)}}function N7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vHe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function bHe(e){if(Array.isArray(e))return e}var dae=/[ \f\n\r\t\v\u2028\u2029]+/,fae=function(t){var n=t.children,r=t.breakAll,o=t.style;try{var i=[];an(n)||(r?i=n.toString().split(""):i=n.toString().split(dae));var a=i.map(function(l){return{word:l,width:tx(l,o).width}}),s=r?0:tx(" ",o).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}},xHe=function(t,n,r,o,i){var a=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=mt(a),f=s,p=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return j.reduce(function(L,V){var W=V.word,K=V.width,G=L[L.length-1];if(G&&(o==null||i||G.width+K+r<Number(o)))G.words.push(W),G.width+=K+r;else{var q={words:[W],width:K};L.push(q)}return L},[])},m=p(n),g=function(j){return j.reduce(function(L,V){return L.width>V.width?L:V})};if(!u)return m;for(var y="…",v=function(j){var L=f.slice(0,j),V=fae({breakAll:c,style:l,children:L+y}).wordsWithComputedWidth,W=p(V),K=W.length>a||g(W).width>Number(o);return[K,W]},w=0,C=f.length-1,E=0,I;w<=C&&E<=f.length-1;){var O=Math.floor((w+C)/2),P=O-1,R=v(P),D=$7(R,2),M=D[0],A=D[1],_=v(O),N=$7(_,1),B=N[0];if(!M&&!B&&(w=O+1),M&&B&&(C=O-1),!M&&B){I=A;break}E++}return I||m},L7=function(t){var n=an(t)?[]:t.toString().split(dae);return[{words:n}]},SHe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!rd.isSsr){var l,c,u=fae({breakAll:a,children:o,style:i});if(u){var f=u.wordsWithComputedWidth,p=u.spaceWidth;l=f,c=p}else return L7(o);return xHe({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return L7(o)},F7="#808080",Eh=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,f=u===void 0?!1:u,p=t.textAnchor,m=p===void 0?"start":p,g=t.verticalAnchor,y=g===void 0?"end":g,v=t.fill,w=v===void 0?F7:v,C=_7(t,pHe),E=x.useMemo(function(){return SHe({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:f,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,f,C.style,C.width]),I=C.dx,O=C.dy,P=C.angle,R=C.className,D=C.breakAll,M=_7(C,hHe);if(!Ho(r)||!Ho(i))return null;var A=r+(mt(I)?I:0),_=i+(mt(O)?O:0),N;switch(y){case"start":N=a_("calc(".concat(c,")"));break;case"middle":N=a_("calc(".concat((E.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=a_("calc(".concat(E.length-1," * -").concat(s,")"));break}var B=[];if(f){var H=E[0].width,j=C.width;B.push("scale(".concat((mt(j)?j/H:1)/H,")"))}return P&&B.push("rotate(".concat(P,", ").concat(A,", ").concat(_,")")),B.length&&(M.transform=B.join(" ")),J.createElement("text",DL({},zt(M,!0),{x:A,y:_,className:fe("recharts-text",R),textAnchor:m,fill:w.includes("url")?F7:w}),E.map(function(L,V){var W=L.words.join(D?"":" ");return J.createElement("tspan",{x:A,dy:V===0?N:s,key:"".concat(W,"-").concat(V)},W)}))};function bf(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wHe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fz(e){let t,n,r;e.length!==2?(t=bf,n=(s,l)=>bf(e(s),l),r=(s,l)=>e(s)-l):(t=e===bf||e===wHe?e:CHe,n=e,r=e);function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){const f=o(s,l,c,u-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function CHe(){return 0}function pae(e){return e===null?NaN:+e}function*EHe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const THe=fz(bf),Sw=THe.right;fz(pae).center;class j7 extends Map{constructor(t,n=PHe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(B7(this,t))}has(t){return super.has(B7(this,t))}set(t,n){return super.set(OHe(this,t),n)}delete(t){return super.delete(IHe(this,t))}}function B7({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function OHe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function IHe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function PHe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function AHe(e=bf){if(e===bf)return hae;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function hae(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const MHe=Math.sqrt(50),RHe=Math.sqrt(10),DHe=Math.sqrt(2);function ET(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=MHe?10:i>=RHe?5:i>=DHe?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?ET(e,t,n*2):[s,l,c]}function kL(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,i,a]=r?ET(t,e,n):ET(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(i-c)/-a;else for(let c=0;c<s;++c)l[c]=(i-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(o+c)/-a;else for(let c=0;c<s;++c)l[c]=(o+c)*a;return l}function _L(e,t,n){return t=+t,e=+e,n=+n,ET(e,t,n)[2]}function $L(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?_L(t,e,n):_L(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function z7(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function V7(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function mae(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?hae:AHe(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(t-c*f/l+p)),g=Math.min(r,Math.floor(t+(l-c)*f/l+p));mae(e,t,m,g,o)}const i=e[t];let a=n,s=r;for(o0(e,n,t),o(e[r],i)>0&&o0(e,n,r);a<s;){for(o0(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[n],i)===0?o0(e,n,s):(++s,o0(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function o0(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function kHe(e,t,n){if(e=Float64Array.from(EHe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return V7(e);if(t>=1)return z7(e);var r,o=(r-1)*t,i=Math.floor(o),a=z7(mae(e,i).subarray(0,i+1)),s=V7(e.subarray(i+1));return a+(s-a)*(o-i)}}function _He(e,t,n=pae){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function $He(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function dl(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function id(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const NL=Symbol("implicit");function pz(){var e=new j7,t=[],n=[],r=NL;function o(i){let a=e.get(i);if(a===void 0){if(r!==NL)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new j7;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return pz(t,n).unknown(r)},dl.apply(o,arguments),o}function Ux(){var e=pz().unknown(void 0),t=e.domain,n=e.range,r=0,o=1,i,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function f(){var p=t().length,m=o<r,g=m?o:r,y=m?r:o;i=(y-g)/Math.max(1,p-l+c*2),s&&(i=Math.floor(i)),g+=(y-g-i*(p-l))*u,a=i*(1-l),s&&(g=Math.round(g),a=Math.round(a));var v=$He(p).map(function(w){return g+i*w});return n(m?v.reverse():v)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([r,o]=p,r=+r,o=+o,f()):[r,o]},e.rangeRound=function(p){return[r,o]=p,r=+r,o=+o,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(p){return arguments.length?(s=!!p,f()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,c=+p),f()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),f()):l},e.paddingOuter=function(p){return arguments.length?(c=+p,f()):c},e.align=function(p){return arguments.length?(u=Math.max(0,Math.min(1,p)),f()):u},e.copy=function(){return Ux(t(),[r,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},dl.apply(f(),arguments)}function gae(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return gae(t())},e}function nx(){return gae(Ux.apply(null,arguments).paddingInner(1))}function hz(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function yae(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ww(){}var Gx=.7,TT=1/Gx,Bg="\\s*([+-]?\\d+)\\s*",qx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NHe=/^#([0-9a-f]{3,8})$/,LHe=new RegExp(`^rgb\\(${Bg},${Bg},${Bg}\\)$`),FHe=new RegExp(`^rgb\\(${Pc},${Pc},${Pc}\\)$`),jHe=new RegExp(`^rgba\\(${Bg},${Bg},${Bg},${qx}\\)$`),BHe=new RegExp(`^rgba\\(${Pc},${Pc},${Pc},${qx}\\)$`),zHe=new RegExp(`^hsl\\(${qx},${Pc},${Pc}\\)$`),VHe=new RegExp(`^hsla\\(${qx},${Pc},${Pc},${qx}\\)$`),H7={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hz(ww,Wx,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:U7,formatHex:U7,formatHex8:HHe,formatHsl:UHe,formatRgb:G7,toString:G7});function U7(){return this.rgb().formatHex()}function HHe(){return this.rgb().formatHex8()}function UHe(){return vae(this).formatHsl()}function G7(){return this.rgb().formatRgb()}function Wx(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=NHe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?q7(t):n===3?new wa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?F1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?F1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=LHe.exec(e))?new wa(t[1],t[2],t[3],1):(t=FHe.exec(e))?new wa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jHe.exec(e))?F1(t[1],t[2],t[3],t[4]):(t=BHe.exec(e))?F1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zHe.exec(e))?Y7(t[1],t[2]/100,t[3]/100,1):(t=VHe.exec(e))?Y7(t[1],t[2]/100,t[3]/100,t[4]):H7.hasOwnProperty(e)?q7(H7[e]):e==="transparent"?new wa(NaN,NaN,NaN,0):null}function q7(e){return new wa(e>>16&255,e>>8&255,e&255,1)}function F1(e,t,n,r){return r<=0&&(e=t=n=NaN),new wa(e,t,n,r)}function GHe(e){return e instanceof ww||(e=Wx(e)),e?(e=e.rgb(),new wa(e.r,e.g,e.b,e.opacity)):new wa}function LL(e,t,n,r){return arguments.length===1?GHe(e):new wa(e,t,n,r??1)}function wa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}hz(wa,LL,yae(ww,{brighter(e){return e=e==null?TT:Math.pow(TT,e),new wa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gx:Math.pow(Gx,e),new wa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wa(ah(this.r),ah(this.g),ah(this.b),OT(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:W7,formatHex:W7,formatHex8:qHe,formatRgb:K7,toString:K7}));function W7(){return`#${Hp(this.r)}${Hp(this.g)}${Hp(this.b)}`}function qHe(){return`#${Hp(this.r)}${Hp(this.g)}${Hp(this.b)}${Hp((isNaN(this.opacity)?1:this.opacity)*255)}`}function K7(){const e=OT(this.opacity);return`${e===1?"rgb(":"rgba("}${ah(this.r)}, ${ah(this.g)}, ${ah(this.b)}${e===1?")":`, ${e})`}`}function OT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ah(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hp(e){return e=ah(e),(e<16?"0":"")+e.toString(16)}function Y7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _l(e,t,n,r)}function vae(e){if(e instanceof _l)return new _l(e.h,e.s,e.l,e.opacity);if(e instanceof ww||(e=Wx(e)),!e)return new _l;if(e instanceof _l)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n<r)*6:n===i?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new _l(a,s,l,e.opacity)}function WHe(e,t,n,r){return arguments.length===1?vae(e):new _l(e,t,n,r??1)}function _l(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}hz(_l,WHe,yae(ww,{brighter(e){return e=e==null?TT:Math.pow(TT,e),new _l(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gx:Math.pow(Gx,e),new _l(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new wa(s_(e>=240?e-240:e+120,o,r),s_(e,o,r),s_(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new _l(Q7(this.h),j1(this.s),j1(this.l),OT(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=OT(this.opacity);return`${e===1?"hsl(":"hsla("}${Q7(this.h)}, ${j1(this.s)*100}%, ${j1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Q7(e){return e=(e||0)%360,e<0?e+360:e}function j1(e){return Math.max(0,Math.min(1,e||0))}function s_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const mz=e=>()=>e;function KHe(e,t){return function(n){return e+n*t}}function YHe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function QHe(e){return(e=+e)==1?bae:function(t,n){return n-t?YHe(t,n,e):mz(isNaN(t)?n:t)}}function bae(e,t){var n=t-e;return n?KHe(e,n):mz(isNaN(e)?t:e)}const X7=function e(t){var n=QHe(t);function r(o,i){var a=n((o=LL(o)).r,(i=LL(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=bae(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function XHe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function JHe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ZHe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=Tv(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<r;++a)i[a]=o[a](s);return i}}function e5e(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function IT(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function t5e(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Tv(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var FL=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,l_=new RegExp(FL.source,"g");function n5e(e){return function(){return e}}function r5e(e){return function(t){return e(t)+""}}function o5e(e,t){var n=FL.lastIndex=l_.lastIndex=0,r,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=FL.exec(e))&&(o=l_.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:IT(r,o)})),n=l_.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?r5e(l[0].x):n5e(t):(t=l.length,function(c){for(var u=0,f;u<t;++u)s[(f=l[u]).i]=f.x(c);return s.join("")})}function Tv(e,t){var n=typeof t,r;return t==null||n==="boolean"?mz(t):(n==="number"?IT:n==="string"?(r=Wx(t))?(t=r,X7):o5e:t instanceof Wx?X7:t instanceof Date?e5e:JHe(t)?XHe:Array.isArray(t)?ZHe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?t5e:IT)(e,t)}function gz(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function i5e(e,t){t===void 0&&(t=e,e=Tv);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[s](a-s)}}function a5e(e){return function(){return e}}function PT(e){return+e}var J7=[0,1];function ra(e){return e}function jL(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:a5e(isNaN(t)?NaN:.5)}function s5e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function l5e(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=jL(o,r),i=n(a,i)):(r=jL(r,o),i=n(i,a)),function(s){return i(r(s))}}function c5e(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=jL(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(s){var l=Sw(e,s,1,r)-1;return i[l](o[l](s))}}function Cw(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function KI(){var e=J7,t=J7,n=Tv,r,o,i,a=ra,s,l,c;function u(){var p=Math.min(e.length,t.length);return a!==ra&&(a=s5e(e[0],e[p-1])),s=p>2?c5e:l5e,l=c=null,f}function f(p){return p==null||isNaN(p=+p)?i:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return f.invert=function(p){return a(o((c||(c=s(t,e.map(r),IT)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,PT),u()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),u()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=gz,u()},f.clamp=function(p){return arguments.length?(a=p?!0:ra,u()):a!==ra},f.interpolate=function(p){return arguments.length?(n=p,u()):n},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,m){return r=p,o=m,u()}}function yz(){return KI()(ra,ra)}function u5e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function AT(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function vy(e){return e=AT(Math.abs(e)),e?e[1]:NaN}function d5e(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function f5e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var p5e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kx(e){if(!(t=p5e.exec(e)))throw new Error("invalid format: "+e);var t;return new vz({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kx.prototype=vz.prototype;function vz(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}vz.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function h5e(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var xae;function m5e(e,t){var n=AT(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(xae=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+AT(e,Math.max(0,t+i-1))[0]}function Z7(e,t){var n=AT(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const eK={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:u5e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Z7(e*100,t),r:Z7,s:m5e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tK(e){return e}var nK=Array.prototype.map,rK=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function g5e(e){var t=e.grouping===void 0||e.thousands===void 0?tK:d5e(nK.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?tK:f5e(nK.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Kx(f);var p=f.fill,m=f.align,g=f.sign,y=f.symbol,v=f.zero,w=f.width,C=f.comma,E=f.precision,I=f.trim,O=f.type;O==="n"?(C=!0,O="g"):eK[O]||(E===void 0&&(E=12),I=!0,O="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var P=y==="$"?n:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",R=y==="$"?r:/[%p]/.test(O)?a:"",D=eK[O],M=/[defgprs%]/.test(O);E=E===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function A(_){var N=P,B=R,H,j,L;if(O==="c")B=D(_)+B,_="";else{_=+_;var V=_<0||1/_<0;if(_=isNaN(_)?l:D(Math.abs(_),E),I&&(_=h5e(_)),V&&+_==0&&g!=="+"&&(V=!1),N=(V?g==="("?g:s:g==="-"||g==="("?"":g)+N,B=(O==="s"?rK[8+xae/3]:"")+B+(V&&g==="("?")":""),M){for(H=-1,j=_.length;++H<j;)if(L=_.charCodeAt(H),48>L||L>57){B=(L===46?o+_.slice(H+1):_.slice(H))+B,_=_.slice(0,H);break}}}C&&!v&&(_=t(_,1/0));var W=N.length+_.length+B.length,K=W<w?new Array(w-W+1).join(p):"";switch(C&&v&&(_=t(K+_,K.length?w-B.length:1/0),K=""),m){case"<":_=N+_+B+K;break;case"=":_=N+K+_+B;break;case"^":_=K.slice(0,W=K.length>>1)+N+_+B+K.slice(W);break;default:_=K+N+_+B;break}return i(_)}return A.toString=function(){return f+""},A}function u(f,p){var m=c((f=Kx(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(vy(p)/3)))*3,y=Math.pow(10,-g),v=rK[8+g/3];return function(w){return m(y*w)+v}}return{format:c,formatPrefix:u}}var B1,bz,Sae;y5e({thousands:",",grouping:[3],currency:["$",""]});function y5e(e){return B1=g5e(e),bz=B1.format,Sae=B1.formatPrefix,B1}function v5e(e){return Math.max(0,-vy(Math.abs(e)))}function b5e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vy(t)/3)))*3-vy(Math.abs(e)))}function x5e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vy(t)-vy(e))+1}function wae(e,t,n,r){var o=$L(e,t,n),i;switch(r=Kx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=b5e(o,a))&&(r.precision=i),Sae(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=x5e(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=v5e(o))&&(r.precision=i-(r.type==="%")*2);break}}return bz(r)}function Hf(e){var t=e.domain;return e.ticks=function(n){var r=t();return kL(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return wae(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=o,o=i,i=c);u-- >0;){if(c=_L(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function MT(){var e=yz();return e.copy=function(){return Cw(e,MT())},dl.apply(e,arguments),Hf(e)}function Cae(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,PT),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Cae(e).unknown(t)},e=arguments.length?Array.from(e,PT):[0,1],Hf(n)}function Eae(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),e[n]=t.floor(o),e[r]=t.ceil(i),e}function oK(e){return Math.log(e)}function iK(e){return Math.exp(e)}function S5e(e){return-Math.log(-e)}function w5e(e){return-Math.exp(-e)}function C5e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function E5e(e){return e===10?C5e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function T5e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function aK(e){return(t,n)=>-e(-t,n)}function xz(e){const t=e(oK,iK),n=t.domain;let r=10,o,i;function a(){return o=T5e(r),i=E5e(r),n()[0]<0?(o=aK(o),i=aK(i),e(S5e,w5e)):e(oK,iK),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let p=o(c),m=o(u),g,y;const v=s==null?10:+s;let w=[];if(!(r%1)&&m-p<v){if(p=Math.floor(p),m=Math.ceil(m),c>0){for(;p<=m;++p)for(g=1;g<r;++g)if(y=p<0?g/i(-p):g*i(p),!(y<c)){if(y>u)break;w.push(y)}}else for(;p<=m;++p)for(g=r-1;g>=1;--g)if(y=p>0?g/i(-p):g*i(p),!(y<c)){if(y>u)break;w.push(y)}w.length*2<v&&(w=kL(c,u,v))}else w=kL(p,m,Math.min(m-p,v)).map(i);return f?w.reverse():w},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kx(l)).precision==null&&(l.trim=!0),l=bz(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*r<r-.5&&(f*=r),f<=c?l(u):""}},t.nice=()=>n(Eae(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function Tae(){const e=xz(KI()).domain([1,10]);return e.copy=()=>Cw(e,Tae()).base(e.base()),dl.apply(e,arguments),e}function sK(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function lK(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Sz(e){var t=1,n=e(sK(t),lK(t));return n.constant=function(r){return arguments.length?e(sK(t=+r),lK(t)):t},Hf(n)}function Oae(){var e=Sz(KI());return e.copy=function(){return Cw(e,Oae()).constant(e.constant())},dl.apply(e,arguments)}function cK(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function O5e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function I5e(e){return e<0?-e*e:e*e}function wz(e){var t=e(ra,ra),n=1;function r(){return n===1?e(ra,ra):n===.5?e(O5e,I5e):e(cK(n),cK(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Hf(t)}function Cz(){var e=wz(KI());return e.copy=function(){return Cw(e,Cz()).exponent(e.exponent())},dl.apply(e,arguments),e}function P5e(){return Cz.apply(null,arguments).exponent(.5)}function uK(e){return Math.sign(e)*e*e}function A5e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Iae(){var e=yz(),t=[0,1],n=!1,r;function o(i){var a=A5e(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(uK(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,PT)).map(uK)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return Iae(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},dl.apply(o,arguments),Hf(o)}function Pae(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=_He(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?r:t[Sw(n,a)]}return i.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},i.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(bf),o()},i.range=function(a){return arguments.length?(t=Array.from(a),o()):t.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Pae().domain(e).range(t).unknown(r)},dl.apply(i,arguments)}function Aae(){var e=0,t=1,n=1,r=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[Sw(r,l,0,n)]:i}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(o=Array.from(l)).length-1,s()):o.slice()},a.invertExtent=function(l){var c=o.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Aae().domain([e,t]).range(o).unknown(i)},dl.apply(Hf(a),arguments)}function Mae(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[Sw(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Mae().domain(e).range(t).unknown(n)},dl.apply(o,arguments)}const c_=new Date,u_=new Date;function Yo(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<a);return l},o.filter=i=>Yo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(c_.setTime(+i),u_.setTime(+a),e(c_),e(u_),Math.floor(n(c_,u_))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const RT=Yo(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);RT.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yo(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):RT);RT.range;const Mu=1e3,Hs=Mu*60,Ru=Hs*60,Ku=Ru*24,Ez=Ku*7,dK=Ku*30,d_=Ku*365,Up=Yo(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Mu)},(e,t)=>(t-e)/Mu,e=>e.getUTCSeconds());Up.range;const Tz=Yo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mu)},(e,t)=>{e.setTime(+e+t*Hs)},(e,t)=>(t-e)/Hs,e=>e.getMinutes());Tz.range;const Oz=Yo(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Hs)},(e,t)=>(t-e)/Hs,e=>e.getUTCMinutes());Oz.range;const Iz=Yo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mu-e.getMinutes()*Hs)},(e,t)=>{e.setTime(+e+t*Ru)},(e,t)=>(t-e)/Ru,e=>e.getHours());Iz.range;const Pz=Yo(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ru)},(e,t)=>(t-e)/Ru,e=>e.getUTCHours());Pz.range;const Ew=Yo(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hs)/Ku,e=>e.getDate()-1);Ew.range;const YI=Yo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ku,e=>e.getUTCDate()-1);YI.range;const Rae=Yo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ku,e=>Math.floor(e/Ku));Rae.range;function Uh(e){return Yo(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Hs)/Ez)}const QI=Uh(0),DT=Uh(1),M5e=Uh(2),R5e=Uh(3),by=Uh(4),D5e=Uh(5),k5e=Uh(6);QI.range;DT.range;M5e.range;R5e.range;by.range;D5e.range;k5e.range;function Gh(e){return Yo(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Ez)}const XI=Gh(0),kT=Gh(1),_5e=Gh(2),$5e=Gh(3),xy=Gh(4),N5e=Gh(5),L5e=Gh(6);XI.range;kT.range;_5e.range;$5e.range;xy.range;N5e.range;L5e.range;const Az=Yo(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Az.range;const Mz=Yo(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Mz.range;const Yu=Yo(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Yu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yo(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Yu.range;const Qu=Yo(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Qu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yo(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Qu.range;function Dae(e,t,n,r,o,i){const a=[[Up,1,Mu],[Up,5,5*Mu],[Up,15,15*Mu],[Up,30,30*Mu],[i,1,Hs],[i,5,5*Hs],[i,15,15*Hs],[i,30,30*Hs],[o,1,Ru],[o,3,3*Ru],[o,6,6*Ru],[o,12,12*Ru],[r,1,Ku],[r,2,2*Ku],[n,1,Ez],[t,1,dK],[t,3,3*dK],[e,1,d_]];function s(c,u,f){const p=u<c;p&&([c,u]=[u,c]);const m=f&&typeof f.range=="function"?f:l(c,u,f),g=m?m.range(c,+u+1):[];return p?g.reverse():g}function l(c,u,f){const p=Math.abs(u-c)/f,m=fz(([,,v])=>v).right(a,p);if(m===a.length)return e.every($L(c/d_,u/d_,f));if(m===0)return RT.every(Math.max($L(c,u,f),1));const[g,y]=a[p/a[m-1][2]<a[m][2]/p?m-1:m];return g.every(y)}return[s,l]}const[F5e,j5e]=Dae(Qu,Mz,XI,Rae,Pz,Oz),[B5e,z5e]=Dae(Yu,Az,QI,Ew,Iz,Tz);function f_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function p_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i0(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function V5e(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=a0(o),u=s0(o),f=a0(i),p=s0(i),m=a0(a),g=s0(a),y=a0(s),v=s0(s),w=a0(l),C=s0(l),E={a:V,A:W,b:K,B:G,c:null,d:yK,e:yK,f:dUe,g:SUe,G:CUe,H:lUe,I:cUe,j:uUe,L:kae,m:fUe,M:pUe,p:q,q:Y,Q:xK,s:SK,S:hUe,u:mUe,U:gUe,V:yUe,w:vUe,W:bUe,x:null,X:null,y:xUe,Y:wUe,Z:EUe,"%":bK},I={a:Z,A:ie,b:se,B:ce,c:null,d:vK,e:vK,f:PUe,g:FUe,G:BUe,H:TUe,I:OUe,j:IUe,L:$ae,m:AUe,M:MUe,p:ye,q:Se,Q:xK,s:SK,S:RUe,u:DUe,U:kUe,V:_Ue,w:$Ue,W:NUe,x:null,X:null,y:LUe,Y:jUe,Z:zUe,"%":bK},O={a:A,A:_,b:N,B,c:H,d:mK,e:mK,f:oUe,g:hK,G:pK,H:gK,I:gK,j:eUe,L:rUe,m:Z5e,M:tUe,p:M,q:J5e,Q:aUe,s:sUe,S:nUe,u:W5e,U:K5e,V:Y5e,w:q5e,W:Q5e,x:j,X:L,y:hK,Y:pK,Z:X5e,"%":iUe};E.x=P(n,E),E.X=P(r,E),E.c=P(t,E),I.x=P(n,I),I.X=P(r,I),I.c=P(t,I);function P(ne,le){return function(de){var oe=[],ue=-1,pe=0,Ee=ne.length,xe,Re,he;for(de instanceof Date||(de=new Date(+de));++ue<Ee;)ne.charCodeAt(ue)===37&&(oe.push(ne.slice(pe,ue)),(Re=fK[xe=ne.charAt(++ue)])!=null?xe=ne.charAt(++ue):Re=xe==="e"?" ":"0",(he=le[xe])&&(xe=he(de,Re)),oe.push(xe),pe=ue+1);return oe.push(ne.slice(pe,ue)),oe.join("")}}function R(ne,le){return function(de){var oe=i0(1900,void 0,1),ue=D(oe,ne,de+="",0),pe,Ee;if(ue!=de.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(oe.s*1e3+("L"in oe?oe.L:0));if(le&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+oe.p*12),oe.m===void 0&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?(pe=p_(i0(oe.y,0,1)),Ee=pe.getUTCDay(),pe=Ee>4||Ee===0?kT.ceil(pe):kT(pe),pe=YI.offset(pe,(oe.V-1)*7),oe.y=pe.getUTCFullYear(),oe.m=pe.getUTCMonth(),oe.d=pe.getUTCDate()+(oe.w+6)%7):(pe=f_(i0(oe.y,0,1)),Ee=pe.getDay(),pe=Ee>4||Ee===0?DT.ceil(pe):DT(pe),pe=Ew.offset(pe,(oe.V-1)*7),oe.y=pe.getFullYear(),oe.m=pe.getMonth(),oe.d=pe.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),Ee="Z"in oe?p_(i0(oe.y,0,1)).getUTCDay():f_(i0(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(Ee+5)%7:oe.w+oe.U*7-(Ee+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,p_(oe)):f_(oe)}}function D(ne,le,de,oe){for(var ue=0,pe=le.length,Ee=de.length,xe,Re;ue<pe;){if(oe>=Ee)return-1;if(xe=le.charCodeAt(ue++),xe===37){if(xe=le.charAt(ue++),Re=O[xe in fK?le.charAt(ue++):xe],!Re||(oe=Re(ne,de,oe))<0)return-1}else if(xe!=de.charCodeAt(oe++))return-1}return oe}function M(ne,le,de){var oe=c.exec(le.slice(de));return oe?(ne.p=u.get(oe[0].toLowerCase()),de+oe[0].length):-1}function A(ne,le,de){var oe=m.exec(le.slice(de));return oe?(ne.w=g.get(oe[0].toLowerCase()),de+oe[0].length):-1}function _(ne,le,de){var oe=f.exec(le.slice(de));return oe?(ne.w=p.get(oe[0].toLowerCase()),de+oe[0].length):-1}function N(ne,le,de){var oe=w.exec(le.slice(de));return oe?(ne.m=C.get(oe[0].toLowerCase()),de+oe[0].length):-1}function B(ne,le,de){var oe=y.exec(le.slice(de));return oe?(ne.m=v.get(oe[0].toLowerCase()),de+oe[0].length):-1}function H(ne,le,de){return D(ne,t,le,de)}function j(ne,le,de){return D(ne,n,le,de)}function L(ne,le,de){return D(ne,r,le,de)}function V(ne){return a[ne.getDay()]}function W(ne){return i[ne.getDay()]}function K(ne){return l[ne.getMonth()]}function G(ne){return s[ne.getMonth()]}function q(ne){return o[+(ne.getHours()>=12)]}function Y(ne){return 1+~~(ne.getMonth()/3)}function Z(ne){return a[ne.getUTCDay()]}function ie(ne){return i[ne.getUTCDay()]}function se(ne){return l[ne.getUTCMonth()]}function ce(ne){return s[ne.getUTCMonth()]}function ye(ne){return o[+(ne.getUTCHours()>=12)]}function Se(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var le=P(ne+="",E);return le.toString=function(){return ne},le},parse:function(ne){var le=R(ne+="",!1);return le.toString=function(){return ne},le},utcFormat:function(ne){var le=P(ne+="",I);return le.toString=function(){return ne},le},utcParse:function(ne){var le=R(ne+="",!0);return le.toString=function(){return ne},le}}}var fK={"-":"",_:" ",0:"0"},fi=/^\s*\d+/,H5e=/^%/,U5e=/[\\^$*+?|[\]().{}]/g;function tr(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function G5e(e){return e.replace(U5e,"\\$&")}function a0(e){return new RegExp("^(?:"+e.map(G5e).join("|")+")","i")}function s0(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function q5e(e,t,n){var r=fi.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function W5e(e,t,n){var r=fi.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function K5e(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Y5e(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Q5e(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function pK(e,t,n){var r=fi.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hK(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function X5e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function J5e(e,t,n){var r=fi.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Z5e(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function mK(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function eUe(e,t,n){var r=fi.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function gK(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tUe(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nUe(e,t,n){var r=fi.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rUe(e,t,n){var r=fi.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function oUe(e,t,n){var r=fi.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iUe(e,t,n){var r=H5e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aUe(e,t,n){var r=fi.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function sUe(e,t,n){var r=fi.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function yK(e,t){return tr(e.getDate(),t,2)}function lUe(e,t){return tr(e.getHours(),t,2)}function cUe(e,t){return tr(e.getHours()%12||12,t,2)}function uUe(e,t){return tr(1+Ew.count(Yu(e),e),t,3)}function kae(e,t){return tr(e.getMilliseconds(),t,3)}function dUe(e,t){return kae(e,t)+"000"}function fUe(e,t){return tr(e.getMonth()+1,t,2)}function pUe(e,t){return tr(e.getMinutes(),t,2)}function hUe(e,t){return tr(e.getSeconds(),t,2)}function mUe(e){var t=e.getDay();return t===0?7:t}function gUe(e,t){return tr(QI.count(Yu(e)-1,e),t,2)}function _ae(e){var t=e.getDay();return t>=4||t===0?by(e):by.ceil(e)}function yUe(e,t){return e=_ae(e),tr(by.count(Yu(e),e)+(Yu(e).getDay()===4),t,2)}function vUe(e){return e.getDay()}function bUe(e,t){return tr(DT.count(Yu(e)-1,e),t,2)}function xUe(e,t){return tr(e.getFullYear()%100,t,2)}function SUe(e,t){return e=_ae(e),tr(e.getFullYear()%100,t,2)}function wUe(e,t){return tr(e.getFullYear()%1e4,t,4)}function CUe(e,t){var n=e.getDay();return e=n>=4||n===0?by(e):by.ceil(e),tr(e.getFullYear()%1e4,t,4)}function EUe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+tr(t/60|0,"0",2)+tr(t%60,"0",2)}function vK(e,t){return tr(e.getUTCDate(),t,2)}function TUe(e,t){return tr(e.getUTCHours(),t,2)}function OUe(e,t){return tr(e.getUTCHours()%12||12,t,2)}function IUe(e,t){return tr(1+YI.count(Qu(e),e),t,3)}function $ae(e,t){return tr(e.getUTCMilliseconds(),t,3)}function PUe(e,t){return $ae(e,t)+"000"}function AUe(e,t){return tr(e.getUTCMonth()+1,t,2)}function MUe(e,t){return tr(e.getUTCMinutes(),t,2)}function RUe(e,t){return tr(e.getUTCSeconds(),t,2)}function DUe(e){var t=e.getUTCDay();return t===0?7:t}function kUe(e,t){return tr(XI.count(Qu(e)-1,e),t,2)}function Nae(e){var t=e.getUTCDay();return t>=4||t===0?xy(e):xy.ceil(e)}function _Ue(e,t){return e=Nae(e),tr(xy.count(Qu(e),e)+(Qu(e).getUTCDay()===4),t,2)}function $Ue(e){return e.getUTCDay()}function NUe(e,t){return tr(kT.count(Qu(e)-1,e),t,2)}function LUe(e,t){return tr(e.getUTCFullYear()%100,t,2)}function FUe(e,t){return e=Nae(e),tr(e.getUTCFullYear()%100,t,2)}function jUe(e,t){return tr(e.getUTCFullYear()%1e4,t,4)}function BUe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?xy(e):xy.ceil(e),tr(e.getUTCFullYear()%1e4,t,4)}function zUe(){return"+0000"}function bK(){return"%"}function xK(e){return+e}function SK(e){return Math.floor(+e/1e3)}var Jm,Lae,Fae;VUe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function VUe(e){return Jm=V5e(e),Lae=Jm.format,Jm.parse,Fae=Jm.utcFormat,Jm.utcParse,Jm}function HUe(e){return new Date(e)}function UUe(e){return e instanceof Date?+e:+new Date(+e)}function Rz(e,t,n,r,o,i,a,s,l,c){var u=yz(),f=u.invert,p=u.domain,m=c(".%L"),g=c(":%S"),y=c("%I:%M"),v=c("%I %p"),w=c("%a %d"),C=c("%b %d"),E=c("%B"),I=c("%Y");function O(P){return(l(P)<P?m:s(P)<P?g:a(P)<P?y:i(P)<P?v:r(P)<P?o(P)<P?w:C:n(P)<P?E:I)(P)}return u.invert=function(P){return new Date(f(P))},u.domain=function(P){return arguments.length?p(Array.from(P,UUe)):p().map(HUe)},u.ticks=function(P){var R=p();return e(R[0],R[R.length-1],P??10)},u.tickFormat=function(P,R){return R==null?O:c(R)},u.nice=function(P){var R=p();return(!P||typeof P.range!="function")&&(P=t(R[0],R[R.length-1],P??10)),P?p(Eae(R,P)):u},u.copy=function(){return Cw(u,Rz(e,t,n,r,o,i,a,s,l,c))},u}function GUe(){return dl.apply(Rz(B5e,z5e,Yu,Az,QI,Ew,Iz,Tz,Up,Lae).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function qUe(){return dl.apply(Rz(F5e,j5e,Qu,Mz,XI,YI,Pz,Oz,Up,Fae).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function JI(){var e=0,t=1,n,r,o,i,a=ra,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:a(o===0?.5:(f=(i(f)-n)*o,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),o=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(a=f,c):a};function u(f){return function(p){var m,g;return arguments.length?([m,g]=p,a=f(m,g),c):[a(0),a(1)]}}return c.range=u(Tv),c.rangeRound=u(gz),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return i=f,n=f(e),r=f(t),o=n===r?0:1/(r-n),c}}function Uf(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function jae(){var e=Hf(JI()(ra));return e.copy=function(){return Uf(e,jae())},id.apply(e,arguments)}function Bae(){var e=xz(JI()).domain([1,10]);return e.copy=function(){return Uf(e,Bae()).base(e.base())},id.apply(e,arguments)}function zae(){var e=Sz(JI());return e.copy=function(){return Uf(e,zae()).constant(e.constant())},id.apply(e,arguments)}function Dz(){var e=wz(JI());return e.copy=function(){return Uf(e,Dz()).exponent(e.exponent())},id.apply(e,arguments)}function WUe(){return Dz.apply(null,arguments).exponent(.5)}function Vae(){var e=[],t=ra;function n(r){if(r!=null&&!isNaN(r=+r))return t((Sw(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let o of r)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(bf),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,o)=>t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>kHe(e,i/r))},n.copy=function(){return Vae(t).domain(e)},id.apply(n,arguments)}function ZI(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=ra,u,f=!1,p;function m(y){return isNaN(y=+y)?p:(y=.5+((y=+u(y))-i)*(r*y<r*i?s:l),c(f?Math.max(0,Math.min(1,y)):y))}m.domain=function(y){return arguments.length?([e,t,n]=y,o=u(e=+e),i=u(t=+t),a=u(n=+n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m):[e,t,n]},m.clamp=function(y){return arguments.length?(f=!!y,m):f},m.interpolator=function(y){return arguments.length?(c=y,m):c};function g(y){return function(v){var w,C,E;return arguments.length?([w,C,E]=v,c=i5e(y,[w,C,E]),m):[c(0),c(.5),c(1)]}}return m.range=g(Tv),m.rangeRound=g(gz),m.unknown=function(y){return arguments.length?(p=y,m):p},function(y){return u=y,o=y(e),i=y(t),a=y(n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m}}function Hae(){var e=Hf(ZI()(ra));return e.copy=function(){return Uf(e,Hae())},id.apply(e,arguments)}function Uae(){var e=xz(ZI()).domain([.1,1,10]);return e.copy=function(){return Uf(e,Uae()).base(e.base())},id.apply(e,arguments)}function Gae(){var e=Sz(ZI());return e.copy=function(){return Uf(e,Gae()).constant(e.constant())},id.apply(e,arguments)}function kz(){var e=wz(ZI());return e.copy=function(){return Uf(e,kz()).exponent(e.exponent())},id.apply(e,arguments)}function KUe(){return kz.apply(null,arguments).exponent(.5)}const wK=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ux,scaleDiverging:Hae,scaleDivergingLog:Uae,scaleDivergingPow:kz,scaleDivergingSqrt:KUe,scaleDivergingSymlog:Gae,scaleIdentity:Cae,scaleImplicit:NL,scaleLinear:MT,scaleLog:Tae,scaleOrdinal:pz,scalePoint:nx,scalePow:Cz,scaleQuantile:Pae,scaleQuantize:Aae,scaleRadial:Iae,scaleSequential:jae,scaleSequentialLog:Bae,scaleSequentialPow:Dz,scaleSequentialQuantile:Vae,scaleSequentialSqrt:WUe,scaleSequentialSymlog:zae,scaleSqrt:P5e,scaleSymlog:Oae,scaleThreshold:Mae,scaleTime:GUe,scaleUtc:qUe,tickFormat:wae},Symbol.toStringTag,{value:"Module"}));var h_,CK;function eP(){if(CK)return h_;CK=1;var e=xv();function t(n,r,o){for(var i=-1,a=n.length;++i<a;){var s=n[i],l=r(s);if(l!=null&&(c===void 0?l===l&&!e(l):o(l,c)))var c=l,u=s}return u}return h_=t,h_}var m_,EK;function qae(){if(EK)return m_;EK=1;function e(t,n){return t>n}return m_=e,m_}var g_,TK;function YUe(){if(TK)return g_;TK=1;var e=eP(),t=qae(),n=Cv();function r(o){return o&&o.length?e(o,n,t):void 0}return g_=r,g_}var QUe=YUe();const hf=Gn(QUe);var y_,OK;function Wae(){if(OK)return y_;OK=1;function e(t,n){return t<n}return y_=e,y_}var v_,IK;function XUe(){if(IK)return v_;IK=1;var e=eP(),t=Wae(),n=Cv();function r(o){return o&&o.length?e(o,n,t):void 0}return v_=r,v_}var JUe=XUe();const tP=Gn(JUe);var b_,PK;function ZUe(){if(PK)return b_;PK=1;var e=QB(),t=Gc(),n=eae(),r=Aa();function o(i,a){var s=r(i)?e:n;return s(i,t(a,3))}return b_=o,b_}var x_,AK;function e4e(){if(AK)return x_;AK=1;var e=Jie(),t=ZUe();function n(r,o){return e(t(r,o),1)}return x_=n,x_}var t4e=e4e();const n4e=Gn(t4e);var S_,MK;function r4e(){if(MK)return S_;MK=1;var e=lz();function t(n,r){return e(n,r)}return S_=t,S_}var o4e=r4e();const Mf=Gn(o4e);var Ov=1e9,i4e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},$z,Kr=!0,il="[DecimalError] ",sh=il+"Invalid argument: ",_z=il+"Exponent out of range: ",Iv=Math.floor,Dp=Math.pow,a4e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wa,ni=1e7,zr=7,Kae=9007199254740991,_T=Iv(Kae/zr),jt={};jt.absoluteValue=jt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};jt.comparedTo=jt.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=r<o?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};jt.decimalPlaces=jt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*zr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};jt.dividedBy=jt.div=function(e){return $u(this,new this.constructor(e))};jt.dividedToIntegerBy=jt.idiv=function(e){var t=this,n=t.constructor;return Ar($u(t,new n(e),0,1),n.precision)};jt.equals=jt.eq=function(e){return!this.cmp(e)};jt.exponent=function(){return $o(this)};jt.greaterThan=jt.gt=function(e){return this.cmp(e)>0};jt.greaterThanOrEqualTo=jt.gte=function(e){return this.cmp(e)>=0};jt.isInteger=jt.isint=function(){return this.e>this.d.length-2};jt.isNegative=jt.isneg=function(){return this.s<0};jt.isPositive=jt.ispos=function(){return this.s>0};jt.isZero=function(){return this.s===0};jt.lessThan=jt.lt=function(e){return this.cmp(e)<0};jt.lessThanOrEqualTo=jt.lte=function(e){return this.cmp(e)<1};jt.logarithm=jt.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Wa))throw Error(il+"NaN");if(n.s<1)throw Error(il+(n.s?"NaN":"-Infinity"));return n.eq(Wa)?new r(0):(Kr=!1,t=$u(Yx(n,i),Yx(e,i),i),Kr=!0,Ar(t,o))};jt.minus=jt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Xae(t,e):Yae(t,(e.s=-e.s,e))};jt.modulo=jt.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(il+"NaN");return n.s?(Kr=!1,t=$u(n,e,0,1).times(e),Kr=!0,n.minus(t)):Ar(new r(n),o)};jt.naturalExponential=jt.exp=function(){return Qae(this)};jt.naturalLogarithm=jt.ln=function(){return Yx(this)};jt.negated=jt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};jt.plus=jt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Yae(t,e):Xae(t,(e.s=-e.s,e))};jt.precision=jt.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(sh+e);if(t=$o(o)+1,r=o.d.length-1,n=r*zr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};jt.squareRoot=jt.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(il+"NaN")}for(e=$o(s),Kr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=wc(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Iv((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus($u(s,i,a+2)).times(.5),wc(i.d).slice(0,a)===(t=wc(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(Ar(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Kr=!0,Ar(r,n)};jt.times=jt.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,f=u.constructor,p=u.d,m=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,n=u.e+e.e,l=p.length,c=m.length,l<c&&(i=p,p=m,m=i,a=l,l=c,c=a),i=[],a=l+c,r=a;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+m[r]*p[o-r-1]+t,i[o--]=s%ni|0,t=s/ni|0;i[o]=(i[o]+t)%ni|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Kr?Ar(e,f.precision):e};jt.toDecimalPlaces=jt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Bc(e,0,Ov),t===void 0?t=r.rounding:Bc(t,0,8),Ar(n,e+$o(n)+1,t))};jt.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=Th(r,!0):(Bc(e,0,Ov),t===void 0?t=o.rounding:Bc(t,0,8),r=Ar(new o(r),e+1,t),n=Th(r,!0,e+1)),n};jt.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?Th(o):(Bc(e,0,Ov),t===void 0?t=i.rounding:Bc(t,0,8),r=Ar(new i(o),e+$o(o)+1,t),n=Th(r.abs(),!1,e+$o(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};jt.toInteger=jt.toint=function(){var e=this,t=e.constructor;return Ar(new t(e),$o(e)+1,t.rounding)};jt.toNumber=function(){return+this};jt.toPower=jt.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(Wa);if(s=new l(s),!s.s){if(e.s<1)throw Error(il+"Infinity");return s}if(s.eq(Wa))return s;if(r=l.precision,e.eq(Wa))return Ar(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=Kae){for(o=new l(Wa),t=Math.ceil(r/zr+4),Kr=!1;n%2&&(o=o.times(s),DK(o.d,t)),n=Iv(n/2),n!==0;)s=s.times(s),DK(s.d,t);return Kr=!0,e.s<0?new l(Wa).div(o):Ar(o,r)}}else if(i<0)throw Error(il+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Kr=!1,o=e.times(Yx(s,r+c)),Kr=!0,o=Qae(o),o.s=i,o};jt.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=$o(o),r=Th(o,n<=i.toExpNeg||n>=i.toExpPos)):(Bc(e,1,Ov),t===void 0?t=i.rounding:Bc(t,0,8),o=Ar(new i(o),e,t),n=$o(o),r=Th(o,e<=n||n<=i.toExpNeg,e)),r};jt.toSignificantDigits=jt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Bc(e,1,Ov),t===void 0?t=r.rounding:Bc(t,0,8)),Ar(new r(n),e,t)};jt.toString=jt.valueOf=jt.val=jt.toJSON=jt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$o(e),n=e.constructor;return Th(e,t<=n.toExpNeg||t>=n.toExpPos)};function Yae(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Kr?Ar(t,f):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(f/zr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/ni|0,l[i]%=ni;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Kr?Ar(t,f):t}function Bc(e,t,n){if(e!==~~e||e<t||e>n)throw Error(sh+e)}function wc(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)r=e[t]+"",n=zr-r.length,n&&(i+=qd(n)),i+=r;a=e[t],r=a+"",n=zr-r.length,n&&(i+=qd(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}var $u=function(){function e(r,o){var i,a=0,s=r.length;for(r=r.slice();s--;)i=r[s]*o+a,r[s]=i%ni|0,a=i/ni|0;return a&&r.unshift(a),r}function t(r,o,i,a){var s,l;if(i!=a)l=i>a?1:-1;else for(s=l=0;s<i;s++)if(r[s]!=o[s]){l=r[s]>o[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]<o[i]?1:0,r[i]=a*ni+r[i]-o[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,o,i,a){var s,l,c,u,f,p,m,g,y,v,w,C,E,I,O,P,R,D,M=r.constructor,A=r.s==o.s?1:-1,_=r.d,N=o.d;if(!r.s)return new M(r);if(!o.s)throw Error(il+"Division by zero");for(l=r.e-o.e,R=N.length,O=_.length,m=new M(A),g=m.d=[],c=0;N[c]==(_[c]||0);)++c;if(N[c]>(_[c]||0)&&--l,i==null?C=i=M.precision:a?C=i+($o(r)-$o(o))+1:C=i,C<0)return new M(0);if(C=C/zr+2|0,c=0,R==1)for(u=0,N=N[0],C++;(c<O||u)&&C--;c++)E=u*ni+(_[c]||0),g[c]=E/N|0,u=E%N|0;else{for(u=ni/(N[0]+1)|0,u>1&&(N=e(N,u),_=e(_,u),R=N.length,O=_.length),I=R,y=_.slice(0,R),v=y.length;v<R;)y[v++]=0;D=N.slice(),D.unshift(0),P=N[0],N[1]>=ni/2&&++P;do u=0,s=t(N,y,R,v),s<0?(w=y[0],R!=v&&(w=w*ni+(y[1]||0)),u=w/P|0,u>1?(u>=ni&&(u=ni-1),f=e(N,u),p=f.length,v=y.length,s=t(f,y,p,v),s==1&&(u--,n(f,R<p?D:N,p))):(u==0&&(s=u=1),f=N.slice()),p=f.length,p<v&&f.unshift(0),n(y,f,v),s==-1&&(v=y.length,s=t(N,y,R,v),s<1&&(u++,n(y,R<v?D:N,v))),v=y.length):s===0&&(u++,y=[0]),g[c++]=u,s&&y[0]?y[v++]=_[I]||0:(y=[_[I]],v=1);while((I++<O||y[0]!==void 0)&&C--)}return g[0]||g.shift(),m.e=l,Ar(m,a?i+$o(m)+1:i)}}();function Qae(e,t){var n,r,o,i,a,s,l=0,c=0,u=e.constructor,f=u.precision;if($o(e)>16)throw Error(_z+$o(e));if(!e.s)return new u(Wa);for(Kr=!1,s=f,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Dp(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(Wa),u.precision=s;;){if(o=Ar(o.times(e),s),n=n.times(++l),a=i.plus($u(o,n,s)),wc(a.d).slice(0,s)===wc(i.d).slice(0,s)){for(;c--;)i=Ar(i.times(i),s);return u.precision=f,t==null?(Kr=!0,Ar(i,f)):i}i=a}}function $o(e){for(var t=e.e*zr,n=e.d[0];n>=10;n/=10)t++;return t}function w_(e,t,n){if(t>e.LN10.sd())throw Kr=!0,n&&(e.precision=n),Error(il+"LN10 precision limit exceeded");return Ar(new e(e.LN10),t)}function qd(e){for(var t="";e--;)t+="0";return t}function Yx(e,t){var n,r,o,i,a,s,l,c,u,f=1,p=10,m=e,g=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(il+(m.s?"NaN":"-Infinity"));if(m.eq(Wa))return new y(0);if(t==null?(Kr=!1,c=v):c=t,m.eq(10))return t==null&&(Kr=!0),w_(y,c);if(c+=p,y.precision=c,n=wc(g),r=n.charAt(0),i=$o(m),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=wc(m.d),r=n.charAt(0),f++;i=$o(m),r>1?(m=new y("0."+n),i++):m=new y(r+"."+n.slice(1))}else return l=w_(y,c+2,v).times(i+""),m=Yx(new y(r+"."+n.slice(1)),c-p).plus(l),y.precision=v,t==null?(Kr=!0,Ar(m,v)):m;for(s=a=m=$u(m.minus(Wa),m.plus(Wa),c),u=Ar(m.times(m),c),o=3;;){if(a=Ar(a.times(u),c),l=s.plus($u(a,new y(o),c)),wc(l.d).slice(0,c)===wc(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(w_(y,c+2,v).times(i+""))),s=$u(s,new y(f),c),y.precision=v,t==null?(Kr=!0,Ar(s,v)):s;s=l,o+=2}}function RK(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=Iv(n/zr),e.d=[],r=(n+1)%zr,n<0&&(r+=zr),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=zr;r<o;)e.d.push(+t.slice(r,r+=zr));t=t.slice(r),r=zr-t.length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),Kr&&(e.e>_T||e.e<-_T))throw Error(_z+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ar(e,t,n){var r,o,i,a,s,l,c,u,f=e.d;for(a=1,i=f[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=zr,o=t,c=f[u=0];else{if(u=Math.ceil((r+1)/zr),i=f.length,u>=i)return e;for(c=i=f[u],a=1;i>=10;i/=10)a++;r%=zr,o=r-zr+a}if(n!==void 0&&(i=Dp(10,a-o-1),s=c/i%10|0,l=t<0||f[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/Dp(10,a-o):0:f[u-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return l?(i=$o(e),f.length=1,t=t-i-1,f[0]=Dp(10,(zr-t%zr)%zr),e.e=Iv(-t/zr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=u,i=1,u--):(f.length=u+1,i=Dp(10,zr-r),f[u]=o>0?(c/Dp(10,a-o)%Dp(10,o)|0)*i:0),l)for(;;)if(u==0){(f[0]+=i)==ni&&(f[0]=1,++e.e);break}else{if(f[u]+=i,f[u]!=ni)break;f[u--]=0,i=1}for(r=f.length;f[--r]===0;)f.pop();if(Kr&&(e.e>_T||e.e<-_T))throw Error(_z+$o(e));return e}function Xae(e,t){var n,r,o,i,a,s,l,c,u,f,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Kr?Ar(t,m):t;if(l=e.d,f=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=f.length):(n=f,r=c,s=l.length),o=Math.max(Math.ceil(m/zr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=f.length,u=o<s,u&&(s=o),o=0;o<s;o++)if(l[o]!=f[o]){u=l[o]<f[o];break}a=0}for(u&&(n=l,l=f,f=n,t.s=-t.s),s=l.length,o=f.length-s;o>0;--o)l[s++]=0;for(o=f.length;o>a;){if(l[--o]<f[o]){for(i=o;i&&l[--i]===0;)l[i]=ni-1;--l[i],l[o]+=ni}l[o]-=f[o]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Kr?Ar(t,m):t):new p(0)}function Th(e,t,n){var r,o=$o(e),i=wc(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+qd(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+qd(-o-1)+i,n&&(r=n-a)>0&&(i+=qd(r))):o>=a?(i+=qd(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+qd(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=qd(r))),e.s<0?"-"+i:i}function DK(e,t){if(e.length>t)return e.length=t,!0}function Jae(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(sh+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return RK(a,i.toString())}else if(typeof i!="string")throw Error(sh+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,a4e.test(i))RK(a,i);else throw Error(sh+i)}if(o.prototype=jt,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=Jae,o.config=o.set=s4e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return o.config(e),o}function s4e(e){if(!e||typeof e!="object")throw Error(il+"Object expected");var t,n,r,o=["precision",1,Ov,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((r=e[n=o[t]])!==void 0)if(Iv(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(sh+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(sh+n+": "+r);return this}var $z=Jae(i4e);Wa=new $z(1);const Cr=$z;function l4e(e){return f4e(e)||d4e(e)||u4e(e)||c4e()}function c4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u4e(e,t){if(e){if(typeof e=="string")return BL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BL(e,t)}}function d4e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function f4e(e){if(Array.isArray(e))return BL(e)}function BL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p4e=function(t){return t},Zae={},ese=function(t){return t===Zae},kK=function(t){return function n(){return arguments.length===0||arguments.length===1&&ese(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},h4e=function e(t,n){return t===1?n:kK(function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.filter(function(s){return s!==Zae}).length;return a>=t?n.apply(void 0,o):e(t-a,kK(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var u=o.map(function(f){return ese(f)?l.shift():f});return n.apply(void 0,l4e(u).concat(l))}))})},nP=function(t){return h4e(t.length,t)},zL=function(t,n){for(var r=[],o=t;o<n;++o)r[o-t]=o;return r},m4e=nP(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),g4e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return p4e;var o=n.reverse(),i=o[0],a=o.slice(1);return function(){return a.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},VL=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},tse=function(t){var n=null,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n&&i.every(function(s,l){return s===n[l]})||(n=i,r=t.apply(void 0,i)),r}};function y4e(e){var t;return e===0?t=1:t=Math.floor(new Cr(e).abs().log(10).toNumber())+1,t}function v4e(e,t,n){for(var r=new Cr(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i}var b4e=nP(function(e,t,n){var r=+e,o=+t;return r+n*(o-r)}),x4e=nP(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),S4e=nP(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const rP={rangeStep:v4e,getDigitCount:y4e,interpolateNumber:b4e,uninterpolateNumber:x4e,uninterpolateTruncation:S4e};function HL(e){return E4e(e)||C4e(e)||nse(e)||w4e()}function w4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C4e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function E4e(e){if(Array.isArray(e))return UL(e)}function Qx(e,t){return I4e(e)||O4e(e,t)||nse(e,t)||T4e()}function T4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nse(e,t){if(e){if(typeof e=="string")return UL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UL(e,t)}}function UL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O4e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function I4e(e){if(Array.isArray(e))return e}function rse(e){var t=Qx(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function ose(e,t,n){if(e.lte(0))return new Cr(0);var r=rP.getDigitCount(e.toNumber()),o=new Cr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new Cr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new Cr(Math.ceil(l))}function P4e(e,t,n){var r=1,o=new Cr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new Cr(10).pow(rP.getDigitCount(e)-1),o=new Cr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new Cr(Math.floor(e)))}else e===0?o=new Cr(Math.floor((t-1)/2)):n||(o=new Cr(Math.floor(e)));var a=Math.floor((t-1)/2),s=g4e(m4e(function(l){return o.add(new Cr(l-a).mul(r)).toNumber()}),zL);return s(0,t)}function ise(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Cr(0),tickMin:new Cr(0),tickMax:new Cr(0)};var i=ose(new Cr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new Cr(0):(a=new Cr(e).add(t).div(2),a=a.sub(new Cr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new Cr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?ise(e,t,n,r,o+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new Cr(s).mul(i)),tickMax:a.add(new Cr(l).mul(i))})}function A4e(e){var t=Qx(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=rse([n,r]),l=Qx(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var f=u===1/0?[c].concat(HL(zL(0,o-1).map(function(){return 1/0}))):[].concat(HL(zL(0,o-1).map(function(){return-1/0})),[u]);return n>r?VL(f):f}if(c===u)return P4e(c,o,i);var p=ise(c,u,a,i),m=p.step,g=p.tickMin,y=p.tickMax,v=rP.rangeStep(g,y.add(new Cr(.1).mul(m)),m);return n>r?VL(v):v}function M4e(e,t){var n=Qx(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=rse([r,o]),s=Qx(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),f=ose(new Cr(c).sub(l).div(u-1),i,0),p=[].concat(HL(rP.rangeStep(new Cr(l),new Cr(c).sub(new Cr(.99).mul(f)),f)),[c]);return r>o?VL(p):p}var R4e=tse(A4e),D4e=tse(M4e),k4e="Invariant failed";function Rf(e,t){throw new Error(k4e)}var _4e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Sy(e){"@babel/helpers - typeof";return Sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sy(e)}function $T(){return $T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$T.apply(this,arguments)}function $4e(e,t){return j4e(e)||F4e(e,t)||L4e(e,t)||N4e()}function N4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L4e(e,t){if(e){if(typeof e=="string")return _K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _K(e,t)}}function _K(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F4e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function j4e(e){if(Array.isArray(e))return e}function B4e(e,t){if(e==null)return{};var n=z4e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z4e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function V4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H4e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lse(r.key),r)}}function U4e(e,t,n){return t&&H4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function G4e(e,t,n){return t=NT(t),q4e(e,ase()?Reflect.construct(t,n||[],NT(e).constructor):t.apply(e,n))}function q4e(e,t){if(t&&(Sy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W4e(e)}function W4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ase(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ase=function(){return!!e})()}function NT(e){return NT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},NT(e)}function K4e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GL(e,t)}function GL(e,t){return GL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},GL(e,t)}function sse(e,t,n){return t=lse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lse(e){var t=Y4e(e,"string");return Sy(t)=="symbol"?t:t+""}function Y4e(e,t){if(Sy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pv=function(e){function t(){return V4e(this,t),G4e(this,t,arguments)}return K4e(t,e),U4e(t,[{key:"render",value:function(){var r=this.props,o=r.offset,i=r.layout,a=r.width,s=r.dataKey,l=r.data,c=r.dataPointFormatter,u=r.xAxis,f=r.yAxis,p=B4e(r,_4e),m=zt(p,!1);this.props.direction==="x"&&u.type!=="number"&&Rf();var g=l.map(function(y){var v=c(y,s),w=v.x,C=v.y,E=v.value,I=v.errorVal;if(!I)return null;var O=[],P,R;if(Array.isArray(I)){var D=$4e(I,2);P=D[0],R=D[1]}else P=R=I;if(i==="vertical"){var M=u.scale,A=C+o,_=A+a,N=A-a,B=M(E-P),H=M(E+R);O.push({x1:H,y1:_,x2:H,y2:N}),O.push({x1:B,y1:A,x2:H,y2:A}),O.push({x1:B,y1:_,x2:B,y2:N})}else if(i==="horizontal"){var j=f.scale,L=w+o,V=L-a,W=L+a,K=j(E-P),G=j(E+R);O.push({x1:V,y1:G,x2:W,y2:G}),O.push({x1:L,y1:K,x2:L,y2:G}),O.push({x1:V,y1:K,x2:W,y2:K})}return J.createElement(wn,$T({className:"recharts-errorBar",key:"bar-".concat(O.map(function(q){return"".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))},m),O.map(function(q){return J.createElement("line",$T({},q,{key:"line-".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))}))});return J.createElement(wn,{className:"recharts-errorBars"},g)}}])}(J.Component);sse(Pv,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});sse(Pv,"displayName","ErrorBar");function Xx(e){"@babel/helpers - typeof";return Xx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xx(e)}function $K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$K(Object(n),!0).forEach(function(r){Q4e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$K(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q4e(e,t,n){return t=X4e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X4e(e){var t=J4e(e,"string");return Xx(t)=="symbol"?t:t+""}function J4e(e,t){if(Xx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cse=function(t){var n=t.children,r=t.formattedGraphicalItems,o=t.legendWidth,i=t.legendContent,a=Va(n,Ic);if(!a)return null;var s=Ic.defaultProps,l=s!==void 0?bp(bp({},s),a.props):{},c;return a.props&&a.props.payload?c=a.props&&a.props.payload:i==="children"?c=(r||[]).reduce(function(u,f){var p=f.item,m=f.props,g=m.sectors||m.data||[];return u.concat(g.map(function(y){return{type:a.props.iconType||p.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):c=(r||[]).map(function(u){var f=u.item,p=f.type.defaultProps,m=p!==void 0?bp(bp({},p),f.props):{},g=m.dataKey,y=m.name,v=m.legendType,w=m.hide;return{inactive:w,dataKey:g,type:l.iconType||v||"square",color:Nz(f),value:y||g,payload:m}}),bp(bp(bp({},l),Ic.getWithHeight(a,o)),{},{payload:c,item:a})};function Jx(e){"@babel/helpers - typeof";return Jx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jx(e)}function NK(e){return n3e(e)||t3e(e)||e3e(e)||Z4e()}function Z4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e3e(e,t){if(e){if(typeof e=="string")return qL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qL(e,t)}}function t3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n3e(e){if(Array.isArray(e))return qL(e)}function qL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function LK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function po(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LK(Object(n),!0).forEach(function(r){zg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zg(e,t,n){return t=r3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r3e(e){var t=o3e(e,"string");return Jx(t)=="symbol"?t:t+""}function o3e(e,t){if(Jx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vr(e,t,n){return an(e)||an(t)?n:Ho(t)?Ja(e,t,n):rn(t)?t(e):n}function rx(e,t,n,r){var o=n4e(e,function(s){return Vr(s,t)});if(n==="number"){var i=o.filter(function(s){return mt(s)||parseFloat(s)});return i.length?[tP(i),hf(i)]:[1/0,-1/0]}var a=r?o.filter(function(s){return!an(s)}):o;return a.map(function(s){return Ho(s)||s instanceof Date?s:""})}var i3e=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c<s;c++){var u=c>0?o[c-1].coordinate:o[s-1].coordinate,f=o[c].coordinate,p=c>=s-1?o[0].coordinate:o[c+1].coordinate,m=void 0;if(ta(f-u)!==ta(p-f)){var g=[];if(ta(p-f)===ta(l[1]-l[0])){m=p;var y=f+l[1]-l[0];g[0]=Math.min(y,(y+u)/2),g[1]=Math.max(y,(y+u)/2)}else{m=u;var v=p+l[1]-l[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var w=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(t>w[0]&&t<=w[1]||t>=g[0]&&t<=g[1]){a=o[c].index;break}}else{var C=Math.min(u,p),E=Math.max(u,p);if(t>(C+f)/2&&t<=(E+f)/2){a=o[c].index;break}}}else for(var I=0;I<s;I++)if(I===0&&t<=(r[I].coordinate+r[I+1].coordinate)/2||I>0&&I<s-1&&t>(r[I].coordinate+r[I-1].coordinate)/2&&t<=(r[I].coordinate+r[I+1].coordinate)/2||I===s-1&&t>(r[I].coordinate+r[I-1].coordinate)/2){a=r[I].index;break}return a},Nz=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},a3e=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l<c;l++)for(var u=i[s[l]].stackGroups,f=Object.keys(u),p=0,m=f.length;p<m;p++){var g=u[f[p]],y=g.items,v=g.cateAxisId,w=y.filter(function(R){return _u(R.type).indexOf("Bar")>=0});if(w&&w.length){var C=w[0].type.defaultProps,E=C!==void 0?po(po({},C),w[0].props):w[0].props,I=E.barSize,O=E[v];a[O]||(a[O]=[]);var P=an(I)?n:I;a[O].push({item:w[0],stackList:w.slice(1),barSize:an(P)?void 0:na(P,r,0)})}}return a},s3e=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=na(n,o,0,!0),u,f=[];if(a[0].barSize===+a[0].barSize){var p=!1,m=o/l,g=a.reduce(function(I,O){return I+O.barSize||0},0);g+=(l-1)*c,g>=o&&(g-=(l-1)*c,c=0),g>=o&&m>0&&(p=!0,m*=.9,g=l*m);var y=(o-g)/2>>0,v={offset:y-c,size:0};u=a.reduce(function(I,O){var P={item:O.item,position:{offset:v.offset+v.size+c,size:p?m:O.barSize}},R=[].concat(NK(I),[P]);return v=R[R.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(D){R.push({item:D,position:v})}),R},f)}else{var w=na(r,o,0,!0);o-2*w-(l-1)*c<=0&&(c=0);var C=(o-2*w-(l-1)*c)/l;C>1&&(C>>=0);var E=s===+s?Math.min(C,s):C;u=a.reduce(function(I,O,P){var R=[].concat(NK(I),[{item:O.item,position:{offset:w+(C+c)*P+(C-E)/2,size:E}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(D){R.push({item:D,position:R[R.length-1].position})}),R},f)}return u},l3e=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=cse({children:i,legendWidth:l});if(c){var u=o||{},f=u.width,p=u.height,m=c.align,g=c.verticalAlign,y=c.layout;if((y==="vertical"||y==="horizontal"&&g==="middle")&&m!=="center"&&mt(t[m]))return po(po({},t),{},zg({},m,t[m]+(f||0)));if((y==="horizontal"||y==="vertical"&&m==="center")&&g!=="middle"&&mt(t[g]))return po(po({},t),{},zg({},g,t[g]+(p||0)))}return t},c3e=function(t,n,r){return an(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},use=function(t,n,r,o,i){var a=n.props.children,s=sa(a,Pv).filter(function(c){return c3e(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var f=Vr(u,r);if(an(f))return c;var p=Array.isArray(f)?[tP(f),hf(f)]:[f,f],m=l.reduce(function(g,y){var v=Vr(u,y,0),w=p[0]-Math.abs(Array.isArray(v)?v[0]:v),C=p[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,g[0]),Math.max(C,g[1])]},[1/0,-1/0]);return[Math.min(m[0],c[0]),Math.max(m[1],c[1])]},[1/0,-1/0])}return null},u3e=function(t,n,r,o,i){var a=n.map(function(s){return use(t,s,r,i,o)}).filter(function(s){return!an(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},dse=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&use(t,l,c,o)||rx(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,f=c.length;u<f;u++)s[c[u]]||(s[c[u]]=!0,l.push(c[u]));return l},[])},fse=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},pse=function(t,n,r,o){if(o)return t.map(function(l){return l.coordinate});var i,a,s=t.map(function(l){return l.coordinate===n&&(i=!0),l.coordinate===r&&(a=!0),l.coordinate});return i||s.push(n),a||s.push(r),s},Du=function(t,n,r){if(!t)return null;var o=t.scale,i=t.duplicateDomain,a=t.type,s=t.range,l=t.realScaleType==="scaleBand"?o.bandwidth()/2:2,c=(n||r)&&a==="category"&&o.bandwidth?o.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?ta(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(f){var p=i?i.indexOf(f):f;return{coordinate:o(p)+c,value:f,offset:c}});return u.filter(function(f){return!wv(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,p){return{coordinate:o(f)+c,value:f,index:p,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(f){return{coordinate:o(f)+c,value:f,offset:c}}):o.domain().map(function(f,p){return{coordinate:o(f)+c,value:i?i[f]:f,index:p,offset:c}})},C_=new WeakMap,z1=function(t,n){if(typeof n!="function")return t;C_.has(t)||C_.set(t,new WeakMap);var r=C_.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},hse=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Ux(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:MT(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:nx(),realScaleType:"point"}:i==="category"?{scale:Ux(),realScaleType:"band"}:{scale:MT(),realScaleType:"linear"};if(Ch(o)){var l="scale".concat(BI(o));return{scale:(wK[l]||nx)(),realScaleType:wK[l]?l:"point"}}return rn(o)?{scale:o}:{scale:nx(),realScaleType:"point"}},FK=1e-4,mse=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-FK,a=Math.max(o[0],o[1])+FK,s=t(n[0]),l=t(n[r-1]);(s<i||s>a||l<i||l>a)&&t.domain([n[0],n[r-1]])}},d3e=function(t,n){if(!t)return null;for(var r=0,o=t.length;r<o;r++)if(t[r].item===n)return t[r].position;return null},f3e=function(t,n){if(!n||n.length!==2||!mt(n[0])||!mt(n[1]))return t;var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!mt(t[0])||t[0]<r)&&(i[0]=r),(!mt(t[1])||t[1]>o)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]<r&&(i[1]=r),i},p3e=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r<o;++r)for(var i=0,a=0,s=0;s<n;++s){var l=wv(t[s][r][1])?t[s][r][0]:t[s][r][1];l>=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},h3e=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r<o;++r)for(var i=0,a=0;a<n;++a){var s=wv(t[a][r][1])?t[a][r][0]:t[a][r][1];s>=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},m3e={sign:p3e,expand:rBe,none:py,silhouette:oBe,wiggle:iBe,positive:h3e},g3e=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=m3e[r],a=nBe().keys(o).value(function(s,l){return+Vr(s,l,0)}).order(wL).offset(i);return a(t)},y3e=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(f,p){var m,g=(m=p.type)!==null&&m!==void 0&&m.defaultProps?po(po({},p.type.defaultProps),p.props):p.props,y=g.stackId,v=g.hide;if(v)return f;var w=g[r],C=f[w]||{hasStack:!1,stackGroups:{}};if(Ho(y)){var E=C.stackGroups[y]||{numericAxisId:r,cateAxisId:o,items:[]};E.items.push(p),C.hasStack=!0,C.stackGroups[y]=E}else C.stackGroups[Vf("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[p]};return po(po({},f),{},zg({},w,C))},l),u={};return Object.keys(c).reduce(function(f,p){var m=c[p];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(y,v){var w=m.stackGroups[v];return po(po({},y),{},zg({},v,{numericAxisId:r,cateAxisId:o,items:w.items,stackedData:g3e(t,w.items,i)}))},g)}return po(po({},f),{},zg({},p,m))},u)},gse=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=R4e(c,i,s);return t.domain([tP(u),hf(u)]),{niceTicks:u}}if(i&&o==="number"){var f=t.domain(),p=D4e(f,i,s);return{niceTicks:p}}return null};function wy(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!an(o[t.dataKey])){var s=fT(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=Vr(o,an(a)?t.dataKey:a);return an(l)?null:t.scale(l)}var jK=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=Vr(a,n.dataKey,n.domain[s]);return an(l)?null:n.scale(l)-i/2+o},v3e=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},b3e=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Ho(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},x3e=function(t){return t.reduce(function(n,r){return[tP(r.concat([n[0]]).filter(mt)),hf(r.concat([n[1]]).filter(mt))]},[1/0,-1/0])},yse=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var f=x3e(u.slice(n,r+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},BK=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zK=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WL=function(t,n,r){if(rn(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(mt(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(BK.test(t[0])){var i=+BK.exec(t[0])[1];o[0]=n[0]-i}else rn(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(mt(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(zK.test(t[1])){var a=+zK.exec(t[1])[1];o[1]=n[1]+a}else rn(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},LT=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=uz(n,function(f){return f.coordinate}),a=1/0,s=1,l=i.length;s<l;s++){var c=i[s],u=i[s-1];a=Math.min((c.coordinate||0)-(u.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0},VK=function(t,n,r){return!t||!t.length||Mf(t,Ja(r,"type.defaultProps.domain"))?n:t},vse=function(t,n){var r=t.type.defaultProps?po(po({},t.type.defaultProps),t.props):t.props,o=r.dataKey,i=r.name,a=r.unit,s=r.formatter,l=r.tooltipType,c=r.chartType,u=r.hide;return po(po({},zt(t,!1)),{},{dataKey:o,unit:a,formatter:s,name:i||o,color:Nz(t),value:Vr(n,o),type:l,payload:n,chartType:c,hide:u})};function Zx(e){"@babel/helpers - typeof";return Zx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zx(e)}function HK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HK(Object(n),!0).forEach(function(r){bse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bse(e,t,n){return t=S3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S3e(e){var t=w3e(e,"string");return Zx(t)=="symbol"?t:t+""}function w3e(e,t){if(Zx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C3e(e,t){return I3e(e)||O3e(e,t)||T3e(e,t)||E3e()}function E3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T3e(e,t){if(e){if(typeof e=="string")return UK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UK(e,t)}}function UK(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O3e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function I3e(e){if(Array.isArray(e))return e}var FT=Math.PI/180,P3e=function(t){return t*180/Math.PI},Nr=function(t,n,r,o){return{x:t+Math.cos(-FT*o)*r,y:n+Math.sin(-FT*o)*r}},xse=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},A3e=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=na(t.cx,a,a/2),f=na(t.cy,s,s/2),p=xse(a,s,r),m=na(t.innerRadius,p,0),g=na(t.outerRadius,p,p*.8),y=Object.keys(n);return y.reduce(function(v,w){var C=n[w],E=C.domain,I=C.reversed,O;if(an(C.range))o==="angleAxis"?O=[l,c]:o==="radiusAxis"&&(O=[m,g]),I&&(O=[O[1],O[0]]);else{O=C.range;var P=O,R=C3e(P,2);l=R[0],c=R[1]}var D=hse(C,i),M=D.realScaleType,A=D.scale;A.domain(E).range(O),mse(A);var _=gse(A,wu(wu({},C),{},{realScaleType:M})),N=wu(wu(wu({},C),_),{},{range:O,radius:g,realScaleType:M,scale:A,cx:u,cy:f,innerRadius:m,outerRadius:g,startAngle:l,endAngle:c});return wu(wu({},v),{},bse({},w,N))},{})},M3e=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},R3e=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=M3e({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:P3e(c),angleInRadian:c}},D3e=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},k3e=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},GK=function(t,n){var r=t.x,o=t.y,i=R3e({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(a<l||a>c)return!1;if(a===0)return!0;var u=D3e(n),f=u.startAngle,p=u.endAngle,m=s,g;if(f<=p){for(;m>p;)m-=360;for(;m<f;)m+=360;g=m>=f&&m<=p}else{for(;m>f;)m-=360;for(;m<p;)m+=360;g=m>=p&&m<=f}return g?wu(wu({},n),{},{radius:a,angle:k3e(m,n)}):null},Sse=function(t){return!x.isValidElement(t)&&!rn(t)&&typeof t!="boolean"?t.className:""};function eS(e){"@babel/helpers - typeof";return eS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eS(e)}var _3e=["offset"];function $3e(e){return j3e(e)||F3e(e)||L3e(e)||N3e()}function N3e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L3e(e,t){if(e){if(typeof e=="string")return KL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KL(e,t)}}function F3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j3e(e){if(Array.isArray(e))return KL(e)}function KL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B3e(e,t){if(e==null)return{};var n=z3e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function jo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qK(Object(n),!0).forEach(function(r){V3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V3e(e,t,n){return t=H3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H3e(e){var t=U3e(e,"string");return eS(t)=="symbol"?t:t+""}function U3e(e,t){if(eS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(eS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tS(){return tS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tS.apply(this,arguments)}var G3e=function(t){var n=t.value,r=t.formatter,o=an(t.children)?n:t.children;return rn(r)?r(o):o},q3e=function(t,n){var r=ta(n-t),o=Math.min(Math.abs(n-t),360);return r*o},W3e=function(t,n,r){var o=t.position,i=t.viewBox,a=t.offset,s=t.className,l=i,c=l.cx,u=l.cy,f=l.innerRadius,p=l.outerRadius,m=l.startAngle,g=l.endAngle,y=l.clockWise,v=(f+p)/2,w=q3e(m,g),C=w>=0?1:-1,E,I;o==="insideStart"?(E=m+C*a,I=y):o==="insideEnd"?(E=g-C*a,I=!y):o==="end"&&(E=g+C*a,I=y),I=w<=0?I:!I;var O=Nr(c,u,v,E),P=Nr(c,u,v,E+(I?1:-1)*359),R="M".concat(O.x,",").concat(O.y,`
A`).concat(v,",").concat(v,",0,1,").concat(I?0:1,`,
- `).concat(P.x,",").concat(P.y),D=on(t.id)?Bf("recharts-radial-line-"):t.id;return J.createElement("text",tS({},r,{dominantBaseline:"central",className:fe("recharts-radial-bar-label",s)}),J.createElement("defs",null,J.createElement("path",{id:D,d:R})),J.createElement("textPath",{xlinkHref:"#".concat(D)},n))},W3e=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,u=i.startAngle,f=i.endAngle,h=(u+f)/2;if(o==="outside"){var m=Nr(a,s,c+r,h),g=m.x,y=m.y;return{x:g,y,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,w=Nr(a,s,v,h),C=w.x,E=w.y;return{x:C,y:E,textAnchor:"middle",verticalAnchor:"middle"}},K3e=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,f=u>=0?1:-1,h=f*o,m=f>0?"end":"start",g=f>0?"start":"end",y=c>=0?1:-1,v=y*o,w=y>0?"end":"start",C=y>0?"start":"end";if(i==="top"){var E={x:s+c/2,y:l-f*o,textAnchor:"middle",verticalAnchor:m};return Fo(Fo({},E),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var I={x:s+c/2,y:l+u+h,textAnchor:"middle",verticalAnchor:g};return Fo(Fo({},I),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var O={x:s-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return Fo(Fo({},O),r?{width:Math.max(O.x-r.x,0),height:u}:{})}if(i==="right"){var P={x:s+c+v,y:l+u/2,textAnchor:C,verticalAnchor:"middle"};return Fo(Fo({},P),r?{width:Math.max(r.x+r.width-P.x,0),height:u}:{})}var R=r?{width:c,height:u}:{};return i==="insideLeft"?Fo({x:s+v,y:l+u/2,textAnchor:C,verticalAnchor:"middle"},R):i==="insideRight"?Fo({x:s+c-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},R):i==="insideTop"?Fo({x:s+c/2,y:l+h,textAnchor:"middle",verticalAnchor:g},R):i==="insideBottom"?Fo({x:s+c/2,y:l+u-h,textAnchor:"middle",verticalAnchor:m},R):i==="insideTopLeft"?Fo({x:s+v,y:l+h,textAnchor:C,verticalAnchor:g},R):i==="insideTopRight"?Fo({x:s+c-v,y:l+h,textAnchor:w,verticalAnchor:g},R):i==="insideBottomLeft"?Fo({x:s+v,y:l+u-h,textAnchor:C,verticalAnchor:m},R):i==="insideBottomRight"?Fo({x:s+c-v,y:l+u-h,textAnchor:w,verticalAnchor:m},R):Sv(i)&&(mt(i.x)||Bp(i.x))&&(mt(i.y)||Bp(i.y))?Fo({x:s+na(i.x,c),y:l+na(i.y,u),textAnchor:"end",verticalAnchor:"end"},R):Fo({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},R)},Y3e=function(t){return"cx"in t&&mt(t.cx)};function oi(e){var t=e.offset,n=t===void 0?5:t,r=j3e(e,k3e),o=Fo({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,f=u===void 0?"":u,h=o.textBreakAll;if(!i||on(s)&&on(l)&&!x.isValidElement(c)&&!rn(c))return null;if(x.isValidElement(c))return x.cloneElement(c,o);var m;if(rn(c)){if(m=x.createElement(c,o),x.isValidElement(m))return m}else m=U3e(o);var g=Y3e(i),y=zt(o,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return q3e(o,m,y);var v=g?W3e(o):K3e(o);return J.createElement(wh,tS({className:fe("recharts-label",f)},y,v,{breakAll:h}),m)}oi.displayName="Label";var Sse=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,f=t.x,h=t.y,m=t.top,g=t.left,y=t.width,v=t.height,w=t.clockWise,C=t.labelViewBox;if(C)return C;if(mt(y)&&mt(v)){if(mt(f)&&mt(h))return{x:f,y:h,width:y,height:v};if(mt(m)&&mt(g))return{x:m,y:g,width:y,height:v}}return mt(f)&&mt(h)?{x:f,y:h,width:0,height:0}:mt(n)&&mt(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},Q3e=function(t,n){return t?t===!0?J.createElement(oi,{key:"label-implicit",viewBox:n}):Vo(t)?J.createElement(oi,{key:"label-implicit",viewBox:n,value:t}):x.isValidElement(t)?t.type===oi?x.cloneElement(t,{key:"label-implicit",viewBox:n}):J.createElement(oi,{key:"label-implicit",content:t,viewBox:n}):rn(t)?J.createElement(oi,{key:"label-implicit",content:t,viewBox:n}):Sv(t)?J.createElement(oi,tS({viewBox:n},t,{key:"label-implicit"})):null:null},X3e=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=Sse(t),a=sa(o,oi).map(function(l,c){return x.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=Q3e(t.label,n||i);return[s].concat(_3e(a))};oi.parseViewBox=Sse;oi.renderCallByParent=X3e;var C_,qK;function J3e(){if(qK)return C_;qK=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return C_=e,C_}var Z3e=J3e();const eGe=Gn(Z3e);function nS(e){"@babel/helpers - typeof";return nS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nS(e)}var tGe=["valueAccessor"],nGe=["data","dataKey","clockWise","id","textBreakAll"];function rGe(e){return sGe(e)||aGe(e)||iGe(e)||oGe()}function oGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iGe(e,t){if(e){if(typeof e=="string")return KL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KL(e,t)}}function aGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sGe(e){if(Array.isArray(e))return KL(e)}function KL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FT(){return FT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FT.apply(this,arguments)}function WK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function KK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WK(Object(n),!0).forEach(function(r){lGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lGe(e,t,n){return t=cGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cGe(e){var t=uGe(e,"string");return nS(t)=="symbol"?t:t+""}function uGe(e,t){if(nS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YK(e,t){if(e==null)return{};var n=dGe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var fGe=function(t){return Array.isArray(t.value)?eGe(t.value):t.value};function Bl(e){var t=e.valueAccessor,n=t===void 0?fGe:t,r=YK(e,tGe),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=YK(r,nGe);return!o||!o.length?null:J.createElement(wn,{className:"recharts-label-list"},o.map(function(u,f){var h=on(i)?n(u,f):Vr(u&&u.payload,i),m=on(s)?{}:{id:"".concat(s,"-").concat(f)};return J.createElement(oi,FT({},zt(u,!0),c,m,{parentViewBox:u.parentViewBox,value:h,textBreakAll:l,viewBox:oi.parseViewBox(on(a)?u:KK(KK({},u),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}Bl.displayName="LabelList";function pGe(e,t){return e?e===!0?J.createElement(Bl,{key:"labelList-implicit",data:t}):J.isValidElement(e)||rn(e)?J.createElement(Bl,{key:"labelList-implicit",data:t,content:e}):Sv(e)?J.createElement(Bl,FT({data:t},e,{key:"labelList-implicit"})):null:null}function hGe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=sa(r,Bl).map(function(a,s){return x.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=pGe(e.label,t);return[i].concat(rGe(o))}Bl.renderCallByParent=hGe;function rS(e){"@babel/helpers - typeof";return rS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rS(e)}function YL(){return YL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YL.apply(this,arguments)}function QK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function XK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QK(Object(n),!0).forEach(function(r){mGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mGe(e,t,n){return t=gGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gGe(e){var t=yGe(e,"string");return rS(t)=="symbol"?t:t+""}function yGe(e,t){if(rS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vGe=function(t,n){var r=ta(n-t),o=Math.min(Math.abs(n-t),359.999);return r*o},z1=function(t){var n=t.cx,r=t.cy,o=t.radius,i=t.angle,a=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,u=l*(s?1:-1)+o,f=Math.asin(l/u)/LT,h=c?i:i+a*f,m=Nr(n,r,u,h),g=Nr(n,r,o,h),y=c?i-a*f:i,v=Nr(n,r,u*Math.cos(f*LT),y);return{center:m,circleTangency:g,lineTangency:v,theta:f}},wse=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.startAngle,s=t.endAngle,l=vGe(a,s),c=a+l,u=Nr(n,r,i,a),f=Nr(n,r,i,c),h="M ".concat(u.x,",").concat(u.y,`
+ `).concat(P.x,",").concat(P.y),D=an(t.id)?Vf("recharts-radial-line-"):t.id;return J.createElement("text",tS({},r,{dominantBaseline:"central",className:fe("recharts-radial-bar-label",s)}),J.createElement("defs",null,J.createElement("path",{id:D,d:R})),J.createElement("textPath",{xlinkHref:"#".concat(D)},n))},K3e=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,u=i.startAngle,f=i.endAngle,p=(u+f)/2;if(o==="outside"){var m=Nr(a,s,c+r,p),g=m.x,y=m.y;return{x:g,y,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,w=Nr(a,s,v,p),C=w.x,E=w.y;return{x:C,y:E,textAnchor:"middle",verticalAnchor:"middle"}},Y3e=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,f=u>=0?1:-1,p=f*o,m=f>0?"end":"start",g=f>0?"start":"end",y=c>=0?1:-1,v=y*o,w=y>0?"end":"start",C=y>0?"start":"end";if(i==="top"){var E={x:s+c/2,y:l-f*o,textAnchor:"middle",verticalAnchor:m};return jo(jo({},E),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var I={x:s+c/2,y:l+u+p,textAnchor:"middle",verticalAnchor:g};return jo(jo({},I),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var O={x:s-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return jo(jo({},O),r?{width:Math.max(O.x-r.x,0),height:u}:{})}if(i==="right"){var P={x:s+c+v,y:l+u/2,textAnchor:C,verticalAnchor:"middle"};return jo(jo({},P),r?{width:Math.max(r.x+r.width-P.x,0),height:u}:{})}var R=r?{width:c,height:u}:{};return i==="insideLeft"?jo({x:s+v,y:l+u/2,textAnchor:C,verticalAnchor:"middle"},R):i==="insideRight"?jo({x:s+c-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},R):i==="insideTop"?jo({x:s+c/2,y:l+p,textAnchor:"middle",verticalAnchor:g},R):i==="insideBottom"?jo({x:s+c/2,y:l+u-p,textAnchor:"middle",verticalAnchor:m},R):i==="insideTopLeft"?jo({x:s+v,y:l+p,textAnchor:C,verticalAnchor:g},R):i==="insideTopRight"?jo({x:s+c-v,y:l+p,textAnchor:w,verticalAnchor:g},R):i==="insideBottomLeft"?jo({x:s+v,y:l+u-p,textAnchor:C,verticalAnchor:m},R):i==="insideBottomRight"?jo({x:s+c-v,y:l+u-p,textAnchor:w,verticalAnchor:m},R):Sv(i)&&(mt(i.x)||Vp(i.x))&&(mt(i.y)||Vp(i.y))?jo({x:s+na(i.x,c),y:l+na(i.y,u),textAnchor:"end",verticalAnchor:"end"},R):jo({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},R)},Q3e=function(t){return"cx"in t&&mt(t.cx)};function oi(e){var t=e.offset,n=t===void 0?5:t,r=B3e(e,_3e),o=jo({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,f=u===void 0?"":u,p=o.textBreakAll;if(!i||an(s)&&an(l)&&!x.isValidElement(c)&&!rn(c))return null;if(x.isValidElement(c))return x.cloneElement(c,o);var m;if(rn(c)){if(m=x.createElement(c,o),x.isValidElement(m))return m}else m=G3e(o);var g=Q3e(i),y=zt(o,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return W3e(o,m,y);var v=g?K3e(o):Y3e(o);return J.createElement(Eh,tS({className:fe("recharts-label",f)},y,v,{breakAll:p}),m)}oi.displayName="Label";var wse=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,f=t.x,p=t.y,m=t.top,g=t.left,y=t.width,v=t.height,w=t.clockWise,C=t.labelViewBox;if(C)return C;if(mt(y)&&mt(v)){if(mt(f)&&mt(p))return{x:f,y:p,width:y,height:v};if(mt(m)&&mt(g))return{x:m,y:g,width:y,height:v}}return mt(f)&&mt(p)?{x:f,y:p,width:0,height:0}:mt(n)&&mt(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},X3e=function(t,n){return t?t===!0?J.createElement(oi,{key:"label-implicit",viewBox:n}):Ho(t)?J.createElement(oi,{key:"label-implicit",viewBox:n,value:t}):x.isValidElement(t)?t.type===oi?x.cloneElement(t,{key:"label-implicit",viewBox:n}):J.createElement(oi,{key:"label-implicit",content:t,viewBox:n}):rn(t)?J.createElement(oi,{key:"label-implicit",content:t,viewBox:n}):Sv(t)?J.createElement(oi,tS({viewBox:n},t,{key:"label-implicit"})):null:null},J3e=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=wse(t),a=sa(o,oi).map(function(l,c){return x.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=X3e(t.label,n||i);return[s].concat($3e(a))};oi.parseViewBox=wse;oi.renderCallByParent=J3e;var E_,WK;function Z3e(){if(WK)return E_;WK=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return E_=e,E_}var eGe=Z3e();const tGe=Gn(eGe);function nS(e){"@babel/helpers - typeof";return nS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nS(e)}var nGe=["valueAccessor"],rGe=["data","dataKey","clockWise","id","textBreakAll"];function oGe(e){return lGe(e)||sGe(e)||aGe(e)||iGe()}function iGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aGe(e,t){if(e){if(typeof e=="string")return YL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YL(e,t)}}function sGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lGe(e){if(Array.isArray(e))return YL(e)}function YL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jT(){return jT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jT.apply(this,arguments)}function KK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function YK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KK(Object(n),!0).forEach(function(r){cGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cGe(e,t,n){return t=uGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uGe(e){var t=dGe(e,"string");return nS(t)=="symbol"?t:t+""}function dGe(e,t){if(nS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QK(e,t){if(e==null)return{};var n=fGe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var pGe=function(t){return Array.isArray(t.value)?tGe(t.value):t.value};function Vl(e){var t=e.valueAccessor,n=t===void 0?pGe:t,r=QK(e,nGe),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=QK(r,rGe);return!o||!o.length?null:J.createElement(wn,{className:"recharts-label-list"},o.map(function(u,f){var p=an(i)?n(u,f):Vr(u&&u.payload,i),m=an(s)?{}:{id:"".concat(s,"-").concat(f)};return J.createElement(oi,jT({},zt(u,!0),c,m,{parentViewBox:u.parentViewBox,value:p,textBreakAll:l,viewBox:oi.parseViewBox(an(a)?u:YK(YK({},u),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}Vl.displayName="LabelList";function hGe(e,t){return e?e===!0?J.createElement(Vl,{key:"labelList-implicit",data:t}):J.isValidElement(e)||rn(e)?J.createElement(Vl,{key:"labelList-implicit",data:t,content:e}):Sv(e)?J.createElement(Vl,jT({data:t},e,{key:"labelList-implicit"})):null:null}function mGe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=sa(r,Vl).map(function(a,s){return x.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=hGe(e.label,t);return[i].concat(oGe(o))}Vl.renderCallByParent=mGe;function rS(e){"@babel/helpers - typeof";return rS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rS(e)}function QL(){return QL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QL.apply(this,arguments)}function XK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function JK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XK(Object(n),!0).forEach(function(r){gGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gGe(e,t,n){return t=yGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yGe(e){var t=vGe(e,"string");return rS(t)=="symbol"?t:t+""}function vGe(e,t){if(rS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bGe=function(t,n){var r=ta(n-t),o=Math.min(Math.abs(n-t),359.999);return r*o},V1=function(t){var n=t.cx,r=t.cy,o=t.radius,i=t.angle,a=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,u=l*(s?1:-1)+o,f=Math.asin(l/u)/FT,p=c?i:i+a*f,m=Nr(n,r,u,p),g=Nr(n,r,o,p),y=c?i-a*f:i,v=Nr(n,r,u*Math.cos(f*FT),y);return{center:m,circleTangency:g,lineTangency:v,theta:f}},Cse=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.startAngle,s=t.endAngle,l=bGe(a,s),c=a+l,u=Nr(n,r,i,a),f=Nr(n,r,i,c),p="M ".concat(u.x,",").concat(u.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(a>c),`,
`).concat(f.x,",").concat(f.y,`
- `);if(o>0){var m=Nr(n,r,o,a),g=Nr(n,r,o,c);h+="L ".concat(g.x,",").concat(g.y,`
+ `);if(o>0){var m=Nr(n,r,o,a),g=Nr(n,r,o,c);p+="L ".concat(g.x,",").concat(g.y,`
A `).concat(o,",").concat(o,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`,
- `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},bGe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,f=ta(u-c),h=z1({cx:n,cy:r,radius:i,angle:c,sign:f,cornerRadius:a,cornerIsExternal:l}),m=h.circleTangency,g=h.lineTangency,y=h.theta,v=z1({cx:n,cy:r,radius:i,angle:u,sign:-f,cornerRadius:a,cornerIsExternal:l}),w=v.circleTangency,C=v.lineTangency,E=v.theta,I=l?Math.abs(c-u):Math.abs(c-u)-y-E;if(I<0)return s?"M ".concat(g.x,",").concat(g.y,`
+ `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},xGe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,f=ta(u-c),p=V1({cx:n,cy:r,radius:i,angle:c,sign:f,cornerRadius:a,cornerIsExternal:l}),m=p.circleTangency,g=p.lineTangency,y=p.theta,v=V1({cx:n,cy:r,radius:i,angle:u,sign:-f,cornerRadius:a,cornerIsExternal:l}),w=v.circleTangency,C=v.lineTangency,E=v.theta,I=l?Math.abs(c-u):Math.abs(c-u)-y-E;if(I<0)return s?"M ".concat(g.x,",").concat(g.y,`
a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
- `):wse({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var O="M ".concat(g.x,",").concat(g.y,`
+ `):Cse({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var O="M ".concat(g.x,",").concat(g.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(m.x,",").concat(m.y,`
A`).concat(i,",").concat(i,",0,").concat(+(I>180),",").concat(+(f<0),",").concat(w.x,",").concat(w.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,`
- `);if(o>0){var P=z1({cx:n,cy:r,radius:o,angle:c,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),R=P.circleTangency,D=P.lineTangency,M=P.theta,A=z1({cx:n,cy:r,radius:o,angle:u,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),_=A.circleTangency,N=A.lineTangency,B=A.theta,H=l?Math.abs(c-u):Math.abs(c-u)-M-B;if(H<0&&a===0)return"".concat(O,"L").concat(n,",").concat(r,"Z");O+="L".concat(N.x,",").concat(N.y,`
+ `);if(o>0){var P=V1({cx:n,cy:r,radius:o,angle:c,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),R=P.circleTangency,D=P.lineTangency,M=P.theta,A=V1({cx:n,cy:r,radius:o,angle:u,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),_=A.circleTangency,N=A.lineTangency,B=A.theta,H=l?Math.abs(c-u):Math.abs(c-u)-M-B;if(H<0&&a===0)return"".concat(O,"L").concat(n,",").concat(r,"Z");O+="L".concat(N.x,",").concat(N.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
A`).concat(o,",").concat(o,",0,").concat(+(H>180),",").concat(+(f>0),",").concat(R.x,",").concat(R.y,`
- A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,"Z")}else O+="L".concat(n,",").concat(r,"Z");return O},xGe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Cse=function(t){var n=XK(XK({},xGe),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,f=n.endAngle,h=n.className;if(a<i||u===f)return null;var m=fe("recharts-sector",h),g=a-i,y=na(s,g,0,!0),v;return y>0&&Math.abs(u-f)<360?v=bGe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(y,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):v=wse({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f}),J.createElement("path",YL({},zt(n,!0),{className:m,d:v,role:"img"}))};function oS(e){"@babel/helpers - typeof";return oS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oS(e)}function QL(){return QL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QL.apply(this,arguments)}function JK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ZK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JK(Object(n),!0).forEach(function(r){SGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SGe(e,t,n){return t=wGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wGe(e){var t=CGe(e,"string");return oS(t)=="symbol"?t:t+""}function CGe(e,t){if(oS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eY={curveBasisClosed:Uje,curveBasisOpen:Gje,curveBasis:Hje,curveBumpX:Aje,curveBumpY:Mje,curveLinearClosed:qje,curveLinear:zI,curveMonotoneX:Wje,curveMonotoneY:Kje,curveNatural:Yje,curveStep:Qje,curveStepAfter:Jje,curveStepBefore:Xje},V1=function(t){return t.x===+t.x&&t.y===+t.y},l0=function(t){return t.x},c0=function(t){return t.y},EGe=function(t,n){if(rn(t))return t;var r="curve".concat(jI(t));return(r==="curveMonotone"||r==="curveBump")&&n?eY["".concat(r).concat(n==="vertical"?"Y":"X")]:eY[r]||zI},TGe=function(t){var n=t.type,r=n===void 0?"linear":n,o=t.points,i=o===void 0?[]:o,a=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,u=EGe(r,s),f=c?i.filter(function(y){return V1(y)}):i,h;if(Array.isArray(a)){var m=c?a.filter(function(y){return V1(y)}):a,g=f.map(function(y,v){return ZK(ZK({},y),{},{base:m[v]})});return s==="vertical"?h=k1().y(c0).x1(l0).x0(function(y){return y.base.x}):h=k1().x(l0).y1(c0).y0(function(y){return y.base.y}),h.defined(V1).curve(u),h(g)}return s==="vertical"&&mt(a)?h=k1().y(c0).x1(l0).x0(a):mt(a)?h=k1().x(l0).y1(c0).y0(a):h=xie().x(l0).y(c0),h.defined(V1).curve(u),h(f)},vf=function(t){var n=t.className,r=t.points,o=t.path,i=t.pathRef;if((!r||!r.length)&&!o)return null;var a=r&&r.length?TGe(t):o;return J.createElement("path",QL({},zt(t,!1),fT(t),{className:fe("recharts-curve",n),d:a,ref:i}))},OGe=Object.getOwnPropertyNames,IGe=Object.getOwnPropertySymbols,PGe=Object.prototype.hasOwnProperty;function tY(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function H1(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var i=o.cache,a=i.get(n),s=i.get(r);if(a&&s)return a===r&&s===n;i.set(n,r),i.set(r,n);var l=e(n,r,o);return i.delete(n),i.delete(r),l}}function nY(e){return OGe(e).concat(IGe(e))}var AGe=Object.hasOwn||function(e,t){return PGe.call(e,t)};function Gh(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var MGe="__v",RGe="__o",DGe="_owner",rY=Object.getOwnPropertyDescriptor,oY=Object.keys;function kGe(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function _Ge(e,t){return Gh(e.getTime(),t.getTime())}function $Ge(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function NGe(e,t){return e===t}function iY(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),a,s,l=0;(a=i.next())&&!a.done;){for(var c=t.entries(),u=!1,f=0;(s=c.next())&&!s.done;){if(o[f]){f++;continue}var h=a.value,m=s.value;if(n.equals(h[0],m[0],l,f,e,t,n)&&n.equals(h[1],m[1],h[0],m[0],e,t,n)){u=o[f]=!0;break}f++}if(!u)return!1;l++}return!0}var LGe=Gh;function FGe(e,t,n){var r=oY(e),o=r.length;if(oY(t).length!==o)return!1;for(;o-- >0;)if(!Ese(e,t,n,r[o]))return!1;return!0}function u0(e,t,n){var r=nY(e),o=r.length;if(nY(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],!Ese(e,t,n,i)||(a=rY(e,i),s=rY(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function jGe(e,t){return Gh(e.valueOf(),t.valueOf())}function BGe(e,t){return e.source===t.source&&e.flags===t.flags}function aY(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),a,s;(a=i.next())&&!a.done;){for(var l=t.values(),c=!1,u=0;(s=l.next())&&!s.done;){if(!o[u]&&n.equals(a.value,s.value,a.value,s.value,e,t,n)){c=o[u]=!0;break}u++}if(!c)return!1}return!0}function zGe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function VGe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Ese(e,t,n,r){return(r===DGe||r===RGe||r===MGe)&&(e.$$typeof||t.$$typeof)?!0:AGe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var HGe="[object Arguments]",UGe="[object Boolean]",GGe="[object Date]",qGe="[object Error]",WGe="[object Map]",KGe="[object Number]",YGe="[object Object]",QGe="[object RegExp]",XGe="[object Set]",JGe="[object String]",ZGe="[object URL]",e6e=Array.isArray,sY=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,lY=Object.assign,t6e=Object.prototype.toString.call.bind(Object.prototype.toString);function n6e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,a=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(g,y,v){if(g===y)return!0;if(g==null||y==null)return!1;var w=typeof g;if(w!==typeof y)return!1;if(w!=="object")return w==="number"?a(g,y,v):w==="function"?o(g,y,v):!1;var C=g.constructor;if(C!==y.constructor)return!1;if(C===Object)return s(g,y,v);if(e6e(g))return t(g,y,v);if(sY!=null&&sY(g))return f(g,y,v);if(C===Date)return n(g,y,v);if(C===RegExp)return c(g,y,v);if(C===Map)return i(g,y,v);if(C===Set)return u(g,y,v);var E=t6e(g);return E===GGe?n(g,y,v):E===QGe?c(g,y,v):E===WGe?i(g,y,v):E===XGe?u(g,y,v):E===YGe?typeof g.then!="function"&&typeof y.then!="function"&&s(g,y,v):E===ZGe?h(g,y,v):E===qGe?r(g,y,v):E===HGe?s(g,y,v):E===UGe||E===KGe||E===JGe?l(g,y,v):!1}}function r6e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?u0:kGe,areDatesEqual:_Ge,areErrorsEqual:$Ge,areFunctionsEqual:NGe,areMapsEqual:r?tY(iY,u0):iY,areNumbersEqual:LGe,areObjectsEqual:r?u0:FGe,arePrimitiveWrappersEqual:jGe,areRegExpsEqual:BGe,areSetsEqual:r?tY(aY,u0):aY,areTypedArraysEqual:r?u0:zGe,areUrlsEqual:VGe};if(n&&(o=lY({},o,n(o))),t){var i=H1(o.areArraysEqual),a=H1(o.areMapsEqual),s=H1(o.areObjectsEqual),l=H1(o.areSetsEqual);o=lY({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function o6e(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function i6e(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),f=u.cache,h=f===void 0?t?new WeakMap:void 0:f,m=u.meta;return n(l,c,{cache:h,equals:o,meta:m,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var a6e=Hf();Hf({strict:!0});Hf({circular:!0});Hf({circular:!0,strict:!0});Hf({createInternalComparator:function(){return Gh}});Hf({strict:!0,createInternalComparator:function(){return Gh}});Hf({circular:!0,createInternalComparator:function(){return Gh}});Hf({circular:!0,createInternalComparator:function(){return Gh},strict:!0});function Hf(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=r6e(e),l=n6e(s),c=r?r(l):o6e(l);return i6e({circular:n,comparator:l,createState:o,equals:c,strict:a})}function s6e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function cY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):s6e(o)};requestAnimationFrame(r)}function XL(e){"@babel/helpers - typeof";return XL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},XL(e)}function l6e(e){return f6e(e)||d6e(e)||u6e(e)||c6e()}function c6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u6e(e,t){if(e){if(typeof e=="string")return uY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uY(e,t)}}function uY(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f6e(e){if(Array.isArray(e))return e}function p6e(){var e={},t=function(){return null},n=!1,r=function o(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=i,s=l6e(a),l=s[0],c=s.slice(1);if(typeof l=="number"){cY(o.bind(null,c),l);return}o(l),cY(o.bind(null,c));return}XL(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function iS(e){"@babel/helpers - typeof";return iS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iS(e)}function dY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function fY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dY(Object(n),!0).forEach(function(r){Tse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tse(e,t,n){return t=h6e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h6e(e){var t=m6e(e,"string");return iS(t)==="symbol"?t:String(t)}function m6e(e,t){if(iS(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(iS(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g6e=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,o){return r.filter(function(i){return o.includes(i)})})},y6e=function(t){return t},v6e=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},ox=function(t,n){return Object.keys(n).reduce(function(r,o){return fY(fY({},r),{},Tse({},o,t(o,n[o])))},{})},pY=function(t,n,r){return t.map(function(o){return"".concat(v6e(o)," ").concat(n,"ms ").concat(r)}).join(",")};function b6e(e,t){return w6e(e)||S6e(e,t)||Ose(e,t)||x6e()}function x6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S6e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function w6e(e){if(Array.isArray(e))return e}function C6e(e){return O6e(e)||T6e(e)||Ose(e)||E6e()}function E6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ose(e,t){if(e){if(typeof e=="string")return JL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JL(e,t)}}function T6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O6e(e){if(Array.isArray(e))return JL(e)}function JL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jT=1e-4,Ise=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Pse=function(t,n){return t.map(function(r,o){return r*Math.pow(n,o)}).reduce(function(r,o){return r+o})},hY=function(t,n){return function(r){var o=Ise(t,n);return Pse(o,r)}},I6e=function(t,n){return function(r){var o=Ise(t,n),i=[].concat(C6e(o.map(function(a,s){return a*s}).slice(1)),[0]);return Pse(i,r)}},mY=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":o=0,i=0,a=1,s=1;break;case"ease":o=.25,i=.1,a=.25,s=1;break;case"ease-in":o=.42,i=0,a=1,s=1;break;case"ease-out":o=.42,i=0,a=.58,s=1;break;case"ease-in-out":o=0,i=0,a=.58,s=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),u=b6e(c,4);o=u[0],i=u[1],a=u[2],s=u[3]}}}var f=hY(o,a),h=hY(i,s),m=I6e(o,a),g=function(w){return w>1?1:w<0?0:w},y=function(w){for(var C=w>1?1:w,E=C,I=0;I<8;++I){var O=f(E)-C,P=m(E);if(Math.abs(O-C)<jT||P<jT)return h(E);E=g(E-O/P)}return h(E)};return y.isStepper=!1,y},P6e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,f,h){var m=-(u-f)*r,g=h*i,y=h+(m-g)*s/1e3,v=h*s/1e3+u;return Math.abs(v-f)<jT&&Math.abs(y)<jT?[f,0]:[v,y]};return l.isStepper=!0,l.dt=s,l},A6e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];if(typeof o=="string")switch(o){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return mY(o);case"spring":return P6e();default:if(o.split("(")[0]==="cubic-bezier")return mY(o)}return typeof o=="function"?o:null};function aS(e){"@babel/helpers - typeof";return aS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aS(e)}function gY(e){return D6e(e)||R6e(e)||Ase(e)||M6e()}function M6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D6e(e){if(Array.isArray(e))return eF(e)}function yY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yY(Object(n),!0).forEach(function(r){ZL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZL(e,t,n){return t=k6e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k6e(e){var t=_6e(e,"string");return aS(t)==="symbol"?t:String(t)}function _6e(e,t){if(aS(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(aS(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $6e(e,t){return F6e(e)||L6e(e,t)||Ase(e,t)||N6e()}function N6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ase(e,t){if(e){if(typeof e=="string")return eF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eF(e,t)}}function eF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L6e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function F6e(e){if(Array.isArray(e))return e}var BT=function(t,n,r){return t+(n-t)*r},tF=function(t){var n=t.from,r=t.to;return n!==r},j6e=function e(t,n,r){var o=ox(function(i,a){if(tF(a)){var s=t(a.from,a.to,a.velocity),l=$6e(s,2),c=l[0],u=l[1];return gi(gi({},a),{},{from:c,velocity:u})}return a},n);return r<1?ox(function(i,a){return tF(a)?gi(gi({},a),{},{velocity:BT(a.velocity,o[i].velocity,r),from:BT(a.from,o[i].from,r)}):a},n):e(t,o,r-1)};const B6e=function(e,t,n,r,o){var i=g6e(e,t),a=i.reduce(function(v,w){return gi(gi({},v),{},ZL({},w,[e[w],t[w]]))},{}),s=i.reduce(function(v,w){return gi(gi({},v),{},ZL({},w,{from:e[w],velocity:0,to:t[w]}))},{}),l=-1,c,u,f=function(){return null},h=function(){return ox(function(w,C){return C.from},s)},m=function(){return!Object.values(s).filter(tF).length},g=function(w){c||(c=w);var C=w-c,E=C/n.dt;s=j6e(n,s,E),o(gi(gi(gi({},e),t),h())),c=w,m()||(l=requestAnimationFrame(f))},y=function(w){u||(u=w);var C=(w-u)/r,E=ox(function(O,P){return BT.apply(void 0,gY(P).concat([n(C)]))},a);if(o(gi(gi(gi({},e),t),E)),C<1)l=requestAnimationFrame(f);else{var I=ox(function(O,P){return BT.apply(void 0,gY(P).concat([n(1)]))},a);o(gi(gi(gi({},e),t),I))}};return f=n.isStepper?g:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function wy(e){"@babel/helpers - typeof";return wy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wy(e)}var z6e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function V6e(e,t){if(e==null)return{};var n=H6e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function H6e(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function E_(e){return W6e(e)||q6e(e)||G6e(e)||U6e()}function U6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G6e(e,t){if(e){if(typeof e=="string")return nF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nF(e,t)}}function q6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function W6e(e){if(Array.isArray(e))return nF(e)}function nF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vY(Object(n),!0).forEach(function(r){B0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B0(e,t,n){return t=Mse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y6e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mse(r.key),r)}}function Q6e(e,t,n){return t&&Y6e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mse(e){var t=X6e(e,"string");return wy(t)==="symbol"?t:String(t)}function X6e(e,t){if(wy(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wy(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rF(e,t)}function rF(e,t){return rF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},rF(e,t)}function Z6e(e){var t=eqe();return function(){var r=zT(e),o;if(t){var i=zT(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return oF(this,o)}}function oF(e,t){if(t&&(wy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iF(e)}function iF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eqe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zT(e){return zT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zT(e)}var ol=function(e){J6e(n,e);var t=Z6e(n);function n(r,o){var i;K6e(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,f=a.steps,h=a.children,m=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(iF(i)),i.changeStyle=i.changeStyle.bind(iF(i)),!s||m<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:u}),oF(i);if(f&&f.length)i.state={style:f[0].style};else if(c){if(typeof h=="function")return i.state={style:c},oF(i);i.state={style:l?B0({},l,c):c}}else i.state={style:{}};return i}return Q6e(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,f=i.from,h=this.state.style;if(s){if(!a){var m={style:l?B0({},l,u):u};this.state&&h&&(l&&h[l]!==u||!l&&h!==u)&&this.setState(m);return}if(!(a6e(o.to,u)&&o.canBegin&&o.isActive)){var g=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=g||c?f:o.to;if(this.state&&h){var v={style:l?B0({},l,y):y};(l&&h[l]!==y||!l&&h!==y)&&this.setState(v)}this.runAnimation(vl(vl({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,f=o.onAnimationEnd,h=o.onAnimationStart,m=B6e(a,s,A6e(c),l,this.changeStyle),g=function(){i.stopJSAnimation=m()};this.manager.start([h,u,g,l,f])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,f=c.duration,h=f===void 0?0:f,m=function(y,v,w){if(w===0)return y;var C=v.duration,E=v.easing,I=E===void 0?"ease":E,O=v.style,P=v.properties,R=v.onAnimationEnd,D=w>0?a[w-1]:v,M=P||Object.keys(O);if(typeof I=="function"||I==="spring")return[].concat(E_(y),[i.runJSAnimation.bind(i,{from:D.style,to:O,duration:C,easing:I}),C]);var A=pY(M,C,I),_=vl(vl(vl({},D.style),O),{},{transition:A});return[].concat(E_(y),[_,C,R]).filter(y6e)};return this.manager.start([l].concat(E_(a.reduce(m,[u,Math.max(h,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=p6e());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,f=o.onAnimationEnd,h=o.steps,m=o.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(o);return}if(h.length>1){this.runStepAnimation(o);return}var y=s?B0({},s,l):l,v=pY(Object.keys(y),a,c);g.start([u,i,vl(vl({},y),{},{transition:v}),a,f])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=V6e(o,z6e),c=x.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var f=function(m){var g=m.props,y=g.style,v=y===void 0?{}:y,w=g.className,C=x.cloneElement(m,vl(vl({},l),{},{style:vl(vl({},v),u),className:w}));return C};return c===1?f(x.Children.only(i)):J.createElement("div",null,x.Children.map(i,function(h){return f(h)}))}}]),n}(x.PureComponent);ol.displayName="Animate";ol.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ol.propTypes={from:U.oneOfType([U.object,U.string]),to:U.oneOfType([U.object,U.string]),attributeName:U.string,duration:U.number,begin:U.number,easing:U.oneOfType([U.string,U.func]),steps:U.arrayOf(U.shape({duration:U.number.isRequired,style:U.object.isRequired,easing:U.oneOfType([U.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),U.func]),properties:U.arrayOf("string"),onAnimationEnd:U.func})),children:U.oneOfType([U.node,U.func]),isActive:U.bool,canBegin:U.bool,onAnimationEnd:U.func,shouldReAnimate:U.bool,onAnimationStart:U.func,onAnimationReStart:U.func};function sS(e){"@babel/helpers - typeof";return sS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sS(e)}function VT(){return VT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VT.apply(this,arguments)}function tqe(e,t){return iqe(e)||oqe(e,t)||rqe(e,t)||nqe()}function nqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rqe(e,t){if(e){if(typeof e=="string")return bY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bY(e,t)}}function bY(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oqe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function iqe(e){if(Array.isArray(e))return e}function xY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function SY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xY(Object(n),!0).forEach(function(r){aqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aqe(e,t,n){return t=sqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sqe(e){var t=lqe(e,"string");return sS(t)=="symbol"?t:t+""}function lqe(e,t){if(sS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wY=function(t,n,r,o,i){var a=Math.min(Math.abs(r)/2,Math.abs(o)/2),s=o>=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var f=[0,0,0,0],h=0,m=4;h<m;h++)f[h]=i[h]>a?a:i[h];u="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(n)),u+="L ".concat(t+r-l*f[1],",").concat(n),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`,
+ A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,"Z")}else O+="L".concat(n,",").concat(r,"Z");return O},SGe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Ese=function(t){var n=JK(JK({},SGe),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,f=n.endAngle,p=n.className;if(a<i||u===f)return null;var m=fe("recharts-sector",p),g=a-i,y=na(s,g,0,!0),v;return y>0&&Math.abs(u-f)<360?v=xGe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(y,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):v=Cse({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f}),J.createElement("path",QL({},zt(n,!0),{className:m,d:v,role:"img"}))};function oS(e){"@babel/helpers - typeof";return oS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oS(e)}function XL(){return XL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XL.apply(this,arguments)}function ZK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function eY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZK(Object(n),!0).forEach(function(r){wGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wGe(e,t,n){return t=CGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CGe(e){var t=EGe(e,"string");return oS(t)=="symbol"?t:t+""}function EGe(e,t){if(oS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tY={curveBasisClosed:Gje,curveBasisOpen:qje,curveBasis:Uje,curveBumpX:Mje,curveBumpY:Rje,curveLinearClosed:Wje,curveLinear:VI,curveMonotoneX:Kje,curveMonotoneY:Yje,curveNatural:Qje,curveStep:Xje,curveStepAfter:Zje,curveStepBefore:Jje},H1=function(t){return t.x===+t.x&&t.y===+t.y},l0=function(t){return t.x},c0=function(t){return t.y},TGe=function(t,n){if(rn(t))return t;var r="curve".concat(BI(t));return(r==="curveMonotone"||r==="curveBump")&&n?tY["".concat(r).concat(n==="vertical"?"Y":"X")]:tY[r]||VI},OGe=function(t){var n=t.type,r=n===void 0?"linear":n,o=t.points,i=o===void 0?[]:o,a=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,u=TGe(r,s),f=c?i.filter(function(y){return H1(y)}):i,p;if(Array.isArray(a)){var m=c?a.filter(function(y){return H1(y)}):a,g=f.map(function(y,v){return eY(eY({},y),{},{base:m[v]})});return s==="vertical"?p=_1().y(c0).x1(l0).x0(function(y){return y.base.x}):p=_1().x(l0).y1(c0).y0(function(y){return y.base.y}),p.defined(H1).curve(u),p(g)}return s==="vertical"&&mt(a)?p=_1().y(c0).x1(l0).x0(a):mt(a)?p=_1().x(l0).y1(c0).y0(a):p=Sie().x(l0).y(c0),p.defined(H1).curve(u),p(f)},xf=function(t){var n=t.className,r=t.points,o=t.path,i=t.pathRef;if((!r||!r.length)&&!o)return null;var a=r&&r.length?OGe(t):o;return J.createElement("path",XL({},zt(t,!1),pT(t),{className:fe("recharts-curve",n),d:a,ref:i}))},IGe=Object.getOwnPropertyNames,PGe=Object.getOwnPropertySymbols,AGe=Object.prototype.hasOwnProperty;function nY(e,t){return function(r,o,i){return e(r,o,i)&&t(r,o,i)}}function U1(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var i=o.cache,a=i.get(n),s=i.get(r);if(a&&s)return a===r&&s===n;i.set(n,r),i.set(r,n);var l=e(n,r,o);return i.delete(n),i.delete(r),l}}function rY(e){return IGe(e).concat(PGe(e))}var MGe=Object.hasOwn||function(e,t){return AGe.call(e,t)};function qh(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var RGe="__v",DGe="__o",kGe="_owner",oY=Object.getOwnPropertyDescriptor,iY=Object.keys;function _Ge(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function $Ge(e,t){return qh(e.getTime(),t.getTime())}function NGe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function LGe(e,t){return e===t}function aY(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),a,s,l=0;(a=i.next())&&!a.done;){for(var c=t.entries(),u=!1,f=0;(s=c.next())&&!s.done;){if(o[f]){f++;continue}var p=a.value,m=s.value;if(n.equals(p[0],m[0],l,f,e,t,n)&&n.equals(p[1],m[1],p[0],m[0],e,t,n)){u=o[f]=!0;break}f++}if(!u)return!1;l++}return!0}var FGe=qh;function jGe(e,t,n){var r=iY(e),o=r.length;if(iY(t).length!==o)return!1;for(;o-- >0;)if(!Tse(e,t,n,r[o]))return!1;return!0}function u0(e,t,n){var r=rY(e),o=r.length;if(rY(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],!Tse(e,t,n,i)||(a=oY(e,i),s=oY(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function BGe(e,t){return qh(e.valueOf(),t.valueOf())}function zGe(e,t){return e.source===t.source&&e.flags===t.flags}function sY(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),a,s;(a=i.next())&&!a.done;){for(var l=t.values(),c=!1,u=0;(s=l.next())&&!s.done;){if(!o[u]&&n.equals(a.value,s.value,a.value,s.value,e,t,n)){c=o[u]=!0;break}u++}if(!c)return!1}return!0}function VGe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function HGe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Tse(e,t,n,r){return(r===kGe||r===DGe||r===RGe)&&(e.$$typeof||t.$$typeof)?!0:MGe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var UGe="[object Arguments]",GGe="[object Boolean]",qGe="[object Date]",WGe="[object Error]",KGe="[object Map]",YGe="[object Number]",QGe="[object Object]",XGe="[object RegExp]",JGe="[object Set]",ZGe="[object String]",e6e="[object URL]",t6e=Array.isArray,lY=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,cY=Object.assign,n6e=Object.prototype.toString.call.bind(Object.prototype.toString);function r6e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,a=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,f=e.areTypedArraysEqual,p=e.areUrlsEqual;return function(g,y,v){if(g===y)return!0;if(g==null||y==null)return!1;var w=typeof g;if(w!==typeof y)return!1;if(w!=="object")return w==="number"?a(g,y,v):w==="function"?o(g,y,v):!1;var C=g.constructor;if(C!==y.constructor)return!1;if(C===Object)return s(g,y,v);if(t6e(g))return t(g,y,v);if(lY!=null&&lY(g))return f(g,y,v);if(C===Date)return n(g,y,v);if(C===RegExp)return c(g,y,v);if(C===Map)return i(g,y,v);if(C===Set)return u(g,y,v);var E=n6e(g);return E===qGe?n(g,y,v):E===XGe?c(g,y,v):E===KGe?i(g,y,v):E===JGe?u(g,y,v):E===QGe?typeof g.then!="function"&&typeof y.then!="function"&&s(g,y,v):E===e6e?p(g,y,v):E===WGe?r(g,y,v):E===UGe?s(g,y,v):E===GGe||E===YGe||E===ZGe?l(g,y,v):!1}}function o6e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?u0:_Ge,areDatesEqual:$Ge,areErrorsEqual:NGe,areFunctionsEqual:LGe,areMapsEqual:r?nY(aY,u0):aY,areNumbersEqual:FGe,areObjectsEqual:r?u0:jGe,arePrimitiveWrappersEqual:BGe,areRegExpsEqual:zGe,areSetsEqual:r?nY(sY,u0):sY,areTypedArraysEqual:r?u0:VGe,areUrlsEqual:HGe};if(n&&(o=cY({},o,n(o))),t){var i=U1(o.areArraysEqual),a=U1(o.areMapsEqual),s=U1(o.areObjectsEqual),l=U1(o.areSetsEqual);o=cY({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function i6e(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function a6e(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),f=u.cache,p=f===void 0?t?new WeakMap:void 0:f,m=u.meta;return n(l,c,{cache:p,equals:o,meta:m,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var s6e=Gf();Gf({strict:!0});Gf({circular:!0});Gf({circular:!0,strict:!0});Gf({createInternalComparator:function(){return qh}});Gf({strict:!0,createInternalComparator:function(){return qh}});Gf({circular:!0,createInternalComparator:function(){return qh}});Gf({circular:!0,createInternalComparator:function(){return qh},strict:!0});function Gf(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=o6e(e),l=r6e(s),c=r?r(l):i6e(l);return a6e({circular:n,comparator:l,createState:o,equals:c,strict:a})}function l6e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function uY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):l6e(o)};requestAnimationFrame(r)}function JL(e){"@babel/helpers - typeof";return JL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},JL(e)}function c6e(e){return p6e(e)||f6e(e)||d6e(e)||u6e()}function u6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d6e(e,t){if(e){if(typeof e=="string")return dY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dY(e,t)}}function dY(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p6e(e){if(Array.isArray(e))return e}function h6e(){var e={},t=function(){return null},n=!1,r=function o(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=i,s=c6e(a),l=s[0],c=s.slice(1);if(typeof l=="number"){uY(o.bind(null,c),l);return}o(l),uY(o.bind(null,c));return}JL(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function iS(e){"@babel/helpers - typeof";return iS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iS(e)}function fY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fY(Object(n),!0).forEach(function(r){Ose(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ose(e,t,n){return t=m6e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m6e(e){var t=g6e(e,"string");return iS(t)==="symbol"?t:String(t)}function g6e(e,t){if(iS(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(iS(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y6e=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,o){return r.filter(function(i){return o.includes(i)})})},v6e=function(t){return t},b6e=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},ox=function(t,n){return Object.keys(n).reduce(function(r,o){return pY(pY({},r),{},Ose({},o,t(o,n[o])))},{})},hY=function(t,n,r){return t.map(function(o){return"".concat(b6e(o)," ").concat(n,"ms ").concat(r)}).join(",")};function x6e(e,t){return C6e(e)||w6e(e,t)||Ise(e,t)||S6e()}function S6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w6e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function C6e(e){if(Array.isArray(e))return e}function E6e(e){return I6e(e)||O6e(e)||Ise(e)||T6e()}function T6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ise(e,t){if(e){if(typeof e=="string")return ZL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZL(e,t)}}function O6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function I6e(e){if(Array.isArray(e))return ZL(e)}function ZL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var BT=1e-4,Pse=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Ase=function(t,n){return t.map(function(r,o){return r*Math.pow(n,o)}).reduce(function(r,o){return r+o})},mY=function(t,n){return function(r){var o=Pse(t,n);return Ase(o,r)}},P6e=function(t,n){return function(r){var o=Pse(t,n),i=[].concat(E6e(o.map(function(a,s){return a*s}).slice(1)),[0]);return Ase(i,r)}},gY=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":o=0,i=0,a=1,s=1;break;case"ease":o=.25,i=.1,a=.25,s=1;break;case"ease-in":o=.42,i=0,a=1,s=1;break;case"ease-out":o=.42,i=0,a=.58,s=1;break;case"ease-in-out":o=0,i=0,a=.58,s=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),u=x6e(c,4);o=u[0],i=u[1],a=u[2],s=u[3]}}}var f=mY(o,a),p=mY(i,s),m=P6e(o,a),g=function(w){return w>1?1:w<0?0:w},y=function(w){for(var C=w>1?1:w,E=C,I=0;I<8;++I){var O=f(E)-C,P=m(E);if(Math.abs(O-C)<BT||P<BT)return p(E);E=g(E-O/P)}return p(E)};return y.isStepper=!1,y},A6e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,f,p){var m=-(u-f)*r,g=p*i,y=p+(m-g)*s/1e3,v=p*s/1e3+u;return Math.abs(v-f)<BT&&Math.abs(y)<BT?[f,0]:[v,y]};return l.isStepper=!0,l.dt=s,l},M6e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];if(typeof o=="string")switch(o){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return gY(o);case"spring":return A6e();default:if(o.split("(")[0]==="cubic-bezier")return gY(o)}return typeof o=="function"?o:null};function aS(e){"@babel/helpers - typeof";return aS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aS(e)}function yY(e){return k6e(e)||D6e(e)||Mse(e)||R6e()}function R6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function k6e(e){if(Array.isArray(e))return tF(e)}function vY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vY(Object(n),!0).forEach(function(r){eF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eF(e,t,n){return t=_6e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _6e(e){var t=$6e(e,"string");return aS(t)==="symbol"?t:String(t)}function $6e(e,t){if(aS(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(aS(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N6e(e,t){return j6e(e)||F6e(e,t)||Mse(e,t)||L6e()}function L6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mse(e,t){if(e){if(typeof e=="string")return tF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tF(e,t)}}function tF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F6e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function j6e(e){if(Array.isArray(e))return e}var zT=function(t,n,r){return t+(n-t)*r},nF=function(t){var n=t.from,r=t.to;return n!==r},B6e=function e(t,n,r){var o=ox(function(i,a){if(nF(a)){var s=t(a.from,a.to,a.velocity),l=N6e(s,2),c=l[0],u=l[1];return yi(yi({},a),{},{from:c,velocity:u})}return a},n);return r<1?ox(function(i,a){return nF(a)?yi(yi({},a),{},{velocity:zT(a.velocity,o[i].velocity,r),from:zT(a.from,o[i].from,r)}):a},n):e(t,o,r-1)};const z6e=function(e,t,n,r,o){var i=y6e(e,t),a=i.reduce(function(v,w){return yi(yi({},v),{},eF({},w,[e[w],t[w]]))},{}),s=i.reduce(function(v,w){return yi(yi({},v),{},eF({},w,{from:e[w],velocity:0,to:t[w]}))},{}),l=-1,c,u,f=function(){return null},p=function(){return ox(function(w,C){return C.from},s)},m=function(){return!Object.values(s).filter(nF).length},g=function(w){c||(c=w);var C=w-c,E=C/n.dt;s=B6e(n,s,E),o(yi(yi(yi({},e),t),p())),c=w,m()||(l=requestAnimationFrame(f))},y=function(w){u||(u=w);var C=(w-u)/r,E=ox(function(O,P){return zT.apply(void 0,yY(P).concat([n(C)]))},a);if(o(yi(yi(yi({},e),t),E)),C<1)l=requestAnimationFrame(f);else{var I=ox(function(O,P){return zT.apply(void 0,yY(P).concat([n(1)]))},a);o(yi(yi(yi({},e),t),I))}};return f=n.isStepper?g:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Cy(e){"@babel/helpers - typeof";return Cy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cy(e)}var V6e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function H6e(e,t){if(e==null)return{};var n=U6e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U6e(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function T_(e){return K6e(e)||W6e(e)||q6e(e)||G6e()}function G6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q6e(e,t){if(e){if(typeof e=="string")return rF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rF(e,t)}}function W6e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K6e(e){if(Array.isArray(e))return rF(e)}function rF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bY(Object(n),!0).forEach(function(r){B0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B0(e,t,n){return t=Rse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q6e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rse(r.key),r)}}function X6e(e,t,n){return t&&Q6e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rse(e){var t=J6e(e,"string");return Cy(t)==="symbol"?t:String(t)}function J6e(e,t){if(Cy(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cy(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Z6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oF(e,t)}function oF(e,t){return oF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},oF(e,t)}function eqe(e){var t=tqe();return function(){var r=VT(e),o;if(t){var i=VT(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return iF(this,o)}}function iF(e,t){if(t&&(Cy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aF(e)}function aF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tqe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function VT(e){return VT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},VT(e)}var al=function(e){Z6e(n,e);var t=eqe(n);function n(r,o){var i;Y6e(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,f=a.steps,p=a.children,m=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(aF(i)),i.changeStyle=i.changeStyle.bind(aF(i)),!s||m<=0)return i.state={style:{}},typeof p=="function"&&(i.state={style:u}),iF(i);if(f&&f.length)i.state={style:f[0].style};else if(c){if(typeof p=="function")return i.state={style:c},iF(i);i.state={style:l?B0({},l,c):c}}else i.state={style:{}};return i}return X6e(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,f=i.from,p=this.state.style;if(s){if(!a){var m={style:l?B0({},l,u):u};this.state&&p&&(l&&p[l]!==u||!l&&p!==u)&&this.setState(m);return}if(!(s6e(o.to,u)&&o.canBegin&&o.isActive)){var g=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=g||c?f:o.to;if(this.state&&p){var v={style:l?B0({},l,y):y};(l&&p[l]!==y||!l&&p!==y)&&this.setState(v)}this.runAnimation(xl(xl({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,f=o.onAnimationEnd,p=o.onAnimationStart,m=z6e(a,s,M6e(c),l,this.changeStyle),g=function(){i.stopJSAnimation=m()};this.manager.start([p,u,g,l,f])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,f=c.duration,p=f===void 0?0:f,m=function(y,v,w){if(w===0)return y;var C=v.duration,E=v.easing,I=E===void 0?"ease":E,O=v.style,P=v.properties,R=v.onAnimationEnd,D=w>0?a[w-1]:v,M=P||Object.keys(O);if(typeof I=="function"||I==="spring")return[].concat(T_(y),[i.runJSAnimation.bind(i,{from:D.style,to:O,duration:C,easing:I}),C]);var A=hY(M,C,I),_=xl(xl(xl({},D.style),O),{},{transition:A});return[].concat(T_(y),[_,C,R]).filter(v6e)};return this.manager.start([l].concat(T_(a.reduce(m,[u,Math.max(p,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=h6e());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,f=o.onAnimationEnd,p=o.steps,m=o.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(o);return}if(p.length>1){this.runStepAnimation(o);return}var y=s?B0({},s,l):l,v=hY(Object.keys(y),a,c);g.start([u,i,xl(xl({},y),{},{transition:v}),a,f])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=H6e(o,V6e),c=x.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var f=function(m){var g=m.props,y=g.style,v=y===void 0?{}:y,w=g.className,C=x.cloneElement(m,xl(xl({},l),{},{style:xl(xl({},v),u),className:w}));return C};return c===1?f(x.Children.only(i)):J.createElement("div",null,x.Children.map(i,function(p){return f(p)}))}}]),n}(x.PureComponent);al.displayName="Animate";al.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};al.propTypes={from:U.oneOfType([U.object,U.string]),to:U.oneOfType([U.object,U.string]),attributeName:U.string,duration:U.number,begin:U.number,easing:U.oneOfType([U.string,U.func]),steps:U.arrayOf(U.shape({duration:U.number.isRequired,style:U.object.isRequired,easing:U.oneOfType([U.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),U.func]),properties:U.arrayOf("string"),onAnimationEnd:U.func})),children:U.oneOfType([U.node,U.func]),isActive:U.bool,canBegin:U.bool,onAnimationEnd:U.func,shouldReAnimate:U.bool,onAnimationStart:U.func,onAnimationReStart:U.func};function sS(e){"@babel/helpers - typeof";return sS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sS(e)}function HT(){return HT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HT.apply(this,arguments)}function nqe(e,t){return aqe(e)||iqe(e,t)||oqe(e,t)||rqe()}function rqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oqe(e,t){if(e){if(typeof e=="string")return xY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xY(e,t)}}function xY(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iqe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function aqe(e){if(Array.isArray(e))return e}function SY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SY(Object(n),!0).forEach(function(r){sqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sqe(e,t,n){return t=lqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lqe(e){var t=cqe(e,"string");return sS(t)=="symbol"?t:t+""}function cqe(e,t){if(sS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CY=function(t,n,r,o,i){var a=Math.min(Math.abs(r)/2,Math.abs(o)/2),s=o>=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var f=[0,0,0,0],p=0,m=4;p<m;p++)f[p]=i[p]>a?a:i[p];u="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(n)),u+="L ".concat(t+r-l*f[1],",").concat(n),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`,
`).concat(t+r,",").concat(n+s*f[1])),u+="L ".concat(t+r,",").concat(n+o-s*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`,
`).concat(t+r-l*f[2],",").concat(n+o)),u+="L ".concat(t+l*f[3],",").concat(n+o),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`,
`).concat(t,",").concat(n+o-s*f[3])),u+="Z"}else if(a>0&&i===+i&&i>0){var g=Math.min(a,i);u="M ".concat(t,",").concat(n+s*g,`
@@ -328,28 +328,28 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
L `).concat(t+r,",").concat(n+o-s*g,`
A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+r-l*g,",").concat(n+o,`
L `).concat(t+l*g,",").concat(n+o,`
- A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*g," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},cqe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),f=Math.min(a,a+l),h=Math.max(a,a+l);return r>=c&&r<=u&&o>=f&&o<=h}return!1},uqe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Nz=function(t){var n=SY(SY({},uqe),t),r=x.useRef(),o=x.useState(-1),i=tqe(o,2),a=i[0],s=i[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var I=r.current.getTotalLength();I&&s(I)}catch{}},[]);var l=n.x,c=n.y,u=n.width,f=n.height,h=n.radius,m=n.className,g=n.animationEasing,y=n.animationDuration,v=n.animationBegin,w=n.isAnimationActive,C=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var E=fe("recharts-rectangle",m);return C?J.createElement(ol,{canBegin:a>0,from:{width:u,height:f,x:l,y:c},to:{width:u,height:f,x:l,y:c},duration:y,animationEasing:g,isActive:C},function(I){var O=I.width,P=I.height,R=I.x,D=I.y;return J.createElement(ol,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,isActive:w,easing:g},J.createElement("path",VT({},zt(n,!0),{className:E,d:wY(R,D,O,P,h),ref:r})))}):J.createElement("path",VT({},zt(n,!0),{className:E,d:wY(l,c,u,f,h)}))},dqe=["points","className","baseLinePoints","connectNulls"];function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yg.apply(this,arguments)}function fqe(e,t){if(e==null)return{};var n=pqe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CY(e){return yqe(e)||gqe(e)||mqe(e)||hqe()}function hqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mqe(e,t){if(e){if(typeof e=="string")return aF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aF(e,t)}}function gqe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yqe(e){if(Array.isArray(e))return aF(e)}function aF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var EY=function(t){return t&&t.x===+t.x&&t.y===+t.y},vqe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){EY(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),EY(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},ix=function(t,n){var r=vqe(t);n&&(r=[r.reduce(function(i,a){return[].concat(CY(i),CY(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},bqe=function(t,n,r){var o=ix(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(ix(n.reverse(),r).slice(1))},xqe=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=fqe(t,dqe);if(!n||!n.length)return null;var s=fe("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=bqe(n,o,i);return J.createElement("g",{className:s},J.createElement("path",yg({},zt(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?J.createElement("path",yg({},zt(a,!0),{fill:"none",d:ix(n,i)})):null,l?J.createElement("path",yg({},zt(a,!0),{fill:"none",d:ix(o,i)})):null)}var u=ix(n,i);return J.createElement("path",yg({},zt(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function sF(){return sF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sF.apply(this,arguments)}var Tw=function(t){var n=t.cx,r=t.cy,o=t.r,i=t.className,a=fe("recharts-dot",i);return n===+n&&r===+r&&o===+o?J.createElement("circle",sF({},zt(t,!1),fT(t),{className:a,cx:n,cy:r,r:o})):null};function lS(e){"@babel/helpers - typeof";return lS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lS(e)}var Sqe=["x","y","top","left","width","height","className"];function lF(){return lF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lF.apply(this,arguments)}function TY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wqe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TY(Object(n),!0).forEach(function(r){Cqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cqe(e,t,n){return t=Eqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eqe(e){var t=Tqe(e,"string");return lS(t)=="symbol"?t:t+""}function Tqe(e,t){if(lS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oqe(e,t){if(e==null)return{};var n=Iqe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Iqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Pqe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},Aqe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,f=u===void 0?0:u,h=t.height,m=h===void 0?0:h,g=t.className,y=Oqe(t,Sqe),v=wqe({x:r,y:i,top:s,left:c,width:f,height:m},y);return!mt(r)||!mt(i)||!mt(f)||!mt(m)||!mt(s)||!mt(c)?null:J.createElement("path",lF({},zt(v,!0),{className:fe("recharts-cross",g),d:Pqe(r,i,f,m,s,c)}))},T_,OY;function Mqe(){if(OY)return T_;OY=1;var e=ZI(),t=Gae(),n=Uc();function r(o,i){return o&&o.length?e(o,n(i,2),t):void 0}return T_=r,T_}var Rqe=Mqe();const Dqe=Gn(Rqe);var O_,IY;function kqe(){if(IY)return O_;IY=1;var e=ZI(),t=Uc(),n=qae();function r(o,i){return o&&o.length?e(o,t(i,2),n):void 0}return O_=r,O_}var _qe=kqe();const $qe=Gn(_qe);var Nqe=["cx","cy","angle","ticks","axisLine"],Lqe=["ticks","tick","angle","tickFormatter","stroke"];function Cy(e){"@babel/helpers - typeof";return Cy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cy(e)}function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ax.apply(this,arguments)}function PY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PY(Object(n),!0).forEach(function(r){rP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AY(e,t){if(e==null)return{};var n=Fqe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dse(r.key),r)}}function Bqe(e,t,n){return t&&MY(e.prototype,t),n&&MY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zqe(e,t,n){return t=HT(t),Vqe(e,Rse()?Reflect.construct(t,n||[],HT(e).constructor):t.apply(e,n))}function Vqe(e,t){if(t&&(Cy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hqe(e)}function Hqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rse=function(){return!!e})()}function HT(e){return HT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},HT(e)}function Uqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cF(e,t)}function cF(e,t){return cF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},cF(e,t)}function rP(e,t,n){return t=Dse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dse(e){var t=Gqe(e,"string");return Cy(t)=="symbol"?t:t+""}function Gqe(e,t){if(Cy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oP=function(e){function t(){return jqe(this,t),zqe(this,t,arguments)}return Uqe(t,e),Bqe(t,[{key:"getTickValueCoord",value:function(r){var o=r.coordinate,i=this.props,a=i.angle,s=i.cx,l=i.cy;return Nr(s,l,o,a)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,o;switch(r){case"left":o="end";break;case"right":o="start";break;default:o="middle";break}return o}},{key:"getViewBox",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.angle,s=r.ticks,l=Dqe(s,function(u){return u.coordinate||0}),c=$qe(s,function(u){return u.coordinate||0});return{cx:o,cy:i,startAngle:a,endAngle:a,innerRadius:c.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.angle,s=r.ticks,l=r.axisLine,c=AY(r,Nqe),u=s.reduce(function(g,y){return[Math.min(g[0],y.coordinate),Math.max(g[1],y.coordinate)]},[1/0,-1/0]),f=Nr(o,i,u[0],a),h=Nr(o,i,u[1],a),m=vp(vp(vp({},zt(c,!1)),{},{fill:"none"},zt(l,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return J.createElement("line",ax({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.angle,l=o.tickFormatter,c=o.stroke,u=AY(o,Lqe),f=this.getTickTextAnchor(),h=zt(u,!1),m=zt(a,!1),g=i.map(function(y,v){var w=r.getTickValueCoord(y),C=vp(vp(vp(vp({textAnchor:f,transform:"rotate(".concat(90-s,", ").concat(w.x,", ").concat(w.y,")")},h),{},{stroke:"none",fill:c},m),{},{index:v},w),{},{payload:y});return J.createElement(wn,ax({className:fe("recharts-polar-radius-axis-tick",xse(a)),key:"tick-".concat(y.coordinate)},If(r.props,y,v)),t.renderTickItem(a,C,l?l(y.value,v):y.value))});return J.createElement(wn,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.axisLine,a=r.tick;return!o||!o.length?null:J.createElement(wn,{className:fe("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),a&&this.renderTicks(),oi.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):rn(r)?a=r(o):a=J.createElement(wh,ax({},o,{className:"recharts-polar-radius-axis-tick-value"}),i),a}}])}(x.PureComponent);rP(oP,"displayName","PolarRadiusAxis");rP(oP,"axisType","radiusAxis");rP(oP,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Ey(e){"@babel/helpers - typeof";return Ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ey(e)}function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_p.apply(this,arguments)}function RY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RY(Object(n),!0).forEach(function(r){iP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_se(r.key),r)}}function Wqe(e,t,n){return t&&DY(e.prototype,t),n&&DY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kqe(e,t,n){return t=UT(t),Yqe(e,kse()?Reflect.construct(t,n||[],UT(e).constructor):t.apply(e,n))}function Yqe(e,t){if(t&&(Ey(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qqe(e)}function Qqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kse=function(){return!!e})()}function UT(e){return UT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},UT(e)}function Xqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uF(e,t)}function uF(e,t){return uF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},uF(e,t)}function iP(e,t,n){return t=_se(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _se(e){var t=Jqe(e,"string");return Ey(t)=="symbol"?t:t+""}function Jqe(e,t){if(Ey(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ey(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Zqe=Math.PI/180,eWe=1e-5,aP=function(e){function t(){return qqe(this,t),Kqe(this,t,arguments)}return Xqe(t,e),Wqe(t,[{key:"getTickLineCoord",value:function(r){var o=this.props,i=o.cx,a=o.cy,s=o.radius,l=o.orientation,c=o.tickSize,u=c||8,f=Nr(i,a,s,r.coordinate),h=Nr(i,a,s+(l==="inner"?-1:1)*u,r.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(r){var o=this.props.orientation,i=Math.cos(-r.coordinate*Zqe),a;return i>eWe?a=o==="outer"?"start":"end":i<-1e-5?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=bp(bp({},zt(this.props,!1)),{},{fill:"none"},zt(s,!1));if(l==="circle")return J.createElement(Tw,_p({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,f=u.map(function(h){return Nr(o,i,a,h.coordinate)});return J.createElement(xqe,_p({className:"recharts-polar-angle-axis-line"},c,{points:f}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=zt(this.props,!1),f=zt(a,!1),h=bp(bp({},u),{},{fill:"none"},zt(s,!1)),m=i.map(function(g,y){var v=r.getTickLineCoord(g),w=r.getTickTextAnchor(g),C=bp(bp(bp({textAnchor:w},u),{},{stroke:"none",fill:c},f),{},{index:y,payload:g,x:v.x2,y:v.y2});return J.createElement(wn,_p({className:fe("recharts-polar-angle-axis-tick",xse(a)),key:"tick-".concat(g.coordinate)},If(r.props,g,y)),s&&J.createElement("line",_p({className:"recharts-polar-angle-axis-tick-line"},h,v)),a&&t.renderTickItem(a,C,l?l(g.value,y):g.value))});return J.createElement(wn,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:J.createElement(wn,{className:fe("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):rn(r)?a=r(o):a=J.createElement(wh,_p({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(x.PureComponent);iP(aP,"displayName","PolarAngleAxis");iP(aP,"axisType","angleAxis");iP(aP,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var I_,kY;function tWe(){if(kY)return I_;kY=1;var e=Hie(),t=e(Object.getPrototypeOf,Object);return I_=t,I_}var P_,_Y;function nWe(){if(_Y)return P_;_Y=1;var e=Zu(),t=tWe(),n=ed(),r="[object Object]",o=Function.prototype,i=Object.prototype,a=o.toString,s=i.hasOwnProperty,l=a.call(Object);function c(u){if(!n(u)||e(u)!=r)return!1;var f=t(u);if(f===null)return!0;var h=s.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&a.call(h)==l}return P_=c,P_}var rWe=nWe();const oWe=Gn(rWe);var A_,$Y;function iWe(){if($Y)return A_;$Y=1;var e=Zu(),t=ed(),n="[object Boolean]";function r(o){return o===!0||o===!1||t(o)&&e(o)==n}return A_=r,A_}var aWe=iWe();const sWe=Gn(aWe);function cS(e){"@babel/helpers - typeof";return cS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cS(e)}function GT(){return GT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GT.apply(this,arguments)}function lWe(e,t){return fWe(e)||dWe(e,t)||uWe(e,t)||cWe()}function cWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uWe(e,t){if(e){if(typeof e=="string")return NY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NY(e,t)}}function NY(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dWe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function fWe(e){if(Array.isArray(e))return e}function LY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function FY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LY(Object(n),!0).forEach(function(r){pWe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pWe(e,t,n){return t=hWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hWe(e){var t=mWe(e,"string");return cS(t)=="symbol"?t:t+""}function mWe(e,t){if(cS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jY=function(t,n,r,o,i){var a=r-o,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-a/2,",").concat(n+i),s+="L ".concat(t+r-a/2-o,",").concat(n+i),s+="L ".concat(t,",").concat(n," Z"),s},gWe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},yWe=function(t){var n=FY(FY({},gWe),t),r=x.useRef(),o=x.useState(-1),i=lWe(o,2),a=i[0],s=i[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&s(E)}catch{}},[]);var l=n.x,c=n.y,u=n.upperWidth,f=n.lowerWidth,h=n.height,m=n.className,g=n.animationEasing,y=n.animationDuration,v=n.animationBegin,w=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||h!==+h||u===0&&f===0||h===0)return null;var C=fe("recharts-trapezoid",m);return w?J.createElement(ol,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:u,lowerWidth:f,height:h,x:l,y:c},duration:y,animationEasing:g,isActive:w},function(E){var I=E.upperWidth,O=E.lowerWidth,P=E.height,R=E.x,D=E.y;return J.createElement(ol,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,easing:g},J.createElement("path",GT({},zt(n,!0),{className:C,d:jY(R,D,I,O,P),ref:r})))}):J.createElement("g",null,J.createElement("path",GT({},zt(n,!0),{className:C,d:jY(l,c,u,f,h)})))},vWe=["option","shapeType","propTransformer","activeClassName","isActive"];function uS(e){"@babel/helpers - typeof";return uS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uS(e)}function bWe(e,t){if(e==null)return{};var n=xWe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xWe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function BY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BY(Object(n),!0).forEach(function(r){SWe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SWe(e,t,n){return t=wWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wWe(e){var t=CWe(e,"string");return uS(t)=="symbol"?t:t+""}function CWe(e,t){if(uS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EWe(e,t){return qT(qT({},t),e)}function TWe(e,t){return e==="symbols"}function zY(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return J.createElement(Nz,n);case"trapezoid":return J.createElement(yWe,n);case"sector":return J.createElement(Cse,n);case"symbols":if(TWe(t))return J.createElement(HI,n);break;default:return null}}function OWe(e){return x.isValidElement(e)?e.props:e}function WT(e){var t=e.option,n=e.shapeType,r=e.propTransformer,o=r===void 0?EWe:r,i=e.activeClassName,a=i===void 0?"recharts-active-shape":i,s=e.isActive,l=bWe(e,vWe),c;if(x.isValidElement(t))c=x.cloneElement(t,qT(qT({},l),OWe(t)));else if(rn(t))c=t(l);else if(oWe(t)&&!sWe(t)){var u=o(t,l);c=J.createElement(zY,{shapeType:n,elementProps:u})}else{var f=l;c=J.createElement(zY,{shapeType:n,elementProps:f})}return s?J.createElement(wn,{className:a},c):c}function sP(e,t){return t!=null&&"trapezoids"in e.props}function lP(e,t){return t!=null&&"sectors"in e.props}function dS(e,t){return t!=null&&"points"in e.props}function IWe(e,t){var n,r,o=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return o&&i}function PWe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function AWe(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function MWe(e,t){var n;return sP(e,t)?n=IWe:lP(e,t)?n=PWe:dS(e,t)&&(n=AWe),n}function RWe(e,t){var n;return sP(e,t)?n="trapezoids":lP(e,t)?n="sectors":dS(e,t)&&(n="points"),n}function DWe(e,t){if(sP(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(lP(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return dS(e,t)?t.payload:{}}function kWe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=RWe(n,t),i=DWe(n,t),a=r.filter(function(l,c){var u=Pf(i,l),f=n.props[o].filter(function(g){var y=MWe(n,t);return y(g,t)}),h=n.props[o].indexOf(f[f.length-1]),m=c===h;return u&&m}),s=r.indexOf(a[a.length-1]);return s}var CE;function Ty(e){"@babel/helpers - typeof";return Ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ty(e)}function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vg.apply(this,arguments)}function VY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VY(Object(n),!0).forEach(function(r){Bs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nse(r.key),r)}}function $We(e,t,n){return t&&HY(e.prototype,t),n&&HY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function NWe(e,t,n){return t=KT(t),LWe(e,$se()?Reflect.construct(t,n||[],KT(e).constructor):t.apply(e,n))}function LWe(e,t){if(t&&(Ty(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FWe(e)}function FWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($se=function(){return!!e})()}function KT(e){return KT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},KT(e)}function jWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dF(e,t)}function dF(e,t){return dF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},dF(e,t)}function Bs(e,t,n){return t=Nse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nse(e){var t=BWe(e,"string");return Ty(t)=="symbol"?t:t+""}function BWe(e,t){if(Ty(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gc=function(e){function t(n){var r;return _We(this,t),r=NWe(this,t,[n]),Bs(r,"pieRef",null),Bs(r,"sectorRefs",[]),Bs(r,"id",Bf("recharts-pie-")),Bs(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),rn(o)&&o()}),Bs(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),rn(o)&&o()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return jWe(t,e),$We(t,[{key:"isActiveIndex",value:function(r){var o=this.props.activeIndex;return Array.isArray(o)?o.indexOf(r)!==-1:r===o}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.label,s=i.labelLine,l=i.dataKey,c=i.valueKey,u=zt(this.props,!1),f=zt(a,!1),h=zt(s,!1),m=a&&a.offsetRadius||20,g=r.map(function(y,v){var w=(y.startAngle+y.endAngle)/2,C=Nr(y.cx,y.cy,y.outerRadius+m,w),E=_r(_r(_r(_r({},u),y),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(C.x,y.cx)},C),I=_r(_r(_r(_r({},u),y),{},{fill:"none",stroke:y.fill},h),{},{index:v,points:[Nr(y.cx,y.cy,y.outerRadius,w),C]}),O=l;return on(l)&&on(c)?O="value":on(l)&&(O=c),J.createElement(wn,{key:"label-".concat(y.startAngle,"-").concat(y.endAngle,"-").concat(y.midAngle,"-").concat(v)},s&&t.renderLabelLineItem(s,I,"line"),t.renderLabelItem(a,E,Vr(y,O)))});return J.createElement(wn,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(r){var o=this,i=this.props,a=i.activeShape,s=i.blendStroke,l=i.inactiveShape;return r.map(function(c,u){if((c==null?void 0:c.startAngle)===0&&(c==null?void 0:c.endAngle)===0&&r.length!==1)return null;var f=o.isActiveIndex(u),h=l&&o.hasActiveIndex()?l:null,m=f?a:h,g=_r(_r({},c),{},{stroke:s?c.fill:c.stroke,tabIndex:-1});return J.createElement(wn,vg({ref:function(v){v&&!o.sectorRefs.includes(v)&&o.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},If(o.props,c,u),{key:"sector-".concat(c==null?void 0:c.startAngle,"-").concat(c==null?void 0:c.endAngle,"-").concat(c.midAngle,"-").concat(u)}),J.createElement(WT,vg({option:m,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,o=this.props,i=o.sectors,a=o.isAnimationActive,s=o.animationBegin,l=o.animationDuration,c=o.animationEasing,u=o.animationId,f=this.state,h=f.prevSectors,m=f.prevIsAnimationActive;return J.createElement(ol,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(u,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var y=g.t,v=[],w=i&&i[0],C=w.startAngle;return i.forEach(function(E,I){var O=h&&h[I],P=I>0?Ja(E,"paddingAngle",0):0;if(O){var R=no(O.endAngle-O.startAngle,E.endAngle-E.startAngle),D=_r(_r({},E),{},{startAngle:C+P,endAngle:C+R(y)+P});v.push(D),C=D.endAngle}else{var M=E.endAngle,A=E.startAngle,_=no(0,M-A),N=_(y),B=_r(_r({},E),{},{startAngle:C+P,endAngle:C+N+P});v.push(B),C=B.endAngle}}),J.createElement(wn,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!Pf(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,f=o.innerRadius,h=o.outerRadius,m=o.isAnimationActive,g=this.state.isAnimationFinished;if(i||!a||!a.length||!mt(c)||!mt(u)||!mt(f)||!mt(h))return null;var y=fe("recharts-pie",s);return J.createElement(wn,{tabIndex:this.props.rootTabIndex,className:y,ref:function(w){r.pieRef=w}},this.renderSectors(),l&&this.renderLabels(a),oi.renderCallByParent(this.props,null,!1),(!m||g)&&Bl.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r<o?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,o,i){if(J.isValidElement(r))return J.cloneElement(r,o);if(rn(r))return r(o);var a=fe("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return J.createElement(vf,vg({},o,{key:i,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(r,o,i){if(J.isValidElement(r))return J.cloneElement(r,o);var a=i;if(rn(r)&&(a=r(o),J.isValidElement(a)))return a;var s=fe("recharts-pie-label-text",typeof r!="boolean"&&!rn(r)?r.className:"");return J.createElement(wh,vg({},o,{alignmentBaseline:"middle",className:s}),a)}}])}(x.PureComponent);CE=Gc;Bs(Gc,"displayName","Pie");Bs(Gc,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!td.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Bs(Gc,"parseDeltaAngle",function(e,t){var n=ta(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Bs(Gc,"getRealPieData",function(e){var t=e.data,n=e.children,r=zt(e,!1),o=sa(n,Ev);return t&&t.length?t.map(function(i,a){return _r(_r(_r({payload:i},r),i),o&&o[a]&&o[a].props)}):o&&o.length?o.map(function(i){return _r(_r({},r),i.props)}):[]});Bs(Gc,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=bse(o,i),s=r+na(e.cx,o,o/2),l=n+na(e.cy,i,i/2),c=na(e.innerRadius,a,0),u=na(e.outerRadius,a,a*.8),f=e.maxRadius||Math.sqrt(o*o+i*i)/2;return{cx:s,cy:l,innerRadius:c,outerRadius:u,maxRadius:f}});Bs(Gc,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?_r(_r({},t.type.defaultProps),t.props):t.props,o=CE.getRealPieData(r);if(!o||!o.length)return null;var i=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,u=r.nameKey,f=r.valueKey,h=r.tooltipType,m=Math.abs(r.minAngle),g=CE.parseCoordinateOfPie(r,n),y=CE.parseDeltaAngle(a,s),v=Math.abs(y),w=c;on(c)&&on(f)?(jl(!1,`Use "dataKey" to specify the value of pie,
- the props "valueKey" will be deprecated in 1.1.0`),w="value"):on(c)&&(jl(!1,`Use "dataKey" to specify the value of pie,
- the props "valueKey" will be deprecated in 1.1.0`),w=f);var C=o.filter(function(D){return Vr(D,w,0)!==0}).length,E=(v>=360?C:C-1)*l,I=v-C*m-E,O=o.reduce(function(D,M){var A=Vr(M,w,0);return D+(mt(A)?A:0)},0),P;if(O>0){var R;P=o.map(function(D,M){var A=Vr(D,w,0),_=Vr(D,u,M),N=(mt(A)?A:0)/O,B;M?B=R.endAngle+ta(y)*l*(A!==0?1:0):B=a;var H=B+ta(y)*((A!==0?m:0)+N*I),j=(B+H)/2,L=(g.innerRadius+g.outerRadius)/2,V=[{name:_,value:A,payload:D,dataKey:w,type:h}],W=Nr(g.cx,g.cy,L,j);return R=_r(_r(_r({percent:N,cornerRadius:i,name:_,tooltipPayload:V,midAngle:j,middleRadius:L,tooltipPosition:W},D),g),{},{value:Vr(D,w),startAngle:B,endAngle:H,payload:D,paddingAngle:ta(y)*l}),R})}return _r(_r({},g),{},{sectors:P,data:o})});var M_,UY;function zWe(){if(UY)return M_;UY=1;var e=Math.ceil,t=Math.max;function n(r,o,i,a){for(var s=-1,l=t(e((o-r)/(i||1)),0),c=Array(l);l--;)c[a?l:++s]=r,r+=i;return c}return M_=n,M_}var R_,GY;function Lse(){if(GY)return R_;GY=1;var e=iae(),t=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-1/0){var i=o<0?-1:1;return i*n}return o===o?o:0}return R_=r,R_}var D_,qY;function VWe(){if(qY)return D_;qY=1;var e=zWe(),t=qI(),n=Lse();function r(o){return function(i,a,s){return s&&typeof s!="number"&&t(i,a,s)&&(a=s=void 0),i=n(i),a===void 0?(a=i,i=0):a=n(a),s=s===void 0?i<a?1:-1:n(s),e(i,a,s,o)}}return D_=r,D_}var k_,WY;function HWe(){if(WY)return k_;WY=1;var e=VWe(),t=e();return k_=t,k_}var UWe=HWe();const YT=Gn(UWe);function fS(e){"@babel/helpers - typeof";return fS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fS(e)}function KY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function YY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KY(Object(n),!0).forEach(function(r){Fse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fse(e,t,n){return t=GWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GWe(e){var t=qWe(e,"string");return fS(t)=="symbol"?t:t+""}function qWe(e,t){if(fS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WWe=["Webkit","Moz","O","ms"],KWe=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),o=WWe.reduce(function(i,a){return YY(YY({},i),{},Fse({},a+r,n))},{});return o[t]=n,o};function Oy(e){"@babel/helpers - typeof";return Oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oy(e)}function QT(){return QT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QT.apply(this,arguments)}function QY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function __(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QY(Object(n),!0).forEach(function(r){za(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bse(r.key),r)}}function QWe(e,t,n){return t&&XY(e.prototype,t),n&&XY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XWe(e,t,n){return t=XT(t),JWe(e,jse()?Reflect.construct(t,n||[],XT(e).constructor):t.apply(e,n))}function JWe(e,t){if(t&&(Oy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZWe(e)}function ZWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jse=function(){return!!e})()}function XT(e){return XT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},XT(e)}function e8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fF(e,t)}function fF(e,t){return fF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},fF(e,t)}function za(e,t,n){return t=Bse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bse(e){var t=t8e(e,"string");return Oy(t)=="symbol"?t:t+""}function t8e(e,t){if(Oy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var n8e=function(t){var n=t.data,r=t.startIndex,o=t.endIndex,i=t.x,a=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=nx().domain(YT(0,l)).range([i,i+a-s]),u=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(o),scale:c,scaleValues:u}},JY=function(t){return t.changedTouches&&!!t.changedTouches.length},Iy=function(e){function t(n){var r;return YWe(this,t),r=XWe(this,t,[n]),za(r,"handleDrag",function(o){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(o):r.state.isSlideMoving&&r.handleSlideDrag(o)}),za(r,"handleTouchMove",function(o){o.changedTouches!=null&&o.changedTouches.length>0&&r.handleDrag(o.changedTouches[0])}),za(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),za(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),za(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),za(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),za(r,"handleSlideDragStart",function(o){var i=JY(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return e8e(t,e),QWe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,f=Math.min(o,i),h=Math.max(o,i),m=t.getIndexInRange(a,f),g=t.getIndexInRange(a,h);return{startIndex:m-m%l,endIndex:g===u?u:g-g%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=Vr(i[r],s,r);return rn(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,f=l.travellerWidth,h=l.startIndex,m=l.endIndex,g=l.onChange,y=r.pageX-i;y>0?y=Math.min(y,c+u-f-s,c+u-f-a):y<0&&(y=Math.max(y,c-a,c-s));var v=this.getIndex({startX:a+y,endX:s+y});(v.startIndex!==h||v.endIndex!==m)&&g&&g(v),this.setState({startX:a+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=JY(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,f=u.x,h=u.width,m=u.travellerWidth,g=u.onChange,y=u.gap,v=u.data,w={startX:this.state.startX,endX:this.state.endX},C=r.pageX-i;C>0?C=Math.min(C,f+h-m-c):C<0&&(C=Math.max(C,f-c)),w[a]=c+C;var E=this.getIndex(w),I=E.startIndex,O=E.endIndex,P=function(){var D=v.length-1;return a==="startX"&&(s>l?I%y===0:O%y===0)||s<l&&O===D||a==="endX"&&(s>l?O%y===0:I%y===0)||s>l&&O===D};this.setState(za(za({},a,c+C),"brushMoveStartX",r.pageX),function(){g&&P()&&g(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],f=s.indexOf(u);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var m=s[h];o==="startX"&&m>=c||o==="endX"&&m<=l||this.setState(za({},o,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return J.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,f=x.Children.only(c);return f?J.cloneElement(f,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,f=l.height,h=l.traveller,m=l.ariaLabel,g=l.data,y=l.startIndex,v=l.endIndex,w=Math.max(r,this.props.x),C=__(__({},zt(this.props,!1)),{},{x:w,y:c,width:u,height:f}),E=m||"Min value: ".concat((i=g[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=g[v])===null||a===void 0?void 0:a.name);return J.createElement(wn,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),s.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,C))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,f=Math.max(Math.abs(o-r)-c,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,f=u.startX,h=u.endX,m=5,g={pointerEvents:"none",fill:c};return J.createElement(wn,{className:"recharts-brush-texts"},J.createElement(wh,QT({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-m,y:a+s/2},g),this.getTextOfTick(o)),J.createElement(wh,QT({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+m,y:a+s/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,f=r.alwaysShowText,h=this.state,m=h.startX,g=h.endX,y=h.isTextActive,v=h.isSlideMoving,w=h.isTravellerMoving,C=h.isTravellerFocused;if(!o||!o.length||!mt(s)||!mt(l)||!mt(c)||!mt(u)||c<=0||u<=0)return null;var E=fe("recharts-brush",i),I=J.Children.count(a)===1,O=KWe("userSelect","none");return J.createElement(wn,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),I&&this.renderPanorama(),this.renderSlide(m,g),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(g,"endX"),(y||v||w||C||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),J.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return J.isValidElement(r)?i=J.cloneElement(r,o):rn(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,f=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return __({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?n8e({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var h=o.scale.domain().map(function(m){return o.scale(m)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(x.PureComponent);za(Iy,"displayName","Brush");za(Iy,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var $_,ZY;function r8e(){if(ZY)return $_;ZY=1;var e=lz();function t(n,r){var o;return e(n,function(i,a,s){return o=r(i,a,s),!o}),!!o}return $_=t,$_}var N_,eQ;function o8e(){if(eQ)return N_;eQ=1;var e=Nie(),t=Uc(),n=r8e(),r=Aa(),o=qI();function i(a,s,l){var c=r(a)?e:n;return l&&o(a,s,l)&&(s=void 0),c(a,t(s,3))}return N_=i,N_}var i8e=o8e();const a8e=Gn(i8e);var Pc=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},L_,tQ;function s8e(){if(tQ)return L_;tQ=1;var e=eae();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return L_=t,L_}var F_,nQ;function l8e(){if(nQ)return F_;nQ=1;var e=s8e(),t=Jie(),n=Uc();function r(o,i){var a={};return i=n(i,3),t(o,function(s,l,c){e(a,l,i(s,l,c))}),a}return F_=r,F_}var c8e=l8e();const u8e=Gn(c8e);var j_,rQ;function d8e(){if(rQ)return j_;rQ=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(!n(t[r],r,t))return!1;return!0}return j_=e,j_}var B_,oQ;function f8e(){if(oQ)return B_;oQ=1;var e=lz();function t(n,r){var o=!0;return e(n,function(i,a,s){return o=!!r(i,a,s),o}),o}return B_=t,B_}var z_,iQ;function p8e(){if(iQ)return z_;iQ=1;var e=d8e(),t=f8e(),n=Uc(),r=Aa(),o=qI();function i(a,s,l){var c=r(a)?e:t;return l&&o(a,s,l)&&(s=void 0),c(a,n(s,3))}return z_=i,z_}var h8e=p8e();const zse=Gn(h8e);var m8e=["x","y"];function pS(e){"@babel/helpers - typeof";return pS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pS(e)}function pF(){return pF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pF.apply(this,arguments)}function aQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function d0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aQ(Object(n),!0).forEach(function(r){g8e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g8e(e,t,n){return t=y8e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y8e(e){var t=v8e(e,"string");return pS(t)=="symbol"?t:t+""}function v8e(e,t){if(pS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b8e(e,t){if(e==null)return{};var n=x8e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function S8e(e,t){var n=e.x,r=e.y,o=b8e(e,m8e),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),f="".concat(t.width||o.width),h=parseInt(f,10);return d0(d0(d0(d0(d0({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:h,name:t.name,radius:t.radius})}function sQ(e){return J.createElement(WT,pF({shapeType:"rectangle",propTransformer:S8e,activeClassName:"recharts-active-bar"},e))}var w8e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||Af(),n)}},C8e=["value","background"],Vse;function Py(e){"@babel/helpers - typeof";return Py=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Py(e)}function E8e(e,t){if(e==null)return{};var n=T8e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function T8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function JT(){return JT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JT.apply(this,arguments)}function lQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Po(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lQ(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Use(r.key),r)}}function I8e(e,t,n){return t&&cQ(e.prototype,t),n&&cQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function P8e(e,t,n){return t=ZT(t),A8e(e,Hse()?Reflect.construct(t,n||[],ZT(e).constructor):t.apply(e,n))}function A8e(e,t){if(t&&(Py(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M8e(e)}function M8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hse=function(){return!!e})()}function ZT(e){return ZT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ZT(e)}function R8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hF(e,t)}function hF(e,t){return hF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},hF(e,t)}function pf(e,t,n){return t=Use(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Use(e){var t=D8e(e,"string");return Py(t)=="symbol"?t:t+""}function D8e(e,t){if(Py(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Py(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ac=function(e){function t(){var n;O8e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=P8e(this,t,[].concat(o)),pf(n,"state",{isAnimationFinished:!1}),pf(n,"id",Bf("recharts-bar-")),pf(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),a&&a()}),pf(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),a&&a()}),n}return R8e(t,e),I8e(t,[{key:"renderRectanglesStatically",value:function(r){var o=this,i=this.props,a=i.shape,s=i.dataKey,l=i.activeIndex,c=i.activeBar,u=zt(this.props,!1);return r&&r.map(function(f,h){var m=h===l,g=m?c:a,y=Po(Po(Po({},u),f),{},{isActive:m,option:g,index:h,dataKey:s,onAnimationStart:o.handleAnimationStart,onAnimationEnd:o.handleAnimationEnd});return J.createElement(wn,JT({className:"recharts-bar-rectangle"},If(o.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),J.createElement(sQ,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,o=this.props,i=o.data,a=o.layout,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,f=o.animationId,h=this.state.prevData;return J.createElement(ol,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var g=m.t,y=i.map(function(v,w){var C=h&&h[w];if(C){var E=no(C.x,v.x),I=no(C.y,v.y),O=no(C.width,v.width),P=no(C.height,v.height);return Po(Po({},v),{},{x:E(g),y:I(g),width:O(g),height:P(g)})}if(a==="horizontal"){var R=no(0,v.height),D=R(g);return Po(Po({},v),{},{y:v.y+v.height-D,height:D})}var M=no(0,v.width),A=M(g);return Po(Po({},v),{},{width:A})});return J.createElement(wn,null,r.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var r=this.props,o=r.data,i=r.isAnimationActive,a=this.state.prevData;return i&&o&&o.length&&(!a||!Pf(a,o))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(o)}},{key:"renderBackground",value:function(){var r=this,o=this.props,i=o.data,a=o.dataKey,s=o.activeIndex,l=zt(this.props.background,!1);return i.map(function(c,u){c.value;var f=c.background,h=E8e(c,C8e);if(!f)return null;var m=Po(Po(Po(Po(Po({},h),{},{fill:"#eee"},f),l),If(r.props,c,u)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:a,index:u,className:"recharts-bar-background-rectangle"});return J.createElement(sQ,JT({key:"background-bar-".concat(u),option:r.props.background,isActive:u===s},m))})}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.data,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,f=sa(u,Pv);if(!f)return null;var h=c==="vertical"?a[0].height/2:a[0].width/2,m=function(v,w){var C=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:C,errorVal:Vr(v,w)}},g={clipPath:r?"url(#clipPath-".concat(o,")"):null};return J.createElement(wn,g,f.map(function(y){return J.cloneElement(y,{key:"error-bar-".concat(o,"-").concat(y.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,o=r.hide,i=r.data,a=r.className,s=r.xAxis,l=r.yAxis,c=r.left,u=r.top,f=r.width,h=r.height,m=r.isAnimationActive,g=r.background,y=r.id;if(o||!i||!i.length)return null;var v=this.state.isAnimationFinished,w=fe("recharts-bar",a),C=s&&s.allowDataOverflow,E=l&&l.allowDataOverflow,I=C||E,O=on(y)?this.id:y;return J.createElement(wn,{className:w},C||E?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(O)},J.createElement("rect",{x:C?c:c-f/2,y:E?u:u-h/2,width:C?f:f*2,height:E?h:h*2}))):null,J.createElement(wn,{className:"recharts-bar-rectangles",clipPath:I?"url(#clipPath-".concat(O,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(I,O),(!m||v)&&Bl.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:o.curData}:r.data!==o.curData?{curData:r.data}:null}}])}(x.PureComponent);Vse=Ac;pf(Ac,"displayName","Bar");pf(Ac,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!td.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});pf(Ac,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,h=e.offset,m=u3e(r,n);if(!m)return null;var g=t.layout,y=n.type.defaultProps,v=y!==void 0?Po(Po({},y),n.props):n.props,w=v.dataKey,C=v.children,E=v.minPointSize,I=g==="horizontal"?a:i,O=c?I.scale.domain():null,P=y3e({numericAxis:I}),R=sa(C,Ev),D=f.map(function(M,A){var _,N,B,H,j,L;c?_=d3e(c[u+A],O):(_=Vr(M,w),Array.isArray(_)||(_=[P,_]));var V=w8e(E,Vse.defaultProps.minPointSize)(_[1],A);if(g==="horizontal"){var W,K=[a.scale(_[0]),a.scale(_[1])],G=K[0],q=K[1];N=FK({axis:i,ticks:s,bandSize:o,offset:m.offset,entry:M,index:A}),B=(W=q??G)!==null&&W!==void 0?W:void 0,H=m.size;var Y=G-q;if(j=Number.isNaN(Y)?0:Y,L={x:N,y:a.y,width:H,height:a.height},Math.abs(V)>0&&Math.abs(j)<Math.abs(V)){var Z=ta(j||V)*(Math.abs(V)-Math.abs(j));B-=Z,j+=Z}}else{var ie=[i.scale(_[0]),i.scale(_[1])],se=ie[0],ce=ie[1];if(N=se,B=FK({axis:a,ticks:l,bandSize:o,offset:m.offset,entry:M,index:A}),H=ce-se,j=m.size,L={x:i.x,y:B,width:i.width,height:j},Math.abs(V)>0&&Math.abs(H)<Math.abs(V)){var ye=ta(H||V)*(Math.abs(V)-Math.abs(H));H+=ye}}return Po(Po(Po({},M),{},{x:N,y:B,width:H,height:j,value:c?_:_[1],payload:M,background:L},R&&R[A]&&R[A].props),{},{tooltipPayload:[yse(n,M)],tooltipPosition:{x:N+H/2,y:B+j/2}})});return Po({data:D,layout:g},h)});function hS(e){"@babel/helpers - typeof";return hS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hS(e)}function k8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gse(r.key),r)}}function _8e(e,t,n){return t&&uQ(e.prototype,t),n&&uQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ol(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dQ(Object(n),!0).forEach(function(r){cP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cP(e,t,n){return t=Gse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gse(e){var t=$8e(e,"string");return hS(t)=="symbol"?t:t+""}function $8e(e,t){if(hS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uP=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.layout,c=t.children,u=Object.keys(n),f={left:r.left,leftMirror:r.left,right:a-r.right,rightMirror:a-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},h=!!Va(c,Ac);return u.reduce(function(m,g){var y=n[g],v=y.orientation,w=y.domain,C=y.padding,E=C===void 0?{}:C,I=y.mirror,O=y.reversed,P="".concat(v).concat(I?"Mirror":""),R,D,M,A,_;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var N=w[1]-w[0],B=1/0,H=y.categoricalDomain.sort(eje);if(H.forEach(function(ie,se){se>0&&(B=Math.min((ie||0)-(H[se-1]||0),B))}),Number.isFinite(B)){var j=B/N,L=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(R=j*L/2),y.padding==="no-gap"){var V=na(t.barCategoryGap,j*L),W=j*L/2;R=W-V-(W-V)/L*V}}}o==="xAxis"?D=[r.left+(E.left||0)+(R||0),r.left+r.width-(E.right||0)-(R||0)]:o==="yAxis"?D=l==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(R||0),r.top+r.height-(E.bottom||0)-(R||0)]:D=y.range,O&&(D=[D[1],D[0]]);var K=pse(y,i,h),G=K.scale,q=K.realScaleType;G.domain(w).range(D),hse(G);var Y=mse(G,Ol(Ol({},y),{},{realScaleType:q}));o==="xAxis"?(_=v==="top"&&!I||v==="bottom"&&I,M=r.left,A=f[P]-_*y.height):o==="yAxis"&&(_=v==="left"&&!I||v==="right"&&I,M=f[P]-_*y.width,A=r.top);var Z=Ol(Ol(Ol({},y),Y),{},{realScaleType:q,x:M,y:A,scale:G,width:o==="xAxis"?r.width:y.width,height:o==="yAxis"?r.height:y.height});return Z.bandSize=NT(Z,Y),!y.hide&&o==="xAxis"?f[P]+=(_?-1:1)*Z.height:y.hide||(f[P]+=(_?-1:1)*Z.width),Ol(Ol({},m),{},cP({},g,Z))},{})},qse=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},N8e=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return qse({x:n,y:r},{x:o,y:i})},Wse=function(){function e(t){k8e(this,e),this.scale=t}return _8e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();cP(Wse,"EPS",1e-4);var Lz=function(t){var n=Object.keys(t).reduce(function(r,o){return Ol(Ol({},r),{},cP({},o,Wse.create(t[o])))},{});return Ol(Ol({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return u8e(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return zse(o,function(i,a){return n[a].isInRange(i)})}})};function L8e(e){return(e%180+180)%180}var F8e=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=L8e(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},V_,fQ;function j8e(){if(fQ)return V_;fQ=1;var e=Uc(),t=xw(),n=UI();function r(o){return function(i,a,s){var l=Object(i);if(!t(i)){var c=e(a,3);i=n(i),a=function(f){return c(l[f],f,l)}}var u=o(i,a,s);return u>-1?l[c?i[u]:u]:void 0}}return V_=r,V_}var H_,pQ;function B8e(){if(pQ)return H_;pQ=1;var e=Lse();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return H_=t,H_}var U_,hQ;function z8e(){if(hQ)return U_;hQ=1;var e=Wie(),t=Uc(),n=B8e(),r=Math.max;function o(i,a,s){var l=i==null?0:i.length;if(!l)return-1;var c=s==null?0:n(s);return c<0&&(c=r(l+c,0)),e(i,t(a,3),c)}return U_=o,U_}var G_,mQ;function V8e(){if(mQ)return G_;mQ=1;var e=j8e(),t=z8e(),n=e(t);return G_=n,G_}var H8e=V8e();const U8e=Gn(H8e);var G8e=lie();const q8e=Gn(G8e);var W8e=q8e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Fz=x.createContext(void 0),jz=x.createContext(void 0),Kse=x.createContext(void 0),Yse=x.createContext({}),Qse=x.createContext(void 0),Xse=x.createContext(0),Jse=x.createContext(0),gQ=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=W8e(i);return J.createElement(Fz.Provider,{value:r},J.createElement(jz.Provider,{value:o},J.createElement(Yse.Provider,{value:i},J.createElement(Kse.Provider,{value:u},J.createElement(Qse.Provider,{value:a},J.createElement(Xse.Provider,{value:c},J.createElement(Jse.Provider,{value:l},s)))))))},K8e=function(){return x.useContext(Qse)},Zse=function(t){var n=x.useContext(Fz);n==null&&Af();var r=n[t];return r==null&&Af(),r},Y8e=function(){var t=x.useContext(Fz);return Qd(t)},Q8e=function(){var t=x.useContext(jz),n=U8e(t,function(r){return zse(r.domain,Number.isFinite)});return n||Qd(t)},ele=function(t){var n=x.useContext(jz);n==null&&Af();var r=n[t];return r==null&&Af(),r},X8e=function(){var t=x.useContext(Kse);return t},J8e=function(){return x.useContext(Yse)},Bz=function(){return x.useContext(Jse)},zz=function(){return x.useContext(Xse)};function Ay(e){"@babel/helpers - typeof";return Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ay(e)}function Z8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e9e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nle(r.key),r)}}function t9e(e,t,n){return t&&e9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n9e(e,t,n){return t=eO(t),r9e(e,tle()?Reflect.construct(t,n||[],eO(e).constructor):t.apply(e,n))}function r9e(e,t){if(t&&(Ay(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o9e(e)}function o9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tle=function(){return!!e})()}function eO(e){return eO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},eO(e)}function i9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mF(e,t)}function mF(e,t){return mF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},mF(e,t)}function yQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yQ(Object(n),!0).forEach(function(r){Vz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vz(e,t,n){return t=nle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nle(e){var t=a9e(e,"string");return Ay(t)=="symbol"?t:t+""}function a9e(e,t){if(Ay(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ay(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function s9e(e,t){return d9e(e)||u9e(e,t)||c9e(e,t)||l9e()}function l9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c9e(e,t){if(e){if(typeof e=="string")return bQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bQ(e,t)}}function bQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u9e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function d9e(e){if(Array.isArray(e))return e}function gF(){return gF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gF.apply(this,arguments)}var f9e=function(t,n){var r;return J.isValidElement(t)?r=J.cloneElement(t,n):rn(t)?r=t(n):r=J.createElement("line",gF({},n,{className:"recharts-reference-line-line"})),r},p9e=function(t,n,r,o,i,a,s,l,c){var u=i.x,f=i.y,h=i.width,m=i.height;if(r){var g=c.y,y=t.y.apply(g,{position:a});if(Pc(c,"discard")&&!t.y.isInRange(y))return null;var v=[{x:u+h,y},{x:u,y}];return l==="left"?v.reverse():v}if(n){var w=c.x,C=t.x.apply(w,{position:a});if(Pc(c,"discard")&&!t.x.isInRange(C))return null;var E=[{x:C,y:f+m},{x:C,y:f}];return s==="top"?E.reverse():E}if(o){var I=c.segment,O=I.map(function(P){return t.apply(P,{position:a})});return Pc(c,"discard")&&a8e(O,function(P){return!t.isInRange(P)})?null:O}return null};function h9e(e){var t=e.x,n=e.y,r=e.segment,o=e.xAxisId,i=e.yAxisId,a=e.shape,s=e.className,l=e.alwaysShow,c=K8e(),u=Zse(o),f=ele(i),h=X8e();if(!c||!h)return null;jl(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Lz({x:u.scale,y:f.scale}),g=Vo(t),y=Vo(n),v=r&&r.length===2,w=p9e(m,g,y,v,h,e.position,u.orientation,f.orientation,e);if(!w)return null;var C=s9e(w,2),E=C[0],I=E.x,O=E.y,P=C[1],R=P.x,D=P.y,M=Pc(e,"hidden")?"url(#".concat(c,")"):void 0,A=vQ(vQ({clipPath:M},zt(e,!0)),{},{x1:I,y1:O,x2:R,y2:D});return J.createElement(wn,{className:fe("recharts-reference-line",s)},f9e(a,A),oi.renderCallByParent(e,N8e({x1:I,y1:O,x2:R,y2:D})))}var Hz=function(e){function t(){return Z8e(this,t),n9e(this,t,arguments)}return i9e(t,e),t9e(t,[{key:"render",value:function(){return J.createElement(h9e,this.props)}}])}(J.Component);Vz(Hz,"displayName","ReferenceLine");Vz(Hz,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function yF(){return yF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yF.apply(this,arguments)}function My(e){"@babel/helpers - typeof";return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(e)}function xQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function SQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xQ(Object(n),!0).forEach(function(r){dP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g9e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ole(r.key),r)}}function y9e(e,t,n){return t&&g9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function v9e(e,t,n){return t=tO(t),b9e(e,rle()?Reflect.construct(t,n||[],tO(e).constructor):t.apply(e,n))}function b9e(e,t){if(t&&(My(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x9e(e)}function x9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rle=function(){return!!e})()}function tO(e){return tO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tO(e)}function S9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vF(e,t)}function vF(e,t){return vF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},vF(e,t)}function dP(e,t,n){return t=ole(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ole(e){var t=w9e(e,"string");return My(t)=="symbol"?t:t+""}function w9e(e,t){if(My(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(My(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var C9e=function(t){var n=t.x,r=t.y,o=t.xAxis,i=t.yAxis,a=Lz({x:o.scale,y:i.scale}),s=a.apply({x:n,y:r},{bandAware:!0});return Pc(t,"discard")&&!a.isInRange(s)?null:s},Ow=function(e){function t(){return m9e(this,t),v9e(this,t,arguments)}return S9e(t,e),y9e(t,[{key:"render",value:function(){var r=this.props,o=r.x,i=r.y,a=r.r,s=r.alwaysShow,l=r.clipPathId,c=Vo(o),u=Vo(i);if(jl(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var f=C9e(this.props);if(!f)return null;var h=f.x,m=f.y,g=this.props,y=g.shape,v=g.className,w=Pc(this.props,"hidden")?"url(#".concat(l,")"):void 0,C=SQ(SQ({clipPath:w},zt(this.props,!0)),{},{cx:h,cy:m});return J.createElement(wn,{className:fe("recharts-reference-dot",v)},t.renderDot(y,C),oi.renderCallByParent(this.props,{x:h-a,y:m-a,width:2*a,height:2*a}))}}])}(J.Component);dP(Ow,"displayName","ReferenceDot");dP(Ow,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});dP(Ow,"renderDot",function(e,t){var n;return J.isValidElement(e)?n=J.cloneElement(e,t):rn(e)?n=e(t):n=J.createElement(Tw,yF({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function bF(){return bF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bF.apply(this,arguments)}function Ry(e){"@babel/helpers - typeof";return Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ry(e)}function wQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function CQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wQ(Object(n),!0).forEach(function(r){fP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T9e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ale(r.key),r)}}function O9e(e,t,n){return t&&T9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function I9e(e,t,n){return t=nO(t),P9e(e,ile()?Reflect.construct(t,n||[],nO(e).constructor):t.apply(e,n))}function P9e(e,t){if(t&&(Ry(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A9e(e)}function A9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ile(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ile=function(){return!!e})()}function nO(e){return nO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nO(e)}function M9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xF(e,t)}function xF(e,t){return xF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},xF(e,t)}function fP(e,t,n){return t=ale(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ale(e){var t=R9e(e,"string");return Ry(t)=="symbol"?t:t+""}function R9e(e,t){if(Ry(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ry(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var D9e=function(t,n,r,o,i){var a=i.x1,s=i.x2,l=i.y1,c=i.y2,u=i.xAxis,f=i.yAxis;if(!u||!f)return null;var h=Lz({x:u.scale,y:f.scale}),m={x:t?h.x.apply(a,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(l,{position:"start"}):h.y.rangeMin},g={x:n?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:o?h.y.apply(c,{position:"end"}):h.y.rangeMax};return Pc(i,"discard")&&(!h.isInRange(m)||!h.isInRange(g))?null:qse(m,g)},pP=function(e){function t(){return E9e(this,t),I9e(this,t,arguments)}return M9e(t,e),O9e(t,[{key:"render",value:function(){var r=this.props,o=r.x1,i=r.x2,a=r.y1,s=r.y2,l=r.className,c=r.alwaysShow,u=r.clipPathId;jl(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Vo(o),h=Vo(i),m=Vo(a),g=Vo(s),y=this.props.shape;if(!f&&!h&&!m&&!g&&!y)return null;var v=D9e(f,h,m,g,this.props);if(!v&&!y)return null;var w=Pc(this.props,"hidden")?"url(#".concat(u,")"):void 0;return J.createElement(wn,{className:fe("recharts-reference-area",l)},t.renderRect(y,CQ(CQ({clipPath:w},zt(this.props,!0)),v)),oi.renderCallByParent(this.props,v))}}])}(J.Component);fP(pP,"displayName","ReferenceArea");fP(pP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});fP(pP,"renderRect",function(e,t){var n;return J.isValidElement(e)?n=J.cloneElement(e,t):rn(e)?n=e(t):n=J.createElement(Nz,bF({},t,{className:"recharts-reference-area-rect"})),n});function sle(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function k9e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return F8e(r,n)}function _9e(e,t,n){var r=n==="width",o=e.x,i=e.y,a=e.width,s=e.height;return t===1?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}function rO(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function $9e(e,t){return sle(e,t+1)}function N9e(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,f=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:sle(r,c)};var y=l,v,w=function(){return v===void 0&&(v=n(g,y)),v},C=g.coordinate,E=l===0||rO(e,C,w,u,s);E||(l=0,u=a,c+=1),E&&(u=C+e*(w()/2+o),l+=c)},h;c<=i.length;)if(h=f(),h)return h.v;return[]}function mS(e){"@babel/helpers - typeof";return mS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mS(e)}function EQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Di(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EQ(Object(n),!0).forEach(function(r){L9e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L9e(e,t,n){return t=F9e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F9e(e){var t=j9e(e,"string");return mS(t)=="symbol"?t:t+""}function j9e(e,t){if(mS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B9e(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,s=t.start,l=t.end,c=function(h){var m=i[h],g,y=function(){return g===void 0&&(g=n(m,h)),g};if(h===a-1){var v=e*(m.coordinate+e*y()/2-l);i[h]=m=Di(Di({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else i[h]=m=Di(Di({},m),{},{tickCoord:m.coordinate});var w=rO(e,m.tickCoord,y,s,l);w&&(l=m.tickCoord-e*(y()/2+o),i[h]=Di(Di({},m),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function z9e(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],f=n(u,s-1),h=e*(u.coordinate+e*f/2-c);a[s-1]=u=Di(Di({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate});var m=rO(e,u.tickCoord,function(){return f},l,c);m&&(c=u.tickCoord-e*(f/2+o),a[s-1]=Di(Di({},u),{},{isShow:!0}))}for(var g=i?s-1:s,y=function(C){var E=a[C],I,O=function(){return I===void 0&&(I=n(E,C)),I};if(C===0){var P=e*(E.coordinate-e*O()/2-l);a[C]=E=Di(Di({},E),{},{tickCoord:P<0?E.coordinate-P*e:E.coordinate})}else a[C]=E=Di(Di({},E),{},{tickCoord:E.coordinate});var R=rO(e,E.tickCoord,O,l,c);R&&(l=E.tickCoord+e*(O()/2+o),a[C]=Di(Di({},E),{},{isShow:!0}))},v=0;v<g;v++)y(v);return a}function Uz(e,t,n){var r=e.tick,o=e.ticks,i=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,f=e.angle;if(!o||!o.length||!r)return[];if(mt(l)||td.isSsr)return $9e(o,typeof l=="number"&&mt(l)?l:0);var h=[],m=s==="top"||s==="bottom"?"width":"height",g=u&&m==="width"?tx(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},y=function(E,I){var O=rn(c)?c(E.value,I):E.value;return m==="width"?k9e(tx(O,{fontSize:t,letterSpacing:n}),g,f):tx(O,{fontSize:t,letterSpacing:n})[m]},v=o.length>=2?ta(o[1].coordinate-o[0].coordinate):1,w=_9e(i,v,m);return l==="equidistantPreserveStart"?N9e(v,w,y,o,a):(l==="preserveStart"||l==="preserveStartEnd"?h=z9e(v,w,y,o,a,l==="preserveStartEnd"):h=B9e(v,w,y,o,a),h.filter(function(C){return C.isShow}))}var V9e=["viewBox"],H9e=["viewBox"],U9e=["ticks"];function Dy(e){"@babel/helpers - typeof";return Dy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dy(e)}function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bg.apply(this,arguments)}function TQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TQ(Object(n),!0).forEach(function(r){Gz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q_(e,t){if(e==null)return{};var n=G9e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function G9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function q9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cle(r.key),r)}}function W9e(e,t,n){return t&&OQ(e.prototype,t),n&&OQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function K9e(e,t,n){return t=oO(t),Y9e(e,lle()?Reflect.construct(t,n||[],oO(e).constructor):t.apply(e,n))}function Y9e(e,t){if(t&&(Dy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q9e(e)}function Q9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lle=function(){return!!e})()}function oO(e){return oO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oO(e)}function X9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SF(e,t)}function SF(e,t){return SF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},SF(e,t)}function Gz(e,t,n){return t=cle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cle(e){var t=J9e(e,"string");return Dy(t)=="symbol"?t:t+""}function J9e(e,t){if(Dy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Av=function(e){function t(n){var r;return q9e(this,t),r=K9e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return X9e(t,e),W9e(t,[{key:"shouldComponentUpdate",value:function(r,o){var i=r.viewBox,a=q_(r,V9e),s=this.props,l=s.viewBox,c=q_(s,H9e);return!Fg(i,l)||!Fg(a,c)||!Fg(o,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var o=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];o&&this.setState({fontSize:window.getComputedStyle(o).fontSize,letterSpacing:window.getComputedStyle(o).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var o=this.props,i=o.x,a=o.y,s=o.width,l=o.height,c=o.orientation,u=o.tickSize,f=o.mirror,h=o.tickMargin,m,g,y,v,w,C,E=f?-1:1,I=r.tickSize||u,O=mt(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":m=g=r.coordinate,v=a+ +!f*l,y=v-E*I,C=y-E*h,w=O;break;case"left":y=v=r.coordinate,g=i+ +!f*s,m=g-E*I,w=m-E*h,C=O;break;case"right":y=v=r.coordinate,g=i+ +f*s,m=g+E*I,w=m+E*h,C=O;break;default:m=g=r.coordinate,v=a+ +f*l,y=v+E*I,C=y+E*h,w=O;break}return{line:{x1:m,y1:y,x2:g,y2:v},tick:{x:w,y:C}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,o=r.orientation,i=r.mirror,a;switch(o){case"left":a=i?"start":"end";break;case"right":a=i?"end":"start";break;default:a="middle";break}return a}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,o=r.orientation,i=r.mirror,a="end";switch(o){case"left":case"right":a="middle";break;case"top":a=i?"start":"end";break;default:a=i?"end":"start";break}return a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.orientation,c=r.mirror,u=r.axisLine,f=Gi(Gi(Gi({},zt(this.props,!1)),zt(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);f=Gi(Gi({},f),{},{x1:o,y1:i+h*s,x2:o+a,y2:i+h*s})}else{var m=+(l==="left"&&!c||l==="right"&&c);f=Gi(Gi({},f),{},{x1:o+m*a,y1:i,x2:o+m*a,y2:i+s})}return J.createElement("line",bg({},f,{className:fe("recharts-cartesian-axis-line",Ja(u,"className"))}))}},{key:"renderTicks",value:function(r,o,i){var a=this,s=this.props,l=s.tickLine,c=s.stroke,u=s.tick,f=s.tickFormatter,h=s.unit,m=Uz(Gi(Gi({},this.props),{},{ticks:r}),o,i),g=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=zt(this.props,!1),w=zt(u,!1),C=Gi(Gi({},v),{},{fill:"none"},zt(l,!1)),E=m.map(function(I,O){var P=a.getTickLineCoord(I),R=P.line,D=P.tick,M=Gi(Gi(Gi(Gi({textAnchor:g,verticalAnchor:y},v),{},{stroke:"none",fill:c},w),D),{},{index:O,payload:I,visibleTicksCount:m.length,tickFormatter:f});return J.createElement(wn,bg({className:"recharts-cartesian-axis-tick",key:"tick-".concat(I.value,"-").concat(I.coordinate,"-").concat(I.tickCoord)},If(a.props,I,O)),l&&J.createElement("line",bg({},C,R,{className:fe("recharts-cartesian-axis-tick-line",Ja(l,"className"))})),u&&t.renderTickItem(u,M,"".concat(rn(f)?f(I.value,O):I.value).concat(h||"")))});return J.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,o=this.props,i=o.axisLine,a=o.width,s=o.height,l=o.ticksGenerator,c=o.className,u=o.hide;if(u)return null;var f=this.props,h=f.ticks,m=q_(f,U9e),g=h;return rn(l)&&(g=h&&h.length>0?l(this.props):l(m)),a<=0||s<=0||!g||!g.length?null:J.createElement(wn,{className:fe("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),oi.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):rn(r)?a=r(o):a=J.createElement(wh,bg({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(x.Component);Gz(Av,"displayName","CartesianAxis");Gz(Av,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Z9e=["x1","y1","x2","y2","key"],e7e=["offset"];function Eh(e){"@babel/helpers - typeof";return Eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eh(e)}function IQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IQ(Object(n),!0).forEach(function(r){t7e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t7e(e,t,n){return t=n7e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n7e(e){var t=r7e(e,"string");return Eh(t)=="symbol"?t:t+""}function r7e(e,t){if(Eh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(this,arguments)}function PQ(e,t){if(e==null)return{};var n=o7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function o7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var i7e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return J.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function ule(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(rn(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=PQ(t,Z9e),c=zt(l,!1);c.offset;var u=PQ(c,e7e);n=J.createElement("line",Hp({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function a7e(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=$i($i({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return ule(o,c)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function s7e(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=$i($i({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return ule(o,c)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function l7e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(h){return Math.round(h+o-o)}).sort(function(h,m){return h-m});o!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var g=!u[m+1],y=g?o+a-h:u[m+1]-h;if(y<=0)return null;var v=m%t.length;return J.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:y,width:i,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function c7e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var g=!u[m+1],y=g?i+s-h:u[m+1]-h;if(y<=0)return null;var v=m%r.length;return J.createElement("rect",{key:"react-".concat(m),x:h,y:a,width:y,height:l,stroke:"none",fill:r[v],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var u7e=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return fse(Uz($i($i($i({},Av.defaultProps),r),{},{ticks:Ru(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},d7e=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return fse(Uz($i($i($i({},Av.defaultProps),r),{},{ticks:Ru(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},Jm={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Uf(e){var t,n,r,o,i,a,s=Bz(),l=zz(),c=J8e(),u=$i($i({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Jm.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Jm.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Jm.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:Jm.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Jm.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Jm.verticalFill,x:mt(e.x)?e.x:c.left,y:mt(e.y)?e.y:c.top,width:mt(e.width)?e.width:c.width,height:mt(e.height)?e.height:c.height}),f=u.x,h=u.y,m=u.width,g=u.height,y=u.syncWithTicks,v=u.horizontalValues,w=u.verticalValues,C=Y8e(),E=Q8e();if(!mt(m)||m<=0||!mt(g)||g<=0||!mt(f)||f!==+f||!mt(h)||h!==+h)return null;var I=u.verticalCoordinatesGenerator||u7e,O=u.horizontalCoordinatesGenerator||d7e,P=u.horizontalPoints,R=u.verticalPoints;if((!P||!P.length)&&rn(O)){var D=v&&v.length,M=O({yAxis:E?$i($i({},E),{},{ticks:D?v:E.ticks}):void 0,width:s,height:l,offset:c},D?!0:y);jl(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Eh(M),"]")),Array.isArray(M)&&(P=M)}if((!R||!R.length)&&rn(I)){var A=w&&w.length,_=I({xAxis:C?$i($i({},C),{},{ticks:A?w:C.ticks}):void 0,width:s,height:l,offset:c},A?!0:y);jl(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Eh(_),"]")),Array.isArray(_)&&(R=_)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(i7e,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),J.createElement(a7e,Hp({},u,{offset:c,horizontalPoints:P,xAxis:C,yAxis:E})),J.createElement(s7e,Hp({},u,{offset:c,verticalPoints:R,xAxis:C,yAxis:E})),J.createElement(l7e,Hp({},u,{horizontalPoints:P})),J.createElement(c7e,Hp({},u,{verticalPoints:R})))}Uf.displayName="CartesianGrid";var f7e=["type","layout","connectNulls","ref"],p7e=["key"];function ky(e){"@babel/helpers - typeof";return ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ky(e)}function AQ(e,t){if(e==null)return{};var n=h7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function h7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sx(){return sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sx.apply(this,arguments)}function MQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MQ(Object(n),!0).forEach(function(r){Il(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zm(e){return v7e(e)||y7e(e)||g7e(e)||m7e()}function m7e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g7e(e,t){if(e){if(typeof e=="string")return wF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wF(e,t)}}function y7e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function v7e(e){if(Array.isArray(e))return wF(e)}function wF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fle(r.key),r)}}function x7e(e,t,n){return t&&RQ(e.prototype,t),n&&RQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function S7e(e,t,n){return t=iO(t),w7e(e,dle()?Reflect.construct(t,n||[],iO(e).constructor):t.apply(e,n))}function w7e(e,t){if(t&&(ky(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C7e(e)}function C7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dle=function(){return!!e})()}function iO(e){return iO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iO(e)}function E7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CF(e,t)}function CF(e,t){return CF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},CF(e,t)}function Il(e,t,n){return t=fle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fle(e){var t=T7e(e,"string");return ky(t)=="symbol"?t:t+""}function T7e(e,t){if(ky(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ky(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qh=function(e){function t(){var n;b7e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=S7e(this,t,[].concat(o)),Il(n,"state",{isAnimationFinished:!0,totalLength:0}),Il(n,"generateSimpleStrokeDasharray",function(a,s){return"".concat(s,"px ").concat(a-s,"px")}),Il(n,"getStrokeDasharray",function(a,s,l){var c=l.reduce(function(w,C){return w+C});if(!c)return n.generateSimpleStrokeDasharray(s,a);for(var u=Math.floor(a/c),f=a%c,h=s-a,m=[],g=0,y=0;g<l.length;y+=l[g],++g)if(y+l[g]>f){m=[].concat(Zm(l.slice(0,g)),[f-y]);break}var v=m.length%2===0?[0,h]:[h];return[].concat(Zm(t.repeat(l,u)),Zm(m),v).map(function(w){return"".concat(w,"px")}).join(", ")}),Il(n,"id",Bf("recharts-line-")),Il(n,"pathRef",function(a){n.mainCurve=a}),Il(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Il(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return E7e(t,e),x7e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,f=sa(u,Pv);if(!f)return null;var h=function(y,v){return{x:y.x,y:y.y,value:y.value,errorVal:Vr(y.payload,v)}},m={clipPath:r?"url(#clipPath-".concat(o,")"):null};return J.createElement(wn,m,f.map(function(g){return J.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,f=zt(this.props,!1),h=zt(l,!0),m=c.map(function(y,v){var w=Ba(Ba(Ba({key:"dot-".concat(v),r:3},f),h),{},{index:v,cx:y.x,cy:y.y,value:y.value,dataKey:u,payload:y.payload,points:c});return t.renderDotItem(l,w)}),g={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return J.createElement(wn,sx({className:"recharts-line-dots",key:"dots"},g),m)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var f=AQ(s,f7e),h=Ba(Ba(Ba({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return J.createElement(vf,sx({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,f=a.animationDuration,h=a.animationEasing,m=a.animationId,g=a.animateNewValues,y=a.width,v=a.height,w=this.state,C=w.prevPoints,E=w.totalLength;return J.createElement(ol,{begin:u,duration:f,isActive:c,easing:h,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(I){var O=I.t;if(C){var P=C.length/s.length,R=s.map(function(N,B){var H=Math.floor(B*P);if(C[H]){var j=C[H],L=no(j.x,N.x),V=no(j.y,N.y);return Ba(Ba({},N),{},{x:L(O),y:V(O)})}if(g){var W=no(y*2,N.x),K=no(v/2,N.y);return Ba(Ba({},N),{},{x:W(O),y:K(O)})}return Ba(Ba({},N),{},{x:N.x,y:N.y})});return i.renderCurveStatically(R,r,o)}var D=no(0,E),M=D(O),A;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});A=i.getStrokeDasharray(M,E,_)}else A=i.generateSimpleStrokeDasharray(E,M);return i.renderCurveStatically(s,r,o,{strokeDasharray:A})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!Pf(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,f=o.top,h=o.left,m=o.width,g=o.height,y=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,C=s.length===1,E=fe("recharts-line",l),I=c&&c.allowDataOverflow,O=u&&u.allowDataOverflow,P=I||O,R=on(v)?this.id:v,D=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=D.r,A=M===void 0?3:M,_=D.strokeWidth,N=_===void 0?2:_,B=pie(a)?a:{},H=B.clipDot,j=H===void 0?!0:H,L=A*2+N;return J.createElement(wn,{className:E},I||O?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(R)},J.createElement("rect",{x:I?h:h-m/2,y:O?f:f-g/2,width:I?m:m*2,height:O?g:g*2})),!j&&J.createElement("clipPath",{id:"clipPath-dots-".concat(R)},J.createElement("rect",{x:h-L/2,y:f-L/2,width:m+L,height:g+L}))):null,!C&&this.renderCurve(P,R),this.renderErrorBar(P,R),(C||a)&&this.renderDots(P,j,R),(!y||w)&&Bl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(Zm(r),[0]):r,a=[],s=0;s<o;++s)a=[].concat(Zm(a),Zm(i));return a}},{key:"renderDotItem",value:function(r,o){var i;if(J.isValidElement(r))i=J.cloneElement(r,o);else if(rn(r))i=r(o);else{var a=o.key,s=AQ(o,p7e),l=fe("recharts-line-dot",typeof r!="boolean"?r.className:"");i=J.createElement(Tw,sx({key:a},s,{className:l}))}return i}}])}(x.PureComponent);Il(qh,"displayName","Line");Il(qh,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!td.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Il(qh,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,f=l.map(function(h,m){var g=Vr(h,a);return u==="horizontal"?{x:Sy({axis:n,ticks:o,bandSize:s,entry:h,index:m}),y:on(g)?null:r.scale(g),value:g,payload:h}:{x:on(g)?null:n.scale(g),y:Sy({axis:r,ticks:i,bandSize:s,entry:h,index:m}),value:g,payload:h}});return Ba({points:f,layout:u},c)});var O7e=["layout","type","stroke","connectNulls","isRange","ref"],I7e=["key"],ple;function _y(e){"@babel/helpers - typeof";return _y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_y(e)}function hle(e,t){if(e==null)return{};var n=P7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Up(){return Up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Up.apply(this,arguments)}function DQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DQ(Object(n),!0).forEach(function(r){wc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function A7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gle(r.key),r)}}function M7e(e,t,n){return t&&kQ(e.prototype,t),n&&kQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function R7e(e,t,n){return t=aO(t),D7e(e,mle()?Reflect.construct(t,n||[],aO(e).constructor):t.apply(e,n))}function D7e(e,t){if(t&&(_y(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k7e(e)}function k7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mle=function(){return!!e})()}function aO(e){return aO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},aO(e)}function _7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EF(e,t)}function EF(e,t){return EF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},EF(e,t)}function wc(e,t,n){return t=gle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gle(e){var t=$7e(e,"string");return _y(t)=="symbol"?t:t+""}function $7e(e,t){if(_y(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gf=function(e){function t(){var n;A7e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=R7e(this,t,[].concat(o)),wc(n,"state",{isAnimationFinished:!0}),wc(n,"id",Bf("recharts-area-")),wc(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),rn(a)&&a()}),wc(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),rn(a)&&a()}),n}return _7e(t,e),M7e(t,[{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(a&&!s)return null;var l=this.props,c=l.dot,u=l.points,f=l.dataKey,h=zt(this.props,!1),m=zt(c,!0),g=u.map(function(v,w){var C=Bd(Bd(Bd({key:"dot-".concat(w),r:3},h),m),{},{index:w,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:u});return t.renderDotItem(c,C)}),y={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return J.createElement(wn,Up({className:"recharts-area-dots"},y),g)}},{key:"renderHorizontalRect",value:function(r){var o=this.props,i=o.baseLine,a=o.points,s=o.strokeWidth,l=a[0].x,c=a[a.length-1].x,u=r*Math.abs(l-c),f=ff(a.map(function(h){return h.y||0}));return mt(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(ff(i.map(function(h){return h.y||0})),f)),mt(f)?J.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var o=this.props,i=o.baseLine,a=o.points,s=o.strokeWidth,l=a[0].y,c=a[a.length-1].y,u=r*Math.abs(l-c),f=ff(a.map(function(h){return h.x||0}));return mt(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(ff(i.map(function(h){return h.x||0})),f)),mt(f)?J.createElement("rect",{x:0,y:l<c?l:l-u,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}},{key:"renderClipRect",value:function(r){var o=this.props.layout;return o==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,o,i,a){var s=this.props,l=s.layout,c=s.type,u=s.stroke,f=s.connectNulls,h=s.isRange;s.ref;var m=hle(s,O7e);return J.createElement(wn,{clipPath:i?"url(#clipPath-".concat(a,")"):null},J.createElement(vf,Up({},zt(m,!0),{points:r,connectNulls:f,type:c,baseLine:o,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&J.createElement(vf,Up({},zt(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:r})),u!=="none"&&h&&J.createElement(vf,Up({},zt(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:o})))}},{key:"renderAreaWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.baseLine,c=a.isAnimationActive,u=a.animationBegin,f=a.animationDuration,h=a.animationEasing,m=a.animationId,g=this.state,y=g.prevPoints,v=g.prevBaseLine;return J.createElement(ol,{begin:u,duration:f,isActive:c,easing:h,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var C=w.t;if(y){var E=y.length/s.length,I=s.map(function(D,M){var A=Math.floor(M*E);if(y[A]){var _=y[A],N=no(_.x,D.x),B=no(_.y,D.y);return Bd(Bd({},D),{},{x:N(C),y:B(C)})}return D}),O;if(mt(l)&&typeof l=="number"){var P=no(v,l);O=P(C)}else if(on(l)||wv(l)){var R=no(v,0);O=R(C)}else O=l.map(function(D,M){var A=Math.floor(M*E);if(v[A]){var _=v[A],N=no(_.x,D.x),B=no(_.y,D.y);return Bd(Bd({},D),{},{x:N(C),y:B(C)})}return D});return i.renderAreaStatically(I,O,r,o)}return J.createElement(wn,null,J.createElement("defs",null,J.createElement("clipPath",{id:"animationClipPath-".concat(o)},i.renderClipRect(C))),J.createElement(wn,{clipPath:"url(#animationClipPath-".concat(o,")")},i.renderAreaStatically(s,l,r,o)))})}},{key:"renderArea",value:function(r,o){var i=this.props,a=i.points,s=i.baseLine,l=i.isAnimationActive,c=this.state,u=c.prevPoints,f=c.prevBaseLine,h=c.totalLength;return l&&a&&a.length&&(!u&&h>0||!Pf(u,a)||!Pf(f,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,f=o.xAxis,h=o.yAxis,m=o.width,g=o.height,y=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,C=s.length===1,E=fe("recharts-area",l),I=f&&f.allowDataOverflow,O=h&&h.allowDataOverflow,P=I||O,R=on(v)?this.id:v,D=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=D.r,A=M===void 0?3:M,_=D.strokeWidth,N=_===void 0?2:_,B=pie(a)?a:{},H=B.clipDot,j=H===void 0?!0:H,L=A*2+N;return J.createElement(wn,{className:E},I||O?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(R)},J.createElement("rect",{x:I?u:u-m/2,y:O?c:c-g/2,width:I?m:m*2,height:O?g:g*2})),!j&&J.createElement("clipPath",{id:"clipPath-dots-".concat(R)},J.createElement("rect",{x:u-L/2,y:c-L/2,width:m+L,height:g+L}))):null,C?null:this.renderArea(P,R),(a||C)&&this.renderDots(P,j,R),(!y||w)&&Bl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(x.PureComponent);ple=Gf;wc(Gf,"displayName","Area");wc(Gf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!td.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});wc(Gf,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(mt(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return s==="dataMin"?f:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});wc(Gf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,h=e.offset,m=t.layout,g=c&&c.length,y=ple.getBaseValue(t,n,r,o),v=m==="horizontal",w=!1,C=f.map(function(I,O){var P;g?P=c[u+O]:(P=Vr(I,l),Array.isArray(P)?w=!0:P=[y,P]);var R=P[1]==null||g&&Vr(I,l)==null;return v?{x:Sy({axis:r,ticks:i,bandSize:s,entry:I,index:O}),y:R?null:o.scale(P[1]),value:P,payload:I}:{x:R?null:r.scale(P[1]),y:Sy({axis:o,ticks:a,bandSize:s,entry:I,index:O}),value:P,payload:I}}),E;return g||w?E=C.map(function(I){var O=Array.isArray(I.value)?I.value[0]:null;return v?{x:I.x,y:O!=null&&I.y!=null?o.scale(O):null}:{x:O!=null?r.scale(O):null,y:I.y}}):E=v?o.scale(y):r.scale(y),Bd({points:C,baseLine:E,layout:m,isRange:w},h)});wc(Gf,"renderDotItem",function(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(rn(e))n=e(t);else{var r=fe("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=hle(t,I7e);n=J.createElement(Tw,Up({},i,{key:o,className:r}))}return n});function $y(e){"@babel/helpers - typeof";return $y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$y(e)}function N7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L7e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ble(r.key),r)}}function F7e(e,t,n){return t&&L7e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function j7e(e,t,n){return t=sO(t),B7e(e,yle()?Reflect.construct(t,n||[],sO(e).constructor):t.apply(e,n))}function B7e(e,t){if(t&&($y(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z7e(e)}function z7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yle=function(){return!!e})()}function sO(e){return sO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sO(e)}function V7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TF(e,t)}function TF(e,t){return TF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},TF(e,t)}function vle(e,t,n){return t=ble(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ble(e){var t=H7e(e,"string");return $y(t)=="symbol"?t:t+""}function H7e(e,t){if($y(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hP=function(e){function t(){return N7e(this,t),j7e(this,t,arguments)}return V7e(t,e),F7e(t,[{key:"render",value:function(){return null}}])}(J.Component);vle(hP,"displayName","ZAxis");vle(hP,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var U7e=["option","isActive"];function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lx.apply(this,arguments)}function G7e(e,t){if(e==null)return{};var n=q7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function W7e(e){var t=e.option,n=e.isActive,r=G7e(e,U7e);return typeof t=="string"?J.createElement(WT,lx({option:J.createElement(HI,lx({type:t},r)),isActive:n,shapeType:"symbols"},r)):J.createElement(WT,lx({option:t,isActive:n,shapeType:"symbols"},r))}function Ny(e){"@babel/helpers - typeof";return Ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ny(e)}function cx(){return cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cx.apply(this,arguments)}function _Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_Q(Object(n),!0).forEach(function(r){hf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_Q(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sle(r.key),r)}}function Y7e(e,t,n){return t&&$Q(e.prototype,t),n&&$Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q7e(e,t,n){return t=lO(t),X7e(e,xle()?Reflect.construct(t,n||[],lO(e).constructor):t.apply(e,n))}function X7e(e,t){if(t&&(Ny(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J7e(e)}function J7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xle=function(){return!!e})()}function lO(e){return lO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lO(e)}function Z7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OF(e,t)}function OF(e,t){return OF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},OF(e,t)}function hf(e,t,n){return t=Sle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sle(e){var t=eKe(e,"string");return Ny(t)=="symbol"?t:t+""}function eKe(e,t){if(Ny(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ny(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Iw=function(e){function t(){var n;K7e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=Q7e(this,t,[].concat(o)),hf(n,"state",{isAnimationFinished:!1}),hf(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),hf(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),hf(n,"id",Bf("recharts-scatter-")),n}return Z7e(t,e),Y7e(t,[{key:"renderSymbolsStatically",value:function(r){var o=this,i=this.props,a=i.shape,s=i.activeShape,l=i.activeIndex,c=zt(this.props,!1);return r.map(function(u,f){var h=l===f,m=h?s:a,g=Ds(Ds({},c),u);return J.createElement(wn,cx({className:"recharts-scatter-symbol",key:"symbol-".concat(u==null?void 0:u.cx,"-").concat(u==null?void 0:u.cy,"-").concat(u==null?void 0:u.size,"-").concat(f)},If(o.props,u,f),{role:"img"}),J.createElement(W7e,cx({option:m,isActive:h,key:"symbol-".concat(f)},g)))})}},{key:"renderSymbolsWithAnimation",value:function(){var r=this,o=this.props,i=o.points,a=o.isAnimationActive,s=o.animationBegin,l=o.animationDuration,c=o.animationEasing,u=o.animationId,f=this.state.prevPoints;return J.createElement(ol,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,g=i.map(function(y,v){var w=f&&f[v];if(w){var C=no(w.cx,y.cx),E=no(w.cy,y.cy),I=no(w.size,y.size);return Ds(Ds({},y),{},{cx:C(m),cy:E(m),size:I(m)})}var O=no(0,y.size);return Ds(Ds({},y),{},{size:O(m)})});return J.createElement(wn,null,r.renderSymbolsStatically(g))})}},{key:"renderSymbols",value:function(){var r=this.props,o=r.points,i=r.isAnimationActive,a=this.state.prevPoints;return i&&o&&o.length&&(!a||!Pf(a,o))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(o)}},{key:"renderErrorBar",value:function(){var r=this.props.isAnimationActive;if(r&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.points,a=o.xAxis,s=o.yAxis,l=o.children,c=sa(l,Pv);return c?c.map(function(u,f){var h=u.props,m=h.direction,g=h.dataKey;return J.cloneElement(u,{key:"".concat(m,"-").concat(g,"-").concat(i[f]),data:i,xAxis:a,yAxis:s,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(v,w){return{x:v.cx,y:v.cy,value:m==="x"?+v.node.x:+v.node.y,errorVal:Vr(v,w)}}})}):null}},{key:"renderLine",value:function(){var r=this.props,o=r.points,i=r.line,a=r.lineType,s=r.lineJointType,l=zt(this.props,!1),c=zt(i,!1),u,f;if(a==="joint")u=o.map(function(E){return{x:E.cx,y:E.cy}});else if(a==="fitting"){var h=ZFe(o),m=h.xmin,g=h.xmax,y=h.a,v=h.b,w=function(I){return y*I+v};u=[{x:m,y:w(m)},{x:g,y:w(g)}]}var C=Ds(Ds(Ds({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return J.isValidElement(i)?f=J.cloneElement(i,C):rn(i)?f=i(C):f=J.createElement(vf,cx({},C,{type:s})),J.createElement(wn,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var r=this.props,o=r.hide,i=r.points,a=r.line,s=r.className,l=r.xAxis,c=r.yAxis,u=r.left,f=r.top,h=r.width,m=r.height,g=r.id,y=r.isAnimationActive;if(o||!i||!i.length)return null;var v=this.state.isAnimationFinished,w=fe("recharts-scatter",s),C=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,I=C||E,O=on(g)?this.id:g;return J.createElement(wn,{className:w,clipPath:I?"url(#clipPath-".concat(O,")"):null},C||E?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(O)},J.createElement("rect",{x:C?u:u-h/2,y:E?f:f-m/2,width:C?h:h*2,height:E?m:m*2}))):null,a&&this.renderLine(),this.renderErrorBar(),J.createElement(wn,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!y||v)&&Bl.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}}])}(x.PureComponent);hf(Iw,"displayName","Scatter");hf(Iw,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!td.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});hf(Iw,"getComposedData",function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,o=e.item,i=e.displayedData,a=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,c=o.props.tooltipType,u=sa(o.props.children,Ev),f=on(t.dataKey)?o.props.dataKey:t.dataKey,h=on(n.dataKey)?o.props.dataKey:n.dataKey,m=r&&r.dataKey,g=r?r.range:hP.defaultProps.range,y=g&&g[0],v=t.scale.bandwidth?t.scale.bandwidth():0,w=n.scale.bandwidth?n.scale.bandwidth():0,C=i.map(function(E,I){var O=Vr(E,f),P=Vr(E,h),R=!on(m)&&Vr(E,m)||"-",D=[{name:on(t.dataKey)?o.props.name:t.name||t.dataKey,unit:t.unit||"",value:O,payload:E,dataKey:f,type:c},{name:on(n.dataKey)?o.props.name:n.name||n.dataKey,unit:n.unit||"",value:P,payload:E,dataKey:h,type:c}];R!=="-"&&D.push({name:r.name||r.dataKey,unit:r.unit||"",value:R,payload:E,dataKey:m,type:c});var M=Sy({axis:t,ticks:a,bandSize:v,entry:E,index:I,dataKey:f}),A=Sy({axis:n,ticks:s,bandSize:w,entry:E,index:I,dataKey:h}),_=R!=="-"?r.scale(R):y,N=Math.sqrt(Math.max(_,0)/Math.PI);return Ds(Ds({},E),{},{cx:M,cy:A,x:M-N,y:A-N,xAxis:t,yAxis:n,zAxis:r,width:2*N,height:2*N,size:_,node:{x:O,y:P,z:R},tooltipPayload:D,tooltipPosition:{x:M,y:A},payload:E},u&&u[I]&&u[I].props)});return Ds({points:C},l)});function Ly(e){"@babel/helpers - typeof";return Ly=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ly(e)}function tKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ele(r.key),r)}}function rKe(e,t,n){return t&&nKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oKe(e,t,n){return t=cO(t),iKe(e,wle()?Reflect.construct(t,n||[],cO(e).constructor):t.apply(e,n))}function iKe(e,t){if(t&&(Ly(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aKe(e)}function aKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wle=function(){return!!e})()}function cO(e){return cO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cO(e)}function sKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IF(e,t)}function IF(e,t){return IF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},IF(e,t)}function Cle(e,t,n){return t=Ele(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ele(e){var t=lKe(e,"string");return Ly(t)=="symbol"?t:t+""}function lKe(e,t){if(Ly(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ly(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function PF(){return PF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PF.apply(this,arguments)}function cKe(e){var t=e.xAxisId,n=Bz(),r=zz(),o=Zse(t);return o==null?null:J.createElement(Av,PF({},o,{className:fe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(a){return Ru(a,!0)}}))}var ls=function(e){function t(){return tKe(this,t),oKe(this,t,arguments)}return sKe(t,e),rKe(t,[{key:"render",value:function(){return J.createElement(cKe,this.props)}}])}(J.Component);Cle(ls,"displayName","XAxis");Cle(ls,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Fy(e){"@babel/helpers - typeof";return Fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fy(e)}function uKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ile(r.key),r)}}function fKe(e,t,n){return t&&dKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pKe(e,t,n){return t=uO(t),hKe(e,Tle()?Reflect.construct(t,n||[],uO(e).constructor):t.apply(e,n))}function hKe(e,t){if(t&&(Fy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mKe(e)}function mKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Tle=function(){return!!e})()}function uO(e){return uO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uO(e)}function gKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AF(e,t)}function AF(e,t){return AF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},AF(e,t)}function Ole(e,t,n){return t=Ile(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ile(e){var t=yKe(e,"string");return Fy(t)=="symbol"?t:t+""}function yKe(e,t){if(Fy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MF(){return MF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MF.apply(this,arguments)}var vKe=function(t){var n=t.yAxisId,r=Bz(),o=zz(),i=ele(n);return i==null?null:J.createElement(Av,MF({},i,{className:fe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(s){return Ru(s,!0)}}))},cs=function(e){function t(){return uKe(this,t),pKe(this,t,arguments)}return gKe(t,e),fKe(t,[{key:"render",value:function(){return J.createElement(vKe,this.props)}}])}(J.Component);Ole(cs,"displayName","YAxis");Ole(cs,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function NQ(e){return wKe(e)||SKe(e)||xKe(e)||bKe()}function bKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xKe(e,t){if(e){if(typeof e=="string")return RF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RF(e,t)}}function SKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wKe(e){if(Array.isArray(e))return RF(e)}function RF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var DF=function(t,n,r,o,i){var a=sa(t,Hz),s=sa(t,Ow),l=[].concat(NQ(a),NQ(s)),c=sa(t,pP),u="".concat(o,"Id"),f=o[0],h=n;if(l.length&&(h=l.reduce(function(y,v){if(v.props[u]===r&&Pc(v.props,"extendDomain")&&mt(v.props[f])){var w=v.props[f];return[Math.min(y[0],w),Math.max(y[1],w)]}return y},h)),c.length){var m="".concat(f,"1"),g="".concat(f,"2");h=c.reduce(function(y,v){if(v.props[u]===r&&Pc(v.props,"extendDomain")&&mt(v.props[m])&&mt(v.props[g])){var w=v.props[m],C=v.props[g];return[Math.min(y[0],w,C),Math.max(y[1],w,C)]}return y},h)}return i&&i.length&&(h=i.reduce(function(y,v){return mt(v)?[Math.min(y[0],v),Math.max(y[1],v)]:y},h)),h},W_={exports:{}},LQ;function CKe(){return LQ||(LQ=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,f,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new o(u,f||l,h),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],m]:l._events[g].push(m):(l._events[g]=m,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,m=f.length,g=new Array(m);h<m;h++)g[h]=f[h].fn;return g},s.prototype.listenerCount=function(c){var u=n?n+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,h,m,g){var y=n?n+c:c;if(!this._events[y])return!1;var v=this._events[y],w=arguments.length,C,E;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),w){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,f),!0;case 4:return v.fn.call(v.context,u,f,h),!0;case 5:return v.fn.call(v.context,u,f,h,m),!0;case 6:return v.fn.call(v.context,u,f,h,m,g),!0}for(E=1,C=new Array(w-1);E<w;E++)C[E-1]=arguments[E];v.fn.apply(v.context,C)}else{var I=v.length,O;for(E=0;E<I;E++)switch(v[E].once&&this.removeListener(c,v[E].fn,void 0,!0),w){case 1:v[E].fn.call(v[E].context);break;case 2:v[E].fn.call(v[E].context,u);break;case 3:v[E].fn.call(v[E].context,u,f);break;case 4:v[E].fn.call(v[E].context,u,f,h);break;default:if(!C)for(O=1,C=new Array(w-1);O<w;O++)C[O-1]=arguments[O];v[E].fn.apply(v[E].context,C)}}return!0},s.prototype.on=function(c,u,f){return i(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return i(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,h){var m=n?n+c:c;if(!this._events[m])return this;if(!u)return a(this,m),this;var g=this._events[m];if(g.fn)g.fn===u&&(!h||g.once)&&(!f||g.context===f)&&a(this,m);else{for(var y=0,v=[],w=g.length;y<w;y++)(g[y].fn!==u||h&&!g[y].once||f&&g[y].context!==f)&&v.push(g[y]);v.length?this._events[m]=v.length===1?v[0]:v:a(this,m)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(W_)),W_.exports}var EKe=CKe();const TKe=Gn(EKe);var K_=new TKe,Y_="recharts.syncMouseEvents";function gS(e){"@babel/helpers - typeof";return gS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gS(e)}function OKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ple(r.key),r)}}function PKe(e,t,n){return t&&IKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q_(e,t,n){return t=Ple(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ple(e){var t=AKe(e,"string");return gS(t)=="symbol"?t:t+""}function AKe(e,t){if(gS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MKe=function(){function e(){OKe(this,e),Q_(this,"activeIndex",0),Q_(this,"coordinateList",[]),Q_(this,"layout","horizontal")}return PKe(e,[{key:"setDetails",value:function(n){var r,o=n.coordinateList,i=o===void 0?null:o,a=n.container,s=a===void 0?null:a,l=n.layout,c=l===void 0?null:l,u=n.offset,f=u===void 0?null:u,h=n.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var o=this.container.getBoundingClientRect(),i=o.x,a=o.y,s=o.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,u=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=i+l+c,h=a+this.offset.top+s/2+u;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function RKe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],o=e==null?void 0:e[1];if(r&&o&&mt(r)&&mt(o))return!0}return!1}function DKe(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-o,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Ale(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle,a=Nr(t,n,r,o),s=Nr(t,n,r,i);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function kKe(e,t,n){var r,o,i,a;if(e==="horizontal")r=t.x,i=r,o=n.top,a=n.top+n.height;else if(e==="vertical")o=t.y,a=o,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,f=t.angle,h=Nr(s,l,c,f),m=Nr(s,l,u,f);r=h.x,o=h.y,i=m.x,a=m.y}else return Ale(t);return[{x:r,y:o},{x:i,y:a}]}function yS(e){"@babel/helpers - typeof";return yS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yS(e)}function FQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function U1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FQ(Object(n),!0).forEach(function(r){_Ke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Ke(e,t,n){return t=$Ke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Ke(e){var t=NKe(e,"string");return yS(t)=="symbol"?t:t+""}function NKe(e,t){if(yS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LKe(e){var t,n,r=e.element,o=e.tooltipEventType,i=e.isActive,a=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!i||!a||h!=="ScatterChart"&&o!=="axis")return null;var g,y=vf;if(h==="ScatterChart")g=a,y=Aqe;else if(h==="BarChart")g=DKe(f,a,l,u),y=Nz;else if(f==="radial"){var v=Ale(a),w=v.cx,C=v.cy,E=v.radius,I=v.startAngle,O=v.endAngle;g={cx:w,cy:C,startAngle:I,endAngle:O,innerRadius:E,outerRadius:E},y=Cse}else g={points:kKe(f,a,l)},y=vf;var P=U1(U1(U1(U1({stroke:"#ccc",pointerEvents:"none"},l),g),zt(m,!1)),{},{payload:s,payloadIndex:c,className:fe("recharts-tooltip-cursor",m.className)});return x.isValidElement(m)?x.cloneElement(m,P):x.createElement(y,P)}var FKe=["item"],jKe=["children","className","width","height","style","compact","title","desc"];function jy(e){"@babel/helpers - typeof";return jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jy(e)}function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xg.apply(this,arguments)}function jQ(e,t){return VKe(e)||zKe(e,t)||Rle(e,t)||BKe()}function BKe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zKe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function VKe(e){if(Array.isArray(e))return e}function BQ(e,t){if(e==null)return{};var n=HKe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dle(r.key),r)}}function qKe(e,t,n){return t&&GKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WKe(e,t,n){return t=dO(t),KKe(e,Mle()?Reflect.construct(t,n||[],dO(e).constructor):t.apply(e,n))}function KKe(e,t){if(t&&(jy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return YKe(e)}function YKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mle=function(){return!!e})()}function dO(e){return dO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dO(e)}function QKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kF(e,t)}function kF(e,t){return kF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},kF(e,t)}function By(e){return ZKe(e)||JKe(e)||Rle(e)||XKe()}function XKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rle(e,t){if(e){if(typeof e=="string")return _F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _F(e,t)}}function JKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZKe(e){if(Array.isArray(e))return _F(e)}function _F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zQ(Object(n),!0).forEach(function(r){sn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sn(e,t,n){return t=Dle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dle(e){var t=eYe(e,"string");return jy(t)=="symbol"?t:t+""}function eYe(e,t){if(jy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tYe={xAxis:["bottom","top"],yAxis:["left","right"]},nYe={width:"100%",height:"100%"},kle={x:0,y:0};function G1(e){return e}var rYe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},oYe=function(t,n,r,o){var i=n.find(function(u){return u&&u.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:o.y};if(t==="vertical")return{x:o.x,y:i.coordinate};if(t==="centric"){var a=i.coordinate,s=o.radius;return Xe(Xe(Xe({},o),Nr(o.cx,o.cy,s,a)),{},{angle:a,radius:s})}var l=i.coordinate,c=o.angle;return Xe(Xe(Xe({},o),Nr(o.cx,o.cy,l,c)),{},{angle:c,radius:l})}return kle},mP=function(t,n){var r=n.graphicalItems,o=n.dataStartIndex,i=n.dataEndIndex,a=(r??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(By(s),By(c)):s},[]);return a.length>0?a:t&&t.length&&mt(o)&&mt(i)?t.slice(o,i+1):[]};function _le(e){return e==="number"?[0,"auto"]:void 0}var $F=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=mP(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,f=(u=c.props.data)!==null&&u!==void 0?u:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var m=f===void 0?s:f;h=dT(m,a.dataKey,o)}else h=f&&f[r]||s[r];return h?[].concat(By(l),[yse(c,h)]):l},[])},VQ=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=rYe(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=o3e(a,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,h=$F(t,n,u,f),m=oYe(r,s,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:h,activeCoordinate:m}}return null},iYe=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,h=t.stackOffset,m=dse(u,i);return r.reduce(function(g,y){var v,w=y.type.defaultProps!==void 0?Xe(Xe({},y.type.defaultProps),y.props):y.props,C=w.type,E=w.dataKey,I=w.allowDataOverflow,O=w.allowDuplicatedCategory,P=w.scale,R=w.ticks,D=w.includeHidden,M=w[a];if(g[M])return g;var A=mP(t.data,{graphicalItems:o.filter(function(Y){var Z,ie=a in Y.props?Y.props[a]:(Z=Y.type.defaultProps)===null||Z===void 0?void 0:Z[a];return ie===M}),dataStartIndex:l,dataEndIndex:c}),_=A.length,N,B,H;RKe(w.domain,I,C)&&(N=qL(w.domain,null,I),m&&(C==="number"||P!=="auto")&&(H=rx(A,E,"category")));var j=_le(C);if(!N||N.length===0){var L,V=(L=w.domain)!==null&&L!==void 0?L:j;if(E){if(N=rx(A,E,C),C==="category"&&m){var W=JFe(N);O&&W?(B=N,N=YT(0,_)):O||(N=zK(V,N,y).reduce(function(Y,Z){return Y.indexOf(Z)>=0?Y:[].concat(By(Y),[Z])},[]))}else if(C==="category")O?N=N.filter(function(Y){return Y!==""&&!on(Y)}):N=zK(V,N,y).reduce(function(Y,Z){return Y.indexOf(Z)>=0||Z===""||on(Z)?Y:[].concat(By(Y),[Z])},[]);else if(C==="number"){var K=c3e(A,o.filter(function(Y){var Z,ie,se=a in Y.props?Y.props[a]:(Z=Y.type.defaultProps)===null||Z===void 0?void 0:Z[a],ce="hide"in Y.props?Y.props.hide:(ie=Y.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return se===M&&(D||!ce)}),E,i,u);K&&(N=K)}m&&(C==="number"||P!=="auto")&&(H=rx(A,E,"category"))}else m?N=YT(0,_):s&&s[M]&&s[M].hasStack&&C==="number"?N=h==="expand"?[0,1]:gse(s[M].stackGroups,l,c):N=use(A,o.filter(function(Y){var Z=a in Y.props?Y.props[a]:Y.type.defaultProps[a],ie="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return Z===M&&(D||!ie)}),C,u,!0);if(C==="number")N=DF(f,N,M,i,R),V&&(N=qL(V,N,I));else if(C==="category"&&V){var G=V,q=N.every(function(Y){return G.indexOf(Y)>=0});q&&(N=G)}}return Xe(Xe({},g),{},sn({},M,Xe(Xe({},w),{},{axisType:i,domain:N,categoricalDomain:H,duplicateDomain:B,originalDomain:(v=w.domain)!==null&&v!==void 0?v:j,isCategorical:m,layout:u})))},{})},aYe=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,h=mP(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=h.length,g=dse(u,i),y=-1;return r.reduce(function(v,w){var C=w.type.defaultProps!==void 0?Xe(Xe({},w.type.defaultProps),w.props):w.props,E=C[a],I=_le("number");if(!v[E]){y++;var O;return g?O=YT(0,m):s&&s[E]&&s[E].hasStack?(O=gse(s[E].stackGroups,l,c),O=DF(f,O,E,i)):(O=qL(I,use(h,r.filter(function(P){var R,D,M=a in P.props?P.props[a]:(R=P.type.defaultProps)===null||R===void 0?void 0:R[a],A="hide"in P.props?P.props.hide:(D=P.type.defaultProps)===null||D===void 0?void 0:D.hide;return M===E&&!A}),"number",u),o.defaultProps.allowDataOverflow),O=DF(f,O,E,i)),Xe(Xe({},v),{},sn({},E,Xe(Xe({axisType:i},o.defaultProps),{},{hide:!0,orientation:Ja(tYe,"".concat(i,".").concat(y%2),null),domain:O,originalDomain:I,isCategorical:g,layout:u})))}return v},{})},sYe=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,f="".concat(o,"Id"),h=sa(u,i),m={};return h&&h.length?m=iYe(t,{axes:h,graphicalItems:a,axisType:o,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(m=aYe(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),m},lYe=function(t){var n=Qd(t),r=Ru(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:cz(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:NT(n,r)}},HQ=function(t){var n=t.children,r=t.defaultShowTooltip,o=Va(n,Iy),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},cYe=function(t){return!t||!t.length?!1:t.some(function(n){var r=ku(n&&n.type);return r&&r.indexOf("Bar")>=0})},UQ=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},uYe=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,f=r.children,h=r.margin||{},m=Va(f,Iy),g=Va(f,Oc),y=Object.keys(l).reduce(function(O,P){var R=l[P],D=R.orientation;return!R.mirror&&!R.hide?Xe(Xe({},O),{},sn({},D,O[D]+R.width)):O},{left:h.left||0,right:h.right||0}),v=Object.keys(a).reduce(function(O,P){var R=a[P],D=R.orientation;return!R.mirror&&!R.hide?Xe(Xe({},O),{},sn({},D,Ja(O,"".concat(D))+R.height)):O},{top:h.top||0,bottom:h.bottom||0}),w=Xe(Xe({},v),y),C=w.bottom;m&&(w.bottom+=m.props.height||Iy.defaultProps.height),g&&n&&(w=s3e(w,o,r,n));var E=c-w.left-w.right,I=u-w.top-w.bottom;return Xe(Xe({brushBottom:C},w),{},{width:Math.max(E,0),height:Math.max(I,0)})},dYe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Pw=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,f=t.defaultProps,h=function(w,C){var E=C.graphicalItems,I=C.stackGroups,O=C.offset,P=C.updateId,R=C.dataStartIndex,D=C.dataEndIndex,M=w.barSize,A=w.layout,_=w.barGap,N=w.barCategoryGap,B=w.maxBarSize,H=UQ(A),j=H.numericAxisName,L=H.cateAxisName,V=cYe(E),W=[];return E.forEach(function(K,G){var q=mP(w.data,{graphicalItems:[K],dataStartIndex:R,dataEndIndex:D}),Y=K.type.defaultProps!==void 0?Xe(Xe({},K.type.defaultProps),K.props):K.props,Z=Y.dataKey,ie=Y.maxBarSize,se=Y["".concat(j,"Id")],ce=Y["".concat(L,"Id")],ye={},Se=l.reduce(function(Ie,te){var Te=C["".concat(te.axisType,"Map")],De=Y["".concat(te.axisType,"Id")];Te&&Te[De]||te.axisType==="zAxis"||Af();var Ve=Te[De];return Xe(Xe({},Ie),{},sn(sn({},te.axisType,Ve),"".concat(te.axisType,"Ticks"),Ru(Ve)))},ye),ne=Se[L],le=Se["".concat(L,"Ticks")],de=I&&I[se]&&I[se].hasStack&&v3e(K,I[se].stackGroups),oe=ku(K.type).indexOf("Bar")>=0,ue=NT(ne,le),pe=[],Ee=V&&i3e({barSize:M,stackGroups:I,totalSize:dYe(Se,L)});if(oe){var xe,Re,he=on(ie)?B:ie,Pe=(xe=(Re=NT(ne,le,!0))!==null&&Re!==void 0?Re:he)!==null&&xe!==void 0?xe:0;pe=a3e({barGap:_,barCategoryGap:N,bandSize:Pe!==ue?Pe:ue,sizeList:Ee[ce],maxBarSize:he}),Pe!==ue&&(pe=pe.map(function(Ie){return Xe(Xe({},Ie),{},{position:Xe(Xe({},Ie.position),{},{offset:Ie.position.offset-Pe/2})})}))}var ve=K&&K.type&&K.type.getComposedData;ve&&W.push({props:Xe(Xe({},ve(Xe(Xe({},Se),{},{displayedData:q,props:w,dataKey:Z,item:K,bandSize:ue,barPosition:pe,offset:O,stackedData:de,layout:A,dataStartIndex:R,dataEndIndex:D}))),{},sn(sn(sn({key:K.key||"item-".concat(G)},j,Se[j]),L,Se[L]),"animationId",P)),childIndex:dje(K,w.children),item:K})}),W},m=function(w,C){var E=w.props,I=w.dataStartIndex,O=w.dataEndIndex,P=w.updateId;if(!n8({props:E}))return null;var R=E.children,D=E.layout,M=E.stackOffset,A=E.data,_=E.reverseStackOrder,N=UQ(D),B=N.numericAxisName,H=N.cateAxisName,j=sa(R,r),L=g3e(A,j,"".concat(B,"Id"),"".concat(H,"Id"),M,_),V=l.reduce(function(Y,Z){var ie="".concat(Z.axisType,"Map");return Xe(Xe({},Y),{},sn({},ie,sYe(E,Xe(Xe({},Z),{},{graphicalItems:j,stackGroups:Z.axisType===B&&L,dataStartIndex:I,dataEndIndex:O}))))},{}),W=uYe(Xe(Xe({},V),{},{props:E,graphicalItems:j}),C==null?void 0:C.legendBBox);Object.keys(V).forEach(function(Y){V[Y]=u(E,V[Y],W,Y.replace("Map",""),n)});var K=V["".concat(H,"Map")],G=lYe(K),q=h(E,Xe(Xe({},V),{},{dataStartIndex:I,dataEndIndex:O,updateId:P,graphicalItems:j,stackGroups:L,offset:W}));return Xe(Xe({formattedGraphicalItems:q,graphicalItems:j,offset:W,stackGroups:L},G),V)},g=function(v){function w(C){var E,I,O;return UKe(this,w),O=WKe(this,w,[C]),sn(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),sn(O,"accessibilityManager",new MKe),sn(O,"handleLegendBBoxUpdate",function(P){if(P){var R=O.state,D=R.dataStartIndex,M=R.dataEndIndex,A=R.updateId;O.setState(Xe({legendBBox:P},m({props:O.props,dataStartIndex:D,dataEndIndex:M,updateId:A},Xe(Xe({},O.state),{},{legendBBox:P}))))}}),sn(O,"handleReceiveSyncEvent",function(P,R,D){if(O.props.syncId===P){if(D===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(R)}}),sn(O,"handleBrushChange",function(P){var R=P.startIndex,D=P.endIndex;if(R!==O.state.dataStartIndex||D!==O.state.dataEndIndex){var M=O.state.updateId;O.setState(function(){return Xe({dataStartIndex:R,dataEndIndex:D},m({props:O.props,dataStartIndex:R,dataEndIndex:D,updateId:M},O.state))}),O.triggerSyncEvent({dataStartIndex:R,dataEndIndex:D})}}),sn(O,"handleMouseEnter",function(P){var R=O.getMouseInfo(P);if(R){var D=Xe(Xe({},R),{},{isTooltipActive:!0});O.setState(D),O.triggerSyncEvent(D);var M=O.props.onMouseEnter;rn(M)&&M(D,P)}}),sn(O,"triggeredAfterMouseMove",function(P){var R=O.getMouseInfo(P),D=R?Xe(Xe({},R),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(D),O.triggerSyncEvent(D);var M=O.props.onMouseMove;rn(M)&&M(D,P)}),sn(O,"handleItemMouseEnter",function(P){O.setState(function(){return{isTooltipActive:!0,activeItem:P,activePayload:P.tooltipPayload,activeCoordinate:P.tooltipPosition||{x:P.cx,y:P.cy}}})}),sn(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),sn(O,"handleMouseMove",function(P){P.persist(),O.throttleTriggeredAfterMouseMove(P)}),sn(O,"handleMouseLeave",function(P){O.throttleTriggeredAfterMouseMove.cancel();var R={isTooltipActive:!1};O.setState(R),O.triggerSyncEvent(R);var D=O.props.onMouseLeave;rn(D)&&D(R,P)}),sn(O,"handleOuterEvent",function(P){var R=uje(P),D=Ja(O.props,"".concat(R));if(R&&rn(D)){var M,A;/.*touch.*/i.test(R)?A=O.getMouseInfo(P.changedTouches[0]):A=O.getMouseInfo(P),D((M=A)!==null&&M!==void 0?M:{},P)}}),sn(O,"handleClick",function(P){var R=O.getMouseInfo(P);if(R){var D=Xe(Xe({},R),{},{isTooltipActive:!0});O.setState(D),O.triggerSyncEvent(D);var M=O.props.onClick;rn(M)&&M(D,P)}}),sn(O,"handleMouseDown",function(P){var R=O.props.onMouseDown;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),sn(O,"handleMouseUp",function(P){var R=O.props.onMouseUp;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),sn(O,"handleTouchMove",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(P.changedTouches[0])}),sn(O,"handleTouchStart",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&O.handleMouseDown(P.changedTouches[0])}),sn(O,"handleTouchEnd",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&O.handleMouseUp(P.changedTouches[0])}),sn(O,"handleDoubleClick",function(P){var R=O.props.onDoubleClick;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),sn(O,"handleContextMenu",function(P){var R=O.props.onContextMenu;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),sn(O,"triggerSyncEvent",function(P){O.props.syncId!==void 0&&K_.emit(Y_,O.props.syncId,P,O.eventEmitterSymbol)}),sn(O,"applySyncEvent",function(P){var R=O.props,D=R.layout,M=R.syncMethod,A=O.state.updateId,_=P.dataStartIndex,N=P.dataEndIndex;if(P.dataStartIndex!==void 0||P.dataEndIndex!==void 0)O.setState(Xe({dataStartIndex:_,dataEndIndex:N},m({props:O.props,dataStartIndex:_,dataEndIndex:N,updateId:A},O.state)));else if(P.activeTooltipIndex!==void 0){var B=P.chartX,H=P.chartY,j=P.activeTooltipIndex,L=O.state,V=L.offset,W=L.tooltipTicks;if(!V)return;if(typeof M=="function")j=M(W,P);else if(M==="value"){j=-1;for(var K=0;K<W.length;K++)if(W[K].value===P.activeLabel){j=K;break}}var G=Xe(Xe({},V),{},{x:V.left,y:V.top}),q=Math.min(B,G.x+G.width),Y=Math.min(H,G.y+G.height),Z=W[j]&&W[j].value,ie=$F(O.state,O.props.data,j),se=W[j]?{x:D==="horizontal"?W[j].coordinate:q,y:D==="horizontal"?Y:W[j].coordinate}:kle;O.setState(Xe(Xe({},P),{},{activeLabel:Z,activeCoordinate:se,activePayload:ie,activeTooltipIndex:j}))}else O.setState(P)}),sn(O,"renderCursor",function(P){var R,D=O.state,M=D.isTooltipActive,A=D.activeCoordinate,_=D.activePayload,N=D.offset,B=D.activeTooltipIndex,H=D.tooltipAxisBandSize,j=O.getTooltipEventType(),L=(R=P.props.active)!==null&&R!==void 0?R:M,V=O.props.layout,W=P.key||"_recharts-cursor";return J.createElement(LKe,{key:W,activeCoordinate:A,activePayload:_,activeTooltipIndex:B,chartName:n,element:P,isActive:L,layout:V,offset:N,tooltipAxisBandSize:H,tooltipEventType:j})}),sn(O,"renderPolarAxis",function(P,R,D){var M=Ja(P,"type.axisType"),A=Ja(O.state,"".concat(M,"Map")),_=P.type.defaultProps,N=_!==void 0?Xe(Xe({},_),P.props):P.props,B=A&&A[N["".concat(M,"Id")]];return x.cloneElement(P,Xe(Xe({},B),{},{className:fe(M,B.className),key:P.key||"".concat(R,"-").concat(D),ticks:Ru(B,!0)}))}),sn(O,"renderPolarGrid",function(P){var R=P.props,D=R.radialLines,M=R.polarAngles,A=R.polarRadius,_=O.state,N=_.radiusAxisMap,B=_.angleAxisMap,H=Qd(N),j=Qd(B),L=j.cx,V=j.cy,W=j.innerRadius,K=j.outerRadius;return x.cloneElement(P,{polarAngles:Array.isArray(M)?M:Ru(j,!0).map(function(G){return G.coordinate}),polarRadius:Array.isArray(A)?A:Ru(H,!0).map(function(G){return G.coordinate}),cx:L,cy:V,innerRadius:W,outerRadius:K,key:P.key||"polar-grid",radialLines:D})}),sn(O,"renderLegend",function(){var P=O.state.formattedGraphicalItems,R=O.props,D=R.children,M=R.width,A=R.height,_=O.props.margin||{},N=M-(_.left||0)-(_.right||0),B=lse({children:D,formattedGraphicalItems:P,legendWidth:N,legendContent:c});if(!B)return null;var H=B.item,j=BQ(B,FKe);return x.cloneElement(H,Xe(Xe({},j),{},{chartWidth:M,chartHeight:A,margin:_,onBBoxUpdate:O.handleLegendBBoxUpdate}))}),sn(O,"renderTooltip",function(){var P,R=O.props,D=R.children,M=R.accessibilityLayer,A=Va(D,ba);if(!A)return null;var _=O.state,N=_.isTooltipActive,B=_.activeCoordinate,H=_.activePayload,j=_.activeLabel,L=_.offset,V=(P=A.props.active)!==null&&P!==void 0?P:N;return x.cloneElement(A,{viewBox:Xe(Xe({},L),{},{x:L.left,y:L.top}),active:V,label:j,payload:V?H:[],coordinate:B,accessibilityLayer:M})}),sn(O,"renderBrush",function(P){var R=O.props,D=R.margin,M=R.data,A=O.state,_=A.offset,N=A.dataStartIndex,B=A.dataEndIndex,H=A.updateId;return x.cloneElement(P,{key:P.key||"_recharts-brush",onChange:B1(O.handleBrushChange,P.props.onChange),data:M,x:mt(P.props.x)?P.props.x:_.left,y:mt(P.props.y)?P.props.y:_.top+_.height+_.brushBottom-(D.bottom||0),width:mt(P.props.width)?P.props.width:_.width,startIndex:N,endIndex:B,updateId:"brush-".concat(H)})}),sn(O,"renderReferenceElement",function(P,R,D){if(!P)return null;var M=O,A=M.clipPathId,_=O.state,N=_.xAxisMap,B=_.yAxisMap,H=_.offset,j=P.type.defaultProps||{},L=P.props,V=L.xAxisId,W=V===void 0?j.xAxisId:V,K=L.yAxisId,G=K===void 0?j.yAxisId:K;return x.cloneElement(P,{key:P.key||"".concat(R,"-").concat(D),xAxis:N[W],yAxis:B[G],viewBox:{x:H.left,y:H.top,width:H.width,height:H.height},clipPathId:A})}),sn(O,"renderActivePoints",function(P){var R=P.item,D=P.activePoint,M=P.basePoint,A=P.childIndex,_=P.isRange,N=[],B=R.props.key,H=R.item.type.defaultProps!==void 0?Xe(Xe({},R.item.type.defaultProps),R.item.props):R.item.props,j=H.activeDot,L=H.dataKey,V=Xe(Xe({index:A,dataKey:L,cx:D.x,cy:D.y,r:4,fill:$z(R.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},zt(j,!1)),fT(j));return N.push(w.renderActiveDot(j,V,"".concat(B,"-activePoint-").concat(A))),M?N.push(w.renderActiveDot(j,Xe(Xe({},V),{},{cx:M.x,cy:M.y}),"".concat(B,"-basePoint-").concat(A))):_&&N.push(null),N}),sn(O,"renderGraphicChild",function(P,R,D){var M=O.filterFormatItem(P,R,D);if(!M)return null;var A=O.getTooltipEventType(),_=O.state,N=_.isTooltipActive,B=_.tooltipAxis,H=_.activeTooltipIndex,j=_.activeLabel,L=O.props.children,V=Va(L,ba),W=M.props,K=W.points,G=W.isRange,q=W.baseLine,Y=M.item.type.defaultProps!==void 0?Xe(Xe({},M.item.type.defaultProps),M.item.props):M.item.props,Z=Y.activeDot,ie=Y.hide,se=Y.activeBar,ce=Y.activeShape,ye=!!(!ie&&N&&V&&(Z||se||ce)),Se={};A!=="axis"&&V&&V.props.trigger==="click"?Se={onClick:B1(O.handleItemMouseEnter,P.props.onClick)}:A!=="axis"&&(Se={onMouseLeave:B1(O.handleItemMouseLeave,P.props.onMouseLeave),onMouseEnter:B1(O.handleItemMouseEnter,P.props.onMouseEnter)});var ne=x.cloneElement(P,Xe(Xe({},M.props),Se));function le(te){return typeof B.dataKey=="function"?B.dataKey(te.payload):null}if(ye)if(H>=0){var de,oe;if(B.dataKey&&!B.allowDuplicatedCategory){var ue=typeof B.dataKey=="function"?le:"payload.".concat(B.dataKey.toString());de=dT(K,ue,j),oe=G&&q&&dT(q,ue,j)}else de=K==null?void 0:K[H],oe=G&&q&&q[H];if(ce||se){var pe=P.props.activeIndex!==void 0?P.props.activeIndex:H;return[x.cloneElement(P,Xe(Xe(Xe({},M.props),Se),{},{activeIndex:pe})),null,null]}if(!on(de))return[ne].concat(By(O.renderActivePoints({item:M,activePoint:de,basePoint:oe,childIndex:H,isRange:G})))}else{var Ee,xe=(Ee=O.getItemByXY(O.state.activeCoordinate))!==null&&Ee!==void 0?Ee:{graphicalItem:ne},Re=xe.graphicalItem,he=Re.item,Pe=he===void 0?P:he,ve=Re.childIndex,Ie=Xe(Xe(Xe({},M.props),Se),{},{activeIndex:ve});return[x.cloneElement(Pe,Ie),null,null]}return G?[ne,null,null]:[ne,null]}),sn(O,"renderCustomized",function(P,R,D){return x.cloneElement(P,Xe(Xe({key:"recharts-customized-".concat(D)},O.props),O.state))}),sn(O,"renderMap",{CartesianGrid:{handler:G1,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:G1},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:G1},YAxis:{handler:G1},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((E=C.id)!==null&&E!==void 0?E:Bf("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=sae(O.triggeredAfterMouseMove,(I=C.throttleDelay)!==null&&I!==void 0?I:1e3/60),O.state={},O}return QKe(w,v),qKe(w,[{key:"componentDidMount",value:function(){var E,I;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(I=this.props.margin.top)!==null&&I!==void 0?I:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,I=E.children,O=E.data,P=E.height,R=E.layout,D=Va(I,ba);if(D){var M=D.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,_=$F(this.state,O,M,A),N=this.state.tooltipTicks[M].coordinate,B=(this.state.offset.top+P)/2,H=R==="horizontal",j=H?{x:N,y:B}:{y:N,x:B},L=this.state.formattedGraphicalItems.find(function(W){var K=W.item;return K.type.name==="Scatter"});L&&(j=Xe(Xe({},j),L.props.points[M].tooltipPosition),_=L.props.points[M].tooltipPayload);var V={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:A,activePayload:_,activeCoordinate:j};this.setState(V),this.renderCursor(D),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,I){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==I.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var O,P;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0}})}return null}},{key:"componentDidUpdate",value:function(E){hL([Va(E.children,ba)],[Va(this.props.children,ba)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Va(this.props.children,ba);if(E&&typeof E.props.shared=="boolean"){var I=E.props.shared?"axis":"item";return s.indexOf(I)>=0?I:i}return i}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var I=this.container,O=I.getBoundingClientRect(),P=QVe(O),R={chartX:Math.round(E.pageX-P.left),chartY:Math.round(E.pageY-P.top)},D=O.width/I.offsetWidth||1,M=this.inRange(R.chartX,R.chartY,D);if(!M)return null;var A=this.state,_=A.xAxisMap,N=A.yAxisMap,B=this.getTooltipEventType(),H=VQ(this.state,this.props.data,this.props.layout,M);if(B!=="axis"&&_&&N){var j=Qd(_).scale,L=Qd(N).scale,V=j&&j.invert?j.invert(R.chartX):null,W=L&&L.invert?L.invert(R.chartY):null;return Xe(Xe({},R),{},{xValue:V,yValue:W},H)}return H?Xe(Xe({},R),H):null}},{key:"inRange",value:function(E,I){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,P=this.props.layout,R=E/O,D=I/O;if(P==="horizontal"||P==="vertical"){var M=this.state.offset,A=R>=M.left&&R<=M.left+M.width&&D>=M.top&&D<=M.top+M.height;return A?{x:R,y:D}:null}var _=this.state,N=_.angleAxisMap,B=_.radiusAxisMap;if(N&&B){var H=Qd(N);return UK({x:R,y:D},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,I=this.getTooltipEventType(),O=Va(E,ba),P={};O&&I==="axis"&&(O.props.trigger==="click"?P={onClick:this.handleClick}:P={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var R=fT(this.props,this.handleOuterEvent);return Xe(Xe({},R),P)}},{key:"addListener",value:function(){K_.on(Y_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){K_.removeListener(Y_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,I,O){for(var P=this.state.formattedGraphicalItems,R=0,D=P.length;R<D;R++){var M=P[R];if(M.item===E||M.props.key===E.key||I===ku(M.item.type)&&O===M.childIndex)return M}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,I=this.state.offset,O=I.left,P=I.top,R=I.height,D=I.width;return J.createElement("defs",null,J.createElement("clipPath",{id:E},J.createElement("rect",{x:O,y:P,height:R,width:D})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(I,O){var P=jQ(O,2),R=P[0],D=P[1];return Xe(Xe({},I),{},sn({},R,D.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(I,O){var P=jQ(O,2),R=P[0],D=P[1];return Xe(Xe({},I),{},sn({},R,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var I;return(I=this.state.xAxisMap)===null||I===void 0||(I=I[E])===null||I===void 0?void 0:I.scale}},{key:"getYScaleByAxisId",value:function(E){var I;return(I=this.state.yAxisMap)===null||I===void 0||(I=I[E])===null||I===void 0?void 0:I.scale}},{key:"getItemByXY",value:function(E){var I=this.state,O=I.formattedGraphicalItems,P=I.activeItem;if(O&&O.length)for(var R=0,D=O.length;R<D;R++){var M=O[R],A=M.props,_=M.item,N=_.type.defaultProps!==void 0?Xe(Xe({},_.type.defaultProps),_.props):_.props,B=ku(_.type);if(B==="Bar"){var H=(A.data||[]).find(function(W){return cqe(E,W)});if(H)return{graphicalItem:M,payload:H}}else if(B==="RadialBar"){var j=(A.data||[]).find(function(W){return UK(E,W)});if(j)return{graphicalItem:M,payload:j}}else if(sP(M,P)||lP(M,P)||dS(M,P)){var L=kWe({graphicalItem:M,activeTooltipItem:P,itemData:N.data}),V=N.activeIndex===void 0?L:N.activeIndex;return{graphicalItem:Xe(Xe({},M),{},{childIndex:V}),payload:dS(M,P)?N.data[L]:M.props.data[L]}}}return null}},{key:"render",value:function(){var E=this;if(!n8(this))return null;var I=this.props,O=I.children,P=I.className,R=I.width,D=I.height,M=I.style,A=I.compact,_=I.title,N=I.desc,B=BQ(I,jKe),H=zt(B,!1);if(A)return J.createElement(gQ,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement(gL,xg({},H,{width:R,height:D,title:_,desc:N}),this.renderClipPath(),o8(O,this.renderMap)));if(this.props.accessibilityLayer){var j,L;H.tabIndex=(j=this.props.tabIndex)!==null&&j!==void 0?j:0,H.role=(L=this.props.role)!==null&&L!==void 0?L:"application",H.onKeyDown=function(W){E.accessibilityManager.keyboardEvent(W)},H.onFocus=function(){E.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return J.createElement(gQ,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement("div",xg({className:fe("recharts-wrapper",P),style:Xe({position:"relative",cursor:"default",width:R,height:D},M)},V,{ref:function(K){E.container=K}}),J.createElement(gL,xg({},H,{width:R,height:D,title:_,desc:N,style:nYe}),this.renderClipPath(),o8(O,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);sn(g,"displayName",n),sn(g,"defaultProps",Xe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),sn(g,"getDerivedStateFromProps",function(v,w){var C=v.dataKey,E=v.data,I=v.children,O=v.width,P=v.height,R=v.layout,D=v.stackOffset,M=v.margin,A=w.dataStartIndex,_=w.dataEndIndex;if(w.updateId===void 0){var N=HQ(v);return Xe(Xe(Xe({},N),{},{updateId:0},m(Xe(Xe({props:v},N),{},{updateId:0}),w)),{},{prevDataKey:C,prevData:E,prevWidth:O,prevHeight:P,prevLayout:R,prevStackOffset:D,prevMargin:M,prevChildren:I})}if(C!==w.prevDataKey||E!==w.prevData||O!==w.prevWidth||P!==w.prevHeight||R!==w.prevLayout||D!==w.prevStackOffset||!Fg(M,w.prevMargin)){var B=HQ(v),H={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},j=Xe(Xe({},VQ(w,E,R)),{},{updateId:w.updateId+1}),L=Xe(Xe(Xe({},B),H),j);return Xe(Xe(Xe({},L),m(Xe({props:v},L),w)),{},{prevDataKey:C,prevData:E,prevWidth:O,prevHeight:P,prevLayout:R,prevStackOffset:D,prevMargin:M,prevChildren:I})}if(!hL(I,w.prevChildren)){var V,W,K,G,q=Va(I,Iy),Y=q&&(V=(W=q.props)===null||W===void 0?void 0:W.startIndex)!==null&&V!==void 0?V:A,Z=q&&(K=(G=q.props)===null||G===void 0?void 0:G.endIndex)!==null&&K!==void 0?K:_,ie=Y!==A||Z!==_,se=!on(E),ce=se&&!ie?w.updateId:w.updateId+1;return Xe(Xe({updateId:ce},m(Xe(Xe({props:v},w),{},{updateId:ce,dataStartIndex:Y,dataEndIndex:Z}),w)),{},{prevChildren:I,dataStartIndex:Y,dataEndIndex:Z})}return null}),sn(g,"renderActiveDot",function(v,w,C){var E;return x.isValidElement(v)?E=x.cloneElement(v,w):rn(v)?E=v(w):E=J.createElement(Tw,w),J.createElement(wn,{className:"recharts-active-dot",key:C},E)});var y=x.forwardRef(function(w,C){return J.createElement(g,xg({},w,{ref:C}))});return y.displayName=g.displayName,y},qz=Pw({chartName:"LineChart",GraphicalChild:qh,axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs}],formatAxisMap:uP}),$le=Pw({chartName:"BarChart",GraphicalChild:Ac,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs}],formatAxisMap:uP}),Nle=Pw({chartName:"PieChart",GraphicalChild:Gc,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:aP},{axisType:"radiusAxis",AxisComp:oP}],formatAxisMap:P3e,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),fYe=Pw({chartName:"ScatterChart",GraphicalChild:Iw,defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs},{axisType:"zAxis",AxisComp:hP}],formatAxisMap:uP}),pYe=Pw({chartName:"AreaChart",GraphicalChild:Gf,axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs}],formatAxisMap:uP});const hYe=e=>{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=Lr(),[o,i]=je(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return Q(Ft,{direction:"row",children:[S(nd,{width:"50%",height:140,children:Q(Nle,{children:[S(Gc,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>S(Ev,{fill:s[c%s.length]},`cell-${c}`))}),Q("g",{children:[S("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:_i(n,i.language)})}),S("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),Q(Ft,{width:"50%",spacing:1,children:[S(Lg,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),S(Lg,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),S(Lg,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})},mYe=["localeText"],NF=x.createContext(null),Ys=function(t){const{localeText:n}=t,r=$e(t,mYe),{utils:o,localeText:i}=x.useContext(NF)??{utils:void 0,localeText:void 0},a=Pn({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:f,localeText:h}=a,m=x.useMemo(()=>z({},h,i,n),[h,i,n]),g=x.useMemo(()=>{if(!l)return o||null;const w=new l({locale:f,formats:c,instance:u});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join(`
-`));return w},[l,f,c,u,o]),y=x.useMemo(()=>g?{minDate:g.date("1900-01-01T00:00:00.000"),maxDate:g.date("2099-12-31T00:00:00.000")}:null,[g]),v=x.useMemo(()=>({utils:g,defaultDates:y,localeText:m}),[y,g,m]);return k.jsx(NF.Provider,{value:v,children:s})},gYe=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:z({},e)}}}}),Lle={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",nextStepButtonLabel:"Next",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",timeRangePickerToolbarTitle:"Select time range",clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:"Choose date",openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:"Choose time",openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:"Choose range",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},yYe=Lle;gYe(Lle);const Wh=()=>{const e=x.useContext(NF);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
+ A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*g," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},uqe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),f=Math.min(a,a+l),p=Math.max(a,a+l);return r>=c&&r<=u&&o>=f&&o<=p}return!1},dqe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Lz=function(t){var n=wY(wY({},dqe),t),r=x.useRef(),o=x.useState(-1),i=nqe(o,2),a=i[0],s=i[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var I=r.current.getTotalLength();I&&s(I)}catch{}},[]);var l=n.x,c=n.y,u=n.width,f=n.height,p=n.radius,m=n.className,g=n.animationEasing,y=n.animationDuration,v=n.animationBegin,w=n.isAnimationActive,C=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var E=fe("recharts-rectangle",m);return C?J.createElement(al,{canBegin:a>0,from:{width:u,height:f,x:l,y:c},to:{width:u,height:f,x:l,y:c},duration:y,animationEasing:g,isActive:C},function(I){var O=I.width,P=I.height,R=I.x,D=I.y;return J.createElement(al,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,isActive:w,easing:g},J.createElement("path",HT({},zt(n,!0),{className:E,d:CY(R,D,O,P,p),ref:r})))}):J.createElement("path",HT({},zt(n,!0),{className:E,d:CY(l,c,u,f,p)}))},fqe=["points","className","baseLinePoints","connectNulls"];function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vg.apply(this,arguments)}function pqe(e,t){if(e==null)return{};var n=hqe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EY(e){return vqe(e)||yqe(e)||gqe(e)||mqe()}function mqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gqe(e,t){if(e){if(typeof e=="string")return sF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sF(e,t)}}function yqe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vqe(e){if(Array.isArray(e))return sF(e)}function sF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var TY=function(t){return t&&t.x===+t.x&&t.y===+t.y},bqe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){TY(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),TY(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},ix=function(t,n){var r=bqe(t);n&&(r=[r.reduce(function(i,a){return[].concat(EY(i),EY(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},xqe=function(t,n,r){var o=ix(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(ix(n.reverse(),r).slice(1))},Sqe=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=pqe(t,fqe);if(!n||!n.length)return null;var s=fe("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=xqe(n,o,i);return J.createElement("g",{className:s},J.createElement("path",vg({},zt(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?J.createElement("path",vg({},zt(a,!0),{fill:"none",d:ix(n,i)})):null,l?J.createElement("path",vg({},zt(a,!0),{fill:"none",d:ix(o,i)})):null)}var u=ix(n,i);return J.createElement("path",vg({},zt(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function lF(){return lF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lF.apply(this,arguments)}var Tw=function(t){var n=t.cx,r=t.cy,o=t.r,i=t.className,a=fe("recharts-dot",i);return n===+n&&r===+r&&o===+o?J.createElement("circle",lF({},zt(t,!1),pT(t),{className:a,cx:n,cy:r,r:o})):null};function lS(e){"@babel/helpers - typeof";return lS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lS(e)}var wqe=["x","y","top","left","width","height","className"];function cF(){return cF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cF.apply(this,arguments)}function OY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Cqe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OY(Object(n),!0).forEach(function(r){Eqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eqe(e,t,n){return t=Tqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tqe(e){var t=Oqe(e,"string");return lS(t)=="symbol"?t:t+""}function Oqe(e,t){if(lS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iqe(e,t){if(e==null)return{};var n=Pqe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Aqe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},Mqe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,f=u===void 0?0:u,p=t.height,m=p===void 0?0:p,g=t.className,y=Iqe(t,wqe),v=Cqe({x:r,y:i,top:s,left:c,width:f,height:m},y);return!mt(r)||!mt(i)||!mt(f)||!mt(m)||!mt(s)||!mt(c)?null:J.createElement("path",cF({},zt(v,!0),{className:fe("recharts-cross",g),d:Aqe(r,i,f,m,s,c)}))},O_,IY;function Rqe(){if(IY)return O_;IY=1;var e=eP(),t=qae(),n=Gc();function r(o,i){return o&&o.length?e(o,n(i,2),t):void 0}return O_=r,O_}var Dqe=Rqe();const kqe=Gn(Dqe);var I_,PY;function _qe(){if(PY)return I_;PY=1;var e=eP(),t=Gc(),n=Wae();function r(o,i){return o&&o.length?e(o,t(i,2),n):void 0}return I_=r,I_}var $qe=_qe();const Nqe=Gn($qe);var Lqe=["cx","cy","angle","ticks","axisLine"],Fqe=["ticks","tick","angle","tickFormatter","stroke"];function Ey(e){"@babel/helpers - typeof";return Ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ey(e)}function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ax.apply(this,arguments)}function AY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AY(Object(n),!0).forEach(function(r){oP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MY(e,t){if(e==null)return{};var n=jqe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kse(r.key),r)}}function zqe(e,t,n){return t&&RY(e.prototype,t),n&&RY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vqe(e,t,n){return t=UT(t),Hqe(e,Dse()?Reflect.construct(t,n||[],UT(e).constructor):t.apply(e,n))}function Hqe(e,t){if(t&&(Ey(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uqe(e)}function Uqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dse=function(){return!!e})()}function UT(e){return UT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},UT(e)}function Gqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uF(e,t)}function uF(e,t){return uF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},uF(e,t)}function oP(e,t,n){return t=kse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kse(e){var t=qqe(e,"string");return Ey(t)=="symbol"?t:t+""}function qqe(e,t){if(Ey(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ey(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var iP=function(e){function t(){return Bqe(this,t),Vqe(this,t,arguments)}return Gqe(t,e),zqe(t,[{key:"getTickValueCoord",value:function(r){var o=r.coordinate,i=this.props,a=i.angle,s=i.cx,l=i.cy;return Nr(s,l,o,a)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,o;switch(r){case"left":o="end";break;case"right":o="start";break;default:o="middle";break}return o}},{key:"getViewBox",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.angle,s=r.ticks,l=kqe(s,function(u){return u.coordinate||0}),c=Nqe(s,function(u){return u.coordinate||0});return{cx:o,cy:i,startAngle:a,endAngle:a,innerRadius:c.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.angle,s=r.ticks,l=r.axisLine,c=MY(r,Lqe),u=s.reduce(function(g,y){return[Math.min(g[0],y.coordinate),Math.max(g[1],y.coordinate)]},[1/0,-1/0]),f=Nr(o,i,u[0],a),p=Nr(o,i,u[1],a),m=xp(xp(xp({},zt(c,!1)),{},{fill:"none"},zt(l,!1)),{},{x1:f.x,y1:f.y,x2:p.x,y2:p.y});return J.createElement("line",ax({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.angle,l=o.tickFormatter,c=o.stroke,u=MY(o,Fqe),f=this.getTickTextAnchor(),p=zt(u,!1),m=zt(a,!1),g=i.map(function(y,v){var w=r.getTickValueCoord(y),C=xp(xp(xp(xp({textAnchor:f,transform:"rotate(".concat(90-s,", ").concat(w.x,", ").concat(w.y,")")},p),{},{stroke:"none",fill:c},m),{},{index:v},w),{},{payload:y});return J.createElement(wn,ax({className:fe("recharts-polar-radius-axis-tick",Sse(a)),key:"tick-".concat(y.coordinate)},Af(r.props,y,v)),t.renderTickItem(a,C,l?l(y.value,v):y.value))});return J.createElement(wn,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.axisLine,a=r.tick;return!o||!o.length?null:J.createElement(wn,{className:fe("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),a&&this.renderTicks(),oi.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):rn(r)?a=r(o):a=J.createElement(Eh,ax({},o,{className:"recharts-polar-radius-axis-tick-value"}),i),a}}])}(x.PureComponent);oP(iP,"displayName","PolarRadiusAxis");oP(iP,"axisType","radiusAxis");oP(iP,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Ty(e){"@babel/helpers - typeof";return Ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ty(e)}function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Np.apply(this,arguments)}function DY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Sp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DY(Object(n),!0).forEach(function(r){aP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$se(r.key),r)}}function Kqe(e,t,n){return t&&kY(e.prototype,t),n&&kY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yqe(e,t,n){return t=GT(t),Qqe(e,_se()?Reflect.construct(t,n||[],GT(e).constructor):t.apply(e,n))}function Qqe(e,t){if(t&&(Ty(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xqe(e)}function Xqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_se=function(){return!!e})()}function GT(e){return GT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},GT(e)}function Jqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dF(e,t)}function dF(e,t){return dF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},dF(e,t)}function aP(e,t,n){return t=$se(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $se(e){var t=Zqe(e,"string");return Ty(t)=="symbol"?t:t+""}function Zqe(e,t){if(Ty(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eWe=Math.PI/180,tWe=1e-5,sP=function(e){function t(){return Wqe(this,t),Yqe(this,t,arguments)}return Jqe(t,e),Kqe(t,[{key:"getTickLineCoord",value:function(r){var o=this.props,i=o.cx,a=o.cy,s=o.radius,l=o.orientation,c=o.tickSize,u=c||8,f=Nr(i,a,s,r.coordinate),p=Nr(i,a,s+(l==="inner"?-1:1)*u,r.coordinate);return{x1:f.x,y1:f.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(r){var o=this.props.orientation,i=Math.cos(-r.coordinate*eWe),a;return i>tWe?a=o==="outer"?"start":"end":i<-1e-5?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=Sp(Sp({},zt(this.props,!1)),{},{fill:"none"},zt(s,!1));if(l==="circle")return J.createElement(Tw,Np({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,f=u.map(function(p){return Nr(o,i,a,p.coordinate)});return J.createElement(Sqe,Np({className:"recharts-polar-angle-axis-line"},c,{points:f}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=zt(this.props,!1),f=zt(a,!1),p=Sp(Sp({},u),{},{fill:"none"},zt(s,!1)),m=i.map(function(g,y){var v=r.getTickLineCoord(g),w=r.getTickTextAnchor(g),C=Sp(Sp(Sp({textAnchor:w},u),{},{stroke:"none",fill:c},f),{},{index:y,payload:g,x:v.x2,y:v.y2});return J.createElement(wn,Np({className:fe("recharts-polar-angle-axis-tick",Sse(a)),key:"tick-".concat(g.coordinate)},Af(r.props,g,y)),s&&J.createElement("line",Np({className:"recharts-polar-angle-axis-tick-line"},p,v)),a&&t.renderTickItem(a,C,l?l(g.value,y):g.value))});return J.createElement(wn,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:J.createElement(wn,{className:fe("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):rn(r)?a=r(o):a=J.createElement(Eh,Np({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(x.PureComponent);aP(sP,"displayName","PolarAngleAxis");aP(sP,"axisType","angleAxis");aP(sP,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var P_,_Y;function nWe(){if(_Y)return P_;_Y=1;var e=Uie(),t=e(Object.getPrototypeOf,Object);return P_=t,P_}var A_,$Y;function rWe(){if($Y)return A_;$Y=1;var e=td(),t=nWe(),n=nd(),r="[object Object]",o=Function.prototype,i=Object.prototype,a=o.toString,s=i.hasOwnProperty,l=a.call(Object);function c(u){if(!n(u)||e(u)!=r)return!1;var f=t(u);if(f===null)return!0;var p=s.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&a.call(p)==l}return A_=c,A_}var oWe=rWe();const iWe=Gn(oWe);var M_,NY;function aWe(){if(NY)return M_;NY=1;var e=td(),t=nd(),n="[object Boolean]";function r(o){return o===!0||o===!1||t(o)&&e(o)==n}return M_=r,M_}var sWe=aWe();const lWe=Gn(sWe);function cS(e){"@babel/helpers - typeof";return cS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cS(e)}function qT(){return qT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qT.apply(this,arguments)}function cWe(e,t){return pWe(e)||fWe(e,t)||dWe(e,t)||uWe()}function uWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dWe(e,t){if(e){if(typeof e=="string")return LY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LY(e,t)}}function LY(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fWe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function pWe(e){if(Array.isArray(e))return e}function FY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function jY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FY(Object(n),!0).forEach(function(r){hWe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hWe(e,t,n){return t=mWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mWe(e){var t=gWe(e,"string");return cS(t)=="symbol"?t:t+""}function gWe(e,t){if(cS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BY=function(t,n,r,o,i){var a=r-o,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-a/2,",").concat(n+i),s+="L ".concat(t+r-a/2-o,",").concat(n+i),s+="L ".concat(t,",").concat(n," Z"),s},yWe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},vWe=function(t){var n=jY(jY({},yWe),t),r=x.useRef(),o=x.useState(-1),i=cWe(o,2),a=i[0],s=i[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&s(E)}catch{}},[]);var l=n.x,c=n.y,u=n.upperWidth,f=n.lowerWidth,p=n.height,m=n.className,g=n.animationEasing,y=n.animationDuration,v=n.animationBegin,w=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||p!==+p||u===0&&f===0||p===0)return null;var C=fe("recharts-trapezoid",m);return w?J.createElement(al,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:c},to:{upperWidth:u,lowerWidth:f,height:p,x:l,y:c},duration:y,animationEasing:g,isActive:w},function(E){var I=E.upperWidth,O=E.lowerWidth,P=E.height,R=E.x,D=E.y;return J.createElement(al,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,easing:g},J.createElement("path",qT({},zt(n,!0),{className:C,d:BY(R,D,I,O,P),ref:r})))}):J.createElement("g",null,J.createElement("path",qT({},zt(n,!0),{className:C,d:BY(l,c,u,f,p)})))},bWe=["option","shapeType","propTransformer","activeClassName","isActive"];function uS(e){"@babel/helpers - typeof";return uS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uS(e)}function xWe(e,t){if(e==null)return{};var n=SWe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SWe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function WT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zY(Object(n),!0).forEach(function(r){wWe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wWe(e,t,n){return t=CWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CWe(e){var t=EWe(e,"string");return uS(t)=="symbol"?t:t+""}function EWe(e,t){if(uS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TWe(e,t){return WT(WT({},t),e)}function OWe(e,t){return e==="symbols"}function VY(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return J.createElement(Lz,n);case"trapezoid":return J.createElement(vWe,n);case"sector":return J.createElement(Ese,n);case"symbols":if(OWe(t))return J.createElement(UI,n);break;default:return null}}function IWe(e){return x.isValidElement(e)?e.props:e}function KT(e){var t=e.option,n=e.shapeType,r=e.propTransformer,o=r===void 0?TWe:r,i=e.activeClassName,a=i===void 0?"recharts-active-shape":i,s=e.isActive,l=xWe(e,bWe),c;if(x.isValidElement(t))c=x.cloneElement(t,WT(WT({},l),IWe(t)));else if(rn(t))c=t(l);else if(iWe(t)&&!lWe(t)){var u=o(t,l);c=J.createElement(VY,{shapeType:n,elementProps:u})}else{var f=l;c=J.createElement(VY,{shapeType:n,elementProps:f})}return s?J.createElement(wn,{className:a},c):c}function lP(e,t){return t!=null&&"trapezoids"in e.props}function cP(e,t){return t!=null&&"sectors"in e.props}function dS(e,t){return t!=null&&"points"in e.props}function PWe(e,t){var n,r,o=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return o&&i}function AWe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function MWe(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function RWe(e,t){var n;return lP(e,t)?n=PWe:cP(e,t)?n=AWe:dS(e,t)&&(n=MWe),n}function DWe(e,t){var n;return lP(e,t)?n="trapezoids":cP(e,t)?n="sectors":dS(e,t)&&(n="points"),n}function kWe(e,t){if(lP(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(cP(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return dS(e,t)?t.payload:{}}function _We(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=DWe(n,t),i=kWe(n,t),a=r.filter(function(l,c){var u=Mf(i,l),f=n.props[o].filter(function(g){var y=RWe(n,t);return y(g,t)}),p=n.props[o].indexOf(f[f.length-1]),m=c===p;return u&&m}),s=r.indexOf(a[a.length-1]);return s}var EE;function Oy(e){"@babel/helpers - typeof";return Oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oy(e)}function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bg.apply(this,arguments)}function HY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HY(Object(n),!0).forEach(function(r){Bs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lse(r.key),r)}}function NWe(e,t,n){return t&&UY(e.prototype,t),n&&UY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function LWe(e,t,n){return t=YT(t),FWe(e,Nse()?Reflect.construct(t,n||[],YT(e).constructor):t.apply(e,n))}function FWe(e,t){if(t&&(Oy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jWe(e)}function jWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nse=function(){return!!e})()}function YT(e){return YT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},YT(e)}function BWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fF(e,t)}function fF(e,t){return fF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},fF(e,t)}function Bs(e,t,n){return t=Lse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lse(e){var t=zWe(e,"string");return Oy(t)=="symbol"?t:t+""}function zWe(e,t){if(Oy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qc=function(e){function t(n){var r;return $We(this,t),r=LWe(this,t,[n]),Bs(r,"pieRef",null),Bs(r,"sectorRefs",[]),Bs(r,"id",Vf("recharts-pie-")),Bs(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),rn(o)&&o()}),Bs(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),rn(o)&&o()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return BWe(t,e),NWe(t,[{key:"isActiveIndex",value:function(r){var o=this.props.activeIndex;return Array.isArray(o)?o.indexOf(r)!==-1:r===o}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.label,s=i.labelLine,l=i.dataKey,c=i.valueKey,u=zt(this.props,!1),f=zt(a,!1),p=zt(s,!1),m=a&&a.offsetRadius||20,g=r.map(function(y,v){var w=(y.startAngle+y.endAngle)/2,C=Nr(y.cx,y.cy,y.outerRadius+m,w),E=_r(_r(_r(_r({},u),y),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(C.x,y.cx)},C),I=_r(_r(_r(_r({},u),y),{},{fill:"none",stroke:y.fill},p),{},{index:v,points:[Nr(y.cx,y.cy,y.outerRadius,w),C]}),O=l;return an(l)&&an(c)?O="value":an(l)&&(O=c),J.createElement(wn,{key:"label-".concat(y.startAngle,"-").concat(y.endAngle,"-").concat(y.midAngle,"-").concat(v)},s&&t.renderLabelLineItem(s,I,"line"),t.renderLabelItem(a,E,Vr(y,O)))});return J.createElement(wn,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(r){var o=this,i=this.props,a=i.activeShape,s=i.blendStroke,l=i.inactiveShape;return r.map(function(c,u){if((c==null?void 0:c.startAngle)===0&&(c==null?void 0:c.endAngle)===0&&r.length!==1)return null;var f=o.isActiveIndex(u),p=l&&o.hasActiveIndex()?l:null,m=f?a:p,g=_r(_r({},c),{},{stroke:s?c.fill:c.stroke,tabIndex:-1});return J.createElement(wn,bg({ref:function(v){v&&!o.sectorRefs.includes(v)&&o.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Af(o.props,c,u),{key:"sector-".concat(c==null?void 0:c.startAngle,"-").concat(c==null?void 0:c.endAngle,"-").concat(c.midAngle,"-").concat(u)}),J.createElement(KT,bg({option:m,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,o=this.props,i=o.sectors,a=o.isAnimationActive,s=o.animationBegin,l=o.animationDuration,c=o.animationEasing,u=o.animationId,f=this.state,p=f.prevSectors,m=f.prevIsAnimationActive;return J.createElement(al,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(u,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var y=g.t,v=[],w=i&&i[0],C=w.startAngle;return i.forEach(function(E,I){var O=p&&p[I],P=I>0?Ja(E,"paddingAngle",0):0;if(O){var R=no(O.endAngle-O.startAngle,E.endAngle-E.startAngle),D=_r(_r({},E),{},{startAngle:C+P,endAngle:C+R(y)+P});v.push(D),C=D.endAngle}else{var M=E.endAngle,A=E.startAngle,_=no(0,M-A),N=_(y),B=_r(_r({},E),{},{startAngle:C+P,endAngle:C+N+P});v.push(B),C=B.endAngle}}),J.createElement(wn,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!Mf(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,f=o.innerRadius,p=o.outerRadius,m=o.isAnimationActive,g=this.state.isAnimationFinished;if(i||!a||!a.length||!mt(c)||!mt(u)||!mt(f)||!mt(p))return null;var y=fe("recharts-pie",s);return J.createElement(wn,{tabIndex:this.props.rootTabIndex,className:y,ref:function(w){r.pieRef=w}},this.renderSectors(),l&&this.renderLabels(a),oi.renderCallByParent(this.props,null,!1),(!m||g)&&Vl.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r<o?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,o,i){if(J.isValidElement(r))return J.cloneElement(r,o);if(rn(r))return r(o);var a=fe("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return J.createElement(xf,bg({},o,{key:i,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(r,o,i){if(J.isValidElement(r))return J.cloneElement(r,o);var a=i;if(rn(r)&&(a=r(o),J.isValidElement(a)))return a;var s=fe("recharts-pie-label-text",typeof r!="boolean"&&!rn(r)?r.className:"");return J.createElement(Eh,bg({},o,{alignmentBaseline:"middle",className:s}),a)}}])}(x.PureComponent);EE=qc;Bs(qc,"displayName","Pie");Bs(qc,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!rd.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Bs(qc,"parseDeltaAngle",function(e,t){var n=ta(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Bs(qc,"getRealPieData",function(e){var t=e.data,n=e.children,r=zt(e,!1),o=sa(n,Ev);return t&&t.length?t.map(function(i,a){return _r(_r(_r({payload:i},r),i),o&&o[a]&&o[a].props)}):o&&o.length?o.map(function(i){return _r(_r({},r),i.props)}):[]});Bs(qc,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=xse(o,i),s=r+na(e.cx,o,o/2),l=n+na(e.cy,i,i/2),c=na(e.innerRadius,a,0),u=na(e.outerRadius,a,a*.8),f=e.maxRadius||Math.sqrt(o*o+i*i)/2;return{cx:s,cy:l,innerRadius:c,outerRadius:u,maxRadius:f}});Bs(qc,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?_r(_r({},t.type.defaultProps),t.props):t.props,o=EE.getRealPieData(r);if(!o||!o.length)return null;var i=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,u=r.nameKey,f=r.valueKey,p=r.tooltipType,m=Math.abs(r.minAngle),g=EE.parseCoordinateOfPie(r,n),y=EE.parseDeltaAngle(a,s),v=Math.abs(y),w=c;an(c)&&an(f)?(zl(!1,`Use "dataKey" to specify the value of pie,
+ the props "valueKey" will be deprecated in 1.1.0`),w="value"):an(c)&&(zl(!1,`Use "dataKey" to specify the value of pie,
+ the props "valueKey" will be deprecated in 1.1.0`),w=f);var C=o.filter(function(D){return Vr(D,w,0)!==0}).length,E=(v>=360?C:C-1)*l,I=v-C*m-E,O=o.reduce(function(D,M){var A=Vr(M,w,0);return D+(mt(A)?A:0)},0),P;if(O>0){var R;P=o.map(function(D,M){var A=Vr(D,w,0),_=Vr(D,u,M),N=(mt(A)?A:0)/O,B;M?B=R.endAngle+ta(y)*l*(A!==0?1:0):B=a;var H=B+ta(y)*((A!==0?m:0)+N*I),j=(B+H)/2,L=(g.innerRadius+g.outerRadius)/2,V=[{name:_,value:A,payload:D,dataKey:w,type:p}],W=Nr(g.cx,g.cy,L,j);return R=_r(_r(_r({percent:N,cornerRadius:i,name:_,tooltipPayload:V,midAngle:j,middleRadius:L,tooltipPosition:W},D),g),{},{value:Vr(D,w),startAngle:B,endAngle:H,payload:D,paddingAngle:ta(y)*l}),R})}return _r(_r({},g),{},{sectors:P,data:o})});var R_,GY;function VWe(){if(GY)return R_;GY=1;var e=Math.ceil,t=Math.max;function n(r,o,i,a){for(var s=-1,l=t(e((o-r)/(i||1)),0),c=Array(l);l--;)c[a?l:++s]=r,r+=i;return c}return R_=n,R_}var D_,qY;function Fse(){if(qY)return D_;qY=1;var e=aae(),t=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-1/0){var i=o<0?-1:1;return i*n}return o===o?o:0}return D_=r,D_}var k_,WY;function HWe(){if(WY)return k_;WY=1;var e=VWe(),t=WI(),n=Fse();function r(o){return function(i,a,s){return s&&typeof s!="number"&&t(i,a,s)&&(a=s=void 0),i=n(i),a===void 0?(a=i,i=0):a=n(a),s=s===void 0?i<a?1:-1:n(s),e(i,a,s,o)}}return k_=r,k_}var __,KY;function UWe(){if(KY)return __;KY=1;var e=HWe(),t=e();return __=t,__}var GWe=UWe();const QT=Gn(GWe);function fS(e){"@babel/helpers - typeof";return fS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fS(e)}function YY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function QY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YY(Object(n),!0).forEach(function(r){jse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jse(e,t,n){return t=qWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qWe(e){var t=WWe(e,"string");return fS(t)=="symbol"?t:t+""}function WWe(e,t){if(fS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KWe=["Webkit","Moz","O","ms"],YWe=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),o=KWe.reduce(function(i,a){return QY(QY({},i),{},jse({},a+r,n))},{});return o[t]=n,o};function Iy(e){"@babel/helpers - typeof";return Iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iy(e)}function XT(){return XT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XT.apply(this,arguments)}function XY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XY(Object(n),!0).forEach(function(r){za(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zse(r.key),r)}}function XWe(e,t,n){return t&&JY(e.prototype,t),n&&JY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JWe(e,t,n){return t=JT(t),ZWe(e,Bse()?Reflect.construct(t,n||[],JT(e).constructor):t.apply(e,n))}function ZWe(e,t){if(t&&(Iy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e8e(e)}function e8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bse=function(){return!!e})()}function JT(e){return JT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},JT(e)}function t8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pF(e,t)}function pF(e,t){return pF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},pF(e,t)}function za(e,t,n){return t=zse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zse(e){var t=n8e(e,"string");return Iy(t)=="symbol"?t:t+""}function n8e(e,t){if(Iy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var r8e=function(t){var n=t.data,r=t.startIndex,o=t.endIndex,i=t.x,a=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=nx().domain(QT(0,l)).range([i,i+a-s]),u=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(o),scale:c,scaleValues:u}},ZY=function(t){return t.changedTouches&&!!t.changedTouches.length},Py=function(e){function t(n){var r;return QWe(this,t),r=JWe(this,t,[n]),za(r,"handleDrag",function(o){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(o):r.state.isSlideMoving&&r.handleSlideDrag(o)}),za(r,"handleTouchMove",function(o){o.changedTouches!=null&&o.changedTouches.length>0&&r.handleDrag(o.changedTouches[0])}),za(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),za(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),za(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),za(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),za(r,"handleSlideDragStart",function(o){var i=ZY(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return t8e(t,e),XWe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,f=Math.min(o,i),p=Math.max(o,i),m=t.getIndexInRange(a,f),g=t.getIndexInRange(a,p);return{startIndex:m-m%l,endIndex:g===u?u:g-g%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=Vr(i[r],s,r);return rn(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,f=l.travellerWidth,p=l.startIndex,m=l.endIndex,g=l.onChange,y=r.pageX-i;y>0?y=Math.min(y,c+u-f-s,c+u-f-a):y<0&&(y=Math.max(y,c-a,c-s));var v=this.getIndex({startX:a+y,endX:s+y});(v.startIndex!==p||v.endIndex!==m)&&g&&g(v),this.setState({startX:a+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=ZY(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,f=u.x,p=u.width,m=u.travellerWidth,g=u.onChange,y=u.gap,v=u.data,w={startX:this.state.startX,endX:this.state.endX},C=r.pageX-i;C>0?C=Math.min(C,f+p-m-c):C<0&&(C=Math.max(C,f-c)),w[a]=c+C;var E=this.getIndex(w),I=E.startIndex,O=E.endIndex,P=function(){var D=v.length-1;return a==="startX"&&(s>l?I%y===0:O%y===0)||s<l&&O===D||a==="endX"&&(s>l?O%y===0:I%y===0)||s>l&&O===D};this.setState(za(za({},a,c+C),"brushMoveStartX",r.pageX),function(){g&&P()&&g(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],f=s.indexOf(u);if(f!==-1){var p=f+r;if(!(p===-1||p>=s.length)){var m=s[p];o==="startX"&&m>=c||o==="endX"&&m<=l||this.setState(za({},o,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return J.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,f=x.Children.only(c);return f?J.cloneElement(f,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,f=l.height,p=l.traveller,m=l.ariaLabel,g=l.data,y=l.startIndex,v=l.endIndex,w=Math.max(r,this.props.x),C=$_($_({},zt(this.props,!1)),{},{x:w,y:c,width:u,height:f}),E=m||"Min value: ".concat((i=g[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=g[v])===null||a===void 0?void 0:a.name);return J.createElement(wn,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),s.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,C))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,f=Math.max(Math.abs(o-r)-c,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,f=u.startX,p=u.endX,m=5,g={pointerEvents:"none",fill:c};return J.createElement(wn,{className:"recharts-brush-texts"},J.createElement(Eh,XT({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,p)-m,y:a+s/2},g),this.getTextOfTick(o)),J.createElement(Eh,XT({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,p)+l+m,y:a+s/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,f=r.alwaysShowText,p=this.state,m=p.startX,g=p.endX,y=p.isTextActive,v=p.isSlideMoving,w=p.isTravellerMoving,C=p.isTravellerFocused;if(!o||!o.length||!mt(s)||!mt(l)||!mt(c)||!mt(u)||c<=0||u<=0)return null;var E=fe("recharts-brush",i),I=J.Children.count(a)===1,O=YWe("userSelect","none");return J.createElement(wn,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),I&&this.renderPanorama(),this.renderSlide(m,g),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(g,"endX"),(y||v||w||C||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),J.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return J.isValidElement(r)?i=J.cloneElement(r,o):rn(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,f=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return $_({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?r8e({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var p=o.scale.domain().map(function(m){return o.scale(m)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(x.PureComponent);za(Py,"displayName","Brush");za(Py,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var N_,eQ;function o8e(){if(eQ)return N_;eQ=1;var e=cz();function t(n,r){var o;return e(n,function(i,a,s){return o=r(i,a,s),!o}),!!o}return N_=t,N_}var L_,tQ;function i8e(){if(tQ)return L_;tQ=1;var e=Lie(),t=Gc(),n=o8e(),r=Aa(),o=WI();function i(a,s,l){var c=r(a)?e:n;return l&&o(a,s,l)&&(s=void 0),c(a,t(s,3))}return L_=i,L_}var a8e=i8e();const s8e=Gn(a8e);var Ac=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},F_,nQ;function l8e(){if(nQ)return F_;nQ=1;var e=tae();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return F_=t,F_}var j_,rQ;function c8e(){if(rQ)return j_;rQ=1;var e=l8e(),t=Zie(),n=Gc();function r(o,i){var a={};return i=n(i,3),t(o,function(s,l,c){e(a,l,i(s,l,c))}),a}return j_=r,j_}var u8e=c8e();const d8e=Gn(u8e);var B_,oQ;function f8e(){if(oQ)return B_;oQ=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(!n(t[r],r,t))return!1;return!0}return B_=e,B_}var z_,iQ;function p8e(){if(iQ)return z_;iQ=1;var e=cz();function t(n,r){var o=!0;return e(n,function(i,a,s){return o=!!r(i,a,s),o}),o}return z_=t,z_}var V_,aQ;function h8e(){if(aQ)return V_;aQ=1;var e=f8e(),t=p8e(),n=Gc(),r=Aa(),o=WI();function i(a,s,l){var c=r(a)?e:t;return l&&o(a,s,l)&&(s=void 0),c(a,n(s,3))}return V_=i,V_}var m8e=h8e();const Vse=Gn(m8e);var g8e=["x","y"];function pS(e){"@babel/helpers - typeof";return pS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pS(e)}function hF(){return hF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hF.apply(this,arguments)}function sQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function d0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sQ(Object(n),!0).forEach(function(r){y8e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function y8e(e,t,n){return t=v8e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v8e(e){var t=b8e(e,"string");return pS(t)=="symbol"?t:t+""}function b8e(e,t){if(pS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x8e(e,t){if(e==null)return{};var n=S8e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function S8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function w8e(e,t){var n=e.x,r=e.y,o=x8e(e,g8e),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),f="".concat(t.width||o.width),p=parseInt(f,10);return d0(d0(d0(d0(d0({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:p,name:t.name,radius:t.radius})}function lQ(e){return J.createElement(KT,hF({shapeType:"rectangle",propTransformer:w8e,activeClassName:"recharts-active-bar"},e))}var C8e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||Rf(),n)}},E8e=["value","background"],Hse;function Ay(e){"@babel/helpers - typeof";return Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ay(e)}function T8e(e,t){if(e==null)return{};var n=O8e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function O8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ZT(){return ZT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZT.apply(this,arguments)}function cQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cQ(Object(n),!0).forEach(function(r){mf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gse(r.key),r)}}function P8e(e,t,n){return t&&uQ(e.prototype,t),n&&uQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A8e(e,t,n){return t=eO(t),M8e(e,Use()?Reflect.construct(t,n||[],eO(e).constructor):t.apply(e,n))}function M8e(e,t){if(t&&(Ay(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R8e(e)}function R8e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Use(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Use=function(){return!!e})()}function eO(e){return eO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},eO(e)}function D8e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mF(e,t)}function mF(e,t){return mF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},mF(e,t)}function mf(e,t,n){return t=Gse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gse(e){var t=k8e(e,"string");return Ay(t)=="symbol"?t:t+""}function k8e(e,t){if(Ay(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ay(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mc=function(e){function t(){var n;I8e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=A8e(this,t,[].concat(o)),mf(n,"state",{isAnimationFinished:!1}),mf(n,"id",Vf("recharts-bar-")),mf(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),a&&a()}),mf(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),a&&a()}),n}return D8e(t,e),P8e(t,[{key:"renderRectanglesStatically",value:function(r){var o=this,i=this.props,a=i.shape,s=i.dataKey,l=i.activeIndex,c=i.activeBar,u=zt(this.props,!1);return r&&r.map(function(f,p){var m=p===l,g=m?c:a,y=Ao(Ao(Ao({},u),f),{},{isActive:m,option:g,index:p,dataKey:s,onAnimationStart:o.handleAnimationStart,onAnimationEnd:o.handleAnimationEnd});return J.createElement(wn,ZT({className:"recharts-bar-rectangle"},Af(o.props,f,p),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(p)}),J.createElement(lQ,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,o=this.props,i=o.data,a=o.layout,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,f=o.animationId,p=this.state.prevData;return J.createElement(al,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var g=m.t,y=i.map(function(v,w){var C=p&&p[w];if(C){var E=no(C.x,v.x),I=no(C.y,v.y),O=no(C.width,v.width),P=no(C.height,v.height);return Ao(Ao({},v),{},{x:E(g),y:I(g),width:O(g),height:P(g)})}if(a==="horizontal"){var R=no(0,v.height),D=R(g);return Ao(Ao({},v),{},{y:v.y+v.height-D,height:D})}var M=no(0,v.width),A=M(g);return Ao(Ao({},v),{},{width:A})});return J.createElement(wn,null,r.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var r=this.props,o=r.data,i=r.isAnimationActive,a=this.state.prevData;return i&&o&&o.length&&(!a||!Mf(a,o))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(o)}},{key:"renderBackground",value:function(){var r=this,o=this.props,i=o.data,a=o.dataKey,s=o.activeIndex,l=zt(this.props.background,!1);return i.map(function(c,u){c.value;var f=c.background,p=T8e(c,E8e);if(!f)return null;var m=Ao(Ao(Ao(Ao(Ao({},p),{},{fill:"#eee"},f),l),Af(r.props,c,u)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:a,index:u,className:"recharts-bar-background-rectangle"});return J.createElement(lQ,ZT({key:"background-bar-".concat(u),option:r.props.background,isActive:u===s},m))})}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.data,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,f=sa(u,Pv);if(!f)return null;var p=c==="vertical"?a[0].height/2:a[0].width/2,m=function(v,w){var C=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:C,errorVal:Vr(v,w)}},g={clipPath:r?"url(#clipPath-".concat(o,")"):null};return J.createElement(wn,g,f.map(function(y){return J.cloneElement(y,{key:"error-bar-".concat(o,"-").concat(y.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,o=r.hide,i=r.data,a=r.className,s=r.xAxis,l=r.yAxis,c=r.left,u=r.top,f=r.width,p=r.height,m=r.isAnimationActive,g=r.background,y=r.id;if(o||!i||!i.length)return null;var v=this.state.isAnimationFinished,w=fe("recharts-bar",a),C=s&&s.allowDataOverflow,E=l&&l.allowDataOverflow,I=C||E,O=an(y)?this.id:y;return J.createElement(wn,{className:w},C||E?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(O)},J.createElement("rect",{x:C?c:c-f/2,y:E?u:u-p/2,width:C?f:f*2,height:E?p:p*2}))):null,J.createElement(wn,{className:"recharts-bar-rectangles",clipPath:I?"url(#clipPath-".concat(O,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(I,O),(!m||v)&&Vl.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:o.curData}:r.data!==o.curData?{curData:r.data}:null}}])}(x.PureComponent);Hse=Mc;mf(Mc,"displayName","Bar");mf(Mc,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!rd.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});mf(Mc,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,p=e.offset,m=d3e(r,n);if(!m)return null;var g=t.layout,y=n.type.defaultProps,v=y!==void 0?Ao(Ao({},y),n.props):n.props,w=v.dataKey,C=v.children,E=v.minPointSize,I=g==="horizontal"?a:i,O=c?I.scale.domain():null,P=v3e({numericAxis:I}),R=sa(C,Ev),D=f.map(function(M,A){var _,N,B,H,j,L;c?_=f3e(c[u+A],O):(_=Vr(M,w),Array.isArray(_)||(_=[P,_]));var V=C8e(E,Hse.defaultProps.minPointSize)(_[1],A);if(g==="horizontal"){var W,K=[a.scale(_[0]),a.scale(_[1])],G=K[0],q=K[1];N=jK({axis:i,ticks:s,bandSize:o,offset:m.offset,entry:M,index:A}),B=(W=q??G)!==null&&W!==void 0?W:void 0,H=m.size;var Y=G-q;if(j=Number.isNaN(Y)?0:Y,L={x:N,y:a.y,width:H,height:a.height},Math.abs(V)>0&&Math.abs(j)<Math.abs(V)){var Z=ta(j||V)*(Math.abs(V)-Math.abs(j));B-=Z,j+=Z}}else{var ie=[i.scale(_[0]),i.scale(_[1])],se=ie[0],ce=ie[1];if(N=se,B=jK({axis:a,ticks:l,bandSize:o,offset:m.offset,entry:M,index:A}),H=ce-se,j=m.size,L={x:i.x,y:B,width:i.width,height:j},Math.abs(V)>0&&Math.abs(H)<Math.abs(V)){var ye=ta(H||V)*(Math.abs(V)-Math.abs(H));H+=ye}}return Ao(Ao(Ao({},M),{},{x:N,y:B,width:H,height:j,value:c?_:_[1],payload:M,background:L},R&&R[A]&&R[A].props),{},{tooltipPayload:[vse(n,M)],tooltipPosition:{x:N+H/2,y:B+j/2}})});return Ao({data:D,layout:g},p)});function hS(e){"@babel/helpers - typeof";return hS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hS(e)}function _8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qse(r.key),r)}}function $8e(e,t,n){return t&&dQ(e.prototype,t),n&&dQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fQ(Object(n),!0).forEach(function(r){uP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uP(e,t,n){return t=qse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qse(e){var t=N8e(e,"string");return hS(t)=="symbol"?t:t+""}function N8e(e,t){if(hS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dP=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.layout,c=t.children,u=Object.keys(n),f={left:r.left,leftMirror:r.left,right:a-r.right,rightMirror:a-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},p=!!Va(c,Mc);return u.reduce(function(m,g){var y=n[g],v=y.orientation,w=y.domain,C=y.padding,E=C===void 0?{}:C,I=y.mirror,O=y.reversed,P="".concat(v).concat(I?"Mirror":""),R,D,M,A,_;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var N=w[1]-w[0],B=1/0,H=y.categoricalDomain.sort(tje);if(H.forEach(function(ie,se){se>0&&(B=Math.min((ie||0)-(H[se-1]||0),B))}),Number.isFinite(B)){var j=B/N,L=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(R=j*L/2),y.padding==="no-gap"){var V=na(t.barCategoryGap,j*L),W=j*L/2;R=W-V-(W-V)/L*V}}}o==="xAxis"?D=[r.left+(E.left||0)+(R||0),r.left+r.width-(E.right||0)-(R||0)]:o==="yAxis"?D=l==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(R||0),r.top+r.height-(E.bottom||0)-(R||0)]:D=y.range,O&&(D=[D[1],D[0]]);var K=hse(y,i,p),G=K.scale,q=K.realScaleType;G.domain(w).range(D),mse(G);var Y=gse(G,Pl(Pl({},y),{},{realScaleType:q}));o==="xAxis"?(_=v==="top"&&!I||v==="bottom"&&I,M=r.left,A=f[P]-_*y.height):o==="yAxis"&&(_=v==="left"&&!I||v==="right"&&I,M=f[P]-_*y.width,A=r.top);var Z=Pl(Pl(Pl({},y),Y),{},{realScaleType:q,x:M,y:A,scale:G,width:o==="xAxis"?r.width:y.width,height:o==="yAxis"?r.height:y.height});return Z.bandSize=LT(Z,Y),!y.hide&&o==="xAxis"?f[P]+=(_?-1:1)*Z.height:y.hide||(f[P]+=(_?-1:1)*Z.width),Pl(Pl({},m),{},uP({},g,Z))},{})},Wse=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},L8e=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return Wse({x:n,y:r},{x:o,y:i})},Kse=function(){function e(t){_8e(this,e),this.scale=t}return $8e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();uP(Kse,"EPS",1e-4);var Fz=function(t){var n=Object.keys(t).reduce(function(r,o){return Pl(Pl({},r),{},uP({},o,Kse.create(t[o])))},{});return Pl(Pl({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return d8e(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return Vse(o,function(i,a){return n[a].isInRange(i)})}})};function F8e(e){return(e%180+180)%180}var j8e=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=F8e(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},H_,pQ;function B8e(){if(pQ)return H_;pQ=1;var e=Gc(),t=xw(),n=GI();function r(o){return function(i,a,s){var l=Object(i);if(!t(i)){var c=e(a,3);i=n(i),a=function(f){return c(l[f],f,l)}}var u=o(i,a,s);return u>-1?l[c?i[u]:u]:void 0}}return H_=r,H_}var U_,hQ;function z8e(){if(hQ)return U_;hQ=1;var e=Fse();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return U_=t,U_}var G_,mQ;function V8e(){if(mQ)return G_;mQ=1;var e=Kie(),t=Gc(),n=z8e(),r=Math.max;function o(i,a,s){var l=i==null?0:i.length;if(!l)return-1;var c=s==null?0:n(s);return c<0&&(c=r(l+c,0)),e(i,t(a,3),c)}return G_=o,G_}var q_,gQ;function H8e(){if(gQ)return q_;gQ=1;var e=B8e(),t=V8e(),n=e(t);return q_=n,q_}var U8e=H8e();const G8e=Gn(U8e);var q8e=cie();const W8e=Gn(q8e);var K8e=W8e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),jz=x.createContext(void 0),Bz=x.createContext(void 0),Yse=x.createContext(void 0),Qse=x.createContext({}),Xse=x.createContext(void 0),Jse=x.createContext(0),Zse=x.createContext(0),yQ=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=K8e(i);return J.createElement(jz.Provider,{value:r},J.createElement(Bz.Provider,{value:o},J.createElement(Qse.Provider,{value:i},J.createElement(Yse.Provider,{value:u},J.createElement(Xse.Provider,{value:a},J.createElement(Jse.Provider,{value:c},J.createElement(Zse.Provider,{value:l},s)))))))},Y8e=function(){return x.useContext(Xse)},ele=function(t){var n=x.useContext(jz);n==null&&Rf();var r=n[t];return r==null&&Rf(),r},Q8e=function(){var t=x.useContext(jz);return Jd(t)},X8e=function(){var t=x.useContext(Bz),n=G8e(t,function(r){return Vse(r.domain,Number.isFinite)});return n||Jd(t)},tle=function(t){var n=x.useContext(Bz);n==null&&Rf();var r=n[t];return r==null&&Rf(),r},J8e=function(){var t=x.useContext(Yse);return t},Z8e=function(){return x.useContext(Qse)},zz=function(){return x.useContext(Zse)},Vz=function(){return x.useContext(Jse)};function My(e){"@babel/helpers - typeof";return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(e)}function e9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t9e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rle(r.key),r)}}function n9e(e,t,n){return t&&t9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r9e(e,t,n){return t=tO(t),o9e(e,nle()?Reflect.construct(t,n||[],tO(e).constructor):t.apply(e,n))}function o9e(e,t){if(t&&(My(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i9e(e)}function i9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nle=function(){return!!e})()}function tO(e){return tO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tO(e)}function a9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gF(e,t)}function gF(e,t){return gF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},gF(e,t)}function vQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vQ(Object(n),!0).forEach(function(r){Hz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hz(e,t,n){return t=rle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rle(e){var t=s9e(e,"string");return My(t)=="symbol"?t:t+""}function s9e(e,t){if(My(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(My(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function l9e(e,t){return f9e(e)||d9e(e,t)||u9e(e,t)||c9e()}function c9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u9e(e,t){if(e){if(typeof e=="string")return xQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xQ(e,t)}}function xQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d9e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function f9e(e){if(Array.isArray(e))return e}function yF(){return yF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yF.apply(this,arguments)}var p9e=function(t,n){var r;return J.isValidElement(t)?r=J.cloneElement(t,n):rn(t)?r=t(n):r=J.createElement("line",yF({},n,{className:"recharts-reference-line-line"})),r},h9e=function(t,n,r,o,i,a,s,l,c){var u=i.x,f=i.y,p=i.width,m=i.height;if(r){var g=c.y,y=t.y.apply(g,{position:a});if(Ac(c,"discard")&&!t.y.isInRange(y))return null;var v=[{x:u+p,y},{x:u,y}];return l==="left"?v.reverse():v}if(n){var w=c.x,C=t.x.apply(w,{position:a});if(Ac(c,"discard")&&!t.x.isInRange(C))return null;var E=[{x:C,y:f+m},{x:C,y:f}];return s==="top"?E.reverse():E}if(o){var I=c.segment,O=I.map(function(P){return t.apply(P,{position:a})});return Ac(c,"discard")&&s8e(O,function(P){return!t.isInRange(P)})?null:O}return null};function m9e(e){var t=e.x,n=e.y,r=e.segment,o=e.xAxisId,i=e.yAxisId,a=e.shape,s=e.className,l=e.alwaysShow,c=Y8e(),u=ele(o),f=tle(i),p=J8e();if(!c||!p)return null;zl(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Fz({x:u.scale,y:f.scale}),g=Ho(t),y=Ho(n),v=r&&r.length===2,w=h9e(m,g,y,v,p,e.position,u.orientation,f.orientation,e);if(!w)return null;var C=l9e(w,2),E=C[0],I=E.x,O=E.y,P=C[1],R=P.x,D=P.y,M=Ac(e,"hidden")?"url(#".concat(c,")"):void 0,A=bQ(bQ({clipPath:M},zt(e,!0)),{},{x1:I,y1:O,x2:R,y2:D});return J.createElement(wn,{className:fe("recharts-reference-line",s)},p9e(a,A),oi.renderCallByParent(e,L8e({x1:I,y1:O,x2:R,y2:D})))}var Uz=function(e){function t(){return e9e(this,t),r9e(this,t,arguments)}return a9e(t,e),n9e(t,[{key:"render",value:function(){return J.createElement(m9e,this.props)}}])}(J.Component);Hz(Uz,"displayName","ReferenceLine");Hz(Uz,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function vF(){return vF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vF.apply(this,arguments)}function Ry(e){"@babel/helpers - typeof";return Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ry(e)}function SQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SQ(Object(n),!0).forEach(function(r){fP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y9e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ile(r.key),r)}}function v9e(e,t,n){return t&&y9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function b9e(e,t,n){return t=nO(t),x9e(e,ole()?Reflect.construct(t,n||[],nO(e).constructor):t.apply(e,n))}function x9e(e,t){if(t&&(Ry(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S9e(e)}function S9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ole(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ole=function(){return!!e})()}function nO(e){return nO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nO(e)}function w9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bF(e,t)}function bF(e,t){return bF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},bF(e,t)}function fP(e,t,n){return t=ile(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ile(e){var t=C9e(e,"string");return Ry(t)=="symbol"?t:t+""}function C9e(e,t){if(Ry(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ry(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var E9e=function(t){var n=t.x,r=t.y,o=t.xAxis,i=t.yAxis,a=Fz({x:o.scale,y:i.scale}),s=a.apply({x:n,y:r},{bandAware:!0});return Ac(t,"discard")&&!a.isInRange(s)?null:s},Ow=function(e){function t(){return g9e(this,t),b9e(this,t,arguments)}return w9e(t,e),v9e(t,[{key:"render",value:function(){var r=this.props,o=r.x,i=r.y,a=r.r,s=r.alwaysShow,l=r.clipPathId,c=Ho(o),u=Ho(i);if(zl(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var f=E9e(this.props);if(!f)return null;var p=f.x,m=f.y,g=this.props,y=g.shape,v=g.className,w=Ac(this.props,"hidden")?"url(#".concat(l,")"):void 0,C=wQ(wQ({clipPath:w},zt(this.props,!0)),{},{cx:p,cy:m});return J.createElement(wn,{className:fe("recharts-reference-dot",v)},t.renderDot(y,C),oi.renderCallByParent(this.props,{x:p-a,y:m-a,width:2*a,height:2*a}))}}])}(J.Component);fP(Ow,"displayName","ReferenceDot");fP(Ow,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});fP(Ow,"renderDot",function(e,t){var n;return J.isValidElement(e)?n=J.cloneElement(e,t):rn(e)?n=e(t):n=J.createElement(Tw,vF({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function xF(){return xF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xF.apply(this,arguments)}function Dy(e){"@babel/helpers - typeof";return Dy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dy(e)}function CQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function EQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CQ(Object(n),!0).forEach(function(r){pP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function T9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O9e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sle(r.key),r)}}function I9e(e,t,n){return t&&O9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function P9e(e,t,n){return t=rO(t),A9e(e,ale()?Reflect.construct(t,n||[],rO(e).constructor):t.apply(e,n))}function A9e(e,t){if(t&&(Dy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M9e(e)}function M9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ale(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ale=function(){return!!e})()}function rO(e){return rO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rO(e)}function R9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SF(e,t)}function SF(e,t){return SF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},SF(e,t)}function pP(e,t,n){return t=sle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sle(e){var t=D9e(e,"string");return Dy(t)=="symbol"?t:t+""}function D9e(e,t){if(Dy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var k9e=function(t,n,r,o,i){var a=i.x1,s=i.x2,l=i.y1,c=i.y2,u=i.xAxis,f=i.yAxis;if(!u||!f)return null;var p=Fz({x:u.scale,y:f.scale}),m={x:t?p.x.apply(a,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(l,{position:"start"}):p.y.rangeMin},g={x:n?p.x.apply(s,{position:"end"}):p.x.rangeMax,y:o?p.y.apply(c,{position:"end"}):p.y.rangeMax};return Ac(i,"discard")&&(!p.isInRange(m)||!p.isInRange(g))?null:Wse(m,g)},hP=function(e){function t(){return T9e(this,t),P9e(this,t,arguments)}return R9e(t,e),I9e(t,[{key:"render",value:function(){var r=this.props,o=r.x1,i=r.x2,a=r.y1,s=r.y2,l=r.className,c=r.alwaysShow,u=r.clipPathId;zl(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ho(o),p=Ho(i),m=Ho(a),g=Ho(s),y=this.props.shape;if(!f&&!p&&!m&&!g&&!y)return null;var v=k9e(f,p,m,g,this.props);if(!v&&!y)return null;var w=Ac(this.props,"hidden")?"url(#".concat(u,")"):void 0;return J.createElement(wn,{className:fe("recharts-reference-area",l)},t.renderRect(y,EQ(EQ({clipPath:w},zt(this.props,!0)),v)),oi.renderCallByParent(this.props,v))}}])}(J.Component);pP(hP,"displayName","ReferenceArea");pP(hP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});pP(hP,"renderRect",function(e,t){var n;return J.isValidElement(e)?n=J.cloneElement(e,t):rn(e)?n=e(t):n=J.createElement(Lz,xF({},t,{className:"recharts-reference-area-rect"})),n});function lle(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function _9e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return j8e(r,n)}function $9e(e,t,n){var r=n==="width",o=e.x,i=e.y,a=e.width,s=e.height;return t===1?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}function oO(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function N9e(e,t){return lle(e,t+1)}function L9e(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,f=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:lle(r,c)};var y=l,v,w=function(){return v===void 0&&(v=n(g,y)),v},C=g.coordinate,E=l===0||oO(e,C,w,u,s);E||(l=0,u=a,c+=1),E&&(u=C+e*(w()/2+o),l+=c)},p;c<=i.length;)if(p=f(),p)return p.v;return[]}function mS(e){"@babel/helpers - typeof";return mS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mS(e)}function TQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TQ(Object(n),!0).forEach(function(r){F9e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F9e(e,t,n){return t=j9e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j9e(e){var t=B9e(e,"string");return mS(t)=="symbol"?t:t+""}function B9e(e,t){if(mS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z9e(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,s=t.start,l=t.end,c=function(p){var m=i[p],g,y=function(){return g===void 0&&(g=n(m,p)),g};if(p===a-1){var v=e*(m.coordinate+e*y()/2-l);i[p]=m=ki(ki({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else i[p]=m=ki(ki({},m),{},{tickCoord:m.coordinate});var w=oO(e,m.tickCoord,y,s,l);w&&(l=m.tickCoord-e*(y()/2+o),i[p]=ki(ki({},m),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function V9e(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],f=n(u,s-1),p=e*(u.coordinate+e*f/2-c);a[s-1]=u=ki(ki({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate});var m=oO(e,u.tickCoord,function(){return f},l,c);m&&(c=u.tickCoord-e*(f/2+o),a[s-1]=ki(ki({},u),{},{isShow:!0}))}for(var g=i?s-1:s,y=function(C){var E=a[C],I,O=function(){return I===void 0&&(I=n(E,C)),I};if(C===0){var P=e*(E.coordinate-e*O()/2-l);a[C]=E=ki(ki({},E),{},{tickCoord:P<0?E.coordinate-P*e:E.coordinate})}else a[C]=E=ki(ki({},E),{},{tickCoord:E.coordinate});var R=oO(e,E.tickCoord,O,l,c);R&&(l=E.tickCoord+e*(O()/2+o),a[C]=ki(ki({},E),{},{isShow:!0}))},v=0;v<g;v++)y(v);return a}function Gz(e,t,n){var r=e.tick,o=e.ticks,i=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,f=e.angle;if(!o||!o.length||!r)return[];if(mt(l)||rd.isSsr)return N9e(o,typeof l=="number"&&mt(l)?l:0);var p=[],m=s==="top"||s==="bottom"?"width":"height",g=u&&m==="width"?tx(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},y=function(E,I){var O=rn(c)?c(E.value,I):E.value;return m==="width"?_9e(tx(O,{fontSize:t,letterSpacing:n}),g,f):tx(O,{fontSize:t,letterSpacing:n})[m]},v=o.length>=2?ta(o[1].coordinate-o[0].coordinate):1,w=$9e(i,v,m);return l==="equidistantPreserveStart"?L9e(v,w,y,o,a):(l==="preserveStart"||l==="preserveStartEnd"?p=V9e(v,w,y,o,a,l==="preserveStartEnd"):p=z9e(v,w,y,o,a),p.filter(function(C){return C.isShow}))}var H9e=["viewBox"],U9e=["viewBox"],G9e=["ticks"];function ky(e){"@babel/helpers - typeof";return ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ky(e)}function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xg.apply(this,arguments)}function OQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OQ(Object(n),!0).forEach(function(r){qz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W_(e,t){if(e==null)return{};var n=q9e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function W9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ule(r.key),r)}}function K9e(e,t,n){return t&&IQ(e.prototype,t),n&&IQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y9e(e,t,n){return t=iO(t),Q9e(e,cle()?Reflect.construct(t,n||[],iO(e).constructor):t.apply(e,n))}function Q9e(e,t){if(t&&(ky(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X9e(e)}function X9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cle=function(){return!!e})()}function iO(e){return iO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iO(e)}function J9e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wF(e,t)}function wF(e,t){return wF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},wF(e,t)}function qz(e,t,n){return t=ule(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ule(e){var t=Z9e(e,"string");return ky(t)=="symbol"?t:t+""}function Z9e(e,t){if(ky(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ky(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Av=function(e){function t(n){var r;return W9e(this,t),r=Y9e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return J9e(t,e),K9e(t,[{key:"shouldComponentUpdate",value:function(r,o){var i=r.viewBox,a=W_(r,H9e),s=this.props,l=s.viewBox,c=W_(s,U9e);return!jg(i,l)||!jg(a,c)||!jg(o,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var o=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];o&&this.setState({fontSize:window.getComputedStyle(o).fontSize,letterSpacing:window.getComputedStyle(o).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var o=this.props,i=o.x,a=o.y,s=o.width,l=o.height,c=o.orientation,u=o.tickSize,f=o.mirror,p=o.tickMargin,m,g,y,v,w,C,E=f?-1:1,I=r.tickSize||u,O=mt(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":m=g=r.coordinate,v=a+ +!f*l,y=v-E*I,C=y-E*p,w=O;break;case"left":y=v=r.coordinate,g=i+ +!f*s,m=g-E*I,w=m-E*p,C=O;break;case"right":y=v=r.coordinate,g=i+ +f*s,m=g+E*I,w=m+E*p,C=O;break;default:m=g=r.coordinate,v=a+ +f*l,y=v+E*I,C=y+E*p,w=O;break}return{line:{x1:m,y1:y,x2:g,y2:v},tick:{x:w,y:C}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,o=r.orientation,i=r.mirror,a;switch(o){case"left":a=i?"start":"end";break;case"right":a=i?"end":"start";break;default:a="middle";break}return a}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,o=r.orientation,i=r.mirror,a="end";switch(o){case"left":case"right":a="middle";break;case"top":a=i?"start":"end";break;default:a=i?"end":"start";break}return a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.orientation,c=r.mirror,u=r.axisLine,f=Gi(Gi(Gi({},zt(this.props,!1)),zt(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!c||l==="bottom"&&c);f=Gi(Gi({},f),{},{x1:o,y1:i+p*s,x2:o+a,y2:i+p*s})}else{var m=+(l==="left"&&!c||l==="right"&&c);f=Gi(Gi({},f),{},{x1:o+m*a,y1:i,x2:o+m*a,y2:i+s})}return J.createElement("line",xg({},f,{className:fe("recharts-cartesian-axis-line",Ja(u,"className"))}))}},{key:"renderTicks",value:function(r,o,i){var a=this,s=this.props,l=s.tickLine,c=s.stroke,u=s.tick,f=s.tickFormatter,p=s.unit,m=Gz(Gi(Gi({},this.props),{},{ticks:r}),o,i),g=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=zt(this.props,!1),w=zt(u,!1),C=Gi(Gi({},v),{},{fill:"none"},zt(l,!1)),E=m.map(function(I,O){var P=a.getTickLineCoord(I),R=P.line,D=P.tick,M=Gi(Gi(Gi(Gi({textAnchor:g,verticalAnchor:y},v),{},{stroke:"none",fill:c},w),D),{},{index:O,payload:I,visibleTicksCount:m.length,tickFormatter:f});return J.createElement(wn,xg({className:"recharts-cartesian-axis-tick",key:"tick-".concat(I.value,"-").concat(I.coordinate,"-").concat(I.tickCoord)},Af(a.props,I,O)),l&&J.createElement("line",xg({},C,R,{className:fe("recharts-cartesian-axis-tick-line",Ja(l,"className"))})),u&&t.renderTickItem(u,M,"".concat(rn(f)?f(I.value,O):I.value).concat(p||"")))});return J.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,o=this.props,i=o.axisLine,a=o.width,s=o.height,l=o.ticksGenerator,c=o.className,u=o.hide;if(u)return null;var f=this.props,p=f.ticks,m=W_(f,G9e),g=p;return rn(l)&&(g=p&&p.length>0?l(this.props):l(m)),a<=0||s<=0||!g||!g.length?null:J.createElement(wn,{className:fe("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),oi.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):rn(r)?a=r(o):a=J.createElement(Eh,xg({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(x.Component);qz(Av,"displayName","CartesianAxis");qz(Av,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var e7e=["x1","y1","x2","y2","key"],t7e=["offset"];function Oh(e){"@babel/helpers - typeof";return Oh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oh(e)}function PQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ni(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PQ(Object(n),!0).forEach(function(r){n7e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n7e(e,t,n){return t=r7e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r7e(e){var t=o7e(e,"string");return Oh(t)=="symbol"?t:t+""}function o7e(e,t){if(Oh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gp.apply(this,arguments)}function AQ(e,t){if(e==null)return{};var n=i7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var a7e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return J.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function dle(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(rn(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=AQ(t,e7e),c=zt(l,!1);c.offset;var u=AQ(c,t7e);n=J.createElement("line",Gp({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function s7e(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=Ni(Ni({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return dle(o,c)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function l7e(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=Ni(Ni({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return dle(o,c)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function c7e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(p){return Math.round(p+o-o)}).sort(function(p,m){return p-m});o!==u[0]&&u.unshift(0);var f=u.map(function(p,m){var g=!u[m+1],y=g?o+a-p:u[m+1]-p;if(y<=0)return null;var v=m%t.length;return J.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:y,width:i,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function u7e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==u[0]&&u.unshift(0);var f=u.map(function(p,m){var g=!u[m+1],y=g?i+s-p:u[m+1]-p;if(y<=0)return null;var v=m%r.length;return J.createElement("rect",{key:"react-".concat(m),x:p,y:a,width:y,height:l,stroke:"none",fill:r[v],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var d7e=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return pse(Gz(Ni(Ni(Ni({},Av.defaultProps),r),{},{ticks:Du(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},f7e=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return pse(Gz(Ni(Ni(Ni({},Av.defaultProps),r),{},{ticks:Du(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},Zm={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function qf(e){var t,n,r,o,i,a,s=zz(),l=Vz(),c=Z8e(),u=Ni(Ni({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zm.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zm.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zm.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:Zm.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Zm.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zm.verticalFill,x:mt(e.x)?e.x:c.left,y:mt(e.y)?e.y:c.top,width:mt(e.width)?e.width:c.width,height:mt(e.height)?e.height:c.height}),f=u.x,p=u.y,m=u.width,g=u.height,y=u.syncWithTicks,v=u.horizontalValues,w=u.verticalValues,C=Q8e(),E=X8e();if(!mt(m)||m<=0||!mt(g)||g<=0||!mt(f)||f!==+f||!mt(p)||p!==+p)return null;var I=u.verticalCoordinatesGenerator||d7e,O=u.horizontalCoordinatesGenerator||f7e,P=u.horizontalPoints,R=u.verticalPoints;if((!P||!P.length)&&rn(O)){var D=v&&v.length,M=O({yAxis:E?Ni(Ni({},E),{},{ticks:D?v:E.ticks}):void 0,width:s,height:l,offset:c},D?!0:y);zl(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Oh(M),"]")),Array.isArray(M)&&(P=M)}if((!R||!R.length)&&rn(I)){var A=w&&w.length,_=I({xAxis:C?Ni(Ni({},C),{},{ticks:A?w:C.ticks}):void 0,width:s,height:l,offset:c},A?!0:y);zl(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Oh(_),"]")),Array.isArray(_)&&(R=_)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(a7e,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),J.createElement(s7e,Gp({},u,{offset:c,horizontalPoints:P,xAxis:C,yAxis:E})),J.createElement(l7e,Gp({},u,{offset:c,verticalPoints:R,xAxis:C,yAxis:E})),J.createElement(c7e,Gp({},u,{horizontalPoints:P})),J.createElement(u7e,Gp({},u,{verticalPoints:R})))}qf.displayName="CartesianGrid";var p7e=["type","layout","connectNulls","ref"],h7e=["key"];function _y(e){"@babel/helpers - typeof";return _y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_y(e)}function MQ(e,t){if(e==null)return{};var n=m7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sx(){return sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sx.apply(this,arguments)}function RQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RQ(Object(n),!0).forEach(function(r){Al(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eg(e){return b7e(e)||v7e(e)||y7e(e)||g7e()}function g7e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y7e(e,t){if(e){if(typeof e=="string")return CF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CF(e,t)}}function v7e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b7e(e){if(Array.isArray(e))return CF(e)}function CF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ple(r.key),r)}}function S7e(e,t,n){return t&&DQ(e.prototype,t),n&&DQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function w7e(e,t,n){return t=aO(t),C7e(e,fle()?Reflect.construct(t,n||[],aO(e).constructor):t.apply(e,n))}function C7e(e,t){if(t&&(_y(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E7e(e)}function E7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fle=function(){return!!e})()}function aO(e){return aO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},aO(e)}function T7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EF(e,t)}function EF(e,t){return EF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},EF(e,t)}function Al(e,t,n){return t=ple(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ple(e){var t=O7e(e,"string");return _y(t)=="symbol"?t:t+""}function O7e(e,t){if(_y(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wh=function(e){function t(){var n;x7e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=w7e(this,t,[].concat(o)),Al(n,"state",{isAnimationFinished:!0,totalLength:0}),Al(n,"generateSimpleStrokeDasharray",function(a,s){return"".concat(s,"px ").concat(a-s,"px")}),Al(n,"getStrokeDasharray",function(a,s,l){var c=l.reduce(function(w,C){return w+C});if(!c)return n.generateSimpleStrokeDasharray(s,a);for(var u=Math.floor(a/c),f=a%c,p=s-a,m=[],g=0,y=0;g<l.length;y+=l[g],++g)if(y+l[g]>f){m=[].concat(eg(l.slice(0,g)),[f-y]);break}var v=m.length%2===0?[0,p]:[p];return[].concat(eg(t.repeat(l,u)),eg(m),v).map(function(w){return"".concat(w,"px")}).join(", ")}),Al(n,"id",Vf("recharts-line-")),Al(n,"pathRef",function(a){n.mainCurve=a}),Al(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Al(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return T7e(t,e),S7e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,f=sa(u,Pv);if(!f)return null;var p=function(y,v){return{x:y.x,y:y.y,value:y.value,errorVal:Vr(y.payload,v)}},m={clipPath:r?"url(#clipPath-".concat(o,")"):null};return J.createElement(wn,m,f.map(function(g){return J.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,f=zt(this.props,!1),p=zt(l,!0),m=c.map(function(y,v){var w=Ba(Ba(Ba({key:"dot-".concat(v),r:3},f),p),{},{index:v,cx:y.x,cy:y.y,value:y.value,dataKey:u,payload:y.payload,points:c});return t.renderDotItem(l,w)}),g={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return J.createElement(wn,sx({className:"recharts-line-dots",key:"dots"},g),m)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var f=MQ(s,p7e),p=Ba(Ba(Ba({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return J.createElement(xf,sx({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,f=a.animationDuration,p=a.animationEasing,m=a.animationId,g=a.animateNewValues,y=a.width,v=a.height,w=this.state,C=w.prevPoints,E=w.totalLength;return J.createElement(al,{begin:u,duration:f,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(I){var O=I.t;if(C){var P=C.length/s.length,R=s.map(function(N,B){var H=Math.floor(B*P);if(C[H]){var j=C[H],L=no(j.x,N.x),V=no(j.y,N.y);return Ba(Ba({},N),{},{x:L(O),y:V(O)})}if(g){var W=no(y*2,N.x),K=no(v/2,N.y);return Ba(Ba({},N),{},{x:W(O),y:K(O)})}return Ba(Ba({},N),{},{x:N.x,y:N.y})});return i.renderCurveStatically(R,r,o)}var D=no(0,E),M=D(O),A;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});A=i.getStrokeDasharray(M,E,_)}else A=i.generateSimpleStrokeDasharray(E,M);return i.renderCurveStatically(s,r,o,{strokeDasharray:A})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!Mf(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,f=o.top,p=o.left,m=o.width,g=o.height,y=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,C=s.length===1,E=fe("recharts-line",l),I=c&&c.allowDataOverflow,O=u&&u.allowDataOverflow,P=I||O,R=an(v)?this.id:v,D=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=D.r,A=M===void 0?3:M,_=D.strokeWidth,N=_===void 0?2:_,B=hie(a)?a:{},H=B.clipDot,j=H===void 0?!0:H,L=A*2+N;return J.createElement(wn,{className:E},I||O?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(R)},J.createElement("rect",{x:I?p:p-m/2,y:O?f:f-g/2,width:I?m:m*2,height:O?g:g*2})),!j&&J.createElement("clipPath",{id:"clipPath-dots-".concat(R)},J.createElement("rect",{x:p-L/2,y:f-L/2,width:m+L,height:g+L}))):null,!C&&this.renderCurve(P,R),this.renderErrorBar(P,R),(C||a)&&this.renderDots(P,j,R),(!y||w)&&Vl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(eg(r),[0]):r,a=[],s=0;s<o;++s)a=[].concat(eg(a),eg(i));return a}},{key:"renderDotItem",value:function(r,o){var i;if(J.isValidElement(r))i=J.cloneElement(r,o);else if(rn(r))i=r(o);else{var a=o.key,s=MQ(o,h7e),l=fe("recharts-line-dot",typeof r!="boolean"?r.className:"");i=J.createElement(Tw,sx({key:a},s,{className:l}))}return i}}])}(x.PureComponent);Al(Wh,"displayName","Line");Al(Wh,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!rd.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Al(Wh,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,f=l.map(function(p,m){var g=Vr(p,a);return u==="horizontal"?{x:wy({axis:n,ticks:o,bandSize:s,entry:p,index:m}),y:an(g)?null:r.scale(g),value:g,payload:p}:{x:an(g)?null:n.scale(g),y:wy({axis:r,ticks:i,bandSize:s,entry:p,index:m}),value:g,payload:p}});return Ba({points:f,layout:u},c)});var I7e=["layout","type","stroke","connectNulls","isRange","ref"],P7e=["key"],hle;function $y(e){"@babel/helpers - typeof";return $y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$y(e)}function mle(e,t){if(e==null)return{};var n=A7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function A7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qp.apply(this,arguments)}function kQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kQ(Object(n),!0).forEach(function(r){Cc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yle(r.key),r)}}function R7e(e,t,n){return t&&_Q(e.prototype,t),n&&_Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function D7e(e,t,n){return t=sO(t),k7e(e,gle()?Reflect.construct(t,n||[],sO(e).constructor):t.apply(e,n))}function k7e(e,t){if(t&&($y(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _7e(e)}function _7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gle=function(){return!!e})()}function sO(e){return sO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sO(e)}function $7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TF(e,t)}function TF(e,t){return TF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},TF(e,t)}function Cc(e,t,n){return t=yle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yle(e){var t=N7e(e,"string");return $y(t)=="symbol"?t:t+""}function N7e(e,t){if($y(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wf=function(e){function t(){var n;M7e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=D7e(this,t,[].concat(o)),Cc(n,"state",{isAnimationFinished:!0}),Cc(n,"id",Vf("recharts-area-")),Cc(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),rn(a)&&a()}),Cc(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),rn(a)&&a()}),n}return $7e(t,e),R7e(t,[{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(a&&!s)return null;var l=this.props,c=l.dot,u=l.points,f=l.dataKey,p=zt(this.props,!1),m=zt(c,!0),g=u.map(function(v,w){var C=Vd(Vd(Vd({key:"dot-".concat(w),r:3},p),m),{},{index:w,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:u});return t.renderDotItem(c,C)}),y={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return J.createElement(wn,qp({className:"recharts-area-dots"},y),g)}},{key:"renderHorizontalRect",value:function(r){var o=this.props,i=o.baseLine,a=o.points,s=o.strokeWidth,l=a[0].x,c=a[a.length-1].x,u=r*Math.abs(l-c),f=hf(a.map(function(p){return p.y||0}));return mt(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(hf(i.map(function(p){return p.y||0})),f)),mt(f)?J.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var o=this.props,i=o.baseLine,a=o.points,s=o.strokeWidth,l=a[0].y,c=a[a.length-1].y,u=r*Math.abs(l-c),f=hf(a.map(function(p){return p.x||0}));return mt(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(hf(i.map(function(p){return p.x||0})),f)),mt(f)?J.createElement("rect",{x:0,y:l<c?l:l-u,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}},{key:"renderClipRect",value:function(r){var o=this.props.layout;return o==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,o,i,a){var s=this.props,l=s.layout,c=s.type,u=s.stroke,f=s.connectNulls,p=s.isRange;s.ref;var m=mle(s,I7e);return J.createElement(wn,{clipPath:i?"url(#clipPath-".concat(a,")"):null},J.createElement(xf,qp({},zt(m,!0),{points:r,connectNulls:f,type:c,baseLine:o,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&J.createElement(xf,qp({},zt(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:r})),u!=="none"&&p&&J.createElement(xf,qp({},zt(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:o})))}},{key:"renderAreaWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.baseLine,c=a.isAnimationActive,u=a.animationBegin,f=a.animationDuration,p=a.animationEasing,m=a.animationId,g=this.state,y=g.prevPoints,v=g.prevBaseLine;return J.createElement(al,{begin:u,duration:f,isActive:c,easing:p,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var C=w.t;if(y){var E=y.length/s.length,I=s.map(function(D,M){var A=Math.floor(M*E);if(y[A]){var _=y[A],N=no(_.x,D.x),B=no(_.y,D.y);return Vd(Vd({},D),{},{x:N(C),y:B(C)})}return D}),O;if(mt(l)&&typeof l=="number"){var P=no(v,l);O=P(C)}else if(an(l)||wv(l)){var R=no(v,0);O=R(C)}else O=l.map(function(D,M){var A=Math.floor(M*E);if(v[A]){var _=v[A],N=no(_.x,D.x),B=no(_.y,D.y);return Vd(Vd({},D),{},{x:N(C),y:B(C)})}return D});return i.renderAreaStatically(I,O,r,o)}return J.createElement(wn,null,J.createElement("defs",null,J.createElement("clipPath",{id:"animationClipPath-".concat(o)},i.renderClipRect(C))),J.createElement(wn,{clipPath:"url(#animationClipPath-".concat(o,")")},i.renderAreaStatically(s,l,r,o)))})}},{key:"renderArea",value:function(r,o){var i=this.props,a=i.points,s=i.baseLine,l=i.isAnimationActive,c=this.state,u=c.prevPoints,f=c.prevBaseLine,p=c.totalLength;return l&&a&&a.length&&(!u&&p>0||!Mf(u,a)||!Mf(f,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,f=o.xAxis,p=o.yAxis,m=o.width,g=o.height,y=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,C=s.length===1,E=fe("recharts-area",l),I=f&&f.allowDataOverflow,O=p&&p.allowDataOverflow,P=I||O,R=an(v)?this.id:v,D=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=D.r,A=M===void 0?3:M,_=D.strokeWidth,N=_===void 0?2:_,B=hie(a)?a:{},H=B.clipDot,j=H===void 0?!0:H,L=A*2+N;return J.createElement(wn,{className:E},I||O?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(R)},J.createElement("rect",{x:I?u:u-m/2,y:O?c:c-g/2,width:I?m:m*2,height:O?g:g*2})),!j&&J.createElement("clipPath",{id:"clipPath-dots-".concat(R)},J.createElement("rect",{x:u-L/2,y:c-L/2,width:m+L,height:g+L}))):null,C?null:this.renderArea(P,R),(a||C)&&this.renderDots(P,j,R),(!y||w)&&Vl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(x.PureComponent);hle=Wf;Cc(Wf,"displayName","Area");Cc(Wf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!rd.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Cc(Wf,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(mt(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return s==="dataMin"?f:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Cc(Wf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,p=e.offset,m=t.layout,g=c&&c.length,y=hle.getBaseValue(t,n,r,o),v=m==="horizontal",w=!1,C=f.map(function(I,O){var P;g?P=c[u+O]:(P=Vr(I,l),Array.isArray(P)?w=!0:P=[y,P]);var R=P[1]==null||g&&Vr(I,l)==null;return v?{x:wy({axis:r,ticks:i,bandSize:s,entry:I,index:O}),y:R?null:o.scale(P[1]),value:P,payload:I}:{x:R?null:r.scale(P[1]),y:wy({axis:o,ticks:a,bandSize:s,entry:I,index:O}),value:P,payload:I}}),E;return g||w?E=C.map(function(I){var O=Array.isArray(I.value)?I.value[0]:null;return v?{x:I.x,y:O!=null&&I.y!=null?o.scale(O):null}:{x:O!=null?r.scale(O):null,y:I.y}}):E=v?o.scale(y):r.scale(y),Vd({points:C,baseLine:E,layout:m,isRange:w},p)});Cc(Wf,"renderDotItem",function(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(rn(e))n=e(t);else{var r=fe("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=mle(t,P7e);n=J.createElement(Tw,qp({},i,{key:o,className:r}))}return n});function Ny(e){"@babel/helpers - typeof";return Ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ny(e)}function L7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F7e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xle(r.key),r)}}function j7e(e,t,n){return t&&F7e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function B7e(e,t,n){return t=lO(t),z7e(e,vle()?Reflect.construct(t,n||[],lO(e).constructor):t.apply(e,n))}function z7e(e,t){if(t&&(Ny(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V7e(e)}function V7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vle=function(){return!!e})()}function lO(e){return lO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lO(e)}function H7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OF(e,t)}function OF(e,t){return OF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},OF(e,t)}function ble(e,t,n){return t=xle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xle(e){var t=U7e(e,"string");return Ny(t)=="symbol"?t:t+""}function U7e(e,t){if(Ny(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ny(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mP=function(e){function t(){return L7e(this,t),B7e(this,t,arguments)}return H7e(t,e),j7e(t,[{key:"render",value:function(){return null}}])}(J.Component);ble(mP,"displayName","ZAxis");ble(mP,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var G7e=["option","isActive"];function lx(){return lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lx.apply(this,arguments)}function q7e(e,t){if(e==null)return{};var n=W7e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function W7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function K7e(e){var t=e.option,n=e.isActive,r=q7e(e,G7e);return typeof t=="string"?J.createElement(KT,lx({option:J.createElement(UI,lx({type:t},r)),isActive:n,shapeType:"symbols"},r)):J.createElement(KT,lx({option:t,isActive:n,shapeType:"symbols"},r))}function Ly(e){"@babel/helpers - typeof";return Ly=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ly(e)}function cx(){return cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cx.apply(this,arguments)}function $Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$Q(Object(n),!0).forEach(function(r){gf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Q(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wle(r.key),r)}}function Q7e(e,t,n){return t&&NQ(e.prototype,t),n&&NQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function X7e(e,t,n){return t=cO(t),J7e(e,Sle()?Reflect.construct(t,n||[],cO(e).constructor):t.apply(e,n))}function J7e(e,t){if(t&&(Ly(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z7e(e)}function Z7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sle=function(){return!!e})()}function cO(e){return cO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cO(e)}function eKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IF(e,t)}function IF(e,t){return IF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},IF(e,t)}function gf(e,t,n){return t=wle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wle(e){var t=tKe(e,"string");return Ly(t)=="symbol"?t:t+""}function tKe(e,t){if(Ly(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ly(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Iw=function(e){function t(){var n;Y7e(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=X7e(this,t,[].concat(o)),gf(n,"state",{isAnimationFinished:!1}),gf(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),gf(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),gf(n,"id",Vf("recharts-scatter-")),n}return eKe(t,e),Q7e(t,[{key:"renderSymbolsStatically",value:function(r){var o=this,i=this.props,a=i.shape,s=i.activeShape,l=i.activeIndex,c=zt(this.props,!1);return r.map(function(u,f){var p=l===f,m=p?s:a,g=Ds(Ds({},c),u);return J.createElement(wn,cx({className:"recharts-scatter-symbol",key:"symbol-".concat(u==null?void 0:u.cx,"-").concat(u==null?void 0:u.cy,"-").concat(u==null?void 0:u.size,"-").concat(f)},Af(o.props,u,f),{role:"img"}),J.createElement(K7e,cx({option:m,isActive:p,key:"symbol-".concat(f)},g)))})}},{key:"renderSymbolsWithAnimation",value:function(){var r=this,o=this.props,i=o.points,a=o.isAnimationActive,s=o.animationBegin,l=o.animationDuration,c=o.animationEasing,u=o.animationId,f=this.state.prevPoints;return J.createElement(al,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var m=p.t,g=i.map(function(y,v){var w=f&&f[v];if(w){var C=no(w.cx,y.cx),E=no(w.cy,y.cy),I=no(w.size,y.size);return Ds(Ds({},y),{},{cx:C(m),cy:E(m),size:I(m)})}var O=no(0,y.size);return Ds(Ds({},y),{},{size:O(m)})});return J.createElement(wn,null,r.renderSymbolsStatically(g))})}},{key:"renderSymbols",value:function(){var r=this.props,o=r.points,i=r.isAnimationActive,a=this.state.prevPoints;return i&&o&&o.length&&(!a||!Mf(a,o))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(o)}},{key:"renderErrorBar",value:function(){var r=this.props.isAnimationActive;if(r&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.points,a=o.xAxis,s=o.yAxis,l=o.children,c=sa(l,Pv);return c?c.map(function(u,f){var p=u.props,m=p.direction,g=p.dataKey;return J.cloneElement(u,{key:"".concat(m,"-").concat(g,"-").concat(i[f]),data:i,xAxis:a,yAxis:s,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(v,w){return{x:v.cx,y:v.cy,value:m==="x"?+v.node.x:+v.node.y,errorVal:Vr(v,w)}}})}):null}},{key:"renderLine",value:function(){var r=this.props,o=r.points,i=r.line,a=r.lineType,s=r.lineJointType,l=zt(this.props,!1),c=zt(i,!1),u,f;if(a==="joint")u=o.map(function(E){return{x:E.cx,y:E.cy}});else if(a==="fitting"){var p=eje(o),m=p.xmin,g=p.xmax,y=p.a,v=p.b,w=function(I){return y*I+v};u=[{x:m,y:w(m)},{x:g,y:w(g)}]}var C=Ds(Ds(Ds({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return J.isValidElement(i)?f=J.cloneElement(i,C):rn(i)?f=i(C):f=J.createElement(xf,cx({},C,{type:s})),J.createElement(wn,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var r=this.props,o=r.hide,i=r.points,a=r.line,s=r.className,l=r.xAxis,c=r.yAxis,u=r.left,f=r.top,p=r.width,m=r.height,g=r.id,y=r.isAnimationActive;if(o||!i||!i.length)return null;var v=this.state.isAnimationFinished,w=fe("recharts-scatter",s),C=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,I=C||E,O=an(g)?this.id:g;return J.createElement(wn,{className:w,clipPath:I?"url(#clipPath-".concat(O,")"):null},C||E?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(O)},J.createElement("rect",{x:C?u:u-p/2,y:E?f:f-m/2,width:C?p:p*2,height:E?m:m*2}))):null,a&&this.renderLine(),this.renderErrorBar(),J.createElement(wn,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!y||v)&&Vl.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}}])}(x.PureComponent);gf(Iw,"displayName","Scatter");gf(Iw,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!rd.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});gf(Iw,"getComposedData",function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,o=e.item,i=e.displayedData,a=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,c=o.props.tooltipType,u=sa(o.props.children,Ev),f=an(t.dataKey)?o.props.dataKey:t.dataKey,p=an(n.dataKey)?o.props.dataKey:n.dataKey,m=r&&r.dataKey,g=r?r.range:mP.defaultProps.range,y=g&&g[0],v=t.scale.bandwidth?t.scale.bandwidth():0,w=n.scale.bandwidth?n.scale.bandwidth():0,C=i.map(function(E,I){var O=Vr(E,f),P=Vr(E,p),R=!an(m)&&Vr(E,m)||"-",D=[{name:an(t.dataKey)?o.props.name:t.name||t.dataKey,unit:t.unit||"",value:O,payload:E,dataKey:f,type:c},{name:an(n.dataKey)?o.props.name:n.name||n.dataKey,unit:n.unit||"",value:P,payload:E,dataKey:p,type:c}];R!=="-"&&D.push({name:r.name||r.dataKey,unit:r.unit||"",value:R,payload:E,dataKey:m,type:c});var M=wy({axis:t,ticks:a,bandSize:v,entry:E,index:I,dataKey:f}),A=wy({axis:n,ticks:s,bandSize:w,entry:E,index:I,dataKey:p}),_=R!=="-"?r.scale(R):y,N=Math.sqrt(Math.max(_,0)/Math.PI);return Ds(Ds({},E),{},{cx:M,cy:A,x:M-N,y:A-N,xAxis:t,yAxis:n,zAxis:r,width:2*N,height:2*N,size:_,node:{x:O,y:P,z:R},tooltipPayload:D,tooltipPosition:{x:M,y:A},payload:E},u&&u[I]&&u[I].props)});return Ds({points:C},l)});function Fy(e){"@babel/helpers - typeof";return Fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fy(e)}function nKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tle(r.key),r)}}function oKe(e,t,n){return t&&rKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iKe(e,t,n){return t=uO(t),aKe(e,Cle()?Reflect.construct(t,n||[],uO(e).constructor):t.apply(e,n))}function aKe(e,t){if(t&&(Fy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sKe(e)}function sKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cle=function(){return!!e})()}function uO(e){return uO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uO(e)}function lKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PF(e,t)}function PF(e,t){return PF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},PF(e,t)}function Ele(e,t,n){return t=Tle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tle(e){var t=cKe(e,"string");return Fy(t)=="symbol"?t:t+""}function cKe(e,t){if(Fy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function AF(){return AF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AF.apply(this,arguments)}function uKe(e){var t=e.xAxisId,n=zz(),r=Vz(),o=ele(t);return o==null?null:J.createElement(Av,AF({},o,{className:fe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(a){return Du(a,!0)}}))}var ls=function(e){function t(){return nKe(this,t),iKe(this,t,arguments)}return lKe(t,e),oKe(t,[{key:"render",value:function(){return J.createElement(uKe,this.props)}}])}(J.Component);Ele(ls,"displayName","XAxis");Ele(ls,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function jy(e){"@babel/helpers - typeof";return jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jy(e)}function dKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ple(r.key),r)}}function pKe(e,t,n){return t&&fKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hKe(e,t,n){return t=dO(t),mKe(e,Ole()?Reflect.construct(t,n||[],dO(e).constructor):t.apply(e,n))}function mKe(e,t){if(t&&(jy(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gKe(e)}function gKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ole(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ole=function(){return!!e})()}function dO(e){return dO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dO(e)}function yKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MF(e,t)}function MF(e,t){return MF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},MF(e,t)}function Ile(e,t,n){return t=Ple(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ple(e){var t=vKe(e,"string");return jy(t)=="symbol"?t:t+""}function vKe(e,t){if(jy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function RF(){return RF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RF.apply(this,arguments)}var bKe=function(t){var n=t.yAxisId,r=zz(),o=Vz(),i=tle(n);return i==null?null:J.createElement(Av,RF({},i,{className:fe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(s){return Du(s,!0)}}))},cs=function(e){function t(){return dKe(this,t),hKe(this,t,arguments)}return yKe(t,e),pKe(t,[{key:"render",value:function(){return J.createElement(bKe,this.props)}}])}(J.Component);Ile(cs,"displayName","YAxis");Ile(cs,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function LQ(e){return CKe(e)||wKe(e)||SKe(e)||xKe()}function xKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SKe(e,t){if(e){if(typeof e=="string")return DF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DF(e,t)}}function wKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CKe(e){if(Array.isArray(e))return DF(e)}function DF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kF=function(t,n,r,o,i){var a=sa(t,Uz),s=sa(t,Ow),l=[].concat(LQ(a),LQ(s)),c=sa(t,hP),u="".concat(o,"Id"),f=o[0],p=n;if(l.length&&(p=l.reduce(function(y,v){if(v.props[u]===r&&Ac(v.props,"extendDomain")&&mt(v.props[f])){var w=v.props[f];return[Math.min(y[0],w),Math.max(y[1],w)]}return y},p)),c.length){var m="".concat(f,"1"),g="".concat(f,"2");p=c.reduce(function(y,v){if(v.props[u]===r&&Ac(v.props,"extendDomain")&&mt(v.props[m])&&mt(v.props[g])){var w=v.props[m],C=v.props[g];return[Math.min(y[0],w,C),Math.max(y[1],w,C)]}return y},p)}return i&&i.length&&(p=i.reduce(function(y,v){return mt(v)?[Math.min(y[0],v),Math.max(y[1],v)]:y},p)),p},K_={exports:{}},FQ;function EKe(){return FQ||(FQ=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,f,p){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new o(u,f||l,p),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],m]:l._events[g].push(m):(l._events[g]=m,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,m=f.length,g=new Array(m);p<m;p++)g[p]=f[p].fn;return g},s.prototype.listenerCount=function(c){var u=n?n+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,p,m,g){var y=n?n+c:c;if(!this._events[y])return!1;var v=this._events[y],w=arguments.length,C,E;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),w){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,f),!0;case 4:return v.fn.call(v.context,u,f,p),!0;case 5:return v.fn.call(v.context,u,f,p,m),!0;case 6:return v.fn.call(v.context,u,f,p,m,g),!0}for(E=1,C=new Array(w-1);E<w;E++)C[E-1]=arguments[E];v.fn.apply(v.context,C)}else{var I=v.length,O;for(E=0;E<I;E++)switch(v[E].once&&this.removeListener(c,v[E].fn,void 0,!0),w){case 1:v[E].fn.call(v[E].context);break;case 2:v[E].fn.call(v[E].context,u);break;case 3:v[E].fn.call(v[E].context,u,f);break;case 4:v[E].fn.call(v[E].context,u,f,p);break;default:if(!C)for(O=1,C=new Array(w-1);O<w;O++)C[O-1]=arguments[O];v[E].fn.apply(v[E].context,C)}}return!0},s.prototype.on=function(c,u,f){return i(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return i(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,p){var m=n?n+c:c;if(!this._events[m])return this;if(!u)return a(this,m),this;var g=this._events[m];if(g.fn)g.fn===u&&(!p||g.once)&&(!f||g.context===f)&&a(this,m);else{for(var y=0,v=[],w=g.length;y<w;y++)(g[y].fn!==u||p&&!g[y].once||f&&g[y].context!==f)&&v.push(g[y]);v.length?this._events[m]=v.length===1?v[0]:v:a(this,m)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(K_)),K_.exports}var TKe=EKe();const OKe=Gn(TKe);var Y_=new OKe,Q_="recharts.syncMouseEvents";function gS(e){"@babel/helpers - typeof";return gS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gS(e)}function IKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ale(r.key),r)}}function AKe(e,t,n){return t&&PKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X_(e,t,n){return t=Ale(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ale(e){var t=MKe(e,"string");return gS(t)=="symbol"?t:t+""}function MKe(e,t){if(gS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var RKe=function(){function e(){IKe(this,e),X_(this,"activeIndex",0),X_(this,"coordinateList",[]),X_(this,"layout","horizontal")}return AKe(e,[{key:"setDetails",value:function(n){var r,o=n.coordinateList,i=o===void 0?null:o,a=n.container,s=a===void 0?null:a,l=n.layout,c=l===void 0?null:l,u=n.offset,f=u===void 0?null:u,p=n.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var o=this.container.getBoundingClientRect(),i=o.x,a=o.y,s=o.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,u=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=i+l+c,p=a+this.offset.top+s/2+u;this.mouseHandlerCallback({pageX:f,pageY:p})}}}])}();function DKe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],o=e==null?void 0:e[1];if(r&&o&&mt(r)&&mt(o))return!0}return!1}function kKe(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-o,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Mle(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle,a=Nr(t,n,r,o),s=Nr(t,n,r,i);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function _Ke(e,t,n){var r,o,i,a;if(e==="horizontal")r=t.x,i=r,o=n.top,a=n.top+n.height;else if(e==="vertical")o=t.y,a=o,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,f=t.angle,p=Nr(s,l,c,f),m=Nr(s,l,u,f);r=p.x,o=p.y,i=m.x,a=m.y}else return Mle(t);return[{x:r,y:o},{x:i,y:a}]}function yS(e){"@babel/helpers - typeof";return yS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yS(e)}function jQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function G1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jQ(Object(n),!0).forEach(function(r){$Ke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Ke(e,t,n){return t=NKe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NKe(e){var t=LKe(e,"string");return yS(t)=="symbol"?t:t+""}function LKe(e,t){if(yS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FKe(e){var t,n,r=e.element,o=e.tooltipEventType,i=e.isActive,a=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!i||!a||p!=="ScatterChart"&&o!=="axis")return null;var g,y=xf;if(p==="ScatterChart")g=a,y=Mqe;else if(p==="BarChart")g=kKe(f,a,l,u),y=Lz;else if(f==="radial"){var v=Mle(a),w=v.cx,C=v.cy,E=v.radius,I=v.startAngle,O=v.endAngle;g={cx:w,cy:C,startAngle:I,endAngle:O,innerRadius:E,outerRadius:E},y=Ese}else g={points:_Ke(f,a,l)},y=xf;var P=G1(G1(G1(G1({stroke:"#ccc",pointerEvents:"none"},l),g),zt(m,!1)),{},{payload:s,payloadIndex:c,className:fe("recharts-tooltip-cursor",m.className)});return x.isValidElement(m)?x.cloneElement(m,P):x.createElement(y,P)}var jKe=["item"],BKe=["children","className","width","height","style","compact","title","desc"];function By(e){"@babel/helpers - typeof";return By=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},By(e)}function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sg.apply(this,arguments)}function BQ(e,t){return HKe(e)||VKe(e,t)||Dle(e,t)||zKe()}function zKe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VKe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function HKe(e){if(Array.isArray(e))return e}function zQ(e,t){if(e==null)return{};var n=UKe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function GKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qKe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kle(r.key),r)}}function WKe(e,t,n){return t&&qKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KKe(e,t,n){return t=fO(t),YKe(e,Rle()?Reflect.construct(t,n||[],fO(e).constructor):t.apply(e,n))}function YKe(e,t){if(t&&(By(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QKe(e)}function QKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rle=function(){return!!e})()}function fO(e){return fO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fO(e)}function XKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_F(e,t)}function _F(e,t){return _F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},_F(e,t)}function zy(e){return eYe(e)||ZKe(e)||Dle(e)||JKe()}function JKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dle(e,t){if(e){if(typeof e=="string")return $F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $F(e,t)}}function ZKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eYe(e){if(Array.isArray(e))return $F(e)}function $F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VQ(Object(n),!0).forEach(function(r){ln(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VQ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ln(e,t,n){return t=kle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kle(e){var t=tYe(e,"string");return By(t)=="symbol"?t:t+""}function tYe(e,t){if(By(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(By(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nYe={xAxis:["bottom","top"],yAxis:["left","right"]},rYe={width:"100%",height:"100%"},_le={x:0,y:0};function q1(e){return e}var oYe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},iYe=function(t,n,r,o){var i=n.find(function(u){return u&&u.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:o.y};if(t==="vertical")return{x:o.x,y:i.coordinate};if(t==="centric"){var a=i.coordinate,s=o.radius;return Xe(Xe(Xe({},o),Nr(o.cx,o.cy,s,a)),{},{angle:a,radius:s})}var l=i.coordinate,c=o.angle;return Xe(Xe(Xe({},o),Nr(o.cx,o.cy,l,c)),{},{angle:c,radius:l})}return _le},gP=function(t,n){var r=n.graphicalItems,o=n.dataStartIndex,i=n.dataEndIndex,a=(r??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(zy(s),zy(c)):s},[]);return a.length>0?a:t&&t.length&&mt(o)&&mt(i)?t.slice(o,i+1):[]};function $le(e){return e==="number"?[0,"auto"]:void 0}var NF=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=gP(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,f=(u=c.props.data)!==null&&u!==void 0?u:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(a.dataKey&&!a.allowDuplicatedCategory){var m=f===void 0?s:f;p=fT(m,a.dataKey,o)}else p=f&&f[r]||s[r];return p?[].concat(zy(l),[vse(c,p)]):l},[])},HQ=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=oYe(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=i3e(a,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,p=NF(t,n,u,f),m=iYe(r,s,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:p,activeCoordinate:m}}return null},aYe=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,p=t.stackOffset,m=fse(u,i);return r.reduce(function(g,y){var v,w=y.type.defaultProps!==void 0?Xe(Xe({},y.type.defaultProps),y.props):y.props,C=w.type,E=w.dataKey,I=w.allowDataOverflow,O=w.allowDuplicatedCategory,P=w.scale,R=w.ticks,D=w.includeHidden,M=w[a];if(g[M])return g;var A=gP(t.data,{graphicalItems:o.filter(function(Y){var Z,ie=a in Y.props?Y.props[a]:(Z=Y.type.defaultProps)===null||Z===void 0?void 0:Z[a];return ie===M}),dataStartIndex:l,dataEndIndex:c}),_=A.length,N,B,H;DKe(w.domain,I,C)&&(N=WL(w.domain,null,I),m&&(C==="number"||P!=="auto")&&(H=rx(A,E,"category")));var j=$le(C);if(!N||N.length===0){var L,V=(L=w.domain)!==null&&L!==void 0?L:j;if(E){if(N=rx(A,E,C),C==="category"&&m){var W=ZFe(N);O&&W?(B=N,N=QT(0,_)):O||(N=VK(V,N,y).reduce(function(Y,Z){return Y.indexOf(Z)>=0?Y:[].concat(zy(Y),[Z])},[]))}else if(C==="category")O?N=N.filter(function(Y){return Y!==""&&!an(Y)}):N=VK(V,N,y).reduce(function(Y,Z){return Y.indexOf(Z)>=0||Z===""||an(Z)?Y:[].concat(zy(Y),[Z])},[]);else if(C==="number"){var K=u3e(A,o.filter(function(Y){var Z,ie,se=a in Y.props?Y.props[a]:(Z=Y.type.defaultProps)===null||Z===void 0?void 0:Z[a],ce="hide"in Y.props?Y.props.hide:(ie=Y.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return se===M&&(D||!ce)}),E,i,u);K&&(N=K)}m&&(C==="number"||P!=="auto")&&(H=rx(A,E,"category"))}else m?N=QT(0,_):s&&s[M]&&s[M].hasStack&&C==="number"?N=p==="expand"?[0,1]:yse(s[M].stackGroups,l,c):N=dse(A,o.filter(function(Y){var Z=a in Y.props?Y.props[a]:Y.type.defaultProps[a],ie="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return Z===M&&(D||!ie)}),C,u,!0);if(C==="number")N=kF(f,N,M,i,R),V&&(N=WL(V,N,I));else if(C==="category"&&V){var G=V,q=N.every(function(Y){return G.indexOf(Y)>=0});q&&(N=G)}}return Xe(Xe({},g),{},ln({},M,Xe(Xe({},w),{},{axisType:i,domain:N,categoricalDomain:H,duplicateDomain:B,originalDomain:(v=w.domain)!==null&&v!==void 0?v:j,isCategorical:m,layout:u})))},{})},sYe=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,p=gP(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=p.length,g=fse(u,i),y=-1;return r.reduce(function(v,w){var C=w.type.defaultProps!==void 0?Xe(Xe({},w.type.defaultProps),w.props):w.props,E=C[a],I=$le("number");if(!v[E]){y++;var O;return g?O=QT(0,m):s&&s[E]&&s[E].hasStack?(O=yse(s[E].stackGroups,l,c),O=kF(f,O,E,i)):(O=WL(I,dse(p,r.filter(function(P){var R,D,M=a in P.props?P.props[a]:(R=P.type.defaultProps)===null||R===void 0?void 0:R[a],A="hide"in P.props?P.props.hide:(D=P.type.defaultProps)===null||D===void 0?void 0:D.hide;return M===E&&!A}),"number",u),o.defaultProps.allowDataOverflow),O=kF(f,O,E,i)),Xe(Xe({},v),{},ln({},E,Xe(Xe({axisType:i},o.defaultProps),{},{hide:!0,orientation:Ja(nYe,"".concat(i,".").concat(y%2),null),domain:O,originalDomain:I,isCategorical:g,layout:u})))}return v},{})},lYe=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,f="".concat(o,"Id"),p=sa(u,i),m={};return p&&p.length?m=aYe(t,{axes:p,graphicalItems:a,axisType:o,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(m=sYe(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),m},cYe=function(t){var n=Jd(t),r=Du(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:uz(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:LT(n,r)}},UQ=function(t){var n=t.children,r=t.defaultShowTooltip,o=Va(n,Py),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},uYe=function(t){return!t||!t.length?!1:t.some(function(n){var r=_u(n&&n.type);return r&&r.indexOf("Bar")>=0})},GQ=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},dYe=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,f=r.children,p=r.margin||{},m=Va(f,Py),g=Va(f,Ic),y=Object.keys(l).reduce(function(O,P){var R=l[P],D=R.orientation;return!R.mirror&&!R.hide?Xe(Xe({},O),{},ln({},D,O[D]+R.width)):O},{left:p.left||0,right:p.right||0}),v=Object.keys(a).reduce(function(O,P){var R=a[P],D=R.orientation;return!R.mirror&&!R.hide?Xe(Xe({},O),{},ln({},D,Ja(O,"".concat(D))+R.height)):O},{top:p.top||0,bottom:p.bottom||0}),w=Xe(Xe({},v),y),C=w.bottom;m&&(w.bottom+=m.props.height||Py.defaultProps.height),g&&n&&(w=l3e(w,o,r,n));var E=c-w.left-w.right,I=u-w.top-w.bottom;return Xe(Xe({brushBottom:C},w),{},{width:Math.max(E,0),height:Math.max(I,0)})},fYe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Pw=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,f=t.defaultProps,p=function(w,C){var E=C.graphicalItems,I=C.stackGroups,O=C.offset,P=C.updateId,R=C.dataStartIndex,D=C.dataEndIndex,M=w.barSize,A=w.layout,_=w.barGap,N=w.barCategoryGap,B=w.maxBarSize,H=GQ(A),j=H.numericAxisName,L=H.cateAxisName,V=uYe(E),W=[];return E.forEach(function(K,G){var q=gP(w.data,{graphicalItems:[K],dataStartIndex:R,dataEndIndex:D}),Y=K.type.defaultProps!==void 0?Xe(Xe({},K.type.defaultProps),K.props):K.props,Z=Y.dataKey,ie=Y.maxBarSize,se=Y["".concat(j,"Id")],ce=Y["".concat(L,"Id")],ye={},Se=l.reduce(function(Ie,te){var Te=C["".concat(te.axisType,"Map")],De=Y["".concat(te.axisType,"Id")];Te&&Te[De]||te.axisType==="zAxis"||Rf();var Ve=Te[De];return Xe(Xe({},Ie),{},ln(ln({},te.axisType,Ve),"".concat(te.axisType,"Ticks"),Du(Ve)))},ye),ne=Se[L],le=Se["".concat(L,"Ticks")],de=I&&I[se]&&I[se].hasStack&&b3e(K,I[se].stackGroups),oe=_u(K.type).indexOf("Bar")>=0,ue=LT(ne,le),pe=[],Ee=V&&a3e({barSize:M,stackGroups:I,totalSize:fYe(Se,L)});if(oe){var xe,Re,he=an(ie)?B:ie,Pe=(xe=(Re=LT(ne,le,!0))!==null&&Re!==void 0?Re:he)!==null&&xe!==void 0?xe:0;pe=s3e({barGap:_,barCategoryGap:N,bandSize:Pe!==ue?Pe:ue,sizeList:Ee[ce],maxBarSize:he}),Pe!==ue&&(pe=pe.map(function(Ie){return Xe(Xe({},Ie),{},{position:Xe(Xe({},Ie.position),{},{offset:Ie.position.offset-Pe/2})})}))}var ve=K&&K.type&&K.type.getComposedData;ve&&W.push({props:Xe(Xe({},ve(Xe(Xe({},Se),{},{displayedData:q,props:w,dataKey:Z,item:K,bandSize:ue,barPosition:pe,offset:O,stackedData:de,layout:A,dataStartIndex:R,dataEndIndex:D}))),{},ln(ln(ln({key:K.key||"item-".concat(G)},j,Se[j]),L,Se[L]),"animationId",P)),childIndex:fje(K,w.children),item:K})}),W},m=function(w,C){var E=w.props,I=w.dataStartIndex,O=w.dataEndIndex,P=w.updateId;if(!r8({props:E}))return null;var R=E.children,D=E.layout,M=E.stackOffset,A=E.data,_=E.reverseStackOrder,N=GQ(D),B=N.numericAxisName,H=N.cateAxisName,j=sa(R,r),L=y3e(A,j,"".concat(B,"Id"),"".concat(H,"Id"),M,_),V=l.reduce(function(Y,Z){var ie="".concat(Z.axisType,"Map");return Xe(Xe({},Y),{},ln({},ie,lYe(E,Xe(Xe({},Z),{},{graphicalItems:j,stackGroups:Z.axisType===B&&L,dataStartIndex:I,dataEndIndex:O}))))},{}),W=dYe(Xe(Xe({},V),{},{props:E,graphicalItems:j}),C==null?void 0:C.legendBBox);Object.keys(V).forEach(function(Y){V[Y]=u(E,V[Y],W,Y.replace("Map",""),n)});var K=V["".concat(H,"Map")],G=cYe(K),q=p(E,Xe(Xe({},V),{},{dataStartIndex:I,dataEndIndex:O,updateId:P,graphicalItems:j,stackGroups:L,offset:W}));return Xe(Xe({formattedGraphicalItems:q,graphicalItems:j,offset:W,stackGroups:L},G),V)},g=function(v){function w(C){var E,I,O;return GKe(this,w),O=KKe(this,w,[C]),ln(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ln(O,"accessibilityManager",new RKe),ln(O,"handleLegendBBoxUpdate",function(P){if(P){var R=O.state,D=R.dataStartIndex,M=R.dataEndIndex,A=R.updateId;O.setState(Xe({legendBBox:P},m({props:O.props,dataStartIndex:D,dataEndIndex:M,updateId:A},Xe(Xe({},O.state),{},{legendBBox:P}))))}}),ln(O,"handleReceiveSyncEvent",function(P,R,D){if(O.props.syncId===P){if(D===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(R)}}),ln(O,"handleBrushChange",function(P){var R=P.startIndex,D=P.endIndex;if(R!==O.state.dataStartIndex||D!==O.state.dataEndIndex){var M=O.state.updateId;O.setState(function(){return Xe({dataStartIndex:R,dataEndIndex:D},m({props:O.props,dataStartIndex:R,dataEndIndex:D,updateId:M},O.state))}),O.triggerSyncEvent({dataStartIndex:R,dataEndIndex:D})}}),ln(O,"handleMouseEnter",function(P){var R=O.getMouseInfo(P);if(R){var D=Xe(Xe({},R),{},{isTooltipActive:!0});O.setState(D),O.triggerSyncEvent(D);var M=O.props.onMouseEnter;rn(M)&&M(D,P)}}),ln(O,"triggeredAfterMouseMove",function(P){var R=O.getMouseInfo(P),D=R?Xe(Xe({},R),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(D),O.triggerSyncEvent(D);var M=O.props.onMouseMove;rn(M)&&M(D,P)}),ln(O,"handleItemMouseEnter",function(P){O.setState(function(){return{isTooltipActive:!0,activeItem:P,activePayload:P.tooltipPayload,activeCoordinate:P.tooltipPosition||{x:P.cx,y:P.cy}}})}),ln(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),ln(O,"handleMouseMove",function(P){P.persist(),O.throttleTriggeredAfterMouseMove(P)}),ln(O,"handleMouseLeave",function(P){O.throttleTriggeredAfterMouseMove.cancel();var R={isTooltipActive:!1};O.setState(R),O.triggerSyncEvent(R);var D=O.props.onMouseLeave;rn(D)&&D(R,P)}),ln(O,"handleOuterEvent",function(P){var R=dje(P),D=Ja(O.props,"".concat(R));if(R&&rn(D)){var M,A;/.*touch.*/i.test(R)?A=O.getMouseInfo(P.changedTouches[0]):A=O.getMouseInfo(P),D((M=A)!==null&&M!==void 0?M:{},P)}}),ln(O,"handleClick",function(P){var R=O.getMouseInfo(P);if(R){var D=Xe(Xe({},R),{},{isTooltipActive:!0});O.setState(D),O.triggerSyncEvent(D);var M=O.props.onClick;rn(M)&&M(D,P)}}),ln(O,"handleMouseDown",function(P){var R=O.props.onMouseDown;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),ln(O,"handleMouseUp",function(P){var R=O.props.onMouseUp;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),ln(O,"handleTouchMove",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(P.changedTouches[0])}),ln(O,"handleTouchStart",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&O.handleMouseDown(P.changedTouches[0])}),ln(O,"handleTouchEnd",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&O.handleMouseUp(P.changedTouches[0])}),ln(O,"handleDoubleClick",function(P){var R=O.props.onDoubleClick;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),ln(O,"handleContextMenu",function(P){var R=O.props.onContextMenu;if(rn(R)){var D=O.getMouseInfo(P);R(D,P)}}),ln(O,"triggerSyncEvent",function(P){O.props.syncId!==void 0&&Y_.emit(Q_,O.props.syncId,P,O.eventEmitterSymbol)}),ln(O,"applySyncEvent",function(P){var R=O.props,D=R.layout,M=R.syncMethod,A=O.state.updateId,_=P.dataStartIndex,N=P.dataEndIndex;if(P.dataStartIndex!==void 0||P.dataEndIndex!==void 0)O.setState(Xe({dataStartIndex:_,dataEndIndex:N},m({props:O.props,dataStartIndex:_,dataEndIndex:N,updateId:A},O.state)));else if(P.activeTooltipIndex!==void 0){var B=P.chartX,H=P.chartY,j=P.activeTooltipIndex,L=O.state,V=L.offset,W=L.tooltipTicks;if(!V)return;if(typeof M=="function")j=M(W,P);else if(M==="value"){j=-1;for(var K=0;K<W.length;K++)if(W[K].value===P.activeLabel){j=K;break}}var G=Xe(Xe({},V),{},{x:V.left,y:V.top}),q=Math.min(B,G.x+G.width),Y=Math.min(H,G.y+G.height),Z=W[j]&&W[j].value,ie=NF(O.state,O.props.data,j),se=W[j]?{x:D==="horizontal"?W[j].coordinate:q,y:D==="horizontal"?Y:W[j].coordinate}:_le;O.setState(Xe(Xe({},P),{},{activeLabel:Z,activeCoordinate:se,activePayload:ie,activeTooltipIndex:j}))}else O.setState(P)}),ln(O,"renderCursor",function(P){var R,D=O.state,M=D.isTooltipActive,A=D.activeCoordinate,_=D.activePayload,N=D.offset,B=D.activeTooltipIndex,H=D.tooltipAxisBandSize,j=O.getTooltipEventType(),L=(R=P.props.active)!==null&&R!==void 0?R:M,V=O.props.layout,W=P.key||"_recharts-cursor";return J.createElement(FKe,{key:W,activeCoordinate:A,activePayload:_,activeTooltipIndex:B,chartName:n,element:P,isActive:L,layout:V,offset:N,tooltipAxisBandSize:H,tooltipEventType:j})}),ln(O,"renderPolarAxis",function(P,R,D){var M=Ja(P,"type.axisType"),A=Ja(O.state,"".concat(M,"Map")),_=P.type.defaultProps,N=_!==void 0?Xe(Xe({},_),P.props):P.props,B=A&&A[N["".concat(M,"Id")]];return x.cloneElement(P,Xe(Xe({},B),{},{className:fe(M,B.className),key:P.key||"".concat(R,"-").concat(D),ticks:Du(B,!0)}))}),ln(O,"renderPolarGrid",function(P){var R=P.props,D=R.radialLines,M=R.polarAngles,A=R.polarRadius,_=O.state,N=_.radiusAxisMap,B=_.angleAxisMap,H=Jd(N),j=Jd(B),L=j.cx,V=j.cy,W=j.innerRadius,K=j.outerRadius;return x.cloneElement(P,{polarAngles:Array.isArray(M)?M:Du(j,!0).map(function(G){return G.coordinate}),polarRadius:Array.isArray(A)?A:Du(H,!0).map(function(G){return G.coordinate}),cx:L,cy:V,innerRadius:W,outerRadius:K,key:P.key||"polar-grid",radialLines:D})}),ln(O,"renderLegend",function(){var P=O.state.formattedGraphicalItems,R=O.props,D=R.children,M=R.width,A=R.height,_=O.props.margin||{},N=M-(_.left||0)-(_.right||0),B=cse({children:D,formattedGraphicalItems:P,legendWidth:N,legendContent:c});if(!B)return null;var H=B.item,j=zQ(B,jKe);return x.cloneElement(H,Xe(Xe({},j),{},{chartWidth:M,chartHeight:A,margin:_,onBBoxUpdate:O.handleLegendBBoxUpdate}))}),ln(O,"renderTooltip",function(){var P,R=O.props,D=R.children,M=R.accessibilityLayer,A=Va(D,ba);if(!A)return null;var _=O.state,N=_.isTooltipActive,B=_.activeCoordinate,H=_.activePayload,j=_.activeLabel,L=_.offset,V=(P=A.props.active)!==null&&P!==void 0?P:N;return x.cloneElement(A,{viewBox:Xe(Xe({},L),{},{x:L.left,y:L.top}),active:V,label:j,payload:V?H:[],coordinate:B,accessibilityLayer:M})}),ln(O,"renderBrush",function(P){var R=O.props,D=R.margin,M=R.data,A=O.state,_=A.offset,N=A.dataStartIndex,B=A.dataEndIndex,H=A.updateId;return x.cloneElement(P,{key:P.key||"_recharts-brush",onChange:z1(O.handleBrushChange,P.props.onChange),data:M,x:mt(P.props.x)?P.props.x:_.left,y:mt(P.props.y)?P.props.y:_.top+_.height+_.brushBottom-(D.bottom||0),width:mt(P.props.width)?P.props.width:_.width,startIndex:N,endIndex:B,updateId:"brush-".concat(H)})}),ln(O,"renderReferenceElement",function(P,R,D){if(!P)return null;var M=O,A=M.clipPathId,_=O.state,N=_.xAxisMap,B=_.yAxisMap,H=_.offset,j=P.type.defaultProps||{},L=P.props,V=L.xAxisId,W=V===void 0?j.xAxisId:V,K=L.yAxisId,G=K===void 0?j.yAxisId:K;return x.cloneElement(P,{key:P.key||"".concat(R,"-").concat(D),xAxis:N[W],yAxis:B[G],viewBox:{x:H.left,y:H.top,width:H.width,height:H.height},clipPathId:A})}),ln(O,"renderActivePoints",function(P){var R=P.item,D=P.activePoint,M=P.basePoint,A=P.childIndex,_=P.isRange,N=[],B=R.props.key,H=R.item.type.defaultProps!==void 0?Xe(Xe({},R.item.type.defaultProps),R.item.props):R.item.props,j=H.activeDot,L=H.dataKey,V=Xe(Xe({index:A,dataKey:L,cx:D.x,cy:D.y,r:4,fill:Nz(R.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},zt(j,!1)),pT(j));return N.push(w.renderActiveDot(j,V,"".concat(B,"-activePoint-").concat(A))),M?N.push(w.renderActiveDot(j,Xe(Xe({},V),{},{cx:M.x,cy:M.y}),"".concat(B,"-basePoint-").concat(A))):_&&N.push(null),N}),ln(O,"renderGraphicChild",function(P,R,D){var M=O.filterFormatItem(P,R,D);if(!M)return null;var A=O.getTooltipEventType(),_=O.state,N=_.isTooltipActive,B=_.tooltipAxis,H=_.activeTooltipIndex,j=_.activeLabel,L=O.props.children,V=Va(L,ba),W=M.props,K=W.points,G=W.isRange,q=W.baseLine,Y=M.item.type.defaultProps!==void 0?Xe(Xe({},M.item.type.defaultProps),M.item.props):M.item.props,Z=Y.activeDot,ie=Y.hide,se=Y.activeBar,ce=Y.activeShape,ye=!!(!ie&&N&&V&&(Z||se||ce)),Se={};A!=="axis"&&V&&V.props.trigger==="click"?Se={onClick:z1(O.handleItemMouseEnter,P.props.onClick)}:A!=="axis"&&(Se={onMouseLeave:z1(O.handleItemMouseLeave,P.props.onMouseLeave),onMouseEnter:z1(O.handleItemMouseEnter,P.props.onMouseEnter)});var ne=x.cloneElement(P,Xe(Xe({},M.props),Se));function le(te){return typeof B.dataKey=="function"?B.dataKey(te.payload):null}if(ye)if(H>=0){var de,oe;if(B.dataKey&&!B.allowDuplicatedCategory){var ue=typeof B.dataKey=="function"?le:"payload.".concat(B.dataKey.toString());de=fT(K,ue,j),oe=G&&q&&fT(q,ue,j)}else de=K==null?void 0:K[H],oe=G&&q&&q[H];if(ce||se){var pe=P.props.activeIndex!==void 0?P.props.activeIndex:H;return[x.cloneElement(P,Xe(Xe(Xe({},M.props),Se),{},{activeIndex:pe})),null,null]}if(!an(de))return[ne].concat(zy(O.renderActivePoints({item:M,activePoint:de,basePoint:oe,childIndex:H,isRange:G})))}else{var Ee,xe=(Ee=O.getItemByXY(O.state.activeCoordinate))!==null&&Ee!==void 0?Ee:{graphicalItem:ne},Re=xe.graphicalItem,he=Re.item,Pe=he===void 0?P:he,ve=Re.childIndex,Ie=Xe(Xe(Xe({},M.props),Se),{},{activeIndex:ve});return[x.cloneElement(Pe,Ie),null,null]}return G?[ne,null,null]:[ne,null]}),ln(O,"renderCustomized",function(P,R,D){return x.cloneElement(P,Xe(Xe({key:"recharts-customized-".concat(D)},O.props),O.state))}),ln(O,"renderMap",{CartesianGrid:{handler:q1,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:q1},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:q1},YAxis:{handler:q1},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((E=C.id)!==null&&E!==void 0?E:Vf("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=lae(O.triggeredAfterMouseMove,(I=C.throttleDelay)!==null&&I!==void 0?I:1e3/60),O.state={},O}return XKe(w,v),WKe(w,[{key:"componentDidMount",value:function(){var E,I;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(I=this.props.margin.top)!==null&&I!==void 0?I:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,I=E.children,O=E.data,P=E.height,R=E.layout,D=Va(I,ba);if(D){var M=D.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,_=NF(this.state,O,M,A),N=this.state.tooltipTicks[M].coordinate,B=(this.state.offset.top+P)/2,H=R==="horizontal",j=H?{x:N,y:B}:{y:N,x:B},L=this.state.formattedGraphicalItems.find(function(W){var K=W.item;return K.type.name==="Scatter"});L&&(j=Xe(Xe({},j),L.props.points[M].tooltipPosition),_=L.props.points[M].tooltipPayload);var V={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:A,activePayload:_,activeCoordinate:j};this.setState(V),this.renderCursor(D),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,I){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==I.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var O,P;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0}})}return null}},{key:"componentDidUpdate",value:function(E){mL([Va(E.children,ba)],[Va(this.props.children,ba)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Va(this.props.children,ba);if(E&&typeof E.props.shared=="boolean"){var I=E.props.shared?"axis":"item";return s.indexOf(I)>=0?I:i}return i}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var I=this.container,O=I.getBoundingClientRect(),P=XVe(O),R={chartX:Math.round(E.pageX-P.left),chartY:Math.round(E.pageY-P.top)},D=O.width/I.offsetWidth||1,M=this.inRange(R.chartX,R.chartY,D);if(!M)return null;var A=this.state,_=A.xAxisMap,N=A.yAxisMap,B=this.getTooltipEventType(),H=HQ(this.state,this.props.data,this.props.layout,M);if(B!=="axis"&&_&&N){var j=Jd(_).scale,L=Jd(N).scale,V=j&&j.invert?j.invert(R.chartX):null,W=L&&L.invert?L.invert(R.chartY):null;return Xe(Xe({},R),{},{xValue:V,yValue:W},H)}return H?Xe(Xe({},R),H):null}},{key:"inRange",value:function(E,I){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,P=this.props.layout,R=E/O,D=I/O;if(P==="horizontal"||P==="vertical"){var M=this.state.offset,A=R>=M.left&&R<=M.left+M.width&&D>=M.top&&D<=M.top+M.height;return A?{x:R,y:D}:null}var _=this.state,N=_.angleAxisMap,B=_.radiusAxisMap;if(N&&B){var H=Jd(N);return GK({x:R,y:D},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,I=this.getTooltipEventType(),O=Va(E,ba),P={};O&&I==="axis"&&(O.props.trigger==="click"?P={onClick:this.handleClick}:P={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var R=pT(this.props,this.handleOuterEvent);return Xe(Xe({},R),P)}},{key:"addListener",value:function(){Y_.on(Q_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Y_.removeListener(Q_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,I,O){for(var P=this.state.formattedGraphicalItems,R=0,D=P.length;R<D;R++){var M=P[R];if(M.item===E||M.props.key===E.key||I===_u(M.item.type)&&O===M.childIndex)return M}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,I=this.state.offset,O=I.left,P=I.top,R=I.height,D=I.width;return J.createElement("defs",null,J.createElement("clipPath",{id:E},J.createElement("rect",{x:O,y:P,height:R,width:D})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(I,O){var P=BQ(O,2),R=P[0],D=P[1];return Xe(Xe({},I),{},ln({},R,D.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(I,O){var P=BQ(O,2),R=P[0],D=P[1];return Xe(Xe({},I),{},ln({},R,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var I;return(I=this.state.xAxisMap)===null||I===void 0||(I=I[E])===null||I===void 0?void 0:I.scale}},{key:"getYScaleByAxisId",value:function(E){var I;return(I=this.state.yAxisMap)===null||I===void 0||(I=I[E])===null||I===void 0?void 0:I.scale}},{key:"getItemByXY",value:function(E){var I=this.state,O=I.formattedGraphicalItems,P=I.activeItem;if(O&&O.length)for(var R=0,D=O.length;R<D;R++){var M=O[R],A=M.props,_=M.item,N=_.type.defaultProps!==void 0?Xe(Xe({},_.type.defaultProps),_.props):_.props,B=_u(_.type);if(B==="Bar"){var H=(A.data||[]).find(function(W){return uqe(E,W)});if(H)return{graphicalItem:M,payload:H}}else if(B==="RadialBar"){var j=(A.data||[]).find(function(W){return GK(E,W)});if(j)return{graphicalItem:M,payload:j}}else if(lP(M,P)||cP(M,P)||dS(M,P)){var L=_We({graphicalItem:M,activeTooltipItem:P,itemData:N.data}),V=N.activeIndex===void 0?L:N.activeIndex;return{graphicalItem:Xe(Xe({},M),{},{childIndex:V}),payload:dS(M,P)?N.data[L]:M.props.data[L]}}}return null}},{key:"render",value:function(){var E=this;if(!r8(this))return null;var I=this.props,O=I.children,P=I.className,R=I.width,D=I.height,M=I.style,A=I.compact,_=I.title,N=I.desc,B=zQ(I,BKe),H=zt(B,!1);if(A)return J.createElement(yQ,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement(yL,Sg({},H,{width:R,height:D,title:_,desc:N}),this.renderClipPath(),i8(O,this.renderMap)));if(this.props.accessibilityLayer){var j,L;H.tabIndex=(j=this.props.tabIndex)!==null&&j!==void 0?j:0,H.role=(L=this.props.role)!==null&&L!==void 0?L:"application",H.onKeyDown=function(W){E.accessibilityManager.keyboardEvent(W)},H.onFocus=function(){E.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return J.createElement(yQ,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement("div",Sg({className:fe("recharts-wrapper",P),style:Xe({position:"relative",cursor:"default",width:R,height:D},M)},V,{ref:function(K){E.container=K}}),J.createElement(yL,Sg({},H,{width:R,height:D,title:_,desc:N,style:rYe}),this.renderClipPath(),i8(O,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);ln(g,"displayName",n),ln(g,"defaultProps",Xe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ln(g,"getDerivedStateFromProps",function(v,w){var C=v.dataKey,E=v.data,I=v.children,O=v.width,P=v.height,R=v.layout,D=v.stackOffset,M=v.margin,A=w.dataStartIndex,_=w.dataEndIndex;if(w.updateId===void 0){var N=UQ(v);return Xe(Xe(Xe({},N),{},{updateId:0},m(Xe(Xe({props:v},N),{},{updateId:0}),w)),{},{prevDataKey:C,prevData:E,prevWidth:O,prevHeight:P,prevLayout:R,prevStackOffset:D,prevMargin:M,prevChildren:I})}if(C!==w.prevDataKey||E!==w.prevData||O!==w.prevWidth||P!==w.prevHeight||R!==w.prevLayout||D!==w.prevStackOffset||!jg(M,w.prevMargin)){var B=UQ(v),H={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},j=Xe(Xe({},HQ(w,E,R)),{},{updateId:w.updateId+1}),L=Xe(Xe(Xe({},B),H),j);return Xe(Xe(Xe({},L),m(Xe({props:v},L),w)),{},{prevDataKey:C,prevData:E,prevWidth:O,prevHeight:P,prevLayout:R,prevStackOffset:D,prevMargin:M,prevChildren:I})}if(!mL(I,w.prevChildren)){var V,W,K,G,q=Va(I,Py),Y=q&&(V=(W=q.props)===null||W===void 0?void 0:W.startIndex)!==null&&V!==void 0?V:A,Z=q&&(K=(G=q.props)===null||G===void 0?void 0:G.endIndex)!==null&&K!==void 0?K:_,ie=Y!==A||Z!==_,se=!an(E),ce=se&&!ie?w.updateId:w.updateId+1;return Xe(Xe({updateId:ce},m(Xe(Xe({props:v},w),{},{updateId:ce,dataStartIndex:Y,dataEndIndex:Z}),w)),{},{prevChildren:I,dataStartIndex:Y,dataEndIndex:Z})}return null}),ln(g,"renderActiveDot",function(v,w,C){var E;return x.isValidElement(v)?E=x.cloneElement(v,w):rn(v)?E=v(w):E=J.createElement(Tw,w),J.createElement(wn,{className:"recharts-active-dot",key:C},E)});var y=x.forwardRef(function(w,C){return J.createElement(g,Sg({},w,{ref:C}))});return y.displayName=g.displayName,y},Wz=Pw({chartName:"LineChart",GraphicalChild:Wh,axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs}],formatAxisMap:dP}),Nle=Pw({chartName:"BarChart",GraphicalChild:Mc,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs}],formatAxisMap:dP}),Lle=Pw({chartName:"PieChart",GraphicalChild:qc,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:sP},{axisType:"radiusAxis",AxisComp:iP}],formatAxisMap:A3e,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),pYe=Pw({chartName:"ScatterChart",GraphicalChild:Iw,defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs},{axisType:"zAxis",AxisComp:mP}],formatAxisMap:dP}),hYe=Pw({chartName:"AreaChart",GraphicalChild:Wf,axisComponents:[{axisType:"xAxis",AxisComp:ls},{axisType:"yAxis",AxisComp:cs}],formatAxisMap:dP});const mYe=e=>{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=Lr(),[o,i]=je(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return Q(Ft,{direction:"row",children:[S(od,{width:"50%",height:140,children:Q(Lle,{children:[S(qc,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>S(Ev,{fill:s[c%s.length]},`cell-${c}`))}),Q("g",{children:[S("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:$i(n,i.language)})}),S("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),Q(Ft,{width:"50%",spacing:1,children:[S(Fg,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),S(Fg,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),S(Fg,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})},gYe=["localeText"],LF=x.createContext(null),Ys=function(t){const{localeText:n}=t,r=$e(t,gYe),{utils:o,localeText:i}=x.useContext(LF)??{utils:void 0,localeText:void 0},a=Pn({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:f,localeText:p}=a,m=x.useMemo(()=>z({},p,i,n),[p,i,n]),g=x.useMemo(()=>{if(!l)return o||null;const w=new l({locale:f,formats:c,instance:u});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join(`
+`));return w},[l,f,c,u,o]),y=x.useMemo(()=>g?{minDate:g.date("1900-01-01T00:00:00.000"),maxDate:g.date("2099-12-31T00:00:00.000")}:null,[g]),v=x.useMemo(()=>({utils:g,defaultDates:y,localeText:m}),[y,g,m]);return k.jsx(LF.Provider,{value:v,children:s})},yYe=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:z({},e)}}}}),Fle={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",nextStepButtonLabel:"Next",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",timeRangePickerToolbarTitle:"Select time range",clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:"Choose date",openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:"Choose time",openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:"Choose range",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},vYe=Fle;yYe(Fle);const Kh=()=>{const e=x.useContext(LF);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
`));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
-`));const t=x.useMemo(()=>z({},yYe,e.localeText),[e.localeText]);return x.useMemo(()=>z({},e,{localeText:t}),[e,t])},xn=()=>Wh().utils,Fle=()=>Wh().defaultDates,Kh=e=>{const t=xn(),n=x.useRef(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},Ei=()=>Wh().localeText,vYe=Ot(k.jsx("path",{d:"M7 10l5 5 5-5z"})),bYe=Ot(k.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),xYe=Ot(k.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),jle=Ot(k.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"})),SYe=Ot(k.jsxs(x.Fragment,{children:[k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),k.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),wYe=Ot(k.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"})),CYe=Ot(k.jsxs(x.Fragment,{children:[k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),k.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),EYe=Ot(k.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function TYe(e){return qe("MuiPickersArrowSwitcher",e)}Ke("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const Ble=x.createContext(()=>!0);function OYe(){return x.useContext(Ble)}const zle=x.createContext(null);function Vle(){return x.useContext(zle)}const Wz=x.createContext(null),qc=()=>{const e=x.useContext(Wz);if(e==null)throw new Error("MUI X: The `usePickerContext` hook can only be called inside the context of a Picker component");return e},Hle=x.createContext(null),Ule=x.createContext({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:"desktop",pickerOrientation:"portrait"},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>"UI",triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function Gle(e){const{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:o,isValidContextValue:i,localeText:a,children:s}=e;return k.jsx(Wz.Provider,{value:t,children:k.jsx(Hle.Provider,{value:n,children:k.jsx(Ule.Provider,{value:r,children:k.jsx(zle.Provider,{value:o,children:k.jsx(Ble.Provider,{value:i,children:k.jsx(Ys,{localeText:a,children:s})})})})})})}const Ur=()=>x.useContext(Ule),IYe=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],PYe=["ownerState"],AYe=["ownerState"],MYe=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),RYe=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),GQ=ae(pn,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),DYe=e=>Me({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},TYe,e),qle=x.forwardRef(function(t,n){const r=vr(),o=Pn({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:f,nextLabel:h,isPreviousDisabled:m,isPreviousHidden:g,onGoToPrevious:y,previousLabel:v,labelId:w,classes:C}=o,E=$e(o,IYe),{ownerState:I}=Ur(),O=DYe(C),P={isDisabled:c,isHidden:u,goTo:f,label:h},R={isDisabled:m,isHidden:g,goTo:y,label:v},D=(s==null?void 0:s.previousIconButton)??GQ,M=Dn({elementType:D,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:R.label,"aria-label":R.label,disabled:R.isDisabled,edge:"end",onClick:R.goTo},ownerState:z({},I,{isButtonHidden:R.isHidden??!1}),className:fe(O.button,O.previousIconButton)}),A=(s==null?void 0:s.nextIconButton)??GQ,_=Dn({elementType:A,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"start",onClick:P.goTo},ownerState:z({},I,{isButtonHidden:P.isHidden??!1}),className:fe(O.button,O.nextIconButton)}),N=(s==null?void 0:s.leftArrowIcon)??bYe,B=Dn({elementType:N,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:I,className:O.leftArrowIcon}),H=$e(B,PYe),j=(s==null?void 0:s.rightArrowIcon)??xYe,L=Dn({elementType:j,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:I,className:O.rightArrowIcon}),V=$e(L,AYe);return k.jsxs(MYe,z({ref:n,className:fe(O.root,a),ownerState:I},E,{children:[k.jsx(D,z({},M,{children:r?k.jsx(j,z({},V)):k.jsx(N,z({},H))})),i?k.jsx(at,{variant:"subtitle1",component:"span",id:w,children:i}):k.jsx(RYe,{className:O.spacer,ownerState:I}),k.jsx(A,z({},_,{children:r?k.jsx(N,z({},H)):k.jsx(j,z({},V))}))]}))}),bc=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),Kz=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},Wle=["hours","minutes","seconds"],kYe=["hours","minutes","seconds","meridiem"],Th=e=>Wle.includes(e),Sg=e=>kYe.includes(e),_Ye=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,vS=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,$Ye=(e,t,n,r)=>{const o=vS(r.getHours(e),t,n);return r.setHours(e,o)},qQ=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),Aw=(e,t)=>(n,r)=>e?t.isAfter(n,r):qQ(n,t)>qQ(r,t),fO=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return bc(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:bc(n,["minutes"])?o.minutes:bc(n,["seconds"])?o.seconds:bc(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:bc(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`},Kle={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function NYe(e){const{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return o=>{if(t==null)return Kle;const i=t.findIndex(s=>n(o.view,s)),a=i===-1||i===t.length-1?null:t[i+1];return{hasNextStep:a!=null,hasSeveralSteps:t.length>1,goToNextStep:()=>{a!=null&&r(z({},o,{step:a}))},areViewsInSameStep:(s,l)=>{const c=t.find(f=>n(s,f)),u=t.find(f=>n(l,f));return c===u}}}}function Mw({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s,getStepNavigation:l}){const c=x.useRef(n),u=x.useRef(o),f=x.useRef(o.includes(n)?n:o[0]),[h,m]=ia({name:"useViews",state:"view",controlled:r,default:f.current}),g=x.useRef(i?h:null),[y,v]=ia({name:"useViews",state:"focusedView",controlled:a,default:g.current}),w=l?l({setView:m,view:h,defaultView:f.current,views:o}):Kle;x.useEffect(()=>{(c.current&&c.current!==n||u.current&&u.current.some(M=>!o.includes(M)))&&(m(o.includes(n)?n:o[0]),u.current=o,c.current=n)},[n,m,h,o]);const C=o.indexOf(h),E=o[C-1]??null,I=o[C+1]??null,O=Je((M,A)=>{v(A?M:_=>M===_?null:_),s==null||s(M,A)}),P=Je(M=>{O(M,!0),M!==h&&(m(M),t&&t(M))}),R=Je(()=>{I&&P(I)}),D=Je((M,A,_)=>{const N=A==="finish",B=_?o.indexOf(_)<o.length-1:!!I;e(M,N&&B?"partial":A,_);let j=null;if(_!=null&&_!==h?j=_:N&&(j=h),j==null)return;const L=o[o.indexOf(j)+1];L==null||!w.areViewsInSameStep(j,L)||P(L)});return z({},w,{view:h,setView:P,focusedView:y,setFocusedView:O,nextView:I,previousView:E,defaultView:o.includes(n)?n:o[0],goToNextView:R,setValueAndGoToNextView:D})}function LYe(e,{disableFuture:t,maxDate:n,timezone:r}){const o=xn();return x.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function FYe(e,{disablePast:t,minDate:n,timezone:r}){const o=xn();return x.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function gP(e,t,n,r){const o=xn(),i=x.useMemo(()=>o.isValid(e)?e:null,[o,e]),a=_Ye(i,o),s=x.useCallback(l=>{const c=i==null?null:$Ye(i,l,!!t,o);n(c,r??"partial")},[t,i,n,r,o]);return{meridiemMode:a,handleMeridiemChange:s}}const bS=36,yP=2,zy=320,jYe=280,Vy=336,Yle=232,z0=48,vP=ae("div")({overflow:"hidden",width:zy,maxHeight:Vy,display:"flex",flexDirection:"column",margin:"0 auto"});function BYe(e){return qe("MuiTimeClock",e)}Ke("MuiTimeClock",["root","arrowSwitcher"]);const Hy=220,$u=36,xS={x:Hy/2,y:Hy/2},Qle={x:xS.x,y:0},zYe=Qle.x-xS.x,VYe=Qle.y-xS.y,HYe=e=>e*(180/Math.PI),Xle=(e,t,n)=>{const r=t-xS.x,o=n-xS.y,i=Math.atan2(zYe,VYe)-Math.atan2(r,o);let a=HYe(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},UYe=(e,t,n=1)=>{const r=n*6;let{value:o}=Xle(r,e,t);return o=o*n%60,o},GYe=(e,t,n)=>{const{value:r,distance:o}=Xle(30,e,t);let i=r||12;return n?i%=12:o<Hy/2-$u&&(i+=12,i%=24),i};function qYe(e){return qe("MuiClockPointer",e)}Ke("MuiClockPointer",["root","thumb"]);const WYe=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],KYe=e=>Me({root:["root"],thumb:["thumb"]},qYe,e),YYe=ae("div",{name:"MuiClockPointer",slot:"Root"})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),QYe=ae("div",{name:"MuiClockPointer",slot:"Thumb"})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${$u/2}px)`,border:`${($u-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function XYe(e){const t=Pn({props:e,name:"MuiClockPointer"}),{className:n,classes:r,isBetweenTwoClockValues:o,isInner:i,type:a,viewValue:s}=t,l=$e(t,WYe),c=x.useRef(a);x.useEffect(()=>{c.current=a},[a]);const{ownerState:u}=Ur(),f=z({},u,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:o}),h=KYe(r),m=()=>{let y=360/(a==="hours"?12:60)*s;return a==="hours"&&s>12&&(y-=360),{height:Math.round((i?.26:.4)*Hy),transform:`rotateZ(${y}deg)`}};return k.jsx(YYe,z({style:m(),className:fe(h.root,n),ownerState:f},l,{children:k.jsx(QYe,{ownerState:f,className:h.thumb})}))}function JYe(e){return qe("MuiClock",e)}Ke("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const pO=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},SS=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=pO(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},ZYe=(e,t)=>e.isValid(t)?t:null,hO=(e,t,n)=>t==null||!e.isValid(t)?n:t,eQe=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Yz=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},Qz=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),_l=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},Jle=["year","month","day"],Uy=e=>Jle.includes(e),wS=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return bc(n,["year"])?o.year:bc(n,["month"])?o.month:bc(n,["day"])?o.dayOfMonth:bc(n,["month","year"])?`${o.month} ${o.year}`:bc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},tQe=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},nQe=(e,t)=>{const n={root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",t.clockMeridiemMode==="am"&&"selected"],pmButton:["pmButton",t.clockMeridiemMode==="pm"&&"selected"],meridiemText:["meridiemText"]};return Me(n,JYe,e)},rQe=ae("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),oQe=ae("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),iQe=ae("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),aQe=ae("div",{name:"MuiClock",slot:"SquareMask"})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),sQe=ae("div",{name:"MuiClock",slot:"Pin"})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),Zle=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:$u,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),lQe=ae(pn,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>z({},Zle(e,"am"),{position:"absolute",left:8})),cQe=ae(pn,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>z({},Zle(e,"pm"),{position:"absolute",right:8})),WQ=ae(at,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function uQe(e){const t=Pn({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:f,selectedId:h,type:m,viewValue:g,viewRange:[y,v],disabled:w=!1,readOnly:C,className:E,classes:I}=t,O=xn(),P=Ei(),{ownerState:R}=Ur(),D=z({},R,{isClockDisabled:w,clockMeridiemMode:c}),M=x.useRef(!1),A=nQe(I,D),_=l(g,m),N=!n&&m==="hours"&&(g<1||g>12),B=(se,ce)=>{w||C||l(se,m)||f(se,ce)},H=(se,ce)=>{let{offsetX:ye,offsetY:Se}=se;if(ye===void 0){const le=se.target.getBoundingClientRect();ye=se.changedTouches[0].clientX-le.left,Se=se.changedTouches[0].clientY-le.top}const ne=m==="seconds"||m==="minutes"?UYe(ye,Se,u):GYe(ye,Se,!!n);B(ne,ce)},j=se=>{M.current=!0,H(se,"shallow")},L=se=>{M.current&&(H(se,"finish"),M.current=!1),se.preventDefault()},V=se=>{se.buttons>0&&H(se.nativeEvent,"shallow")},W=se=>{M.current&&(M.current=!1),H(se.nativeEvent,"finish")},K=m==="hours"?!1:g%5!==0,G=m==="minutes"?u:1,q=x.useRef(null);In(()=>{o&&q.current.focus()},[o]);const Y=se=>Math.max(y,Math.min(v,se)),Z=se=>(se+(v+1))%(v+1),ie=se=>{if(!M.current)switch(se.key){case"Home":B(y,"partial"),se.preventDefault();break;case"End":B(v,"partial"),se.preventDefault();break;case"ArrowUp":B(Z(g+G),"partial"),se.preventDefault();break;case"ArrowDown":B(Z(g-G),"partial"),se.preventDefault();break;case"PageUp":B(Y(g+5),"partial"),se.preventDefault();break;case"PageDown":B(Y(g-5),"partial"),se.preventDefault();break;case"Enter":case" ":B(g,"finish"),se.preventDefault();break}};return k.jsxs(rQe,{className:fe(A.root,E),children:[k.jsxs(oQe,{className:A.clock,children:[k.jsx(aQe,{onTouchMove:j,onTouchStart:j,onTouchEnd:L,onMouseUp:W,onMouseMove:V,ownerState:D,className:A.squareMask}),!_&&k.jsxs(x.Fragment,{children:[k.jsx(sQe,{className:A.pin}),a!=null&&k.jsx(XYe,{type:m,viewValue:g,isInner:N,isBetweenTwoClockValues:K})]}),k.jsx(iQe,{"aria-activedescendant":h,"aria-label":P.clockLabelText(m,a==null?null:O.format(a,n?"fullTime12h":"fullTime24h")),ref:q,role:"listbox",onKeyDown:ie,tabIndex:0,className:A.wrapper,children:i})]}),n&&r&&k.jsxs(x.Fragment,{children:[k.jsx(lQe,{onClick:C?void 0:()=>s("am"),disabled:w||c===null,ownerState:D,className:A.amButton,title:_l(O,"am"),children:k.jsx(WQ,{variant:"caption",className:A.meridiemText,children:_l(O,"am")})}),k.jsx(cQe,{disabled:w||c===null,onClick:C?void 0:()=>s("pm"),ownerState:D,className:A.pmButton,title:_l(O,"pm"),children:k.jsx(WQ,{variant:"caption",className:A.meridiemText,children:_l(O,"pm")})})]})]})}function dQe(e){return qe("MuiClockNumber",e)}const q1=Ke("MuiClockNumber",["root","selected","disabled"]),fQe=["className","classes","disabled","index","inner","label","selected"],pQe=(e,t)=>{const n={root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]};return Me(n,dQe,e)},hQe=ae("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${q1.disabled}`]:t.disabled},{[`&.${q1.selected}`]:t.selected}]})(({theme:e})=>({height:$u,width:$u,position:"absolute",left:`calc((100% - ${$u}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${q1.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${q1.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:z({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function ece(e){const t=Pn({props:e,name:"MuiClockNumber"}),{className:n,classes:r,disabled:o,index:i,inner:a,label:s,selected:l}=t,c=$e(t,fQe),{ownerState:u}=Ur(),f=z({},u,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:o}),h=pQe(r,f),m=i%12/12*Math.PI*2-Math.PI/2,g=(Hy-$u-2)/2*(a?.65:1),y=Math.round(Math.cos(m)*g),v=Math.round(Math.sin(m)*g);return k.jsx(hQe,z({className:fe(h.root,n),"aria-disabled":o?!0:void 0,"aria-selected":l?!0:void 0,role:"option",style:{transform:`translate(${y}px, ${v+(Hy-$u)/2}px`},ownerState:f},c,{children:s}))}const mQe=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=f=>a===null?!1:e?f===12?a===12||a===0:a===f||a-12===f:a===f;for(let f=l;f<=c;f+=1){let h=f.toString();f===0&&(h="00");const m=!e&&(f===0||f>12);h=i.formatNumber(h);const g=u(f);s.push(k.jsx(ece,{id:g?o:void 0,index:f,inner:m,selected:g,disabled:r(f),label:h,"aria-label":n(h)},f))}return s},KQ=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return k.jsx(ece,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},qf=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const s=xn(),[l,c]=ia({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=x.useMemo(()=>a.getTimezone(s,l),[s,a,l]),f=Je(y=>u==null?y:a.setTimezone(s,u,y)),h=x.useMemo(()=>t||u||(o?s.getTimezone(o):"default"),[t,u,o,s]),m=x.useMemo(()=>a.setTimezone(s,h,l),[a,s,h,l]),g=Je((y,...v)=>{const w=f(y);c(w),i==null||i(w,...v)});return{value:m,handleValueChange:g,timezone:h}},Rl={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},gQe=e=>Math.max(...e.map(t=>Rl[t.type]??1)),f0=(e,t,n)=>{if(t===Rl.year)return e.startOfYear(n);if(t===Rl.month)return e.startOfMonth(n);if(t===Rl.day)return e.startOfDay(n);let r=n;return t<Rl.minutes&&(r=e.setMinutes(r,0)),t<Rl.seconds&&(r=e.setSeconds(r,0)),t<Rl.milliseconds&&(r=e.setMilliseconds(r,0)),r},yQe=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():f0(t,n,Qz(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=f0(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=f0(t,n,e.maxDate));const a=Aw(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=f0(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:pO(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=f0(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:pO(t,i,e.maxTime))),i},tce=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
-`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},bP=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},nce=(e,t,n,r)=>{switch(n){case"month":return Yz(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return bP(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},YQ="s",vQe=["0","1","2","3","4","5","6","7","8","9"],bQe=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),YQ)==="0"?vQe:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),YQ))},Oh=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o<e.length;o+=1){r+=e[o];const i=t.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},Xz=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),QQ=(e,t)=>{const n=Oh(e,t);return n!==" "&&!Number.isNaN(Number(n))},Jz=(e,t)=>Number(e).toString().padStart(t,"0"),rce=(e,t,n,r,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=Jz(i,o.maxLength)),Xz(i,r)},Zz=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Oh(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},XQ=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),xQe=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,oce=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return e.lib==="dayjs"&&r==="YY"?!0:e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},SQe=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;l<t.length;l+=1){const c=t[l];r&&c.type==="weekDay"||(o.push(c.format),i.push(Zz(c,"non-input",n)))}const a=o.join(" "),s=i.join(" ");return e.parse(s,a)},wQe=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),CQe=(e,t,n)=>{const o=e.map(i=>{const a=Zz(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},EQe=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=Yz(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:xQe(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=bP(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Oh(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Oh(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},TQe=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let o=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(o=Jz(o,t.maxLength));const i=bP(e,t.format),a=i.indexOf(o),l=i.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},JQ={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},ZQ=(e,t,n,r,o)=>[...n].sort((i,a)=>JQ[i.type]-JQ[a.type]).reduce((i,a)=>!o||a.modified?TQe(e,a,t,i):i,r),OQe=()=>navigator.userAgent.toLowerCase().includes("android"),IQe=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,f=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:f}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],f=u===0?null:r[u-1],h=u===e.length-1?null:r[u+1];n[c]={leftIndex:f,rightIndex:h}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},LF=(e,t)=>{if(e==null)return null;if(e==="all")return"all";if(typeof e=="string"){const n=t.findIndex(r=>r.type===e);return n===-1?null:n}return e},PQe=["value","referenceDate"],mo={emptyValue:null,getTodayValue:Qz,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=$e(e,PQe);return r.utils.isValid(t)?t:n??yQe(r)},cleanValue:ZYe,areValuesEqual:eQe,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},eV={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getV7HiddenInputValueFromSections:wQe,getV6InputValueFromSections:CQe,parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(t=>z({},t,{value:""}))},tV=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=x.useMemo(()=>mo.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Rl.day,timezone:o,getTodayDate:()=>Qz(n,o,"date")}),[]);return e??i},AQe=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","timezone"],MQe=e=>Me({root:["root"],arrowSwitcher:["arrowSwitcher"]},BYe,e),RQe=ae(vP,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),DQe=ae(qle,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),kQe=["hours","minutes"],_Qe=x.forwardRef(function(t,n){const r=xn(),o=Pn({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:f,referenceDate:h,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:y,disableFuture:v,disablePast:w,minutesStep:C=1,shouldDisableTime:E,showViewSwitcher:I,onChange:O,view:P,views:R=kQe,openTo:D,onViewChange:M,focusedView:A,onFocusedViewChange:_,className:N,classes:B,disabled:H,readOnly:j,timezone:L}=o,V=$e(o,AQe),{value:W,handleValueChange:K,timezone:G}=qf({name:"TimeClock",timezone:L,value:u,defaultValue:f,referenceDate:h,onChange:O,valueManager:mo}),q=tV({value:W,referenceDate:h,utils:r,props:o,timezone:G}),Y=Ei(),Z=Kh(G),ie=bn(),{ownerState:se}=Ur(),{view:ce,setView:ye,previousView:Se,nextView:ne,setValueAndGoToNextView:le}=Mw({view:P,views:R,openTo:D,onViewChange:M,onChange:K,focusedView:A,onFocusedViewChange:_}),{meridiemMode:de,handleMeridiemChange:oe}=gP(q,i,le),ue=x.useCallback((xe,Re)=>{const he=Aw(m,r),Pe=Re==="hours"||Re==="minutes"&&R.includes("seconds"),ve=({start:te,end:Te})=>!(y&&he(y,Te)||g&&he(te,g)||v&&he(te,Z)||w&&he(Z,Pe?Te:te)),Ie=(te,Te=1)=>{if(te%Te!==0)return!1;if(E)switch(Re){case"hours":return!E(r.setHours(q,te),"hours");case"minutes":return!E(r.setMinutes(q,te),"minutes");case"seconds":return!E(r.setSeconds(q,te),"seconds");default:return!1}return!0};switch(Re){case"hours":{const te=vS(xe,de,i),Te=r.setHours(q,te);if(r.getHours(Te)!==te)return!0;const De=r.setSeconds(r.setMinutes(Te,0),0),Ve=r.setSeconds(r.setMinutes(Te,59),59);return!ve({start:De,end:Ve})||!Ie(te)}case"minutes":{const te=r.setMinutes(q,xe),Te=r.setSeconds(te,0),De=r.setSeconds(te,59);return!ve({start:Te,end:De})||!Ie(xe,C)}case"seconds":{const te=r.setSeconds(q,xe);return!ve({start:te,end:te})||!Ie(xe)}default:throw new Error("not supported")}},[i,q,m,g,de,y,C,E,r,v,w,Z,R]),pe=x.useMemo(()=>{switch(ce){case"hours":{const xe=(Pe,ve)=>{const Ie=vS(Pe,de,i);le(r.setHours(q,Ie),ve,"hours")},Re=r.getHours(q);let he;return i?Re>12?he=[12,23]:he=[0,11]:he=[0,23],{onChange:xe,viewValue:Re,children:mQe({value:W,utils:r,ampm:i,getClockNumberText:Y.hoursClockNumberText,isDisabled:Pe=>H||ue(Pe,"hours"),selectedId:ie}),viewRange:he}}case"minutes":{const xe=r.getMinutes(q);return{viewValue:xe,onChange:(he,Pe)=>{le(r.setMinutes(q,he),Pe,"minutes")},children:KQ({utils:r,value:xe,getClockNumberText:Y.minutesClockNumberText,isDisabled:he=>H||ue(he,"minutes"),selectedId:ie}),viewRange:[0,59]}}case"seconds":{const xe=r.getSeconds(q);return{viewValue:xe,onChange:(he,Pe)=>{le(r.setSeconds(q,he),Pe,"seconds")},children:KQ({utils:r,value:xe,getClockNumberText:Y.secondsClockNumberText,isDisabled:he=>H||ue(he,"seconds"),selectedId:ie}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[ce,r,W,i,Y.hoursClockNumberText,Y.minutesClockNumberText,Y.secondsClockNumberText,de,le,q,ue,ie,H]),Ee=MQe(B);return k.jsxs(RQe,z({ref:n,className:fe(Ee.root,N),ownerState:se},V,{children:[k.jsx(uQe,z({autoFocus:s??!!A,ampmInClock:a&&R.includes("hours"),value:W,type:ce,ampm:i,minutesStep:C,isTimeDisabled:ue,meridiemMode:de,handleMeridiemChange:oe,selectedId:ie,disabled:H,readOnly:j},pe)),I&&k.jsx(DQe,{className:Ee.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ye(Se),isPreviousDisabled:!Se,previousLabel:Y.openPreviousView,onGoToNext:()=>ye(ne),isNextDisabled:!ne,nextLabel:Y.openNextView,ownerState:se})]}))});function $Qe(e){return qe("MuiDigitalClock",e)}const FF=Ke("MuiDigitalClock",["root","list","item"]);function ug(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const NQe=e=>{setTimeout(e,0)},xi=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?xi(t.shadowRoot):t:null},mO=e=>Array.from(e.children).indexOf(xi(document)),nV="@media (pointer: fine)";function LQe(...e){return e.reduce((t,n)=>(Array.isArray(n)?t.push(...n):n!=null&&t.push(n),t),[])}const FQe=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","views","skipDisabled","timezone"],jQe=e=>Me({root:["root"],list:["list"],item:["item"]},$Qe,e),BQe=ae(vP,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:Yle,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),zQe=ae(uI,{name:"MuiDigitalClock",slot:"List"})({padding:0}),VQe=ae(Jt,{name:"MuiDigitalClock",slot:"Item",shouldForwardProp:e=>e!=="itemValue"&&e!=="formattedValue"})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.primary.main,e.palette.action.focusOpacity)}})),HQe=x.forwardRef(function(t,n){const r=xn(),o=x.useRef(null),i=en(n,o),a=x.useRef(null),s=Pn({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:f,slotProps:h,value:m,defaultValue:g,referenceDate:y,disableIgnoringDatePartForTimeValidation:v=!1,maxTime:w,minTime:C,disableFuture:E,disablePast:I,minutesStep:O=1,shouldDisableTime:P,onChange:R,view:D,openTo:M,onViewChange:A,focusedView:_,onFocusedViewChange:N,className:B,classes:H,disabled:j,readOnly:L,views:V=["hours"],skipDisabled:W=!1,timezone:K}=s,G=$e(s,FQe),{value:q,handleValueChange:Y,timezone:Z}=qf({name:"DigitalClock",timezone:K,value:m,defaultValue:g,referenceDate:y,onChange:R,valueManager:mo}),ie=Ei(),se=Kh(Z),{ownerState:ce}=Ur(),ye=z({},ce,{hasDigitalClockAlreadyBeenRendered:!!o.current}),Se=jQe(H),ne=(f==null?void 0:f.digitalClockItem)??VQe,le=Dn({elementType:ne,externalSlotProps:h==null?void 0:h.digitalClockItem,ownerState:ye,className:Se.item}),de=tV({value:q,referenceDate:y,utils:r,props:s,timezone:Z}),oe=Je(Pe=>Y(Pe,"finish","hours")),{setValueAndGoToNextView:ue}=Mw({view:D,views:V,openTo:M,onViewChange:A,onChange:oe,focusedView:_,onFocusedViewChange:N}),pe=Je(Pe=>{ue(Pe,"finish")});x.useEffect(()=>{if(o.current===null)return;const Pe=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!Pe)return;const ve=Pe.offsetTop;(u||_)&&Pe.focus(),o.current.scrollTop=ve-4});const Ee=x.useCallback(Pe=>{const ve=Aw(v,r),Ie=()=>!(C&&ve(C,Pe)||w&&ve(Pe,w)||E&&ve(Pe,se)||I&&ve(se,Pe)),te=()=>r.getMinutes(Pe)%O!==0?!1:P?!P(Pe,"hours"):!0;return!Ie()||!te()},[v,r,C,w,E,se,I,O,P]),xe=x.useMemo(()=>{const Pe=[];let Ie=r.startOfDay(de);for(;r.isSameDay(de,Ie);)Pe.push(Ie),Ie=r.addMinutes(Ie,c);return Pe},[de,c,r]),Re=xe.findIndex(Pe=>r.isEqual(Pe,de)),he=Pe=>{switch(Pe.key){case"PageUp":{const ve=mO(a.current)-5,Ie=a.current.children,te=Math.max(0,ve),Te=Ie[te];Te&&Te.focus(),Pe.preventDefault();break}case"PageDown":{const ve=mO(a.current)+5,Ie=a.current.children,te=Math.min(Ie.length-1,ve),Te=Ie[te];Te&&Te.focus(),Pe.preventDefault();break}}};return k.jsx(BQe,z({ref:i,className:fe(Se.root,B),ownerState:ye},G,{children:k.jsx(zQe,{ref:a,role:"listbox","aria-label":ie.timePickerToolbarTitle,className:Se.list,onKeyDown:he,children:xe.map((Pe,ve)=>{const Ie=Ee(Pe);if(W&&Ie)return null;const te=r.isEqual(Pe,q),Te=r.format(Pe,l?"fullTime12h":"fullTime24h"),Ve=Re===ve||Re===-1&&ve===0?0:-1;return k.jsx(ne,z({onClick:()=>!L&&pe(Pe),selected:te,disabled:j||Ie,disableRipple:L,role:"option","aria-disabled":L,"aria-selected":te,tabIndex:Ve,itemValue:Pe,formattedValue:Te},le,{children:Te}),`${Pe.valueOf()}-${Te}`)})})}))});function UQe(e){return qe("MuiMultiSectionDigitalClock",e)}const jF=Ke("MuiMultiSectionDigitalClock",["root"]);function GQe(e){return qe("MuiMultiSectionDigitalClockSection",e)}const BF=Ke("MuiMultiSectionDigitalClockSection",["root","item"]),qQe=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],WQe=e=>Me({root:["root"],item:["item"]},GQe,e),KQe=ae(uI,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:Yle,width:56,padding:0,overflow:"hidden",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),YQe=ae(Jt,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:z0,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.primary.main,e.palette.action.focusOpacity)}})),QQe=x.forwardRef(function(t,n){const r=x.useRef(null),o=en(n,r),i=x.useRef(null),a=Pn({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,classes:u,disabled:f,readOnly:h,items:m,active:g,slots:y,slotProps:v,skipDisabled:w}=a,C=$e(a,qQe),{ownerState:E}=Ur(),I=z({},E,{hasDigitalClockAlreadyBeenRendered:!!r.current}),O=WQe(u),P=(y==null?void 0:y.digitalClockSectionItem)??YQe;x.useEffect(()=>{if(r.current===null)return;const M=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(g&&s&&M&&M.focus(),!M||i.current===M)return;i.current=M;const A=M.offsetTop;r.current.scrollTop=A-4});const R=m.findIndex(M=>M.isFocused(M.value)),D=M=>{switch(M.key){case"PageUp":{const A=mO(r.current)-5,_=r.current.children,N=Math.max(0,A),B=_[N];B&&B.focus(),M.preventDefault();break}case"PageDown":{const A=mO(r.current)+5,_=r.current.children,N=Math.min(_.length-1,A),B=_[N];B&&B.focus(),M.preventDefault();break}}};return k.jsx(KQe,z({ref:o,className:fe(O.root,c),ownerState:I,autoFocusItem:s&&g,role:"listbox",onKeyDown:D},C,{children:m.map((M,A)=>{var j;const _=(j=M.isDisabled)==null?void 0:j.call(M,M.value),N=f||_;if(w&&N)return null;const B=M.isSelected(M.value),H=R===A||R===-1&&A===0?0:-1;return k.jsx(P,z({onClick:()=>!h&&l(M.value),selected:B,disabled:N,disableRipple:h,role:"option","aria-disabled":h||N||void 0,"aria-label":M.ariaLabel,"aria-selected":B,tabIndex:H,className:O.item},v==null?void 0:v.digitalClockSectionItem,{children:M.label}),M.label)})}))}),XQe=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(m,g)=>{const y=g??l;return y===null?!1:r?m===12?y===12||y===0:y===m||y-12===m:y===m},f=m=>u(m,n.getHours(s)),h=r?11:23;for(let m=0;m<=h;m+=a){let g=n.format(n.setHours(e,m),r?"hours12h":"hours24h");const y=i(parseInt(g,10).toString());g=n.formatNumber(g),c.push({value:m,label:g,isSelected:u,isDisabled:o,isFocused:f,ariaLabel:y})}return c},eX=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const f=r*u;return{value:f,label:t.formatNumber(o(f)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(f.toString())}})]},JQe=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","skipDisabled","timezone"],ZQe=e=>Me({root:["root"]},UQe,e),eXe=ae(vP,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),tXe=x.forwardRef(function(t,n){const r=xn(),o=vr(),i=Pn({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:f,defaultValue:h,referenceDate:m,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:y,minTime:v,disableFuture:w,disablePast:C,minutesStep:E=1,shouldDisableTime:I,onChange:O,view:P,views:R=["hours","minutes"],openTo:D,onViewChange:M,focusedView:A,onFocusedViewChange:_,className:N,classes:B,disabled:H,readOnly:j,skipDisabled:L=!1,timezone:V}=i,W=$e(i,JQe),{value:K,handleValueChange:G,timezone:q}=qf({name:"MultiSectionDigitalClock",timezone:V,value:f,defaultValue:h,referenceDate:m,onChange:O,valueManager:mo}),Y=Ei(),Z=Kh(q),ie=x.useMemo(()=>z({hours:1,minutes:5,seconds:5},s),[s]),se=tV({value:K,referenceDate:m,utils:r,props:i,timezone:q}),ce=Je((ve,Ie,te)=>G(ve,Ie,te)),ye=x.useMemo(()=>!a||!R.includes("hours")||R.includes("meridiem")?R:[...R,"meridiem"],[a,R]),{view:Se,setValueAndGoToNextView:ne,focusedView:le}=Mw({view:P,views:ye,openTo:D,onViewChange:M,onChange:ce,focusedView:A,onFocusedViewChange:_}),de=Je(ve=>{ne(ve,"finish","meridiem")}),{meridiemMode:oe,handleMeridiemChange:ue}=gP(se,a,de,"finish"),pe=x.useCallback((ve,Ie)=>{const te=Aw(g,r),Te=Ie==="hours"||Ie==="minutes"&&ye.includes("seconds"),De=({start:We,end:rt})=>!(v&&te(v,rt)||y&&te(We,y)||w&&te(We,Z)||C&&te(Z,Te?rt:We)),Ve=(We,rt=1)=>{if(We%rt!==0)return!1;if(I)switch(Ie){case"hours":return!I(r.setHours(se,We),"hours");case"minutes":return!I(r.setMinutes(se,We),"minutes");case"seconds":return!I(r.setSeconds(se,We),"seconds");default:return!1}return!0};switch(Ie){case"hours":{const We=vS(ve,oe,a),rt=r.setHours(se,We);if(r.getHours(rt)!==We)return!0;const ut=r.setSeconds(r.setMinutes(rt,0),0),Be=r.setSeconds(r.setMinutes(rt,59),59);return!De({start:ut,end:Be})||!Ve(We)}case"minutes":{const We=r.setMinutes(se,ve),rt=r.setSeconds(We,0),ut=r.setSeconds(We,59);return!De({start:rt,end:ut})||!Ve(ve,E)}case"seconds":{const We=r.setSeconds(se,ve);return!De({start:We,end:We})||!Ve(ve)}default:throw new Error("not supported")}},[a,se,g,y,oe,v,E,I,r,w,C,Z,ye]),Ee=x.useCallback(ve=>{switch(ve){case"hours":return{onChange:Ie=>{const te=vS(Ie,oe,a);ne(r.setHours(se,te),"finish","hours")},items:XQe({now:Z,value:K,ampm:a,utils:r,isDisabled:Ie=>pe(Ie,"hours"),timeStep:ie.hours,resolveAriaLabel:Y.hoursClockNumberText,valueOrReferenceDate:se})};case"minutes":return{onChange:Ie=>{ne(r.setMinutes(se,Ie),"finish","minutes")},items:eX({value:r.getMinutes(se),utils:r,isDisabled:Ie=>pe(Ie,"minutes"),resolveLabel:Ie=>r.format(r.setMinutes(Z,Ie),"minutes"),timeStep:ie.minutes,hasValue:!!K,resolveAriaLabel:Y.minutesClockNumberText})};case"seconds":return{onChange:Ie=>{ne(r.setSeconds(se,Ie),"finish","seconds")},items:eX({value:r.getSeconds(se),utils:r,isDisabled:Ie=>pe(Ie,"seconds"),resolveLabel:Ie=>r.format(r.setSeconds(Z,Ie),"seconds"),timeStep:ie.seconds,hasValue:!!K,resolveAriaLabel:Y.secondsClockNumberText})};case"meridiem":{const Ie=_l(r,"am"),te=_l(r,"pm");return{onChange:ue,items:[{value:"am",label:Ie,isSelected:()=>!!K&&oe==="am",isFocused:()=>!!se&&oe==="am",ariaLabel:Ie},{value:"pm",label:te,isSelected:()=>!!K&&oe==="pm",isFocused:()=>!!se&&oe==="pm",ariaLabel:te}]}}default:throw new Error(`Unknown view: ${ve} found.`)}},[Z,K,a,r,ie.hours,ie.minutes,ie.seconds,Y.hoursClockNumberText,Y.minutesClockNumberText,Y.secondsClockNumberText,oe,ne,se,pe,ue]),xe=x.useMemo(()=>{if(!o)return ye;const ve=ye.filter(Ie=>Ie!=="meridiem");return ve.reverse(),ye.includes("meridiem")&&ve.push("meridiem"),ve},[o,ye]),Re=x.useMemo(()=>ye.reduce((ve,Ie)=>z({},ve,{[Ie]:Ee(Ie)}),{}),[ye,Ee]),{ownerState:he}=Ur(),Pe=ZQe(B);return k.jsx(eXe,z({ref:n,className:fe(Pe.root,N),ownerState:he,role:"group"},W,{children:xe.map(ve=>k.jsx(QQe,{items:Re[ve].items,onChange:Re[ve].onChange,active:Se===ve,autoFocus:l??le===ve,disabled:H,readOnly:j,slots:c,slotProps:u,skipDisabled:L,"aria-label":Y.selectViewText(ve)},ve))}))});function nXe(e){return qe("MuiPickersDay",e)}const xp=Ke("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function ice(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=e,c=xn(),{ownerState:u}=Ur();return x.useMemo(()=>z({},u,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:c.isSameDay(i,c.startOfWeek(i)),isDayEndOfWeek:c.isSameDay(i,c.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:s??!1,showDaysOutsideCurrentMonth:l??!1}),[c,u,i,n,t,r,o,a,s,l])}const rXe=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],oXe=(e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=t,c=i&&!l;return Me({root:["root",n&&!c&&"selected",r&&"disabled",!a&&"dayWithMargin",!s&&o&&"today",i&&l&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},nXe,e)},ace=({theme:e})=>z({},e.typography.caption,{width:bS,height:bS,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${xp.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${xp.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${xp.disabled}:not(.${xp.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${xp.disabled}&.${xp.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${yP}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${xp.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),sce=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,!n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},iXe=ae(la,{name:"MuiPickersDay",slot:"Root",overridesResolver:sce})(ace),aXe=ae("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:sce})(({theme:e})=>z({},ace({theme:e}),{opacity:0,pointerEvents:"none"})),p0=()=>{},sXe=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,classes:a,isAnimating:s,onClick:l,onDaySelect:c,onFocus:u=p0,onBlur:f=p0,onKeyDown:h=p0,onMouseDown:m=p0,onMouseEnter:g=p0,children:y,day:v,selected:w,disabled:C,today:E,outsideCurrentMonth:I,disableMargin:O,disableHighlightToday:P,showDaysOutsideCurrentMonth:R}=r,D=$e(r,rXe),M=ice({day:v,selected:w,disabled:C,today:E,outsideCurrentMonth:I,disableMargin:O,disableHighlightToday:P,showDaysOutsideCurrentMonth:R}),A=oXe(a,M),_=xn(),N=x.useRef(null),B=en(N,n);In(()=>{o&&!C&&!s&&!I&&N.current.focus()},[o,C,s,I]);const H=L=>{m(L),I&&L.preventDefault()},j=L=>{C||c(v),I&&L.currentTarget.focus(),l&&l(L)};return I&&!R?k.jsx(aXe,{className:fe(A.root,A.hiddenDaySpacingFiller,i),ownerState:M,role:D.role}):k.jsx(iXe,z({className:fe(A.root,i),ref:B,centerRipple:!0,disabled:C,tabIndex:w?0:-1,onKeyDown:L=>h(L,v),onFocus:L=>u(L,v),onBlur:L=>f(L,v),onMouseEnter:L=>g(L,v),onClick:j,onMouseDown:H},D,{ownerState:M,children:y||_.format(v,"dayOfMonth")}))}),lXe=x.memo(sXe),zF=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],VF=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],lce=["minDateTime","maxDateTime"],cXe=[...zF,...VF,...lce],Mv=e=>cXe.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{}),uXe=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","unstableStartFieldRef","unstableEndFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator","autoFocus","focused"],cce=(e,t)=>x.useMemo(()=>{const n=z({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return uXe.forEach(o),t==="date"?zF.forEach(o):t==="time"?VF.forEach(o):t==="date-time"&&(zF.forEach(o),VF.forEach(o),lce.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),dXe=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the component.");return o},fXe=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},pXe=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},hXe=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=tce(e,a),c=oce(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",f=e.isValid(t);let h=f?e.formatByString(t,a):"",m=null;if(u)if(c)m=h===""?e.formatByString(i,a).length:h.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxLength' property on it's adapter`);m=l.maxLength,f&&(h=Xz(Jz(Oh(h,o),m),o))}return z({},l,{format:a,maxLength:m,value:h,placeholder:pXe(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},mXe=e=>{var m;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((g,y)=>y.length-g.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),f=g=>r.find(y=>y.start<=g&&y.end>=g);let h=0;for(;h<n.length;){const g=f(h),y=g!=null,v=(m=l.exec(n.slice(h)))==null?void 0:m[1];if(!y&&v!=null&&c.test(v)){let w=v;for(;w.length>0;){const C=u.exec(w)[1];w=w.slice(C.length),i.push(hXe(z({},e,{now:o,token:C,startSeparator:a}))),a=""}h+=v.length}else{const w=n[h];y&&(g==null?void 0:g.start)===h||(g==null?void 0:g.end)===h||(i.length===0?a+=w:(i[i.length-1].endSeparator+=w,i[i.length-1].isEndFormatSeparator=!0)),h+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},gXe=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),tX=e=>{let t=dXe(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=fXe(z({},e,{expandedFormat:t})),r=mXe(z({},e,{expandedFormat:t,escapedParts:n}));return gXe(z({},e,{sections:r}))},rV=()=>x.useContext(Wz),yXe=()=>{const e=x.useContext(Hle);if(e==null)throw new Error(["MUI X: The `usePickerActionsContext` can only be called in fields that are used as a slot of a Picker component"].join(`
-`));return e},eg=e=>e.saveQuery!=null,uce=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:o,setTempAndroidValueStr:i,updateSectionValue:a}})=>{const s=xn(),l=({keyPressed:f,sectionIndex:h},m,g)=>{const y=f.toLowerCase(),v=n.sections[h];if(n.characterQuery!=null&&(!g||g(n.characterQuery.value))&&n.characterQuery.sectionIndex===h){const C=`${n.characterQuery.value}${y}`,E=m(C,v);if(!eg(E))return o({sectionIndex:h,value:C,sectionType:v.type}),E}const w=m(y,v);return eg(w)&&!w.saveQuery?(o(null),null):(o({sectionIndex:h,value:y,sectionType:v.type}),eg(w)?null:w)},c=f=>{const h=(y,v,w)=>{const C=v.filter(E=>E.toLowerCase().startsWith(w));return C.length===0?{saveQuery:!1}:{sectionValue:C[0],shouldGoToNextSection:C.length===1}},m=(y,v,w,C)=>{const E=I=>nce(s,r,v.type,I);if(v.contentType==="letter")return h(v.format,E(v.format),y);if(w&&C!=null&&tce(s,w).contentType==="letter"){const I=E(w),O=h(w,I,y);return eg(O)?{saveQuery:!1}:z({},O,{sectionValue:C(O.sectionValue,I)})}return{saveQuery:!1}};return l(f,(y,v)=>{switch(v.type){case"month":{const w=C=>XQ(s,C,s.formats.month,v.format);return m(y,v,s.formats.month,w)}case"weekDay":{const w=(C,E)=>E.indexOf(C).toString();return m(y,v,s.formats.weekday,w)}case"meridiem":return m(y,v);default:return{saveQuery:!1}}})},u=f=>{const h=(g,y)=>{const v=Oh(g,e),w=Number(v),C=t[y.type]({currentDate:null,format:y.format,contentType:y.contentType});if(w>C.maximum)return{saveQuery:!1};if(w<C.minimum)return{saveQuery:!0};const E=w*10>C.maximum||v.length===C.maximum.toString().length;return{sectionValue:rce(s,w,C,e,y),shouldGoToNextSection:E}};return l(f,(g,y)=>{if(y.contentType==="digit"||y.contentType==="digit-with-letter")return h(g,y);if(y.type==="month"){oce(s,"digit","month","MM");const v=h(g,{type:y.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(eg(v))return v;const w=XQ(s,v.sectionValue,"MM",y.format);return z({},v,{sectionValue:w})}if(y.type==="weekDay"){const v=h(g,y);if(eg(v))return v;const w=bP(s,y.format)[Number(v.sectionValue)-1];return z({},v,{sectionValue:w})}return{saveQuery:!1}},g=>QQ(g,e))};return Je(f=>{const h=n.sections[f.sectionIndex],g=QQ(f.keyPressed,e)?u(z({},f,{keyPressed:Xz(f.keyPressed,e)})):c(f);if(g==null){i(null);return}a({section:h,newSectionValue:g.sectionValue,shouldGoToNextSection:g.shouldGoToNextSection})})},Rv=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l,minDate:c,maxDate:u}=e,f=r.utils.date(void 0,n);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,f)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,f)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(u&&r.utils.isAfterDay(t,u)):return"maxDate";default:return null}};Rv.valueManager=mo;const Rw=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,f=e.utils.date(void 0,n),h=Aw(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&h(o,t)):return"minTime";case!!(i&&h(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,f)):return"disableFuture";case!!(c&&e.utils.isBefore(t,f)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};Rw.valueManager=mo;const xP=({adapter:e,value:t,timezone:n,props:r})=>{const o=Rv({adapter:e,value:t,timezone:n,props:r});return o!==null?o:Rw({adapter:e,value:t,timezone:n,props:r})};xP.valueManager=mo;function dce(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Wh(),s=x.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);x.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=Je(f=>n({adapter:a,value:f,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const vXe=5e3,fce=e=>{var Re;const t=xn(),n=Ei(),r=Wh(),o=vr(),{manager:{validator:i,valueType:a,internal_valueManager:s,internal_fieldValueManager:l},internalPropsWithDefaults:c,internalPropsWithDefaults:{value:u,defaultValue:f,referenceDate:h,onChange:m,format:g,formatDensity:y="dense",selectedSections:v,onSelectedSectionsChange:w,shouldRespectLeadingZeros:C=!1,timezone:E,enableAccessibleFieldDOMStructure:I=!0},forwardedProps:{error:O}}=e,{value:P,handleValueChange:R,timezone:D}=qf({name:"a field component",timezone:E,value:u,defaultValue:f,referenceDate:h,onChange:m,valueManager:s}),M=x.useRef(P);x.useEffect(()=>{M.current=P},[P]);const{hasValidationError:A}=dce({props:c,validator:i,timezone:D,value:P,onError:c.onError}),_=x.useMemo(()=>O!==void 0?O:A,[A,O]),N=x.useMemo(()=>bQe(t),[t]),B=x.useMemo(()=>EQe(t,N,D),[t,N,D]),H=x.useCallback(he=>l.getSectionsFromValue(he,Pe=>tX({utils:t,localeText:n,localizedDigits:N,format:g,date:Pe,formatDensity:y,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:I,isRtl:o})),[l,g,n,N,o,C,t,y,I]),[j,L]=x.useState(()=>{const he=H(P),Pe={sections:he,lastExternalValue:P,lastSectionsDependencies:{format:g,isRtl:o,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},ve=gQe(he),Ie=s.getInitialReferenceValue({referenceDate:h,value:P,utils:t,props:c,granularity:ve,timezone:D});return z({},Pe,{referenceValue:Ie})}),[V,W]=ia({controlled:v,default:null,name:"useField",state:"selectedSections"}),K=he=>{W(he),w==null||w(he)},G=x.useMemo(()=>LF(V,j.sections),[V,j.sections]),q=G==="all"?0:G,Y=x.useMemo(()=>IQe(j.sections,o&&!I),[j.sections,o,I]),Z=x.useMemo(()=>j.sections.every(he=>he.value===""),[j.sections]),ie=he=>{const Pe={validationError:i({adapter:r,value:he,timezone:D,props:c})};R(he,Pe)},se=(he,Pe)=>{const ve=[...j.sections];return ve[he]=z({},ve[he],{value:Pe,modified:!0}),ve},ce=x.useRef(null),ye=ko(),Se=he=>{q!=null&&(ce.current={sectionIndex:q,value:he},ye.start(0,()=>{ce.current=null}))},ne=()=>{s.areValuesEqual(t,P,s.emptyValue)?L(he=>z({},he,{sections:he.sections.map(Pe=>z({},Pe,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(L(he=>z({},he,{characterQuery:null})),ie(s.emptyValue))},le=()=>{if(q==null)return;const he=j.sections[q];he.value!==""&&(Se(""),l.getDateFromSection(P,he)===null?L(Pe=>z({},Pe,{sections:se(q,""),tempValueStrAndroid:null,characterQuery:null})):(L(Pe=>z({},Pe,{characterQuery:null})),ie(l.updateDateInValue(P,he,null))))},de=he=>{const Pe=(Ie,te)=>{const Te=t.parse(Ie,g);if(!t.isValid(Te))return null;const De=tX({utils:t,localeText:n,localizedDigits:N,format:g,date:Te,formatDensity:y,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:I,isRtl:o});return ZQ(t,Te,De,te,!1)},ve=l.parseValueStr(he,j.referenceValue,Pe);ie(ve)},oe=ko(),ue=({section:he,newSectionValue:Pe,shouldGoToNextSection:ve})=>{ye.clear(),oe.clear();const Ie=l.getDateFromSection(P,he);ve&&q<j.sections.length-1&&K(q+1);const te=se(q,Pe),Te=l.getDateSectionsFromValue(te,he),De=SQe(t,Te,N);if(t.isValid(De)){const Ve=ZQ(t,De,Te,l.getDateFromSection(j.referenceValue,he),!0);return Ie==null&&oe.start(0,()=>{M.current===P&&L(We=>z({},We,{sections:l.clearDateSections(j.sections,he),tempValueStrAndroid:null}))}),ie(l.updateDateInValue(P,he,Ve))}return Te.every(Ve=>Ve.value!=="")?(Se(Pe),ie(l.updateDateInValue(P,he,De))):Ie!=null?(Se(Pe),ie(l.updateDateInValue(P,he,null))):L(Ve=>z({},Ve,{sections:te,tempValueStrAndroid:null}))},pe=he=>L(Pe=>z({},Pe,{tempValueStrAndroid:he})),Ee=Je(he=>{L(Pe=>z({},Pe,{characterQuery:he}))});if(P!==j.lastExternalValue){let he;ce.current!=null&&!t.isValid(l.getDateFromSection(P,j.sections[ce.current.sectionIndex]))?he=se(ce.current.sectionIndex,ce.current.value):he=H(P),L(Pe=>z({},Pe,{lastExternalValue:P,sections:he,sectionsDependencies:{format:g,isRtl:o,locale:t.locale},referenceValue:l.updateReferenceValue(t,P,Pe.referenceValue),tempValueStrAndroid:null}))}if(o!==j.lastSectionsDependencies.isRtl||g!==j.lastSectionsDependencies.format||t.locale!==j.lastSectionsDependencies.locale){const he=H(P);L(Pe=>z({},Pe,{lastSectionsDependencies:{format:g,isRtl:o,locale:t.locale},sections:he,tempValueStrAndroid:null,characterQuery:null}))}j.characterQuery!=null&&!_&&q==null&&Ee(null),j.characterQuery!=null&&((Re=j.sections[j.characterQuery.sectionIndex])==null?void 0:Re.type)!==j.characterQuery.sectionType&&Ee(null),x.useEffect(()=>{ce.current!=null&&(ce.current=null)});const xe=ko();return x.useEffect(()=>(j.characterQuery!=null&&xe.start(vXe,()=>Ee(null)),()=>{}),[j.characterQuery,Ee,xe]),x.useEffect(()=>{j.tempValueStrAndroid!=null&&q!=null&&le()},[j.sections]),{activeSectionIndex:q,areAllSectionsEmpty:Z,error:_,localizedDigits:N,parsedSelectedSections:G,sectionOrder:Y,sectionsValueBoundaries:B,state:j,timezone:D,value:P,clearValue:ne,clearActiveSection:le,setCharacterQuery:Ee,setSelectedSections:K,setTempAndroidValueStr:pe,updateSectionValue:ue,updateValueFromValueStr:de,getSectionsFromValue:H}};function pce(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,o=rV(),i=Vle(),a=en(n.unstableFieldRef,r?null:i==null?void 0:i.fieldRef),s=o==null?void 0:o.setValue,l=x.useCallback((u,f)=>s==null?void 0:s(u,{validationError:f.validationError,shouldClose:!1}),[s]),c=x.useMemo(()=>i!=null&&o!=null?z({value:o.value,onChange:l,timezone:o.timezone,disabled:o.disabled,readOnly:o.readOnly,autoFocus:o.autoFocus&&!o.open,focused:o.open?!0:void 0,format:o.fieldFormat,formatDensity:i.formatDensity,enableAccessibleFieldDOMStructure:i.enableAccessibleFieldDOMStructure,selectedSections:i.selectedSections,onSelectedSectionsChange:i.onSelectedSectionsChange,unstableFieldRef:a},n):n,[o,i,n,l,a]);return t(c)}function oV(e){const{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:o}}=e;if(!n.isReady())return;const i=document.getSelection();if(!i)return;if(r==null){i.rangeCount>0&&n.getRoot().contains(i.getRangeAt(0).startContainer)&&i.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(xi(document)))return;const a=new window.Range;let s;r==="all"?s=n.getRoot():o.sections[r].type==="empty"?s=n.getSectionContainer(r):s=n.getSectionContent(r),a.selectNodeContents(s),s.focus(),i.removeAllRanges(),i.addRange(a)}function hce(e){const t=xn(),{manager:{internal_fieldValueManager:n},internalPropsWithDefaults:{minutesStep:r,disabled:o,readOnly:i},stateResponse:{state:a,value:s,activeSectionIndex:l,parsedSelectedSections:c,sectionsValueBoundaries:u,localizedDigits:f,timezone:h,sectionOrder:m,clearValue:g,clearActiveSection:y,setSelectedSections:v,updateSectionValue:w}}=e;return Je(C=>{if(!o)switch(!0){case((C.ctrlKey||C.metaKey)&&String.fromCharCode(C.keyCode)==="A"&&!C.shiftKey&&!C.altKey):{C.preventDefault(),v("all");break}case C.key==="ArrowRight":{if(C.preventDefault(),c==null)v(m.startIndex);else if(c==="all")v(m.endIndex);else{const E=m.neighbors[c].rightIndex;E!==null&&v(E)}break}case C.key==="ArrowLeft":{if(C.preventDefault(),c==null)v(m.endIndex);else if(c==="all")v(m.startIndex);else{const E=m.neighbors[c].leftIndex;E!==null&&v(E)}break}case C.key==="Delete":{if(C.preventDefault(),i)break;c==null||c==="all"?g():y();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(C.key):{if(C.preventDefault(),i||l==null)break;c==="all"&&v(l);const E=a.sections[l],I=xXe(t,h,E,C.key,u,f,n.getDateFromSection(s,E),{minutesStep:r});w({section:E,newSectionValue:I,shouldGoToNextSection:!1});break}}})}function bXe(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}function xXe(e,t,n,r,o,i,a,s){const l=bXe(r),c=r==="Home",u=r==="End",f=n.value===""||c||u,h=()=>{const g=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),y=C=>rce(e,C,g,i,n),v=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let w;if(f){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?w=g.minimum:w=g.maximum}else w=parseInt(Oh(n.value,i),10)+l*v;return w%v!==0&&((l<0||c)&&(w+=v-(v+w)%v),(l>0||u)&&(w-=w%v)),w>g.maximum?y(g.minimum+(w-g.maximum-1)%(g.maximum-g.minimum+1)):w<g.minimum?y(g.maximum-(g.minimum-w-1)%(g.maximum-g.minimum+1)):y(w)},m=()=>{const g=nce(e,t,n.type,n.format);if(g.length===0)return n.value;if(f)return l>0||c?g[0]:g[g.length-1];const w=((g.indexOf(n.value)+l)%g.length+g.length)%g.length;return g[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?h():m()}function SXe(e){const{manager:t,focused:n,setFocused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:l,sectionOrder:c,state:u,clearValue:f,setCharacterQuery:h,setSelectedSections:m,updateValueFromValueStr:g},internalPropsWithDefaults:{disabled:y=!1,readOnly:v=!1}}=e,w=hce({manager:t,internalPropsWithDefaults:s,stateResponse:i}),C=ko(),E=Je(D=>{y||!o.isReady()||(r(!0),l==="all"?C.start(0,()=>{const M=document.getSelection().getRangeAt(0).startOffset;if(M===0){m(c.startIndex);return}let A=0,_=0;for(;_<M&&A<u.sections.length;){const N=u.sections[A];A+=1,_+=`${N.startSeparator}${N.value||N.placeholder}${N.endSeparator}`.length}m(A-1)}):n?o.getRoot().contains(D.target)||m(c.startIndex):(r(!0),m(c.startIndex)))}),I=Je(D=>{if(!o.isReady()||l!=="all")return;const A=D.target.textContent??"";o.getRoot().innerHTML=u.sections.map(_=>`${_.startSeparator}${_.value||_.placeholder}${_.endSeparator}`).join(""),oV({focused:n,domGetters:o,stateResponse:i}),A.length===0||A.charCodeAt(0)===10?(f(),m("all")):A.length>1?g(A):(l==="all"&&m(0),a({keyPressed:A,sectionIndex:0}))}),O=Je(D=>{if(v||l!=="all"){D.preventDefault();return}const M=D.clipboardData.getData("text");D.preventDefault(),h(null),g(M)}),P=Je(()=>{if(n||y||!o.isReady())return;const D=xi(document);r(!0),o.getSectionIndexFromDOMElement(D)!=null||m(c.startIndex)}),R=Je(()=>{setTimeout(()=>{if(!o.isReady())return;const D=xi(document);!o.getRoot().contains(D)&&(r(!1),m(null))})});return{onKeyDown:w,onBlur:R,onFocus:P,onClick:E,onPaste:O,onInput:I,contentEditable:l==="all",tabIndex:l===0?-1:0}}function wXe(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:o}}=e,i=Je(s=>{o(s.target.value)});return{value:x.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:i}}function CXe(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,r=Je(o=>i=>{n||i.isDefaultPrevented()||t(o)});return x.useCallback(o=>({"data-sectionindex":o,onClick:r(o)}),[r])}function EXe(e){const t=xn(),n=Ei(),r=bn(),{focused:o,domGetters:i,stateResponse:a,applyCharacterEditing:s,manager:{internal_fieldValueManager:l},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:u,state:f,value:h,clearActiveSection:m,setCharacterQuery:g,setSelectedSections:y,updateSectionValue:v,updateValueFromValueStr:w},internalPropsWithDefaults:{disabled:C=!1,readOnly:E=!1}}=e,I=c==="all",O=!I&&!C&&!E,P=Je(N=>{if(!i.isReady())return;const B=f.sections[N];i.getSectionContent(N).innerHTML=B.value||B.placeholder,oV({focused:o,domGetters:i,stateResponse:a})}),R=Je(N=>{if(!i.isReady())return;const B=N.target,H=B.textContent??"",j=i.getSectionIndexFromDOMElement(B),L=f.sections[j];if(E){P(j);return}if(H.length===0){if(L.value===""){P(j);return}const V=N.nativeEvent.inputType;if(V==="insertParagraph"||V==="insertLineBreak"){P(j);return}P(j),m();return}s({keyPressed:H,sectionIndex:j}),P(j)}),D=Je(N=>{N.preventDefault()}),M=Je(N=>{if(N.preventDefault(),E||C||typeof c!="number")return;const B=f.sections[c],H=N.clipboardData.getData("text"),j=/^[a-zA-Z]+$/.test(H),L=/^[0-9]+$/.test(H),V=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(H);B.contentType==="letter"&&j||B.contentType==="digit"&&L||B.contentType==="digit-with-letter"&&V?(g(null),v({section:B,newSectionValue:H,shouldGoToNextSection:!0})):!j&&!L&&(g(null),w(H))}),A=Je(N=>{N.preventDefault(),N.dataTransfer.dropEffect="none"}),_=Je(N=>()=>{C||y(N)});return x.useCallback((N,B)=>{const H=u[N.type]({currentDate:l.getDateFromSection(h,N),contentType:N.contentType,format:N.format});return{onInput:R,onPaste:M,onMouseUp:D,onDragOver:A,onFocus:_(B),"aria-labelledby":`${r}-${N.type}`,"aria-readonly":E,"aria-valuenow":OXe(N,t),"aria-valuemin":H.minimum,"aria-valuemax":H.maximum,"aria-valuetext":N.value?TXe(N,t):n.empty,"aria-label":n[N.type],"aria-disabled":C,tabIndex:I||B>0?-1:0,contentEditable:!I&&!C&&!E,role:"spinbutton",id:`${r}-${N.type}`,"data-range-position":N.dateName||void 0,spellCheck:O?!1:void 0,autoCapitalize:O?"off":void 0,autoCorrect:O?"off":void 0,children:N.value||N.placeholder,inputMode:N.contentType==="letter"?"text":"numeric"}},[u,r,I,C,E,O,n,t,R,M,D,A,_,l,h])}function TXe(e,t){if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}}function OXe(e,t){if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}}const IXe=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:o,internal_useOpenPickerButtonAriaLabel:i}}=e,{internalProps:a,forwardedProps:s}=cce(t,o),l=pce({manager:n,internalProps:a,skipContextFieldRefAssignment:r}),{sectionListRef:c,onBlur:u,onClick:f,onFocus:h,onInput:m,onPaste:g,onKeyDown:y,onClear:v,clearable:w}=s,{disabled:C=!1,readOnly:E=!1,autoFocus:I=!1,focused:O,unstableFieldRef:P}=l,R=x.useRef(null),D=en(c,R),M=x.useMemo(()=>({isReady:()=>R.current!=null,getRoot:()=>R.current.getRoot(),getSectionContainer:xe=>R.current.getSectionContainer(xe),getSectionContent:xe=>R.current.getSectionContent(xe),getSectionIndexFromDOMElement:xe=>R.current.getSectionIndexFromDOMElement(xe)}),[R]),A=fce({manager:n,internalPropsWithDefaults:l,forwardedProps:s}),{areAllSectionsEmpty:_,error:N,parsedSelectedSections:B,sectionOrder:H,state:j,value:L,clearValue:V,setSelectedSections:W}=A,K=uce({stateResponse:A}),G=i(L),[q,Y]=x.useState(!1);function Z(xe=0){if(C||!R.current||nX(R)!=null)return;const Re=LF(xe,j.sections);Y(!0),R.current.getSectionContent(Re).focus()}const ie=SXe({manager:n,internalPropsWithDefaults:l,stateResponse:A,applyCharacterEditing:K,focused:q,setFocused:Y,domGetters:M}),se=wXe({manager:n,stateResponse:A}),ce=CXe({stateResponse:A,internalPropsWithDefaults:l}),ye=EXe({manager:n,stateResponse:A,applyCharacterEditing:K,internalPropsWithDefaults:l,domGetters:M,focused:q}),Se=Je(xe=>{y==null||y(xe),ie.onKeyDown(xe)}),ne=Je(xe=>{u==null||u(xe),ie.onBlur(xe)}),le=Je(xe=>{h==null||h(xe),ie.onFocus(xe)}),de=Je(xe=>{xe.isDefaultPrevented()||(f==null||f(xe),ie.onClick(xe))}),oe=Je(xe=>{g==null||g(xe),ie.onPaste(xe)}),ue=Je(xe=>{m==null||m(xe),ie.onInput(xe)}),pe=Je((xe,...Re)=>{xe.preventDefault(),v==null||v(xe,...Re),V(),rX(R)?W(H.startIndex):Z(0)}),Ee=x.useMemo(()=>j.sections.map((xe,Re)=>{const he=ye(xe,Re);return{container:ce(Re),content:ye(xe,Re),before:{children:xe.startSeparator},after:{children:xe.endSeparator,"data-range-position":xe.isEndFormatSeparator?he["data-range-position"]:void 0}}}),[j.sections,ce,ye]);return x.useEffect(()=>{if(R.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:","","<DatePicker enableAccessibleFieldDOMStructure={false} slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
-`));I&&!C&&R.current&&R.current.getSectionContent(H.startIndex).focus()},[]),In(()=>{if(!(!q||!R.current)){if(B==="all")R.current.getRoot().focus();else if(typeof B=="number"){const xe=R.current.getSectionContent(B);xe&&xe.focus()}}},[B,q]),In(()=>{oV({focused:q,domGetters:M,stateResponse:A})}),x.useImperativeHandle(P,()=>({getSections:()=>j.sections,getActiveSectionIndex:()=>nX(R),setSelectedSections:xe=>{if(C||!R.current)return;const Re=LF(xe,j.sections);Y((Re==="all"?0:Re)!==null),W(xe)},focusField:Z,isFieldFocused:()=>rX(R)})),z({},s,ie,{onBlur:ne,onClick:de,onFocus:le,onInput:ue,onPaste:oe,onKeyDown:Se,onClear:pe},se,{error:N,clearable:!!(w&&!_&&!E&&!C),focused:O??q,sectionListRef:D,enableAccessibleFieldDOMStructure:!0,elements:Ee,areAllSectionsEmpty:_,disabled:C,readOnly:E,autoFocus:I,openPickerAriaLabel:G})};function nX(e){const t=xi(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function rX(e){const t=xi(document);return!!e.current&&e.current.getRoot().contains(t)}const wg=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),PXe=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const s=e[a],l=Zz(s,n?"input-rtl":"input-ltr",t),c=`${s.startSeparator}${l}${s.endSeparator}`,u=wg(c).length,f=c.length,h=wg(l),m=o+(h===""?0:l.indexOf(h[0]))+s.startSeparator.length,g=m+h.length;i.push(z({},s,{start:r,end:r+u,startInInput:m,endInInput:g})),r+=u,o+=f}return i},AXe=e=>{const t=vr(),n=ko(),r=ko(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:s,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:u}}=e,{internalProps:f,forwardedProps:h}=cce(o,s),m=pce({manager:i,internalProps:f,skipContextFieldRefAssignment:a}),{onFocus:g,onClick:y,onPaste:v,onBlur:w,onKeyDown:C,onClear:E,clearable:I,inputRef:O,placeholder:P}=h,{readOnly:R=!1,disabled:D=!1,autoFocus:M=!1,focused:A,unstableFieldRef:_}=m,N=x.useRef(null),B=en(O,N),H=fce({manager:i,internalPropsWithDefaults:m,forwardedProps:h}),{activeSectionIndex:j,areAllSectionsEmpty:L,error:V,localizedDigits:W,parsedSelectedSections:K,sectionOrder:G,state:q,value:Y,clearValue:Z,clearActiveSection:ie,setCharacterQuery:se,setSelectedSections:ce,setTempAndroidValueStr:ye,updateSectionValue:Se,updateValueFromValueStr:ne,getSectionsFromValue:le}=H,de=uce({stateResponse:H}),oe=u(Y),ue=x.useMemo(()=>PXe(q.sections,W,t),[q.sections,W,t]);function pe(){const Be=N.current.selectionStart??0;let et;Be<=ue[0].startInInput||Be>=ue[ue.length-1].endInInput?et=1:et=ue.findIndex(It=>It.startInInput-It.startSeparator.length>Be);const Le=et===-1?ue.length-1:et-1;ce(Le)}function Ee(Be=0){var et;xi(document)!==N.current&&((et=N.current)==null||et.focus(),ce(Be))}const xe=Je(Be=>{g==null||g(Be);const et=N.current;n.start(0,()=>{!et||et!==N.current||j==null&&(et.value.length&&Number(et.selectionEnd)-Number(et.selectionStart)===et.value.length?ce("all"):pe())})}),Re=Je((Be,...et)=>{Be.isDefaultPrevented()||(y==null||y(Be,...et),pe())}),he=Je(Be=>{if(v==null||v(Be),Be.preventDefault(),R||D)return;const et=Be.clipboardData.getData("text");if(typeof K=="number"){const Le=q.sections[K],It=/^[a-zA-Z]+$/.test(et),Lt=/^[0-9]+$/.test(et),nt=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(et);if(Le.contentType==="letter"&&It||Le.contentType==="digit"&&Lt||Le.contentType==="digit-with-letter"&&nt){se(null),Se({section:Le,newSectionValue:et,shouldGoToNextSection:!0});return}if(It||Lt)return}se(null),ne(et)}),Pe=Je(Be=>{w==null||w(Be),ce(null)}),ve=Je(Be=>{if(R)return;const et=Be.target.value;if(et===""){Z();return}const Le=Be.nativeEvent.data,It=Le&&Le.length>1,Lt=It?Le:et,nt=wg(Lt);if(K==="all"&&ce(j),j==null||It){ne(It?Le:nt);return}let lt;if(K==="all"&&nt.length===1)lt=nt;else{const vt=wg(c.getV6InputValueFromSections(ue,W,t));let bt=-1,vn=-1;for(let Bn=0;Bn<vt.length;Bn+=1)bt===-1&&vt[Bn]!==nt[Bn]&&(bt=Bn),vn===-1&&vt[vt.length-Bn-1]!==nt[nt.length-Bn-1]&&(vn=Bn);const kn=ue[j];if(bt<kn.start||vt.length-vn-1>kn.end)return;const nr=nt.length-vt.length+kn.end-wg(kn.endSeparator||"").length;lt=nt.slice(kn.start+wg(kn.startSeparator||"").length,nr)}if(lt.length===0){OQe()&&ye(Lt),ie();return}de({keyPressed:lt,sectionIndex:j})}),Ie=Je((Be,...et)=>{Be.preventDefault(),E==null||E(Be,...et),Z(),oX(N)?ce(G.startIndex):Ee(0)}),te=hce({manager:i,internalPropsWithDefaults:m,stateResponse:H}),Te=Je(Be=>{C==null||C(Be),te(Be)}),De=x.useMemo(()=>P!==void 0?P:c.getV6InputValueFromSections(le(l.emptyValue),W,t),[P,c,le,l.emptyValue,W,t]),Ve=x.useMemo(()=>q.tempValueStrAndroid??c.getV6InputValueFromSections(q.sections,W,t),[q.sections,c,q.tempValueStrAndroid,W,t]);x.useEffect(()=>{N.current&&N.current===xi(document)&&ce("all")},[]),In(()=>{function Be(){if(!N.current)return;if(K==null){N.current.scrollLeft&&(N.current.scrollLeft=0);return}if(N.current!==xi(document))return;const et=N.current.scrollTop;if(K==="all")N.current.select();else{const Le=ue[K],It=Le.type==="empty"?Le.startInInput-Le.startSeparator.length:Le.startInInput,Lt=Le.type==="empty"?Le.endInInput+Le.endSeparator.length:Le.endInInput;(It!==N.current.selectionStart||Lt!==N.current.selectionEnd)&&N.current===xi(document)&&N.current.setSelectionRange(It,Lt),r.start(0,()=>{N.current&&N.current===xi(document)&&N.current.selectionStart===N.current.selectionEnd&&(N.current.selectionStart!==It||N.current.selectionEnd!==Lt)&&Be()})}N.current.scrollTop=et}Be()});const We=x.useMemo(()=>j==null||q.sections[j].contentType==="letter"?"text":"numeric",[j,q.sections]),ut=!(N.current&&N.current===xi(document))&&L;return x.useImperativeHandle(_,()=>({getSections:()=>q.sections,getActiveSectionIndex:()=>{const Be=N.current.selectionStart??0,et=N.current.selectionEnd??0;if(Be===0&&et===0)return null;const Le=Be<=ue[0].startInInput?1:ue.findIndex(It=>It.startInInput-It.startSeparator.length>Be);return Le===-1?ue.length-1:Le-1},setSelectedSections:Be=>ce(Be),focusField:Ee,isFieldFocused:()=>oX(N)})),z({},h,{error:V,clearable:!!(I&&!L&&!R&&!D),onBlur:Pe,onClick:Re,onFocus:xe,onPaste:he,onKeyDown:Te,onClear:Ie,inputRef:B,enableAccessibleFieldDOMStructure:!1,placeholder:De,inputMode:We,autoComplete:"off",value:ut?"":Ve,onChange:ve,focused:A,disabled:D,readOnly:R,autoFocus:M,openPickerAriaLabel:oe})};function oX(e){return e.current===xi(document)}const iV=e=>{const t=Vle();return(e.props.enableAccessibleFieldDOMStructure??(t==null?void 0:t.enableAccessibleFieldDOMStructure)??!0?IXe:AXe)(e)};function MXe(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return x.useMemo(()=>({valueType:"date",validator:Rv,internal_valueManager:mo,internal_fieldValueManager:eV,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:DXe,internal_useOpenPickerButtonAriaLabel:RXe}),[t])}function RXe(e){const t=xn(),n=Ei();return x.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function DXe(e){const t=xn(),n=Dw(e);return x.useMemo(()=>z({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function Dw(e){const t=xn(),n=Fle();return x.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:hO(t,e.minDate,n.minDate),maxDate:hO(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}function kXe(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return x.useMemo(()=>({valueType:"time",validator:Rw,internal_valueManager:mo,internal_fieldValueManager:eV,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:$Xe,internal_useOpenPickerButtonAriaLabel:_Xe(n)}),[n,t])}function _Xe(e){return function(n){const r=xn(),o=Ei();return x.useMemo(()=>{const i=e??r.is12HourCycleInCurrentLocale()?"fullTime12h":"fullTime24h",a=r.isValid(n)?r.format(n,i):null;return o.openTimePickerDialogue(a)},[n,o,r])}}function $Xe(e){const t=xn(),n=mce(e),r=x.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return x.useMemo(()=>z({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function mce(e){return x.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}function NXe(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return x.useMemo(()=>({valueType:"date-time",validator:xP,internal_valueManager:mo,internal_fieldValueManager:eV,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:FXe,internal_useOpenPickerButtonAriaLabel:LXe}),[t])}function LXe(e){const t=xn(),n=Ei();return x.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function FXe(e){const t=xn(),n=gce(e),r=x.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return x.useMemo(()=>z({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function gce(e){const t=xn(),n=Fle();return x.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:hO(t,e.minDateTime??e.minDate,n.minDate),maxDate:hO(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}const jXe=e=>{const t=MXe(e);return iV({manager:t,props:e})};function aV(e){const{ownerState:t}=Ur(),n=vr();return x.useMemo(()=>z({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?"rtl":"ltr"}),[t,e.disabled,e.readOnly,e.required,n])}function BXe(e){return qe("MuiPickersTextField",e)}Ke("MuiPickersTextField",["root","focused","disabled","error","required"]);function zXe(e){return qe("MuiPickersInputBase",e)}const zg=Ke("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","activeBar"]);function VXe(e){return qe("MuiPickersSectionList",e)}const h0=Ke("MuiPickersSectionList",["root","section","sectionContent"]),HXe=["slots","slotProps","elements","sectionListRef","classes"],yce=ae("div",{name:"MuiPickersSectionList",slot:"Root"})({direction:"ltr /*! @noflip */",outline:"none"}),vce=ae("span",{name:"MuiPickersSectionList",slot:"Section"})({}),bce=ae("span",{name:"MuiPickersSectionList",slot:"SectionSeparator"})({whiteSpace:"pre"}),xce=ae("span",{name:"MuiPickersSectionList",slot:"SectionContent"})({outline:"none"}),UXe=e=>Me({root:["root"],section:["section"],sectionContent:["sectionContent"]},VXe,e);function GXe(e){const{slots:t,slotProps:n,element:r,classes:o}=e,{ownerState:i}=Ur(),a=(t==null?void 0:t.section)??vce,s=Dn({elementType:a,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:i}),l=(t==null?void 0:t.sectionContent)??xce,c=Dn({elementType:l,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:i}),u=(t==null?void 0:t.sectionSeparator)??bce,f=Dn({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:z({},i,{separatorPosition:"before"})}),h=Dn({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:z({},i,{separatorPosition:"after"})});return k.jsxs(a,z({},s,{children:[k.jsx(u,z({},f)),k.jsx(l,z({},c)),k.jsx(u,z({},h))]}))}const qXe=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s,classes:l}=r,c=$e(r,HXe),u=UXe(l),{ownerState:f}=Ur(),h=x.useRef(null),m=en(n,h),g=w=>{if(!h.current)throw new Error(`MUI X: Cannot call sectionListRef.${w} before the mount of the component.`);return h.current};x.useImperativeHandle(s,()=>({getRoot(){return g("getRoot")},getSectionContainer(w){return g("getSectionContainer").querySelector(`.${h0.section}[data-sectionindex="${w}"]`)},getSectionContent(w){return g("getSectionContent").querySelector(`.${h0.section}[data-sectionindex="${w}"] .${h0.sectionContent}`)},getSectionIndexFromDOMElement(w){const C=g("getSectionIndexFromDOMElement");if(w==null||!C.contains(w))return null;let E=null;return w.classList.contains(h0.section)?E=w:w.classList.contains(h0.sectionContent)&&(E=w.parentElement),E==null?null:Number(E.dataset.sectionindex)}}));const y=(o==null?void 0:o.root)??yce,v=Dn({elementType:y,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:m,suppressContentEditableWarning:!0},className:u.root,ownerState:f});return k.jsx(y,z({},v,{children:v.contentEditable?a.map(({content:w,before:C,after:E})=>`${C.children}${w.children}${E.children}`).join(""):k.jsx(x.Fragment,{children:a.map((w,C)=>k.jsx(GXe,{slots:o,slotProps:i,element:w,classes:u},C))})}))}),Sce=x.createContext(null),SP=()=>{const e=x.useContext(Sce);if(e==null)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join(`
-`));return e},WXe=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef","onFocus","onBlur","classes","ownerState"],KXe=e=>Math.round(e*1e5)/1e5,wP=ae("div",{name:"MuiPickersInputBase",slot:"Root"})(({theme:e})=>z({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${KXe(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),sV=ae(yce,{name:"MuiPickersInputBase",slot:"SectionsContainer"})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{fieldDirection:"rtl"},style:{textAlign:"right /*! @noflip */"}},{props:{inputSize:"small"},style:{paddingTop:1}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0},style:{color:"currentColor",opacity:0}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!1},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),YXe=ae(vce,{name:"MuiPickersInputBase",slot:"Section"})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),QXe=ae(xce,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),XXe=ae(bce,{name:"MuiPickersInputBase",slot:"Separator"})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),JXe=ae("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(z({},Ybe)),ZXe=ae("div",{name:"MuiPickersInputBase",slot:"ActiveBar"})(({theme:e,ownerState:t})=>({display:"none",position:"absolute",height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create(["width","left"],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:"block"},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),eJe=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:o,hasFieldError:i,inputSize:a,isInputInFullWidth:s,inputColor:l,hasStartAdornment:c,hasEndAdornment:u}=t,f={root:["root",n&&!r&&"focused",r&&"disabled",o&&"readOnly",i&&"error",s&&"fullWidth",`color${Oe(l)}`,a==="small"&&"inputSizeSmall",c&&"adornedStart",u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"],activeBar:["activeBar"]};return Me(f,zXe,e)};function iX(e,t,n,r){var o;if(e.content.id){const i=(o=t.current)==null?void 0:o.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(i)return Array.from(i).reduce((a,s)=>a+s.offsetWidth,0)}return 0}function tJe(e,t){var o,i,a,s,l;let n=0;if(((o=t.current)==null?void 0:o.getAttribute("data-active-range-position"))==="end")for(let c=e.length-1;c>=e.length/2;c-=1)n+=iX(e[c],t,c,"end");else for(let c=0;c<e.length/2;c+=1)n+=iX(e[c],t,c,"start");return{activeBarWidth:n,sectionOffsets:[((a=(i=t.current)==null?void 0:i.querySelector('[data-sectionindex="0"]'))==null?void 0:a.offsetLeft)||0,((l=(s=t.current)==null?void 0:s.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:l.offsetLeft)||0]}}const lV=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:f,slots:h,slotProps:m,contentEditable:g,tabIndex:y,onInput:v,onPaste:w,onKeyDown:C,name:E,readOnly:I,inputProps:O,inputRef:P,sectionListRef:R,onFocus:D,onBlur:M,classes:A,ownerState:_}=r,N=$e(r,WXe),B=SP(),H=x.useRef(null),j=x.useRef(null),L=x.useRef([]),V=en(n,H),W=en(O==null?void 0:O.ref,P),K=sl();if(!K)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const G=_??B,q=le=>{var de;(de=K.onFocus)==null||de.call(K,le),D==null||D(le)},Y=le=>{q(le)},Z=le=>{var de,oe;if(C==null||C(le),le.key==="Enter"&&!le.defaultMuiPrevented){if((de=H.current)!=null&&de.dataset.multiInput)return;const ue=(oe=H.current)==null?void 0:oe.closest("form"),pe=ue==null?void 0:ue.querySelector('[type="submit"]');if(!ue||!pe)return;le.preventDefault(),ue.requestSubmit(pe)}},ie=le=>{var de;(de=K.onBlur)==null||de.call(K,le),M==null||M(le)};x.useEffect(()=>{K&&K.setAdornedStart(!!u)},[K,u]),x.useEffect(()=>{K&&(i?K.onEmpty():K.onFilled())},[K,i]);const se=eJe(A,G),ce=(h==null?void 0:h.root)||wP,ye=Dn({elementType:ce,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:N,additionalProps:{"aria-invalid":K.error,ref:V},className:se.root,ownerState:G}),Se=(h==null?void 0:h.input)||sV,ne=o.some(le=>le.content["data-range-position"]!==void 0);return x.useEffect(()=>{if(!ne||!G.isPickerOpen)return;const{activeBarWidth:le,sectionOffsets:de}=tJe(o,H);L.current=[de[0],de[1]],j.current&&(j.current.style.width=`${le}px`)},[o,ne,G.isPickerOpen]),k.jsxs(ce,z({},ye,{children:[u,k.jsx(qXe,{sectionListRef:R,elements:o,contentEditable:g,tabIndex:y,className:se.sectionsContainer,onFocus:q,onBlur:ie,onInput:v,onPaste:w,onKeyDown:Z,slots:{root:Se,section:YXe,sectionContent:QXe,sectionSeparator:XXe},slotProps:{root:z({},m==null?void 0:m.input,{ownerState:G}),sectionContent:{className:zg.sectionContent},sectionSeparator:({separatorPosition:le})=>({className:le==="before"?zg.sectionBefore:zg.sectionAfter})}}),c,f?f(z({},K)):null,k.jsx(JXe,z({name:E,className:se.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:I,required:K.required,disabled:K.disabled,onFocus:Y},O,{ref:W})),ne&&k.jsx(ZXe,{className:se.activeBar,ref:j,ownerState:{sectionOffsets:L.current}})]}))});function nJe(e){return qe("MuiPickersOutlinedInput",e)}const bl=z({},zg,Ke("MuiPickersOutlinedInput",["root","notchedOutline","input"])),rJe=["children","className","label","notched","shrink"],oJe=ae("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline"})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),aX=ae("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),iJe=ae("legend",{shouldForwardProp:e=>Ca(e)&&e!=="notched"})(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function aJe(e){const{className:t,label:n,notched:r}=e,o=$e(e,rJe),i=SP();return k.jsx(oJe,z({"aria-hidden":!0,className:t},o,{ownerState:i,children:k.jsx(iJe,{ownerState:i,notched:r,children:n?k.jsx(aX,{children:n}):k.jsx(aX,{className:"notranslate",children:"​"})})}))}const sJe=["label","autoFocus","ownerState","classes","notched"],lJe=ae(wP,{name:"MuiPickersOutlinedInput",slot:"Root"})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${bl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${bl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${bl.focused} .${bl.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${bl.disabled}`]:{[`& .${bl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${bl.error} .${bl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{inputColor:n},style:{[`&.${bl.focused}:not(.${bl.error}) .${bl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),cJe=ae(sV,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer"})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),uJe=e=>{const n=Me({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},nJe,e);return z({},e,n)},wce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersOutlinedInput"}),{label:o,classes:i,notched:a}=r,s=$e(r,sJe),l=sl(),c=uJe(i);return k.jsx(lV,z({slots:{root:lJe,input:cJe},renderSuffix:u=>k.jsx(aJe,{shrink:!!(a||u.adornedStart||u.focused||u.filled),notched:!!(a||u.adornedStart||u.focused||u.filled),className:c.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?k.jsxs(x.Fragment,{children:[o," ","*"]}):o})},s,{label:o,classes:c,ref:n}))});wce.muiName="Input";function dJe(e){return qe("MuiPickersFilledInput",e)}const Sp=z({},zg,Ke("MuiPickersFilledInput",["root","underline","input"])),fJe=["label","autoFocus","disableUnderline","hiddenLabel","classes"],pJe=ae(wP,{name:"MuiPickersFilledInput",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Sp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Sp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{inputColor:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Sp.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Sp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Sp.disabled}, .${Sp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Sp.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),hJe=ae(sV,{name:"MuiPickersFilledInput",slot:"sectionsContainer",shouldForwardProp:e=>Ca(e)&&e!=="hiddenLabel"})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:"small"},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:"small"},style:{paddingTop:8,paddingBottom:9}}]}),mJe=(e,t)=>{const{inputHasUnderline:n}=t,o=Me({root:["root",n&&"underline"],input:["input"]},dJe,e);return z({},e,o)},Cce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,hiddenLabel:a=!1,classes:s}=r,l=$e(r,fJe),c=SP(),u=z({},c,{inputHasUnderline:!i}),f=mJe(s,u);return k.jsx(lV,z({slots:{root:pJe,input:hJe},slotProps:{root:{disableUnderline:i},input:{hiddenLabel:a}}},l,{label:o,classes:f,ref:n,ownerState:u}))});Cce.muiName="Input";function gJe(e){return qe("MuiPickersFilledInput",e)}const m0=z({},zg,Ke("MuiPickersInput",["root","underline","input"])),yJe=["label","autoFocus","disableUnderline","ownerState","classes"],vJe=ae(wP,{name:"MuiPickersInput",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="disableUnderline"})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{inputColor:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${m0.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${m0.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${m0.disabled}, .${m0.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${m0.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),bJe=(e,t)=>{const{inputHasUnderline:n}=t,o=Me({root:["root",!n&&"underline"],input:["input"]},gJe,e);return z({},e,o)},Ece=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,classes:a}=r,s=$e(r,yJe),l=SP(),c=z({},l,{inputHasUnderline:!i}),u=bJe(a,c);return k.jsx(lV,z({slots:{root:vJe},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});Ece.muiName="Input";const xJe=["onFocus","onBlur","className","classes","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps","data-active-range-position"],SJe={standard:Ece,filled:Cce,outlined:wce},wJe=ae(Fh,{name:"MuiPickersTextField",slot:"Root"})({}),CJe=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:o}=t;return Me({root:["root",n&&!r&&"focused",r&&"disabled",o&&"required"]},BXe,e)},Tce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,classes:s,color:l="primary",disabled:c=!1,error:u=!1,variant:f="outlined",required:h=!1,InputProps:m,inputProps:g,inputRef:y,sectionListRef:v,elements:w,areAllSectionsEmpty:C,onClick:E,onKeyDown:I,onKeyUp:O,onPaste:P,onInput:R,endAdornment:D,startAdornment:M,tabIndex:A,contentEditable:_,focused:N,value:B,onChange:H,fullWidth:j,id:L,name:V,helperText:W,FormHelperTextProps:K,label:G,InputLabelProps:q,"data-active-range-position":Y}=r,Z=$e(r,xJe),ie=x.useRef(null),se=en(n,ie),ce=bn(L),ye=W&&ce?`${ce}-helper-text`:void 0,Se=G&&ce?`${ce}-label`:void 0,ne=aV({disabled:r.disabled,required:r.required,readOnly:m==null?void 0:m.readOnly}),le=x.useMemo(()=>z({},ne,{isFieldValueEmpty:C,isFieldFocused:N??!1,hasFieldError:u??!1,inputSize:r.size??"medium",inputColor:l??"primary",isInputInFullWidth:j??!1,hasStartAdornment:!!(M??(m==null?void 0:m.startAdornment)),hasEndAdornment:!!(D??(m==null?void 0:m.endAdornment)),inputHasLabel:!!G}),[ne,C,N,u,r.size,l,j,M,D,m==null?void 0:m.startAdornment,m==null?void 0:m.endAdornment,G]),de=CJe(s,le),oe=SJe[f];return k.jsx(Sce.Provider,{value:le,children:k.jsxs(wJe,z({className:fe(de.root,a),ref:se,focused:N,disabled:c,variant:f,error:u,color:l,fullWidth:j,required:h,ownerState:le},Z,{children:[G!=null&&G!==""&&k.jsx(jh,z({htmlFor:ce,id:Se},q,{children:G})),k.jsx(oe,z({elements:w,areAllSectionsEmpty:C,onClick:E,onKeyDown:I,onKeyUp:O,onInput:R,onPaste:P,onFocus:o,onBlur:i,endAdornment:D,startAdornment:M,tabIndex:A,contentEditable:_,value:B,onChange:H,id:ce,fullWidth:j,inputProps:g,inputRef:y,sectionListRef:v,label:G,name:V,role:"group","aria-labelledby":Se,"aria-describedby":ye,"aria-live":ye?"polite":void 0,"data-active-range-position":Y},m)),W&&k.jsx(aw,z({id:ye},K,{children:W}))]}))})}),EJe=["enableAccessibleFieldDOMStructure"],TJe=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],OJe=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],IJe=["ownerState"],PJe=["ownerState"],AJe=["ownerState"],MJe=["ownerState"],RJe=["InputProps","inputProps"],DJe=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=$e(e,EJe);if(t){const{InputProps:v,readOnly:w,onClear:C,clearable:E,clearButtonPosition:I,openPickerButtonPosition:O,openPickerAriaLabel:P}=n,R=$e(n,TJe);return{clearable:E,onClear:C,clearButtonPosition:I,openPickerButtonPosition:O,openPickerAriaLabel:P,textFieldProps:z({},R,{InputProps:z({},v??{},{readOnly:w})})}}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c,onClear:u,clearable:f,clearButtonPosition:h,openPickerButtonPosition:m,openPickerAriaLabel:g}=n,y=$e(n,OJe);return{clearable:f,onClear:u,clearButtonPosition:h,openPickerButtonPosition:m,openPickerAriaLabel:g,textFieldProps:z({},y,{InputProps:z({},s??{},{readOnly:a}),inputProps:z({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})}},cV=x.createContext({slots:{},slotProps:{},inputRef:void 0});function uV(e){var K,G;const{slots:t,slotProps:n,fieldResponse:r,defaultOpenPickerIcon:o}=e,i=Ei(),a=rV(),s=x.useContext(cV),{textFieldProps:l,onClear:c,clearable:u,openPickerAriaLabel:f,clearButtonPosition:h="end",openPickerButtonPosition:m="end"}=DJe(r),g=aV(l),y=Je(q=>{q.preventDefault(),a==null||a.setOpen(Y=>!Y)}),v=a?a.triggerStatus:"hidden",w=u?h:null,C=v!=="hidden"?m:null,E=(t==null?void 0:t.textField)??s.slots.textField??(r.enableAccessibleFieldDOMStructure===!1?dn:Tce),I=(t==null?void 0:t.inputAdornment)??s.slots.inputAdornment??So,O=Dn({elementType:I,externalSlotProps:EE(s.slotProps.inputAdornment,n==null?void 0:n.inputAdornment),additionalProps:{position:"start"},ownerState:z({},g,{position:"start"})}),P=$e(O,IJe),R=Dn({elementType:I,externalSlotProps:n==null?void 0:n.inputAdornment,additionalProps:{position:"end"},ownerState:z({},g,{position:"end"})}),D=$e(R,PJe),M=s.slots.openPickerButton??pn,A=Dn({elementType:M,externalSlotProps:s.slotProps.openPickerButton,additionalProps:{disabled:v==="disabled",onClick:y,"aria-label":f,edge:l.variant!=="standard"?C:!1},ownerState:g}),_=$e(A,AJe),N=s.slots.openPickerIcon??o,B=Dn({elementType:N,externalSlotProps:s.slotProps.openPickerIcon,ownerState:g}),H=(t==null?void 0:t.clearButton)??s.slots.clearButton??pn,j=Dn({elementType:H,externalSlotProps:EE(s.slotProps.clearButton,n==null?void 0:n.clearButton),className:"clearButton",additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:c,disabled:r.disabled||r.readOnly,edge:l.variant!=="standard"&&w!==C?w:!1},ownerState:g}),L=$e(j,MJe),V=(t==null?void 0:t.clearIcon)??s.slots.clearIcon??EYe,W=Dn({elementType:V,externalSlotProps:EE(s.slotProps.clearIcon,n==null?void 0:n.clearIcon),additionalProps:{fontSize:"small"},ownerState:g});return l.ref=en(l.ref,a==null?void 0:a.rootRef),l.InputProps||(l.InputProps={}),a&&(l.InputProps.ref=a.triggerRef),!((K=l.InputProps)!=null&&K.startAdornment)&&(w==="start"||C==="start")&&(l.InputProps.startAdornment=k.jsxs(I,z({},P,{children:[C==="start"&&k.jsx(M,z({},_,{children:k.jsx(N,z({},B))})),w==="start"&&k.jsx(H,z({},L,{children:k.jsx(V,z({},W))}))]}))),!((G=l.InputProps)!=null&&G.endAdornment)&&(w==="end"||C==="end")&&(l.InputProps.endAdornment=k.jsxs(I,z({},D,{children:[w==="end"&&k.jsx(H,z({},L,{children:k.jsx(V,z({},W))})),C==="end"&&k.jsx(M,z({},_,{children:k.jsx(N,z({},B))}))]}))),w!=null&&(l.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(l.sx)?l.sx:[l.sx]]),k.jsx(E,z({},l))}function EE(e,t){return e?t?n=>z({},Dc(t,n),Dc(e,n)):e:t}function dV(e){const{ref:t,externalForwardedProps:n,slotProps:r}=e,o=x.useContext(cV),i=rV(),a=aV(n),{InputProps:s,inputProps:l}=n,c=$e(n,RJe),u=Dn({elementType:Tce,externalSlotProps:EE(o.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:c,additionalProps:{ref:t,sx:i==null?void 0:i.rootSx,label:i==null?void 0:i.label,name:i==null?void 0:i.name,className:i==null?void 0:i.rootClassName,inputRef:o.inputRef},ownerState:a});return u.inputProps=z({},l,u.inputProps),u.InputProps=z({},s,u.InputProps),u}function Oce(e){const{slots:t={},slotProps:n={},inputRef:r,children:o}=e,i=x.useMemo(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return k.jsx(cV.Provider,{value:i,children:o})}const kJe=["slots","slotProps"],Ice=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDateField"}),{slots:o,slotProps:i}=r,a=$e(r,kJe),s=dV({slotProps:i,ref:n,externalForwardedProps:a}),l=jXe(s);return k.jsx(uV,{slots:o,slotProps:i,fieldResponse:l,defaultOpenPickerIcon:jle})}),_Je=e=>{const t=kXe(e);return iV({manager:t,props:e})},$Je=["slots","slotProps","InputProps","inputProps"],Pce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i}=r,a=$e(r,$Je),s=dV({slotProps:i,ref:n,externalForwardedProps:a}),l=_Je(s);return k.jsx(uV,{slots:o,slotProps:i,fieldResponse:l,defaultOpenPickerIcon:SYe})}),NJe=e=>{const t=NXe(e);return iV({manager:t,props:e})},LJe=["slots","slotProps"],Ace=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i}=r,a=$e(r,LJe),s=dV({slotProps:i,ref:n,externalForwardedProps:a}),l=NJe(s);return k.jsx(uV,{slots:o,slotProps:i,fieldResponse:l,defaultOpenPickerIcon:jle})}),Mce=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Wh();return x.useCallback(c=>Rv({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},FJe=(e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return z({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const o=r.newTimezone;if(t.getTimezone(n.currentMonth)===o)return n;let i=t.setTimezone(n.currentMonth,o);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),z({},n,{currentMonth:i})}case"finishMonthSwitchingAnimation":return z({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},jJe=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:s,onYearChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:f,getCurrentMonthFromVisibleDate:h}=e,m=xn(),g=x.useRef(FJe(!!c,m)).current,y=x.useMemo(()=>mo.getInitialReferenceValue({value:t,utils:m,timezone:f,props:e,referenceDate:n,granularity:Rl.day}),[n,f]),[v,w]=x.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:y,currentMonth:m.startOfMonth(y),slideDirection:"left"}),C=Mce({shouldDisableDate:u,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:f});x.useEffect(()=>{w({type:"changeMonthTimezone",newTimezone:m.getTimezone(y)})},[y,m]);const E=Je(({target:O,reason:P})=>{if(P==="cell-interaction"&&v.focusedDay!=null&&m.isSameDay(O,v.focusedDay))return;const R=P==="cell-interaction";let D,M;if(P==="cell-interaction")D=h(O,v.currentMonth),M=O;else if(D=m.isSameMonth(O,v.currentMonth)?v.currentMonth:m.startOfMonth(O),M=O,C(M)){const N=m.startOfMonth(O),B=m.endOfMonth(O);M=SS({utils:m,date:M,minDate:m.isBefore(a,N)?N:a,maxDate:m.isAfter(i,B)?B:i,disablePast:o,disableFuture:r,isDateDisabled:C,timezone:f})}const A=!m.isSameMonth(v.currentMonth,D),_=!m.isSameYear(v.currentMonth,D);A&&(s==null||s(D)),_&&(l==null||l(m.startOfYear(D))),w({type:"setVisibleDate",month:D,direction:m.isAfterDay(D,v.currentMonth)?"left":"right",focusedDay:v.focusedDay!=null&&M!=null&&m.isSameDay(M,v.focusedDay)?v.focusedDay:M,skipAnimation:R})}),I=x.useCallback(()=>{w({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:y,calendarState:v,setVisibleDate:E,isDateDisabled:C,onMonthSwitchingAnimationEnd:I}},BJe=e=>qe("MuiPickersFadeTransitionGroup",e);Ke("MuiPickersFadeTransitionGroup",["root"]);const zJe=["children"],VJe=e=>Me({root:["root"]},BJe,e),HJe=ae(tw,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Rce(e){const t=Pn({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:r,transKey:o,classes:i}=t,{children:a}=t,s=$e(t,zJe),l=VJe(i),c=Lr();if(r)return a;const u=z({},s);return k.jsx(HJe,{className:fe(l.root,n),ownerState:u,children:k.jsx(hh,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},o)})}const UJe=e=>qe("MuiPickersSlideTransition",e),Ps=Ke("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),GJe=["children","className","reduceAnimations","slideDirection","transKey","classes"],qJe=(e,t)=>{const{slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Me(r,UJe,e)},WJe=ae(tw,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Ps["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Ps["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Ps.slideEnterActive}`]:t.slideEnterActive},{[`.${Ps.slideExit}`]:t.slideExit},{[`.${Ps["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Ps["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Ps["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Ps["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Ps.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Ps.slideExit}`]:{transform:"translate(0%)"},[`& .${Ps["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Ps["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function KJe(e){const t=Pn({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:s}=t,l=$e(t,GJe),{ownerState:c}=Ur(),u=z({},c,{slideDirection:i}),f=qJe(s,u),h=Lr();if(o)return k.jsx("div",{className:fe(f.root,r),children:n});const m={exit:f.exit,enterActive:f.enterActive,enter:f.enter,exitActive:f.exitActive};return k.jsx(WJe,{className:fe(f.root,r),childFactory:g=>x.cloneElement(g,{classNames:m}),role:"presentation",ownerState:u,children:k.jsx(Kj,z({mountOnEnter:!0,unmountOnExit:!0,timeout:h.transitions.duration.complex,classNames:m},l,{children:n}),a)})}const YJe=e=>qe("MuiDayCalendar",e);Ke("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const QJe=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],XJe=["ownerState"],JJe=e=>Me({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},YJe,e),Dce=(bS+yP*2)*6,ZJe=ae("div",{name:"MuiDayCalendar",slot:"Root"})({}),eZe=ae("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),tZe=ae(at,{name:"MuiDayCalendar",slot:"WeekDayLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),nZe=ae(at,{name:"MuiDayCalendar",slot:"WeekNumberLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),rZe=ae(at,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>z({},e.typography.caption,{width:bS,height:bS,padding:0,margin:`0 ${yP}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),oZe=ae("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Dce}),iZe=ae(KJe,{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:Dce}),aZe=ae("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),sZe=ae("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:`${yP}px 0`,display:"flex",justifyContent:"center"});function lZe(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=$e(e,QJe);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:h,slots:m,slotProps:g,timezone:y}=t,v=xn(),w=Kh(y),C=r!=null&&v.isSameDay(n,r),E=s&&C,I=o.some(H=>v.isSameDay(H,n)),O=v.isSameDay(n,w),P=x.useMemo(()=>c||i(n),[c,i,n]),R=x.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),D=ice({day:n,selected:I,disabled:P,today:O,outsideCurrentMonth:R,disableMargin:void 0,disableHighlightToday:u,showDaysOutsideCurrentMonth:h}),M=(m==null?void 0:m.day)??lXe,A=Dn({elementType:M,externalSlotProps:g==null?void 0:g.day,additionalProps:z({disableHighlightToday:u,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},l),ownerState:z({},D,{day:n,isDayDisabled:P,isDaySelected:I})}),_=$e(A,XJe),N=x.useMemo(()=>{const H=v.startOfMonth(v.setMonth(n,a));return h?v.isSameDay(n,v.startOfWeek(H)):v.isSameDay(n,H)},[a,n,h,v]),B=x.useMemo(()=>{const H=v.endOfMonth(v.setMonth(n,a));return h?v.isSameDay(n,v.endOfWeek(H)):v.isSameDay(n,H)},[a,n,h,v]);return k.jsx(M,z({},_,{day:n,disabled:P,autoFocus:!R&&E,today:O,outsideCurrentMonth:R,isFirstVisibleCell:N,isLastVisibleCell:B,selected:I,tabIndex:C?0:-1,"aria-selected":I,"aria-current":O?"date":void 0}))}function cZe(e){const t=Pn({props:e,name:"MuiDayCalendar"}),n=xn(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:s,focusedDay:l,loading:c,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:h,reduceAnimations:m,renderLoading:g=()=>k.jsx("span",{children:"..."}),slideDirection:y,TransitionProps:v,disablePast:w,disableFuture:C,minDate:E,maxDate:I,shouldDisableDate:O,shouldDisableMonth:P,shouldDisableYear:R,dayOfWeekFormatter:D=de=>n.format(de,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:A,gridLabelId:_,displayWeekNumber:N,fixedWeekNumber:B,timezone:H}=t,j=Kh(H),L=JJe(i),V=vr(),W=Mce({shouldDisableDate:O,shouldDisableMonth:P,shouldDisableYear:R,minDate:E,maxDate:I,disablePast:w,disableFuture:C,timezone:H}),K=Ei(),G=Je(de=>{h||u(de)}),q=de=>{W(de)||(r(de),A==null||A(!0))},Y=Je((de,oe)=>{switch(de.key){case"ArrowUp":q(n.addDays(oe,-7)),de.preventDefault();break;case"ArrowDown":q(n.addDays(oe,7)),de.preventDefault();break;case"ArrowLeft":{const ue=n.addDays(oe,V?1:-1),pe=n.addMonths(oe,V?1:-1),Ee=SS({utils:n,date:ue,minDate:V?ue:n.startOfMonth(pe),maxDate:V?n.endOfMonth(pe):ue,isDateDisabled:W,timezone:H});q(Ee||ue),de.preventDefault();break}case"ArrowRight":{const ue=n.addDays(oe,V?-1:1),pe=n.addMonths(oe,V?-1:1),Ee=SS({utils:n,date:ue,minDate:V?n.startOfMonth(pe):ue,maxDate:V?ue:n.endOfMonth(pe),isDateDisabled:W,timezone:H});q(Ee||ue),de.preventDefault();break}case"Home":q(n.startOfWeek(oe)),de.preventDefault();break;case"End":q(n.endOfWeek(oe)),de.preventDefault();break;case"PageUp":q(n.addMonths(oe,1)),de.preventDefault();break;case"PageDown":q(n.addMonths(oe,-1)),de.preventDefault();break}}),Z=Je((de,oe)=>q(oe)),ie=Je((de,oe)=>{l!=null&&n.isSameDay(l,oe)&&(A==null||A(!1))}),se=n.getMonth(a),ce=n.getYear(a),ye=x.useMemo(()=>s.filter(de=>!!de).map(de=>n.startOfDay(de)),[n,s]),Se=`${ce}-${se}`,ne=x.useMemo(()=>x.createRef(),[Se]),le=x.useMemo(()=>{const de=n.getWeekArray(a);let oe=n.addMonths(a,1);for(;B&&de.length<B;){const ue=n.getWeekArray(oe),pe=n.isSameDay(de[de.length-1][0],ue[0][0]);ue.slice(pe?1:0).forEach(Ee=>{de.length<B&&de.push(Ee)}),oe=n.addMonths(oe,1)}return de},[a,B,n]);return k.jsxs(ZJe,{role:"grid","aria-labelledby":_,className:L.root,children:[k.jsxs(eZe,{role:"row",className:L.header,children:[N&&k.jsx(nZe,{variant:"caption",role:"columnheader","aria-label":K.calendarWeekNumberHeaderLabel,className:L.weekNumberLabel,children:K.calendarWeekNumberHeaderText}),tQe(n,j).map((de,oe)=>k.jsx(tZe,{variant:"caption",role:"columnheader","aria-label":n.format(de,"weekday"),className:L.weekDayLabel,children:D(de)},oe.toString()))]}),c?k.jsx(oZe,{className:L.loadingContainer,children:g()}):k.jsx(iZe,z({transKey:Se,onExited:f,reduceAnimations:m,slideDirection:y,className:fe(o,L.slideTransition)},v,{nodeRef:ne,children:k.jsx(aZe,{ref:ne,role:"rowgroup",className:L.monthContainer,children:le.map((de,oe)=>k.jsxs(sZe,{role:"row",className:L.weekContainer,"aria-rowindex":oe+1,children:[N&&k.jsx(rZe,{className:L.weekNumber,role:"rowheader","aria-label":K.calendarWeekNumberAriaLabelText(n.getWeekNumber(de[0])),children:K.calendarWeekNumberText(n.getWeekNumber(de[0]))}),de.map((ue,pe)=>k.jsx(lZe,{parentProps:t,day:ue,selectedDays:ye,isViewFocused:M,focusedDay:l,onKeyDown:Y,onFocus:Z,onBlur:ie,onDaySelect:G,isDateDisabled:W,currentMonthNumber:se,"aria-colindex":pe+1},ue.toString()))]},`week-${de[0]}`))})}))]})}function kce(e){return qe("MuiMonthCalendar",e)}const W1=Ke("MuiMonthCalendar",["root","button","disabled","selected"]),uZe=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],dZe=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return Me(n,kce,e)},fZe=ae("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${W1.disabled}`]:t.disabled},{[`&.${W1.selected}`]:t.selected}]})(({theme:e})=>z({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${W1.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${W1.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),pZe=x.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:s,onKeyDown:l,onFocus:c,onBlur:u,slots:f,slotProps:h}=t,m=$e(t,uZe),g=x.useRef(null),{ownerState:y}=Ur(),v=z({},y,{isMonthDisabled:o,isMonthSelected:i}),w=dZe(r,v);In(()=>{var I;n&&((I=g.current)==null||I.focus())},[n]);const C=(f==null?void 0:f.monthButton)??fZe,E=Dn({elementType:C,externalSlotProps:h==null?void 0:h.monthButton,externalForwardedProps:m,additionalProps:{disabled:o,ref:g,type:"button",role:"radio","aria-checked":i,onClick:I=>s(I,a),onKeyDown:I=>l(I,a),onFocus:I=>c(I,a),onBlur:I=>u(I,a)},ownerState:v,className:w.button});return k.jsx(C,z({},E))}),hZe=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],mZe=e=>Me({root:["root"]},kce,e);function gZe(e,t){const n=Pn({props:e,name:t}),r=Dw(n);return z({},n,r,{monthsPerRow:n.monthsPerRow??3})}const yZe=ae("div",{name:"MuiMonthCalendar",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:zy,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),vZe=x.forwardRef(function(t,n){const r=gZe(t,"MuiMonthCalendar"),{autoFocus:o,className:i,classes:a,value:s,defaultValue:l,referenceDate:c,disabled:u,disableFuture:f,disablePast:h,maxDate:m,minDate:g,onChange:y,shouldDisableMonth:v,readOnly:w,onMonthFocus:C,hasFocus:E,onFocusedViewChange:I,monthsPerRow:O,timezone:P,gridLabelId:R,slots:D,slotProps:M}=r,A=$e(r,hZe),{value:_,handleValueChange:N,timezone:B}=qf({name:"MonthCalendar",timezone:P,value:s,defaultValue:l,referenceDate:c,onChange:y,valueManager:mo}),H=Kh(B),j=vr(),L=xn(),{ownerState:V}=Ur(),W=x.useMemo(()=>mo.getInitialReferenceValue({value:_,utils:L,props:r,timezone:B,referenceDate:c,granularity:Rl.month}),[]),K=mZe(a),G=x.useMemo(()=>L.getMonth(H),[L,H]),q=x.useMemo(()=>_!=null?L.getMonth(_):null,[_,L]),[Y,Z]=x.useState(()=>q||L.getMonth(W)),[ie,se]=ia({name:"MonthCalendar",state:"hasFocus",controlled:E,default:o??!1}),ce=Je(ue=>{se(ue),I&&I(ue)}),ye=x.useCallback(ue=>{const pe=L.startOfMonth(h&&L.isAfter(H,g)?H:g),Ee=L.startOfMonth(f&&L.isBefore(H,m)?H:m),xe=L.startOfMonth(ue);return L.isBefore(xe,pe)||L.isAfter(xe,Ee)?!0:v?v(xe):!1},[f,h,m,g,H,v,L]),Se=Je((ue,pe)=>{if(w)return;const Ee=L.setMonth(_??W,pe);N(Ee)}),ne=Je(ue=>{ye(L.setMonth(_??W,ue))||(Z(ue),ce(!0),C&&C(ue))});x.useEffect(()=>{Z(ue=>q!==null&&ue!==q?q:ue)},[q]);const le=Je((ue,pe)=>{switch(ue.key){case"ArrowUp":ne((12+pe-3)%12),ue.preventDefault();break;case"ArrowDown":ne((12+pe+3)%12),ue.preventDefault();break;case"ArrowLeft":ne((12+pe+(j?1:-1))%12),ue.preventDefault();break;case"ArrowRight":ne((12+pe+(j?-1:1))%12),ue.preventDefault();break}}),de=Je((ue,pe)=>{ne(pe)}),oe=Je((ue,pe)=>{Y===pe&&ce(!1)});return k.jsx(yZe,z({ref:n,className:fe(K.root,i),ownerState:V,role:"radiogroup","aria-labelledby":R,monthsPerRow:O},A,{children:Yz(L,_??W).map(ue=>{const pe=L.getMonth(ue),Ee=L.format(ue,"monthShort"),xe=L.format(ue,"month"),Re=pe===q,he=u||ye(ue);return k.jsx(pZe,{selected:Re,value:pe,onClick:Se,onKeyDown:le,autoFocus:ie&&pe===Y,disabled:he,tabIndex:pe===Y&&!he?0:-1,onFocus:de,onBlur:oe,"aria-current":G===pe?"date":void 0,"aria-label":xe,slots:D,slotProps:M,classes:a,children:Ee},Ee)})}))});function _ce(e){return qe("MuiYearCalendar",e)}const K1=Ke("MuiYearCalendar",["root","button","disabled","selected"]),bZe=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],xZe=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return Me(n,_ce,e)},SZe=ae("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${K1.disabled}`]:t.disabled},{[`&.${K1.selected}`]:t.selected}]})(({theme:e})=>z({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${K1.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${K1.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),wZe=x.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:s,onKeyDown:l,onFocus:c,onBlur:u,slots:f,slotProps:h}=t,m=$e(t,bZe),g=x.useRef(null),{ownerState:y}=Ur(),v=z({},y,{isYearDisabled:o,isYearSelected:i}),w=xZe(r,v);In(()=>{var I;n&&((I=g.current)==null||I.focus())},[n]);const C=(f==null?void 0:f.yearButton)??SZe,E=Dn({elementType:C,externalSlotProps:h==null?void 0:h.yearButton,externalForwardedProps:m,additionalProps:{disabled:o,ref:g,type:"button",role:"radio","aria-checked":i,onClick:I=>s(I,a),onKeyDown:I=>l(I,a),onFocus:I=>c(I,a),onBlur:I=>u(I,a)},ownerState:v,className:w.button});return k.jsx(C,z({},E))}),CZe=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],EZe=e=>Me({root:["root"]},_ce,e);function TZe(e,t){const n=Pn({props:e,name:t}),r=Dw(n);return z({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const OZe=ae("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:zy,maxHeight:jYe,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),IZe=ae("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),PZe=x.forwardRef(function(t,n){const r=TZe(t,"MuiYearCalendar"),{autoFocus:o,className:i,classes:a,value:s,defaultValue:l,referenceDate:c,disabled:u,disableFuture:f,disablePast:h,maxDate:m,minDate:g,onChange:y,readOnly:v,shouldDisableYear:w,onYearFocus:C,hasFocus:E,onFocusedViewChange:I,yearsOrder:O,yearsPerRow:P,timezone:R,gridLabelId:D,slots:M,slotProps:A}=r,_=$e(r,CZe),{value:N,handleValueChange:B,timezone:H}=qf({name:"YearCalendar",timezone:R,value:s,defaultValue:l,referenceDate:c,onChange:y,valueManager:mo}),j=Kh(H),L=vr(),V=xn(),{ownerState:W}=Ur(),K=x.useMemo(()=>mo.getInitialReferenceValue({value:N,utils:V,props:r,timezone:H,referenceDate:c,granularity:Rl.year}),[]),G=EZe(a),q=x.useMemo(()=>V.getYear(j),[V,j]),Y=x.useMemo(()=>N!=null?V.getYear(N):null,[N,V]),[Z,ie]=x.useState(()=>Y||V.getYear(K)),[se,ce]=ia({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),ye=Je(ve=>{ce(ve),I&&I(ve)}),Se=x.useCallback(ve=>{if(h&&V.isBeforeYear(ve,j)||f&&V.isAfterYear(ve,j)||g&&V.isBeforeYear(ve,g)||m&&V.isAfterYear(ve,m))return!0;if(!w)return!1;const Ie=V.startOfYear(ve);return w(Ie)},[f,h,m,g,j,w,V]),ne=Je((ve,Ie)=>{if(v)return;const te=V.setYear(N??K,Ie);B(te)}),le=Je(ve=>{Se(V.setYear(N??K,ve))||(ie(ve),ye(!0),C==null||C(ve))});x.useEffect(()=>{ie(ve=>Y!==null&&ve!==Y?Y:ve)},[Y]);const de=O!=="desc"?P*1:P*-1,oe=L&&O==="asc"||!L&&O==="desc"?-1:1,ue=Je((ve,Ie)=>{switch(ve.key){case"ArrowUp":le(Ie-de),ve.preventDefault();break;case"ArrowDown":le(Ie+de),ve.preventDefault();break;case"ArrowLeft":le(Ie-oe),ve.preventDefault();break;case"ArrowRight":le(Ie+oe),ve.preventDefault();break}}),pe=Je((ve,Ie)=>{le(Ie)}),Ee=Je((ve,Ie)=>{Z===Ie&&ye(!1)}),xe=x.useRef(null),Re=en(n,xe);x.useEffect(()=>{if(o||xe.current===null)return;const ve=xe.current.querySelector('[tabindex="0"]');if(!ve)return;const Ie=ve.offsetHeight,te=ve.offsetTop,Te=xe.current.clientHeight,De=xe.current.scrollTop,Ve=te+Ie;Ie>Te||te<De||(xe.current.scrollTop=Ve-Te/2-Ie/2)},[o]);const he=V.getYearRange([g,m]);O==="desc"&&he.reverse();let Pe=P-he.length%P;return Pe===P&&(Pe=0),k.jsxs(OZe,z({ref:Re,className:fe(G.root,i),ownerState:W,role:"radiogroup","aria-labelledby":D,yearsPerRow:P},_,{children:[he.map(ve=>{const Ie=V.getYear(ve),te=Ie===Y,Te=u||Se(ve);return k.jsx(wZe,{selected:te,value:Ie,onClick:ne,onKeyDown:ue,autoFocus:se&&Ie===Z,disabled:Te,tabIndex:Ie===Z&&!Te?0:-1,onFocus:pe,onBlur:Ee,"aria-current":q===Ie?"date":void 0,slots:M,slotProps:A,classes:a,children:V.format(ve,"year")},V.format(ve,"year"))}),Array.from({length:Pe},(ve,Ie)=>k.jsx(IZe,{},Ie))]}))}),AZe=e=>qe("MuiPickersCalendarHeader",e),MZe=Ke("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),RZe=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],DZe=["ownerState"],kZe=e=>Me({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},AZe,e),_Ze=ae("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),$Ze=ae("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>z({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),NZe=ae("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),LZe=ae(pn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${MZe.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),FZe=ae(vYe,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),jZe=x.forwardRef(function(t,n){const r=Ei(),o=xn(),i=Pn({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:f,maxDate:h,minDate:m,onMonthChange:g,onViewChange:y,view:v,reduceAnimations:w,views:C,labelId:E,className:I,classes:O,timezone:P,format:R=`${o.formats.month} ${o.formats.year}`}=i,D=$e(i,RZe),{ownerState:M}=Ur(),A=kZe(O),_=(a==null?void 0:a.switchViewButton)??LZe,N=Dn({elementType:_,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(v)},ownerState:M,className:A.switchViewButton}),B=(a==null?void 0:a.switchViewIcon)??FZe,H=Dn({elementType:B,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:M,className:A.switchViewIcon}),j=$e(H,DZe),L=()=>g(o.addMonths(l,1)),V=()=>g(o.addMonths(l,-1)),W=LYe(l,{disableFuture:u,maxDate:h,timezone:P}),K=FYe(l,{disablePast:f,minDate:m,timezone:P}),G=()=>{if(!(C.length===1||!y||c))if(C.length===2)y(C.find(Y=>Y!==v)||C[0]);else{const Y=C.indexOf(v)!==0?0:1;y(C[Y])}};if(C.length===1&&C[0]==="year")return null;const q=o.formatByString(l,R);return k.jsxs(_Ze,z({},D,{ownerState:M,className:fe(A.root,I),ref:n,children:[k.jsxs($Ze,{role:"presentation",onClick:G,ownerState:M,"aria-live":"polite",className:A.labelContainer,children:[k.jsx(Rce,{reduceAnimations:w,transKey:q,children:k.jsx(NZe,{id:E,ownerState:M,className:A.label,children:q})}),C.length>1&&!c&&k.jsx(_,z({},N,{children:k.jsx(B,z({},j))}))]}),k.jsx(hh,{in:v==="day",appear:!w,enter:!w,children:k.jsx(qle,{slots:a,slotProps:s,onGoToPrevious:V,isPreviousDisabled:K,previousLabel:r.previousMonth,onGoToNext:L,isNextDisabled:W,nextLabel:r.nextMonth})})]}))}),BZe="@media (prefers-reduced-motion: reduce)",Vg=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),sX=Vg&&Vg[1]?parseInt(Vg[1],10):null,lX=Vg&&Vg[2]?parseInt(Vg[2],10):null,zZe=sX&&sX<10||lX&&lX<13||!1;function $ce(e){const t=Tf(BZe,{defaultMatches:!1});return e??(t||zZe)}const VZe=e=>qe("MuiDateCalendar",e);Ke("MuiDateCalendar",["root","viewTransitionContainer"]);const HZe=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],UZe=e=>Me({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},VZe,e);function GZe(e,t){const n=Pn({props:e,name:t}),r=$ce(n.reduceAnimations),o=Dw(n);return z({},n,o,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:r,renderLoading:n.renderLoading??(()=>k.jsx("span",{children:"..."}))})}const qZe=ae(vP,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:Vy}),WZe=ae(Rce,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),KZe=x.forwardRef(function(t,n){const r=xn(),{ownerState:o}=Ur(),i=bn(),a=GZe(t,"MuiDateCalendar"),{autoFocus:s,onViewChange:l,value:c,defaultValue:u,referenceDate:f,disableFuture:h,disablePast:m,onChange:g,onMonthChange:y,reduceAnimations:v,shouldDisableDate:w,shouldDisableMonth:C,shouldDisableYear:E,view:I,views:O,openTo:P,className:R,classes:D,disabled:M,readOnly:A,minDate:_,maxDate:N,disableHighlightToday:B,focusedView:H,onFocusedViewChange:j,showDaysOutsideCurrentMonth:L,fixedWeekNumber:V,dayOfWeekFormatter:W,slots:K,slotProps:G,loading:q,renderLoading:Y,displayWeekNumber:Z,yearsOrder:ie,yearsPerRow:se,monthsPerRow:ce,timezone:ye}=a,Se=$e(a,HZe),{value:ne,handleValueChange:le,timezone:de}=qf({name:"DateCalendar",timezone:ye,value:c,defaultValue:u,referenceDate:f,onChange:g,valueManager:mo}),{view:oe,setView:ue,focusedView:pe,setFocusedView:Ee,goToNextView:xe,setValueAndGoToNextView:Re}=Mw({view:I,views:O,openTo:P,onChange:le,onViewChange:l,autoFocus:s,focusedView:H,onFocusedViewChange:j}),{referenceDate:he,calendarState:Pe,setVisibleDate:ve,isDateDisabled:Ie,onMonthSwitchingAnimationEnd:te}=jJe({value:ne,referenceDate:f,reduceAnimations:v,onMonthChange:y,minDate:_,maxDate:N,shouldDisableDate:w,disablePast:m,disableFuture:h,timezone:de,getCurrentMonthFromVisibleDate:(bt,vn)=>r.isSameMonth(bt,vn)?vn:r.startOfMonth(bt)}),Te=M&&ne||_,De=M&&ne||N,Ve=`${i}-grid-label`,We=pe!==null,rt=(K==null?void 0:K.calendarHeader)??jZe,ut=Dn({elementType:rt,externalSlotProps:G==null?void 0:G.calendarHeader,additionalProps:{views:O,view:oe,currentMonth:Pe.currentMonth,onViewChange:ue,onMonthChange:bt=>ve({target:bt,reason:"header-navigation"}),minDate:Te,maxDate:De,disabled:M,disablePast:m,disableFuture:h,reduceAnimations:v,timezone:de,labelId:Ve},ownerState:o}),Be=Je(bt=>{const vn=r.startOfMonth(bt),kn=r.endOfMonth(bt),Rr=Ie(bt)?SS({utils:r,date:bt,minDate:r.isBefore(_,vn)?vn:_,maxDate:r.isAfter(N,kn)?kn:N,disablePast:m,disableFuture:h,isDateDisabled:Ie,timezone:de}):bt;Rr?(Re(Rr,"finish"),ve({target:Rr,reason:"cell-interaction"})):(xe(),ve({target:vn,reason:"cell-interaction"}))}),et=Je(bt=>{const vn=r.startOfYear(bt),kn=r.endOfYear(bt),Rr=Ie(bt)?SS({utils:r,date:bt,minDate:r.isBefore(_,vn)?vn:_,maxDate:r.isAfter(N,kn)?kn:N,disablePast:m,disableFuture:h,isDateDisabled:Ie,timezone:de}):bt;Rr?(Re(Rr,"finish"),ve({target:Rr,reason:"cell-interaction"})):(xe(),ve({target:vn,reason:"cell-interaction"}))}),Le=Je(bt=>le(bt&&pO(r,bt,ne??he),"finish",oe));x.useEffect(()=>{r.isValid(ne)&&ve({target:ne,reason:"controlled-value-change"})},[ne]);const It=UZe(D),Lt={disablePast:m,disableFuture:h,maxDate:N,minDate:_},nt={disableHighlightToday:B,readOnly:A,disabled:M,timezone:de,gridLabelId:Ve,slots:K,slotProps:G},lt=x.useRef(oe);x.useEffect(()=>{lt.current!==oe&&(pe===lt.current&&Ee(oe,!0),lt.current=oe)},[pe,Ee,oe]);const vt=x.useMemo(()=>[ne],[ne]);return k.jsxs(qZe,z({ref:n,className:fe(It.root,R),ownerState:o},Se,{children:[k.jsx(rt,z({},ut,{slots:K,slotProps:G})),k.jsx(WZe,{reduceAnimations:v,className:It.viewTransitionContainer,transKey:oe,ownerState:o,children:k.jsxs("div",{children:[oe==="year"&&k.jsx(PZe,z({},Lt,nt,{value:ne,onChange:et,shouldDisableYear:E,hasFocus:We,onFocusedViewChange:bt=>Ee("year",bt),yearsOrder:ie,yearsPerRow:se,referenceDate:he})),oe==="month"&&k.jsx(vZe,z({},Lt,nt,{hasFocus:We,className:R,value:ne,onChange:Be,shouldDisableMonth:C,onFocusedViewChange:bt=>Ee("month",bt),monthsPerRow:ce,referenceDate:he})),oe==="day"&&k.jsx(cZe,z({},Pe,Lt,nt,{onMonthSwitchingAnimationEnd:te,hasFocus:We,onFocusedDayChange:bt=>ve({target:bt,reason:"cell-interaction"}),reduceAnimations:v,selectedDays:vt,onSelectedDaysChange:Le,shouldDisableDate:w,shouldDisableMonth:C,shouldDisableYear:E,onFocusedViewChange:bt=>Ee("day",bt),showDaysOutsideCurrentMonth:L,fixedWeekNumber:V,dayOfWeekFormatter:W,displayWeekNumber:Z,loading:q,renderLoading:Y}))]})})]}))});function Nce(e){return qe("MuiPickersToolbar",e)}const YZe=Ke("MuiPickersToolbar",["root","title","content"]);function CP(){const{ownerState:e}=Ur(),t=vr();return x.useMemo(()=>z({},e,{toolbarDirection:t?"rtl":"ltr"}),[e,t])}const QZe=["children","className","classes","toolbarTitle","hidden","titleId","classes","landscapeDirection"],XZe=e=>Me({root:["root"],title:["title"],content:["content"]},Nce,e),JZe=ae("div",{name:"MuiPickersToolbar",slot:"Root"})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{pickerOrientation:"landscape"},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),ZZe=ae("div",{name:"MuiPickersToolbar",slot:"Content",shouldForwardProp:e=>Ca(e)&&e!=="landscapeDirection"})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{pickerOrientation:"landscape"},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{pickerOrientation:"landscape",landscapeDirection:"row"},style:{flexDirection:"row"}}]}),fV=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,classes:a,toolbarTitle:s,hidden:l,titleId:c,landscapeDirection:u}=r,f=$e(r,QZe),h=CP(),m=XZe(a);return l?null:k.jsxs(JZe,z({ref:n,className:fe(m.root,i),ownerState:h},f,{children:[k.jsx(at,{color:"text.secondary",variant:"overline",id:c,className:m.title,children:s}),k.jsx(ZZe,{className:m.content,ownerState:h,landscapeDirection:u,children:o})]}))});function eet(e){return qe("MuiDatePickerToolbar",e)}Ke("MuiDatePickerToolbar",["root","title"]);const tet=["toolbarFormat","toolbarPlaceholder","className","classes"],net=e=>Me({root:["root"],title:["title"]},eet,e),ret=ae(fV,{name:"MuiDatePickerToolbar",slot:"Root"})({}),oet=ae(at,{name:"MuiDatePickerToolbar",slot:"Title"})({variants:[{props:{pickerOrientation:"landscape"},style:{margin:"auto 16px auto auto"}}]}),iet=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDatePickerToolbar"}),{toolbarFormat:o,toolbarPlaceholder:i="––",className:a,classes:s}=r,l=$e(r,tet),c=xn(),{value:u,views:f,orientation:h}=qc(),m=Ei(),g=CP(),y=net(s),v=x.useMemo(()=>{if(!c.isValid(u))return i;const w=wS(c,{format:o,views:f},!0);return c.formatByString(u,w)},[u,o,i,c,f]);return k.jsx(ret,z({ref:n,toolbarTitle:m.datePickerToolbarTitle,className:fe(y.root,a)},l,{children:k.jsx(oet,{variant:"h4",align:h==="landscape"?"left":"center",ownerState:g,className:y.title,children:v})}))});function Lce(e,t){const n=Pn({props:e,name:t}),r=Dw(n),o=x.useMemo(()=>{var i;return((i=n.localeText)==null?void 0:i.toolbarTitle)==null?n.localeText:z({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle})},[n.localeText]);return z({},n,r,{localeText:o},Kz({views:n.views,openTo:n.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{slots:z({toolbar:iet},n.slots)})}function aet(e){return qe("MuiPickerPopper",e)}Ke("MuiPickerPopper",["root","paper"]);const set=["PaperComponent","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],cet=e=>Me({root:["root"],paper:["paper"]},aet,e),uet=ae(sv,{name:"MuiPickerPopper",slot:"Root"})(({theme:e})=>({zIndex:e.zIndex.modal})),det=ae(go,{name:"MuiPickerPopper",slot:"Paper"})({outline:0,transformOrigin:"top center",variants:[{props:({popperPlacement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function fet(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function pet(e,t){const n=x.useRef(!1),r=x.useRef(!1),o=x.useRef(null),i=x.useRef(!1);x.useEffect(()=>{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=Je(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=Mr(o.current);if(!o.current||"clientX"in l&&fet(l,u))return;if(n.current){n.current=!1;return}let f;l.composedPath?f=l.composedPath().indexOf(o.current)>-1:f=!u.documentElement.contains(l.target)||o.current.contains(l.target),!f&&!c&&t(l)}),s=()=>{r.current=!0};return x.useEffect(()=>{if(e){const l=Mr(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),x.useEffect(()=>{if(e){const l=Mr(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const het=x.forwardRef((e,t)=>{const{PaperComponent:n,ownerState:r,children:o,paperSlotProps:i,paperClasses:a,onPaperClick:s,onPaperTouchStart:l}=e,c=$e(e,set),u=Dn({elementType:n,externalSlotProps:i,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:a,ownerState:r});return k.jsx(n,z({},c,u,{onClick:f=>{var h;s(f),(h=u.onClick)==null||h.call(u,f)},onTouchStart:f=>{var h;l(f),(h=u.onTouchStart)==null||h.call(u,f)},ownerState:r,children:o}))});function met(e){const t=Pn({props:e,name:"MuiPickerPopper"}),{children:n,placement:r="bottom-start",slots:o,slotProps:i,classes:a}=t,{open:s,popupRef:l,reduceAnimations:c}=qc(),{dismissViews:u,getCurrentViewMode:f,onPopperExited:h,triggerElement:m,viewContainerRole:g}=Ur();x.useEffect(()=>{function V(W){s&&W.key==="Escape"&&u()}return document.addEventListener("keydown",V),()=>{document.removeEventListener("keydown",V)}},[u,s]);const y=x.useRef(null);x.useEffect(()=>{g==="tooltip"||f()==="field"||(s?y.current=xi(document):y.current&&y.current instanceof HTMLElement&&setTimeout(()=>{y.current instanceof HTMLElement&&y.current.focus()}))},[s,g,f]);const v=cet(a),{ownerState:w,rootRefObject:C}=Ur(),E=z({},w,{popperPlacement:r}),I=Je(()=>{g==="tooltip"?NQe(()=>{var V,W;(V=C.current)!=null&&V.contains(xi(document))||(W=l.current)!=null&&W.contains(xi(document))||u()}):u()}),[O,P,R]=pet(s,I),D=x.useRef(null),M=en(D,l),A=en(M,O),_=V=>{V.key==="Escape"&&(V.stopPropagation(),u())},N=(o==null?void 0:o.desktopTransition)??c?hh:mh,B=(o==null?void 0:o.desktopTrapFocus)??lB,H=(o==null?void 0:o.desktopPaper)??det,j=(o==null?void 0:o.popper)??uet,L=Dn({elementType:j,externalSlotProps:i==null?void 0:i.popper,additionalProps:{transition:!0,role:g??void 0,open:s,placement:r,anchorEl:m,onKeyDown:_},className:v.root,ownerState:E});return k.jsx(j,z({},L,{children:({TransitionProps:V})=>k.jsx(B,z({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:g==="tooltip",isEnabled:()=>!0},i==null?void 0:i.desktopTrapFocus,{children:k.jsx(N,z({},V,i==null?void 0:i.desktopTransition,{onExited:W=>{var K,G,q;h==null||h(),(G=(K=i==null?void 0:i.desktopTransition)==null?void 0:K.onExited)==null||G.call(K,W),(q=V==null?void 0:V.onExited)==null||q.call(V)},children:k.jsx(het,{PaperComponent:H,ownerState:E,ref:A,onPaperClick:P,onPaperTouchStart:R,paperClasses:v.paper,paperSlotProps:i==null?void 0:i.desktopPaper,children:n})}))}))}))}function cX(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}function get(e,t){const[n,r]=x.useState(cX);return In(()=>{const o=()=>{r(cX())};return window.addEventListener("orientationchange",o),()=>{window.removeEventListener("orientationchange",o)}},[]),ug(e,["hours","minutes","seconds"])?"portrait":t??n}function yet(e){const{props:t,valueManager:n,validator:r}=e,{value:o,defaultValue:i,onChange:a,referenceDate:s,timezone:l,onAccept:c,closeOnSelect:u,open:f,onOpen:h,onClose:m}=t,{current:g}=x.useRef(i),{current:y}=x.useRef(o!==void 0),{current:v}=x.useRef(f!==void 0),w=xn(),{timezone:C,value:E,handleValueChange:I}=qf({name:"a picker component",timezone:l,value:o,defaultValue:g,referenceDate:s,onChange:a,valueManager:n}),[O,P]=x.useState(()=>({open:!1,lastExternalValue:E,clockShallowValue:void 0,lastCommittedValue:E,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:R}=dce({props:t,validator:r,timezone:C,value:E,onError:t.onError}),D=Je(N=>{const B=typeof N=="function"?N(O.open):N;v||P(H=>z({},H,{open:B})),B&&h&&h(),B||m==null||m()}),M=Je((N,B)=>{const{changeImportance:H="accept",skipPublicationIfPristine:j=!1,validationError:L,shortcut:V,shouldClose:W=H==="accept"}=B??{};let K,G;!j&&!y&&!O.hasBeenModifiedSinceMount?(K=!0,G=H==="accept"):(K=!n.areValuesEqual(w,N,E),G=H==="accept"&&!n.areValuesEqual(w,N,O.lastCommittedValue)),P(Z=>z({},Z,{clockShallowValue:K?void 0:Z.clockShallowValue,lastCommittedValue:G?E:Z.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let q=null;const Y=()=>(q||(q={validationError:L??R(N)},V&&(q.shortcut=V)),q);K&&I(N,Y()),G&&c&&c(N,Y()),W&&D(!1)});E!==O.lastExternalValue&&P(N=>z({},N,{lastExternalValue:E,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));const A=Je((N,B="partial")=>{if(B==="shallow"){P(H=>z({},H,{clockShallowValue:N,hasBeenModifiedSinceMount:!0}));return}M(N,{changeImportance:B==="finish"&&u?"accept":"set"})});x.useEffect(()=>{if(v){if(f===void 0)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");P(N=>z({},N,{open:f}))}},[v,f]);const _=x.useMemo(()=>n.cleanValue(w,O.clockShallowValue===void 0?E:O.clockShallowValue),[w,n,O.clockShallowValue,E]);return{timezone:C,state:O,setValue:M,setValueFromView:A,setOpen:D,value:E,viewValue:_}}const vet=["className","sx"],Fce=({ref:e,props:t,valueManager:n,valueType:r,variant:o,validator:i,onPopperExited:a,autoFocusView:s,rendererInterceptor:l,localeText:c,viewContainerRole:u,getStepNavigation:f})=>{const{views:h,view:m,openTo:g,onViewChange:y,viewRenderers:v,reduceAnimations:w,orientation:C,disableOpenPicker:E,closeOnSelect:I,disabled:O,readOnly:P,formatDensity:R,enableAccessibleFieldDOMStructure:D,selectedSections:M,onSelectedSectionsChange:A,format:_,label:N,autoFocus:B,name:H}=t,{className:j,sx:L}=t,V=$e(t,vet),W=bn(),K=xn(),G=Wh(),q=$ce(w),Y=get(h,C),{current:Z}=x.useRef(g??null),[ie,se]=x.useState(null),ce=x.useRef(null),ye=x.useRef(null),Se=x.useRef(null),ne=en(e,Se),{timezone:le,state:de,setOpen:oe,setValue:ue,setValueFromView:pe,value:Ee,viewValue:xe}=yet({props:t,valueManager:n,validator:i}),{view:Re,setView:he,defaultView:Pe,focusedView:ve,setFocusedView:Ie,setValueAndGoToNextView:te,goToNextStep:Te,hasNextStep:De,hasSeveralSteps:Ve}=Mw({view:m,views:h,openTo:g,onChange:pe,onViewChange:y,autoFocus:s,getStepNavigation:f}),We=Je(()=>ue(n.emptyValue)),rt=Je(()=>ue(n.getTodayValue(K,le,r))),ut=Je(()=>ue(Ee)),Be=Je(()=>ue(de.lastCommittedValue,{skipPublicationIfPristine:!0})),et=Je(()=>{ue(Ee,{skipPublicationIfPristine:!0})}),{hasUIView:Le,viewModeLookup:It,timeViewsCount:Lt}=x.useMemo(()=>h.reduce((un,gt)=>{const kt=v[gt]==null?"field":"UI";return un.viewModeLookup[gt]=kt,kt==="UI"&&(un.hasUIView=!0,Th(gt)&&(un.timeViewsCount+=1)),un},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[v,h]),nt=It[Re],lt=Je(()=>nt),[vt,bt]=x.useState(nt==="UI"?Re:null);vt!==Re&&It[Re]==="UI"&&bt(Re),In(()=>{nt==="field"&&de.open&&(oe(!1),setTimeout(()=>{var un,gt;(un=ye==null?void 0:ye.current)==null||un.setSelectedSections(Re),(gt=ye==null?void 0:ye.current)==null||gt.focusField(Re)}))},[Re]),In(()=>{if(!de.open)return;let un=Re;nt==="field"&&vt!=null&&(un=vt),un!==Pe&&It[un]==="UI"&&It[Pe]==="UI"&&(un=Pe),un!==Re&&he(un),Ie(un,!0)},[de.open]);const vn=x.useMemo(()=>({isPickerValueEmpty:n.areValuesEqual(K,Ee,n.emptyValue),isPickerOpen:de.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:Y,pickerVariant:o}),[K,n,Ee,de.open,Y,o,t.disabled,t.readOnly]),kn=x.useMemo(()=>E||!Le?"hidden":O||P?"disabled":"enabled",[E,Le,O,P]),Rr=Je(Te),nr=x.useMemo(()=>I&&!Ve?[]:["cancel","nextOrAccept"],[I,Ve]),Bn=x.useMemo(()=>({setValue:ue,setOpen:oe,clearValue:We,setValueToToday:rt,acceptValueChanges:ut,cancelValueChanges:Be,setView:he,goToNextStep:Rr}),[ue,oe,We,rt,ut,Be,he,Rr]),yo=x.useMemo(()=>z({},Bn,{value:Ee,timezone:le,open:de.open,views:h,view:vt,initialView:Z,disabled:O??!1,readOnly:P??!1,autoFocus:B??!1,variant:o,orientation:Y,popupRef:ce,reduceAnimations:q,triggerRef:se,triggerStatus:kn,hasNextStep:De,fieldFormat:_??"",name:H,label:N,rootSx:L,rootRef:ne,rootClassName:j}),[Bn,Ee,ne,o,Y,q,O,P,_,j,H,N,L,kn,De,le,de.open,vt,h,Z,B]),To=x.useMemo(()=>({dismissViews:et,ownerState:vn,hasUIView:Le,getCurrentViewMode:lt,rootRefObject:Se,labelId:W,triggerElement:ie,viewContainerRole:u,defaultActionBarActions:nr,onPopperExited:a}),[et,vn,Le,lt,W,ie,u,nr,a]),oo=x.useMemo(()=>({formatDensity:R,enableAccessibleFieldDOMStructure:D,selectedSections:M,onSelectedSectionsChange:A,fieldRef:ye}),[R,D,M,A,ye]);return{providerProps:{localeText:c,contextValue:yo,privateContextValue:To,actionsContextValue:Bn,fieldPrivateContextValue:oo,isValidContextValue:un=>{const gt=i({adapter:G,value:un,timezone:le,props:t});return!n.hasError(gt)}},renderCurrentView:()=>{if(vt==null)return null;const un=v[vt];if(un==null)return null;const gt=z({},V,{views:h,timezone:le,value:xe,onChange:te,view:vt,onViewChange:he,showViewSwitcher:Lt>1,timeViewsCount:Lt},u==="tooltip"?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:ve,onFocusedViewChange:Ie});return l?k.jsx(l,{viewRenderers:v,popperView:vt,rendererProps:gt}):un(gt)},ownerState:vn}};function jce(e){return qe("MuiPickersLayout",e)}const Pl=Ke("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),bet=["actions"],xet=ae(Px,{name:"MuiPickersLayout",slot:"ActionBar"})({});function wet(e){const{actions:t}=e,n=$e(e,bet),r=Ei(),{clearValue:o,setValueToToday:i,acceptValueChanges:a,cancelValueChanges:s,goToNextStep:l,hasNextStep:c}=qc();if(t==null||t.length===0)return null;const u=t==null?void 0:t.map(f=>{switch(f){case"clear":return k.jsx(ct,{onClick:o,children:r.clearButtonLabel},f);case"cancel":return k.jsx(ct,{onClick:s,children:r.cancelButtonLabel},f);case"accept":return k.jsx(ct,{onClick:a,children:r.okButtonLabel},f);case"today":return k.jsx(ct,{onClick:i,children:r.todayButtonLabel},f);case"next":return k.jsx(ct,{onClick:l,children:r.nextStepButtonLabel},f);case"nextOrAccept":return c?k.jsx(ct,{onClick:l,children:r.nextStepButtonLabel},f):k.jsx(ct,{onClick:a,children:r.okButtonLabel},f);default:return null}});return k.jsx(xet,z({},n,{children:u}))}const Cet=x.memo(wet),Eet=["items","changeImportance"],Tet=["getValue"],Oet=ae(ai,{name:"MuiPickersLayout",slot:"Shortcuts"})({});function Iet(e){const{items:t,changeImportance:n="accept"}=e,r=$e(e,Eet),{setValue:o}=yXe(),i=OYe();if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=$e(s,Tet);const u=l({isValid:i});return z({},c,{label:c.label,onClick:()=>{o(u,{changeImportance:n,shortcut:c})},disabled:!i(u)})});return k.jsx(Oet,z({dense:!0,sx:[{maxHeight:Vy,maxWidth:200,overflow:"auto"},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:a.map(s=>k.jsx(Co,{children:k.jsx(Wl,z({},s))},s.id??s.label))}))}const Pet=["ownerState"];function Aet(e){return e.view!==null}const Met=(e,t)=>{const{pickerOrientation:n}=t;return Me({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},jce,e)},Bce=e=>{const{ownerState:t,defaultActionBarActions:n}=Ur(),{view:r}=qc(),o=vr(),{children:i,slots:a,slotProps:s,classes:l}=e,c=x.useMemo(()=>z({},t,{layoutDirection:o?"rtl":"ltr"}),[t,o]),u=Met(l,c),f=(a==null?void 0:a.actionBar)??Cet,h=Dn({elementType:f,externalSlotProps:s==null?void 0:s.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:c}),m=$e(h,Pet),g=k.jsx(f,z({},m)),y=a==null?void 0:a.toolbar,v=Dn({elementType:y,externalSlotProps:s==null?void 0:s.toolbar,className:u.toolbar,ownerState:c}),w=Aet(v)&&y?k.jsx(y,z({},v)):null,C=i,E=a==null?void 0:a.tabs,I=r&&E?k.jsx(E,z({className:u.tabs},s==null?void 0:s.tabs)):null,O=(a==null?void 0:a.shortcuts)??Iet,P=Dn({elementType:O,externalSlotProps:s==null?void 0:s.shortcuts,className:u.shortcuts,ownerState:c}),R=r&&O?k.jsx(O,z({},P)):null;return{toolbar:w,content:C,tabs:I,actionBar:g,shortcuts:R,ownerState:c}},Ret=(e,t)=>{const{pickerOrientation:n}=t;return Me({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"]},jce,e)},zce=ae("div",{name:"MuiPickersLayout",slot:"Root"})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Pl.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape"},style:{[`& .${Pl.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Pl.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{pickerOrientation:"landscape",layoutDirection:"rtl"},style:{[`& .${Pl.toolbar}`]:{gridColumn:3}}},{props:{pickerOrientation:"portrait"},style:{[`& .${Pl.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Pl.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{pickerOrientation:"portrait",layoutDirection:"rtl"},style:{[`& .${Pl.shortcuts}`]:{gridColumn:3}}}]}),Vce=ae("div",{name:"MuiPickersLayout",slot:"ContentWrapper"})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),Hce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l,ownerState:c}=Bce(r),{orientation:u,variant:f}=qc(),{sx:h,className:m,classes:g}=r,y=Ret(g,c);return k.jsxs(zce,{ref:n,sx:h,className:fe(y.root,m),ownerState:c,children:[u==="landscape"?l:o,u==="landscape"?o:l,k.jsx(Vce,{className:y.contentWrapper,ownerState:c,children:f==="desktop"?k.jsxs(x.Fragment,{children:[i,a]}):k.jsxs(x.Fragment,{children:[a,i]})}),s]})});function Uce(e){const{steps:t}=e;return NYe({steps:t,isViewMatchingStep:(n,r)=>r.views==null||r.views.includes(n),onStepChange:({step:n,defaultView:r,setView:o,view:i,views:a})=>{const s=n.views==null?r:n.views.find(l=>a.includes(l));s!==i&&o(s)}})}const Det=["props","steps"],ket=["ownerState"],pV=e=>{var P;let{props:t,steps:n}=e,r=$e(e,Det);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=Uce({steps:n}),{providerProps:u,renderCurrentView:f,ownerState:h}=Fce(z({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:c})),m=u.privateContextValue.labelId,g=((P=i==null?void 0:i.toolbar)==null?void 0:P.hidden)??!1,y=o.field,v=Dn({elementType:y,externalSlotProps:i==null?void 0:i.field,additionalProps:z({},g&&{id:m}),ownerState:h}),w=$e(v,ket),C=o.layout??Hce;let E=m;g&&(a?E=`${m}-label`:E=void 0);const I=z({},i,{toolbar:z({},i==null?void 0:i.toolbar,{titleId:m}),popper:z({"aria-labelledby":E},i==null?void 0:i.popper)});return{renderPicker:()=>k.jsx(Gle,z({},u,{children:k.jsxs(Oce,{slots:o,slotProps:I,inputRef:s,children:[k.jsx(y,z({},w)),k.jsx(met,{slots:o,slotProps:I,children:k.jsx(C,z({},I==null?void 0:I.layout,{slots:o,slotProps:I,children:f()}))})]})}))}},Qs=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minDate:m,maxDate:g,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:C,onMonthChange:E,monthsPerRow:I,onYearChange:O,yearsOrder:P,yearsPerRow:R,slots:D,slotProps:M,loading:A,renderLoading:_,disableHighlightToday:N,readOnly:B,disabled:H,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:L,sx:V,autoFocus:W,fixedWeekNumber:K,displayWeekNumber:G,timezone:q})=>k.jsx(KZe,{view:e,onViewChange:t,views:n.filter(Uy),focusedView:r&&Uy(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minDate:m,maxDate:g,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:C,onMonthChange:E,monthsPerRow:I,onYearChange:O,yearsOrder:P,yearsPerRow:R,slots:D,slotProps:M,loading:A,renderLoading:_,disableHighlightToday:N,readOnly:B,disabled:H,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:L,sx:V,autoFocus:W,fixedWeekNumber:K,displayWeekNumber:G,timezone:q}),Gce=x.forwardRef(function(t,n){var l;const r=xn(),o=Lce(t,"MuiDesktopDatePicker"),i=z({day:Qs,month:Qs,year:Qs},o.viewRenderers),a=z({},o,{closeOnSelect:o.closeOnSelect??!0,viewRenderers:i,format:wS(r,o,!1),yearsPerRow:o.yearsPerRow??4,slots:z({field:Ice},o.slots),slotProps:z({},o.slotProps,{field:c=>{var u;return z({},Dc((u=o.slotProps)==null?void 0:u.field,c),Mv(o))},toolbar:z({hidden:!0},(l=o.slotProps)==null?void 0:l.toolbar)})}),{renderPicker:s}=pV({ref:n,props:a,valueManager:mo,valueType:"date",validator:Rv,steps:null});return s()});Gce.propTypes={autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:rv,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,minDate:U.object,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","month","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["day","month","year"]),viewRenderers:U.shape({day:U.func,month:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","month","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const _et=ae(Ix)({[`& .${Q0.container}`]:{outline:0},[`& .${Q0.paper}`]:{outline:0,minWidth:zy}}),$et=ae(Ax)({"&:first-of-type":{padding:0}});function Net(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=qc(),{dismissViews:i}=Ur(),a=(n==null?void 0:n.dialog)??_et,s=(n==null?void 0:n.mobileTransition)??hh;return k.jsx(a,z({open:o,onClose:i},r==null?void 0:r.dialog,{TransitionComponent:s,TransitionProps:r==null?void 0:r.mobileTransition,PaperComponent:n==null?void 0:n.mobilePaper,PaperProps:r==null?void 0:r.mobilePaper,children:k.jsx($et,{children:t})}))}const Let=["props","steps"],Fet=["ownerState"],hV=e=>{var P;let{props:t,steps:n}=e,r=$e(e,Let);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=Uce({steps:n}),{providerProps:u,renderCurrentView:f,ownerState:h}=Fce(z({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),m=u.privateContextValue.labelId,g=((P=i==null?void 0:i.toolbar)==null?void 0:P.hidden)??!1,y=o.field,v=Dn({elementType:y,externalSlotProps:i==null?void 0:i.field,additionalProps:z({},g&&{id:m}),ownerState:h}),w=$e(v,Fet),C=o.layout??Hce;let E=m;g&&(a?E=`${m}-label`:E=void 0);const I=z({},i,{toolbar:z({},i==null?void 0:i.toolbar,{titleId:m}),mobilePaper:z({"aria-labelledby":E},i==null?void 0:i.mobilePaper)});return{renderPicker:()=>k.jsx(Gle,z({},u,{children:k.jsxs(Oce,{slots:o,slotProps:I,inputRef:s,children:[k.jsx(y,z({},w)),k.jsx(Net,{slots:o,slotProps:I,children:k.jsx(C,z({},I==null?void 0:I.layout,{slots:o,slotProps:I,children:f()}))})]})}))}},qce=x.forwardRef(function(t,n){var l;const r=xn(),o=Lce(t,"MuiMobileDatePicker"),i=z({day:Qs,month:Qs,year:Qs},o.viewRenderers),a=z({},o,{viewRenderers:i,format:wS(r,o,!1),slots:z({field:Ice},o.slots),slotProps:z({},o.slotProps,{field:c=>{var u;return z({},Dc((u=o.slotProps)==null?void 0:u.field,c),Mv(o))},toolbar:z({hidden:!1},(l=o.slotProps)==null?void 0:l.toolbar)})}),{renderPicker:s}=hV({ref:n,props:a,valueManager:mo,valueType:"date",validator:Rv,steps:null});return s()});qce.propTypes={autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:rv,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,minDate:U.object,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","month","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["day","month","year"]),viewRenderers:U.shape({day:U.func,month:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","month","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const jet=["desktopModeMediaQuery"],Ih=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=nV}=r,i=$e(r,jet);return Tf(o,{defaultMatches:!0})?k.jsx(Gce,z({ref:n},i)):k.jsx(qce,z({ref:n},i))});function Bet(e){return qe("MuiPickersToolbarText",e)}const zet=Ke("MuiPickersToolbarText",["root"]),Vet=["className","classes","selected","value"],Het=e=>Me({root:["root"]},Bet,e),Uet=ae(at,{name:"MuiPickersToolbarText",slot:"Root"})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),mV=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersToolbarText"}),{className:o,classes:i,selected:a,value:s}=r,l=$e(r,Vet),c=Het(i);return k.jsx(Uet,z({ref:n,className:fe(c.root,o),component:"span",ownerState:r},a&&{"data-selected":!0},l,{children:s}))}),Get=["align","className","classes","selected","typographyClassName","value","variant","width"],qet=e=>Me({root:["root"]},Nce,e),Wet=ae(ct,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),Ha=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,classes:a,selected:s,typographyClassName:l,value:c,variant:u,width:f}=r,h=$e(r,Get),m=qet(a);return k.jsx(Wet,z({variant:"text",ref:n,className:fe(m.root,i),ownerState:r},f?{sx:{width:f}}:{},h,{children:k.jsx(mV,{align:o,className:l,variant:u,value:c,selected:s})}))});function Ket(e){return qe("MuiTimePickerToolbar",e)}const ux=Ke("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Yet=["ampm","ampmInClock","className","classes"],Qet=(e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Me({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n==="landscape"&&"hourMinuteLabelLandscape",r==="rtl"&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n==="landscape"&&"ampmLandscape"],ampmLabel:["ampmLabel"]},Ket,e)},Xet=ae(fV,{name:"MuiTimePickerToolbar",slot:"Root"})({}),Jet=ae(mV,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Zet=ae("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${ux.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${ux.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{pickerOrientation:"landscape"},style:{marginTop:"auto"}}]}),ett=ae("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${ux.ampmLabel}`]:t.ampmLabel},{[`&.${ux.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${ux.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function ttt(e){const t=Pn({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,className:o,classes:i}=t,a=$e(t,Yet),s=xn(),l=Ei(),c=CP(),u=Qet(i,c),{value:f,setValue:h,disabled:m,readOnly:g,view:y,setView:v,views:w}=qc(),C=!!(n&&!r&&w.includes("hours")),{meridiemMode:E,handleMeridiemChange:I}=gP(f,n,R=>h(R,{changeImportance:"set"})),O=R=>s.isValid(f)?s.format(f,R):"--",P=k.jsx(Jet,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:u.separator});return k.jsxs(Xet,z({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:fe(u.root,o)},a,{children:[k.jsxs(Zet,{className:u.hourMinuteLabel,ownerState:c,children:[ug(w,"hours")&&k.jsx(Ha,{tabIndex:-1,variant:"h3",onClick:()=>v("hours"),selected:y==="hours",value:O(n?"hours12h":"hours24h")}),ug(w,["hours","minutes"])&&P,ug(w,"minutes")&&k.jsx(Ha,{tabIndex:-1,variant:"h3",onClick:()=>v("minutes"),selected:y==="minutes",value:O("minutes")}),ug(w,["minutes","seconds"])&&P,ug(w,"seconds")&&k.jsx(Ha,{variant:"h3",onClick:()=>v("seconds"),selected:y==="seconds",value:O("seconds")})]}),C&&k.jsxs(ett,{className:u.ampmSelection,ownerState:c,children:[k.jsx(Ha,{disableRipple:!0,variant:"subtitle2",selected:E==="am",typographyClassName:u.ampmLabel,value:_l(s,"am"),onClick:g?void 0:()=>I("am"),disabled:m}),k.jsx(Ha,{disableRipple:!0,variant:"subtitle2",selected:E==="pm",typographyClassName:u.ampmLabel,value:_l(s,"pm"),onClick:g?void 0:()=>I("pm"),disabled:m})]})]}))}function Wce(e,t){var s;const n=xn(),r=Pn({props:e,name:t}),o=mce(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=x.useMemo(()=>{var l;return((l=r.localeText)==null?void 0:l.toolbarTitle)==null?r.localeText:z({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return z({},r,o,{ampm:i,localeText:a},Kz({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:z({toolbar:ttt},r.slots),slotProps:z({},r.slotProps,{toolbar:z({ampm:i,ampmInClock:r.ampmInClock},(s=r.slotProps)==null?void 0:s.toolbar)})})}const X_=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,ampmInClock:C,slots:E,slotProps:I,readOnly:O,disabled:P,sx:R,autoFocus:D,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:A,timezone:_})=>k.jsx(_Qe,{view:e,onViewChange:t,focusedView:n&&Th(n)?n:null,onFocusedViewChange:r,views:o.filter(Th),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,ampmInClock:C,slots:E,slotProps:I,readOnly:O,disabled:P,sx:R,autoFocus:D,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:A,timezone:_}),gV=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeSteps:M,skipDisabled:A,timezone:_})=>k.jsx(HQe,{view:e,onViewChange:t,focusedView:n&&Th(n)?n:null,onFocusedViewChange:r,views:o.filter(Th),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeStep:M==null?void 0:M.minutes,skipDisabled:A,timezone:_}),Gy=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeSteps:M,skipDisabled:A,timezone:_})=>k.jsx(tXe,{view:e,onViewChange:t,focusedView:n&&Sg(n)?n:null,onFocusedViewChange:r,views:o.filter(Th),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:h,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeSteps:M,skipDisabled:A,timezone:_}),ntt=["views","format"],Kce=(e,t,n)=>{let{views:r,format:o}=t,i=$e(t,ntt);if(o)return o;const a=[],s=[];if(r.forEach(u=>{Th(u)?s.push(u):Uy(u)&&a.push(u)}),s.length===0)return wS(e,z({views:a},i),!1);if(a.length===0)return fO(e,z({views:s},i));const l=fO(e,z({views:s},i));return`${wS(e,z({views:a},i),!1)} ${l}`},rtt=(e,t,n)=>n?t.filter(r=>!Sg(r)||r==="hours"):e?[...t,"meridiem"]:t,ott=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function Yce({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=z({hours:1,minutes:5,seconds:5},n),a=ott(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:rtt(t,r,a)}}const Qce=x.forwardRef(function(t,n){var y,v;const r=xn(),o=Wce(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:i,views:a,timeSteps:s}=Yce(o),l=i?gV:Gy,c=z({hours:l,minutes:l,seconds:l,meridiem:l},o.viewRenderers),u=o.ampmInClock??!0,h=((y=c.hours)==null?void 0:y.name)===Gy.name?a:a.filter(w=>w!=="meridiem"),m=z({},o,{ampmInClock:u,timeSteps:s,viewRenderers:c,format:fO(r,o),views:i?["hours"]:h,slots:z({field:Pce},o.slots),slotProps:z({},o.slotProps,{field:w=>{var C;return z({},Dc((C=o.slotProps)==null?void 0:C.field,w),Mv(o))},toolbar:z({hidden:!0,ampmInClock:u},(v=o.slotProps)==null?void 0:v.toolbar)})}),{renderPicker:g}=pV({ref:n,props:m,valueManager:mo,valueType:"time",validator:Rw,steps:null});return g()});Qce.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,enableAccessibleFieldDOMStructure:U.any,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:rv,label:U.node,localeText:U.object,maxTime:U.object,minTime:U.object,minutesStep:U.number,name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,open:U.bool,openTo:U.oneOf(["hours","meridiem","minutes","seconds"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableTime:U.func,skipDisabled:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),thresholdToRenderTimeInASingleColumn:U.number,timeSteps:U.shape({hours:U.number,minutes:U.number,seconds:U.number}),timezone:U.string,value:U.object,view:U.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:U.shape({hours:U.func,meridiem:U.func,minutes:U.func,seconds:U.func}),views:U.arrayOf(U.oneOf(["hours","minutes","seconds"]).isRequired)};const Xce=x.forwardRef(function(t,n){var c;const r=xn(),o=Wce(t,"MuiMobileTimePicker"),i=z({hours:X_,minutes:X_,seconds:X_},o.viewRenderers),a=o.ampmInClock??!1,s=z({},o,{ampmInClock:a,viewRenderers:i,format:fO(r,o),slots:z({field:Pce},o.slots),slotProps:z({},o.slotProps,{field:u=>{var f;return z({},Dc((f=o.slotProps)==null?void 0:f.field,u),Mv(o))},toolbar:z({hidden:!1,ampmInClock:a},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=hV({ref:n,props:s,valueManager:mo,valueType:"time",validator:Rw,steps:null});return l()});Xce.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,enableAccessibleFieldDOMStructure:U.any,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:rv,label:U.node,localeText:U.object,maxTime:U.object,minTime:U.object,minutesStep:U.number,name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,open:U.bool,openTo:U.oneOf(["hours","minutes","seconds"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableTime:U.func,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["hours","minutes","seconds"]),viewRenderers:U.shape({hours:U.func,minutes:U.func,seconds:U.func}),views:U.arrayOf(U.oneOf(["hours","minutes","seconds"]).isRequired)};const itt=["desktopModeMediaQuery"],HF=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=nV}=r,i=$e(r,itt);return Tf(o,{defaultMatches:!0})?k.jsx(Qce,z({ref:n},i)):k.jsx(Xce,z({ref:n},i))});function att(e){return qe("MuiDateTimePickerTabs",e)}Ke("MuiDateTimePickerTabs",["root"]);const stt=e=>Uy(e)?"date":"time",ltt=e=>e==="date"?"day":"hours",ctt=e=>Me({root:["root"]},att,e),utt=ae(Fne,{name:"MuiDateTimePickerTabs",slot:"Root"})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${mE.indicator}`]:{bottom:"auto",top:0}}})),dtt=function(t){const n=Pn({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=k.jsx(wYe,{}),timeIcon:o=k.jsx(CYe,{}),hidden:i=typeof window>"u"||window.innerHeight<667,className:a,classes:s,sx:l}=n,c=Ei(),{ownerState:u}=Ur(),{view:f,setView:h}=qc(),m=ctt(s),g=(y,v)=>{h(ltt(v))};return i?null:k.jsxs(utt,{ownerState:u,variant:"fullWidth",value:stt(f),onChange:g,className:fe(a,m.root),sx:l,children:[k.jsx(DN,{value:"date","aria-label":c.dateTableLabel,icon:k.jsx(x.Fragment,{children:r})}),k.jsx(DN,{value:"time","aria-label":c.timeTableLabel,icon:k.jsx(x.Fragment,{children:o})})]})};function ftt(e){return qe("MuiDateTimePickerToolbar",e)}const J_=Ke("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),ptt=["ampm","ampmInClock","toolbarFormat","toolbarPlaceholder","toolbarTitle","className","classes"],htt=(e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Me({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r==="rtl"&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r==="rtl"&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n==="landscape"&&"ampmLandscape"],ampmLabel:["ampmLabel"]},ftt,e)},mtt=ae(fV,{name:"MuiDateTimePickerToolbar",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${YZe.content} .${zet.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",pickerOrientation:"landscape"},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{paddingLeft:24,paddingRight:0}}]})),gtt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer"})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),ytt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})({display:"flex",flexDirection:"row",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({pickerOrientation:e,toolbarVariant:t})=>e==="landscape"&&t!=="desktop",style:{flexDirection:"column"}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>e==="landscape"&&t!=="desktop"&&n==="rtl",style:{flexDirection:"column-reverse"}}]}),vtt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})({display:"flex",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),uX=ae(mV,{name:"MuiDateTimePickerToolbar",slot:"Separator",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),btt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${J_.ampmLabel}`]:t.ampmLabel},{[`&.${J_.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${J_.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]}),xtt=x.createContext(null);function Stt(e){const t=Pn({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,toolbarFormat:o,toolbarPlaceholder:i="––",toolbarTitle:a,className:s,classes:l}=t,c=$e(t,ptt),{value:u,setValue:f,disabled:h,readOnly:m,variant:g,orientation:y,view:v,setView:w,views:C}=qc(),E=Ei(),I=CP(),O=htt(l,I),P=xn(),R=x.useContext(xtt),D=R?R.value:u,M=R?R.setValue:f,A=R?R.view:v,_=R?R.setView:w,{meridiemMode:N,handleMeridiemChange:B}=gP(D,n,G=>M(G,{changeImportance:"set"})),H=R!=null&&R.forceDesktopVariant?"desktop":g,j=H==="desktop",L=!!(n&&!r),V=a??E.dateTimePickerToolbarTitle,W=x.useMemo(()=>P.isValid(D)?o?P.formatByString(D,o):P.format(D,"shortDate"):i,[D,o,i,P]),K=(G,q)=>P.isValid(D)?P.format(D,G):q;return k.jsxs(mtt,z({className:fe(O.root,s),toolbarTitle:V,toolbarVariant:H},c,{ownerState:I,children:[k.jsxs(gtt,{className:O.dateContainer,ownerState:I,children:[C.includes("year")&&k.jsx(Ha,{tabIndex:-1,variant:"subtitle1",onClick:()=>_("year"),selected:A==="year",value:K("year","–")}),C.includes("day")&&k.jsx(Ha,{tabIndex:-1,variant:j?"h5":"h4",onClick:()=>_("day"),selected:A==="day",value:W})]}),k.jsxs(ytt,{className:O.timeContainer,ownerState:I,toolbarVariant:H,children:[k.jsxs(vtt,{className:O.timeDigitsContainer,ownerState:I,toolbarVariant:H,children:[C.includes("hours")&&k.jsxs(x.Fragment,{children:[k.jsx(Ha,{variant:j?"h5":"h3",width:j&&y==="portrait"?z0:void 0,onClick:()=>_("hours"),selected:A==="hours",value:K(n?"hours12h":"hours24h","--")}),k.jsx(uX,{variant:j?"h5":"h3",value:":",className:O.separator,ownerState:I,toolbarVariant:H}),k.jsx(Ha,{variant:j?"h5":"h3",width:j&&y==="portrait"?z0:void 0,onClick:()=>_("minutes"),selected:A==="minutes"||!C.includes("minutes")&&A==="hours",value:K("minutes","--"),disabled:!C.includes("minutes")})]}),C.includes("seconds")&&k.jsxs(x.Fragment,{children:[k.jsx(uX,{variant:j?"h5":"h3",value:":",className:O.separator,ownerState:I,toolbarVariant:H}),k.jsx(Ha,{variant:j?"h5":"h3",width:j&&y==="portrait"?z0:void 0,onClick:()=>_("seconds"),selected:A==="seconds",value:K("seconds","--")})]})]}),L&&!j&&k.jsxs(btt,{className:O.ampmSelection,ownerState:I,children:[k.jsx(Ha,{variant:"subtitle2",selected:N==="am",typographyClassName:O.ampmLabel,value:_l(P,"am"),onClick:m?void 0:()=>B("am"),disabled:h}),k.jsx(Ha,{variant:"subtitle2",selected:N==="pm",typographyClassName:O.ampmLabel,value:_l(P,"pm"),onClick:m?void 0:()=>B("pm"),disabled:h})]}),n&&j&&k.jsx(Ha,{variant:"h5",onClick:()=>_("meridiem"),selected:A==="meridiem",value:D&&N?_l(P,N):"--",width:z0})]})]}))}function Jce(e,t){var m;const n=xn(),r=Pn({props:e,name:t}),o=gce(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=x.useMemo(()=>{var g;return((g=r.localeText)==null?void 0:g.toolbarTitle)==null?r.localeText:z({},r.localeText,{dateTimePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]),{openTo:s,views:l}=Kz({views:r.views,openTo:r.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:f,timeSteps:h}=Yce({thresholdToRenderTimeInASingleColumn:r.thresholdToRenderTimeInASingleColumn,ampm:i,timeSteps:r.timeSteps,views:l});return z({},r,o,{timeSteps:h,openTo:s,shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:f,ampm:i,localeText:a,orientation:r.orientation??"portrait",slots:z({toolbar:Stt,tabs:dtt},r.slots),slotProps:z({},r.slotProps,{toolbar:z({ampm:i},(m=r.slotProps)==null?void 0:m.toolbar)})})}const wtt=x.forwardRef(function(t,n){var g;const{toolbar:r,tabs:o,content:i,actionBar:a,shortcuts:s,ownerState:l}=Bce(t),{orientation:c}=qc(),{sx:u,className:f,classes:h}=t,m=a&&(((g=a.props.actions)==null?void 0:g.length)??0)>0;return k.jsxs(zce,{ref:n,className:fe(Pl.root,h==null?void 0:h.root,f),sx:[{[`& .${Pl.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${Pl.actionBar}`]:{gridRow:5}},...Array.isArray(u)?u:[u]],ownerState:l,children:[c==="landscape"?s:r,c==="landscape"?r:s,k.jsxs(Vce,{className:fe(Pl.contentWrapper,h==null?void 0:h.contentWrapper),ownerState:l,sx:{display:"grid"},children:[i,o,m&&k.jsx(ji,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),a]})}),Ctt=["openTo","focusedView","timeViewsCount"],Ett=function(t){var m,g;const{viewRenderers:n,popperView:r,rendererProps:o}=t,{openTo:i,focusedView:a,timeViewsCount:s}=o,l=$e(o,Ctt),c=z({},l,{focusedView:null,sx:[{[`&.${jF.root}`]:{borderBottom:0},[`&.${jF.root}, .${BF.root}, &.${FF.root}`]:{maxHeight:Vy}}]}),u=Sg(r),f=u?"day":r,h=u?r:"hours";return k.jsxs(x.Fragment,{children:[(m=n[f])==null?void 0:m.call(n,z({},o,{view:u?"day":r,focusedView:a&&Uy(a)?a:null,views:o.views.filter(Uy),sx:[{gridColumn:1},...c.sx]})),s>0&&k.jsxs(x.Fragment,{children:[k.jsx(ji,{orientation:"vertical",sx:{gridColumn:2}}),(g=n[h])==null?void 0:g.call(n,z({},c,{view:u?r:"hours",focusedView:a&&Sg(a)?a:null,openTo:Sg(i)?i:"hours",views:o.views.filter(Sg),sx:[{gridColumn:3},...c.sx]}))]})]})},Zce=x.forwardRef(function(t,n){var h,m,g;const r=xn(),o=Jce(t,"MuiDesktopDateTimePicker"),i=o.shouldRenderTimeInASingleColumn?gV:Gy,a=z({day:Qs,month:Qs,year:Qs,hours:i,minutes:i,seconds:i,meridiem:i},o.viewRenderers),s=o.ampmInClock??!0,c=((h=a.hours)==null?void 0:h.name)===Gy.name?o.views:o.views.filter(y=>y!=="meridiem"),u=z({},o,{viewRenderers:a,format:Kce(r,o),views:c,yearsPerRow:o.yearsPerRow??4,ampmInClock:s,slots:z({field:Ace,layout:wtt},o.slots),slotProps:z({},o.slotProps,{field:y=>{var v;return z({},Dc((v=o.slotProps)==null?void 0:v.field,y),Mv(o))},toolbar:z({hidden:!0,ampmInClock:s},(m=o.slotProps)==null?void 0:m.toolbar),tabs:z({hidden:!0},(g=o.slotProps)==null?void 0:g.tabs)})}),{renderPicker:f}=pV({ref:n,props:u,valueManager:mo,valueType:"date-time",validator:xP,rendererInterceptor:Ett,steps:null});return f()});Zce.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:rv,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,maxDateTime:U.object,maxTime:U.object,minDate:U.object,minDateTime:U.object,minTime:U.object,minutesStep:U.number,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableTime:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,skipDisabled:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),thresholdToRenderTimeInASingleColumn:U.number,timeSteps:U.shape({hours:U.number,minutes:U.number,seconds:U.number}),timezone:U.string,value:U.object,view:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:U.shape({day:U.func,hours:U.func,meridiem:U.func,minutes:U.func,month:U.func,seconds:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const Ttt=[{views:Jle},{views:Wle}],eue=x.forwardRef(function(t,n){var h,m,g,y,v,w;const r=xn(),o=Jce(t,"MuiMobileDateTimePicker"),i=o.shouldRenderTimeInASingleColumn?gV:Gy,a=z({day:Qs,month:Qs,year:Qs,hours:i,minutes:i,seconds:i,meridiem:i},o.viewRenderers),s=o.ampmInClock??!1,c=((h=a.hours)==null?void 0:h.name)===Gy.name?o.views:o.views.filter(C=>C!=="meridiem"),u=z({},o,{viewRenderers:a,format:Kce(r,o),views:c,ampmInClock:s,slots:z({field:Ace},o.slots),slotProps:z({},o.slotProps,{field:C=>{var E;return z({},Dc((E=o.slotProps)==null?void 0:E.field,C),Mv(o))},toolbar:z({hidden:!1,ampmInClock:s},(m=o.slotProps)==null?void 0:m.toolbar),tabs:z({hidden:!1},(g=o.slotProps)==null?void 0:g.tabs),layout:z({},(y=o.slotProps)==null?void 0:y.layout,{sx:LQe([{[`& .${jF.root}`]:{width:zy},[`& .${BF.root}`]:{flex:1,maxHeight:Vy-1,[`.${BF.item}`]:{width:"auto"}},[`& .${FF.root}`]:{width:zy,maxHeight:Vy,flex:1,[`.${FF.item}`]:{justifyContent:"center"}}}],(w=(v=o.slotProps)==null?void 0:v.layout)==null?void 0:w.sx)})})}),{renderPicker:f}=hV({ref:n,props:u,valueManager:mo,valueType:"date-time",validator:xP,steps:Ttt});return f()});eue.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:rv,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,maxDateTime:U.object,maxTime:U.object,minDate:U.object,minDateTime:U.object,minTime:U.object,minutesStep:U.number,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableTime:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,skipDisabled:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),thresholdToRenderTimeInASingleColumn:U.number,timeSteps:U.shape({hours:U.number,minutes:U.number,seconds:U.number}),timezone:U.string,value:U.object,view:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:U.shape({day:U.func,hours:U.func,meridiem:U.func,minutes:U.func,month:U.func,seconds:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const Ott=["desktopModeMediaQuery"],Itt=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=nV}=r,i=$e(r,Ott);return Tf(o,{defaultMatches:!0})?k.jsx(Zce,z({ref:n},i)):k.jsx(eue,z({ref:n},i))}),Ptt={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Att={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class zl{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=Ptt,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?xt.fromJSDate(new Date,{locale:this.locale,zone:o}):xt.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>xt.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals($0.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:xt.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:xt.expandFormat(l,{locale:this.locale}).replace(s,(f,h,m)=>{const g=h||m;return a.test(g)?f:`'${f}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r<o,this.isBeforeYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=z({},Att,n)}}const yV=Ot(k.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}));var Mtt=aae();const tue=Gn(Mtt);function vV({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=x.useState(!0),[i,a]=x.useState(n),[s,l]=x.useState(""),[c,u]=x.useState([]),[f,h]=je(),m=x.useMemo(()=>tue(g=>kNe(g,h.language,r).then(y=>u(y)),200),[h.language,r]);return x.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return m(s),()=>{m.cancel()}},[i,s,m]),Q(Ft,{children:[S(_c,{id:"ingredient-autocomplete",getOptionLabel:g=>g.value,"data-testid":"autocomplete",filterOptions:g=>g,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:f("noResults"),isOptionEqualToValue:(g,y)=>g.value===y.value,onChange:(g,y)=>{u(y?[y,...c]:c),a(y),e(y)},onInputChange:(g,y)=>{l(y)},renderInput:g=>S(dn,{...g,label:f("nutrition.searchIngredientName"),fullWidth:!0,slotProps:{input:{...g.InputProps,startAdornment:Q(Tt,{children:[S(So,{position:"start",children:S(yV,{})}),g.InputProps.startAdornment]})}}}),renderOption:(g,y)=>Sx("li",{...g,key:`ingredient-${y.data.id}`},Q(Co,{disablePadding:!0,component:"div",children:[S(nl,{children:S(Kl,{alt:"",src:`${wB}${y.data.image}`,variant:"rounded",children:S(Ju,{})})}),S(Wr,{primary:y.value,slotProps:{primary:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),h.language!==uy&&S(Mx,{children:S(os,{control:S(qo,{checked:r,onChange:(g,y)=>o(y)}),label:f("alsoSearchEnglish")})})]})}var Rtt=function(t){return Dtt(t)&&!ktt(t)};function Dtt(e){return!!e&&typeof e=="object"}function ktt(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ntt(e)}var _tt=typeof Symbol=="function"&&Symbol.for,$tt=_tt?Symbol.for("react.element"):60103;function Ntt(e){return e.$$typeof===$tt}function Ltt(e){return Array.isArray(e)?[]:{}}function gO(e,t){return t.clone!==!1&&t.isMergeableObject(e)?CS(Ltt(e),e,t):e}function Ftt(e,t,n){return e.concat(t).map(function(r){return gO(r,n)})}function jtt(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=gO(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=gO(t[o],n):r[o]=CS(e[o],t[o],n)}),r}function CS(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Ftt,n.isMergeableObject=n.isMergeableObject||Rtt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):jtt(e,t,n):gO(t,n)}CS.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return CS(r,o,n)},{})};var UF=CS,nue=typeof global=="object"&&global&&global.Object===Object&&global,Btt=typeof self=="object"&&self&&self.Object===Object&&self,Wc=nue||Btt||Function("return this")(),Mf=Wc.Symbol,rue=Object.prototype,ztt=rue.hasOwnProperty,Vtt=rue.toString,g0=Mf?Mf.toStringTag:void 0;function Htt(e){var t=ztt.call(e,g0),n=e[g0];try{e[g0]=void 0;var r=!0}catch{}var o=Vtt.call(e);return r&&(t?e[g0]=n:delete e[g0]),o}var Utt=Object.prototype,Gtt=Utt.toString;function qtt(e){return Gtt.call(e)}var Wtt="[object Null]",Ktt="[object Undefined]",dX=Mf?Mf.toStringTag:void 0;function Yh(e){return e==null?e===void 0?Ktt:Wtt:dX&&dX in Object(e)?Htt(e):qtt(e)}function oue(e,t){return function(n){return e(t(n))}}var bV=oue(Object.getPrototypeOf,Object);function Qh(e){return e!=null&&typeof e=="object"}var Ytt="[object Object]",Qtt=Function.prototype,Xtt=Object.prototype,iue=Qtt.toString,Jtt=Xtt.hasOwnProperty,Ztt=iue.call(Object);function fX(e){if(!Qh(e)||Yh(e)!=Ytt)return!1;var t=bV(e);if(t===null)return!0;var n=Jtt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&iue.call(n)==Ztt}function ent(){this.__data__=[],this.size=0}function aue(e,t){return e===t||e!==e&&t!==t}function EP(e,t){for(var n=e.length;n--;)if(aue(e[n][0],t))return n;return-1}var tnt=Array.prototype,nnt=tnt.splice;function rnt(e){var t=this.__data__,n=EP(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():nnt.call(t,n,1),--this.size,!0}function ont(e){var t=this.__data__,n=EP(t,e);return n<0?void 0:t[n][1]}function int(e){return EP(this.__data__,e)>-1}function ant(e,t){var n=this.__data__,r=EP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function od(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}od.prototype.clear=ent;od.prototype.delete=rnt;od.prototype.get=ont;od.prototype.has=int;od.prototype.set=ant;function snt(){this.__data__=new od,this.size=0}function lnt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cnt(e){return this.__data__.get(e)}function unt(e){return this.__data__.has(e)}function kw(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dnt="[object AsyncFunction]",fnt="[object Function]",pnt="[object GeneratorFunction]",hnt="[object Proxy]";function sue(e){if(!kw(e))return!1;var t=Yh(e);return t==fnt||t==pnt||t==dnt||t==hnt}var Z_=Wc["__core-js_shared__"],pX=function(){var e=/[^.]+$/.exec(Z_&&Z_.keys&&Z_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mnt(e){return!!pX&&pX in e}var gnt=Function.prototype,ynt=gnt.toString;function Xh(e){if(e!=null){try{return ynt.call(e)}catch{}try{return e+""}catch{}}return""}var vnt=/[\\^$.*+?()[\]{}|]/g,bnt=/^\[object .+?Constructor\]$/,xnt=Function.prototype,Snt=Object.prototype,wnt=xnt.toString,Cnt=Snt.hasOwnProperty,Ent=RegExp("^"+wnt.call(Cnt).replace(vnt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Tnt(e){if(!kw(e)||mnt(e))return!1;var t=sue(e)?Ent:bnt;return t.test(Xh(e))}function Ont(e,t){return e==null?void 0:e[t]}function Jh(e,t){var n=Ont(e,t);return Tnt(n)?n:void 0}var ES=Jh(Wc,"Map"),TS=Jh(Object,"create");function Int(){this.__data__=TS?TS(null):{},this.size=0}function Pnt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ant="__lodash_hash_undefined__",Mnt=Object.prototype,Rnt=Mnt.hasOwnProperty;function Dnt(e){var t=this.__data__;if(TS){var n=t[e];return n===Ant?void 0:n}return Rnt.call(t,e)?t[e]:void 0}var knt=Object.prototype,_nt=knt.hasOwnProperty;function $nt(e){var t=this.__data__;return TS?t[e]!==void 0:_nt.call(t,e)}var Nnt="__lodash_hash_undefined__";function Lnt(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=TS&&t===void 0?Nnt:t,this}function Ph(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ph.prototype.clear=Int;Ph.prototype.delete=Pnt;Ph.prototype.get=Dnt;Ph.prototype.has=$nt;Ph.prototype.set=Lnt;function Fnt(){this.size=0,this.__data__={hash:new Ph,map:new(ES||od),string:new Ph}}function jnt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function TP(e,t){var n=e.__data__;return jnt(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Bnt(e){var t=TP(this,e).delete(e);return this.size-=t?1:0,t}function znt(e){return TP(this,e).get(e)}function Vnt(e){return TP(this,e).has(e)}function Hnt(e,t){var n=TP(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Wf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wf.prototype.clear=Fnt;Wf.prototype.delete=Bnt;Wf.prototype.get=znt;Wf.prototype.has=Vnt;Wf.prototype.set=Hnt;var Unt=200;function Gnt(e,t){var n=this.__data__;if(n instanceof od){var r=n.__data__;if(!ES||r.length<Unt-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wf(r)}return n.set(e,t),this.size=n.size,this}function Dv(e){var t=this.__data__=new od(e);this.size=t.size}Dv.prototype.clear=snt;Dv.prototype.delete=lnt;Dv.prototype.get=cnt;Dv.prototype.has=unt;Dv.prototype.set=Gnt;function qnt(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var hX=function(){try{var e=Jh(Object,"defineProperty");return e({},"",{}),e}catch{}}();function lue(e,t,n){t=="__proto__"&&hX?hX(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Wnt=Object.prototype,Knt=Wnt.hasOwnProperty;function cue(e,t,n){var r=e[t];(!(Knt.call(e,t)&&aue(r,n))||n===void 0&&!(t in e))&&lue(e,t,n)}function OP(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=void 0;l===void 0&&(l=e[s]),o?lue(n,s,l):cue(n,s,l)}return n}function Ynt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Qnt="[object Arguments]";function mX(e){return Qh(e)&&Yh(e)==Qnt}var uue=Object.prototype,Xnt=uue.hasOwnProperty,Jnt=uue.propertyIsEnumerable,Znt=mX(function(){return arguments}())?mX:function(e){return Qh(e)&&Xnt.call(e,"callee")&&!Jnt.call(e,"callee")},_w=Array.isArray;function ert(){return!1}var due=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gX=due&&typeof module=="object"&&module&&!module.nodeType&&module,trt=gX&&gX.exports===due,yX=trt?Wc.Buffer:void 0,nrt=yX?yX.isBuffer:void 0,fue=nrt||ert,rrt=9007199254740991,ort=/^(?:0|[1-9]\d*)$/;function irt(e,t){var n=typeof e;return t=t??rrt,!!t&&(n=="number"||n!="symbol"&&ort.test(e))&&e>-1&&e%1==0&&e<t}var art=9007199254740991;function pue(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=art}var srt="[object Arguments]",lrt="[object Array]",crt="[object Boolean]",urt="[object Date]",drt="[object Error]",frt="[object Function]",prt="[object Map]",hrt="[object Number]",mrt="[object Object]",grt="[object RegExp]",yrt="[object Set]",vrt="[object String]",brt="[object WeakMap]",xrt="[object ArrayBuffer]",Srt="[object DataView]",wrt="[object Float32Array]",Crt="[object Float64Array]",Ert="[object Int8Array]",Trt="[object Int16Array]",Ort="[object Int32Array]",Irt="[object Uint8Array]",Prt="[object Uint8ClampedArray]",Art="[object Uint16Array]",Mrt="[object Uint32Array]",Br={};Br[wrt]=Br[Crt]=Br[Ert]=Br[Trt]=Br[Ort]=Br[Irt]=Br[Prt]=Br[Art]=Br[Mrt]=!0;Br[srt]=Br[lrt]=Br[xrt]=Br[crt]=Br[Srt]=Br[urt]=Br[drt]=Br[frt]=Br[prt]=Br[hrt]=Br[mrt]=Br[grt]=Br[yrt]=Br[vrt]=Br[brt]=!1;function Rrt(e){return Qh(e)&&pue(e.length)&&!!Br[Yh(e)]}function xV(e){return function(t){return e(t)}}var hue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,dx=hue&&typeof module=="object"&&module&&!module.nodeType&&module,Drt=dx&&dx.exports===hue,e$=Drt&&nue.process,qy=function(){try{var e=dx&&dx.require&&dx.require("util").types;return e||e$&&e$.binding&&e$.binding("util")}catch{}}(),vX=qy&&qy.isTypedArray,krt=vX?xV(vX):Rrt,_rt=Object.prototype,$rt=_rt.hasOwnProperty;function mue(e,t){var n=_w(e),r=!n&&Znt(e),o=!n&&!r&&fue(e),i=!n&&!r&&!o&&krt(e),a=n||r||o||i,s=a?Ynt(e.length,String):[],l=s.length;for(var c in e)(t||$rt.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||irt(c,l)))&&s.push(c);return s}var Nrt=Object.prototype;function SV(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Nrt;return e===n}var Lrt=oue(Object.keys,Object),Frt=Object.prototype,jrt=Frt.hasOwnProperty;function Brt(e){if(!SV(e))return Lrt(e);var t=[];for(var n in Object(e))jrt.call(e,n)&&n!="constructor"&&t.push(n);return t}function gue(e){return e!=null&&pue(e.length)&&!sue(e)}function wV(e){return gue(e)?mue(e):Brt(e)}function zrt(e,t){return e&&OP(t,wV(t),e)}function Vrt(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Hrt=Object.prototype,Urt=Hrt.hasOwnProperty;function Grt(e){if(!kw(e))return Vrt(e);var t=SV(e),n=[];for(var r in e)r=="constructor"&&(t||!Urt.call(e,r))||n.push(r);return n}function CV(e){return gue(e)?mue(e,!0):Grt(e)}function qrt(e,t){return e&&OP(t,CV(t),e)}var yue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bX=yue&&typeof module=="object"&&module&&!module.nodeType&&module,Wrt=bX&&bX.exports===yue,xX=Wrt?Wc.Buffer:void 0,SX=xX?xX.allocUnsafe:void 0;function Krt(e,t){if(t)return e.slice();var n=e.length,r=SX?SX(n):new e.constructor(n);return e.copy(r),r}function vue(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Yrt(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function bue(){return[]}var Qrt=Object.prototype,Xrt=Qrt.propertyIsEnumerable,wX=Object.getOwnPropertySymbols,EV=wX?function(e){return e==null?[]:(e=Object(e),Yrt(wX(e),function(t){return Xrt.call(e,t)}))}:bue;function Jrt(e,t){return OP(e,EV(e),t)}function xue(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Zrt=Object.getOwnPropertySymbols,Sue=Zrt?function(e){for(var t=[];e;)xue(t,EV(e)),e=bV(e);return t}:bue;function eot(e,t){return OP(e,Sue(e),t)}function wue(e,t,n){var r=t(e);return _w(e)?r:xue(r,n(e))}function tot(e){return wue(e,wV,EV)}function not(e){return wue(e,CV,Sue)}var GF=Jh(Wc,"DataView"),qF=Jh(Wc,"Promise"),WF=Jh(Wc,"Set"),KF=Jh(Wc,"WeakMap"),CX="[object Map]",rot="[object Object]",EX="[object Promise]",TX="[object Set]",OX="[object WeakMap]",IX="[object DataView]",oot=Xh(GF),iot=Xh(ES),aot=Xh(qF),sot=Xh(WF),lot=Xh(KF),Eu=Yh;(GF&&Eu(new GF(new ArrayBuffer(1)))!=IX||ES&&Eu(new ES)!=CX||qF&&Eu(qF.resolve())!=EX||WF&&Eu(new WF)!=TX||KF&&Eu(new KF)!=OX)&&(Eu=function(e){var t=Yh(e),n=t==rot?e.constructor:void 0,r=n?Xh(n):"";if(r)switch(r){case oot:return IX;case iot:return CX;case aot:return EX;case sot:return TX;case lot:return OX}return t});var cot=Object.prototype,uot=cot.hasOwnProperty;function dot(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&uot.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var PX=Wc.Uint8Array;function TV(e){var t=new e.constructor(e.byteLength);return new PX(t).set(new PX(e)),t}function fot(e,t){var n=t?TV(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var pot=/\w*$/;function hot(e){var t=new e.constructor(e.source,pot.exec(e));return t.lastIndex=e.lastIndex,t}var AX=Mf?Mf.prototype:void 0,MX=AX?AX.valueOf:void 0;function mot(e){return MX?Object(MX.call(e)):{}}function got(e,t){var n=t?TV(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var yot="[object Boolean]",vot="[object Date]",bot="[object Map]",xot="[object Number]",Sot="[object RegExp]",wot="[object Set]",Cot="[object String]",Eot="[object Symbol]",Tot="[object ArrayBuffer]",Oot="[object DataView]",Iot="[object Float32Array]",Pot="[object Float64Array]",Aot="[object Int8Array]",Mot="[object Int16Array]",Rot="[object Int32Array]",Dot="[object Uint8Array]",kot="[object Uint8ClampedArray]",_ot="[object Uint16Array]",$ot="[object Uint32Array]";function Not(e,t,n){var r=e.constructor;switch(t){case Tot:return TV(e);case yot:case vot:return new r(+e);case Oot:return fot(e,n);case Iot:case Pot:case Aot:case Mot:case Rot:case Dot:case kot:case _ot:case $ot:return got(e,n);case bot:return new r;case xot:case Cot:return new r(e);case Sot:return hot(e);case wot:return new r;case Eot:return mot(e)}}var RX=Object.create,Lot=function(){function e(){}return function(t){if(!kw(t))return{};if(RX)return RX(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Fot(e){return typeof e.constructor=="function"&&!SV(e)?Lot(bV(e)):{}}var jot="[object Map]";function Bot(e){return Qh(e)&&Eu(e)==jot}var DX=qy&&qy.isMap,zot=DX?xV(DX):Bot,Vot="[object Set]";function Hot(e){return Qh(e)&&Eu(e)==Vot}var kX=qy&&qy.isSet,Uot=kX?xV(kX):Hot,Got=1,qot=2,Wot=4,Cue="[object Arguments]",Kot="[object Array]",Yot="[object Boolean]",Qot="[object Date]",Xot="[object Error]",Eue="[object Function]",Jot="[object GeneratorFunction]",Zot="[object Map]",eit="[object Number]",Tue="[object Object]",tit="[object RegExp]",nit="[object Set]",rit="[object String]",oit="[object Symbol]",iit="[object WeakMap]",ait="[object ArrayBuffer]",sit="[object DataView]",lit="[object Float32Array]",cit="[object Float64Array]",uit="[object Int8Array]",dit="[object Int16Array]",fit="[object Int32Array]",pit="[object Uint8Array]",hit="[object Uint8ClampedArray]",mit="[object Uint16Array]",git="[object Uint32Array]",kr={};kr[Cue]=kr[Kot]=kr[ait]=kr[sit]=kr[Yot]=kr[Qot]=kr[lit]=kr[cit]=kr[uit]=kr[dit]=kr[fit]=kr[Zot]=kr[eit]=kr[Tue]=kr[tit]=kr[nit]=kr[rit]=kr[oit]=kr[pit]=kr[hit]=kr[mit]=kr[git]=!0;kr[Xot]=kr[Eue]=kr[iit]=!1;function fx(e,t,n,r,o,i){var a,s=t&Got,l=t&qot,c=t&Wot;if(a!==void 0)return a;if(!kw(e))return e;var u=_w(e);if(u){if(a=dot(e),!s)return vue(e,a)}else{var f=Eu(e),h=f==Eue||f==Jot;if(fue(e))return Krt(e,s);if(f==Tue||f==Cue||h&&!o){if(a=l||h?{}:Fot(e),!s)return l?eot(e,qrt(a,e)):Jrt(e,zrt(a,e))}else{if(!kr[f])return o?e:{};a=Not(e,f,s)}}i||(i=new Dv);var m=i.get(e);if(m)return m;i.set(e,a),Uot(e)?e.forEach(function(v){a.add(fx(v,t,n,v,e,i))}):zot(e)&&e.forEach(function(v,w){a.set(w,fx(v,t,n,w,e,i))});var g=c?l?not:tot:l?CV:wV,y=u?void 0:g(e);return qnt(y||e,function(v,w){y&&(w=v,v=e[w]),cue(a,w,fx(v,t,n,w,e,i))}),a}var yit=1,vit=4;function V0(e){return fx(e,yit|vit)}var t$,_X;function bit(){if(_X)return t$;_X=1;var e=Array.isArray,t=Object.keys,n=Object.prototype.hasOwnProperty,r=typeof Element<"u";function o(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){var s=e(i),l=e(a),c,u,f;if(s&&l){if(u=i.length,u!=a.length)return!1;for(c=u;c--!==0;)if(!o(i[c],a[c]))return!1;return!0}if(s!=l)return!1;var h=i instanceof Date,m=a instanceof Date;if(h!=m)return!1;if(h&&m)return i.getTime()==a.getTime();var g=i instanceof RegExp,y=a instanceof RegExp;if(g!=y)return!1;if(g&&y)return i.toString()==a.toString();var v=t(i);if(u=v.length,u!==t(a).length)return!1;for(c=u;c--!==0;)if(!n.call(a,v[c]))return!1;if(r&&i instanceof Element&&a instanceof Element)return i===a;for(c=u;c--!==0;)if(f=v[c],!(f==="_owner"&&i.$$typeof)&&!o(i[f],a[f]))return!1;return!0}return i!==i&&a!==a}return t$=function(a,s){try{return o(a,s)}catch(l){if(l.message&&l.message.match(/stack|recursion/i)||l.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",l.name,l.message),!1;throw l}},t$}var xit=bit();const Gd=Gn(xit);var Sit=4;function $X(e){return fx(e,Sit)}function Oue(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var wit="[object Symbol]";function OV(e){return typeof e=="symbol"||Qh(e)&&Yh(e)==wit}var Cit="Expected a function";function IV(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Cit);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(IV.Cache||Wf),n}IV.Cache=Wf;var Eit=500;function Tit(e){var t=IV(e,function(r){return n.size===Eit&&n.clear(),r}),n=t.cache;return t}var Oit=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Iit=/\\(\\)?/g,Pit=Tit(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Oit,function(n,r,o,i){t.push(o?i.replace(Iit,"$1"):r||n)}),t});function Ait(e){if(typeof e=="string"||OV(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var NX=Mf?Mf.prototype:void 0,LX=NX?NX.toString:void 0;function Iue(e){if(typeof e=="string")return e;if(_w(e))return Oue(e,Iue)+"";if(OV(e))return LX?LX.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Mit(e){return e==null?"":Iue(e)}function Pue(e){return _w(e)?Oue(e,Ait):OV(e)?[e]:vue(Pit(Mit(e)))}function fo(){return fo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fo.apply(this,arguments)}function Rit(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function PV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function FX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var IP=x.createContext(void 0);IP.displayName="FormikContext";var Dit=IP.Provider,kit=IP.Consumer;function AV(){var e=x.useContext(IP);return e}var jX=function(t){return Array.isArray(t)&&t.length===0},ya=function(t){return typeof t=="function"},kv=function(t){return t!==null&&typeof t=="object"},_it=function(t){return String(Math.floor(Number(t)))===t},n$=function(t){return Object.prototype.toString.call(t)==="[object String]"},Aue=function(t){return x.Children.count(t)===0},r$=function(t){return kv(t)&&ya(t.then)};function ti(e,t,n,r){r===void 0&&(r=0);for(var o=Pue(t);e&&r<o.length;)e=e[o[r++]];return r!==o.length&&!e||e===void 0?n:e}function Mc(e,t,n){for(var r=$X(e),o=r,i=0,a=Pue(t);i<a.length-1;i++){var s=a[i],l=ti(e,a.slice(0,i+1));if(l&&(kv(l)||Array.isArray(l)))o=o[s]=$X(l);else{var c=a[i+1];o=o[s]=_it(c)&&Number(c)>=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function Mue(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],s=e[a];kv(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},Mue(s,t,n,r[a])):r[a]=t}return r}function $it(e,t){switch(t.type){case"SET_VALUES":return fo({},e,{values:t.payload});case"SET_TOUCHED":return fo({},e,{touched:t.payload});case"SET_ERRORS":return Gd(e.errors,t.payload)?e:fo({},e,{errors:t.payload});case"SET_STATUS":return fo({},e,{status:t.payload});case"SET_ISSUBMITTING":return fo({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return fo({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return fo({},e,{values:Mc(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return fo({},e,{touched:Mc(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return fo({},e,{errors:Mc(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return fo({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return fo({},e,{touched:Mue(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return fo({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return fo({},e,{isSubmitting:!1});default:return e}}var wp={},Y1={};function Nit(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,o=r===void 0?!0:r,i=e.validateOnMount,a=i===void 0?!1:i,s=e.isInitialValid,l=e.enableReinitialize,c=l===void 0?!1:l,u=e.onSubmit,f=PV(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),h=fo({validateOnChange:n,validateOnBlur:o,validateOnMount:a,onSubmit:u},f),m=x.useRef(h.initialValues),g=x.useRef(h.initialErrors||wp),y=x.useRef(h.initialTouched||Y1),v=x.useRef(h.initialStatus),w=x.useRef(!1),C=x.useRef({});x.useEffect(function(){return w.current=!0,function(){w.current=!1}},[]);var E=x.useState(0),I=E[1],O=x.useRef({values:V0(h.initialValues),errors:V0(h.initialErrors)||wp,touched:V0(h.initialTouched)||Y1,status:V0(h.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),P=O.current,R=x.useCallback(function(te){var Te=O.current;O.current=$it(Te,te),Te!==O.current&&I(function(De){return De+1})},[]),D=x.useCallback(function(te,Te){return new Promise(function(De,Ve){var We=h.validate(te,Te);We==null?De(wp):r$(We)?We.then(function(rt){De(rt||wp)},function(rt){Ve(rt)}):De(We)})},[h.validate]),M=x.useCallback(function(te,Te){var De=h.validationSchema,Ve=ya(De)?De(Te):De,We=Te&&Ve.validateAt?Ve.validateAt(Te,te):Fit(te,Ve);return new Promise(function(rt,ut){We.then(function(){rt(wp)},function(Be){Be.name==="ValidationError"?rt(Lit(Be)):ut(Be)})})},[h.validationSchema]),A=x.useCallback(function(te,Te){return new Promise(function(De){return De(C.current[te].validate(Te))})},[]),_=x.useCallback(function(te){var Te=Object.keys(C.current).filter(function(Ve){return ya(C.current[Ve].validate)}),De=Te.length>0?Te.map(function(Ve){return A(Ve,ti(te,Ve))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(De).then(function(Ve){return Ve.reduce(function(We,rt,ut){return rt==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||rt&&(We=Mc(We,Te[ut],rt)),We},{})})},[A]),N=x.useCallback(function(te){return Promise.all([_(te),h.validationSchema?M(te):{},h.validate?D(te):{}]).then(function(Te){var De=Te[0],Ve=Te[1],We=Te[2],rt=UF.all([De,Ve,We],{arrayMerge:jit});return rt})},[h.validate,h.validationSchema,_,D,M]),B=As(function(te){return te===void 0&&(te=P.values),R({type:"SET_ISVALIDATING",payload:!0}),N(te).then(function(Te){return w.current&&(R({type:"SET_ISVALIDATING",payload:!1}),R({type:"SET_ERRORS",payload:Te})),Te})});x.useEffect(function(){a&&w.current===!0&&Gd(m.current,h.initialValues)&&B(m.current)},[a,B]);var H=x.useCallback(function(te){var Te=te&&te.values?te.values:m.current,De=te&&te.errors?te.errors:g.current?g.current:h.initialErrors||{},Ve=te&&te.touched?te.touched:y.current?y.current:h.initialTouched||{},We=te&&te.status?te.status:v.current?v.current:h.initialStatus;m.current=Te,g.current=De,y.current=Ve,v.current=We;var rt=function(){R({type:"RESET_FORM",payload:{isSubmitting:!!te&&!!te.isSubmitting,errors:De,touched:Ve,status:We,values:Te,isValidating:!!te&&!!te.isValidating,submitCount:te&&te.submitCount&&typeof te.submitCount=="number"?te.submitCount:0}})};if(h.onReset){var ut=h.onReset(P.values,ue);r$(ut)?ut.then(rt):rt()}else rt()},[h.initialErrors,h.initialStatus,h.initialTouched,h.onReset]);x.useEffect(function(){w.current===!0&&!Gd(m.current,h.initialValues)&&c&&(m.current=h.initialValues,H(),a&&B(m.current))},[c,h.initialValues,H,a,B]),x.useEffect(function(){c&&w.current===!0&&!Gd(g.current,h.initialErrors)&&(g.current=h.initialErrors||wp,R({type:"SET_ERRORS",payload:h.initialErrors||wp}))},[c,h.initialErrors]),x.useEffect(function(){c&&w.current===!0&&!Gd(y.current,h.initialTouched)&&(y.current=h.initialTouched||Y1,R({type:"SET_TOUCHED",payload:h.initialTouched||Y1}))},[c,h.initialTouched]),x.useEffect(function(){c&&w.current===!0&&!Gd(v.current,h.initialStatus)&&(v.current=h.initialStatus,R({type:"SET_STATUS",payload:h.initialStatus}))},[c,h.initialStatus,h.initialTouched]);var j=As(function(te){if(C.current[te]&&ya(C.current[te].validate)){var Te=ti(P.values,te),De=C.current[te].validate(Te);return r$(De)?(R({type:"SET_ISVALIDATING",payload:!0}),De.then(function(Ve){return Ve}).then(function(Ve){R({type:"SET_FIELD_ERROR",payload:{field:te,value:Ve}}),R({type:"SET_ISVALIDATING",payload:!1})})):(R({type:"SET_FIELD_ERROR",payload:{field:te,value:De}}),Promise.resolve(De))}else if(h.validationSchema)return R({type:"SET_ISVALIDATING",payload:!0}),M(P.values,te).then(function(Ve){return Ve}).then(function(Ve){R({type:"SET_FIELD_ERROR",payload:{field:te,value:ti(Ve,te)}}),R({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),L=x.useCallback(function(te,Te){var De=Te.validate;C.current[te]={validate:De}},[]),V=x.useCallback(function(te){delete C.current[te]},[]),W=As(function(te,Te){R({type:"SET_TOUCHED",payload:te});var De=Te===void 0?o:Te;return De?B(P.values):Promise.resolve()}),K=x.useCallback(function(te){R({type:"SET_ERRORS",payload:te})},[]),G=As(function(te,Te){var De=ya(te)?te(P.values):te;R({type:"SET_VALUES",payload:De});var Ve=Te===void 0?n:Te;return Ve?B(De):Promise.resolve()}),q=x.useCallback(function(te,Te){R({type:"SET_FIELD_ERROR",payload:{field:te,value:Te}})},[]),Y=As(function(te,Te,De){R({type:"SET_FIELD_VALUE",payload:{field:te,value:Te}});var Ve=De===void 0?n:De;return Ve?B(Mc(P.values,te,Te)):Promise.resolve()}),Z=x.useCallback(function(te,Te){var De=Te,Ve=te,We;if(!n$(te)){te.persist&&te.persist();var rt=te.target?te.target:te.currentTarget,ut=rt.type,Be=rt.name,et=rt.id,Le=rt.value,It=rt.checked;rt.outerHTML;var Lt=rt.options,nt=rt.multiple;De=Te||Be||et,Ve=/number|range/.test(ut)?(We=parseFloat(Le),isNaN(We)?"":We):/checkbox/.test(ut)?zit(ti(P.values,De),It,Le):Lt&&nt?Bit(Lt):Le}De&&Y(De,Ve)},[Y,P.values]),ie=As(function(te){if(n$(te))return function(Te){return Z(Te,te)};Z(te)}),se=As(function(te,Te,De){Te===void 0&&(Te=!0),R({type:"SET_FIELD_TOUCHED",payload:{field:te,value:Te}});var Ve=De===void 0?o:De;return Ve?B(P.values):Promise.resolve()}),ce=x.useCallback(function(te,Te){te.persist&&te.persist();var De=te.target,Ve=De.name,We=De.id;De.outerHTML;var rt=Te||Ve||We;se(rt,!0)},[se]),ye=As(function(te){if(n$(te))return function(Te){return ce(Te,te)};ce(te)}),Se=x.useCallback(function(te){ya(te)?R({type:"SET_FORMIK_STATE",payload:te}):R({type:"SET_FORMIK_STATE",payload:function(){return te}})},[]),ne=x.useCallback(function(te){R({type:"SET_STATUS",payload:te})},[]),le=x.useCallback(function(te){R({type:"SET_ISSUBMITTING",payload:te})},[]),de=As(function(){return R({type:"SUBMIT_ATTEMPT"}),B().then(function(te){var Te=te instanceof Error,De=!Te&&Object.keys(te).length===0;if(De){var Ve;try{if(Ve=pe(),Ve===void 0)return}catch(We){throw We}return Promise.resolve(Ve).then(function(We){return w.current&&R({type:"SUBMIT_SUCCESS"}),We}).catch(function(We){if(w.current)throw R({type:"SUBMIT_FAILURE"}),We})}else if(w.current&&(R({type:"SUBMIT_FAILURE"}),Te))throw te})}),oe=As(function(te){te&&te.preventDefault&&ya(te.preventDefault)&&te.preventDefault(),te&&te.stopPropagation&&ya(te.stopPropagation)&&te.stopPropagation(),de().catch(function(Te){console.warn("Warning: An unhandled error was caught from submitForm()",Te)})}),ue={resetForm:H,validateForm:B,validateField:j,setErrors:K,setFieldError:q,setFieldTouched:se,setFieldValue:Y,setStatus:ne,setSubmitting:le,setTouched:W,setValues:G,setFormikState:Se,submitForm:de},pe=As(function(){return u(P.values,ue)}),Ee=As(function(te){te&&te.preventDefault&&ya(te.preventDefault)&&te.preventDefault(),te&&te.stopPropagation&&ya(te.stopPropagation)&&te.stopPropagation(),H()}),xe=x.useCallback(function(te){return{value:ti(P.values,te),error:ti(P.errors,te),touched:!!ti(P.touched,te),initialValue:ti(m.current,te),initialTouched:!!ti(y.current,te),initialError:ti(g.current,te)}},[P.errors,P.touched,P.values]),Re=x.useCallback(function(te){return{setValue:function(De,Ve){return Y(te,De,Ve)},setTouched:function(De,Ve){return se(te,De,Ve)},setError:function(De){return q(te,De)}}},[Y,se,q]),he=x.useCallback(function(te){var Te=kv(te),De=Te?te.name:te,Ve=ti(P.values,De),We={name:De,value:Ve,onChange:ie,onBlur:ye};if(Te){var rt=te.type,ut=te.value,Be=te.as,et=te.multiple;rt==="checkbox"?ut===void 0?We.checked=!!Ve:(We.checked=!!(Array.isArray(Ve)&&~Ve.indexOf(ut)),We.value=ut):rt==="radio"?(We.checked=Ve===ut,We.value=ut):Be==="select"&&et&&(We.value=We.value||[],We.multiple=!0)}return We},[ye,ie,P.values]),Pe=x.useMemo(function(){return!Gd(m.current,P.values)},[m.current,P.values]),ve=x.useMemo(function(){return typeof s<"u"?Pe?P.errors&&Object.keys(P.errors).length===0:s!==!1&&ya(s)?s(h):s:P.errors&&Object.keys(P.errors).length===0},[s,Pe,P.errors,h]),Ie=fo({},P,{initialValues:m.current,initialErrors:g.current,initialTouched:y.current,initialStatus:v.current,handleBlur:ye,handleChange:ie,handleReset:Ee,handleSubmit:oe,resetForm:H,setErrors:K,setFormikState:Se,setFieldTouched:se,setFieldValue:Y,setFieldError:q,setStatus:ne,setSubmitting:le,setTouched:W,setValues:G,submitForm:de,validateForm:B,validateField:j,isValid:ve,dirty:Pe,unregisterField:V,registerField:L,getFieldProps:he,getFieldMeta:xe,getFieldHelpers:Re,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return Ie}function Ti(e){var t=Nit(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return x.useImperativeHandle(i,function(){return t}),x.createElement(Dit,{value:t},n?x.createElement(n,t):o?o(t):r?ya(r)?r(t):Aue(r)?null:x.Children.only(r):null)}function Lit(e){var t={};if(e.inner){if(e.inner.length===0)return Mc(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;ti(t,a.path)||(t=Mc(t,a.path,a.message))}}return t}function Fit(e,t,n,r){n===void 0&&(n=!1);var o=YF(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function YF(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||fX(o)?YF(o):o!==""?o:void 0}):fX(e[r])?t[r]=YF(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function jit(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?UF(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=UF(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function Bit(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function zit(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var Vit=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function As(e){var t=x.useRef(e);return Vit(function(){t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current.apply(void 0,r)},[])}function us(e){var t=AV(),n=t.getFieldProps,r=t.getFieldMeta,o=t.getFieldHelpers,i=t.registerField,a=t.unregisterField,s=kv(e),l=s?e:{name:e},c=l.name,u=l.validate;x.useEffect(function(){return c&&i(c,{validate:u}),function(){c&&a(c)}},[i,a,c,u]);var f=x.useMemo(function(){return o(c)},[o,c]);return[n(l),r(c),f]}var fi=x.forwardRef(function(e,t){var n=e.action,r=PV(e,["action"]),o=n??"#",i=AV(),a=i.handleReset,s=i.handleSubmit;return x.createElement("form",fo({onSubmit:s,ref:t,onReset:a,action:o},r))});fi.displayName="Form";function Hit(e){var t=function(o){return x.createElement(kit,null,function(i){return x.createElement(e,fo({},o,{formik:i}))})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",nve(t,e)}var Uit=function(t,n,r){var o=Ah(t),i=o[n];return o.splice(n,1),o.splice(r,0,i),o},Git=function(t,n,r){var o=Ah(t),i=o[n];return o[n]=o[r],o[r]=i,o},o$=function(t,n,r){var o=Ah(t);return o.splice(n,0,r),o},qit=function(t,n,r){var o=Ah(t);return o[n]=r,o},Ah=function(t){if(t){if(Array.isArray(t))return[].concat(t);var n=Object.keys(t).map(function(r){return parseInt(r)}).reduce(function(r,o){return o>r?o:r},0);return Array.from(fo({},t,{length:n+1}))}else return[]},BX=function(t,n){var r=typeof t=="function"?t:n;return function(o){if(Array.isArray(o)||kv(o)){var i=Ah(o);return r(i)}return o}},Rue=function(e){Rit(t,e);function t(r){var o;return o=e.call(this,r)||this,o.updateArrayField=function(i,a,s){var l=o.props,c=l.name,u=l.formik.setFormikState;u(function(f){var h=BX(s,i),m=BX(a,i),g=Mc(f.values,c,i(ti(f.values,c))),y=s?h(ti(f.errors,c)):void 0,v=a?m(ti(f.touched,c)):void 0;return jX(y)&&(y=void 0),jX(v)&&(v=void 0),fo({},f,{values:g,errors:s?Mc(f.errors,c,y):f.errors,touched:a?Mc(f.touched,c,v):f.touched})})},o.push=function(i){return o.updateArrayField(function(a){return[].concat(Ah(a),[V0(i)])},!1,!1)},o.handlePush=function(i){return function(){return o.push(i)}},o.swap=function(i,a){return o.updateArrayField(function(s){return Git(s,i,a)},!0,!0)},o.handleSwap=function(i,a){return function(){return o.swap(i,a)}},o.move=function(i,a){return o.updateArrayField(function(s){return Uit(s,i,a)},!0,!0)},o.handleMove=function(i,a){return function(){return o.move(i,a)}},o.insert=function(i,a){return o.updateArrayField(function(s){return o$(s,i,a)},function(s){return o$(s,i,null)},function(s){return o$(s,i,null)})},o.handleInsert=function(i,a){return function(){return o.insert(i,a)}},o.replace=function(i,a){return o.updateArrayField(function(s){return qit(s,i,a)},!1,!1)},o.handleReplace=function(i,a){return function(){return o.replace(i,a)}},o.unshift=function(i){var a=-1;return o.updateArrayField(function(s){var l=s?[i].concat(s):[i];return a=l.length,l},function(s){return s?[null].concat(s):[null]},function(s){return s?[null].concat(s):[null]}),a},o.handleUnshift=function(i){return function(){return o.unshift(i)}},o.handleRemove=function(i){return function(){return o.remove(i)}},o.handlePop=function(){return function(){return o.pop()}},o.remove=o.remove.bind(FX(o)),o.pop=o.pop.bind(FX(o)),o}var n=t.prototype;return n.componentDidUpdate=function(o){this.props.validateOnChange&&this.props.formik.validateOnChange&&!Gd(ti(o.formik.values,o.name),ti(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(o){var i;return this.updateArrayField(function(a){var s=a?Ah(a):[];return i||(i=s[o]),ya(s.splice)&&s.splice(o,1),ya(s.every)&&s.every(function(l){return l===void 0})?[]:s},!0,!0),i},n.pop=function(){var o;return this.updateArrayField(function(i){var a=i.slice();return o||(o=a&&a.pop&&a.pop()),a},!0,!0),o},n.render=function(){var o={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},i=this.props,a=i.component,s=i.render,l=i.children,c=i.name,u=i.formik,f=PV(u,["validate","validationSchema"]),h=fo({},o,{form:f,name:c});return a?x.createElement(a,h):s?s(h):l?typeof l=="function"?l(h):Aue(l)?null:x.Children.only(l):null},t}(x.Component);Rue.defaultProps={validateOnChange:!0};var Due=Hit(Rue),i$,zX;function Wit(){if(zX)return i$;zX=1;function e(w){this._maxSize=w,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(w){return this._values[w]},e.prototype.set=function(w,C){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=C};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,s=new e(a),l=new e(a),c=new e(a);i$={Cache:e,split:f,normalizePath:u,setter:function(w){var C=u(w);return l.get(w)||l.set(w,function(I,O){for(var P=0,R=C.length,D=I;P<R-1;){var M=C[P];if(M==="__proto__"||M==="constructor"||M==="prototype")return I;D=D[C[P++]]}D[C[P]]=O})},getter:function(w,C){var E=u(w);return c.get(w)||c.set(w,function(O){for(var P=0,R=E.length;P<R;)if(O!=null||!C)O=O[E[P++]];else return;return O})},join:function(w){return w.reduce(function(C,E){return C+(m(E)||n.test(E)?"["+E+"]":(C?".":"")+E)},"")},forEach:function(w,C,E){h(Array.isArray(w)?w:f(w),C,E)}};function u(w){return s.get(w)||s.set(w,f(w).map(function(C){return C.replace(i,"$2")}))}function f(w){return w.match(t)||[""]}function h(w,C,E){var I=w.length,O,P,R,D;for(P=0;P<I;P++)O=w[P],O&&(v(O)&&(O='"'+O+'"'),D=m(O),R=!D&&/^\d+$/.test(O),C.call(E,O,D,R,P,w))}function m(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function g(w){return w.match(r)&&!w.match(n)}function y(w){return o.test(w)}function v(w){return!m(w)&&(g(w)||y(w))}return i$}var ah=Wit(),a$,VX;function Kit(){if(VX)return a$;VX=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=u=>u.match(e)||[],n=u=>u[0].toUpperCase()+u.slice(1),r=(u,f)=>t(u).join(f).toLowerCase(),o=u=>t(u).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return a$={words:t,upperFirst:n,camelCase:o,pascalCase:u=>n(o(u)),snakeCase:u=>r(u,"_"),kebabCase:u=>r(u,"-"),sentenceCase:u=>n(r(u," ")),titleCase:u=>t(u).map(n).join(" ")},a$}var s$=Kit(),Q1={exports:{}},HX;function Yit(){if(HX)return Q1.exports;HX=1,Q1.exports=function(o){return e(t(o),o)},Q1.exports.array=e;function e(o,i){var a=o.length,s=new Array(a),l={},c=a,u=n(i),f=r(o);for(i.forEach(function(m){if(!f.has(m[0])||!f.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});c--;)l[c]||h(o[c],c,new Set);return s;function h(m,g,y){if(y.has(m)){var v;try{v=", node was:"+JSON.stringify(m)}catch{v=""}throw new Error("Cyclic dependency"+v)}if(!f.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[g]){l[g]=!0;var w=u.get(m)||new Set;if(w=Array.from(w),g=w.length){y.add(m);do{var C=w[--g];h(C,f.get(C),y)}while(g);y.delete(m)}s[--a]=m}}}function t(o){for(var i=new Set,a=0,s=o.length;a<s;a++){var l=o[a];i.add(l[0]),i.add(l[1])}return Array.from(i)}function n(o){for(var i=new Map,a=0,s=o.length;a<s;a++){var l=o[a];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function r(o){for(var i=new Map,a=0,s=o.length;a<s;a++)i.set(o[a],a);return i}return Q1.exports}var Qit=Yit();const Xit=Gn(Qit),Jit=Object.prototype.toString,Zit=Error.prototype.toString,eat=RegExp.prototype.toString,tat=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",nat=/^Symbol\((.*)\)(.*)$/;function rat(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function UX(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return rat(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return tat.call(e).replace(nat,"Symbol($1)");const r=Jit.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Zit.call(e)+"]":r==="RegExp"?eat.call(e):null}function Nu(e,t){let n=UX(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=UX(this[r],t);return i!==null?i:o},2)}function kue(e){return e==null?[]:[].concat(e)}let _ue,$ue,Nue,oat=/\$\{\s*(\w+)\s*\}/g;_ue=Symbol.toStringTag;class GX{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[_ue]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],kue(t).forEach(i=>{if(Sa.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}$ue=Symbol.hasInstance;Nue=Symbol.toStringTag;class Sa extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(oat,(o,i)=>Nu(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new GX(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Nue]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Sa)}static[$ue](t){return GX[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let dc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Nu(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Nu(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Nu(n,!0)}\``+o}},ha={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},zd={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},QF={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},XF={isValue:"${path} field must be ${value}"},TE={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},OE={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},iat={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Nu(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Nu(n,!0)}\``}return Sa.formatError(dc.notType,e)}};Object.assign(Object.create(null),{mixed:dc,string:ha,number:zd,date:QF,object:TE,array:OE,boolean:XF,tuple:iat});const PP=e=>e&&e.__isYupSchema__;class yO{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new yO(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!PP(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const X1={context:"$",value:"."};function AP(e,t){return new Kf(e,t)}class Kf{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===X1.context,this.isValue=this.key[0]===X1.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?X1.context:this.isValue?X1.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&ah.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Kf.prototype.__isYupRef=!0;const $l=e=>e==null;function tg(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:f,message:h,skipAbsent:m}=e;let{parent:g,context:y,abortEarly:v=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=o;function C(_){return Kf.isRef(_)?_.getValue(n,g,y):_}function E(_={}){const N=Object.assign({value:n,originalValue:i,label:a.spec.label,path:_.path||r,spec:a.spec,disableStackTrace:_.disableStackTrace||w},f,_.params);for(const H of Object.keys(N))N[H]=C(N[H]);const B=new Sa(Sa.formatError(_.message||h,N),n,N.path,_.type||c,N.disableStackTrace);return B.params=N,B}const I=v?s:l;let O={path:r,parent:g,type:c,from:o.from,createError:E,resolve:C,options:o,originalValue:i,schema:a};const P=_=>{Sa.isError(_)?I(_):_?l(null):I(E())},R=_=>{Sa.isError(_)?I(_):s(_)};if(m&&$l(n))return P(!0);let M;try{var A;if(M=u.call(O,n,O),typeof((A=M)==null?void 0:A.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(P,R)}}catch(_){R(_);return}P(M)}return t.OPTIONS=e,t}function aat(e,t,n,r=n){let o,i,a;return t?(ah.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let f=e.type==="tuple",h=c?parseInt(u,10):0;if(e.innerType||f){if(f&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[h],e=f?e.spec.types[h]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class vO extends Set{describe(){const t=[];for(const n of this.values())t.push(Kf.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new vO(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Cg(e,t=new Map){if(PP(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Cg(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,Cg(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Cg(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Cg(o,t)}else throw Error(`Unable to clone ${e}`);return n}class is{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new vO,this._blacklist=new vO,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(dc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Cg(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&$l(i))return i;let a=Nu(t),s=Nu(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
+`));const t=x.useMemo(()=>z({},vYe,e.localeText),[e.localeText]);return x.useMemo(()=>z({},e,{localeText:t}),[e,t])},xn=()=>Kh().utils,jle=()=>Kh().defaultDates,Yh=e=>{const t=xn(),n=x.useRef(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},Ti=()=>Kh().localeText,bYe=Ot(k.jsx("path",{d:"M7 10l5 5 5-5z"})),xYe=Ot(k.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),SYe=Ot(k.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Ble=Ot(k.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"})),wYe=Ot(k.jsxs(x.Fragment,{children:[k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),k.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),CYe=Ot(k.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"})),EYe=Ot(k.jsxs(x.Fragment,{children:[k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),k.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),TYe=Ot(k.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function OYe(e){return qe("MuiPickersArrowSwitcher",e)}Ke("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const zle=x.createContext(()=>!0);function IYe(){return x.useContext(zle)}const Vle=x.createContext(null);function Hle(){return x.useContext(Vle)}const Kz=x.createContext(null),Wc=()=>{const e=x.useContext(Kz);if(e==null)throw new Error("MUI X: The `usePickerContext` hook can only be called inside the context of a Picker component");return e},Ule=x.createContext(null),Gle=x.createContext({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:"desktop",pickerOrientation:"portrait"},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>"UI",triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function qle(e){const{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:o,isValidContextValue:i,localeText:a,children:s}=e;return k.jsx(Kz.Provider,{value:t,children:k.jsx(Ule.Provider,{value:n,children:k.jsx(Gle.Provider,{value:r,children:k.jsx(Vle.Provider,{value:o,children:k.jsx(zle.Provider,{value:i,children:k.jsx(Ys,{localeText:a,children:s})})})})})})}const Ur=()=>x.useContext(Gle),PYe=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],AYe=["ownerState"],MYe=["ownerState"],RYe=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),DYe=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),qQ=ae(pn,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),kYe=e=>Me({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},OYe,e),Wle=x.forwardRef(function(t,n){const r=vr(),o=Pn({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:f,nextLabel:p,isPreviousDisabled:m,isPreviousHidden:g,onGoToPrevious:y,previousLabel:v,labelId:w,classes:C}=o,E=$e(o,PYe),{ownerState:I}=Ur(),O=kYe(C),P={isDisabled:c,isHidden:u,goTo:f,label:p},R={isDisabled:m,isHidden:g,goTo:y,label:v},D=(s==null?void 0:s.previousIconButton)??qQ,M=Dn({elementType:D,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:R.label,"aria-label":R.label,disabled:R.isDisabled,edge:"end",onClick:R.goTo},ownerState:z({},I,{isButtonHidden:R.isHidden??!1}),className:fe(O.button,O.previousIconButton)}),A=(s==null?void 0:s.nextIconButton)??qQ,_=Dn({elementType:A,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"start",onClick:P.goTo},ownerState:z({},I,{isButtonHidden:P.isHidden??!1}),className:fe(O.button,O.nextIconButton)}),N=(s==null?void 0:s.leftArrowIcon)??xYe,B=Dn({elementType:N,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:I,className:O.leftArrowIcon}),H=$e(B,AYe),j=(s==null?void 0:s.rightArrowIcon)??SYe,L=Dn({elementType:j,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:I,className:O.rightArrowIcon}),V=$e(L,MYe);return k.jsxs(RYe,z({ref:n,className:fe(O.root,a),ownerState:I},E,{children:[k.jsx(D,z({},M,{children:r?k.jsx(j,z({},V)):k.jsx(N,z({},H))})),i?k.jsx(at,{variant:"subtitle1",component:"span",id:w,children:i}):k.jsx(DYe,{className:O.spacer,ownerState:I}),k.jsx(A,z({},_,{children:r?k.jsx(N,z({},H)):k.jsx(j,z({},V))}))]}))}),xc=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),Yz=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},Kle=["hours","minutes","seconds"],_Ye=["hours","minutes","seconds","meridiem"],Ih=e=>Kle.includes(e),wg=e=>_Ye.includes(e),$Ye=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,vS=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,NYe=(e,t,n,r)=>{const o=vS(r.getHours(e),t,n);return r.setHours(e,o)},WQ=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),Aw=(e,t)=>(n,r)=>e?t.isAfter(n,r):WQ(n,t)>WQ(r,t),pO=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return xc(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:xc(n,["minutes"])?o.minutes:xc(n,["seconds"])?o.seconds:xc(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:xc(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`},Yle={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function LYe(e){const{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return o=>{if(t==null)return Yle;const i=t.findIndex(s=>n(o.view,s)),a=i===-1||i===t.length-1?null:t[i+1];return{hasNextStep:a!=null,hasSeveralSteps:t.length>1,goToNextStep:()=>{a!=null&&r(z({},o,{step:a}))},areViewsInSameStep:(s,l)=>{const c=t.find(f=>n(s,f)),u=t.find(f=>n(l,f));return c===u}}}}function Mw({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s,getStepNavigation:l}){const c=x.useRef(n),u=x.useRef(o),f=x.useRef(o.includes(n)?n:o[0]),[p,m]=ia({name:"useViews",state:"view",controlled:r,default:f.current}),g=x.useRef(i?p:null),[y,v]=ia({name:"useViews",state:"focusedView",controlled:a,default:g.current}),w=l?l({setView:m,view:p,defaultView:f.current,views:o}):Yle;x.useEffect(()=>{(c.current&&c.current!==n||u.current&&u.current.some(M=>!o.includes(M)))&&(m(o.includes(n)?n:o[0]),u.current=o,c.current=n)},[n,m,p,o]);const C=o.indexOf(p),E=o[C-1]??null,I=o[C+1]??null,O=Je((M,A)=>{v(A?M:_=>M===_?null:_),s==null||s(M,A)}),P=Je(M=>{O(M,!0),M!==p&&(m(M),t&&t(M))}),R=Je(()=>{I&&P(I)}),D=Je((M,A,_)=>{const N=A==="finish",B=_?o.indexOf(_)<o.length-1:!!I;e(M,N&&B?"partial":A,_);let j=null;if(_!=null&&_!==p?j=_:N&&(j=p),j==null)return;const L=o[o.indexOf(j)+1];L==null||!w.areViewsInSameStep(j,L)||P(L)});return z({},w,{view:p,setView:P,focusedView:y,setFocusedView:O,nextView:I,previousView:E,defaultView:o.includes(n)?n:o[0],goToNextView:R,setValueAndGoToNextView:D})}function FYe(e,{disableFuture:t,maxDate:n,timezone:r}){const o=xn();return x.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function jYe(e,{disablePast:t,minDate:n,timezone:r}){const o=xn();return x.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function yP(e,t,n,r){const o=xn(),i=x.useMemo(()=>o.isValid(e)?e:null,[o,e]),a=$Ye(i,o),s=x.useCallback(l=>{const c=i==null?null:NYe(i,l,!!t,o);n(c,r??"partial")},[t,i,n,r,o]);return{meridiemMode:a,handleMeridiemChange:s}}const bS=36,vP=2,Vy=320,BYe=280,Hy=336,Qle=232,z0=48,bP=ae("div")({overflow:"hidden",width:Vy,maxHeight:Hy,display:"flex",flexDirection:"column",margin:"0 auto"});function zYe(e){return qe("MuiTimeClock",e)}Ke("MuiTimeClock",["root","arrowSwitcher"]);const Uy=220,Nu=36,xS={x:Uy/2,y:Uy/2},Xle={x:xS.x,y:0},VYe=Xle.x-xS.x,HYe=Xle.y-xS.y,UYe=e=>e*(180/Math.PI),Jle=(e,t,n)=>{const r=t-xS.x,o=n-xS.y,i=Math.atan2(VYe,HYe)-Math.atan2(r,o);let a=UYe(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},GYe=(e,t,n=1)=>{const r=n*6;let{value:o}=Jle(r,e,t);return o=o*n%60,o},qYe=(e,t,n)=>{const{value:r,distance:o}=Jle(30,e,t);let i=r||12;return n?i%=12:o<Uy/2-Nu&&(i+=12,i%=24),i};function WYe(e){return qe("MuiClockPointer",e)}Ke("MuiClockPointer",["root","thumb"]);const KYe=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],YYe=e=>Me({root:["root"],thumb:["thumb"]},WYe,e),QYe=ae("div",{name:"MuiClockPointer",slot:"Root"})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),XYe=ae("div",{name:"MuiClockPointer",slot:"Thumb"})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${Nu/2}px)`,border:`${(Nu-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function JYe(e){const t=Pn({props:e,name:"MuiClockPointer"}),{className:n,classes:r,isBetweenTwoClockValues:o,isInner:i,type:a,viewValue:s}=t,l=$e(t,KYe),c=x.useRef(a);x.useEffect(()=>{c.current=a},[a]);const{ownerState:u}=Ur(),f=z({},u,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:o}),p=YYe(r),m=()=>{let y=360/(a==="hours"?12:60)*s;return a==="hours"&&s>12&&(y-=360),{height:Math.round((i?.26:.4)*Uy),transform:`rotateZ(${y}deg)`}};return k.jsx(QYe,z({style:m(),className:fe(p.root,n),ownerState:f},l,{children:k.jsx(XYe,{ownerState:f,className:p.thumb})}))}function ZYe(e){return qe("MuiClock",e)}Ke("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const hO=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},SS=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=hO(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},eQe=(e,t)=>e.isValid(t)?t:null,mO=(e,t,n)=>t==null||!e.isValid(t)?n:t,tQe=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Qz=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},Xz=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),Nl=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},Zle=["year","month","day"],Gy=e=>Zle.includes(e),wS=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return xc(n,["year"])?o.year:xc(n,["month"])?o.month:xc(n,["day"])?o.dayOfMonth:xc(n,["month","year"])?`${o.month} ${o.year}`:xc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},nQe=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},rQe=(e,t)=>{const n={root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",t.clockMeridiemMode==="am"&&"selected"],pmButton:["pmButton",t.clockMeridiemMode==="pm"&&"selected"],meridiemText:["meridiemText"]};return Me(n,ZYe,e)},oQe=ae("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),iQe=ae("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),aQe=ae("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),sQe=ae("div",{name:"MuiClock",slot:"SquareMask"})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),lQe=ae("div",{name:"MuiClock",slot:"Pin"})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),ece=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:Nu,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),cQe=ae(pn,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>z({},ece(e,"am"),{position:"absolute",left:8})),uQe=ae(pn,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>z({},ece(e,"pm"),{position:"absolute",right:8})),KQ=ae(at,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function dQe(e){const t=Pn({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:f,selectedId:p,type:m,viewValue:g,viewRange:[y,v],disabled:w=!1,readOnly:C,className:E,classes:I}=t,O=xn(),P=Ti(),{ownerState:R}=Ur(),D=z({},R,{isClockDisabled:w,clockMeridiemMode:c}),M=x.useRef(!1),A=rQe(I,D),_=l(g,m),N=!n&&m==="hours"&&(g<1||g>12),B=(se,ce)=>{w||C||l(se,m)||f(se,ce)},H=(se,ce)=>{let{offsetX:ye,offsetY:Se}=se;if(ye===void 0){const le=se.target.getBoundingClientRect();ye=se.changedTouches[0].clientX-le.left,Se=se.changedTouches[0].clientY-le.top}const ne=m==="seconds"||m==="minutes"?GYe(ye,Se,u):qYe(ye,Se,!!n);B(ne,ce)},j=se=>{M.current=!0,H(se,"shallow")},L=se=>{M.current&&(H(se,"finish"),M.current=!1),se.preventDefault()},V=se=>{se.buttons>0&&H(se.nativeEvent,"shallow")},W=se=>{M.current&&(M.current=!1),H(se.nativeEvent,"finish")},K=m==="hours"?!1:g%5!==0,G=m==="minutes"?u:1,q=x.useRef(null);In(()=>{o&&q.current.focus()},[o]);const Y=se=>Math.max(y,Math.min(v,se)),Z=se=>(se+(v+1))%(v+1),ie=se=>{if(!M.current)switch(se.key){case"Home":B(y,"partial"),se.preventDefault();break;case"End":B(v,"partial"),se.preventDefault();break;case"ArrowUp":B(Z(g+G),"partial"),se.preventDefault();break;case"ArrowDown":B(Z(g-G),"partial"),se.preventDefault();break;case"PageUp":B(Y(g+5),"partial"),se.preventDefault();break;case"PageDown":B(Y(g-5),"partial"),se.preventDefault();break;case"Enter":case" ":B(g,"finish"),se.preventDefault();break}};return k.jsxs(oQe,{className:fe(A.root,E),children:[k.jsxs(iQe,{className:A.clock,children:[k.jsx(sQe,{onTouchMove:j,onTouchStart:j,onTouchEnd:L,onMouseUp:W,onMouseMove:V,ownerState:D,className:A.squareMask}),!_&&k.jsxs(x.Fragment,{children:[k.jsx(lQe,{className:A.pin}),a!=null&&k.jsx(JYe,{type:m,viewValue:g,isInner:N,isBetweenTwoClockValues:K})]}),k.jsx(aQe,{"aria-activedescendant":p,"aria-label":P.clockLabelText(m,a==null?null:O.format(a,n?"fullTime12h":"fullTime24h")),ref:q,role:"listbox",onKeyDown:ie,tabIndex:0,className:A.wrapper,children:i})]}),n&&r&&k.jsxs(x.Fragment,{children:[k.jsx(cQe,{onClick:C?void 0:()=>s("am"),disabled:w||c===null,ownerState:D,className:A.amButton,title:Nl(O,"am"),children:k.jsx(KQ,{variant:"caption",className:A.meridiemText,children:Nl(O,"am")})}),k.jsx(uQe,{disabled:w||c===null,onClick:C?void 0:()=>s("pm"),ownerState:D,className:A.pmButton,title:Nl(O,"pm"),children:k.jsx(KQ,{variant:"caption",className:A.meridiemText,children:Nl(O,"pm")})})]})]})}function fQe(e){return qe("MuiClockNumber",e)}const W1=Ke("MuiClockNumber",["root","selected","disabled"]),pQe=["className","classes","disabled","index","inner","label","selected"],hQe=(e,t)=>{const n={root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]};return Me(n,fQe,e)},mQe=ae("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${W1.disabled}`]:t.disabled},{[`&.${W1.selected}`]:t.selected}]})(({theme:e})=>({height:Nu,width:Nu,position:"absolute",left:`calc((100% - ${Nu}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${W1.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${W1.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:z({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function tce(e){const t=Pn({props:e,name:"MuiClockNumber"}),{className:n,classes:r,disabled:o,index:i,inner:a,label:s,selected:l}=t,c=$e(t,pQe),{ownerState:u}=Ur(),f=z({},u,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:o}),p=hQe(r,f),m=i%12/12*Math.PI*2-Math.PI/2,g=(Uy-Nu-2)/2*(a?.65:1),y=Math.round(Math.cos(m)*g),v=Math.round(Math.sin(m)*g);return k.jsx(mQe,z({className:fe(p.root,n),"aria-disabled":o?!0:void 0,"aria-selected":l?!0:void 0,role:"option",style:{transform:`translate(${y}px, ${v+(Uy-Nu)/2}px`},ownerState:f},c,{children:s}))}const gQe=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=f=>a===null?!1:e?f===12?a===12||a===0:a===f||a-12===f:a===f;for(let f=l;f<=c;f+=1){let p=f.toString();f===0&&(p="00");const m=!e&&(f===0||f>12);p=i.formatNumber(p);const g=u(f);s.push(k.jsx(tce,{id:g?o:void 0,index:f,inner:m,selected:g,disabled:r(f),label:p,"aria-label":n(p)},f))}return s},YQ=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return k.jsx(tce,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},Kf=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const s=xn(),[l,c]=ia({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=x.useMemo(()=>a.getTimezone(s,l),[s,a,l]),f=Je(y=>u==null?y:a.setTimezone(s,u,y)),p=x.useMemo(()=>t||u||(o?s.getTimezone(o):"default"),[t,u,o,s]),m=x.useMemo(()=>a.setTimezone(s,p,l),[a,s,p,l]),g=Je((y,...v)=>{const w=f(y);c(w),i==null||i(w,...v)});return{value:m,handleValueChange:g,timezone:p}},kl={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},yQe=e=>Math.max(...e.map(t=>kl[t.type]??1)),f0=(e,t,n)=>{if(t===kl.year)return e.startOfYear(n);if(t===kl.month)return e.startOfMonth(n);if(t===kl.day)return e.startOfDay(n);let r=n;return t<kl.minutes&&(r=e.setMinutes(r,0)),t<kl.seconds&&(r=e.setSeconds(r,0)),t<kl.milliseconds&&(r=e.setMilliseconds(r,0)),r},vQe=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():f0(t,n,Xz(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=f0(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=f0(t,n,e.maxDate));const a=Aw(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=f0(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:hO(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=f0(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:hO(t,i,e.maxTime))),i},nce=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
+`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},xP=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},rce=(e,t,n,r)=>{switch(n){case"month":return Qz(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return xP(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},QQ="s",bQe=["0","1","2","3","4","5","6","7","8","9"],xQe=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),QQ)==="0"?bQe:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),QQ))},Ph=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o<e.length;o+=1){r+=e[o];const i=t.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},Jz=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),XQ=(e,t)=>{const n=Ph(e,t);return n!==" "&&!Number.isNaN(Number(n))},Zz=(e,t)=>Number(e).toString().padStart(t,"0"),oce=(e,t,n,r,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=Zz(i,o.maxLength)),Jz(i,r)},eV=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Ph(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},JQ=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),SQe=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,ice=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return e.lib==="dayjs"&&r==="YY"?!0:e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},wQe=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;l<t.length;l+=1){const c=t[l];r&&c.type==="weekDay"||(o.push(c.format),i.push(eV(c,"non-input",n)))}const a=o.join(" "),s=i.join(" ");return e.parse(s,a)},CQe=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),EQe=(e,t,n)=>{const o=e.map(i=>{const a=eV(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},TQe=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=Qz(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:SQe(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=xP(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Ph(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Ph(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},OQe=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let o=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(o=Zz(o,t.maxLength));const i=xP(e,t.format),a=i.indexOf(o),l=i.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},ZQ={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},eX=(e,t,n,r,o)=>[...n].sort((i,a)=>ZQ[i.type]-ZQ[a.type]).reduce((i,a)=>!o||a.modified?OQe(e,a,t,i):i,r),IQe=()=>navigator.userAgent.toLowerCase().includes("android"),PQe=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,f=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:f}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],f=u===0?null:r[u-1],p=u===e.length-1?null:r[u+1];n[c]={leftIndex:f,rightIndex:p}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},FF=(e,t)=>{if(e==null)return null;if(e==="all")return"all";if(typeof e=="string"){const n=t.findIndex(r=>r.type===e);return n===-1?null:n}return e},AQe=["value","referenceDate"],mo={emptyValue:null,getTodayValue:Xz,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=$e(e,AQe);return r.utils.isValid(t)?t:n??vQe(r)},cleanValue:eQe,areValuesEqual:tQe,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},tV={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getV7HiddenInputValueFromSections:CQe,getV6InputValueFromSections:EQe,parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(t=>z({},t,{value:""}))},nV=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=x.useMemo(()=>mo.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:kl.day,timezone:o,getTodayDate:()=>Xz(n,o,"date")}),[]);return e??i},MQe=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","timezone"],RQe=e=>Me({root:["root"],arrowSwitcher:["arrowSwitcher"]},zYe,e),DQe=ae(bP,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),kQe=ae(Wle,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),_Qe=["hours","minutes"],$Qe=x.forwardRef(function(t,n){const r=xn(),o=Pn({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:f,referenceDate:p,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:y,disableFuture:v,disablePast:w,minutesStep:C=1,shouldDisableTime:E,showViewSwitcher:I,onChange:O,view:P,views:R=_Qe,openTo:D,onViewChange:M,focusedView:A,onFocusedViewChange:_,className:N,classes:B,disabled:H,readOnly:j,timezone:L}=o,V=$e(o,MQe),{value:W,handleValueChange:K,timezone:G}=Kf({name:"TimeClock",timezone:L,value:u,defaultValue:f,referenceDate:p,onChange:O,valueManager:mo}),q=nV({value:W,referenceDate:p,utils:r,props:o,timezone:G}),Y=Ti(),Z=Yh(G),ie=bn(),{ownerState:se}=Ur(),{view:ce,setView:ye,previousView:Se,nextView:ne,setValueAndGoToNextView:le}=Mw({view:P,views:R,openTo:D,onViewChange:M,onChange:K,focusedView:A,onFocusedViewChange:_}),{meridiemMode:de,handleMeridiemChange:oe}=yP(q,i,le),ue=x.useCallback((xe,Re)=>{const he=Aw(m,r),Pe=Re==="hours"||Re==="minutes"&&R.includes("seconds"),ve=({start:te,end:Te})=>!(y&&he(y,Te)||g&&he(te,g)||v&&he(te,Z)||w&&he(Z,Pe?Te:te)),Ie=(te,Te=1)=>{if(te%Te!==0)return!1;if(E)switch(Re){case"hours":return!E(r.setHours(q,te),"hours");case"minutes":return!E(r.setMinutes(q,te),"minutes");case"seconds":return!E(r.setSeconds(q,te),"seconds");default:return!1}return!0};switch(Re){case"hours":{const te=vS(xe,de,i),Te=r.setHours(q,te);if(r.getHours(Te)!==te)return!0;const De=r.setSeconds(r.setMinutes(Te,0),0),Ve=r.setSeconds(r.setMinutes(Te,59),59);return!ve({start:De,end:Ve})||!Ie(te)}case"minutes":{const te=r.setMinutes(q,xe),Te=r.setSeconds(te,0),De=r.setSeconds(te,59);return!ve({start:Te,end:De})||!Ie(xe,C)}case"seconds":{const te=r.setSeconds(q,xe);return!ve({start:te,end:te})||!Ie(xe)}default:throw new Error("not supported")}},[i,q,m,g,de,y,C,E,r,v,w,Z,R]),pe=x.useMemo(()=>{switch(ce){case"hours":{const xe=(Pe,ve)=>{const Ie=vS(Pe,de,i);le(r.setHours(q,Ie),ve,"hours")},Re=r.getHours(q);let he;return i?Re>12?he=[12,23]:he=[0,11]:he=[0,23],{onChange:xe,viewValue:Re,children:gQe({value:W,utils:r,ampm:i,getClockNumberText:Y.hoursClockNumberText,isDisabled:Pe=>H||ue(Pe,"hours"),selectedId:ie}),viewRange:he}}case"minutes":{const xe=r.getMinutes(q);return{viewValue:xe,onChange:(he,Pe)=>{le(r.setMinutes(q,he),Pe,"minutes")},children:YQ({utils:r,value:xe,getClockNumberText:Y.minutesClockNumberText,isDisabled:he=>H||ue(he,"minutes"),selectedId:ie}),viewRange:[0,59]}}case"seconds":{const xe=r.getSeconds(q);return{viewValue:xe,onChange:(he,Pe)=>{le(r.setSeconds(q,he),Pe,"seconds")},children:YQ({utils:r,value:xe,getClockNumberText:Y.secondsClockNumberText,isDisabled:he=>H||ue(he,"seconds"),selectedId:ie}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[ce,r,W,i,Y.hoursClockNumberText,Y.minutesClockNumberText,Y.secondsClockNumberText,de,le,q,ue,ie,H]),Ee=RQe(B);return k.jsxs(DQe,z({ref:n,className:fe(Ee.root,N),ownerState:se},V,{children:[k.jsx(dQe,z({autoFocus:s??!!A,ampmInClock:a&&R.includes("hours"),value:W,type:ce,ampm:i,minutesStep:C,isTimeDisabled:ue,meridiemMode:de,handleMeridiemChange:oe,selectedId:ie,disabled:H,readOnly:j},pe)),I&&k.jsx(kQe,{className:Ee.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ye(Se),isPreviousDisabled:!Se,previousLabel:Y.openPreviousView,onGoToNext:()=>ye(ne),isNextDisabled:!ne,nextLabel:Y.openNextView,ownerState:se})]}))});function NQe(e){return qe("MuiDigitalClock",e)}const jF=Ke("MuiDigitalClock",["root","list","item"]);function dg(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const LQe=e=>{setTimeout(e,0)},Si=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Si(t.shadowRoot):t:null},gO=e=>Array.from(e.children).indexOf(Si(document)),rV="@media (pointer: fine)";function FQe(...e){return e.reduce((t,n)=>(Array.isArray(n)?t.push(...n):n!=null&&t.push(n),t),[])}const jQe=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","views","skipDisabled","timezone"],BQe=e=>Me({root:["root"],list:["list"],item:["item"]},NQe,e),zQe=ae(bP,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:Qle,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),VQe=ae(dI,{name:"MuiDigitalClock",slot:"List"})({padding:0}),HQe=ae(Zt,{name:"MuiDigitalClock",slot:"Item",shouldForwardProp:e=>e!=="itemValue"&&e!=="formattedValue"})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.primary.main,e.palette.action.focusOpacity)}})),UQe=x.forwardRef(function(t,n){const r=xn(),o=x.useRef(null),i=en(n,o),a=x.useRef(null),s=Pn({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:f,slotProps:p,value:m,defaultValue:g,referenceDate:y,disableIgnoringDatePartForTimeValidation:v=!1,maxTime:w,minTime:C,disableFuture:E,disablePast:I,minutesStep:O=1,shouldDisableTime:P,onChange:R,view:D,openTo:M,onViewChange:A,focusedView:_,onFocusedViewChange:N,className:B,classes:H,disabled:j,readOnly:L,views:V=["hours"],skipDisabled:W=!1,timezone:K}=s,G=$e(s,jQe),{value:q,handleValueChange:Y,timezone:Z}=Kf({name:"DigitalClock",timezone:K,value:m,defaultValue:g,referenceDate:y,onChange:R,valueManager:mo}),ie=Ti(),se=Yh(Z),{ownerState:ce}=Ur(),ye=z({},ce,{hasDigitalClockAlreadyBeenRendered:!!o.current}),Se=BQe(H),ne=(f==null?void 0:f.digitalClockItem)??HQe,le=Dn({elementType:ne,externalSlotProps:p==null?void 0:p.digitalClockItem,ownerState:ye,className:Se.item}),de=nV({value:q,referenceDate:y,utils:r,props:s,timezone:Z}),oe=Je(Pe=>Y(Pe,"finish","hours")),{setValueAndGoToNextView:ue}=Mw({view:D,views:V,openTo:M,onViewChange:A,onChange:oe,focusedView:_,onFocusedViewChange:N}),pe=Je(Pe=>{ue(Pe,"finish")});x.useEffect(()=>{if(o.current===null)return;const Pe=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!Pe)return;const ve=Pe.offsetTop;(u||_)&&Pe.focus(),o.current.scrollTop=ve-4});const Ee=x.useCallback(Pe=>{const ve=Aw(v,r),Ie=()=>!(C&&ve(C,Pe)||w&&ve(Pe,w)||E&&ve(Pe,se)||I&&ve(se,Pe)),te=()=>r.getMinutes(Pe)%O!==0?!1:P?!P(Pe,"hours"):!0;return!Ie()||!te()},[v,r,C,w,E,se,I,O,P]),xe=x.useMemo(()=>{const Pe=[];let Ie=r.startOfDay(de);for(;r.isSameDay(de,Ie);)Pe.push(Ie),Ie=r.addMinutes(Ie,c);return Pe},[de,c,r]),Re=xe.findIndex(Pe=>r.isEqual(Pe,de)),he=Pe=>{switch(Pe.key){case"PageUp":{const ve=gO(a.current)-5,Ie=a.current.children,te=Math.max(0,ve),Te=Ie[te];Te&&Te.focus(),Pe.preventDefault();break}case"PageDown":{const ve=gO(a.current)+5,Ie=a.current.children,te=Math.min(Ie.length-1,ve),Te=Ie[te];Te&&Te.focus(),Pe.preventDefault();break}}};return k.jsx(zQe,z({ref:i,className:fe(Se.root,B),ownerState:ye},G,{children:k.jsx(VQe,{ref:a,role:"listbox","aria-label":ie.timePickerToolbarTitle,className:Se.list,onKeyDown:he,children:xe.map((Pe,ve)=>{const Ie=Ee(Pe);if(W&&Ie)return null;const te=r.isEqual(Pe,q),Te=r.format(Pe,l?"fullTime12h":"fullTime24h"),Ve=Re===ve||Re===-1&&ve===0?0:-1;return k.jsx(ne,z({onClick:()=>!L&&pe(Pe),selected:te,disabled:j||Ie,disableRipple:L,role:"option","aria-disabled":L,"aria-selected":te,tabIndex:Ve,itemValue:Pe,formattedValue:Te},le,{children:Te}),`${Pe.valueOf()}-${Te}`)})})}))});function GQe(e){return qe("MuiMultiSectionDigitalClock",e)}const BF=Ke("MuiMultiSectionDigitalClock",["root"]);function qQe(e){return qe("MuiMultiSectionDigitalClockSection",e)}const zF=Ke("MuiMultiSectionDigitalClockSection",["root","item"]),WQe=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],KQe=e=>Me({root:["root"],item:["item"]},qQe,e),YQe=ae(dI,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:Qle,width:56,padding:0,overflow:"hidden",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),QQe=ae(Zt,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:z0,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.primary.main,e.palette.action.focusOpacity)}})),XQe=x.forwardRef(function(t,n){const r=x.useRef(null),o=en(n,r),i=x.useRef(null),a=Pn({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,classes:u,disabled:f,readOnly:p,items:m,active:g,slots:y,slotProps:v,skipDisabled:w}=a,C=$e(a,WQe),{ownerState:E}=Ur(),I=z({},E,{hasDigitalClockAlreadyBeenRendered:!!r.current}),O=KQe(u),P=(y==null?void 0:y.digitalClockSectionItem)??QQe;x.useEffect(()=>{if(r.current===null)return;const M=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(g&&s&&M&&M.focus(),!M||i.current===M)return;i.current=M;const A=M.offsetTop;r.current.scrollTop=A-4});const R=m.findIndex(M=>M.isFocused(M.value)),D=M=>{switch(M.key){case"PageUp":{const A=gO(r.current)-5,_=r.current.children,N=Math.max(0,A),B=_[N];B&&B.focus(),M.preventDefault();break}case"PageDown":{const A=gO(r.current)+5,_=r.current.children,N=Math.min(_.length-1,A),B=_[N];B&&B.focus(),M.preventDefault();break}}};return k.jsx(YQe,z({ref:o,className:fe(O.root,c),ownerState:I,autoFocusItem:s&&g,role:"listbox",onKeyDown:D},C,{children:m.map((M,A)=>{var j;const _=(j=M.isDisabled)==null?void 0:j.call(M,M.value),N=f||_;if(w&&N)return null;const B=M.isSelected(M.value),H=R===A||R===-1&&A===0?0:-1;return k.jsx(P,z({onClick:()=>!p&&l(M.value),selected:B,disabled:N,disableRipple:p,role:"option","aria-disabled":p||N||void 0,"aria-label":M.ariaLabel,"aria-selected":B,tabIndex:H,className:O.item},v==null?void 0:v.digitalClockSectionItem,{children:M.label}),M.label)})}))}),JQe=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(m,g)=>{const y=g??l;return y===null?!1:r?m===12?y===12||y===0:y===m||y-12===m:y===m},f=m=>u(m,n.getHours(s)),p=r?11:23;for(let m=0;m<=p;m+=a){let g=n.format(n.setHours(e,m),r?"hours12h":"hours24h");const y=i(parseInt(g,10).toString());g=n.formatNumber(g),c.push({value:m,label:g,isSelected:u,isDisabled:o,isFocused:f,ariaLabel:y})}return c},tX=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const f=r*u;return{value:f,label:t.formatNumber(o(f)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(f.toString())}})]},ZQe=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","skipDisabled","timezone"],eXe=e=>Me({root:["root"]},GQe,e),tXe=ae(bP,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),nXe=x.forwardRef(function(t,n){const r=xn(),o=vr(),i=Pn({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:f,defaultValue:p,referenceDate:m,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:y,minTime:v,disableFuture:w,disablePast:C,minutesStep:E=1,shouldDisableTime:I,onChange:O,view:P,views:R=["hours","minutes"],openTo:D,onViewChange:M,focusedView:A,onFocusedViewChange:_,className:N,classes:B,disabled:H,readOnly:j,skipDisabled:L=!1,timezone:V}=i,W=$e(i,ZQe),{value:K,handleValueChange:G,timezone:q}=Kf({name:"MultiSectionDigitalClock",timezone:V,value:f,defaultValue:p,referenceDate:m,onChange:O,valueManager:mo}),Y=Ti(),Z=Yh(q),ie=x.useMemo(()=>z({hours:1,minutes:5,seconds:5},s),[s]),se=nV({value:K,referenceDate:m,utils:r,props:i,timezone:q}),ce=Je((ve,Ie,te)=>G(ve,Ie,te)),ye=x.useMemo(()=>!a||!R.includes("hours")||R.includes("meridiem")?R:[...R,"meridiem"],[a,R]),{view:Se,setValueAndGoToNextView:ne,focusedView:le}=Mw({view:P,views:ye,openTo:D,onViewChange:M,onChange:ce,focusedView:A,onFocusedViewChange:_}),de=Je(ve=>{ne(ve,"finish","meridiem")}),{meridiemMode:oe,handleMeridiemChange:ue}=yP(se,a,de,"finish"),pe=x.useCallback((ve,Ie)=>{const te=Aw(g,r),Te=Ie==="hours"||Ie==="minutes"&&ye.includes("seconds"),De=({start:We,end:rt})=>!(v&&te(v,rt)||y&&te(We,y)||w&&te(We,Z)||C&&te(Z,Te?rt:We)),Ve=(We,rt=1)=>{if(We%rt!==0)return!1;if(I)switch(Ie){case"hours":return!I(r.setHours(se,We),"hours");case"minutes":return!I(r.setMinutes(se,We),"minutes");case"seconds":return!I(r.setSeconds(se,We),"seconds");default:return!1}return!0};switch(Ie){case"hours":{const We=vS(ve,oe,a),rt=r.setHours(se,We);if(r.getHours(rt)!==We)return!0;const ut=r.setSeconds(r.setMinutes(rt,0),0),Be=r.setSeconds(r.setMinutes(rt,59),59);return!De({start:ut,end:Be})||!Ve(We)}case"minutes":{const We=r.setMinutes(se,ve),rt=r.setSeconds(We,0),ut=r.setSeconds(We,59);return!De({start:rt,end:ut})||!Ve(ve,E)}case"seconds":{const We=r.setSeconds(se,ve);return!De({start:We,end:We})||!Ve(ve)}default:throw new Error("not supported")}},[a,se,g,y,oe,v,E,I,r,w,C,Z,ye]),Ee=x.useCallback(ve=>{switch(ve){case"hours":return{onChange:Ie=>{const te=vS(Ie,oe,a);ne(r.setHours(se,te),"finish","hours")},items:JQe({now:Z,value:K,ampm:a,utils:r,isDisabled:Ie=>pe(Ie,"hours"),timeStep:ie.hours,resolveAriaLabel:Y.hoursClockNumberText,valueOrReferenceDate:se})};case"minutes":return{onChange:Ie=>{ne(r.setMinutes(se,Ie),"finish","minutes")},items:tX({value:r.getMinutes(se),utils:r,isDisabled:Ie=>pe(Ie,"minutes"),resolveLabel:Ie=>r.format(r.setMinutes(Z,Ie),"minutes"),timeStep:ie.minutes,hasValue:!!K,resolveAriaLabel:Y.minutesClockNumberText})};case"seconds":return{onChange:Ie=>{ne(r.setSeconds(se,Ie),"finish","seconds")},items:tX({value:r.getSeconds(se),utils:r,isDisabled:Ie=>pe(Ie,"seconds"),resolveLabel:Ie=>r.format(r.setSeconds(Z,Ie),"seconds"),timeStep:ie.seconds,hasValue:!!K,resolveAriaLabel:Y.secondsClockNumberText})};case"meridiem":{const Ie=Nl(r,"am"),te=Nl(r,"pm");return{onChange:ue,items:[{value:"am",label:Ie,isSelected:()=>!!K&&oe==="am",isFocused:()=>!!se&&oe==="am",ariaLabel:Ie},{value:"pm",label:te,isSelected:()=>!!K&&oe==="pm",isFocused:()=>!!se&&oe==="pm",ariaLabel:te}]}}default:throw new Error(`Unknown view: ${ve} found.`)}},[Z,K,a,r,ie.hours,ie.minutes,ie.seconds,Y.hoursClockNumberText,Y.minutesClockNumberText,Y.secondsClockNumberText,oe,ne,se,pe,ue]),xe=x.useMemo(()=>{if(!o)return ye;const ve=ye.filter(Ie=>Ie!=="meridiem");return ve.reverse(),ye.includes("meridiem")&&ve.push("meridiem"),ve},[o,ye]),Re=x.useMemo(()=>ye.reduce((ve,Ie)=>z({},ve,{[Ie]:Ee(Ie)}),{}),[ye,Ee]),{ownerState:he}=Ur(),Pe=eXe(B);return k.jsx(tXe,z({ref:n,className:fe(Pe.root,N),ownerState:he,role:"group"},W,{children:xe.map(ve=>k.jsx(XQe,{items:Re[ve].items,onChange:Re[ve].onChange,active:Se===ve,autoFocus:l??le===ve,disabled:H,readOnly:j,slots:c,slotProps:u,skipDisabled:L,"aria-label":Y.selectViewText(ve)},ve))}))});function rXe(e){return qe("MuiPickersDay",e)}const wp=Ke("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function ace(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=e,c=xn(),{ownerState:u}=Ur();return x.useMemo(()=>z({},u,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:c.isSameDay(i,c.startOfWeek(i)),isDayEndOfWeek:c.isSameDay(i,c.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:s??!1,showDaysOutsideCurrentMonth:l??!1}),[c,u,i,n,t,r,o,a,s,l])}const oXe=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],iXe=(e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=t,c=i&&!l;return Me({root:["root",n&&!c&&"selected",r&&"disabled",!a&&"dayWithMargin",!s&&o&&"today",i&&l&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},rXe,e)},sce=({theme:e})=>z({},e.typography.caption,{width:bS,height:bS,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${wp.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${wp.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${wp.disabled}:not(.${wp.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${wp.disabled}&.${wp.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${vP}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${wp.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),lce=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,!n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},aXe=ae(la,{name:"MuiPickersDay",slot:"Root",overridesResolver:lce})(sce),sXe=ae("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:lce})(({theme:e})=>z({},sce({theme:e}),{opacity:0,pointerEvents:"none"})),p0=()=>{},lXe=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,classes:a,isAnimating:s,onClick:l,onDaySelect:c,onFocus:u=p0,onBlur:f=p0,onKeyDown:p=p0,onMouseDown:m=p0,onMouseEnter:g=p0,children:y,day:v,selected:w,disabled:C,today:E,outsideCurrentMonth:I,disableMargin:O,disableHighlightToday:P,showDaysOutsideCurrentMonth:R}=r,D=$e(r,oXe),M=ace({day:v,selected:w,disabled:C,today:E,outsideCurrentMonth:I,disableMargin:O,disableHighlightToday:P,showDaysOutsideCurrentMonth:R}),A=iXe(a,M),_=xn(),N=x.useRef(null),B=en(N,n);In(()=>{o&&!C&&!s&&!I&&N.current.focus()},[o,C,s,I]);const H=L=>{m(L),I&&L.preventDefault()},j=L=>{C||c(v),I&&L.currentTarget.focus(),l&&l(L)};return I&&!R?k.jsx(sXe,{className:fe(A.root,A.hiddenDaySpacingFiller,i),ownerState:M,role:D.role}):k.jsx(aXe,z({className:fe(A.root,i),ref:B,centerRipple:!0,disabled:C,tabIndex:w?0:-1,onKeyDown:L=>p(L,v),onFocus:L=>u(L,v),onBlur:L=>f(L,v),onMouseEnter:L=>g(L,v),onClick:j,onMouseDown:H},D,{ownerState:M,children:y||_.format(v,"dayOfMonth")}))}),cXe=x.memo(lXe),VF=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],HF=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],cce=["minDateTime","maxDateTime"],uXe=[...VF,...HF,...cce],Mv=e=>uXe.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{}),dXe=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","unstableStartFieldRef","unstableEndFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator","autoFocus","focused"],uce=(e,t)=>x.useMemo(()=>{const n=z({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return dXe.forEach(o),t==="date"?VF.forEach(o):t==="time"?HF.forEach(o):t==="date-time"&&(VF.forEach(o),HF.forEach(o),cce.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),fXe=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the component.");return o},pXe=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},hXe=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},mXe=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=nce(e,a),c=ice(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",f=e.isValid(t);let p=f?e.formatByString(t,a):"",m=null;if(u)if(c)m=p===""?e.formatByString(i,a).length:p.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxLength' property on it's adapter`);m=l.maxLength,f&&(p=Jz(Zz(Ph(p,o),m),o))}return z({},l,{format:a,maxLength:m,value:p,placeholder:hXe(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},gXe=e=>{var m;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((g,y)=>y.length-g.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),f=g=>r.find(y=>y.start<=g&&y.end>=g);let p=0;for(;p<n.length;){const g=f(p),y=g!=null,v=(m=l.exec(n.slice(p)))==null?void 0:m[1];if(!y&&v!=null&&c.test(v)){let w=v;for(;w.length>0;){const C=u.exec(w)[1];w=w.slice(C.length),i.push(mXe(z({},e,{now:o,token:C,startSeparator:a}))),a=""}p+=v.length}else{const w=n[p];y&&(g==null?void 0:g.start)===p||(g==null?void 0:g.end)===p||(i.length===0?a+=w:(i[i.length-1].endSeparator+=w,i[i.length-1].isEndFormatSeparator=!0)),p+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},yXe=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),nX=e=>{let t=fXe(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=pXe(z({},e,{expandedFormat:t})),r=gXe(z({},e,{expandedFormat:t,escapedParts:n}));return yXe(z({},e,{sections:r}))},oV=()=>x.useContext(Kz),vXe=()=>{const e=x.useContext(Ule);if(e==null)throw new Error(["MUI X: The `usePickerActionsContext` can only be called in fields that are used as a slot of a Picker component"].join(`
+`));return e},tg=e=>e.saveQuery!=null,dce=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:o,setTempAndroidValueStr:i,updateSectionValue:a}})=>{const s=xn(),l=({keyPressed:f,sectionIndex:p},m,g)=>{const y=f.toLowerCase(),v=n.sections[p];if(n.characterQuery!=null&&(!g||g(n.characterQuery.value))&&n.characterQuery.sectionIndex===p){const C=`${n.characterQuery.value}${y}`,E=m(C,v);if(!tg(E))return o({sectionIndex:p,value:C,sectionType:v.type}),E}const w=m(y,v);return tg(w)&&!w.saveQuery?(o(null),null):(o({sectionIndex:p,value:y,sectionType:v.type}),tg(w)?null:w)},c=f=>{const p=(y,v,w)=>{const C=v.filter(E=>E.toLowerCase().startsWith(w));return C.length===0?{saveQuery:!1}:{sectionValue:C[0],shouldGoToNextSection:C.length===1}},m=(y,v,w,C)=>{const E=I=>rce(s,r,v.type,I);if(v.contentType==="letter")return p(v.format,E(v.format),y);if(w&&C!=null&&nce(s,w).contentType==="letter"){const I=E(w),O=p(w,I,y);return tg(O)?{saveQuery:!1}:z({},O,{sectionValue:C(O.sectionValue,I)})}return{saveQuery:!1}};return l(f,(y,v)=>{switch(v.type){case"month":{const w=C=>JQ(s,C,s.formats.month,v.format);return m(y,v,s.formats.month,w)}case"weekDay":{const w=(C,E)=>E.indexOf(C).toString();return m(y,v,s.formats.weekday,w)}case"meridiem":return m(y,v);default:return{saveQuery:!1}}})},u=f=>{const p=(g,y)=>{const v=Ph(g,e),w=Number(v),C=t[y.type]({currentDate:null,format:y.format,contentType:y.contentType});if(w>C.maximum)return{saveQuery:!1};if(w<C.minimum)return{saveQuery:!0};const E=w*10>C.maximum||v.length===C.maximum.toString().length;return{sectionValue:oce(s,w,C,e,y),shouldGoToNextSection:E}};return l(f,(g,y)=>{if(y.contentType==="digit"||y.contentType==="digit-with-letter")return p(g,y);if(y.type==="month"){ice(s,"digit","month","MM");const v=p(g,{type:y.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(tg(v))return v;const w=JQ(s,v.sectionValue,"MM",y.format);return z({},v,{sectionValue:w})}if(y.type==="weekDay"){const v=p(g,y);if(tg(v))return v;const w=xP(s,y.format)[Number(v.sectionValue)-1];return z({},v,{sectionValue:w})}return{saveQuery:!1}},g=>XQ(g,e))};return Je(f=>{const p=n.sections[f.sectionIndex],g=XQ(f.keyPressed,e)?u(z({},f,{keyPressed:Jz(f.keyPressed,e)})):c(f);if(g==null){i(null);return}a({section:p,newSectionValue:g.sectionValue,shouldGoToNextSection:g.shouldGoToNextSection})})},Rv=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l,minDate:c,maxDate:u}=e,f=r.utils.date(void 0,n);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,f)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,f)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(u&&r.utils.isAfterDay(t,u)):return"maxDate";default:return null}};Rv.valueManager=mo;const Rw=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,f=e.utils.date(void 0,n),p=Aw(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&p(o,t)):return"minTime";case!!(i&&p(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,f)):return"disableFuture";case!!(c&&e.utils.isBefore(t,f)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};Rw.valueManager=mo;const SP=({adapter:e,value:t,timezone:n,props:r})=>{const o=Rv({adapter:e,value:t,timezone:n,props:r});return o!==null?o:Rw({adapter:e,value:t,timezone:n,props:r})};SP.valueManager=mo;function fce(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Kh(),s=x.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);x.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=Je(f=>n({adapter:a,value:f,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const bXe=5e3,pce=e=>{var Re;const t=xn(),n=Ti(),r=Kh(),o=vr(),{manager:{validator:i,valueType:a,internal_valueManager:s,internal_fieldValueManager:l},internalPropsWithDefaults:c,internalPropsWithDefaults:{value:u,defaultValue:f,referenceDate:p,onChange:m,format:g,formatDensity:y="dense",selectedSections:v,onSelectedSectionsChange:w,shouldRespectLeadingZeros:C=!1,timezone:E,enableAccessibleFieldDOMStructure:I=!0},forwardedProps:{error:O}}=e,{value:P,handleValueChange:R,timezone:D}=Kf({name:"a field component",timezone:E,value:u,defaultValue:f,referenceDate:p,onChange:m,valueManager:s}),M=x.useRef(P);x.useEffect(()=>{M.current=P},[P]);const{hasValidationError:A}=fce({props:c,validator:i,timezone:D,value:P,onError:c.onError}),_=x.useMemo(()=>O!==void 0?O:A,[A,O]),N=x.useMemo(()=>xQe(t),[t]),B=x.useMemo(()=>TQe(t,N,D),[t,N,D]),H=x.useCallback(he=>l.getSectionsFromValue(he,Pe=>nX({utils:t,localeText:n,localizedDigits:N,format:g,date:Pe,formatDensity:y,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:I,isRtl:o})),[l,g,n,N,o,C,t,y,I]),[j,L]=x.useState(()=>{const he=H(P),Pe={sections:he,lastExternalValue:P,lastSectionsDependencies:{format:g,isRtl:o,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},ve=yQe(he),Ie=s.getInitialReferenceValue({referenceDate:p,value:P,utils:t,props:c,granularity:ve,timezone:D});return z({},Pe,{referenceValue:Ie})}),[V,W]=ia({controlled:v,default:null,name:"useField",state:"selectedSections"}),K=he=>{W(he),w==null||w(he)},G=x.useMemo(()=>FF(V,j.sections),[V,j.sections]),q=G==="all"?0:G,Y=x.useMemo(()=>PQe(j.sections,o&&!I),[j.sections,o,I]),Z=x.useMemo(()=>j.sections.every(he=>he.value===""),[j.sections]),ie=he=>{const Pe={validationError:i({adapter:r,value:he,timezone:D,props:c})};R(he,Pe)},se=(he,Pe)=>{const ve=[...j.sections];return ve[he]=z({},ve[he],{value:Pe,modified:!0}),ve},ce=x.useRef(null),ye=_o(),Se=he=>{q!=null&&(ce.current={sectionIndex:q,value:he},ye.start(0,()=>{ce.current=null}))},ne=()=>{s.areValuesEqual(t,P,s.emptyValue)?L(he=>z({},he,{sections:he.sections.map(Pe=>z({},Pe,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(L(he=>z({},he,{characterQuery:null})),ie(s.emptyValue))},le=()=>{if(q==null)return;const he=j.sections[q];he.value!==""&&(Se(""),l.getDateFromSection(P,he)===null?L(Pe=>z({},Pe,{sections:se(q,""),tempValueStrAndroid:null,characterQuery:null})):(L(Pe=>z({},Pe,{characterQuery:null})),ie(l.updateDateInValue(P,he,null))))},de=he=>{const Pe=(Ie,te)=>{const Te=t.parse(Ie,g);if(!t.isValid(Te))return null;const De=nX({utils:t,localeText:n,localizedDigits:N,format:g,date:Te,formatDensity:y,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:I,isRtl:o});return eX(t,Te,De,te,!1)},ve=l.parseValueStr(he,j.referenceValue,Pe);ie(ve)},oe=_o(),ue=({section:he,newSectionValue:Pe,shouldGoToNextSection:ve})=>{ye.clear(),oe.clear();const Ie=l.getDateFromSection(P,he);ve&&q<j.sections.length-1&&K(q+1);const te=se(q,Pe),Te=l.getDateSectionsFromValue(te,he),De=wQe(t,Te,N);if(t.isValid(De)){const Ve=eX(t,De,Te,l.getDateFromSection(j.referenceValue,he),!0);return Ie==null&&oe.start(0,()=>{M.current===P&&L(We=>z({},We,{sections:l.clearDateSections(j.sections,he),tempValueStrAndroid:null}))}),ie(l.updateDateInValue(P,he,Ve))}return Te.every(Ve=>Ve.value!=="")?(Se(Pe),ie(l.updateDateInValue(P,he,De))):Ie!=null?(Se(Pe),ie(l.updateDateInValue(P,he,null))):L(Ve=>z({},Ve,{sections:te,tempValueStrAndroid:null}))},pe=he=>L(Pe=>z({},Pe,{tempValueStrAndroid:he})),Ee=Je(he=>{L(Pe=>z({},Pe,{characterQuery:he}))});if(P!==j.lastExternalValue){let he;ce.current!=null&&!t.isValid(l.getDateFromSection(P,j.sections[ce.current.sectionIndex]))?he=se(ce.current.sectionIndex,ce.current.value):he=H(P),L(Pe=>z({},Pe,{lastExternalValue:P,sections:he,sectionsDependencies:{format:g,isRtl:o,locale:t.locale},referenceValue:l.updateReferenceValue(t,P,Pe.referenceValue),tempValueStrAndroid:null}))}if(o!==j.lastSectionsDependencies.isRtl||g!==j.lastSectionsDependencies.format||t.locale!==j.lastSectionsDependencies.locale){const he=H(P);L(Pe=>z({},Pe,{lastSectionsDependencies:{format:g,isRtl:o,locale:t.locale},sections:he,tempValueStrAndroid:null,characterQuery:null}))}j.characterQuery!=null&&!_&&q==null&&Ee(null),j.characterQuery!=null&&((Re=j.sections[j.characterQuery.sectionIndex])==null?void 0:Re.type)!==j.characterQuery.sectionType&&Ee(null),x.useEffect(()=>{ce.current!=null&&(ce.current=null)});const xe=_o();return x.useEffect(()=>(j.characterQuery!=null&&xe.start(bXe,()=>Ee(null)),()=>{}),[j.characterQuery,Ee,xe]),x.useEffect(()=>{j.tempValueStrAndroid!=null&&q!=null&&le()},[j.sections]),{activeSectionIndex:q,areAllSectionsEmpty:Z,error:_,localizedDigits:N,parsedSelectedSections:G,sectionOrder:Y,sectionsValueBoundaries:B,state:j,timezone:D,value:P,clearValue:ne,clearActiveSection:le,setCharacterQuery:Ee,setSelectedSections:K,setTempAndroidValueStr:pe,updateSectionValue:ue,updateValueFromValueStr:de,getSectionsFromValue:H}};function hce(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,o=oV(),i=Hle(),a=en(n.unstableFieldRef,r?null:i==null?void 0:i.fieldRef),s=o==null?void 0:o.setValue,l=x.useCallback((u,f)=>s==null?void 0:s(u,{validationError:f.validationError,shouldClose:!1}),[s]),c=x.useMemo(()=>i!=null&&o!=null?z({value:o.value,onChange:l,timezone:o.timezone,disabled:o.disabled,readOnly:o.readOnly,autoFocus:o.autoFocus&&!o.open,focused:o.open?!0:void 0,format:o.fieldFormat,formatDensity:i.formatDensity,enableAccessibleFieldDOMStructure:i.enableAccessibleFieldDOMStructure,selectedSections:i.selectedSections,onSelectedSectionsChange:i.onSelectedSectionsChange,unstableFieldRef:a},n):n,[o,i,n,l,a]);return t(c)}function iV(e){const{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:o}}=e;if(!n.isReady())return;const i=document.getSelection();if(!i)return;if(r==null){i.rangeCount>0&&n.getRoot().contains(i.getRangeAt(0).startContainer)&&i.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(Si(document)))return;const a=new window.Range;let s;r==="all"?s=n.getRoot():o.sections[r].type==="empty"?s=n.getSectionContainer(r):s=n.getSectionContent(r),a.selectNodeContents(s),s.focus(),i.removeAllRanges(),i.addRange(a)}function mce(e){const t=xn(),{manager:{internal_fieldValueManager:n},internalPropsWithDefaults:{minutesStep:r,disabled:o,readOnly:i},stateResponse:{state:a,value:s,activeSectionIndex:l,parsedSelectedSections:c,sectionsValueBoundaries:u,localizedDigits:f,timezone:p,sectionOrder:m,clearValue:g,clearActiveSection:y,setSelectedSections:v,updateSectionValue:w}}=e;return Je(C=>{if(!o)switch(!0){case((C.ctrlKey||C.metaKey)&&String.fromCharCode(C.keyCode)==="A"&&!C.shiftKey&&!C.altKey):{C.preventDefault(),v("all");break}case C.key==="ArrowRight":{if(C.preventDefault(),c==null)v(m.startIndex);else if(c==="all")v(m.endIndex);else{const E=m.neighbors[c].rightIndex;E!==null&&v(E)}break}case C.key==="ArrowLeft":{if(C.preventDefault(),c==null)v(m.endIndex);else if(c==="all")v(m.startIndex);else{const E=m.neighbors[c].leftIndex;E!==null&&v(E)}break}case C.key==="Delete":{if(C.preventDefault(),i)break;c==null||c==="all"?g():y();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(C.key):{if(C.preventDefault(),i||l==null)break;c==="all"&&v(l);const E=a.sections[l],I=SXe(t,p,E,C.key,u,f,n.getDateFromSection(s,E),{minutesStep:r});w({section:E,newSectionValue:I,shouldGoToNextSection:!1});break}}})}function xXe(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}function SXe(e,t,n,r,o,i,a,s){const l=xXe(r),c=r==="Home",u=r==="End",f=n.value===""||c||u,p=()=>{const g=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),y=C=>oce(e,C,g,i,n),v=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let w;if(f){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?w=g.minimum:w=g.maximum}else w=parseInt(Ph(n.value,i),10)+l*v;return w%v!==0&&((l<0||c)&&(w+=v-(v+w)%v),(l>0||u)&&(w-=w%v)),w>g.maximum?y(g.minimum+(w-g.maximum-1)%(g.maximum-g.minimum+1)):w<g.minimum?y(g.maximum-(g.minimum-w-1)%(g.maximum-g.minimum+1)):y(w)},m=()=>{const g=rce(e,t,n.type,n.format);if(g.length===0)return n.value;if(f)return l>0||c?g[0]:g[g.length-1];const w=((g.indexOf(n.value)+l)%g.length+g.length)%g.length;return g[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?p():m()}function wXe(e){const{manager:t,focused:n,setFocused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:l,sectionOrder:c,state:u,clearValue:f,setCharacterQuery:p,setSelectedSections:m,updateValueFromValueStr:g},internalPropsWithDefaults:{disabled:y=!1,readOnly:v=!1}}=e,w=mce({manager:t,internalPropsWithDefaults:s,stateResponse:i}),C=_o(),E=Je(D=>{y||!o.isReady()||(r(!0),l==="all"?C.start(0,()=>{const M=document.getSelection().getRangeAt(0).startOffset;if(M===0){m(c.startIndex);return}let A=0,_=0;for(;_<M&&A<u.sections.length;){const N=u.sections[A];A+=1,_+=`${N.startSeparator}${N.value||N.placeholder}${N.endSeparator}`.length}m(A-1)}):n?o.getRoot().contains(D.target)||m(c.startIndex):(r(!0),m(c.startIndex)))}),I=Je(D=>{if(!o.isReady()||l!=="all")return;const A=D.target.textContent??"";o.getRoot().innerHTML=u.sections.map(_=>`${_.startSeparator}${_.value||_.placeholder}${_.endSeparator}`).join(""),iV({focused:n,domGetters:o,stateResponse:i}),A.length===0||A.charCodeAt(0)===10?(f(),m("all")):A.length>1?g(A):(l==="all"&&m(0),a({keyPressed:A,sectionIndex:0}))}),O=Je(D=>{if(v||l!=="all"){D.preventDefault();return}const M=D.clipboardData.getData("text");D.preventDefault(),p(null),g(M)}),P=Je(()=>{if(n||y||!o.isReady())return;const D=Si(document);r(!0),o.getSectionIndexFromDOMElement(D)!=null||m(c.startIndex)}),R=Je(()=>{setTimeout(()=>{if(!o.isReady())return;const D=Si(document);!o.getRoot().contains(D)&&(r(!1),m(null))})});return{onKeyDown:w,onBlur:R,onFocus:P,onClick:E,onPaste:O,onInput:I,contentEditable:l==="all",tabIndex:l===0?-1:0}}function CXe(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:o}}=e,i=Je(s=>{o(s.target.value)});return{value:x.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:i}}function EXe(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,r=Je(o=>i=>{n||i.isDefaultPrevented()||t(o)});return x.useCallback(o=>({"data-sectionindex":o,onClick:r(o)}),[r])}function TXe(e){const t=xn(),n=Ti(),r=bn(),{focused:o,domGetters:i,stateResponse:a,applyCharacterEditing:s,manager:{internal_fieldValueManager:l},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:u,state:f,value:p,clearActiveSection:m,setCharacterQuery:g,setSelectedSections:y,updateSectionValue:v,updateValueFromValueStr:w},internalPropsWithDefaults:{disabled:C=!1,readOnly:E=!1}}=e,I=c==="all",O=!I&&!C&&!E,P=Je(N=>{if(!i.isReady())return;const B=f.sections[N];i.getSectionContent(N).innerHTML=B.value||B.placeholder,iV({focused:o,domGetters:i,stateResponse:a})}),R=Je(N=>{if(!i.isReady())return;const B=N.target,H=B.textContent??"",j=i.getSectionIndexFromDOMElement(B),L=f.sections[j];if(E){P(j);return}if(H.length===0){if(L.value===""){P(j);return}const V=N.nativeEvent.inputType;if(V==="insertParagraph"||V==="insertLineBreak"){P(j);return}P(j),m();return}s({keyPressed:H,sectionIndex:j}),P(j)}),D=Je(N=>{N.preventDefault()}),M=Je(N=>{if(N.preventDefault(),E||C||typeof c!="number")return;const B=f.sections[c],H=N.clipboardData.getData("text"),j=/^[a-zA-Z]+$/.test(H),L=/^[0-9]+$/.test(H),V=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(H);B.contentType==="letter"&&j||B.contentType==="digit"&&L||B.contentType==="digit-with-letter"&&V?(g(null),v({section:B,newSectionValue:H,shouldGoToNextSection:!0})):!j&&!L&&(g(null),w(H))}),A=Je(N=>{N.preventDefault(),N.dataTransfer.dropEffect="none"}),_=Je(N=>()=>{C||y(N)});return x.useCallback((N,B)=>{const H=u[N.type]({currentDate:l.getDateFromSection(p,N),contentType:N.contentType,format:N.format});return{onInput:R,onPaste:M,onMouseUp:D,onDragOver:A,onFocus:_(B),"aria-labelledby":`${r}-${N.type}`,"aria-readonly":E,"aria-valuenow":IXe(N,t),"aria-valuemin":H.minimum,"aria-valuemax":H.maximum,"aria-valuetext":N.value?OXe(N,t):n.empty,"aria-label":n[N.type],"aria-disabled":C,tabIndex:I||B>0?-1:0,contentEditable:!I&&!C&&!E,role:"spinbutton",id:`${r}-${N.type}`,"data-range-position":N.dateName||void 0,spellCheck:O?!1:void 0,autoCapitalize:O?"off":void 0,autoCorrect:O?"off":void 0,children:N.value||N.placeholder,inputMode:N.contentType==="letter"?"text":"numeric"}},[u,r,I,C,E,O,n,t,R,M,D,A,_,l,p])}function OXe(e,t){if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}}function IXe(e,t){if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}}const PXe=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:o,internal_useOpenPickerButtonAriaLabel:i}}=e,{internalProps:a,forwardedProps:s}=uce(t,o),l=hce({manager:n,internalProps:a,skipContextFieldRefAssignment:r}),{sectionListRef:c,onBlur:u,onClick:f,onFocus:p,onInput:m,onPaste:g,onKeyDown:y,onClear:v,clearable:w}=s,{disabled:C=!1,readOnly:E=!1,autoFocus:I=!1,focused:O,unstableFieldRef:P}=l,R=x.useRef(null),D=en(c,R),M=x.useMemo(()=>({isReady:()=>R.current!=null,getRoot:()=>R.current.getRoot(),getSectionContainer:xe=>R.current.getSectionContainer(xe),getSectionContent:xe=>R.current.getSectionContent(xe),getSectionIndexFromDOMElement:xe=>R.current.getSectionIndexFromDOMElement(xe)}),[R]),A=pce({manager:n,internalPropsWithDefaults:l,forwardedProps:s}),{areAllSectionsEmpty:_,error:N,parsedSelectedSections:B,sectionOrder:H,state:j,value:L,clearValue:V,setSelectedSections:W}=A,K=dce({stateResponse:A}),G=i(L),[q,Y]=x.useState(!1);function Z(xe=0){if(C||!R.current||rX(R)!=null)return;const Re=FF(xe,j.sections);Y(!0),R.current.getSectionContent(Re).focus()}const ie=wXe({manager:n,internalPropsWithDefaults:l,stateResponse:A,applyCharacterEditing:K,focused:q,setFocused:Y,domGetters:M}),se=CXe({manager:n,stateResponse:A}),ce=EXe({stateResponse:A,internalPropsWithDefaults:l}),ye=TXe({manager:n,stateResponse:A,applyCharacterEditing:K,internalPropsWithDefaults:l,domGetters:M,focused:q}),Se=Je(xe=>{y==null||y(xe),ie.onKeyDown(xe)}),ne=Je(xe=>{u==null||u(xe),ie.onBlur(xe)}),le=Je(xe=>{p==null||p(xe),ie.onFocus(xe)}),de=Je(xe=>{xe.isDefaultPrevented()||(f==null||f(xe),ie.onClick(xe))}),oe=Je(xe=>{g==null||g(xe),ie.onPaste(xe)}),ue=Je(xe=>{m==null||m(xe),ie.onInput(xe)}),pe=Je((xe,...Re)=>{xe.preventDefault(),v==null||v(xe,...Re),V(),oX(R)?W(H.startIndex):Z(0)}),Ee=x.useMemo(()=>j.sections.map((xe,Re)=>{const he=ye(xe,Re);return{container:ce(Re),content:ye(xe,Re),before:{children:xe.startSeparator},after:{children:xe.endSeparator,"data-range-position":xe.isEndFormatSeparator?he["data-range-position"]:void 0}}}),[j.sections,ce,ye]);return x.useEffect(()=>{if(R.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:","","<DatePicker enableAccessibleFieldDOMStructure={false} slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
+`));I&&!C&&R.current&&R.current.getSectionContent(H.startIndex).focus()},[]),In(()=>{if(!(!q||!R.current)){if(B==="all")R.current.getRoot().focus();else if(typeof B=="number"){const xe=R.current.getSectionContent(B);xe&&xe.focus()}}},[B,q]),In(()=>{iV({focused:q,domGetters:M,stateResponse:A})}),x.useImperativeHandle(P,()=>({getSections:()=>j.sections,getActiveSectionIndex:()=>rX(R),setSelectedSections:xe=>{if(C||!R.current)return;const Re=FF(xe,j.sections);Y((Re==="all"?0:Re)!==null),W(xe)},focusField:Z,isFieldFocused:()=>oX(R)})),z({},s,ie,{onBlur:ne,onClick:de,onFocus:le,onInput:ue,onPaste:oe,onKeyDown:Se,onClear:pe},se,{error:N,clearable:!!(w&&!_&&!E&&!C),focused:O??q,sectionListRef:D,enableAccessibleFieldDOMStructure:!0,elements:Ee,areAllSectionsEmpty:_,disabled:C,readOnly:E,autoFocus:I,openPickerAriaLabel:G})};function rX(e){const t=Si(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function oX(e){const t=Si(document);return!!e.current&&e.current.getRoot().contains(t)}const Cg=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),AXe=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const s=e[a],l=eV(s,n?"input-rtl":"input-ltr",t),c=`${s.startSeparator}${l}${s.endSeparator}`,u=Cg(c).length,f=c.length,p=Cg(l),m=o+(p===""?0:l.indexOf(p[0]))+s.startSeparator.length,g=m+p.length;i.push(z({},s,{start:r,end:r+u,startInInput:m,endInInput:g})),r+=u,o+=f}return i},MXe=e=>{const t=vr(),n=_o(),r=_o(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:s,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:u}}=e,{internalProps:f,forwardedProps:p}=uce(o,s),m=hce({manager:i,internalProps:f,skipContextFieldRefAssignment:a}),{onFocus:g,onClick:y,onPaste:v,onBlur:w,onKeyDown:C,onClear:E,clearable:I,inputRef:O,placeholder:P}=p,{readOnly:R=!1,disabled:D=!1,autoFocus:M=!1,focused:A,unstableFieldRef:_}=m,N=x.useRef(null),B=en(O,N),H=pce({manager:i,internalPropsWithDefaults:m,forwardedProps:p}),{activeSectionIndex:j,areAllSectionsEmpty:L,error:V,localizedDigits:W,parsedSelectedSections:K,sectionOrder:G,state:q,value:Y,clearValue:Z,clearActiveSection:ie,setCharacterQuery:se,setSelectedSections:ce,setTempAndroidValueStr:ye,updateSectionValue:Se,updateValueFromValueStr:ne,getSectionsFromValue:le}=H,de=dce({stateResponse:H}),oe=u(Y),ue=x.useMemo(()=>AXe(q.sections,W,t),[q.sections,W,t]);function pe(){const Be=N.current.selectionStart??0;let et;Be<=ue[0].startInInput||Be>=ue[ue.length-1].endInInput?et=1:et=ue.findIndex(It=>It.startInInput-It.startSeparator.length>Be);const Le=et===-1?ue.length-1:et-1;ce(Le)}function Ee(Be=0){var et;Si(document)!==N.current&&((et=N.current)==null||et.focus(),ce(Be))}const xe=Je(Be=>{g==null||g(Be);const et=N.current;n.start(0,()=>{!et||et!==N.current||j==null&&(et.value.length&&Number(et.selectionEnd)-Number(et.selectionStart)===et.value.length?ce("all"):pe())})}),Re=Je((Be,...et)=>{Be.isDefaultPrevented()||(y==null||y(Be,...et),pe())}),he=Je(Be=>{if(v==null||v(Be),Be.preventDefault(),R||D)return;const et=Be.clipboardData.getData("text");if(typeof K=="number"){const Le=q.sections[K],It=/^[a-zA-Z]+$/.test(et),Lt=/^[0-9]+$/.test(et),nt=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(et);if(Le.contentType==="letter"&&It||Le.contentType==="digit"&&Lt||Le.contentType==="digit-with-letter"&&nt){se(null),Se({section:Le,newSectionValue:et,shouldGoToNextSection:!0});return}if(It||Lt)return}se(null),ne(et)}),Pe=Je(Be=>{w==null||w(Be),ce(null)}),ve=Je(Be=>{if(R)return;const et=Be.target.value;if(et===""){Z();return}const Le=Be.nativeEvent.data,It=Le&&Le.length>1,Lt=It?Le:et,nt=Cg(Lt);if(K==="all"&&ce(j),j==null||It){ne(It?Le:nt);return}let lt;if(K==="all"&&nt.length===1)lt=nt;else{const vt=Cg(c.getV6InputValueFromSections(ue,W,t));let bt=-1,vn=-1;for(let Bn=0;Bn<vt.length;Bn+=1)bt===-1&&vt[Bn]!==nt[Bn]&&(bt=Bn),vn===-1&&vt[vt.length-Bn-1]!==nt[nt.length-Bn-1]&&(vn=Bn);const kn=ue[j];if(bt<kn.start||vt.length-vn-1>kn.end)return;const nr=nt.length-vt.length+kn.end-Cg(kn.endSeparator||"").length;lt=nt.slice(kn.start+Cg(kn.startSeparator||"").length,nr)}if(lt.length===0){IQe()&&ye(Lt),ie();return}de({keyPressed:lt,sectionIndex:j})}),Ie=Je((Be,...et)=>{Be.preventDefault(),E==null||E(Be,...et),Z(),iX(N)?ce(G.startIndex):Ee(0)}),te=mce({manager:i,internalPropsWithDefaults:m,stateResponse:H}),Te=Je(Be=>{C==null||C(Be),te(Be)}),De=x.useMemo(()=>P!==void 0?P:c.getV6InputValueFromSections(le(l.emptyValue),W,t),[P,c,le,l.emptyValue,W,t]),Ve=x.useMemo(()=>q.tempValueStrAndroid??c.getV6InputValueFromSections(q.sections,W,t),[q.sections,c,q.tempValueStrAndroid,W,t]);x.useEffect(()=>{N.current&&N.current===Si(document)&&ce("all")},[]),In(()=>{function Be(){if(!N.current)return;if(K==null){N.current.scrollLeft&&(N.current.scrollLeft=0);return}if(N.current!==Si(document))return;const et=N.current.scrollTop;if(K==="all")N.current.select();else{const Le=ue[K],It=Le.type==="empty"?Le.startInInput-Le.startSeparator.length:Le.startInInput,Lt=Le.type==="empty"?Le.endInInput+Le.endSeparator.length:Le.endInInput;(It!==N.current.selectionStart||Lt!==N.current.selectionEnd)&&N.current===Si(document)&&N.current.setSelectionRange(It,Lt),r.start(0,()=>{N.current&&N.current===Si(document)&&N.current.selectionStart===N.current.selectionEnd&&(N.current.selectionStart!==It||N.current.selectionEnd!==Lt)&&Be()})}N.current.scrollTop=et}Be()});const We=x.useMemo(()=>j==null||q.sections[j].contentType==="letter"?"text":"numeric",[j,q.sections]),ut=!(N.current&&N.current===Si(document))&&L;return x.useImperativeHandle(_,()=>({getSections:()=>q.sections,getActiveSectionIndex:()=>{const Be=N.current.selectionStart??0,et=N.current.selectionEnd??0;if(Be===0&&et===0)return null;const Le=Be<=ue[0].startInInput?1:ue.findIndex(It=>It.startInInput-It.startSeparator.length>Be);return Le===-1?ue.length-1:Le-1},setSelectedSections:Be=>ce(Be),focusField:Ee,isFieldFocused:()=>iX(N)})),z({},p,{error:V,clearable:!!(I&&!L&&!R&&!D),onBlur:Pe,onClick:Re,onFocus:xe,onPaste:he,onKeyDown:Te,onClear:Ie,inputRef:B,enableAccessibleFieldDOMStructure:!1,placeholder:De,inputMode:We,autoComplete:"off",value:ut?"":Ve,onChange:ve,focused:A,disabled:D,readOnly:R,autoFocus:M,openPickerAriaLabel:oe})};function iX(e){return e.current===Si(document)}const aV=e=>{const t=Hle();return(e.props.enableAccessibleFieldDOMStructure??(t==null?void 0:t.enableAccessibleFieldDOMStructure)??!0?PXe:MXe)(e)};function RXe(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return x.useMemo(()=>({valueType:"date",validator:Rv,internal_valueManager:mo,internal_fieldValueManager:tV,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:kXe,internal_useOpenPickerButtonAriaLabel:DXe}),[t])}function DXe(e){const t=xn(),n=Ti();return x.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function kXe(e){const t=xn(),n=Dw(e);return x.useMemo(()=>z({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function Dw(e){const t=xn(),n=jle();return x.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:mO(t,e.minDate,n.minDate),maxDate:mO(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}function _Xe(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return x.useMemo(()=>({valueType:"time",validator:Rw,internal_valueManager:mo,internal_fieldValueManager:tV,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:NXe,internal_useOpenPickerButtonAriaLabel:$Xe(n)}),[n,t])}function $Xe(e){return function(n){const r=xn(),o=Ti();return x.useMemo(()=>{const i=e??r.is12HourCycleInCurrentLocale()?"fullTime12h":"fullTime24h",a=r.isValid(n)?r.format(n,i):null;return o.openTimePickerDialogue(a)},[n,o,r])}}function NXe(e){const t=xn(),n=gce(e),r=x.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return x.useMemo(()=>z({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function gce(e){return x.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}function LXe(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return x.useMemo(()=>({valueType:"date-time",validator:SP,internal_valueManager:mo,internal_fieldValueManager:tV,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:jXe,internal_useOpenPickerButtonAriaLabel:FXe}),[t])}function FXe(e){const t=xn(),n=Ti();return x.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function jXe(e){const t=xn(),n=yce(e),r=x.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return x.useMemo(()=>z({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function yce(e){const t=xn(),n=jle();return x.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:mO(t,e.minDateTime??e.minDate,n.minDate),maxDate:mO(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}const BXe=e=>{const t=RXe(e);return aV({manager:t,props:e})};function sV(e){const{ownerState:t}=Ur(),n=vr();return x.useMemo(()=>z({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?"rtl":"ltr"}),[t,e.disabled,e.readOnly,e.required,n])}function zXe(e){return qe("MuiPickersTextField",e)}Ke("MuiPickersTextField",["root","focused","disabled","error","required"]);function VXe(e){return qe("MuiPickersInputBase",e)}const Vg=Ke("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","activeBar"]);function HXe(e){return qe("MuiPickersSectionList",e)}const h0=Ke("MuiPickersSectionList",["root","section","sectionContent"]),UXe=["slots","slotProps","elements","sectionListRef","classes"],vce=ae("div",{name:"MuiPickersSectionList",slot:"Root"})({direction:"ltr /*! @noflip */",outline:"none"}),bce=ae("span",{name:"MuiPickersSectionList",slot:"Section"})({}),xce=ae("span",{name:"MuiPickersSectionList",slot:"SectionSeparator"})({whiteSpace:"pre"}),Sce=ae("span",{name:"MuiPickersSectionList",slot:"SectionContent"})({outline:"none"}),GXe=e=>Me({root:["root"],section:["section"],sectionContent:["sectionContent"]},HXe,e);function qXe(e){const{slots:t,slotProps:n,element:r,classes:o}=e,{ownerState:i}=Ur(),a=(t==null?void 0:t.section)??bce,s=Dn({elementType:a,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:i}),l=(t==null?void 0:t.sectionContent)??Sce,c=Dn({elementType:l,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:i}),u=(t==null?void 0:t.sectionSeparator)??xce,f=Dn({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:z({},i,{separatorPosition:"before"})}),p=Dn({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:z({},i,{separatorPosition:"after"})});return k.jsxs(a,z({},s,{children:[k.jsx(u,z({},f)),k.jsx(l,z({},c)),k.jsx(u,z({},p))]}))}const WXe=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s,classes:l}=r,c=$e(r,UXe),u=GXe(l),{ownerState:f}=Ur(),p=x.useRef(null),m=en(n,p),g=w=>{if(!p.current)throw new Error(`MUI X: Cannot call sectionListRef.${w} before the mount of the component.`);return p.current};x.useImperativeHandle(s,()=>({getRoot(){return g("getRoot")},getSectionContainer(w){return g("getSectionContainer").querySelector(`.${h0.section}[data-sectionindex="${w}"]`)},getSectionContent(w){return g("getSectionContent").querySelector(`.${h0.section}[data-sectionindex="${w}"] .${h0.sectionContent}`)},getSectionIndexFromDOMElement(w){const C=g("getSectionIndexFromDOMElement");if(w==null||!C.contains(w))return null;let E=null;return w.classList.contains(h0.section)?E=w:w.classList.contains(h0.sectionContent)&&(E=w.parentElement),E==null?null:Number(E.dataset.sectionindex)}}));const y=(o==null?void 0:o.root)??vce,v=Dn({elementType:y,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:m,suppressContentEditableWarning:!0},className:u.root,ownerState:f});return k.jsx(y,z({},v,{children:v.contentEditable?a.map(({content:w,before:C,after:E})=>`${C.children}${w.children}${E.children}`).join(""):k.jsx(x.Fragment,{children:a.map((w,C)=>k.jsx(qXe,{slots:o,slotProps:i,element:w,classes:u},C))})}))}),wce=x.createContext(null),wP=()=>{const e=x.useContext(wce);if(e==null)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join(`
+`));return e},KXe=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef","onFocus","onBlur","classes","ownerState"],YXe=e=>Math.round(e*1e5)/1e5,CP=ae("div",{name:"MuiPickersInputBase",slot:"Root"})(({theme:e})=>z({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${YXe(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),lV=ae(vce,{name:"MuiPickersInputBase",slot:"SectionsContainer"})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{fieldDirection:"rtl"},style:{textAlign:"right /*! @noflip */"}},{props:{inputSize:"small"},style:{paddingTop:1}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0},style:{color:"currentColor",opacity:0}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!1},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),QXe=ae(bce,{name:"MuiPickersInputBase",slot:"Section"})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),XXe=ae(Sce,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),JXe=ae(xce,{name:"MuiPickersInputBase",slot:"Separator"})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),ZXe=ae("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(z({},Xbe)),eJe=ae("div",{name:"MuiPickersInputBase",slot:"ActiveBar"})(({theme:e,ownerState:t})=>({display:"none",position:"absolute",height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create(["width","left"],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:"block"},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),tJe=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:o,hasFieldError:i,inputSize:a,isInputInFullWidth:s,inputColor:l,hasStartAdornment:c,hasEndAdornment:u}=t,f={root:["root",n&&!r&&"focused",r&&"disabled",o&&"readOnly",i&&"error",s&&"fullWidth",`color${Oe(l)}`,a==="small"&&"inputSizeSmall",c&&"adornedStart",u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"],activeBar:["activeBar"]};return Me(f,VXe,e)};function aX(e,t,n,r){var o;if(e.content.id){const i=(o=t.current)==null?void 0:o.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(i)return Array.from(i).reduce((a,s)=>a+s.offsetWidth,0)}return 0}function nJe(e,t){var o,i,a,s,l;let n=0;if(((o=t.current)==null?void 0:o.getAttribute("data-active-range-position"))==="end")for(let c=e.length-1;c>=e.length/2;c-=1)n+=aX(e[c],t,c,"end");else for(let c=0;c<e.length/2;c+=1)n+=aX(e[c],t,c,"start");return{activeBarWidth:n,sectionOffsets:[((a=(i=t.current)==null?void 0:i.querySelector('[data-sectionindex="0"]'))==null?void 0:a.offsetLeft)||0,((l=(s=t.current)==null?void 0:s.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:l.offsetLeft)||0]}}const cV=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:f,slots:p,slotProps:m,contentEditable:g,tabIndex:y,onInput:v,onPaste:w,onKeyDown:C,name:E,readOnly:I,inputProps:O,inputRef:P,sectionListRef:R,onFocus:D,onBlur:M,classes:A,ownerState:_}=r,N=$e(r,KXe),B=wP(),H=x.useRef(null),j=x.useRef(null),L=x.useRef([]),V=en(n,H),W=en(O==null?void 0:O.ref,P),K=cl();if(!K)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const G=_??B,q=le=>{var de;(de=K.onFocus)==null||de.call(K,le),D==null||D(le)},Y=le=>{q(le)},Z=le=>{var de,oe;if(C==null||C(le),le.key==="Enter"&&!le.defaultMuiPrevented){if((de=H.current)!=null&&de.dataset.multiInput)return;const ue=(oe=H.current)==null?void 0:oe.closest("form"),pe=ue==null?void 0:ue.querySelector('[type="submit"]');if(!ue||!pe)return;le.preventDefault(),ue.requestSubmit(pe)}},ie=le=>{var de;(de=K.onBlur)==null||de.call(K,le),M==null||M(le)};x.useEffect(()=>{K&&K.setAdornedStart(!!u)},[K,u]),x.useEffect(()=>{K&&(i?K.onEmpty():K.onFilled())},[K,i]);const se=tJe(A,G),ce=(p==null?void 0:p.root)||CP,ye=Dn({elementType:ce,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:N,additionalProps:{"aria-invalid":K.error,ref:V},className:se.root,ownerState:G}),Se=(p==null?void 0:p.input)||lV,ne=o.some(le=>le.content["data-range-position"]!==void 0);return x.useEffect(()=>{if(!ne||!G.isPickerOpen)return;const{activeBarWidth:le,sectionOffsets:de}=nJe(o,H);L.current=[de[0],de[1]],j.current&&(j.current.style.width=`${le}px`)},[o,ne,G.isPickerOpen]),k.jsxs(ce,z({},ye,{children:[u,k.jsx(WXe,{sectionListRef:R,elements:o,contentEditable:g,tabIndex:y,className:se.sectionsContainer,onFocus:q,onBlur:ie,onInput:v,onPaste:w,onKeyDown:Z,slots:{root:Se,section:QXe,sectionContent:XXe,sectionSeparator:JXe},slotProps:{root:z({},m==null?void 0:m.input,{ownerState:G}),sectionContent:{className:Vg.sectionContent},sectionSeparator:({separatorPosition:le})=>({className:le==="before"?Vg.sectionBefore:Vg.sectionAfter})}}),c,f?f(z({},K)):null,k.jsx(ZXe,z({name:E,className:se.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:I,required:K.required,disabled:K.disabled,onFocus:Y},O,{ref:W})),ne&&k.jsx(eJe,{className:se.activeBar,ref:j,ownerState:{sectionOffsets:L.current}})]}))});function rJe(e){return qe("MuiPickersOutlinedInput",e)}const Sl=z({},Vg,Ke("MuiPickersOutlinedInput",["root","notchedOutline","input"])),oJe=["children","className","label","notched","shrink"],iJe=ae("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline"})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),sX=ae("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),aJe=ae("legend",{shouldForwardProp:e=>Ca(e)&&e!=="notched"})(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function sJe(e){const{className:t,label:n,notched:r}=e,o=$e(e,oJe),i=wP();return k.jsx(iJe,z({"aria-hidden":!0,className:t},o,{ownerState:i,children:k.jsx(aJe,{ownerState:i,notched:r,children:n?k.jsx(sX,{children:n}):k.jsx(sX,{className:"notranslate",children:"​"})})}))}const lJe=["label","autoFocus","ownerState","classes","notched"],cJe=ae(CP,{name:"MuiPickersOutlinedInput",slot:"Root"})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Sl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Sl.focused} .${Sl.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Sl.disabled}`]:{[`& .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Sl.error} .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{inputColor:n},style:{[`&.${Sl.focused}:not(.${Sl.error}) .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),uJe=ae(lV,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer"})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),dJe=e=>{const n=Me({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},rJe,e);return z({},e,n)},Cce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersOutlinedInput"}),{label:o,classes:i,notched:a}=r,s=$e(r,lJe),l=cl(),c=dJe(i);return k.jsx(cV,z({slots:{root:cJe,input:uJe},renderSuffix:u=>k.jsx(sJe,{shrink:!!(a||u.adornedStart||u.focused||u.filled),notched:!!(a||u.adornedStart||u.focused||u.filled),className:c.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?k.jsxs(x.Fragment,{children:[o," ","*"]}):o})},s,{label:o,classes:c,ref:n}))});Cce.muiName="Input";function fJe(e){return qe("MuiPickersFilledInput",e)}const Cp=z({},Vg,Ke("MuiPickersFilledInput",["root","underline","input"])),pJe=["label","autoFocus","disableUnderline","hiddenLabel","classes"],hJe=ae(CP,{name:"MuiPickersFilledInput",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Cp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Cp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{inputColor:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Cp.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Cp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Cp.disabled}, .${Cp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Cp.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),mJe=ae(lV,{name:"MuiPickersFilledInput",slot:"sectionsContainer",shouldForwardProp:e=>Ca(e)&&e!=="hiddenLabel"})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:"small"},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:"small"},style:{paddingTop:8,paddingBottom:9}}]}),gJe=(e,t)=>{const{inputHasUnderline:n}=t,o=Me({root:["root",n&&"underline"],input:["input"]},fJe,e);return z({},e,o)},Ece=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,hiddenLabel:a=!1,classes:s}=r,l=$e(r,pJe),c=wP(),u=z({},c,{inputHasUnderline:!i}),f=gJe(s,u);return k.jsx(cV,z({slots:{root:hJe,input:mJe},slotProps:{root:{disableUnderline:i},input:{hiddenLabel:a}}},l,{label:o,classes:f,ref:n,ownerState:u}))});Ece.muiName="Input";function yJe(e){return qe("MuiPickersFilledInput",e)}const m0=z({},Vg,Ke("MuiPickersInput",["root","underline","input"])),vJe=["label","autoFocus","disableUnderline","ownerState","classes"],bJe=ae(CP,{name:"MuiPickersInput",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="disableUnderline"})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{inputColor:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${m0.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${m0.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${m0.disabled}, .${m0.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${m0.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),xJe=(e,t)=>{const{inputHasUnderline:n}=t,o=Me({root:["root",!n&&"underline"],input:["input"]},yJe,e);return z({},e,o)},Tce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,classes:a}=r,s=$e(r,vJe),l=wP(),c=z({},l,{inputHasUnderline:!i}),u=xJe(a,c);return k.jsx(cV,z({slots:{root:bJe},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});Tce.muiName="Input";const SJe=["onFocus","onBlur","className","classes","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps","data-active-range-position"],wJe={standard:Tce,filled:Ece,outlined:Cce},CJe=ae(jh,{name:"MuiPickersTextField",slot:"Root"})({}),EJe=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:o}=t;return Me({root:["root",n&&!r&&"focused",r&&"disabled",o&&"required"]},zXe,e)},Oce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,classes:s,color:l="primary",disabled:c=!1,error:u=!1,variant:f="outlined",required:p=!1,InputProps:m,inputProps:g,inputRef:y,sectionListRef:v,elements:w,areAllSectionsEmpty:C,onClick:E,onKeyDown:I,onKeyUp:O,onPaste:P,onInput:R,endAdornment:D,startAdornment:M,tabIndex:A,contentEditable:_,focused:N,value:B,onChange:H,fullWidth:j,id:L,name:V,helperText:W,FormHelperTextProps:K,label:G,InputLabelProps:q,"data-active-range-position":Y}=r,Z=$e(r,SJe),ie=x.useRef(null),se=en(n,ie),ce=bn(L),ye=W&&ce?`${ce}-helper-text`:void 0,Se=G&&ce?`${ce}-label`:void 0,ne=sV({disabled:r.disabled,required:r.required,readOnly:m==null?void 0:m.readOnly}),le=x.useMemo(()=>z({},ne,{isFieldValueEmpty:C,isFieldFocused:N??!1,hasFieldError:u??!1,inputSize:r.size??"medium",inputColor:l??"primary",isInputInFullWidth:j??!1,hasStartAdornment:!!(M??(m==null?void 0:m.startAdornment)),hasEndAdornment:!!(D??(m==null?void 0:m.endAdornment)),inputHasLabel:!!G}),[ne,C,N,u,r.size,l,j,M,D,m==null?void 0:m.startAdornment,m==null?void 0:m.endAdornment,G]),de=EJe(s,le),oe=wJe[f];return k.jsx(wce.Provider,{value:le,children:k.jsxs(CJe,z({className:fe(de.root,a),ref:se,focused:N,disabled:c,variant:f,error:u,color:l,fullWidth:j,required:p,ownerState:le},Z,{children:[G!=null&&G!==""&&k.jsx(Bh,z({htmlFor:ce,id:Se},q,{children:G})),k.jsx(oe,z({elements:w,areAllSectionsEmpty:C,onClick:E,onKeyDown:I,onKeyUp:O,onInput:R,onPaste:P,onFocus:o,onBlur:i,endAdornment:D,startAdornment:M,tabIndex:A,contentEditable:_,value:B,onChange:H,id:ce,fullWidth:j,inputProps:g,inputRef:y,sectionListRef:v,label:G,name:V,role:"group","aria-labelledby":Se,"aria-describedby":ye,"aria-live":ye?"polite":void 0,"data-active-range-position":Y},m)),W&&k.jsx(aw,z({id:ye},K,{children:W}))]}))})}),TJe=["enableAccessibleFieldDOMStructure"],OJe=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],IJe=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],PJe=["ownerState"],AJe=["ownerState"],MJe=["ownerState"],RJe=["ownerState"],DJe=["InputProps","inputProps"],kJe=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=$e(e,TJe);if(t){const{InputProps:v,readOnly:w,onClear:C,clearable:E,clearButtonPosition:I,openPickerButtonPosition:O,openPickerAriaLabel:P}=n,R=$e(n,OJe);return{clearable:E,onClear:C,clearButtonPosition:I,openPickerButtonPosition:O,openPickerAriaLabel:P,textFieldProps:z({},R,{InputProps:z({},v??{},{readOnly:w})})}}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c,onClear:u,clearable:f,clearButtonPosition:p,openPickerButtonPosition:m,openPickerAriaLabel:g}=n,y=$e(n,IJe);return{clearable:f,onClear:u,clearButtonPosition:p,openPickerButtonPosition:m,openPickerAriaLabel:g,textFieldProps:z({},y,{InputProps:z({},s??{},{readOnly:a}),inputProps:z({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})}},uV=x.createContext({slots:{},slotProps:{},inputRef:void 0});function dV(e){var K,G;const{slots:t,slotProps:n,fieldResponse:r,defaultOpenPickerIcon:o}=e,i=Ti(),a=oV(),s=x.useContext(uV),{textFieldProps:l,onClear:c,clearable:u,openPickerAriaLabel:f,clearButtonPosition:p="end",openPickerButtonPosition:m="end"}=kJe(r),g=sV(l),y=Je(q=>{q.preventDefault(),a==null||a.setOpen(Y=>!Y)}),v=a?a.triggerStatus:"hidden",w=u?p:null,C=v!=="hidden"?m:null,E=(t==null?void 0:t.textField)??s.slots.textField??(r.enableAccessibleFieldDOMStructure===!1?dn:Oce),I=(t==null?void 0:t.inputAdornment)??s.slots.inputAdornment??So,O=Dn({elementType:I,externalSlotProps:TE(s.slotProps.inputAdornment,n==null?void 0:n.inputAdornment),additionalProps:{position:"start"},ownerState:z({},g,{position:"start"})}),P=$e(O,PJe),R=Dn({elementType:I,externalSlotProps:n==null?void 0:n.inputAdornment,additionalProps:{position:"end"},ownerState:z({},g,{position:"end"})}),D=$e(R,AJe),M=s.slots.openPickerButton??pn,A=Dn({elementType:M,externalSlotProps:s.slotProps.openPickerButton,additionalProps:{disabled:v==="disabled",onClick:y,"aria-label":f,edge:l.variant!=="standard"?C:!1},ownerState:g}),_=$e(A,MJe),N=s.slots.openPickerIcon??o,B=Dn({elementType:N,externalSlotProps:s.slotProps.openPickerIcon,ownerState:g}),H=(t==null?void 0:t.clearButton)??s.slots.clearButton??pn,j=Dn({elementType:H,externalSlotProps:TE(s.slotProps.clearButton,n==null?void 0:n.clearButton),className:"clearButton",additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:c,disabled:r.disabled||r.readOnly,edge:l.variant!=="standard"&&w!==C?w:!1},ownerState:g}),L=$e(j,RJe),V=(t==null?void 0:t.clearIcon)??s.slots.clearIcon??TYe,W=Dn({elementType:V,externalSlotProps:TE(s.slotProps.clearIcon,n==null?void 0:n.clearIcon),additionalProps:{fontSize:"small"},ownerState:g});return l.ref=en(l.ref,a==null?void 0:a.rootRef),l.InputProps||(l.InputProps={}),a&&(l.InputProps.ref=a.triggerRef),!((K=l.InputProps)!=null&&K.startAdornment)&&(w==="start"||C==="start")&&(l.InputProps.startAdornment=k.jsxs(I,z({},P,{children:[C==="start"&&k.jsx(M,z({},_,{children:k.jsx(N,z({},B))})),w==="start"&&k.jsx(H,z({},L,{children:k.jsx(V,z({},W))}))]}))),!((G=l.InputProps)!=null&&G.endAdornment)&&(w==="end"||C==="end")&&(l.InputProps.endAdornment=k.jsxs(I,z({},D,{children:[w==="end"&&k.jsx(H,z({},L,{children:k.jsx(V,z({},W))})),C==="end"&&k.jsx(M,z({},_,{children:k.jsx(N,z({},B))}))]}))),w!=null&&(l.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(l.sx)?l.sx:[l.sx]]),k.jsx(E,z({},l))}function TE(e,t){return e?t?n=>z({},kc(t,n),kc(e,n)):e:t}function fV(e){const{ref:t,externalForwardedProps:n,slotProps:r}=e,o=x.useContext(uV),i=oV(),a=sV(n),{InputProps:s,inputProps:l}=n,c=$e(n,DJe),u=Dn({elementType:Oce,externalSlotProps:TE(o.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:c,additionalProps:{ref:t,sx:i==null?void 0:i.rootSx,label:i==null?void 0:i.label,name:i==null?void 0:i.name,className:i==null?void 0:i.rootClassName,inputRef:o.inputRef},ownerState:a});return u.inputProps=z({},l,u.inputProps),u.InputProps=z({},s,u.InputProps),u}function Ice(e){const{slots:t={},slotProps:n={},inputRef:r,children:o}=e,i=x.useMemo(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return k.jsx(uV.Provider,{value:i,children:o})}const _Je=["slots","slotProps"],Pce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDateField"}),{slots:o,slotProps:i}=r,a=$e(r,_Je),s=fV({slotProps:i,ref:n,externalForwardedProps:a}),l=BXe(s);return k.jsx(dV,{slots:o,slotProps:i,fieldResponse:l,defaultOpenPickerIcon:Ble})}),$Je=e=>{const t=_Xe(e);return aV({manager:t,props:e})},NJe=["slots","slotProps","InputProps","inputProps"],Ace=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i}=r,a=$e(r,NJe),s=fV({slotProps:i,ref:n,externalForwardedProps:a}),l=$Je(s);return k.jsx(dV,{slots:o,slotProps:i,fieldResponse:l,defaultOpenPickerIcon:wYe})}),LJe=e=>{const t=LXe(e);return aV({manager:t,props:e})},FJe=["slots","slotProps"],Mce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i}=r,a=$e(r,FJe),s=fV({slotProps:i,ref:n,externalForwardedProps:a}),l=LJe(s);return k.jsx(dV,{slots:o,slotProps:i,fieldResponse:l,defaultOpenPickerIcon:Ble})}),Rce=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Kh();return x.useCallback(c=>Rv({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},jJe=(e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return z({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const o=r.newTimezone;if(t.getTimezone(n.currentMonth)===o)return n;let i=t.setTimezone(n.currentMonth,o);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),z({},n,{currentMonth:i})}case"finishMonthSwitchingAnimation":return z({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},BJe=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:s,onYearChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:f,getCurrentMonthFromVisibleDate:p}=e,m=xn(),g=x.useRef(jJe(!!c,m)).current,y=x.useMemo(()=>mo.getInitialReferenceValue({value:t,utils:m,timezone:f,props:e,referenceDate:n,granularity:kl.day}),[n,f]),[v,w]=x.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:y,currentMonth:m.startOfMonth(y),slideDirection:"left"}),C=Rce({shouldDisableDate:u,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:f});x.useEffect(()=>{w({type:"changeMonthTimezone",newTimezone:m.getTimezone(y)})},[y,m]);const E=Je(({target:O,reason:P})=>{if(P==="cell-interaction"&&v.focusedDay!=null&&m.isSameDay(O,v.focusedDay))return;const R=P==="cell-interaction";let D,M;if(P==="cell-interaction")D=p(O,v.currentMonth),M=O;else if(D=m.isSameMonth(O,v.currentMonth)?v.currentMonth:m.startOfMonth(O),M=O,C(M)){const N=m.startOfMonth(O),B=m.endOfMonth(O);M=SS({utils:m,date:M,minDate:m.isBefore(a,N)?N:a,maxDate:m.isAfter(i,B)?B:i,disablePast:o,disableFuture:r,isDateDisabled:C,timezone:f})}const A=!m.isSameMonth(v.currentMonth,D),_=!m.isSameYear(v.currentMonth,D);A&&(s==null||s(D)),_&&(l==null||l(m.startOfYear(D))),w({type:"setVisibleDate",month:D,direction:m.isAfterDay(D,v.currentMonth)?"left":"right",focusedDay:v.focusedDay!=null&&M!=null&&m.isSameDay(M,v.focusedDay)?v.focusedDay:M,skipAnimation:R})}),I=x.useCallback(()=>{w({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:y,calendarState:v,setVisibleDate:E,isDateDisabled:C,onMonthSwitchingAnimationEnd:I}},zJe=e=>qe("MuiPickersFadeTransitionGroup",e);Ke("MuiPickersFadeTransitionGroup",["root"]);const VJe=["children"],HJe=e=>Me({root:["root"]},zJe,e),UJe=ae(tw,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Dce(e){const t=Pn({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:r,transKey:o,classes:i}=t,{children:a}=t,s=$e(t,VJe),l=HJe(i),c=Lr();if(r)return a;const u=z({},s);return k.jsx(UJe,{className:fe(l.root,n),ownerState:u,children:k.jsx(gh,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},o)})}const GJe=e=>qe("MuiPickersSlideTransition",e),Ps=Ke("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),qJe=["children","className","reduceAnimations","slideDirection","transKey","classes"],WJe=(e,t)=>{const{slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Me(r,GJe,e)},KJe=ae(tw,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Ps["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Ps["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Ps.slideEnterActive}`]:t.slideEnterActive},{[`.${Ps.slideExit}`]:t.slideExit},{[`.${Ps["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Ps["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Ps["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Ps["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Ps.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Ps.slideExit}`]:{transform:"translate(0%)"},[`& .${Ps["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Ps["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function YJe(e){const t=Pn({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:s}=t,l=$e(t,qJe),{ownerState:c}=Ur(),u=z({},c,{slideDirection:i}),f=WJe(s,u),p=Lr();if(o)return k.jsx("div",{className:fe(f.root,r),children:n});const m={exit:f.exit,enterActive:f.enterActive,enter:f.enter,exitActive:f.exitActive};return k.jsx(KJe,{className:fe(f.root,r),childFactory:g=>x.cloneElement(g,{classNames:m}),role:"presentation",ownerState:u,children:k.jsx(Yj,z({mountOnEnter:!0,unmountOnExit:!0,timeout:p.transitions.duration.complex,classNames:m},l,{children:n}),a)})}const QJe=e=>qe("MuiDayCalendar",e);Ke("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const XJe=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],JJe=["ownerState"],ZJe=e=>Me({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},QJe,e),kce=(bS+vP*2)*6,eZe=ae("div",{name:"MuiDayCalendar",slot:"Root"})({}),tZe=ae("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),nZe=ae(at,{name:"MuiDayCalendar",slot:"WeekDayLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),rZe=ae(at,{name:"MuiDayCalendar",slot:"WeekNumberLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),oZe=ae(at,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>z({},e.typography.caption,{width:bS,height:bS,padding:0,margin:`0 ${vP}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),iZe=ae("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:kce}),aZe=ae(YJe,{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:kce}),sZe=ae("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),lZe=ae("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:`${vP}px 0`,display:"flex",justifyContent:"center"});function cZe(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=$e(e,XJe);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:p,slots:m,slotProps:g,timezone:y}=t,v=xn(),w=Yh(y),C=r!=null&&v.isSameDay(n,r),E=s&&C,I=o.some(H=>v.isSameDay(H,n)),O=v.isSameDay(n,w),P=x.useMemo(()=>c||i(n),[c,i,n]),R=x.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),D=ace({day:n,selected:I,disabled:P,today:O,outsideCurrentMonth:R,disableMargin:void 0,disableHighlightToday:u,showDaysOutsideCurrentMonth:p}),M=(m==null?void 0:m.day)??cXe,A=Dn({elementType:M,externalSlotProps:g==null?void 0:g.day,additionalProps:z({disableHighlightToday:u,showDaysOutsideCurrentMonth:p,role:"gridcell",isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},l),ownerState:z({},D,{day:n,isDayDisabled:P,isDaySelected:I})}),_=$e(A,JJe),N=x.useMemo(()=>{const H=v.startOfMonth(v.setMonth(n,a));return p?v.isSameDay(n,v.startOfWeek(H)):v.isSameDay(n,H)},[a,n,p,v]),B=x.useMemo(()=>{const H=v.endOfMonth(v.setMonth(n,a));return p?v.isSameDay(n,v.endOfWeek(H)):v.isSameDay(n,H)},[a,n,p,v]);return k.jsx(M,z({},_,{day:n,disabled:P,autoFocus:!R&&E,today:O,outsideCurrentMonth:R,isFirstVisibleCell:N,isLastVisibleCell:B,selected:I,tabIndex:C?0:-1,"aria-selected":I,"aria-current":O?"date":void 0}))}function uZe(e){const t=Pn({props:e,name:"MuiDayCalendar"}),n=xn(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:s,focusedDay:l,loading:c,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:m,renderLoading:g=()=>k.jsx("span",{children:"..."}),slideDirection:y,TransitionProps:v,disablePast:w,disableFuture:C,minDate:E,maxDate:I,shouldDisableDate:O,shouldDisableMonth:P,shouldDisableYear:R,dayOfWeekFormatter:D=de=>n.format(de,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:A,gridLabelId:_,displayWeekNumber:N,fixedWeekNumber:B,timezone:H}=t,j=Yh(H),L=ZJe(i),V=vr(),W=Rce({shouldDisableDate:O,shouldDisableMonth:P,shouldDisableYear:R,minDate:E,maxDate:I,disablePast:w,disableFuture:C,timezone:H}),K=Ti(),G=Je(de=>{p||u(de)}),q=de=>{W(de)||(r(de),A==null||A(!0))},Y=Je((de,oe)=>{switch(de.key){case"ArrowUp":q(n.addDays(oe,-7)),de.preventDefault();break;case"ArrowDown":q(n.addDays(oe,7)),de.preventDefault();break;case"ArrowLeft":{const ue=n.addDays(oe,V?1:-1),pe=n.addMonths(oe,V?1:-1),Ee=SS({utils:n,date:ue,minDate:V?ue:n.startOfMonth(pe),maxDate:V?n.endOfMonth(pe):ue,isDateDisabled:W,timezone:H});q(Ee||ue),de.preventDefault();break}case"ArrowRight":{const ue=n.addDays(oe,V?-1:1),pe=n.addMonths(oe,V?-1:1),Ee=SS({utils:n,date:ue,minDate:V?n.startOfMonth(pe):ue,maxDate:V?ue:n.endOfMonth(pe),isDateDisabled:W,timezone:H});q(Ee||ue),de.preventDefault();break}case"Home":q(n.startOfWeek(oe)),de.preventDefault();break;case"End":q(n.endOfWeek(oe)),de.preventDefault();break;case"PageUp":q(n.addMonths(oe,1)),de.preventDefault();break;case"PageDown":q(n.addMonths(oe,-1)),de.preventDefault();break}}),Z=Je((de,oe)=>q(oe)),ie=Je((de,oe)=>{l!=null&&n.isSameDay(l,oe)&&(A==null||A(!1))}),se=n.getMonth(a),ce=n.getYear(a),ye=x.useMemo(()=>s.filter(de=>!!de).map(de=>n.startOfDay(de)),[n,s]),Se=`${ce}-${se}`,ne=x.useMemo(()=>x.createRef(),[Se]),le=x.useMemo(()=>{const de=n.getWeekArray(a);let oe=n.addMonths(a,1);for(;B&&de.length<B;){const ue=n.getWeekArray(oe),pe=n.isSameDay(de[de.length-1][0],ue[0][0]);ue.slice(pe?1:0).forEach(Ee=>{de.length<B&&de.push(Ee)}),oe=n.addMonths(oe,1)}return de},[a,B,n]);return k.jsxs(eZe,{role:"grid","aria-labelledby":_,className:L.root,children:[k.jsxs(tZe,{role:"row",className:L.header,children:[N&&k.jsx(rZe,{variant:"caption",role:"columnheader","aria-label":K.calendarWeekNumberHeaderLabel,className:L.weekNumberLabel,children:K.calendarWeekNumberHeaderText}),nQe(n,j).map((de,oe)=>k.jsx(nZe,{variant:"caption",role:"columnheader","aria-label":n.format(de,"weekday"),className:L.weekDayLabel,children:D(de)},oe.toString()))]}),c?k.jsx(iZe,{className:L.loadingContainer,children:g()}):k.jsx(aZe,z({transKey:Se,onExited:f,reduceAnimations:m,slideDirection:y,className:fe(o,L.slideTransition)},v,{nodeRef:ne,children:k.jsx(sZe,{ref:ne,role:"rowgroup",className:L.monthContainer,children:le.map((de,oe)=>k.jsxs(lZe,{role:"row",className:L.weekContainer,"aria-rowindex":oe+1,children:[N&&k.jsx(oZe,{className:L.weekNumber,role:"rowheader","aria-label":K.calendarWeekNumberAriaLabelText(n.getWeekNumber(de[0])),children:K.calendarWeekNumberText(n.getWeekNumber(de[0]))}),de.map((ue,pe)=>k.jsx(cZe,{parentProps:t,day:ue,selectedDays:ye,isViewFocused:M,focusedDay:l,onKeyDown:Y,onFocus:Z,onBlur:ie,onDaySelect:G,isDateDisabled:W,currentMonthNumber:se,"aria-colindex":pe+1},ue.toString()))]},`week-${de[0]}`))})}))]})}function _ce(e){return qe("MuiMonthCalendar",e)}const K1=Ke("MuiMonthCalendar",["root","button","disabled","selected"]),dZe=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],fZe=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return Me(n,_ce,e)},pZe=ae("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${K1.disabled}`]:t.disabled},{[`&.${K1.selected}`]:t.selected}]})(({theme:e})=>z({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${K1.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${K1.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),hZe=x.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:s,onKeyDown:l,onFocus:c,onBlur:u,slots:f,slotProps:p}=t,m=$e(t,dZe),g=x.useRef(null),{ownerState:y}=Ur(),v=z({},y,{isMonthDisabled:o,isMonthSelected:i}),w=fZe(r,v);In(()=>{var I;n&&((I=g.current)==null||I.focus())},[n]);const C=(f==null?void 0:f.monthButton)??pZe,E=Dn({elementType:C,externalSlotProps:p==null?void 0:p.monthButton,externalForwardedProps:m,additionalProps:{disabled:o,ref:g,type:"button",role:"radio","aria-checked":i,onClick:I=>s(I,a),onKeyDown:I=>l(I,a),onFocus:I=>c(I,a),onBlur:I=>u(I,a)},ownerState:v,className:w.button});return k.jsx(C,z({},E))}),mZe=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],gZe=e=>Me({root:["root"]},_ce,e);function yZe(e,t){const n=Pn({props:e,name:t}),r=Dw(n);return z({},n,r,{monthsPerRow:n.monthsPerRow??3})}const vZe=ae("div",{name:"MuiMonthCalendar",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:Vy,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),bZe=x.forwardRef(function(t,n){const r=yZe(t,"MuiMonthCalendar"),{autoFocus:o,className:i,classes:a,value:s,defaultValue:l,referenceDate:c,disabled:u,disableFuture:f,disablePast:p,maxDate:m,minDate:g,onChange:y,shouldDisableMonth:v,readOnly:w,onMonthFocus:C,hasFocus:E,onFocusedViewChange:I,monthsPerRow:O,timezone:P,gridLabelId:R,slots:D,slotProps:M}=r,A=$e(r,mZe),{value:_,handleValueChange:N,timezone:B}=Kf({name:"MonthCalendar",timezone:P,value:s,defaultValue:l,referenceDate:c,onChange:y,valueManager:mo}),H=Yh(B),j=vr(),L=xn(),{ownerState:V}=Ur(),W=x.useMemo(()=>mo.getInitialReferenceValue({value:_,utils:L,props:r,timezone:B,referenceDate:c,granularity:kl.month}),[]),K=gZe(a),G=x.useMemo(()=>L.getMonth(H),[L,H]),q=x.useMemo(()=>_!=null?L.getMonth(_):null,[_,L]),[Y,Z]=x.useState(()=>q||L.getMonth(W)),[ie,se]=ia({name:"MonthCalendar",state:"hasFocus",controlled:E,default:o??!1}),ce=Je(ue=>{se(ue),I&&I(ue)}),ye=x.useCallback(ue=>{const pe=L.startOfMonth(p&&L.isAfter(H,g)?H:g),Ee=L.startOfMonth(f&&L.isBefore(H,m)?H:m),xe=L.startOfMonth(ue);return L.isBefore(xe,pe)||L.isAfter(xe,Ee)?!0:v?v(xe):!1},[f,p,m,g,H,v,L]),Se=Je((ue,pe)=>{if(w)return;const Ee=L.setMonth(_??W,pe);N(Ee)}),ne=Je(ue=>{ye(L.setMonth(_??W,ue))||(Z(ue),ce(!0),C&&C(ue))});x.useEffect(()=>{Z(ue=>q!==null&&ue!==q?q:ue)},[q]);const le=Je((ue,pe)=>{switch(ue.key){case"ArrowUp":ne((12+pe-3)%12),ue.preventDefault();break;case"ArrowDown":ne((12+pe+3)%12),ue.preventDefault();break;case"ArrowLeft":ne((12+pe+(j?1:-1))%12),ue.preventDefault();break;case"ArrowRight":ne((12+pe+(j?-1:1))%12),ue.preventDefault();break}}),de=Je((ue,pe)=>{ne(pe)}),oe=Je((ue,pe)=>{Y===pe&&ce(!1)});return k.jsx(vZe,z({ref:n,className:fe(K.root,i),ownerState:V,role:"radiogroup","aria-labelledby":R,monthsPerRow:O},A,{children:Qz(L,_??W).map(ue=>{const pe=L.getMonth(ue),Ee=L.format(ue,"monthShort"),xe=L.format(ue,"month"),Re=pe===q,he=u||ye(ue);return k.jsx(hZe,{selected:Re,value:pe,onClick:Se,onKeyDown:le,autoFocus:ie&&pe===Y,disabled:he,tabIndex:pe===Y&&!he?0:-1,onFocus:de,onBlur:oe,"aria-current":G===pe?"date":void 0,"aria-label":xe,slots:D,slotProps:M,classes:a,children:Ee},Ee)})}))});function $ce(e){return qe("MuiYearCalendar",e)}const Y1=Ke("MuiYearCalendar",["root","button","disabled","selected"]),xZe=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],SZe=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return Me(n,$ce,e)},wZe=ae("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Y1.disabled}`]:t.disabled},{[`&.${Y1.selected}`]:t.selected}]})(({theme:e})=>z({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:Nt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Nt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Y1.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Y1.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),CZe=x.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:s,onKeyDown:l,onFocus:c,onBlur:u,slots:f,slotProps:p}=t,m=$e(t,xZe),g=x.useRef(null),{ownerState:y}=Ur(),v=z({},y,{isYearDisabled:o,isYearSelected:i}),w=SZe(r,v);In(()=>{var I;n&&((I=g.current)==null||I.focus())},[n]);const C=(f==null?void 0:f.yearButton)??wZe,E=Dn({elementType:C,externalSlotProps:p==null?void 0:p.yearButton,externalForwardedProps:m,additionalProps:{disabled:o,ref:g,type:"button",role:"radio","aria-checked":i,onClick:I=>s(I,a),onKeyDown:I=>l(I,a),onFocus:I=>c(I,a),onBlur:I=>u(I,a)},ownerState:v,className:w.button});return k.jsx(C,z({},E))}),EZe=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],TZe=e=>Me({root:["root"]},$ce,e);function OZe(e,t){const n=Pn({props:e,name:t}),r=Dw(n);return z({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const IZe=ae("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:Vy,maxHeight:BYe,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),PZe=ae("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),AZe=x.forwardRef(function(t,n){const r=OZe(t,"MuiYearCalendar"),{autoFocus:o,className:i,classes:a,value:s,defaultValue:l,referenceDate:c,disabled:u,disableFuture:f,disablePast:p,maxDate:m,minDate:g,onChange:y,readOnly:v,shouldDisableYear:w,onYearFocus:C,hasFocus:E,onFocusedViewChange:I,yearsOrder:O,yearsPerRow:P,timezone:R,gridLabelId:D,slots:M,slotProps:A}=r,_=$e(r,EZe),{value:N,handleValueChange:B,timezone:H}=Kf({name:"YearCalendar",timezone:R,value:s,defaultValue:l,referenceDate:c,onChange:y,valueManager:mo}),j=Yh(H),L=vr(),V=xn(),{ownerState:W}=Ur(),K=x.useMemo(()=>mo.getInitialReferenceValue({value:N,utils:V,props:r,timezone:H,referenceDate:c,granularity:kl.year}),[]),G=TZe(a),q=x.useMemo(()=>V.getYear(j),[V,j]),Y=x.useMemo(()=>N!=null?V.getYear(N):null,[N,V]),[Z,ie]=x.useState(()=>Y||V.getYear(K)),[se,ce]=ia({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),ye=Je(ve=>{ce(ve),I&&I(ve)}),Se=x.useCallback(ve=>{if(p&&V.isBeforeYear(ve,j)||f&&V.isAfterYear(ve,j)||g&&V.isBeforeYear(ve,g)||m&&V.isAfterYear(ve,m))return!0;if(!w)return!1;const Ie=V.startOfYear(ve);return w(Ie)},[f,p,m,g,j,w,V]),ne=Je((ve,Ie)=>{if(v)return;const te=V.setYear(N??K,Ie);B(te)}),le=Je(ve=>{Se(V.setYear(N??K,ve))||(ie(ve),ye(!0),C==null||C(ve))});x.useEffect(()=>{ie(ve=>Y!==null&&ve!==Y?Y:ve)},[Y]);const de=O!=="desc"?P*1:P*-1,oe=L&&O==="asc"||!L&&O==="desc"?-1:1,ue=Je((ve,Ie)=>{switch(ve.key){case"ArrowUp":le(Ie-de),ve.preventDefault();break;case"ArrowDown":le(Ie+de),ve.preventDefault();break;case"ArrowLeft":le(Ie-oe),ve.preventDefault();break;case"ArrowRight":le(Ie+oe),ve.preventDefault();break}}),pe=Je((ve,Ie)=>{le(Ie)}),Ee=Je((ve,Ie)=>{Z===Ie&&ye(!1)}),xe=x.useRef(null),Re=en(n,xe);x.useEffect(()=>{if(o||xe.current===null)return;const ve=xe.current.querySelector('[tabindex="0"]');if(!ve)return;const Ie=ve.offsetHeight,te=ve.offsetTop,Te=xe.current.clientHeight,De=xe.current.scrollTop,Ve=te+Ie;Ie>Te||te<De||(xe.current.scrollTop=Ve-Te/2-Ie/2)},[o]);const he=V.getYearRange([g,m]);O==="desc"&&he.reverse();let Pe=P-he.length%P;return Pe===P&&(Pe=0),k.jsxs(IZe,z({ref:Re,className:fe(G.root,i),ownerState:W,role:"radiogroup","aria-labelledby":D,yearsPerRow:P},_,{children:[he.map(ve=>{const Ie=V.getYear(ve),te=Ie===Y,Te=u||Se(ve);return k.jsx(CZe,{selected:te,value:Ie,onClick:ne,onKeyDown:ue,autoFocus:se&&Ie===Z,disabled:Te,tabIndex:Ie===Z&&!Te?0:-1,onFocus:pe,onBlur:Ee,"aria-current":q===Ie?"date":void 0,slots:M,slotProps:A,classes:a,children:V.format(ve,"year")},V.format(ve,"year"))}),Array.from({length:Pe},(ve,Ie)=>k.jsx(PZe,{},Ie))]}))}),MZe=e=>qe("MuiPickersCalendarHeader",e),RZe=Ke("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),DZe=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],kZe=["ownerState"],_Ze=e=>Me({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},MZe,e),$Ze=ae("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),NZe=ae("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>z({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),LZe=ae("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),FZe=ae(pn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${RZe.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),jZe=ae(bYe,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),BZe=x.forwardRef(function(t,n){const r=Ti(),o=xn(),i=Pn({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:f,maxDate:p,minDate:m,onMonthChange:g,onViewChange:y,view:v,reduceAnimations:w,views:C,labelId:E,className:I,classes:O,timezone:P,format:R=`${o.formats.month} ${o.formats.year}`}=i,D=$e(i,DZe),{ownerState:M}=Ur(),A=_Ze(O),_=(a==null?void 0:a.switchViewButton)??FZe,N=Dn({elementType:_,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(v)},ownerState:M,className:A.switchViewButton}),B=(a==null?void 0:a.switchViewIcon)??jZe,H=Dn({elementType:B,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:M,className:A.switchViewIcon}),j=$e(H,kZe),L=()=>g(o.addMonths(l,1)),V=()=>g(o.addMonths(l,-1)),W=FYe(l,{disableFuture:u,maxDate:p,timezone:P}),K=jYe(l,{disablePast:f,minDate:m,timezone:P}),G=()=>{if(!(C.length===1||!y||c))if(C.length===2)y(C.find(Y=>Y!==v)||C[0]);else{const Y=C.indexOf(v)!==0?0:1;y(C[Y])}};if(C.length===1&&C[0]==="year")return null;const q=o.formatByString(l,R);return k.jsxs($Ze,z({},D,{ownerState:M,className:fe(A.root,I),ref:n,children:[k.jsxs(NZe,{role:"presentation",onClick:G,ownerState:M,"aria-live":"polite",className:A.labelContainer,children:[k.jsx(Dce,{reduceAnimations:w,transKey:q,children:k.jsx(LZe,{id:E,ownerState:M,className:A.label,children:q})}),C.length>1&&!c&&k.jsx(_,z({},N,{children:k.jsx(B,z({},j))}))]}),k.jsx(gh,{in:v==="day",appear:!w,enter:!w,children:k.jsx(Wle,{slots:a,slotProps:s,onGoToPrevious:V,isPreviousDisabled:K,previousLabel:r.previousMonth,onGoToNext:L,isNextDisabled:W,nextLabel:r.nextMonth})})]}))}),zZe="@media (prefers-reduced-motion: reduce)",Hg=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),lX=Hg&&Hg[1]?parseInt(Hg[1],10):null,cX=Hg&&Hg[2]?parseInt(Hg[2],10):null,VZe=lX&&lX<10||cX&&cX<13||!1;function Nce(e){const t=If(zZe,{defaultMatches:!1});return e??(t||VZe)}const HZe=e=>qe("MuiDateCalendar",e);Ke("MuiDateCalendar",["root","viewTransitionContainer"]);const UZe=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],GZe=e=>Me({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},HZe,e);function qZe(e,t){const n=Pn({props:e,name:t}),r=Nce(n.reduceAnimations),o=Dw(n);return z({},n,o,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:r,renderLoading:n.renderLoading??(()=>k.jsx("span",{children:"..."}))})}const WZe=ae(bP,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:Hy}),KZe=ae(Dce,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),YZe=x.forwardRef(function(t,n){const r=xn(),{ownerState:o}=Ur(),i=bn(),a=qZe(t,"MuiDateCalendar"),{autoFocus:s,onViewChange:l,value:c,defaultValue:u,referenceDate:f,disableFuture:p,disablePast:m,onChange:g,onMonthChange:y,reduceAnimations:v,shouldDisableDate:w,shouldDisableMonth:C,shouldDisableYear:E,view:I,views:O,openTo:P,className:R,classes:D,disabled:M,readOnly:A,minDate:_,maxDate:N,disableHighlightToday:B,focusedView:H,onFocusedViewChange:j,showDaysOutsideCurrentMonth:L,fixedWeekNumber:V,dayOfWeekFormatter:W,slots:K,slotProps:G,loading:q,renderLoading:Y,displayWeekNumber:Z,yearsOrder:ie,yearsPerRow:se,monthsPerRow:ce,timezone:ye}=a,Se=$e(a,UZe),{value:ne,handleValueChange:le,timezone:de}=Kf({name:"DateCalendar",timezone:ye,value:c,defaultValue:u,referenceDate:f,onChange:g,valueManager:mo}),{view:oe,setView:ue,focusedView:pe,setFocusedView:Ee,goToNextView:xe,setValueAndGoToNextView:Re}=Mw({view:I,views:O,openTo:P,onChange:le,onViewChange:l,autoFocus:s,focusedView:H,onFocusedViewChange:j}),{referenceDate:he,calendarState:Pe,setVisibleDate:ve,isDateDisabled:Ie,onMonthSwitchingAnimationEnd:te}=BJe({value:ne,referenceDate:f,reduceAnimations:v,onMonthChange:y,minDate:_,maxDate:N,shouldDisableDate:w,disablePast:m,disableFuture:p,timezone:de,getCurrentMonthFromVisibleDate:(bt,vn)=>r.isSameMonth(bt,vn)?vn:r.startOfMonth(bt)}),Te=M&&ne||_,De=M&&ne||N,Ve=`${i}-grid-label`,We=pe!==null,rt=(K==null?void 0:K.calendarHeader)??BZe,ut=Dn({elementType:rt,externalSlotProps:G==null?void 0:G.calendarHeader,additionalProps:{views:O,view:oe,currentMonth:Pe.currentMonth,onViewChange:ue,onMonthChange:bt=>ve({target:bt,reason:"header-navigation"}),minDate:Te,maxDate:De,disabled:M,disablePast:m,disableFuture:p,reduceAnimations:v,timezone:de,labelId:Ve},ownerState:o}),Be=Je(bt=>{const vn=r.startOfMonth(bt),kn=r.endOfMonth(bt),Rr=Ie(bt)?SS({utils:r,date:bt,minDate:r.isBefore(_,vn)?vn:_,maxDate:r.isAfter(N,kn)?kn:N,disablePast:m,disableFuture:p,isDateDisabled:Ie,timezone:de}):bt;Rr?(Re(Rr,"finish"),ve({target:Rr,reason:"cell-interaction"})):(xe(),ve({target:vn,reason:"cell-interaction"}))}),et=Je(bt=>{const vn=r.startOfYear(bt),kn=r.endOfYear(bt),Rr=Ie(bt)?SS({utils:r,date:bt,minDate:r.isBefore(_,vn)?vn:_,maxDate:r.isAfter(N,kn)?kn:N,disablePast:m,disableFuture:p,isDateDisabled:Ie,timezone:de}):bt;Rr?(Re(Rr,"finish"),ve({target:Rr,reason:"cell-interaction"})):(xe(),ve({target:vn,reason:"cell-interaction"}))}),Le=Je(bt=>le(bt&&hO(r,bt,ne??he),"finish",oe));x.useEffect(()=>{r.isValid(ne)&&ve({target:ne,reason:"controlled-value-change"})},[ne]);const It=GZe(D),Lt={disablePast:m,disableFuture:p,maxDate:N,minDate:_},nt={disableHighlightToday:B,readOnly:A,disabled:M,timezone:de,gridLabelId:Ve,slots:K,slotProps:G},lt=x.useRef(oe);x.useEffect(()=>{lt.current!==oe&&(pe===lt.current&&Ee(oe,!0),lt.current=oe)},[pe,Ee,oe]);const vt=x.useMemo(()=>[ne],[ne]);return k.jsxs(WZe,z({ref:n,className:fe(It.root,R),ownerState:o},Se,{children:[k.jsx(rt,z({},ut,{slots:K,slotProps:G})),k.jsx(KZe,{reduceAnimations:v,className:It.viewTransitionContainer,transKey:oe,ownerState:o,children:k.jsxs("div",{children:[oe==="year"&&k.jsx(AZe,z({},Lt,nt,{value:ne,onChange:et,shouldDisableYear:E,hasFocus:We,onFocusedViewChange:bt=>Ee("year",bt),yearsOrder:ie,yearsPerRow:se,referenceDate:he})),oe==="month"&&k.jsx(bZe,z({},Lt,nt,{hasFocus:We,className:R,value:ne,onChange:Be,shouldDisableMonth:C,onFocusedViewChange:bt=>Ee("month",bt),monthsPerRow:ce,referenceDate:he})),oe==="day"&&k.jsx(uZe,z({},Pe,Lt,nt,{onMonthSwitchingAnimationEnd:te,hasFocus:We,onFocusedDayChange:bt=>ve({target:bt,reason:"cell-interaction"}),reduceAnimations:v,selectedDays:vt,onSelectedDaysChange:Le,shouldDisableDate:w,shouldDisableMonth:C,shouldDisableYear:E,onFocusedViewChange:bt=>Ee("day",bt),showDaysOutsideCurrentMonth:L,fixedWeekNumber:V,dayOfWeekFormatter:W,displayWeekNumber:Z,loading:q,renderLoading:Y}))]})})]}))});function Lce(e){return qe("MuiPickersToolbar",e)}const QZe=Ke("MuiPickersToolbar",["root","title","content"]);function EP(){const{ownerState:e}=Ur(),t=vr();return x.useMemo(()=>z({},e,{toolbarDirection:t?"rtl":"ltr"}),[e,t])}const XZe=["children","className","classes","toolbarTitle","hidden","titleId","classes","landscapeDirection"],JZe=e=>Me({root:["root"],title:["title"],content:["content"]},Lce,e),ZZe=ae("div",{name:"MuiPickersToolbar",slot:"Root"})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{pickerOrientation:"landscape"},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),eet=ae("div",{name:"MuiPickersToolbar",slot:"Content",shouldForwardProp:e=>Ca(e)&&e!=="landscapeDirection"})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{pickerOrientation:"landscape"},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{pickerOrientation:"landscape",landscapeDirection:"row"},style:{flexDirection:"row"}}]}),pV=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,classes:a,toolbarTitle:s,hidden:l,titleId:c,landscapeDirection:u}=r,f=$e(r,XZe),p=EP(),m=JZe(a);return l?null:k.jsxs(ZZe,z({ref:n,className:fe(m.root,i),ownerState:p},f,{children:[k.jsx(at,{color:"text.secondary",variant:"overline",id:c,className:m.title,children:s}),k.jsx(eet,{className:m.content,ownerState:p,landscapeDirection:u,children:o})]}))});function tet(e){return qe("MuiDatePickerToolbar",e)}Ke("MuiDatePickerToolbar",["root","title"]);const net=["toolbarFormat","toolbarPlaceholder","className","classes"],ret=e=>Me({root:["root"],title:["title"]},tet,e),oet=ae(pV,{name:"MuiDatePickerToolbar",slot:"Root"})({}),iet=ae(at,{name:"MuiDatePickerToolbar",slot:"Title"})({variants:[{props:{pickerOrientation:"landscape"},style:{margin:"auto 16px auto auto"}}]}),aet=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDatePickerToolbar"}),{toolbarFormat:o,toolbarPlaceholder:i="––",className:a,classes:s}=r,l=$e(r,net),c=xn(),{value:u,views:f,orientation:p}=Wc(),m=Ti(),g=EP(),y=ret(s),v=x.useMemo(()=>{if(!c.isValid(u))return i;const w=wS(c,{format:o,views:f},!0);return c.formatByString(u,w)},[u,o,i,c,f]);return k.jsx(oet,z({ref:n,toolbarTitle:m.datePickerToolbarTitle,className:fe(y.root,a)},l,{children:k.jsx(iet,{variant:"h4",align:p==="landscape"?"left":"center",ownerState:g,className:y.title,children:v})}))});function Fce(e,t){const n=Pn({props:e,name:t}),r=Dw(n),o=x.useMemo(()=>{var i;return((i=n.localeText)==null?void 0:i.toolbarTitle)==null?n.localeText:z({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle})},[n.localeText]);return z({},n,r,{localeText:o},Yz({views:n.views,openTo:n.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{slots:z({toolbar:aet},n.slots)})}function set(e){return qe("MuiPickerPopper",e)}Ke("MuiPickerPopper",["root","paper"]);const cet=["PaperComponent","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],uet=e=>Me({root:["root"],paper:["paper"]},set,e),det=ae(lv,{name:"MuiPickerPopper",slot:"Root"})(({theme:e})=>({zIndex:e.zIndex.modal})),fet=ae(go,{name:"MuiPickerPopper",slot:"Paper"})({outline:0,transformOrigin:"top center",variants:[{props:({popperPlacement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function pet(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function het(e,t){const n=x.useRef(!1),r=x.useRef(!1),o=x.useRef(null),i=x.useRef(!1);x.useEffect(()=>{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=Je(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=Mr(o.current);if(!o.current||"clientX"in l&&pet(l,u))return;if(n.current){n.current=!1;return}let f;l.composedPath?f=l.composedPath().indexOf(o.current)>-1:f=!u.documentElement.contains(l.target)||o.current.contains(l.target),!f&&!c&&t(l)}),s=()=>{r.current=!0};return x.useEffect(()=>{if(e){const l=Mr(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),x.useEffect(()=>{if(e){const l=Mr(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const met=x.forwardRef((e,t)=>{const{PaperComponent:n,ownerState:r,children:o,paperSlotProps:i,paperClasses:a,onPaperClick:s,onPaperTouchStart:l}=e,c=$e(e,cet),u=Dn({elementType:n,externalSlotProps:i,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:a,ownerState:r});return k.jsx(n,z({},c,u,{onClick:f=>{var p;s(f),(p=u.onClick)==null||p.call(u,f)},onTouchStart:f=>{var p;l(f),(p=u.onTouchStart)==null||p.call(u,f)},ownerState:r,children:o}))});function get(e){const t=Pn({props:e,name:"MuiPickerPopper"}),{children:n,placement:r="bottom-start",slots:o,slotProps:i,classes:a}=t,{open:s,popupRef:l,reduceAnimations:c}=Wc(),{dismissViews:u,getCurrentViewMode:f,onPopperExited:p,triggerElement:m,viewContainerRole:g}=Ur();x.useEffect(()=>{function V(W){s&&W.key==="Escape"&&u()}return document.addEventListener("keydown",V),()=>{document.removeEventListener("keydown",V)}},[u,s]);const y=x.useRef(null);x.useEffect(()=>{g==="tooltip"||f()==="field"||(s?y.current=Si(document):y.current&&y.current instanceof HTMLElement&&setTimeout(()=>{y.current instanceof HTMLElement&&y.current.focus()}))},[s,g,f]);const v=uet(a),{ownerState:w,rootRefObject:C}=Ur(),E=z({},w,{popperPlacement:r}),I=Je(()=>{g==="tooltip"?LQe(()=>{var V,W;(V=C.current)!=null&&V.contains(Si(document))||(W=l.current)!=null&&W.contains(Si(document))||u()}):u()}),[O,P,R]=het(s,I),D=x.useRef(null),M=en(D,l),A=en(M,O),_=V=>{V.key==="Escape"&&(V.stopPropagation(),u())},N=(o==null?void 0:o.desktopTransition)??c?gh:yh,B=(o==null?void 0:o.desktopTrapFocus)??cB,H=(o==null?void 0:o.desktopPaper)??fet,j=(o==null?void 0:o.popper)??det,L=Dn({elementType:j,externalSlotProps:i==null?void 0:i.popper,additionalProps:{transition:!0,role:g??void 0,open:s,placement:r,anchorEl:m,onKeyDown:_},className:v.root,ownerState:E});return k.jsx(j,z({},L,{children:({TransitionProps:V})=>k.jsx(B,z({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:g==="tooltip",isEnabled:()=>!0},i==null?void 0:i.desktopTrapFocus,{children:k.jsx(N,z({},V,i==null?void 0:i.desktopTransition,{onExited:W=>{var K,G,q;p==null||p(),(G=(K=i==null?void 0:i.desktopTransition)==null?void 0:K.onExited)==null||G.call(K,W),(q=V==null?void 0:V.onExited)==null||q.call(V)},children:k.jsx(met,{PaperComponent:H,ownerState:E,ref:A,onPaperClick:P,onPaperTouchStart:R,paperClasses:v.paper,paperSlotProps:i==null?void 0:i.desktopPaper,children:n})}))}))}))}function uX(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}function yet(e,t){const[n,r]=x.useState(uX);return In(()=>{const o=()=>{r(uX())};return window.addEventListener("orientationchange",o),()=>{window.removeEventListener("orientationchange",o)}},[]),dg(e,["hours","minutes","seconds"])?"portrait":t??n}function vet(e){const{props:t,valueManager:n,validator:r}=e,{value:o,defaultValue:i,onChange:a,referenceDate:s,timezone:l,onAccept:c,closeOnSelect:u,open:f,onOpen:p,onClose:m}=t,{current:g}=x.useRef(i),{current:y}=x.useRef(o!==void 0),{current:v}=x.useRef(f!==void 0),w=xn(),{timezone:C,value:E,handleValueChange:I}=Kf({name:"a picker component",timezone:l,value:o,defaultValue:g,referenceDate:s,onChange:a,valueManager:n}),[O,P]=x.useState(()=>({open:!1,lastExternalValue:E,clockShallowValue:void 0,lastCommittedValue:E,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:R}=fce({props:t,validator:r,timezone:C,value:E,onError:t.onError}),D=Je(N=>{const B=typeof N=="function"?N(O.open):N;v||P(H=>z({},H,{open:B})),B&&p&&p(),B||m==null||m()}),M=Je((N,B)=>{const{changeImportance:H="accept",skipPublicationIfPristine:j=!1,validationError:L,shortcut:V,shouldClose:W=H==="accept"}=B??{};let K,G;!j&&!y&&!O.hasBeenModifiedSinceMount?(K=!0,G=H==="accept"):(K=!n.areValuesEqual(w,N,E),G=H==="accept"&&!n.areValuesEqual(w,N,O.lastCommittedValue)),P(Z=>z({},Z,{clockShallowValue:K?void 0:Z.clockShallowValue,lastCommittedValue:G?E:Z.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let q=null;const Y=()=>(q||(q={validationError:L??R(N)},V&&(q.shortcut=V)),q);K&&I(N,Y()),G&&c&&c(N,Y()),W&&D(!1)});E!==O.lastExternalValue&&P(N=>z({},N,{lastExternalValue:E,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));const A=Je((N,B="partial")=>{if(B==="shallow"){P(H=>z({},H,{clockShallowValue:N,hasBeenModifiedSinceMount:!0}));return}M(N,{changeImportance:B==="finish"&&u?"accept":"set"})});x.useEffect(()=>{if(v){if(f===void 0)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");P(N=>z({},N,{open:f}))}},[v,f]);const _=x.useMemo(()=>n.cleanValue(w,O.clockShallowValue===void 0?E:O.clockShallowValue),[w,n,O.clockShallowValue,E]);return{timezone:C,state:O,setValue:M,setValueFromView:A,setOpen:D,value:E,viewValue:_}}const bet=["className","sx"],jce=({ref:e,props:t,valueManager:n,valueType:r,variant:o,validator:i,onPopperExited:a,autoFocusView:s,rendererInterceptor:l,localeText:c,viewContainerRole:u,getStepNavigation:f})=>{const{views:p,view:m,openTo:g,onViewChange:y,viewRenderers:v,reduceAnimations:w,orientation:C,disableOpenPicker:E,closeOnSelect:I,disabled:O,readOnly:P,formatDensity:R,enableAccessibleFieldDOMStructure:D,selectedSections:M,onSelectedSectionsChange:A,format:_,label:N,autoFocus:B,name:H}=t,{className:j,sx:L}=t,V=$e(t,bet),W=bn(),K=xn(),G=Kh(),q=Nce(w),Y=yet(p,C),{current:Z}=x.useRef(g??null),[ie,se]=x.useState(null),ce=x.useRef(null),ye=x.useRef(null),Se=x.useRef(null),ne=en(e,Se),{timezone:le,state:de,setOpen:oe,setValue:ue,setValueFromView:pe,value:Ee,viewValue:xe}=vet({props:t,valueManager:n,validator:i}),{view:Re,setView:he,defaultView:Pe,focusedView:ve,setFocusedView:Ie,setValueAndGoToNextView:te,goToNextStep:Te,hasNextStep:De,hasSeveralSteps:Ve}=Mw({view:m,views:p,openTo:g,onChange:pe,onViewChange:y,autoFocus:s,getStepNavigation:f}),We=Je(()=>ue(n.emptyValue)),rt=Je(()=>ue(n.getTodayValue(K,le,r))),ut=Je(()=>ue(Ee)),Be=Je(()=>ue(de.lastCommittedValue,{skipPublicationIfPristine:!0})),et=Je(()=>{ue(Ee,{skipPublicationIfPristine:!0})}),{hasUIView:Le,viewModeLookup:It,timeViewsCount:Lt}=x.useMemo(()=>p.reduce((un,gt)=>{const kt=v[gt]==null?"field":"UI";return un.viewModeLookup[gt]=kt,kt==="UI"&&(un.hasUIView=!0,Ih(gt)&&(un.timeViewsCount+=1)),un},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[v,p]),nt=It[Re],lt=Je(()=>nt),[vt,bt]=x.useState(nt==="UI"?Re:null);vt!==Re&&It[Re]==="UI"&&bt(Re),In(()=>{nt==="field"&&de.open&&(oe(!1),setTimeout(()=>{var un,gt;(un=ye==null?void 0:ye.current)==null||un.setSelectedSections(Re),(gt=ye==null?void 0:ye.current)==null||gt.focusField(Re)}))},[Re]),In(()=>{if(!de.open)return;let un=Re;nt==="field"&&vt!=null&&(un=vt),un!==Pe&&It[un]==="UI"&&It[Pe]==="UI"&&(un=Pe),un!==Re&&he(un),Ie(un,!0)},[de.open]);const vn=x.useMemo(()=>({isPickerValueEmpty:n.areValuesEqual(K,Ee,n.emptyValue),isPickerOpen:de.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:Y,pickerVariant:o}),[K,n,Ee,de.open,Y,o,t.disabled,t.readOnly]),kn=x.useMemo(()=>E||!Le?"hidden":O||P?"disabled":"enabled",[E,Le,O,P]),Rr=Je(Te),nr=x.useMemo(()=>I&&!Ve?[]:["cancel","nextOrAccept"],[I,Ve]),Bn=x.useMemo(()=>({setValue:ue,setOpen:oe,clearValue:We,setValueToToday:rt,acceptValueChanges:ut,cancelValueChanges:Be,setView:he,goToNextStep:Rr}),[ue,oe,We,rt,ut,Be,he,Rr]),yo=x.useMemo(()=>z({},Bn,{value:Ee,timezone:le,open:de.open,views:p,view:vt,initialView:Z,disabled:O??!1,readOnly:P??!1,autoFocus:B??!1,variant:o,orientation:Y,popupRef:ce,reduceAnimations:q,triggerRef:se,triggerStatus:kn,hasNextStep:De,fieldFormat:_??"",name:H,label:N,rootSx:L,rootRef:ne,rootClassName:j}),[Bn,Ee,ne,o,Y,q,O,P,_,j,H,N,L,kn,De,le,de.open,vt,p,Z,B]),Oo=x.useMemo(()=>({dismissViews:et,ownerState:vn,hasUIView:Le,getCurrentViewMode:lt,rootRefObject:Se,labelId:W,triggerElement:ie,viewContainerRole:u,defaultActionBarActions:nr,onPopperExited:a}),[et,vn,Le,lt,W,ie,u,nr,a]),oo=x.useMemo(()=>({formatDensity:R,enableAccessibleFieldDOMStructure:D,selectedSections:M,onSelectedSectionsChange:A,fieldRef:ye}),[R,D,M,A,ye]);return{providerProps:{localeText:c,contextValue:yo,privateContextValue:Oo,actionsContextValue:Bn,fieldPrivateContextValue:oo,isValidContextValue:un=>{const gt=i({adapter:G,value:un,timezone:le,props:t});return!n.hasError(gt)}},renderCurrentView:()=>{if(vt==null)return null;const un=v[vt];if(un==null)return null;const gt=z({},V,{views:p,timezone:le,value:xe,onChange:te,view:vt,onViewChange:he,showViewSwitcher:Lt>1,timeViewsCount:Lt},u==="tooltip"?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:ve,onFocusedViewChange:Ie});return l?k.jsx(l,{viewRenderers:v,popperView:vt,rendererProps:gt}):un(gt)},ownerState:vn}};function Bce(e){return qe("MuiPickersLayout",e)}const Ml=Ke("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),xet=["actions"],wet=ae(Px,{name:"MuiPickersLayout",slot:"ActionBar"})({});function Cet(e){const{actions:t}=e,n=$e(e,xet),r=Ti(),{clearValue:o,setValueToToday:i,acceptValueChanges:a,cancelValueChanges:s,goToNextStep:l,hasNextStep:c}=Wc();if(t==null||t.length===0)return null;const u=t==null?void 0:t.map(f=>{switch(f){case"clear":return k.jsx(ct,{onClick:o,children:r.clearButtonLabel},f);case"cancel":return k.jsx(ct,{onClick:s,children:r.cancelButtonLabel},f);case"accept":return k.jsx(ct,{onClick:a,children:r.okButtonLabel},f);case"today":return k.jsx(ct,{onClick:i,children:r.todayButtonLabel},f);case"next":return k.jsx(ct,{onClick:l,children:r.nextStepButtonLabel},f);case"nextOrAccept":return c?k.jsx(ct,{onClick:l,children:r.nextStepButtonLabel},f):k.jsx(ct,{onClick:a,children:r.okButtonLabel},f);default:return null}});return k.jsx(wet,z({},n,{children:u}))}const Eet=x.memo(Cet),Tet=["items","changeImportance"],Oet=["getValue"],Iet=ae(ai,{name:"MuiPickersLayout",slot:"Shortcuts"})({});function Pet(e){const{items:t,changeImportance:n="accept"}=e,r=$e(e,Tet),{setValue:o}=vXe(),i=IYe();if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=$e(s,Oet);const u=l({isValid:i});return z({},c,{label:c.label,onClick:()=>{o(u,{changeImportance:n,shortcut:c})},disabled:!i(u)})});return k.jsx(Iet,z({dense:!0,sx:[{maxHeight:Hy,maxWidth:200,overflow:"auto"},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:a.map(s=>k.jsx(Co,{children:k.jsx(nl,z({},s))},s.id??s.label))}))}const Aet=["ownerState"];function Met(e){return e.view!==null}const Ret=(e,t)=>{const{pickerOrientation:n}=t;return Me({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},Bce,e)},zce=e=>{const{ownerState:t,defaultActionBarActions:n}=Ur(),{view:r}=Wc(),o=vr(),{children:i,slots:a,slotProps:s,classes:l}=e,c=x.useMemo(()=>z({},t,{layoutDirection:o?"rtl":"ltr"}),[t,o]),u=Ret(l,c),f=(a==null?void 0:a.actionBar)??Eet,p=Dn({elementType:f,externalSlotProps:s==null?void 0:s.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:c}),m=$e(p,Aet),g=k.jsx(f,z({},m)),y=a==null?void 0:a.toolbar,v=Dn({elementType:y,externalSlotProps:s==null?void 0:s.toolbar,className:u.toolbar,ownerState:c}),w=Met(v)&&y?k.jsx(y,z({},v)):null,C=i,E=a==null?void 0:a.tabs,I=r&&E?k.jsx(E,z({className:u.tabs},s==null?void 0:s.tabs)):null,O=(a==null?void 0:a.shortcuts)??Pet,P=Dn({elementType:O,externalSlotProps:s==null?void 0:s.shortcuts,className:u.shortcuts,ownerState:c}),R=r&&O?k.jsx(O,z({},P)):null;return{toolbar:w,content:C,tabs:I,actionBar:g,shortcuts:R,ownerState:c}},Det=(e,t)=>{const{pickerOrientation:n}=t;return Me({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"]},Bce,e)},Vce=ae("div",{name:"MuiPickersLayout",slot:"Root"})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Ml.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape"},style:{[`& .${Ml.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Ml.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{pickerOrientation:"landscape",layoutDirection:"rtl"},style:{[`& .${Ml.toolbar}`]:{gridColumn:3}}},{props:{pickerOrientation:"portrait"},style:{[`& .${Ml.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Ml.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{pickerOrientation:"portrait",layoutDirection:"rtl"},style:{[`& .${Ml.shortcuts}`]:{gridColumn:3}}}]}),Hce=ae("div",{name:"MuiPickersLayout",slot:"ContentWrapper"})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),Uce=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l,ownerState:c}=zce(r),{orientation:u,variant:f}=Wc(),{sx:p,className:m,classes:g}=r,y=Det(g,c);return k.jsxs(Vce,{ref:n,sx:p,className:fe(y.root,m),ownerState:c,children:[u==="landscape"?l:o,u==="landscape"?o:l,k.jsx(Hce,{className:y.contentWrapper,ownerState:c,children:f==="desktop"?k.jsxs(x.Fragment,{children:[i,a]}):k.jsxs(x.Fragment,{children:[a,i]})}),s]})});function Gce(e){const{steps:t}=e;return LYe({steps:t,isViewMatchingStep:(n,r)=>r.views==null||r.views.includes(n),onStepChange:({step:n,defaultView:r,setView:o,view:i,views:a})=>{const s=n.views==null?r:n.views.find(l=>a.includes(l));s!==i&&o(s)}})}const ket=["props","steps"],_et=["ownerState"],hV=e=>{var P;let{props:t,steps:n}=e,r=$e(e,ket);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=Gce({steps:n}),{providerProps:u,renderCurrentView:f,ownerState:p}=jce(z({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:c})),m=u.privateContextValue.labelId,g=((P=i==null?void 0:i.toolbar)==null?void 0:P.hidden)??!1,y=o.field,v=Dn({elementType:y,externalSlotProps:i==null?void 0:i.field,additionalProps:z({},g&&{id:m}),ownerState:p}),w=$e(v,_et),C=o.layout??Uce;let E=m;g&&(a?E=`${m}-label`:E=void 0);const I=z({},i,{toolbar:z({},i==null?void 0:i.toolbar,{titleId:m}),popper:z({"aria-labelledby":E},i==null?void 0:i.popper)});return{renderPicker:()=>k.jsx(qle,z({},u,{children:k.jsxs(Ice,{slots:o,slotProps:I,inputRef:s,children:[k.jsx(y,z({},w)),k.jsx(get,{slots:o,slotProps:I,children:k.jsx(C,z({},I==null?void 0:I.layout,{slots:o,slotProps:I,children:f()}))})]})}))}},Qs=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minDate:m,maxDate:g,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:C,onMonthChange:E,monthsPerRow:I,onYearChange:O,yearsOrder:P,yearsPerRow:R,slots:D,slotProps:M,loading:A,renderLoading:_,disableHighlightToday:N,readOnly:B,disabled:H,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:L,sx:V,autoFocus:W,fixedWeekNumber:K,displayWeekNumber:G,timezone:q})=>k.jsx(YZe,{view:e,onViewChange:t,views:n.filter(Gy),focusedView:r&&Gy(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minDate:m,maxDate:g,shouldDisableDate:y,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:C,onMonthChange:E,monthsPerRow:I,onYearChange:O,yearsOrder:P,yearsPerRow:R,slots:D,slotProps:M,loading:A,renderLoading:_,disableHighlightToday:N,readOnly:B,disabled:H,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:L,sx:V,autoFocus:W,fixedWeekNumber:K,displayWeekNumber:G,timezone:q}),qce=x.forwardRef(function(t,n){var l;const r=xn(),o=Fce(t,"MuiDesktopDatePicker"),i=z({day:Qs,month:Qs,year:Qs},o.viewRenderers),a=z({},o,{closeOnSelect:o.closeOnSelect??!0,viewRenderers:i,format:wS(r,o,!1),yearsPerRow:o.yearsPerRow??4,slots:z({field:Pce},o.slots),slotProps:z({},o.slotProps,{field:c=>{var u;return z({},kc((u=o.slotProps)==null?void 0:u.field,c),Mv(o))},toolbar:z({hidden:!0},(l=o.slotProps)==null?void 0:l.toolbar)})}),{renderPicker:s}=hV({ref:n,props:a,valueManager:mo,valueType:"date",validator:Rv,steps:null});return s()});qce.propTypes={autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:ov,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,minDate:U.object,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","month","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["day","month","year"]),viewRenderers:U.shape({day:U.func,month:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","month","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const $et=ae(Ix)({[`& .${Q0.container}`]:{outline:0},[`& .${Q0.paper}`]:{outline:0,minWidth:Vy}}),Net=ae(Ax)({"&:first-of-type":{padding:0}});function Let(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=Wc(),{dismissViews:i}=Ur(),a=(n==null?void 0:n.dialog)??$et,s=(n==null?void 0:n.mobileTransition)??gh;return k.jsx(a,z({open:o,onClose:i},r==null?void 0:r.dialog,{TransitionComponent:s,TransitionProps:r==null?void 0:r.mobileTransition,PaperComponent:n==null?void 0:n.mobilePaper,PaperProps:r==null?void 0:r.mobilePaper,children:k.jsx(Net,{children:t})}))}const Fet=["props","steps"],jet=["ownerState"],mV=e=>{var P;let{props:t,steps:n}=e,r=$e(e,Fet);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=Gce({steps:n}),{providerProps:u,renderCurrentView:f,ownerState:p}=jce(z({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),m=u.privateContextValue.labelId,g=((P=i==null?void 0:i.toolbar)==null?void 0:P.hidden)??!1,y=o.field,v=Dn({elementType:y,externalSlotProps:i==null?void 0:i.field,additionalProps:z({},g&&{id:m}),ownerState:p}),w=$e(v,jet),C=o.layout??Uce;let E=m;g&&(a?E=`${m}-label`:E=void 0);const I=z({},i,{toolbar:z({},i==null?void 0:i.toolbar,{titleId:m}),mobilePaper:z({"aria-labelledby":E},i==null?void 0:i.mobilePaper)});return{renderPicker:()=>k.jsx(qle,z({},u,{children:k.jsxs(Ice,{slots:o,slotProps:I,inputRef:s,children:[k.jsx(y,z({},w)),k.jsx(Let,{slots:o,slotProps:I,children:k.jsx(C,z({},I==null?void 0:I.layout,{slots:o,slotProps:I,children:f()}))})]})}))}},Wce=x.forwardRef(function(t,n){var l;const r=xn(),o=Fce(t,"MuiMobileDatePicker"),i=z({day:Qs,month:Qs,year:Qs},o.viewRenderers),a=z({},o,{viewRenderers:i,format:wS(r,o,!1),slots:z({field:Pce},o.slots),slotProps:z({},o.slotProps,{field:c=>{var u;return z({},kc((u=o.slotProps)==null?void 0:u.field,c),Mv(o))},toolbar:z({hidden:!1},(l=o.slotProps)==null?void 0:l.toolbar)})}),{renderPicker:s}=mV({ref:n,props:a,valueManager:mo,valueType:"date",validator:Rv,steps:null});return s()});Wce.propTypes={autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:ov,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,minDate:U.object,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","month","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["day","month","year"]),viewRenderers:U.shape({day:U.func,month:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","month","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const Bet=["desktopModeMediaQuery"],Ah=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=rV}=r,i=$e(r,Bet);return If(o,{defaultMatches:!0})?k.jsx(qce,z({ref:n},i)):k.jsx(Wce,z({ref:n},i))});function zet(e){return qe("MuiPickersToolbarText",e)}const Vet=Ke("MuiPickersToolbarText",["root"]),Het=["className","classes","selected","value"],Uet=e=>Me({root:["root"]},zet,e),Get=ae(at,{name:"MuiPickersToolbarText",slot:"Root"})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),gV=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersToolbarText"}),{className:o,classes:i,selected:a,value:s}=r,l=$e(r,Het),c=Uet(i);return k.jsx(Get,z({ref:n,className:fe(c.root,o),component:"span",ownerState:r},a&&{"data-selected":!0},l,{children:s}))}),qet=["align","className","classes","selected","typographyClassName","value","variant","width"],Wet=e=>Me({root:["root"]},Lce,e),Ket=ae(ct,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),Ha=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,classes:a,selected:s,typographyClassName:l,value:c,variant:u,width:f}=r,p=$e(r,qet),m=Wet(a);return k.jsx(Ket,z({variant:"text",ref:n,className:fe(m.root,i),ownerState:r},f?{sx:{width:f}}:{},p,{children:k.jsx(gV,{align:o,className:l,variant:u,value:c,selected:s})}))});function Yet(e){return qe("MuiTimePickerToolbar",e)}const ux=Ke("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Qet=["ampm","ampmInClock","className","classes"],Xet=(e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Me({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n==="landscape"&&"hourMinuteLabelLandscape",r==="rtl"&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n==="landscape"&&"ampmLandscape"],ampmLabel:["ampmLabel"]},Yet,e)},Jet=ae(pV,{name:"MuiTimePickerToolbar",slot:"Root"})({}),Zet=ae(gV,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),ett=ae("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${ux.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${ux.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{pickerOrientation:"landscape"},style:{marginTop:"auto"}}]}),ttt=ae("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${ux.ampmLabel}`]:t.ampmLabel},{[`&.${ux.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${ux.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function ntt(e){const t=Pn({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,className:o,classes:i}=t,a=$e(t,Qet),s=xn(),l=Ti(),c=EP(),u=Xet(i,c),{value:f,setValue:p,disabled:m,readOnly:g,view:y,setView:v,views:w}=Wc(),C=!!(n&&!r&&w.includes("hours")),{meridiemMode:E,handleMeridiemChange:I}=yP(f,n,R=>p(R,{changeImportance:"set"})),O=R=>s.isValid(f)?s.format(f,R):"--",P=k.jsx(Zet,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:u.separator});return k.jsxs(Jet,z({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:fe(u.root,o)},a,{children:[k.jsxs(ett,{className:u.hourMinuteLabel,ownerState:c,children:[dg(w,"hours")&&k.jsx(Ha,{tabIndex:-1,variant:"h3",onClick:()=>v("hours"),selected:y==="hours",value:O(n?"hours12h":"hours24h")}),dg(w,["hours","minutes"])&&P,dg(w,"minutes")&&k.jsx(Ha,{tabIndex:-1,variant:"h3",onClick:()=>v("minutes"),selected:y==="minutes",value:O("minutes")}),dg(w,["minutes","seconds"])&&P,dg(w,"seconds")&&k.jsx(Ha,{variant:"h3",onClick:()=>v("seconds"),selected:y==="seconds",value:O("seconds")})]}),C&&k.jsxs(ttt,{className:u.ampmSelection,ownerState:c,children:[k.jsx(Ha,{disableRipple:!0,variant:"subtitle2",selected:E==="am",typographyClassName:u.ampmLabel,value:Nl(s,"am"),onClick:g?void 0:()=>I("am"),disabled:m}),k.jsx(Ha,{disableRipple:!0,variant:"subtitle2",selected:E==="pm",typographyClassName:u.ampmLabel,value:Nl(s,"pm"),onClick:g?void 0:()=>I("pm"),disabled:m})]})]}))}function Kce(e,t){var s;const n=xn(),r=Pn({props:e,name:t}),o=gce(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=x.useMemo(()=>{var l;return((l=r.localeText)==null?void 0:l.toolbarTitle)==null?r.localeText:z({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return z({},r,o,{ampm:i,localeText:a},Yz({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:z({toolbar:ntt},r.slots),slotProps:z({},r.slotProps,{toolbar:z({ampm:i,ampmInClock:r.ampmInClock},(s=r.slotProps)==null?void 0:s.toolbar)})})}const J_=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,ampmInClock:C,slots:E,slotProps:I,readOnly:O,disabled:P,sx:R,autoFocus:D,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:A,timezone:_})=>k.jsx($Qe,{view:e,onViewChange:t,focusedView:n&&Ih(n)?n:null,onFocusedViewChange:r,views:o.filter(Ih),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,ampmInClock:C,slots:E,slotProps:I,readOnly:O,disabled:P,sx:R,autoFocus:D,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:A,timezone:_}),yV=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeSteps:M,skipDisabled:A,timezone:_})=>k.jsx(UQe,{view:e,onViewChange:t,focusedView:n&&Ih(n)?n:null,onFocusedViewChange:r,views:o.filter(Ih),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeStep:M==null?void 0:M.minutes,skipDisabled:A,timezone:_}),qy=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeSteps:M,skipDisabled:A,timezone:_})=>k.jsx(nXe,{view:e,onViewChange:t,focusedView:n&&wg(n)?n:null,onFocusedViewChange:r,views:o.filter(Ih),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:f,disablePast:p,minTime:m,maxTime:g,shouldDisableTime:y,minutesStep:v,ampm:w,slots:C,slotProps:E,readOnly:I,disabled:O,sx:P,autoFocus:R,disableIgnoringDatePartForTimeValidation:D,timeSteps:M,skipDisabled:A,timezone:_}),rtt=["views","format"],Yce=(e,t,n)=>{let{views:r,format:o}=t,i=$e(t,rtt);if(o)return o;const a=[],s=[];if(r.forEach(u=>{Ih(u)?s.push(u):Gy(u)&&a.push(u)}),s.length===0)return wS(e,z({views:a},i),!1);if(a.length===0)return pO(e,z({views:s},i));const l=pO(e,z({views:s},i));return`${wS(e,z({views:a},i),!1)} ${l}`},ott=(e,t,n)=>n?t.filter(r=>!wg(r)||r==="hours"):e?[...t,"meridiem"]:t,itt=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function Qce({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=z({hours:1,minutes:5,seconds:5},n),a=itt(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:ott(t,r,a)}}const Xce=x.forwardRef(function(t,n){var y,v;const r=xn(),o=Kce(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:i,views:a,timeSteps:s}=Qce(o),l=i?yV:qy,c=z({hours:l,minutes:l,seconds:l,meridiem:l},o.viewRenderers),u=o.ampmInClock??!0,p=((y=c.hours)==null?void 0:y.name)===qy.name?a:a.filter(w=>w!=="meridiem"),m=z({},o,{ampmInClock:u,timeSteps:s,viewRenderers:c,format:pO(r,o),views:i?["hours"]:p,slots:z({field:Ace},o.slots),slotProps:z({},o.slotProps,{field:w=>{var C;return z({},kc((C=o.slotProps)==null?void 0:C.field,w),Mv(o))},toolbar:z({hidden:!0,ampmInClock:u},(v=o.slotProps)==null?void 0:v.toolbar)})}),{renderPicker:g}=hV({ref:n,props:m,valueManager:mo,valueType:"time",validator:Rw,steps:null});return g()});Xce.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,enableAccessibleFieldDOMStructure:U.any,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:ov,label:U.node,localeText:U.object,maxTime:U.object,minTime:U.object,minutesStep:U.number,name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,open:U.bool,openTo:U.oneOf(["hours","meridiem","minutes","seconds"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableTime:U.func,skipDisabled:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),thresholdToRenderTimeInASingleColumn:U.number,timeSteps:U.shape({hours:U.number,minutes:U.number,seconds:U.number}),timezone:U.string,value:U.object,view:U.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:U.shape({hours:U.func,meridiem:U.func,minutes:U.func,seconds:U.func}),views:U.arrayOf(U.oneOf(["hours","minutes","seconds"]).isRequired)};const Jce=x.forwardRef(function(t,n){var c;const r=xn(),o=Kce(t,"MuiMobileTimePicker"),i=z({hours:J_,minutes:J_,seconds:J_},o.viewRenderers),a=o.ampmInClock??!1,s=z({},o,{ampmInClock:a,viewRenderers:i,format:pO(r,o),slots:z({field:Ace},o.slots),slotProps:z({},o.slotProps,{field:u=>{var f;return z({},kc((f=o.slotProps)==null?void 0:f.field,u),Mv(o))},toolbar:z({hidden:!1,ampmInClock:a},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=mV({ref:n,props:s,valueManager:mo,valueType:"time",validator:Rw,steps:null});return l()});Jce.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,enableAccessibleFieldDOMStructure:U.any,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:ov,label:U.node,localeText:U.object,maxTime:U.object,minTime:U.object,minutesStep:U.number,name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,open:U.bool,openTo:U.oneOf(["hours","minutes","seconds"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableTime:U.func,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["hours","minutes","seconds"]),viewRenderers:U.shape({hours:U.func,minutes:U.func,seconds:U.func}),views:U.arrayOf(U.oneOf(["hours","minutes","seconds"]).isRequired)};const att=["desktopModeMediaQuery"],UF=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=rV}=r,i=$e(r,att);return If(o,{defaultMatches:!0})?k.jsx(Xce,z({ref:n},i)):k.jsx(Jce,z({ref:n},i))});function stt(e){return qe("MuiDateTimePickerTabs",e)}Ke("MuiDateTimePickerTabs",["root"]);const ltt=e=>Gy(e)?"date":"time",ctt=e=>e==="date"?"day":"hours",utt=e=>Me({root:["root"]},stt,e),dtt=ae(jne,{name:"MuiDateTimePickerTabs",slot:"Root"})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${gE.indicator}`]:{bottom:"auto",top:0}}})),ftt=function(t){const n=Pn({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=k.jsx(CYe,{}),timeIcon:o=k.jsx(EYe,{}),hidden:i=typeof window>"u"||window.innerHeight<667,className:a,classes:s,sx:l}=n,c=Ti(),{ownerState:u}=Ur(),{view:f,setView:p}=Wc(),m=utt(s),g=(y,v)=>{p(ctt(v))};return i?null:k.jsxs(dtt,{ownerState:u,variant:"fullWidth",value:ltt(f),onChange:g,className:fe(a,m.root),sx:l,children:[k.jsx(kN,{value:"date","aria-label":c.dateTableLabel,icon:k.jsx(x.Fragment,{children:r})}),k.jsx(kN,{value:"time","aria-label":c.timeTableLabel,icon:k.jsx(x.Fragment,{children:o})})]})};function ptt(e){return qe("MuiDateTimePickerToolbar",e)}const Z_=Ke("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),htt=["ampm","ampmInClock","toolbarFormat","toolbarPlaceholder","toolbarTitle","className","classes"],mtt=(e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Me({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r==="rtl"&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r==="rtl"&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n==="landscape"&&"ampmLandscape"],ampmLabel:["ampmLabel"]},ptt,e)},gtt=ae(pV,{name:"MuiDateTimePickerToolbar",slot:"Root",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${QZe.content} .${Vet.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",pickerOrientation:"landscape"},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{paddingLeft:24,paddingRight:0}}]})),ytt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer"})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),vtt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})({display:"flex",flexDirection:"row",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({pickerOrientation:e,toolbarVariant:t})=>e==="landscape"&&t!=="desktop",style:{flexDirection:"column"}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>e==="landscape"&&t!=="desktop"&&n==="rtl",style:{flexDirection:"column-reverse"}}]}),btt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})({display:"flex",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),dX=ae(gV,{name:"MuiDateTimePickerToolbar",slot:"Separator",shouldForwardProp:e=>Ca(e)&&e!=="toolbarVariant"})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),xtt=ae("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${Z_.ampmLabel}`]:t.ampmLabel},{[`&.${Z_.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${Z_.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]}),Stt=x.createContext(null);function wtt(e){const t=Pn({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,toolbarFormat:o,toolbarPlaceholder:i="––",toolbarTitle:a,className:s,classes:l}=t,c=$e(t,htt),{value:u,setValue:f,disabled:p,readOnly:m,variant:g,orientation:y,view:v,setView:w,views:C}=Wc(),E=Ti(),I=EP(),O=mtt(l,I),P=xn(),R=x.useContext(Stt),D=R?R.value:u,M=R?R.setValue:f,A=R?R.view:v,_=R?R.setView:w,{meridiemMode:N,handleMeridiemChange:B}=yP(D,n,G=>M(G,{changeImportance:"set"})),H=R!=null&&R.forceDesktopVariant?"desktop":g,j=H==="desktop",L=!!(n&&!r),V=a??E.dateTimePickerToolbarTitle,W=x.useMemo(()=>P.isValid(D)?o?P.formatByString(D,o):P.format(D,"shortDate"):i,[D,o,i,P]),K=(G,q)=>P.isValid(D)?P.format(D,G):q;return k.jsxs(gtt,z({className:fe(O.root,s),toolbarTitle:V,toolbarVariant:H},c,{ownerState:I,children:[k.jsxs(ytt,{className:O.dateContainer,ownerState:I,children:[C.includes("year")&&k.jsx(Ha,{tabIndex:-1,variant:"subtitle1",onClick:()=>_("year"),selected:A==="year",value:K("year","–")}),C.includes("day")&&k.jsx(Ha,{tabIndex:-1,variant:j?"h5":"h4",onClick:()=>_("day"),selected:A==="day",value:W})]}),k.jsxs(vtt,{className:O.timeContainer,ownerState:I,toolbarVariant:H,children:[k.jsxs(btt,{className:O.timeDigitsContainer,ownerState:I,toolbarVariant:H,children:[C.includes("hours")&&k.jsxs(x.Fragment,{children:[k.jsx(Ha,{variant:j?"h5":"h3",width:j&&y==="portrait"?z0:void 0,onClick:()=>_("hours"),selected:A==="hours",value:K(n?"hours12h":"hours24h","--")}),k.jsx(dX,{variant:j?"h5":"h3",value:":",className:O.separator,ownerState:I,toolbarVariant:H}),k.jsx(Ha,{variant:j?"h5":"h3",width:j&&y==="portrait"?z0:void 0,onClick:()=>_("minutes"),selected:A==="minutes"||!C.includes("minutes")&&A==="hours",value:K("minutes","--"),disabled:!C.includes("minutes")})]}),C.includes("seconds")&&k.jsxs(x.Fragment,{children:[k.jsx(dX,{variant:j?"h5":"h3",value:":",className:O.separator,ownerState:I,toolbarVariant:H}),k.jsx(Ha,{variant:j?"h5":"h3",width:j&&y==="portrait"?z0:void 0,onClick:()=>_("seconds"),selected:A==="seconds",value:K("seconds","--")})]})]}),L&&!j&&k.jsxs(xtt,{className:O.ampmSelection,ownerState:I,children:[k.jsx(Ha,{variant:"subtitle2",selected:N==="am",typographyClassName:O.ampmLabel,value:Nl(P,"am"),onClick:m?void 0:()=>B("am"),disabled:p}),k.jsx(Ha,{variant:"subtitle2",selected:N==="pm",typographyClassName:O.ampmLabel,value:Nl(P,"pm"),onClick:m?void 0:()=>B("pm"),disabled:p})]}),n&&j&&k.jsx(Ha,{variant:"h5",onClick:()=>_("meridiem"),selected:A==="meridiem",value:D&&N?Nl(P,N):"--",width:z0})]})]}))}function Zce(e,t){var m;const n=xn(),r=Pn({props:e,name:t}),o=yce(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=x.useMemo(()=>{var g;return((g=r.localeText)==null?void 0:g.toolbarTitle)==null?r.localeText:z({},r.localeText,{dateTimePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]),{openTo:s,views:l}=Yz({views:r.views,openTo:r.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:f,timeSteps:p}=Qce({thresholdToRenderTimeInASingleColumn:r.thresholdToRenderTimeInASingleColumn,ampm:i,timeSteps:r.timeSteps,views:l});return z({},r,o,{timeSteps:p,openTo:s,shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:f,ampm:i,localeText:a,orientation:r.orientation??"portrait",slots:z({toolbar:wtt,tabs:ftt},r.slots),slotProps:z({},r.slotProps,{toolbar:z({ampm:i},(m=r.slotProps)==null?void 0:m.toolbar)})})}const Ctt=x.forwardRef(function(t,n){var g;const{toolbar:r,tabs:o,content:i,actionBar:a,shortcuts:s,ownerState:l}=zce(t),{orientation:c}=Wc(),{sx:u,className:f,classes:p}=t,m=a&&(((g=a.props.actions)==null?void 0:g.length)??0)>0;return k.jsxs(Vce,{ref:n,className:fe(Ml.root,p==null?void 0:p.root,f),sx:[{[`& .${Ml.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${Ml.actionBar}`]:{gridRow:5}},...Array.isArray(u)?u:[u]],ownerState:l,children:[c==="landscape"?s:r,c==="landscape"?r:s,k.jsxs(Hce,{className:fe(Ml.contentWrapper,p==null?void 0:p.contentWrapper),ownerState:l,sx:{display:"grid"},children:[i,o,m&&k.jsx(Bi,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),a]})}),Ett=["openTo","focusedView","timeViewsCount"],Ttt=function(t){var m,g;const{viewRenderers:n,popperView:r,rendererProps:o}=t,{openTo:i,focusedView:a,timeViewsCount:s}=o,l=$e(o,Ett),c=z({},l,{focusedView:null,sx:[{[`&.${BF.root}`]:{borderBottom:0},[`&.${BF.root}, .${zF.root}, &.${jF.root}`]:{maxHeight:Hy}}]}),u=wg(r),f=u?"day":r,p=u?r:"hours";return k.jsxs(x.Fragment,{children:[(m=n[f])==null?void 0:m.call(n,z({},o,{view:u?"day":r,focusedView:a&&Gy(a)?a:null,views:o.views.filter(Gy),sx:[{gridColumn:1},...c.sx]})),s>0&&k.jsxs(x.Fragment,{children:[k.jsx(Bi,{orientation:"vertical",sx:{gridColumn:2}}),(g=n[p])==null?void 0:g.call(n,z({},c,{view:u?r:"hours",focusedView:a&&wg(a)?a:null,openTo:wg(i)?i:"hours",views:o.views.filter(wg),sx:[{gridColumn:3},...c.sx]}))]})]})},eue=x.forwardRef(function(t,n){var p,m,g;const r=xn(),o=Zce(t,"MuiDesktopDateTimePicker"),i=o.shouldRenderTimeInASingleColumn?yV:qy,a=z({day:Qs,month:Qs,year:Qs,hours:i,minutes:i,seconds:i,meridiem:i},o.viewRenderers),s=o.ampmInClock??!0,c=((p=a.hours)==null?void 0:p.name)===qy.name?o.views:o.views.filter(y=>y!=="meridiem"),u=z({},o,{viewRenderers:a,format:Yce(r,o),views:c,yearsPerRow:o.yearsPerRow??4,ampmInClock:s,slots:z({field:Mce,layout:Ctt},o.slots),slotProps:z({},o.slotProps,{field:y=>{var v;return z({},kc((v=o.slotProps)==null?void 0:v.field,y),Mv(o))},toolbar:z({hidden:!0,ampmInClock:s},(m=o.slotProps)==null?void 0:m.toolbar),tabs:z({hidden:!0},(g=o.slotProps)==null?void 0:g.tabs)})}),{renderPicker:f}=hV({ref:n,props:u,valueManager:mo,valueType:"date-time",validator:SP,rendererInterceptor:Ttt,steps:null});return f()});eue.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:ov,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,maxDateTime:U.object,maxTime:U.object,minDate:U.object,minDateTime:U.object,minTime:U.object,minutesStep:U.number,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableTime:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,skipDisabled:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),thresholdToRenderTimeInASingleColumn:U.number,timeSteps:U.shape({hours:U.number,minutes:U.number,seconds:U.number}),timezone:U.string,value:U.object,view:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:U.shape({day:U.func,hours:U.func,meridiem:U.func,minutes:U.func,month:U.func,seconds:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const Ott=[{views:Zle},{views:Kle}],tue=x.forwardRef(function(t,n){var p,m,g,y,v,w;const r=xn(),o=Zce(t,"MuiMobileDateTimePicker"),i=o.shouldRenderTimeInASingleColumn?yV:qy,a=z({day:Qs,month:Qs,year:Qs,hours:i,minutes:i,seconds:i,meridiem:i},o.viewRenderers),s=o.ampmInClock??!1,c=((p=a.hours)==null?void 0:p.name)===qy.name?o.views:o.views.filter(C=>C!=="meridiem"),u=z({},o,{viewRenderers:a,format:Yce(r,o),views:c,ampmInClock:s,slots:z({field:Mce},o.slots),slotProps:z({},o.slotProps,{field:C=>{var E;return z({},kc((E=o.slotProps)==null?void 0:E.field,C),Mv(o))},toolbar:z({hidden:!1,ampmInClock:s},(m=o.slotProps)==null?void 0:m.toolbar),tabs:z({hidden:!1},(g=o.slotProps)==null?void 0:g.tabs),layout:z({},(y=o.slotProps)==null?void 0:y.layout,{sx:FQe([{[`& .${BF.root}`]:{width:Vy},[`& .${zF.root}`]:{flex:1,maxHeight:Hy-1,[`.${zF.item}`]:{width:"auto"}},[`& .${jF.root}`]:{width:Vy,maxHeight:Hy,flex:1,[`.${jF.item}`]:{justifyContent:"center"}}}],(w=(v=o.slotProps)==null?void 0:v.layout)==null?void 0:w.sx)})})}),{renderPicker:f}=mV({ref:n,props:u,valueManager:mo,valueType:"date-time",validator:SP,steps:Ott});return f()});tue.propTypes={ampm:U.bool,ampmInClock:U.bool,autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableIgnoringDatePartForTimeValidation:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:ov,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,maxDateTime:U.object,maxTime:U.object,minDate:U.object,minDateTime:U.object,minTime:U.object,minutesStep:U.number,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableTime:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,skipDisabled:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),thresholdToRenderTimeInASingleColumn:U.number,timeSteps:U.shape({hours:U.number,minutes:U.number,seconds:U.number}),timezone:U.string,value:U.object,view:U.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:U.shape({day:U.func,hours:U.func,meridiem:U.func,minutes:U.func,month:U.func,seconds:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const Itt=["desktopModeMediaQuery"],Ptt=x.forwardRef(function(t,n){const r=Pn({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=rV}=r,i=$e(r,Itt);return If(o,{defaultMatches:!0})?k.jsx(eue,z({ref:n},i)):k.jsx(tue,z({ref:n},i))}),Att={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Mtt={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class Hl{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=Att,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?xt.fromJSDate(new Date,{locale:this.locale,zone:o}):xt.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>xt.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals($0.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:xt.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:xt.expandFormat(l,{locale:this.locale}).replace(s,(f,p,m)=>{const g=p||m;return a.test(g)?f:`'${f}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r<o,this.isBeforeYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=z({},Mtt,n)}}const vV=Ot(k.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}));var Rtt=sae();const nue=Gn(Rtt);function bV({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=x.useState(!0),[i,a]=x.useState(n),[s,l]=x.useState(""),[c,u]=x.useState([]),[f,p]=je(),m=x.useMemo(()=>nue(g=>_Ne(g,p.language,r).then(y=>u(y)),200),[p.language,r]);return x.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return m(s),()=>{m.cancel()}},[i,s,m]),Q(Ft,{children:[S($c,{id:"ingredient-autocomplete",getOptionLabel:g=>g.value,"data-testid":"autocomplete",filterOptions:g=>g,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:f("noResults"),isOptionEqualToValue:(g,y)=>g.value===y.value,onChange:(g,y)=>{u(y?[y,...c]:c),a(y),e(y)},onInputChange:(g,y)=>{l(y)},renderInput:g=>S(dn,{...g,label:f("nutrition.searchIngredientName"),fullWidth:!0,slotProps:{input:{...g.InputProps,startAdornment:Q(Tt,{children:[S(So,{position:"start",children:S(vV,{})}),g.InputProps.startAdornment]})}}}),renderOption:(g,y)=>Sx("li",{...g,key:`ingredient-${y.data.id}`},Q(Co,{disablePadding:!0,component:"div",children:[S(rl,{children:S(Yl,{alt:"",src:`${CB}${y.data.image}`,variant:"rounded",children:S(ed,{})})}),S(Wr,{primary:y.value,slotProps:{primary:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),p.language!==dy&&S(Mx,{children:S(os,{control:S(Wo,{checked:r,onChange:(g,y)=>o(y)}),label:f("alsoSearchEnglish")})})]})}var Dtt=function(t){return ktt(t)&&!_tt(t)};function ktt(e){return!!e&&typeof e=="object"}function _tt(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ltt(e)}var $tt=typeof Symbol=="function"&&Symbol.for,Ntt=$tt?Symbol.for("react.element"):60103;function Ltt(e){return e.$$typeof===Ntt}function Ftt(e){return Array.isArray(e)?[]:{}}function yO(e,t){return t.clone!==!1&&t.isMergeableObject(e)?CS(Ftt(e),e,t):e}function jtt(e,t,n){return e.concat(t).map(function(r){return yO(r,n)})}function Btt(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=yO(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=yO(t[o],n):r[o]=CS(e[o],t[o],n)}),r}function CS(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||jtt,n.isMergeableObject=n.isMergeableObject||Dtt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):Btt(e,t,n):yO(t,n)}CS.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return CS(r,o,n)},{})};var GF=CS,rue=typeof global=="object"&&global&&global.Object===Object&&global,ztt=typeof self=="object"&&self&&self.Object===Object&&self,Kc=rue||ztt||Function("return this")(),Df=Kc.Symbol,oue=Object.prototype,Vtt=oue.hasOwnProperty,Htt=oue.toString,g0=Df?Df.toStringTag:void 0;function Utt(e){var t=Vtt.call(e,g0),n=e[g0];try{e[g0]=void 0;var r=!0}catch{}var o=Htt.call(e);return r&&(t?e[g0]=n:delete e[g0]),o}var Gtt=Object.prototype,qtt=Gtt.toString;function Wtt(e){return qtt.call(e)}var Ktt="[object Null]",Ytt="[object Undefined]",fX=Df?Df.toStringTag:void 0;function Qh(e){return e==null?e===void 0?Ytt:Ktt:fX&&fX in Object(e)?Utt(e):Wtt(e)}function iue(e,t){return function(n){return e(t(n))}}var xV=iue(Object.getPrototypeOf,Object);function Xh(e){return e!=null&&typeof e=="object"}var Qtt="[object Object]",Xtt=Function.prototype,Jtt=Object.prototype,aue=Xtt.toString,Ztt=Jtt.hasOwnProperty,ent=aue.call(Object);function pX(e){if(!Xh(e)||Qh(e)!=Qtt)return!1;var t=xV(e);if(t===null)return!0;var n=Ztt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&aue.call(n)==ent}function tnt(){this.__data__=[],this.size=0}function sue(e,t){return e===t||e!==e&&t!==t}function TP(e,t){for(var n=e.length;n--;)if(sue(e[n][0],t))return n;return-1}var nnt=Array.prototype,rnt=nnt.splice;function ont(e){var t=this.__data__,n=TP(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():rnt.call(t,n,1),--this.size,!0}function int(e){var t=this.__data__,n=TP(t,e);return n<0?void 0:t[n][1]}function ant(e){return TP(this.__data__,e)>-1}function snt(e,t){var n=this.__data__,r=TP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ad(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ad.prototype.clear=tnt;ad.prototype.delete=ont;ad.prototype.get=int;ad.prototype.has=ant;ad.prototype.set=snt;function lnt(){this.__data__=new ad,this.size=0}function cnt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function unt(e){return this.__data__.get(e)}function dnt(e){return this.__data__.has(e)}function kw(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fnt="[object AsyncFunction]",pnt="[object Function]",hnt="[object GeneratorFunction]",mnt="[object Proxy]";function lue(e){if(!kw(e))return!1;var t=Qh(e);return t==pnt||t==hnt||t==fnt||t==mnt}var e$=Kc["__core-js_shared__"],hX=function(){var e=/[^.]+$/.exec(e$&&e$.keys&&e$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gnt(e){return!!hX&&hX in e}var ynt=Function.prototype,vnt=ynt.toString;function Jh(e){if(e!=null){try{return vnt.call(e)}catch{}try{return e+""}catch{}}return""}var bnt=/[\\^$.*+?()[\]{}|]/g,xnt=/^\[object .+?Constructor\]$/,Snt=Function.prototype,wnt=Object.prototype,Cnt=Snt.toString,Ent=wnt.hasOwnProperty,Tnt=RegExp("^"+Cnt.call(Ent).replace(bnt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ont(e){if(!kw(e)||gnt(e))return!1;var t=lue(e)?Tnt:xnt;return t.test(Jh(e))}function Int(e,t){return e==null?void 0:e[t]}function Zh(e,t){var n=Int(e,t);return Ont(n)?n:void 0}var ES=Zh(Kc,"Map"),TS=Zh(Object,"create");function Pnt(){this.__data__=TS?TS(null):{},this.size=0}function Ant(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Mnt="__lodash_hash_undefined__",Rnt=Object.prototype,Dnt=Rnt.hasOwnProperty;function knt(e){var t=this.__data__;if(TS){var n=t[e];return n===Mnt?void 0:n}return Dnt.call(t,e)?t[e]:void 0}var _nt=Object.prototype,$nt=_nt.hasOwnProperty;function Nnt(e){var t=this.__data__;return TS?t[e]!==void 0:$nt.call(t,e)}var Lnt="__lodash_hash_undefined__";function Fnt(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=TS&&t===void 0?Lnt:t,this}function Mh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Mh.prototype.clear=Pnt;Mh.prototype.delete=Ant;Mh.prototype.get=knt;Mh.prototype.has=Nnt;Mh.prototype.set=Fnt;function jnt(){this.size=0,this.__data__={hash:new Mh,map:new(ES||ad),string:new Mh}}function Bnt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function OP(e,t){var n=e.__data__;return Bnt(t)?n[typeof t=="string"?"string":"hash"]:n.map}function znt(e){var t=OP(this,e).delete(e);return this.size-=t?1:0,t}function Vnt(e){return OP(this,e).get(e)}function Hnt(e){return OP(this,e).has(e)}function Unt(e,t){var n=OP(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Yf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Yf.prototype.clear=jnt;Yf.prototype.delete=znt;Yf.prototype.get=Vnt;Yf.prototype.has=Hnt;Yf.prototype.set=Unt;var Gnt=200;function qnt(e,t){var n=this.__data__;if(n instanceof ad){var r=n.__data__;if(!ES||r.length<Gnt-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yf(r)}return n.set(e,t),this.size=n.size,this}function Dv(e){var t=this.__data__=new ad(e);this.size=t.size}Dv.prototype.clear=lnt;Dv.prototype.delete=cnt;Dv.prototype.get=unt;Dv.prototype.has=dnt;Dv.prototype.set=qnt;function Wnt(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var mX=function(){try{var e=Zh(Object,"defineProperty");return e({},"",{}),e}catch{}}();function cue(e,t,n){t=="__proto__"&&mX?mX(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Knt=Object.prototype,Ynt=Knt.hasOwnProperty;function uue(e,t,n){var r=e[t];(!(Ynt.call(e,t)&&sue(r,n))||n===void 0&&!(t in e))&&cue(e,t,n)}function IP(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=void 0;l===void 0&&(l=e[s]),o?cue(n,s,l):uue(n,s,l)}return n}function Qnt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Xnt="[object Arguments]";function gX(e){return Xh(e)&&Qh(e)==Xnt}var due=Object.prototype,Jnt=due.hasOwnProperty,Znt=due.propertyIsEnumerable,ert=gX(function(){return arguments}())?gX:function(e){return Xh(e)&&Jnt.call(e,"callee")&&!Znt.call(e,"callee")},_w=Array.isArray;function trt(){return!1}var fue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yX=fue&&typeof module=="object"&&module&&!module.nodeType&&module,nrt=yX&&yX.exports===fue,vX=nrt?Kc.Buffer:void 0,rrt=vX?vX.isBuffer:void 0,pue=rrt||trt,ort=9007199254740991,irt=/^(?:0|[1-9]\d*)$/;function art(e,t){var n=typeof e;return t=t??ort,!!t&&(n=="number"||n!="symbol"&&irt.test(e))&&e>-1&&e%1==0&&e<t}var srt=9007199254740991;function hue(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=srt}var lrt="[object Arguments]",crt="[object Array]",urt="[object Boolean]",drt="[object Date]",frt="[object Error]",prt="[object Function]",hrt="[object Map]",mrt="[object Number]",grt="[object Object]",yrt="[object RegExp]",vrt="[object Set]",brt="[object String]",xrt="[object WeakMap]",Srt="[object ArrayBuffer]",wrt="[object DataView]",Crt="[object Float32Array]",Ert="[object Float64Array]",Trt="[object Int8Array]",Ort="[object Int16Array]",Irt="[object Int32Array]",Prt="[object Uint8Array]",Art="[object Uint8ClampedArray]",Mrt="[object Uint16Array]",Rrt="[object Uint32Array]",Br={};Br[Crt]=Br[Ert]=Br[Trt]=Br[Ort]=Br[Irt]=Br[Prt]=Br[Art]=Br[Mrt]=Br[Rrt]=!0;Br[lrt]=Br[crt]=Br[Srt]=Br[urt]=Br[wrt]=Br[drt]=Br[frt]=Br[prt]=Br[hrt]=Br[mrt]=Br[grt]=Br[yrt]=Br[vrt]=Br[brt]=Br[xrt]=!1;function Drt(e){return Xh(e)&&hue(e.length)&&!!Br[Qh(e)]}function SV(e){return function(t){return e(t)}}var mue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,dx=mue&&typeof module=="object"&&module&&!module.nodeType&&module,krt=dx&&dx.exports===mue,t$=krt&&rue.process,Wy=function(){try{var e=dx&&dx.require&&dx.require("util").types;return e||t$&&t$.binding&&t$.binding("util")}catch{}}(),bX=Wy&&Wy.isTypedArray,_rt=bX?SV(bX):Drt,$rt=Object.prototype,Nrt=$rt.hasOwnProperty;function gue(e,t){var n=_w(e),r=!n&&ert(e),o=!n&&!r&&pue(e),i=!n&&!r&&!o&&_rt(e),a=n||r||o||i,s=a?Qnt(e.length,String):[],l=s.length;for(var c in e)(t||Nrt.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||art(c,l)))&&s.push(c);return s}var Lrt=Object.prototype;function wV(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Lrt;return e===n}var Frt=iue(Object.keys,Object),jrt=Object.prototype,Brt=jrt.hasOwnProperty;function zrt(e){if(!wV(e))return Frt(e);var t=[];for(var n in Object(e))Brt.call(e,n)&&n!="constructor"&&t.push(n);return t}function yue(e){return e!=null&&hue(e.length)&&!lue(e)}function CV(e){return yue(e)?gue(e):zrt(e)}function Vrt(e,t){return e&&IP(t,CV(t),e)}function Hrt(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Urt=Object.prototype,Grt=Urt.hasOwnProperty;function qrt(e){if(!kw(e))return Hrt(e);var t=wV(e),n=[];for(var r in e)r=="constructor"&&(t||!Grt.call(e,r))||n.push(r);return n}function EV(e){return yue(e)?gue(e,!0):qrt(e)}function Wrt(e,t){return e&&IP(t,EV(t),e)}var vue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xX=vue&&typeof module=="object"&&module&&!module.nodeType&&module,Krt=xX&&xX.exports===vue,SX=Krt?Kc.Buffer:void 0,wX=SX?SX.allocUnsafe:void 0;function Yrt(e,t){if(t)return e.slice();var n=e.length,r=wX?wX(n):new e.constructor(n);return e.copy(r),r}function bue(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Qrt(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xue(){return[]}var Xrt=Object.prototype,Jrt=Xrt.propertyIsEnumerable,CX=Object.getOwnPropertySymbols,TV=CX?function(e){return e==null?[]:(e=Object(e),Qrt(CX(e),function(t){return Jrt.call(e,t)}))}:xue;function Zrt(e,t){return IP(e,TV(e),t)}function Sue(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var eot=Object.getOwnPropertySymbols,wue=eot?function(e){for(var t=[];e;)Sue(t,TV(e)),e=xV(e);return t}:xue;function tot(e,t){return IP(e,wue(e),t)}function Cue(e,t,n){var r=t(e);return _w(e)?r:Sue(r,n(e))}function not(e){return Cue(e,CV,TV)}function rot(e){return Cue(e,EV,wue)}var qF=Zh(Kc,"DataView"),WF=Zh(Kc,"Promise"),KF=Zh(Kc,"Set"),YF=Zh(Kc,"WeakMap"),EX="[object Map]",oot="[object Object]",TX="[object Promise]",OX="[object Set]",IX="[object WeakMap]",PX="[object DataView]",iot=Jh(qF),aot=Jh(ES),sot=Jh(WF),lot=Jh(KF),cot=Jh(YF),Tu=Qh;(qF&&Tu(new qF(new ArrayBuffer(1)))!=PX||ES&&Tu(new ES)!=EX||WF&&Tu(WF.resolve())!=TX||KF&&Tu(new KF)!=OX||YF&&Tu(new YF)!=IX)&&(Tu=function(e){var t=Qh(e),n=t==oot?e.constructor:void 0,r=n?Jh(n):"";if(r)switch(r){case iot:return PX;case aot:return EX;case sot:return TX;case lot:return OX;case cot:return IX}return t});var uot=Object.prototype,dot=uot.hasOwnProperty;function fot(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&dot.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var AX=Kc.Uint8Array;function OV(e){var t=new e.constructor(e.byteLength);return new AX(t).set(new AX(e)),t}function pot(e,t){var n=t?OV(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var hot=/\w*$/;function mot(e){var t=new e.constructor(e.source,hot.exec(e));return t.lastIndex=e.lastIndex,t}var MX=Df?Df.prototype:void 0,RX=MX?MX.valueOf:void 0;function got(e){return RX?Object(RX.call(e)):{}}function yot(e,t){var n=t?OV(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var vot="[object Boolean]",bot="[object Date]",xot="[object Map]",Sot="[object Number]",wot="[object RegExp]",Cot="[object Set]",Eot="[object String]",Tot="[object Symbol]",Oot="[object ArrayBuffer]",Iot="[object DataView]",Pot="[object Float32Array]",Aot="[object Float64Array]",Mot="[object Int8Array]",Rot="[object Int16Array]",Dot="[object Int32Array]",kot="[object Uint8Array]",_ot="[object Uint8ClampedArray]",$ot="[object Uint16Array]",Not="[object Uint32Array]";function Lot(e,t,n){var r=e.constructor;switch(t){case Oot:return OV(e);case vot:case bot:return new r(+e);case Iot:return pot(e,n);case Pot:case Aot:case Mot:case Rot:case Dot:case kot:case _ot:case $ot:case Not:return yot(e,n);case xot:return new r;case Sot:case Eot:return new r(e);case wot:return mot(e);case Cot:return new r;case Tot:return got(e)}}var DX=Object.create,Fot=function(){function e(){}return function(t){if(!kw(t))return{};if(DX)return DX(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function jot(e){return typeof e.constructor=="function"&&!wV(e)?Fot(xV(e)):{}}var Bot="[object Map]";function zot(e){return Xh(e)&&Tu(e)==Bot}var kX=Wy&&Wy.isMap,Vot=kX?SV(kX):zot,Hot="[object Set]";function Uot(e){return Xh(e)&&Tu(e)==Hot}var _X=Wy&&Wy.isSet,Got=_X?SV(_X):Uot,qot=1,Wot=2,Kot=4,Eue="[object Arguments]",Yot="[object Array]",Qot="[object Boolean]",Xot="[object Date]",Jot="[object Error]",Tue="[object Function]",Zot="[object GeneratorFunction]",eit="[object Map]",tit="[object Number]",Oue="[object Object]",nit="[object RegExp]",rit="[object Set]",oit="[object String]",iit="[object Symbol]",ait="[object WeakMap]",sit="[object ArrayBuffer]",lit="[object DataView]",cit="[object Float32Array]",uit="[object Float64Array]",dit="[object Int8Array]",fit="[object Int16Array]",pit="[object Int32Array]",hit="[object Uint8Array]",mit="[object Uint8ClampedArray]",git="[object Uint16Array]",yit="[object Uint32Array]",kr={};kr[Eue]=kr[Yot]=kr[sit]=kr[lit]=kr[Qot]=kr[Xot]=kr[cit]=kr[uit]=kr[dit]=kr[fit]=kr[pit]=kr[eit]=kr[tit]=kr[Oue]=kr[nit]=kr[rit]=kr[oit]=kr[iit]=kr[hit]=kr[mit]=kr[git]=kr[yit]=!0;kr[Jot]=kr[Tue]=kr[ait]=!1;function fx(e,t,n,r,o,i){var a,s=t&qot,l=t&Wot,c=t&Kot;if(a!==void 0)return a;if(!kw(e))return e;var u=_w(e);if(u){if(a=fot(e),!s)return bue(e,a)}else{var f=Tu(e),p=f==Tue||f==Zot;if(pue(e))return Yrt(e,s);if(f==Oue||f==Eue||p&&!o){if(a=l||p?{}:jot(e),!s)return l?tot(e,Wrt(a,e)):Zrt(e,Vrt(a,e))}else{if(!kr[f])return o?e:{};a=Lot(e,f,s)}}i||(i=new Dv);var m=i.get(e);if(m)return m;i.set(e,a),Got(e)?e.forEach(function(v){a.add(fx(v,t,n,v,e,i))}):Vot(e)&&e.forEach(function(v,w){a.set(w,fx(v,t,n,w,e,i))});var g=c?l?rot:not:l?EV:CV,y=u?void 0:g(e);return Wnt(y||e,function(v,w){y&&(w=v,v=e[w]),uue(a,w,fx(v,t,n,w,e,i))}),a}var vit=1,bit=4;function V0(e){return fx(e,vit|bit)}var n$,$X;function xit(){if($X)return n$;$X=1;var e=Array.isArray,t=Object.keys,n=Object.prototype.hasOwnProperty,r=typeof Element<"u";function o(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){var s=e(i),l=e(a),c,u,f;if(s&&l){if(u=i.length,u!=a.length)return!1;for(c=u;c--!==0;)if(!o(i[c],a[c]))return!1;return!0}if(s!=l)return!1;var p=i instanceof Date,m=a instanceof Date;if(p!=m)return!1;if(p&&m)return i.getTime()==a.getTime();var g=i instanceof RegExp,y=a instanceof RegExp;if(g!=y)return!1;if(g&&y)return i.toString()==a.toString();var v=t(i);if(u=v.length,u!==t(a).length)return!1;for(c=u;c--!==0;)if(!n.call(a,v[c]))return!1;if(r&&i instanceof Element&&a instanceof Element)return i===a;for(c=u;c--!==0;)if(f=v[c],!(f==="_owner"&&i.$$typeof)&&!o(i[f],a[f]))return!1;return!0}return i!==i&&a!==a}return n$=function(a,s){try{return o(a,s)}catch(l){if(l.message&&l.message.match(/stack|recursion/i)||l.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",l.name,l.message),!1;throw l}},n$}var Sit=xit();const Wd=Gn(Sit);var wit=4;function NX(e){return fx(e,wit)}function Iue(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Cit="[object Symbol]";function IV(e){return typeof e=="symbol"||Xh(e)&&Qh(e)==Cit}var Eit="Expected a function";function PV(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Eit);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(PV.Cache||Yf),n}PV.Cache=Yf;var Tit=500;function Oit(e){var t=PV(e,function(r){return n.size===Tit&&n.clear(),r}),n=t.cache;return t}var Iit=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pit=/\\(\\)?/g,Ait=Oit(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Iit,function(n,r,o,i){t.push(o?i.replace(Pit,"$1"):r||n)}),t});function Mit(e){if(typeof e=="string"||IV(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var LX=Df?Df.prototype:void 0,FX=LX?LX.toString:void 0;function Pue(e){if(typeof e=="string")return e;if(_w(e))return Iue(e,Pue)+"";if(IV(e))return FX?FX.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Rit(e){return e==null?"":Pue(e)}function Aue(e){return _w(e)?Iue(e,Mit):IV(e)?[e]:bue(Ait(Rit(e)))}function fo(){return fo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fo.apply(this,arguments)}function Dit(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function AV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function jX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var PP=x.createContext(void 0);PP.displayName="FormikContext";var kit=PP.Provider,_it=PP.Consumer;function MV(){var e=x.useContext(PP);return e}var BX=function(t){return Array.isArray(t)&&t.length===0},ya=function(t){return typeof t=="function"},kv=function(t){return t!==null&&typeof t=="object"},$it=function(t){return String(Math.floor(Number(t)))===t},r$=function(t){return Object.prototype.toString.call(t)==="[object String]"},Mue=function(t){return x.Children.count(t)===0},o$=function(t){return kv(t)&&ya(t.then)};function ti(e,t,n,r){r===void 0&&(r=0);for(var o=Aue(t);e&&r<o.length;)e=e[o[r++]];return r!==o.length&&!e||e===void 0?n:e}function Rc(e,t,n){for(var r=NX(e),o=r,i=0,a=Aue(t);i<a.length-1;i++){var s=a[i],l=ti(e,a.slice(0,i+1));if(l&&(kv(l)||Array.isArray(l)))o=o[s]=NX(l);else{var c=a[i+1];o=o[s]=$it(c)&&Number(c)>=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function Rue(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],s=e[a];kv(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},Rue(s,t,n,r[a])):r[a]=t}return r}function Nit(e,t){switch(t.type){case"SET_VALUES":return fo({},e,{values:t.payload});case"SET_TOUCHED":return fo({},e,{touched:t.payload});case"SET_ERRORS":return Wd(e.errors,t.payload)?e:fo({},e,{errors:t.payload});case"SET_STATUS":return fo({},e,{status:t.payload});case"SET_ISSUBMITTING":return fo({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return fo({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return fo({},e,{values:Rc(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return fo({},e,{touched:Rc(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return fo({},e,{errors:Rc(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return fo({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return fo({},e,{touched:Rue(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return fo({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return fo({},e,{isSubmitting:!1});default:return e}}var Ep={},Q1={};function Lit(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,o=r===void 0?!0:r,i=e.validateOnMount,a=i===void 0?!1:i,s=e.isInitialValid,l=e.enableReinitialize,c=l===void 0?!1:l,u=e.onSubmit,f=AV(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=fo({validateOnChange:n,validateOnBlur:o,validateOnMount:a,onSubmit:u},f),m=x.useRef(p.initialValues),g=x.useRef(p.initialErrors||Ep),y=x.useRef(p.initialTouched||Q1),v=x.useRef(p.initialStatus),w=x.useRef(!1),C=x.useRef({});x.useEffect(function(){return w.current=!0,function(){w.current=!1}},[]);var E=x.useState(0),I=E[1],O=x.useRef({values:V0(p.initialValues),errors:V0(p.initialErrors)||Ep,touched:V0(p.initialTouched)||Q1,status:V0(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),P=O.current,R=x.useCallback(function(te){var Te=O.current;O.current=Nit(Te,te),Te!==O.current&&I(function(De){return De+1})},[]),D=x.useCallback(function(te,Te){return new Promise(function(De,Ve){var We=p.validate(te,Te);We==null?De(Ep):o$(We)?We.then(function(rt){De(rt||Ep)},function(rt){Ve(rt)}):De(We)})},[p.validate]),M=x.useCallback(function(te,Te){var De=p.validationSchema,Ve=ya(De)?De(Te):De,We=Te&&Ve.validateAt?Ve.validateAt(Te,te):jit(te,Ve);return new Promise(function(rt,ut){We.then(function(){rt(Ep)},function(Be){Be.name==="ValidationError"?rt(Fit(Be)):ut(Be)})})},[p.validationSchema]),A=x.useCallback(function(te,Te){return new Promise(function(De){return De(C.current[te].validate(Te))})},[]),_=x.useCallback(function(te){var Te=Object.keys(C.current).filter(function(Ve){return ya(C.current[Ve].validate)}),De=Te.length>0?Te.map(function(Ve){return A(Ve,ti(te,Ve))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(De).then(function(Ve){return Ve.reduce(function(We,rt,ut){return rt==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||rt&&(We=Rc(We,Te[ut],rt)),We},{})})},[A]),N=x.useCallback(function(te){return Promise.all([_(te),p.validationSchema?M(te):{},p.validate?D(te):{}]).then(function(Te){var De=Te[0],Ve=Te[1],We=Te[2],rt=GF.all([De,Ve,We],{arrayMerge:Bit});return rt})},[p.validate,p.validationSchema,_,D,M]),B=As(function(te){return te===void 0&&(te=P.values),R({type:"SET_ISVALIDATING",payload:!0}),N(te).then(function(Te){return w.current&&(R({type:"SET_ISVALIDATING",payload:!1}),R({type:"SET_ERRORS",payload:Te})),Te})});x.useEffect(function(){a&&w.current===!0&&Wd(m.current,p.initialValues)&&B(m.current)},[a,B]);var H=x.useCallback(function(te){var Te=te&&te.values?te.values:m.current,De=te&&te.errors?te.errors:g.current?g.current:p.initialErrors||{},Ve=te&&te.touched?te.touched:y.current?y.current:p.initialTouched||{},We=te&&te.status?te.status:v.current?v.current:p.initialStatus;m.current=Te,g.current=De,y.current=Ve,v.current=We;var rt=function(){R({type:"RESET_FORM",payload:{isSubmitting:!!te&&!!te.isSubmitting,errors:De,touched:Ve,status:We,values:Te,isValidating:!!te&&!!te.isValidating,submitCount:te&&te.submitCount&&typeof te.submitCount=="number"?te.submitCount:0}})};if(p.onReset){var ut=p.onReset(P.values,ue);o$(ut)?ut.then(rt):rt()}else rt()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);x.useEffect(function(){w.current===!0&&!Wd(m.current,p.initialValues)&&c&&(m.current=p.initialValues,H(),a&&B(m.current))},[c,p.initialValues,H,a,B]),x.useEffect(function(){c&&w.current===!0&&!Wd(g.current,p.initialErrors)&&(g.current=p.initialErrors||Ep,R({type:"SET_ERRORS",payload:p.initialErrors||Ep}))},[c,p.initialErrors]),x.useEffect(function(){c&&w.current===!0&&!Wd(y.current,p.initialTouched)&&(y.current=p.initialTouched||Q1,R({type:"SET_TOUCHED",payload:p.initialTouched||Q1}))},[c,p.initialTouched]),x.useEffect(function(){c&&w.current===!0&&!Wd(v.current,p.initialStatus)&&(v.current=p.initialStatus,R({type:"SET_STATUS",payload:p.initialStatus}))},[c,p.initialStatus,p.initialTouched]);var j=As(function(te){if(C.current[te]&&ya(C.current[te].validate)){var Te=ti(P.values,te),De=C.current[te].validate(Te);return o$(De)?(R({type:"SET_ISVALIDATING",payload:!0}),De.then(function(Ve){return Ve}).then(function(Ve){R({type:"SET_FIELD_ERROR",payload:{field:te,value:Ve}}),R({type:"SET_ISVALIDATING",payload:!1})})):(R({type:"SET_FIELD_ERROR",payload:{field:te,value:De}}),Promise.resolve(De))}else if(p.validationSchema)return R({type:"SET_ISVALIDATING",payload:!0}),M(P.values,te).then(function(Ve){return Ve}).then(function(Ve){R({type:"SET_FIELD_ERROR",payload:{field:te,value:ti(Ve,te)}}),R({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),L=x.useCallback(function(te,Te){var De=Te.validate;C.current[te]={validate:De}},[]),V=x.useCallback(function(te){delete C.current[te]},[]),W=As(function(te,Te){R({type:"SET_TOUCHED",payload:te});var De=Te===void 0?o:Te;return De?B(P.values):Promise.resolve()}),K=x.useCallback(function(te){R({type:"SET_ERRORS",payload:te})},[]),G=As(function(te,Te){var De=ya(te)?te(P.values):te;R({type:"SET_VALUES",payload:De});var Ve=Te===void 0?n:Te;return Ve?B(De):Promise.resolve()}),q=x.useCallback(function(te,Te){R({type:"SET_FIELD_ERROR",payload:{field:te,value:Te}})},[]),Y=As(function(te,Te,De){R({type:"SET_FIELD_VALUE",payload:{field:te,value:Te}});var Ve=De===void 0?n:De;return Ve?B(Rc(P.values,te,Te)):Promise.resolve()}),Z=x.useCallback(function(te,Te){var De=Te,Ve=te,We;if(!r$(te)){te.persist&&te.persist();var rt=te.target?te.target:te.currentTarget,ut=rt.type,Be=rt.name,et=rt.id,Le=rt.value,It=rt.checked;rt.outerHTML;var Lt=rt.options,nt=rt.multiple;De=Te||Be||et,Ve=/number|range/.test(ut)?(We=parseFloat(Le),isNaN(We)?"":We):/checkbox/.test(ut)?Vit(ti(P.values,De),It,Le):Lt&&nt?zit(Lt):Le}De&&Y(De,Ve)},[Y,P.values]),ie=As(function(te){if(r$(te))return function(Te){return Z(Te,te)};Z(te)}),se=As(function(te,Te,De){Te===void 0&&(Te=!0),R({type:"SET_FIELD_TOUCHED",payload:{field:te,value:Te}});var Ve=De===void 0?o:De;return Ve?B(P.values):Promise.resolve()}),ce=x.useCallback(function(te,Te){te.persist&&te.persist();var De=te.target,Ve=De.name,We=De.id;De.outerHTML;var rt=Te||Ve||We;se(rt,!0)},[se]),ye=As(function(te){if(r$(te))return function(Te){return ce(Te,te)};ce(te)}),Se=x.useCallback(function(te){ya(te)?R({type:"SET_FORMIK_STATE",payload:te}):R({type:"SET_FORMIK_STATE",payload:function(){return te}})},[]),ne=x.useCallback(function(te){R({type:"SET_STATUS",payload:te})},[]),le=x.useCallback(function(te){R({type:"SET_ISSUBMITTING",payload:te})},[]),de=As(function(){return R({type:"SUBMIT_ATTEMPT"}),B().then(function(te){var Te=te instanceof Error,De=!Te&&Object.keys(te).length===0;if(De){var Ve;try{if(Ve=pe(),Ve===void 0)return}catch(We){throw We}return Promise.resolve(Ve).then(function(We){return w.current&&R({type:"SUBMIT_SUCCESS"}),We}).catch(function(We){if(w.current)throw R({type:"SUBMIT_FAILURE"}),We})}else if(w.current&&(R({type:"SUBMIT_FAILURE"}),Te))throw te})}),oe=As(function(te){te&&te.preventDefault&&ya(te.preventDefault)&&te.preventDefault(),te&&te.stopPropagation&&ya(te.stopPropagation)&&te.stopPropagation(),de().catch(function(Te){console.warn("Warning: An unhandled error was caught from submitForm()",Te)})}),ue={resetForm:H,validateForm:B,validateField:j,setErrors:K,setFieldError:q,setFieldTouched:se,setFieldValue:Y,setStatus:ne,setSubmitting:le,setTouched:W,setValues:G,setFormikState:Se,submitForm:de},pe=As(function(){return u(P.values,ue)}),Ee=As(function(te){te&&te.preventDefault&&ya(te.preventDefault)&&te.preventDefault(),te&&te.stopPropagation&&ya(te.stopPropagation)&&te.stopPropagation(),H()}),xe=x.useCallback(function(te){return{value:ti(P.values,te),error:ti(P.errors,te),touched:!!ti(P.touched,te),initialValue:ti(m.current,te),initialTouched:!!ti(y.current,te),initialError:ti(g.current,te)}},[P.errors,P.touched,P.values]),Re=x.useCallback(function(te){return{setValue:function(De,Ve){return Y(te,De,Ve)},setTouched:function(De,Ve){return se(te,De,Ve)},setError:function(De){return q(te,De)}}},[Y,se,q]),he=x.useCallback(function(te){var Te=kv(te),De=Te?te.name:te,Ve=ti(P.values,De),We={name:De,value:Ve,onChange:ie,onBlur:ye};if(Te){var rt=te.type,ut=te.value,Be=te.as,et=te.multiple;rt==="checkbox"?ut===void 0?We.checked=!!Ve:(We.checked=!!(Array.isArray(Ve)&&~Ve.indexOf(ut)),We.value=ut):rt==="radio"?(We.checked=Ve===ut,We.value=ut):Be==="select"&&et&&(We.value=We.value||[],We.multiple=!0)}return We},[ye,ie,P.values]),Pe=x.useMemo(function(){return!Wd(m.current,P.values)},[m.current,P.values]),ve=x.useMemo(function(){return typeof s<"u"?Pe?P.errors&&Object.keys(P.errors).length===0:s!==!1&&ya(s)?s(p):s:P.errors&&Object.keys(P.errors).length===0},[s,Pe,P.errors,p]),Ie=fo({},P,{initialValues:m.current,initialErrors:g.current,initialTouched:y.current,initialStatus:v.current,handleBlur:ye,handleChange:ie,handleReset:Ee,handleSubmit:oe,resetForm:H,setErrors:K,setFormikState:Se,setFieldTouched:se,setFieldValue:Y,setFieldError:q,setStatus:ne,setSubmitting:le,setTouched:W,setValues:G,submitForm:de,validateForm:B,validateField:j,isValid:ve,dirty:Pe,unregisterField:V,registerField:L,getFieldProps:he,getFieldMeta:xe,getFieldHelpers:Re,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return Ie}function Oi(e){var t=Lit(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return x.useImperativeHandle(i,function(){return t}),x.createElement(kit,{value:t},n?x.createElement(n,t):o?o(t):r?ya(r)?r(t):Mue(r)?null:x.Children.only(r):null)}function Fit(e){var t={};if(e.inner){if(e.inner.length===0)return Rc(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;ti(t,a.path)||(t=Rc(t,a.path,a.message))}}return t}function jit(e,t,n,r){n===void 0&&(n=!1);var o=QF(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function QF(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||pX(o)?QF(o):o!==""?o:void 0}):pX(e[r])?t[r]=QF(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Bit(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?GF(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=GF(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function zit(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Vit(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var Hit=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function As(e){var t=x.useRef(e);return Hit(function(){t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current.apply(void 0,r)},[])}function us(e){var t=MV(),n=t.getFieldProps,r=t.getFieldMeta,o=t.getFieldHelpers,i=t.registerField,a=t.unregisterField,s=kv(e),l=s?e:{name:e},c=l.name,u=l.validate;x.useEffect(function(){return c&&i(c,{validate:u}),function(){c&&a(c)}},[i,a,c,u]);var f=x.useMemo(function(){return o(c)},[o,c]);return[n(l),r(c),f]}var pi=x.forwardRef(function(e,t){var n=e.action,r=AV(e,["action"]),o=n??"#",i=MV(),a=i.handleReset,s=i.handleSubmit;return x.createElement("form",fo({onSubmit:s,ref:t,onReset:a,action:o},r))});pi.displayName="Form";function Uit(e){var t=function(o){return x.createElement(_it,null,function(i){return x.createElement(e,fo({},o,{formik:i}))})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",ove(t,e)}var Git=function(t,n,r){var o=Rh(t),i=o[n];return o.splice(n,1),o.splice(r,0,i),o},qit=function(t,n,r){var o=Rh(t),i=o[n];return o[n]=o[r],o[r]=i,o},i$=function(t,n,r){var o=Rh(t);return o.splice(n,0,r),o},Wit=function(t,n,r){var o=Rh(t);return o[n]=r,o},Rh=function(t){if(t){if(Array.isArray(t))return[].concat(t);var n=Object.keys(t).map(function(r){return parseInt(r)}).reduce(function(r,o){return o>r?o:r},0);return Array.from(fo({},t,{length:n+1}))}else return[]},zX=function(t,n){var r=typeof t=="function"?t:n;return function(o){if(Array.isArray(o)||kv(o)){var i=Rh(o);return r(i)}return o}},Due=function(e){Dit(t,e);function t(r){var o;return o=e.call(this,r)||this,o.updateArrayField=function(i,a,s){var l=o.props,c=l.name,u=l.formik.setFormikState;u(function(f){var p=zX(s,i),m=zX(a,i),g=Rc(f.values,c,i(ti(f.values,c))),y=s?p(ti(f.errors,c)):void 0,v=a?m(ti(f.touched,c)):void 0;return BX(y)&&(y=void 0),BX(v)&&(v=void 0),fo({},f,{values:g,errors:s?Rc(f.errors,c,y):f.errors,touched:a?Rc(f.touched,c,v):f.touched})})},o.push=function(i){return o.updateArrayField(function(a){return[].concat(Rh(a),[V0(i)])},!1,!1)},o.handlePush=function(i){return function(){return o.push(i)}},o.swap=function(i,a){return o.updateArrayField(function(s){return qit(s,i,a)},!0,!0)},o.handleSwap=function(i,a){return function(){return o.swap(i,a)}},o.move=function(i,a){return o.updateArrayField(function(s){return Git(s,i,a)},!0,!0)},o.handleMove=function(i,a){return function(){return o.move(i,a)}},o.insert=function(i,a){return o.updateArrayField(function(s){return i$(s,i,a)},function(s){return i$(s,i,null)},function(s){return i$(s,i,null)})},o.handleInsert=function(i,a){return function(){return o.insert(i,a)}},o.replace=function(i,a){return o.updateArrayField(function(s){return Wit(s,i,a)},!1,!1)},o.handleReplace=function(i,a){return function(){return o.replace(i,a)}},o.unshift=function(i){var a=-1;return o.updateArrayField(function(s){var l=s?[i].concat(s):[i];return a=l.length,l},function(s){return s?[null].concat(s):[null]},function(s){return s?[null].concat(s):[null]}),a},o.handleUnshift=function(i){return function(){return o.unshift(i)}},o.handleRemove=function(i){return function(){return o.remove(i)}},o.handlePop=function(){return function(){return o.pop()}},o.remove=o.remove.bind(jX(o)),o.pop=o.pop.bind(jX(o)),o}var n=t.prototype;return n.componentDidUpdate=function(o){this.props.validateOnChange&&this.props.formik.validateOnChange&&!Wd(ti(o.formik.values,o.name),ti(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(o){var i;return this.updateArrayField(function(a){var s=a?Rh(a):[];return i||(i=s[o]),ya(s.splice)&&s.splice(o,1),ya(s.every)&&s.every(function(l){return l===void 0})?[]:s},!0,!0),i},n.pop=function(){var o;return this.updateArrayField(function(i){var a=i.slice();return o||(o=a&&a.pop&&a.pop()),a},!0,!0),o},n.render=function(){var o={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},i=this.props,a=i.component,s=i.render,l=i.children,c=i.name,u=i.formik,f=AV(u,["validate","validationSchema"]),p=fo({},o,{form:f,name:c});return a?x.createElement(a,p):s?s(p):l?typeof l=="function"?l(p):Mue(l)?null:x.Children.only(l):null},t}(x.Component);Due.defaultProps={validateOnChange:!0};var kue=Uit(Due),a$,VX;function Kit(){if(VX)return a$;VX=1;function e(w){this._maxSize=w,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(w){return this._values[w]},e.prototype.set=function(w,C){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=C};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,s=new e(a),l=new e(a),c=new e(a);a$={Cache:e,split:f,normalizePath:u,setter:function(w){var C=u(w);return l.get(w)||l.set(w,function(I,O){for(var P=0,R=C.length,D=I;P<R-1;){var M=C[P];if(M==="__proto__"||M==="constructor"||M==="prototype")return I;D=D[C[P++]]}D[C[P]]=O})},getter:function(w,C){var E=u(w);return c.get(w)||c.set(w,function(O){for(var P=0,R=E.length;P<R;)if(O!=null||!C)O=O[E[P++]];else return;return O})},join:function(w){return w.reduce(function(C,E){return C+(m(E)||n.test(E)?"["+E+"]":(C?".":"")+E)},"")},forEach:function(w,C,E){p(Array.isArray(w)?w:f(w),C,E)}};function u(w){return s.get(w)||s.set(w,f(w).map(function(C){return C.replace(i,"$2")}))}function f(w){return w.match(t)||[""]}function p(w,C,E){var I=w.length,O,P,R,D;for(P=0;P<I;P++)O=w[P],O&&(v(O)&&(O='"'+O+'"'),D=m(O),R=!D&&/^\d+$/.test(O),C.call(E,O,D,R,P,w))}function m(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function g(w){return w.match(r)&&!w.match(n)}function y(w){return o.test(w)}function v(w){return!m(w)&&(g(w)||y(w))}return a$}var lh=Kit(),s$,HX;function Yit(){if(HX)return s$;HX=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=u=>u.match(e)||[],n=u=>u[0].toUpperCase()+u.slice(1),r=(u,f)=>t(u).join(f).toLowerCase(),o=u=>t(u).reduce((f,p)=>`${f}${f?p[0].toUpperCase()+p.slice(1).toLowerCase():p.toLowerCase()}`,"");return s$={words:t,upperFirst:n,camelCase:o,pascalCase:u=>n(o(u)),snakeCase:u=>r(u,"_"),kebabCase:u=>r(u,"-"),sentenceCase:u=>n(r(u," ")),titleCase:u=>t(u).map(n).join(" ")},s$}var l$=Yit(),X1={exports:{}},UX;function Qit(){if(UX)return X1.exports;UX=1,X1.exports=function(o){return e(t(o),o)},X1.exports.array=e;function e(o,i){var a=o.length,s=new Array(a),l={},c=a,u=n(i),f=r(o);for(i.forEach(function(m){if(!f.has(m[0])||!f.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});c--;)l[c]||p(o[c],c,new Set);return s;function p(m,g,y){if(y.has(m)){var v;try{v=", node was:"+JSON.stringify(m)}catch{v=""}throw new Error("Cyclic dependency"+v)}if(!f.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[g]){l[g]=!0;var w=u.get(m)||new Set;if(w=Array.from(w),g=w.length){y.add(m);do{var C=w[--g];p(C,f.get(C),y)}while(g);y.delete(m)}s[--a]=m}}}function t(o){for(var i=new Set,a=0,s=o.length;a<s;a++){var l=o[a];i.add(l[0]),i.add(l[1])}return Array.from(i)}function n(o){for(var i=new Map,a=0,s=o.length;a<s;a++){var l=o[a];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function r(o){for(var i=new Map,a=0,s=o.length;a<s;a++)i.set(o[a],a);return i}return X1.exports}var Xit=Qit();const Jit=Gn(Xit),Zit=Object.prototype.toString,eat=Error.prototype.toString,tat=RegExp.prototype.toString,nat=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",rat=/^Symbol\((.*)\)(.*)$/;function oat(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function GX(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return oat(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return nat.call(e).replace(rat,"Symbol($1)");const r=Zit.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+eat.call(e)+"]":r==="RegExp"?tat.call(e):null}function Lu(e,t){let n=GX(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=GX(this[r],t);return i!==null?i:o},2)}function _ue(e){return e==null?[]:[].concat(e)}let $ue,Nue,Lue,iat=/\$\{\s*(\w+)\s*\}/g;$ue=Symbol.toStringTag;class qX{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[$ue]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],_ue(t).forEach(i=>{if(Sa.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Nue=Symbol.hasInstance;Lue=Symbol.toStringTag;class Sa extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(iat,(o,i)=>Lu(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new qX(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Lue]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Sa)}static[Nue](t){return qX[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let fc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Lu(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Lu(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Lu(n,!0)}\``+o}},ha={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Hd={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},XF={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},JF={isValue:"${path} field must be ${value}"},OE={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},IE={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},aat={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Lu(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Lu(n,!0)}\``}return Sa.formatError(fc.notType,e)}};Object.assign(Object.create(null),{mixed:fc,string:ha,number:Hd,date:XF,object:OE,array:IE,boolean:JF,tuple:aat});const AP=e=>e&&e.__isYupSchema__;class vO{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new vO(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!AP(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const J1={context:"$",value:"."};function MP(e,t){return new Qf(e,t)}class Qf{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===J1.context,this.isValue=this.key[0]===J1.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?J1.context:this.isValue?J1.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&lh.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Qf.prototype.__isYupRef=!0;const Ll=e=>e==null;function ng(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:f,message:p,skipAbsent:m}=e;let{parent:g,context:y,abortEarly:v=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=o;function C(_){return Qf.isRef(_)?_.getValue(n,g,y):_}function E(_={}){const N=Object.assign({value:n,originalValue:i,label:a.spec.label,path:_.path||r,spec:a.spec,disableStackTrace:_.disableStackTrace||w},f,_.params);for(const H of Object.keys(N))N[H]=C(N[H]);const B=new Sa(Sa.formatError(_.message||p,N),n,N.path,_.type||c,N.disableStackTrace);return B.params=N,B}const I=v?s:l;let O={path:r,parent:g,type:c,from:o.from,createError:E,resolve:C,options:o,originalValue:i,schema:a};const P=_=>{Sa.isError(_)?I(_):_?l(null):I(E())},R=_=>{Sa.isError(_)?I(_):s(_)};if(m&&Ll(n))return P(!0);let M;try{var A;if(M=u.call(O,n,O),typeof((A=M)==null?void 0:A.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(P,R)}}catch(_){R(_);return}P(M)}return t.OPTIONS=e,t}function sat(e,t,n,r=n){let o,i,a;return t?(lh.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let f=e.type==="tuple",p=c?parseInt(u,10):0;if(e.innerType||f){if(f&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&p>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[p],e=f?e.spec.types[p]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class bO extends Set{describe(){const t=[];for(const n of this.values())t.push(Qf.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new bO(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Eg(e,t=new Map){if(AP(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Eg(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,Eg(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Eg(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Eg(o,t)}else throw Error(`Unable to clone ${e}`);return n}class is{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new bO,this._blacklist=new bO,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(fc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Eg(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&Ll(i))return i;let a=Lu(t),s=Lu(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
attempted value: ${a}
-`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=y=>{o||(o=!0,n(y,a))},f=y=>{o||(o=!0,r(y,a))},h=i.length,m=[];if(!h)return f([]);let g={value:a,originalValue:s,path:l,options:c,schema:this};for(let y=0;y<i.length;y++){const v=i[y];v(g,u,function(C){C&&(Array.isArray(C)?m.push(...C):m.push(C)),--h<=0&&f(m)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:i,options:a}){const s=t??n;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let c=r[s];const u=Object.assign({},a,{strict:!0,parent:r,value:c,originalValue:i[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${o||""}[${l?s:`"${s}"`}]`:(o?`${o}.`:"")+t});return(f,h,m)=>this.resolve(u)._validate(c,u,h,m)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{Sa.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new Sa(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw Sa.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Sa(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Sa.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Sa.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Cg(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=tg({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=tg({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=dc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=dc.notNull){return this.nullability(!1,t)}required(t=dc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=dc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=tg(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=kue(t).map(i=>new Kf(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new yO(o,n):yO.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=tg({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=dc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=tg({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=dc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=tg({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(f=>f.name===l.name)===c)}}}is.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])is.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=aat(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])is.prototype[e]=is.prototype.oneOf;for(const e of["not","nope"])is.prototype[e]=is.prototype.notOneOf;function Lu(){return new Lue}class Lue extends is{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=XF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return $l(n)||n===!0}})}isFalse(t=XF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return $l(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Lu.prototype=Lue.prototype;const sat=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function lat(e){const t=JF(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function JF(e){var t,n;const r=sat.exec(e);return r?{year:vu(r[1]),month:vu(r[2],1)-1,day:vu(r[3],1),hour:vu(r[4]),minute:vu(r[5]),second:vu(r[6]),millisecond:r[7]?vu(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:vu(r[10]),minuteOffset:vu(r[11])}:null}function vu(e,t=0){return Number(e)||t}let cat=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,uat=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,dat=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,fat="^\\d{4}-\\d{2}-\\d{2}",pat="\\d{2}:\\d{2}:\\d{2}",hat="(([+-]\\d{2}(:?\\d{2})?)|Z)",mat=new RegExp(`${fat}T${pat}(\\.\\d+)?${hat}$`),gat=e=>$l(e)||e===e.trim(),yat={}.toString();function Ho(){return new Fue}class Fue extends is{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===yat?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||dc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=ha.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=ha.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=ha.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||ha.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=ha.email){return this.matches(cat,{name:"email",message:t,excludeEmptyString:!0})}url(t=ha.url){return this.matches(uat,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ha.uuid){return this.matches(dat,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(mat,{name:"datetime",message:n||ha.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||ha.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=JF(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||ha.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=JF(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ha.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:gat})}lowercase(t=ha.lowercase){return this.transform(n=>$l(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>$l(n)||n===n.toLowerCase()})}uppercase(t=ha.uppercase){return this.transform(n=>$l(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>$l(n)||n===n.toUpperCase()})}}Ho.prototype=Fue.prototype;let vat=e=>e!=+e;function Do(){return new jue}class jue extends is{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!vat(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=zd.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=zd.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=zd.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=zd.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=zd.positive){return this.moreThan(0,t)}negative(t=zd.negative){return this.lessThan(0,t)}integer(t=zd.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>$l(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>$l(o)?o:Math[t](o))}}Do.prototype=jue.prototype;let Bue=new Date(""),bat=e=>Object.prototype.toString.call(e)==="[object Date]";function Xs(){return new $w}class $w extends is{constructor(){super({type:"date",check(t){return bat(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=lat(t),isNaN(t)?$w.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Kf.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=QF.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=QF.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}$w.INVALID_DATE=Bue;Xs.prototype=$w.prototype;Xs.INVALID_DATE=Bue;function xat(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=ah.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),Kf.isRef(s)&&s.isSibling?i(s.path,a):PP(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return Xit.array(Array.from(r),n).reverse()}function qX(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function zue(e){return(t,n)=>qX(e,t)-qX(e,n)}const Vue=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function IE(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=IE(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=IE(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(IE)}):"optional"in e?e.optional():e}const Sat=(e,t)=>{const n=[...ah.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=ah.getter(ah.join(n),!0)(e);return!!(o&&r in o)};let WX=e=>Object.prototype.toString.call(e)==="[object Object]";function KX(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const wat=zue([]);function Wo(e){return new Hue(e)}class Hue extends is{constructor(t){super({type:"object",check(n){return WX(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=wat,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const f of s){let h=i[f],m=f in o;if(h){let g,y=o[f];c.path=(n.path?`${n.path}.`:"")+f,h=h.resolve({value:y,context:n.context,parent:l});let v=h instanceof is?h.spec:void 0,w=v==null?void 0:v.strict;if(v!=null&&v.strip){u=u||f in o;continue}g=!n.__validating||!w?h.cast(o[f],c):o[f],g!==void 0&&(l[f]=g)}else m&&!a&&(l[f]=o[f]);(m!==f in l||l[f]!==o[f])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!WX(c)){o(l,c);return}a=a||c;let u=[];for(let f of this._nodes){let h=this.fields[f];!h||Kf.isRef(h)||u.push(h.asNestedTest({options:n,key:f,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,f=>{o(f.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=xat(t,n),r._sortErrors=zue(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return IE(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=ah.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return Sat(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(Vue)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||TE.exact,test(n){if(n==null)return!0;const r=KX(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=TE.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=KX(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=TE.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(s$.camelCase)}snakeCase(){return this.transformKeys(s$.snakeCase)}constantCase(){return this.transformKeys(t=>s$.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}Wo.prototype=Hue.prototype;function sh(e){return new Uue(e)}class Uue extends is{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let f=new Array(c.length);for(let m=0;m<c.length;m++){var h;f[m]=a.asNestedTest({options:n,index:m,parent:c,parentPath:n.path,originalParent:(h=n.originalValue)!=null?h:t})}this.runTests({value:c,tests:f,originalValue:(u=n.originalValue)!=null?u:t,options:n},r,m=>o(m.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Vue)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!PP(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Nu(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=OE.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||OE.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||OE.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}sh.prototype=Uue.prototype;const MV=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=je(),c=rFe(e),u=oFe(e),[f,h]=x.useState(t?xt.fromJSDate(t.datetime):xt.now()),[m,g]=x.useState(i),y=Wo({amount:Do().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:Do().required(s("forms.fieldRequired")),datetime:Xs().required(s("forms.fieldRequired"))});return S(Ti,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:y,onSubmit:async v=>{const w={...v,plan:e,meal:m,weight_unit:null,datetime:v.datetime.toISOString()};t?u.mutate({...w,id:t.id}):c.mutate(w),o&&o()},children:v=>S(fi,{children:Q(Ft,{spacing:2,children:[S(vV,{callback:w=>v.setFieldValue("ingredient",w==null?void 0:w.data.id)}),S(dn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:S(So,{position:"end",children:s("nutrition.gramShort")})},error:v.touched.amount&&!!v.errors.amount,helperText:v.touched.amount&&v.errors.amount,...v.getFieldProps("amount")}),a.length>0&&S(_c,{value:m,options:a.map(w=>w.id),getOptionLabel:w=>a.find(C=>C.id===w).displayName,onChange:(w,C)=>g(C),renderInput:w=>S(dn,{label:s("nutrition.meal"),value:m,...w})}),S(Ys,{dateAdapter:zl,adapterLocale:l.language,children:S(Itt,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:f,disableFuture:!0,onChange:w=>{v.setFieldValue("datetime",w==null?void 0:w.toJSDate()),h(w)},shouldDisableDate:w=>(t&&Zn(t.datetime)===Zn(w.toJSDate()),!1)})}),Q(Ft,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&S(ct,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),S(ct,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},RV=({plan:e,closeFn:t})=>{const[n]=je(),r=ZLe(),o=tFe(e==null?void 0:e.id),[i,a]=x.useState(e==null?void 0:e.hasAnyGoals),[s,l]=x.useState(e?xt.fromJSDate(e.start):xt.now),[c,u]=x.useState(e&&(e==null?void 0:e.end)!==null?xt.fromJSDate(e.end):null),f=Wo({description:Ho().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),onlyLogging:Lu(),goalEnergy:Do().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goalProtein:Do().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goalCarbohydrates:Do().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goalFiber:Do().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goalFat:Do().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),start:Xs().required(),end:Xs().nullable().min(AP("start"),n("forms.endBeforeStart"))});return S(Ti,{initialValues:{description:e?e.description:n("nutrition.plan"),start:Zn(new Date),end:null,onlyLogging:e?e.onlyLogging:!0,goalEnergy:e?e.goalEnergy:null,goalProtein:e?e.goalProtein:null,goalCarbohydrates:e?e.goalCarbohydrates:null,goalFiber:e?e.goalFiber:null,goalFat:e?e.goalFat:null},validationSchema:f,onSubmit:async h=>{h.goalEnergy=h.goalEnergy?h.goalEnergy:null,h.goalProtein=h.goalProtein?h.goalProtein:null,h.goalCarbohydrates=h.goalCarbohydrates?h.goalCarbohydrates:null,h.goalFiber=h.goalFiber?h.goalFiber:null,h.goalFat=h.goalFat?h.goalFat:null,i||(h.goalEnergy=null,h.goalProtein=null,h.goalCarbohydrates=null,h.goalFiber=null,h.goalFat=null);const m=new SI({start:new Date(h.start),end:h.end?new Date(h.end):null,description:h.description,onlyLogging:h.onlyLogging,goalEnergy:h.goalEnergy,goalProtein:h.goalProtein,goalCarbohydrates:h.goalCarbohydrates,goalFiber:h.goalFiber,goalFat:h.goalFat});e?(m.id=e.id,o.mutate(m)):r.mutate(m),t&&t()},children:h=>S(fi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"description",label:n("description"),error:h.touched.description&&!!h.errors.description,helperText:h.touched.description&&h.errors.description,...h.getFieldProps("description")}),Q(me,{container:!0,spacing:1,children:[S(me,{size:6,children:S(Ys,{dateAdapter:zl,adapterLocale:hr.language,children:S(Ih,{format:"yyyy-MM-dd",label:n("start"),value:s,slotProps:{textField:{variant:"standard",fullWidth:!0,error:h.touched.start&&!!h.errors.start,helperText:h.touched.start&&h.errors.start?String(h.errors.start):""}},onChange:m=>{m&&h.setFieldValue("start",m.toJSDate()),l(m)}})})}),S(me,{size:6,children:S(Ys,{dateAdapter:zl,adapterLocale:hr.language,children:S(Ih,{format:"yyyy-MM-dd",label:n("end"),value:c,slotProps:{textField:{variant:"standard",fullWidth:!0,error:h.touched.end&&!!h.errors.end,helperText:h.touched.end&&h.errors.end?String(h.errors.end):""}},onChange:m=>{m&&h.setFieldValue("end",m.toJSDate()),u(m)}})})})]}),S(Mx,{children:S(os,{label:n("nutrition.onlyLoggingHelpText"),control:S(qo,{id:"onlyLogging",checked:h.values.onlyLogging,...h.getFieldProps("onlyLogging")})})}),S(Mx,{children:S(os,{label:n("nutrition.useGoalsHelpText"),control:S(qo,{id:"goalEnergy",checked:i,onChange:()=>a(!i)})})}),S(aw,{children:n("nutrition.useGoalsHelpTextLong")}),i&&Q(Tt,{children:[S(dn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:h.touched.goalEnergy&&!!h.errors.goalEnergy,helperText:h.touched.goalEnergy&&h.errors.goalEnergy,...h.getFieldProps("goalEnergy"),InputProps:{endAdornment:S(So,{position:"end",children:n("nutrition.kcal")})}}),Q(me,{container:!0,spacing:1,children:[S(me,{size:4,children:S(dn,{id:"protein",fullWidth:!0,label:n("nutrition.goalProtein"),error:h.touched.goalProtein&&!!h.errors.goalProtein,helperText:h.touched.goalProtein&&h.errors.goalProtein,...h.getFieldProps("goalProtein"),InputProps:{startAdornment:S(So,{position:"start",children:h.values.goalProtein!==null&&h.values.goalProtein!==void 0?n("nutrition.valueEnergyKcal",{value:h.values.goalProtein*_g.protein}):""}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})}),S(me,{size:4,children:S(dn,{id:"carbohydrates",fullWidth:!0,label:n("nutrition.goalCarbohydrates"),error:h.touched.goalCarbohydrates&&!!h.errors.goalCarbohydrates,helperText:h.touched.goalCarbohydrates&&h.errors.goalCarbohydrates,...h.getFieldProps("goalCarbohydrates"),InputProps:{startAdornment:S(So,{position:"start",children:h.values.goalCarbohydrates!==null&&h.values.goalCarbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:h.values.goalCarbohydrates*_g.carbohydrates}):""}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})}),S(me,{size:4,children:S(dn,{id:"fat",fullWidth:!0,label:n("nutrition.goalFat"),error:h.touched.goalFat&&!!h.errors.goalFat,helperText:h.touched.goalFat&&h.errors.goalFat,...h.getFieldProps("goalFat"),InputProps:{startAdornment:S(So,{position:"start",children:h.values.goalFat!==null&&h.values.goalFat!==void 0?n("nutrition.valueEnergyKcal",{value:h.values.goalFat*_g.fat}):""}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})})]}),S(me,{container:!0,spacing:1,children:S(me,{size:4,children:S(dn,{id:"fiber",fullWidth:!0,label:n("nutrition.goalFiber"),error:h.touched.goalFiber&&!!h.errors.goalFiber,helperText:h.touched.goalFiber&&h.errors.goalFiber,...h.getFieldProps("goalFiber"),InputProps:{startAdornment:S(So,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})})})]}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},Gue=()=>{const[e]=je(),t=QLe();return t.isLoading?S(Er,{}):t.data!==null?S(Cat,{plan:t.data}):S(gB,{title:e("nutritionalPlan"),modalContent:S(RV,{}),modalTitle:e("add")})};function Cat(e){const[t,n]=je(),[r,o]=J.useState(!1),i=()=>o(!0),a=()=>o(!1);return Q(Tt,{children:[Q(ho,{children:[S(Jl,{title:t("nutritionalPlan"),subheader:e.plan.description}),Q(Fi,{sx:{height:"500px",overflow:"auto"},children:[S(hYe,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),S(ai,{children:e.plan.meals.map(s=>S(Eat,{meal:s,planId:e.plan.id},s.id))})]}),Q(ll,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[S(ct,{size:"small",href:cn(Qt.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),S(Go,{title:t("nutrition.logThisMealItem"),children:S(pn,{onClick:i,children:S(lw,{})})})]})]}),S(Bi,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:S(MV,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const Eat=e=>{const[t,n]=je(),r=oie(e.planId),[o,i]=x.useState(!1),[a,s]=J.useState(!1),l=()=>i(!o),c=(m,g)=>{g!=="clickaway"&&s(!1)},u=m=>{const g=[{plan:e.planId,meal:e.meal.id,mealItem:m.id,ingredient:m.ingredientId,weight_unit:m.weightUnitId,datetime:new Date().toISOString(),amount:m.amount}];r.mutate(g),s(!0)},f=e.meal.name?e.meal.name:nT(e.meal.time,n.language),h=e.meal.name?nT(e.meal.time,n.language):null;return Q(Tt,{children:[Q(Fl,{onClick:l,selected:o,children:[S(nl,{children:o?S(J0,{}):S(Du,{})}),S(Wr,{primary:f,secondary:h})]}),S(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:S(ai,{children:e.meal.items.map(m=>{var g,y,v,w;return Q(Co,{secondaryAction:S(Go,{title:t("nutrition.logThisMealItem"),children:S(pn,{edge:"end",onClick:()=>u(m),children:S(lw,{})})}),children:[S(fB,{children:S(Kl,{alt:(g=m.ingredient)==null?void 0:g.name,src:(v=(y=m.ingredient)==null?void 0:y.image)==null?void 0:v.url,sx:{width:45,height:45},children:S(Ju,{})})}),S(Wr,{primary:(w=m.ingredient)==null?void 0:w.name,secondary:$n(m.amount,n.language)})]},m.id)})})}),S(dI,{open:a,autoHideDuration:EI,onClose:c,children:S(Ci,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})},que=Ot(k.jsx("path",{d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14zM7 10h5v5H7z"}));function Kc(e){return yr({queryKey:[st.ROUTINE_DETAIL,e],queryFn:()=>lNe(e)})}function Tat(e){return yr({queryKey:[st.ROUTINE_STATS,e],queryFn:()=>vNe(e)})}function Wue(e){return yr({queryKey:[st.ROUTINE_LOG_DATA,e],queryFn:()=>yNe(e)})}function Oat(){return yr({queryKey:[st.ROUTINES_SHALLOW],queryFn:cNe})}function Iat(){return yr({queryKey:[st.PRIVATE_TEMPLATES],queryFn:uNe})}function Pat(){return yr({queryKey:[st.PUBLIC_TEMPLATES],queryFn:dNe})}function Aat(){return yr({queryKey:[st.ROUTINES_ACTIVE],queryFn:sNe})}const Mat=()=>{const e=Mt();return Dt({mutationFn:t=>fNe(t),onSuccess:()=>e.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]})})},Kue=e=>{const t=Mt();return Dt({mutationFn:n=>pNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})}})},Rat=e=>{const t=Mt();return Dt({mutationFn:()=>hNe(e),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})}})},Dat=e=>{const t=Mt();return Dt({mutationFn:n=>oLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},kat=e=>{const t=Mt();return Dt({mutationFn:n=>iLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},_at=e=>{const t=Mt();return Dt({mutationFn:n=>aLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},$at=e=>{const t=Mt();return Dt({mutationFn:n=>sLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Nat=e=>{const t=Mt();return Dt({mutationFn:n=>lLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Lat=e=>{const t=Mt();return Dt({mutationFn:n=>cLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Fat=e=>{const t=Mt();return Dt({mutationFn:n=>uLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},jat=e=>{const t=Mt();return Dt({mutationFn:n=>dLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Bat=e=>{const t=Mt();return Dt({mutationFn:n=>fLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},zat=e=>{const t=Mt();return Dt({mutationFn:n=>pLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Vat=e=>{const t=Mt();return Dt({mutationFn:n=>hLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},YX=e=>{const t=Mt();return Dt({mutationFn:n=>mLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Hat=e=>{const t=Mt();return Dt({mutationFn:n=>gLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Uat=e=>{const t=Mt();return Dt({mutationFn:n=>yLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Gat=e=>{const t=Mt();return Dt({mutationFn:n=>vLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},qat=e=>{const t=Mt();return Dt({mutationFn:n=>bLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Wat=e=>{const t=Mt();return Dt({mutationFn:n=>xLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Kat=e=>{const t=Mt();return Dt({mutationFn:n=>SLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Yue=e=>{const t=Mt();return Dt({mutationFn:n=>wLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Que=e=>{const t=Mt();return Dt({mutationFn:n=>CLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Xue=e=>{const t=Mt();return Dt({mutationFn:n=>ELe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Yat=e=>{const t=Mt();return Dt({mutationFn:n=>TLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Qat=e=>{const t=Mt();return Dt({mutationFn:n=>OLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Xat=e=>{const t=Mt();return Dt({mutationFn:n=>ILe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Jat=e=>{const t=Mt();return Dt({mutationFn:n=>PLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Zat=e=>{const t=Mt();return Dt({mutationFn:n=>ALe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},est=e=>{const t=Mt();return Dt({mutationFn:n=>MLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},tst=e=>{const t=Mt();return Dt({mutationFn:n=>RLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},nst=e=>{const t=Mt();return Dt({mutationFn:n=>DLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},rst=e=>{const t=Mt();return Dt({mutationFn:n=>kLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},ost=e=>{const t=Mt();return Dt({mutationFn:n=>QNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},ist=e=>{const t=Mt();return Dt({mutationFn:n=>XNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},ast=e=>{const t=Mt();return Dt({mutationFn:n=>JNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},sst=e=>{const t=Mt();return Dt({mutationFn:n=>ZNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})};function lst(e){const t=Mt();return Dt({mutationFn:n=>UNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_LOG_DATA,e]}),t.invalidateQueries({queryKey:[st.ROUTINE_STATS,e]})}})}function cst(e){const t=Mt();return Dt({mutationFn:n=>GNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_LOGS,e]}),t.invalidateQueries({queryKey:[st.ROUTINE_STATS,e]})}})}function ust(e){const t=Mt();return Dt({mutationFn:n=>qNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_LOGS,e]}),t.invalidateQueries({queryKey:[st.ROUTINE_STATS,e]})}})}const Nw=e=>{const t=Mt();return Dt({mutationFn:n=>WNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},dst=e=>{const t=Mt();return Dt({mutationFn:n=>YNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},fst=e=>{const t=Mt();return Dt({mutationFn:n=>KNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},pst=()=>yr({queryKey:[st.ROUTINE_WEIGHT_UNITS],queryFn:Qoe}),hst=()=>yr({queryKey:[st.ROUTINE_REP_UNITS],queryFn:Yoe}),mst=e=>{const t=Mt();return Dt({mutationFn:n=>eLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},gst=e=>{const t=Mt();return Dt({mutationFn:n=>tLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},yst=e=>{const t=Mt();return Dt({mutationFn:n=>nLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},vst=e=>{const t=Mt();return Dt({mutationFn:n=>rLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},bst=(e,t)=>yr({queryFn:()=>_Le(t),queryKey:[st.SESSION_SEARCH,e,JSON.stringify(t)]}),xst=()=>{const e=Mt();return Dt({mutationFn:t=>NLe(t),onSuccess:()=>e.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]})})},Sst=e=>yr({queryFn:()=>$Le(e),queryKey:[st.SESSIONS_FULL,JSON.stringify(e||{})]}),wst=e=>{const t=Mt();return Dt({mutationFn:n=>LLe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})}})},Ko=Ot(k.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),Jue=Ot(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"})),Cst=Ot(k.jsx("path",{d:"M22 5v2h-3v3h-2V7h-3V5h3V2h2v3zm-3 14H5V5h6V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6h-2zm-4-6v4h2v-4zm-4 4h2V9h-2zm-2 0v-6H7v6z"})),Est=Ot(k.jsx("path",{d:"m7 10 5 5 5-5z"})),Tst=Ot(k.jsx("path",{d:"m7 14 5-5 5 5z"})),Ost=Ot(k.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"})),Zue=Ot(k.jsx("path",{d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"})),Ist=Ot(k.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"})),Pst=Ot(k.jsx("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"})),Ast=Ot([k.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),k.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")]),Mst=Ot(k.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"})),Rst=Ot(k.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),Dst=Ot(k.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),kst=Ot(k.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),ede=Ot(k.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),_st=Ot(k.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),$st=Ot(k.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"})),Nst=Ot(k.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),MP=Ot(k.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"})),Lst=Ot(k.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"})),OS=Ot(k.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"})),tde=Ot(k.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),DV=Ot(k.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.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"})),Fst=Ot(k.jsx("path",{d:"m12.126 8.125 1.937-1.937 3.747 3.747-1.937 1.938zM20.71 5.63l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75L20.71 7a1 1 0 0 0 0-1.37M2 5l6.63 6.63L3 17.25V21h3.75l5.63-5.62L18 21l2-2L4 3z"})),jst=Ot(k.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"})),Bst=Ot(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m6 13h-5l-1-2H9.5v5H8V7h6l1 2h3z"})),IS=Ot(k.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.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 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"})),nde=Ot(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"})),rde=Ot(k.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"})),zst=Ot(k.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"})),Vst=Ot(k.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"})),Hst=Ot([k.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),k.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")]),kV=Ot(k.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"})),Ust=Ot(k.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),ode=Ot(k.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),Gst=Ot(k.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),qst=Ot(k.jsx("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"})),Wst=Ot([k.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),k.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")]),Kst=Ot(k.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"})),ide=Ot(k.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"})),Yst=Ot([k.jsx("path",{d:"M9 15.5h6v1H9z"},"0"),k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"1"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"2"),k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"3")]),Qst=Ot([k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"2"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"3"),k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-2.5c2.33 0 4.32-1.45 5.12-3.5h-1.67c-.69 1.19-1.97 2-3.45 2s-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5"},"4")]),Xst=Ot([k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-6c-2.33 0-4.32 1.45-5.12 3.5h1.67c.69-1.19 1.97-2 3.45-2s2.75.81 3.45 2h1.67c-.8-2.05-2.79-3.5-5.12-3.5"},"2")]),Jst=Ot(k.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"})),Zst=Ot(k.jsx("path",{d:"M19 9h-2v6.59L5.41 4 4 5.41 15.59 17H9v2h10z"})),elt=Ot(k.jsx("path",{d:"M21 5.47 12 12 7.62 7.62 3 11V8.52L7.83 5l4.38 4.38L21 3zM21 15h-4.7l-4.17 3.34L6 12.41l-3 2.13V17l2.8-2 6.2 6 5-4h4z"})),tlt=Ot(k.jsx("path",{d:"M6.99 11 3 15l3.99 4v-3H14v-2H6.99zM21 9l-3.99-4v3H10v2h7.01v3z"})),RP=e=>{if(e.query.isLoading)return S(Er,{});if(e.query.isError)return S(Zt,{sx:{height:200,alignItems:"center",mt:2},component:Ft,direction:"column",justifyContent:"center",children:Q(Ci,{severity:"error",children:["Error while fetching data: ",e.query.error.message]})});if(e.query.isSuccess)return e.child},nlt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return S(Kl,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:S(Ju,{sx:{height:n,width:n}})})};function ade(){return yr({queryKey:[st.EXERCISES],queryFn:h2e})}function rlt(e){return yr({queryKey:[st.EXERCISE_DETAIL,e],queryFn:()=>pv(e)})}function olt(e){const t=Mt();return Dt({mutationFn:n=>QN(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function ilt(e){const t=Mt();return Dt({mutationFn:n=>b2e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function alt(e){const t=Mt();return Dt({mutationFn:n=>C2e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function slt(e){const t=Mt();return Dt({mutationFn:n=>jre(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function DP(){return yr({queryKey:[st.CATEGORIES],queryFn:Qke})}function _v(){return yr({queryKey:[st.MUSCLES],queryFn:vke})}function kP(){return yr({queryKey:[st.EQUIPMENT],queryFn:Wke})}function Yc(){return yr({queryKey:[st.LANGUAGES],queryFn:w2e})}var y0={},QX;function llt(){if(QX)return y0;QX=1,Object.defineProperty(y0,"__esModule",{value:!0}),y0.parse=a,y0.serialize=c;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function a(h,m){const g=new i,y=h.length;if(y<2)return g;const v=(m==null?void 0:m.decode)||u;let w=0;do{const C=h.indexOf("=",w);if(C===-1)break;const E=h.indexOf(";",w),I=E===-1?y:E;if(C>I){w=h.lastIndexOf(";",C-1)+1;continue}const O=s(h,w,C),P=l(h,C,O),R=h.slice(O,P);if(g[R]===void 0){let D=s(h,C+1,I),M=l(h,I,D);const A=v(h.slice(D,M));g[R]=A}w=I+1}while(w<y);return g}function s(h,m,g){do{const y=h.charCodeAt(m);if(y!==32&&y!==9)return m}while(++m<g);return g}function l(h,m,g){for(;m>g;){const y=h.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return g}function c(h,m,g){const y=(g==null?void 0:g.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const v=y(m);if(!t.test(v))throw new TypeError(`argument val is invalid: ${m}`);let w=h+"="+v;if(!g)return w;if(g.maxAge!==void 0){if(!Number.isInteger(g.maxAge))throw new TypeError(`option maxAge is invalid: ${g.maxAge}`);w+="; Max-Age="+g.maxAge}if(g.domain){if(!n.test(g.domain))throw new TypeError(`option domain is invalid: ${g.domain}`);w+="; Domain="+g.domain}if(g.path){if(!r.test(g.path))throw new TypeError(`option path is invalid: ${g.path}`);w+="; Path="+g.path}if(g.expires){if(!f(g.expires)||!Number.isFinite(g.expires.valueOf()))throw new TypeError(`option expires is invalid: ${g.expires}`);w+="; Expires="+g.expires.toUTCString()}if(g.httpOnly&&(w+="; HttpOnly"),g.secure&&(w+="; Secure"),g.partitioned&&(w+="; Partitioned"),g.priority)switch(typeof g.priority=="string"?g.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${g.priority}`)}if(g.sameSite)switch(typeof g.sameSite=="string"?g.sameSite.toLowerCase():g.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${g.sameSite}`)}return w}function u(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function f(h){return o.call(h)==="[object Date]"}return y0}llt();var XX="popstate";function clt(e={}){function t(r,o){let{pathname:i,search:a,hash:s}=r.location;return ZF("",{pathname:i,search:a,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:PS(o)}return dlt(t,n,null,e)}function ro(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Bc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ult(){return Math.random().toString(36).substring(2,10)}function JX(e,t){return{usr:e.state,key:e.key,idx:t}}function ZF(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?$v(t):t,state:n,key:t&&t.key||r||ult()}}function PS({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function $v(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function dlt(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",l=null,c=u();c==null&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function f(){s="POP";let v=u(),w=v==null?null:v-c;c=v,l&&l({action:s,location:y.location,delta:w})}function h(v,w){s="PUSH";let C=ZF(y.location,v,w);c=u()+1;let E=JX(C,c),I=y.createHref(C);try{a.pushState(E,"",I)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(I)}i&&l&&l({action:s,location:y.location,delta:1})}function m(v,w){s="REPLACE";let C=ZF(y.location,v,w);c=u();let E=JX(C,c),I=y.createHref(C);a.replaceState(E,"",I),i&&l&&l({action:s,location:y.location,delta:0})}function g(v){return flt(v)}let y={get action(){return s},get location(){return e(o,a)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(XX,f),l=v,()=>{o.removeEventListener(XX,f),l=null}},createHref(v){return t(o,v)},createURL:g,encodeLocation(v){let w=g(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:m,go(v){return a.go(v)}};return y}function flt(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ro(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:PS(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function sde(e,t,n="/"){return plt(e,t,n,!1)}function plt(e,t,n,r){let o=typeof t=="string"?$v(t):t,i=Qu(o.pathname||"/",n);if(i==null)return null;let a=lde(e);hlt(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let c=Tlt(i);s=Clt(a[l],c,r)}return s}function lde(e,t=[],n=[],r=""){let o=(i,a,s)=>{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(ro(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let c=Fu([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(ro(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),lde(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Slt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of cde(i.path))o(i,a,l)}),t}function cde(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=cde(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function hlt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:wlt(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var mlt=/^:[\w-]+$/,glt=3,ylt=2,vlt=1,blt=10,xlt=-2,ZX=e=>e==="*";function Slt(e,t){let n=e.split("/"),r=n.length;return n.some(ZX)&&(r+=xlt),t&&(r+=ylt),n.filter(o=>!ZX(o)).reduce((o,i)=>o+(mlt.test(i)?glt:i===""?vlt:blt),r)}function wlt(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Clt(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=bO({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=bO({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(o,f.params),a.push({params:o,pathname:Fu([i,f.pathname]),pathnameBase:Alt(Fu([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Fu([i,f.pathnameBase]))}return a}function bO(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Elt(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},h)=>{if(u==="*"){let g=s[h]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[h];return f&&!m?c[u]=void 0:c[u]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Elt(e,t=!1,n=!0){Bc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Tlt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Bc(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Qu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Olt(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?$v(e):e;return{pathname:n?n.startsWith("/")?n:Ilt(n,t):t,search:Mlt(r),hash:Rlt(o)}}function Ilt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function l$(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Plt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ude(e){let t=Plt(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function dde(e,t,n,r=!1){let o;typeof e=="string"?o=$v(e):(o={...e},ro(!o.pathname||!o.pathname.includes("?"),l$("?","pathname","search",o)),ro(!o.pathname||!o.pathname.includes("#"),l$("#","pathname","hash",o)),ro(!o.search||!o.search.includes("#"),l$("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=Olt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var Fu=e=>e.join("/").replace(/\/\/+/g,"/"),Alt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Mlt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Rlt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Dlt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var fde=["POST","PUT","PATCH","DELETE"];new Set(fde);var klt=["GET",...fde];new Set(klt);var Nv=x.createContext(null);Nv.displayName="DataRouter";var _P=x.createContext(null);_P.displayName="DataRouterState";var pde=x.createContext({isTransitioning:!1});pde.displayName="ViewTransition";var _lt=x.createContext(new Map);_lt.displayName="Fetchers";var $lt=x.createContext(null);$lt.displayName="Await";var Qc=x.createContext(null);Qc.displayName="Navigation";var Lw=x.createContext(null);Lw.displayName="Location";var Xc=x.createContext({outlet:null,matches:[],isDataRoute:!1});Xc.displayName="Route";var _V=x.createContext(null);_V.displayName="RouteError";function Nlt(e,{relative:t}={}){ro(Fw(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=x.useContext(Qc),{hash:o,pathname:i,search:a}=jw(e,{relative:t}),s=i;return n!=="/"&&(s=i==="/"?n:Fu([n,i])),r.createHref({pathname:s,search:a,hash:o})}function Fw(){return x.useContext(Lw)!=null}function Zh(){return ro(Fw(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Lw).location}var hde="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mde(e){x.useContext(Qc).static||x.useLayoutEffect(e)}function id(){let{isDataRoute:e}=x.useContext(Xc);return e?Ylt():Llt()}function Llt(){ro(Fw(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(Nv),{basename:t,navigator:n}=x.useContext(Qc),{matches:r}=x.useContext(Xc),{pathname:o}=Zh(),i=JSON.stringify(ude(r)),a=x.useRef(!1);return mde(()=>{a.current=!0}),x.useCallback((l,c={})=>{if(Bc(a.current,hde),!a.current)return;if(typeof l=="number"){n.go(l);return}let u=dde(l,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Fu([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,i,o,e])}x.createContext(null);function Ma(){let{matches:e}=x.useContext(Xc),t=e[e.length-1];return t?t.params:{}}function jw(e,{relative:t}={}){let{matches:n}=x.useContext(Xc),{pathname:r}=Zh(),o=JSON.stringify(ude(n));return x.useMemo(()=>dde(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function Flt(e,t){return gde(e,t)}function gde(e,t,n,r){var w;ro(Fw(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=x.useContext(Qc),{matches:i}=x.useContext(Xc),a=i[i.length-1],s=a?a.params:{},l=a?a.pathname:"/",c=a?a.pathnameBase:"/",u=a&&a.route;{let C=u&&u.path||"";yde(l,!u||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
+`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=y=>{o||(o=!0,n(y,a))},f=y=>{o||(o=!0,r(y,a))},p=i.length,m=[];if(!p)return f([]);let g={value:a,originalValue:s,path:l,options:c,schema:this};for(let y=0;y<i.length;y++){const v=i[y];v(g,u,function(C){C&&(Array.isArray(C)?m.push(...C):m.push(C)),--p<=0&&f(m)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:i,options:a}){const s=t??n;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let c=r[s];const u=Object.assign({},a,{strict:!0,parent:r,value:c,originalValue:i[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${o||""}[${l?s:`"${s}"`}]`:(o?`${o}.`:"")+t});return(f,p,m)=>this.resolve(u)._validate(c,u,p,m)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{Sa.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new Sa(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw Sa.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Sa(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Sa.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Sa.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Eg(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=ng({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=ng({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=fc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=fc.notNull){return this.nullability(!1,t)}required(t=fc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=fc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=ng(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=_ue(t).map(i=>new Qf(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new vO(o,n):vO.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ng({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=fc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=ng({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=fc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=ng({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(f=>f.name===l.name)===c)}}}is.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])is.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=sat(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])is.prototype[e]=is.prototype.oneOf;for(const e of["not","nope"])is.prototype[e]=is.prototype.notOneOf;function Fu(){return new Fue}class Fue extends is{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=JF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return Ll(n)||n===!0}})}isFalse(t=JF.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return Ll(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Fu.prototype=Fue.prototype;const lat=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function cat(e){const t=ZF(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function ZF(e){var t,n;const r=lat.exec(e);return r?{year:bu(r[1]),month:bu(r[2],1)-1,day:bu(r[3],1),hour:bu(r[4]),minute:bu(r[5]),second:bu(r[6]),millisecond:r[7]?bu(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:bu(r[10]),minuteOffset:bu(r[11])}:null}function bu(e,t=0){return Number(e)||t}let uat=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,dat=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fat=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,pat="^\\d{4}-\\d{2}-\\d{2}",hat="\\d{2}:\\d{2}:\\d{2}",mat="(([+-]\\d{2}(:?\\d{2})?)|Z)",gat=new RegExp(`${pat}T${hat}(\\.\\d+)?${mat}$`),yat=e=>Ll(e)||e===e.trim(),vat={}.toString();function Uo(){return new jue}class jue extends is{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===vat?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||fc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=ha.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=ha.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=ha.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||ha.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=ha.email){return this.matches(uat,{name:"email",message:t,excludeEmptyString:!0})}url(t=ha.url){return this.matches(dat,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ha.uuid){return this.matches(fat,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(gat,{name:"datetime",message:n||ha.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||ha.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=ZF(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||ha.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=ZF(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ha.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:yat})}lowercase(t=ha.lowercase){return this.transform(n=>Ll(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ll(n)||n===n.toLowerCase()})}uppercase(t=ha.uppercase){return this.transform(n=>Ll(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ll(n)||n===n.toUpperCase()})}}Uo.prototype=jue.prototype;let bat=e=>e!=+e;function ko(){return new Bue}class Bue extends is{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!bat(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Hd.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Hd.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Hd.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Hd.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Hd.positive){return this.moreThan(0,t)}negative(t=Hd.negative){return this.lessThan(0,t)}integer(t=Hd.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>Ll(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>Ll(o)?o:Math[t](o))}}ko.prototype=Bue.prototype;let zue=new Date(""),xat=e=>Object.prototype.toString.call(e)==="[object Date]";function Xs(){return new $w}class $w extends is{constructor(){super({type:"date",check(t){return xat(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=cat(t),isNaN(t)?$w.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Qf.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=XF.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=XF.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}$w.INVALID_DATE=zue;Xs.prototype=$w.prototype;Xs.INVALID_DATE=zue;function Sat(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=lh.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),Qf.isRef(s)&&s.isSibling?i(s.path,a):AP(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return Jit.array(Array.from(r),n).reverse()}function WX(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function Vue(e){return(t,n)=>WX(e,t)-WX(e,n)}const Hue=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function PE(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=PE(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=PE(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(PE)}):"optional"in e?e.optional():e}const wat=(e,t)=>{const n=[...lh.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=lh.getter(lh.join(n),!0)(e);return!!(o&&r in o)};let KX=e=>Object.prototype.toString.call(e)==="[object Object]";function YX(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const Cat=Vue([]);function Ko(e){return new Uue(e)}class Uue extends is{constructor(t){super({type:"object",check(n){return KX(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Cat,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const f of s){let p=i[f],m=f in o;if(p){let g,y=o[f];c.path=(n.path?`${n.path}.`:"")+f,p=p.resolve({value:y,context:n.context,parent:l});let v=p instanceof is?p.spec:void 0,w=v==null?void 0:v.strict;if(v!=null&&v.strip){u=u||f in o;continue}g=!n.__validating||!w?p.cast(o[f],c):o[f],g!==void 0&&(l[f]=g)}else m&&!a&&(l[f]=o[f]);(m!==f in l||l[f]!==o[f])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!KX(c)){o(l,c);return}a=a||c;let u=[];for(let f of this._nodes){let p=this.fields[f];!p||Qf.isRef(p)||u.push(p.asNestedTest({options:n,key:f,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,f=>{o(f.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Sat(t,n),r._sortErrors=Vue(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return PE(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=lh.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return wat(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(Hue)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||OE.exact,test(n){if(n==null)return!0;const r=YX(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=OE.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=YX(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=OE.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(l$.camelCase)}snakeCase(){return this.transformKeys(l$.snakeCase)}constantCase(){return this.transformKeys(t=>l$.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}Ko.prototype=Uue.prototype;function ch(e){return new Gue(e)}class Gue extends is{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let f=new Array(c.length);for(let m=0;m<c.length;m++){var p;f[m]=a.asNestedTest({options:n,index:m,parent:c,parentPath:n.path,originalParent:(p=n.originalValue)!=null?p:t})}this.runTests({value:c,tests:f,originalValue:(u=n.originalValue)!=null?u:t,options:n},r,m=>o(m.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Hue)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!AP(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Lu(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=IE.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||IE.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||IE.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}ch.prototype=Gue.prototype;const RV=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=je(),c=oFe(e),u=iFe(e),[f,p]=x.useState(t?xt.fromJSDate(t.datetime):xt.now()),[m,g]=x.useState(i),y=Ko({amount:ko().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:ko().required(s("forms.fieldRequired")),datetime:Xs().required(s("forms.fieldRequired"))});return S(Oi,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:y,onSubmit:async v=>{const w={...v,plan:e,meal:m,weight_unit:null,datetime:v.datetime.toISOString()};t?u.mutate({...w,id:t.id}):c.mutate(w),o&&o()},children:v=>S(pi,{children:Q(Ft,{spacing:2,children:[S(bV,{callback:w=>v.setFieldValue("ingredient",w==null?void 0:w.data.id)}),S(dn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:S(So,{position:"end",children:s("nutrition.gramShort")})},error:v.touched.amount&&!!v.errors.amount,helperText:v.touched.amount&&v.errors.amount,...v.getFieldProps("amount")}),a.length>0&&S($c,{value:m,options:a.map(w=>w.id),getOptionLabel:w=>a.find(C=>C.id===w).displayName,onChange:(w,C)=>g(C),renderInput:w=>S(dn,{label:s("nutrition.meal"),value:m,...w})}),S(Ys,{dateAdapter:Hl,adapterLocale:l.language,children:S(Ptt,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:f,disableFuture:!0,onChange:w=>{v.setFieldValue("datetime",w==null?void 0:w.toJSDate()),p(w)},shouldDisableDate:w=>(t&&Zn(t.datetime)===Zn(w.toJSDate()),!1)})}),Q(Ft,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&S(ct,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),S(ct,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},DV=({plan:e,closeFn:t})=>{const[n]=je(),r=eFe(),o=nFe(e==null?void 0:e.id),[i,a]=x.useState(e==null?void 0:e.hasAnyGoals),[s,l]=x.useState(e?xt.fromJSDate(e.start):xt.now),[c,u]=x.useState(e&&(e==null?void 0:e.end)!==null?xt.fromJSDate(e.end):null),f=Ko({description:Uo().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),onlyLogging:Fu(),goalEnergy:ko().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goalProtein:ko().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goalCarbohydrates:ko().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goalFiber:ko().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goalFat:ko().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),start:Xs().required(),end:Xs().nullable().min(MP("start"),n("forms.endBeforeStart"))});return S(Oi,{initialValues:{description:e?e.description:n("nutrition.plan"),start:Zn(new Date),end:null,onlyLogging:e?e.onlyLogging:!0,goalEnergy:e?e.goalEnergy:null,goalProtein:e?e.goalProtein:null,goalCarbohydrates:e?e.goalCarbohydrates:null,goalFiber:e?e.goalFiber:null,goalFat:e?e.goalFat:null},validationSchema:f,onSubmit:async p=>{p.goalEnergy=p.goalEnergy?p.goalEnergy:null,p.goalProtein=p.goalProtein?p.goalProtein:null,p.goalCarbohydrates=p.goalCarbohydrates?p.goalCarbohydrates:null,p.goalFiber=p.goalFiber?p.goalFiber:null,p.goalFat=p.goalFat?p.goalFat:null,i||(p.goalEnergy=null,p.goalProtein=null,p.goalCarbohydrates=null,p.goalFiber=null,p.goalFat=null);const m=new wI({start:new Date(p.start),end:p.end?new Date(p.end):null,description:p.description,onlyLogging:p.onlyLogging,goalEnergy:p.goalEnergy,goalProtein:p.goalProtein,goalCarbohydrates:p.goalCarbohydrates,goalFiber:p.goalFiber,goalFat:p.goalFat});e?(m.id=e.id,o.mutate(m)):r.mutate(m),t&&t()},children:p=>S(pi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"description",label:n("description"),error:p.touched.description&&!!p.errors.description,helperText:p.touched.description&&p.errors.description,...p.getFieldProps("description")}),Q(me,{container:!0,spacing:1,children:[S(me,{size:6,children:S(Ys,{dateAdapter:Hl,adapterLocale:lr.language,children:S(Ah,{format:"yyyy-MM-dd",label:n("start"),value:s,slotProps:{textField:{variant:"standard",fullWidth:!0,error:p.touched.start&&!!p.errors.start,helperText:p.touched.start&&p.errors.start?String(p.errors.start):""}},onChange:m=>{m&&p.setFieldValue("start",m.toJSDate()),l(m)}})})}),S(me,{size:6,children:S(Ys,{dateAdapter:Hl,adapterLocale:lr.language,children:S(Ah,{format:"yyyy-MM-dd",label:n("end"),value:c,slotProps:{textField:{variant:"standard",fullWidth:!0,error:p.touched.end&&!!p.errors.end,helperText:p.touched.end&&p.errors.end?String(p.errors.end):""}},onChange:m=>{m&&p.setFieldValue("end",m.toJSDate()),u(m)}})})})]}),S(Mx,{children:S(os,{label:n("nutrition.onlyLoggingHelpText"),control:S(Wo,{id:"onlyLogging",checked:p.values.onlyLogging,...p.getFieldProps("onlyLogging")})})}),S(Mx,{children:S(os,{label:n("nutrition.useGoalsHelpText"),control:S(Wo,{id:"goalEnergy",checked:i,onChange:()=>a(!i)})})}),S(aw,{children:n("nutrition.useGoalsHelpTextLong")}),i&&Q(Tt,{children:[S(dn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:p.touched.goalEnergy&&!!p.errors.goalEnergy,helperText:p.touched.goalEnergy&&p.errors.goalEnergy,...p.getFieldProps("goalEnergy"),InputProps:{endAdornment:S(So,{position:"end",children:n("nutrition.kcal")})}}),Q(me,{container:!0,spacing:1,children:[S(me,{size:4,children:S(dn,{id:"protein",fullWidth:!0,label:n("nutrition.goalProtein"),error:p.touched.goalProtein&&!!p.errors.goalProtein,helperText:p.touched.goalProtein&&p.errors.goalProtein,...p.getFieldProps("goalProtein"),InputProps:{startAdornment:S(So,{position:"start",children:p.values.goalProtein!==null&&p.values.goalProtein!==void 0?n("nutrition.valueEnergyKcal",{value:p.values.goalProtein*$g.protein}):""}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})}),S(me,{size:4,children:S(dn,{id:"carbohydrates",fullWidth:!0,label:n("nutrition.goalCarbohydrates"),error:p.touched.goalCarbohydrates&&!!p.errors.goalCarbohydrates,helperText:p.touched.goalCarbohydrates&&p.errors.goalCarbohydrates,...p.getFieldProps("goalCarbohydrates"),InputProps:{startAdornment:S(So,{position:"start",children:p.values.goalCarbohydrates!==null&&p.values.goalCarbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:p.values.goalCarbohydrates*$g.carbohydrates}):""}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})}),S(me,{size:4,children:S(dn,{id:"fat",fullWidth:!0,label:n("nutrition.goalFat"),error:p.touched.goalFat&&!!p.errors.goalFat,helperText:p.touched.goalFat&&p.errors.goalFat,...p.getFieldProps("goalFat"),InputProps:{startAdornment:S(So,{position:"start",children:p.values.goalFat!==null&&p.values.goalFat!==void 0?n("nutrition.valueEnergyKcal",{value:p.values.goalFat*$g.fat}):""}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})})]}),S(me,{container:!0,spacing:1,children:S(me,{size:4,children:S(dn,{id:"fiber",fullWidth:!0,label:n("nutrition.goalFiber"),error:p.touched.goalFiber&&!!p.errors.goalFiber,helperText:p.touched.goalFiber&&p.errors.goalFiber,...p.getFieldProps("goalFiber"),InputProps:{startAdornment:S(So,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:S(So,{position:"end",children:n("nutrition.gramShort")})}})})})]}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},que=()=>{const[e]=je(),t=XLe();return t.isLoading?S(Er,{}):t.data!==null?S(Eat,{plan:t.data}):S(yB,{title:e("nutritionalPlan"),modalContent:S(DV,{}),modalTitle:e("add")})};function Eat(e){const[t,n]=je(),[r,o]=J.useState(!1),i=()=>o(!0),a=()=>o(!1);return Q(Tt,{children:[Q(ho,{children:[S(Zl,{title:t("nutritionalPlan"),subheader:e.plan.description}),Q(ji,{sx:{height:"500px",overflow:"auto"},children:[S(mYe,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),S(ai,{children:e.plan.meals.map(s=>S(Tat,{meal:s,planId:e.plan.id},s.id))})]}),Q(ul,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[S(ct,{size:"small",href:on(Yt.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),S(qo,{title:t("nutrition.logThisMealItem"),children:S(pn,{onClick:i,children:S(lw,{})})})]})]}),S(di,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:S(RV,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const Tat=e=>{const[t,n]=je(),r=iie(e.planId),[o,i]=x.useState(!1),[a,s]=J.useState(!1),l=()=>i(!o),c=(m,g)=>{g!=="clickaway"&&s(!1)},u=m=>{const g=[{plan:e.planId,meal:e.meal.id,mealItem:m.id,ingredient:m.ingredientId,weight_unit:m.weightUnitId,datetime:new Date().toISOString(),amount:m.amount}];r.mutate(g),s(!0)},f=e.meal.name?e.meal.name:rT(e.meal.time,n.language),p=e.meal.name?rT(e.meal.time,n.language):null;return Q(Tt,{children:[Q(Bl,{onClick:l,selected:o,children:[S(rl,{children:o?S(J0,{}):S(ku,{})}),S(Wr,{primary:f,secondary:p})]}),S(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:S(ai,{children:e.meal.items.map(m=>{var g,y,v,w;return Q(Co,{secondaryAction:S(qo,{title:t("nutrition.logThisMealItem"),children:S(pn,{edge:"end",onClick:()=>u(m),children:S(lw,{})})}),children:[S(pB,{children:S(Yl,{alt:(g=m.ingredient)==null?void 0:g.name,src:(v=(y=m.ingredient)==null?void 0:y.image)==null?void 0:v.url,sx:{width:45,height:45},children:S(ed,{})})}),S(Wr,{primary:(w=m.ingredient)==null?void 0:w.name,secondary:$n(m.amount,n.language)})]},m.id)})})}),S(fI,{open:a,autoHideDuration:TI,onClose:c,children:S(Ei,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})},Wue=Ot(k.jsx("path",{d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14zM7 10h5v5H7z"}));function Yc(e){return yr({queryKey:[st.ROUTINE_DETAIL,e],queryFn:()=>cNe(e)})}function Oat(e){return yr({queryKey:[st.ROUTINE_STATS,e],queryFn:()=>bNe(e)})}function Kue(e){return yr({queryKey:[st.ROUTINE_LOG_DATA,e],queryFn:()=>vNe(e)})}function Iat(){return yr({queryKey:[st.ROUTINES_SHALLOW],queryFn:uNe})}function Pat(){return yr({queryKey:[st.PRIVATE_TEMPLATES],queryFn:dNe})}function Aat(){return yr({queryKey:[st.PUBLIC_TEMPLATES],queryFn:fNe})}function Mat(){return yr({queryKey:[st.ROUTINES_ACTIVE],queryFn:lNe})}const Rat=()=>{const e=Mt();return Dt({mutationFn:t=>pNe(t),onSuccess:()=>e.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]})})},Yue=e=>{const t=Mt();return Dt({mutationFn:n=>hNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})}})},Dat=e=>{const t=Mt();return Dt({mutationFn:()=>mNe(e),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})}})},kat=e=>{const t=Mt();return Dt({mutationFn:n=>iLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},_at=e=>{const t=Mt();return Dt({mutationFn:n=>aLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},$at=e=>{const t=Mt();return Dt({mutationFn:n=>sLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Nat=e=>{const t=Mt();return Dt({mutationFn:n=>lLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Lat=e=>{const t=Mt();return Dt({mutationFn:n=>cLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Fat=e=>{const t=Mt();return Dt({mutationFn:n=>uLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},jat=e=>{const t=Mt();return Dt({mutationFn:n=>dLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Bat=e=>{const t=Mt();return Dt({mutationFn:n=>fLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},zat=e=>{const t=Mt();return Dt({mutationFn:n=>pLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Vat=e=>{const t=Mt();return Dt({mutationFn:n=>hLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Hat=e=>{const t=Mt();return Dt({mutationFn:n=>mLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},QX=e=>{const t=Mt();return Dt({mutationFn:n=>gLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Uat=e=>{const t=Mt();return Dt({mutationFn:n=>yLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Gat=e=>{const t=Mt();return Dt({mutationFn:n=>vLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},qat=e=>{const t=Mt();return Dt({mutationFn:n=>bLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Wat=e=>{const t=Mt();return Dt({mutationFn:n=>xLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Kat=e=>{const t=Mt();return Dt({mutationFn:n=>SLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Yat=e=>{const t=Mt();return Dt({mutationFn:n=>wLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Que=e=>{const t=Mt();return Dt({mutationFn:n=>CLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Xue=e=>{const t=Mt();return Dt({mutationFn:n=>ELe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Jue=e=>{const t=Mt();return Dt({mutationFn:n=>TLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Qat=e=>{const t=Mt();return Dt({mutationFn:n=>OLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Xat=e=>{const t=Mt();return Dt({mutationFn:n=>ILe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Jat=e=>{const t=Mt();return Dt({mutationFn:n=>PLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},Zat=e=>{const t=Mt();return Dt({mutationFn:n=>ALe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},est=e=>{const t=Mt();return Dt({mutationFn:n=>MLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},tst=e=>{const t=Mt();return Dt({mutationFn:n=>RLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},nst=e=>{const t=Mt();return Dt({mutationFn:n=>DLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},rst=e=>{const t=Mt();return Dt({mutationFn:n=>kLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},ost=e=>{const t=Mt();return Dt({mutationFn:n=>_Le(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},ist=e=>{const t=Mt();return Dt({mutationFn:n=>XNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},ast=e=>{const t=Mt();return Dt({mutationFn:n=>JNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},sst=e=>{const t=Mt();return Dt({mutationFn:n=>ZNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},lst=e=>{const t=Mt();return Dt({mutationFn:n=>eLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})};function cst(e){const t=Mt();return Dt({mutationFn:n=>GNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_LOG_DATA,e]}),t.invalidateQueries({queryKey:[st.ROUTINE_STATS,e]})}})}function ust(e){const t=Mt();return Dt({mutationFn:n=>qNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_LOGS,e]}),t.invalidateQueries({queryKey:[st.ROUTINE_STATS,e]})}})}function dst(e){const t=Mt();return Dt({mutationFn:n=>WNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_LOGS,e]}),t.invalidateQueries({queryKey:[st.ROUTINE_STATS,e]})}})}const Nw=e=>{const t=Mt();return Dt({mutationFn:n=>KNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},fst=e=>{const t=Mt();return Dt({mutationFn:n=>QNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},pst=e=>{const t=Mt();return Dt({mutationFn:n=>YNe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},hst=()=>yr({queryKey:[st.ROUTINE_WEIGHT_UNITS],queryFn:Xoe}),mst=()=>yr({queryKey:[st.ROUTINE_REP_UNITS],queryFn:Qoe}),gst=e=>{const t=Mt();return Dt({mutationFn:n=>tLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},yst=e=>{const t=Mt();return Dt({mutationFn:n=>nLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},vst=e=>{const t=Mt();return Dt({mutationFn:n=>rLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},bst=e=>{const t=Mt();return Dt({mutationFn:n=>oLe(n),onSuccess:()=>t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})})},xst=(e,t)=>yr({queryFn:()=>$Le(t),queryKey:[st.SESSION_SEARCH,e,JSON.stringify(t)]}),Sst=()=>{const e=Mt();return Dt({mutationFn:t=>LLe(t),onSuccess:()=>e.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]})})},wst=e=>yr({queryFn:()=>NLe(e),queryKey:[st.SESSIONS_FULL,JSON.stringify(e||{})]}),Cst=e=>{const t=Mt();return Dt({mutationFn:n=>FLe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.ROUTINE_OVERVIEW]}),t.invalidateQueries({queryKey:[st.ROUTINE_DETAIL,e]})}})},Eo=Ot(k.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),Zue=Ot(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"})),Est=Ot(k.jsx("path",{d:"M22 5v2h-3v3h-2V7h-3V5h3V2h2v3zm-3 14H5V5h6V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6h-2zm-4-6v4h2v-4zm-4 4h2V9h-2zm-2 0v-6H7v6z"})),Tst=Ot(k.jsx("path",{d:"m7 10 5 5 5-5z"})),Ost=Ot(k.jsx("path",{d:"m7 14 5-5 5 5z"})),Ist=Ot(k.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"})),ede=Ot(k.jsx("path",{d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"})),Pst=Ot(k.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"})),Ast=Ot(k.jsx("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"})),Mst=Ot([k.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),k.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")]),Rst=Ot(k.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"})),Dst=Ot(k.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),kst=Ot(k.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),_st=Ot(k.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),tde=Ot(k.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),$st=Ot(k.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),Nst=Ot(k.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"})),Lst=Ot(k.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),RP=Ot(k.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"})),Fst=Ot(k.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"})),OS=Ot(k.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"})),nde=Ot(k.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),kV=Ot(k.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.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"})),jst=Ot(k.jsx("path",{d:"m12.126 8.125 1.937-1.937 3.747 3.747-1.937 1.938zM20.71 5.63l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75L20.71 7a1 1 0 0 0 0-1.37M2 5l6.63 6.63L3 17.25V21h3.75l5.63-5.62L18 21l2-2L4 3z"})),Bst=Ot(k.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"})),zst=Ot(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m6 13h-5l-1-2H9.5v5H8V7h6l1 2h3z"})),IS=Ot(k.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.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 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"})),rde=Ot(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"})),ode=Ot(k.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"})),Vst=Ot(k.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"})),Hst=Ot(k.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"})),Ust=Ot([k.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),k.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")]),_V=Ot(k.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"})),Gst=Ot(k.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),ide=Ot(k.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),qst=Ot(k.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Wst=Ot(k.jsx("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"})),Kst=Ot([k.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),k.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")]),Yst=Ot(k.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"})),ade=Ot(k.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"})),Qst=Ot([k.jsx("path",{d:"M9 15.5h6v1H9z"},"0"),k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"1"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"2"),k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"3")]),Xst=Ot([k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"2"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"3"),k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-2.5c2.33 0 4.32-1.45 5.12-3.5h-1.67c-.69 1.19-1.97 2-3.45 2s-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5"},"4")]),Jst=Ot([k.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),k.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),k.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-6c-2.33 0-4.32 1.45-5.12 3.5h1.67c.69-1.19 1.97-2 3.45-2s2.75.81 3.45 2h1.67c-.8-2.05-2.79-3.5-5.12-3.5"},"2")]),Zst=Ot(k.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"})),elt=Ot(k.jsx("path",{d:"M19 9h-2v6.59L5.41 4 4 5.41 15.59 17H9v2h10z"})),tlt=Ot(k.jsx("path",{d:"M21 5.47 12 12 7.62 7.62 3 11V8.52L7.83 5l4.38 4.38L21 3zM21 15h-4.7l-4.17 3.34L6 12.41l-3 2.13V17l2.8-2 6.2 6 5-4h4z"})),nlt=Ot(k.jsx("path",{d:"M6.99 11 3 15l3.99 4v-3H14v-2H6.99zM21 9l-3.99-4v3H10v2h7.01v3z"})),DP=e=>{if(e.query.isLoading)return S(Er,{});if(e.query.isError)return S(Xt,{sx:{height:200,alignItems:"center",mt:2},component:Ft,direction:"column",justifyContent:"center",children:Q(Ei,{severity:"error",children:["Error while fetching data: ",e.query.error.message]})});if(e.query.isSuccess)return e.child},rlt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return S(Yl,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:S(ed,{sx:{height:n,width:n}})})};function sde(){return yr({queryKey:[st.EXERCISES],queryFn:g2e})}function olt(e){return yr({queryKey:[st.EXERCISE_DETAIL,e],queryFn:()=>hv(e)})}function ilt(e){const t=Mt();return Dt({mutationFn:n=>XN(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function alt(e){const t=Mt();return Dt({mutationFn:n=>S2e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function slt(e){const t=Mt();return Dt({mutationFn:n=>T2e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function llt(e){const t=Mt();return Dt({mutationFn:n=>Bre(n),onSuccess:()=>{t.invalidateQueries({queryKey:[st.EXERCISES]}),t.invalidateQueries({queryKey:[st.EXERCISE_DETAIL,e]})}})}function kP(){return yr({queryKey:[st.CATEGORIES],queryFn:Jke})}function _v(){return yr({queryKey:[st.MUSCLES],queryFn:xke})}function _P(){return yr({queryKey:[st.EQUIPMENT],queryFn:Yke})}function Qc(){return yr({queryKey:[st.LANGUAGES],queryFn:E2e})}var y0={},XX;function clt(){if(XX)return y0;XX=1,Object.defineProperty(y0,"__esModule",{value:!0}),y0.parse=a,y0.serialize=c;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const p=function(){};return p.prototype=Object.create(null),p})();function a(p,m){const g=new i,y=p.length;if(y<2)return g;const v=(m==null?void 0:m.decode)||u;let w=0;do{const C=p.indexOf("=",w);if(C===-1)break;const E=p.indexOf(";",w),I=E===-1?y:E;if(C>I){w=p.lastIndexOf(";",C-1)+1;continue}const O=s(p,w,C),P=l(p,C,O),R=p.slice(O,P);if(g[R]===void 0){let D=s(p,C+1,I),M=l(p,I,D);const A=v(p.slice(D,M));g[R]=A}w=I+1}while(w<y);return g}function s(p,m,g){do{const y=p.charCodeAt(m);if(y!==32&&y!==9)return m}while(++m<g);return g}function l(p,m,g){for(;m>g;){const y=p.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return g}function c(p,m,g){const y=(g==null?void 0:g.encode)||encodeURIComponent;if(!e.test(p))throw new TypeError(`argument name is invalid: ${p}`);const v=y(m);if(!t.test(v))throw new TypeError(`argument val is invalid: ${m}`);let w=p+"="+v;if(!g)return w;if(g.maxAge!==void 0){if(!Number.isInteger(g.maxAge))throw new TypeError(`option maxAge is invalid: ${g.maxAge}`);w+="; Max-Age="+g.maxAge}if(g.domain){if(!n.test(g.domain))throw new TypeError(`option domain is invalid: ${g.domain}`);w+="; Domain="+g.domain}if(g.path){if(!r.test(g.path))throw new TypeError(`option path is invalid: ${g.path}`);w+="; Path="+g.path}if(g.expires){if(!f(g.expires)||!Number.isFinite(g.expires.valueOf()))throw new TypeError(`option expires is invalid: ${g.expires}`);w+="; Expires="+g.expires.toUTCString()}if(g.httpOnly&&(w+="; HttpOnly"),g.secure&&(w+="; Secure"),g.partitioned&&(w+="; Partitioned"),g.priority)switch(typeof g.priority=="string"?g.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${g.priority}`)}if(g.sameSite)switch(typeof g.sameSite=="string"?g.sameSite.toLowerCase():g.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${g.sameSite}`)}return w}function u(p){if(p.indexOf("%")===-1)return p;try{return decodeURIComponent(p)}catch{return p}}function f(p){return o.call(p)==="[object Date]"}return y0}clt();var JX="popstate";function ult(e={}){function t(r,o){let{pathname:i,search:a,hash:s}=r.location;return ej("",{pathname:i,search:a,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:PS(o)}return flt(t,n,null,e)}function ro(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function zc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dlt(){return Math.random().toString(36).substring(2,10)}function ZX(e,t){return{usr:e.state,key:e.key,idx:t}}function ej(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?$v(t):t,state:n,key:t&&t.key||r||dlt()}}function PS({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function $v(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function flt(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",l=null,c=u();c==null&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function f(){s="POP";let v=u(),w=v==null?null:v-c;c=v,l&&l({action:s,location:y.location,delta:w})}function p(v,w){s="PUSH";let C=ej(y.location,v,w);c=u()+1;let E=ZX(C,c),I=y.createHref(C);try{a.pushState(E,"",I)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(I)}i&&l&&l({action:s,location:y.location,delta:1})}function m(v,w){s="REPLACE";let C=ej(y.location,v,w);c=u();let E=ZX(C,c),I=y.createHref(C);a.replaceState(E,"",I),i&&l&&l({action:s,location:y.location,delta:0})}function g(v){return plt(v)}let y={get action(){return s},get location(){return e(o,a)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(JX,f),l=v,()=>{o.removeEventListener(JX,f),l=null}},createHref(v){return t(o,v)},createURL:g,encodeLocation(v){let w=g(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:m,go(v){return a.go(v)}};return y}function plt(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ro(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:PS(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function lde(e,t,n="/"){return hlt(e,t,n,!1)}function hlt(e,t,n,r){let o=typeof t=="string"?$v(t):t,i=Xu(o.pathname||"/",n);if(i==null)return null;let a=cde(e);mlt(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let c=Olt(i);s=Elt(a[l],c,r)}return s}function cde(e,t=[],n=[],r=""){let o=(i,a,s)=>{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(ro(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let c=ju([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(ro(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),cde(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:wlt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of ude(i.path))o(i,a,l)}),t}function ude(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=ude(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function mlt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Clt(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var glt=/^:[\w-]+$/,ylt=3,vlt=2,blt=1,xlt=10,Slt=-2,eJ=e=>e==="*";function wlt(e,t){let n=e.split("/"),r=n.length;return n.some(eJ)&&(r+=Slt),t&&(r+=vlt),n.filter(o=>!eJ(o)).reduce((o,i)=>o+(glt.test(i)?ylt:i===""?blt:xlt),r)}function Clt(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Elt(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=xO({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=xO({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(o,f.params),a.push({params:o,pathname:ju([i,f.pathname]),pathnameBase:Mlt(ju([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=ju([i,f.pathnameBase]))}return a}function xO(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Tlt(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},p)=>{if(u==="*"){let g=s[p]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[p];return f&&!m?c[u]=void 0:c[u]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Tlt(e,t=!1,n=!0){zc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Olt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zc(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Ilt(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?$v(e):e;return{pathname:n?n.startsWith("/")?n:Plt(n,t):t,search:Rlt(r),hash:Dlt(o)}}function Plt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function c$(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Alt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function dde(e){let t=Alt(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function fde(e,t,n,r=!1){let o;typeof e=="string"?o=$v(e):(o={...e},ro(!o.pathname||!o.pathname.includes("?"),c$("?","pathname","search",o)),ro(!o.pathname||!o.pathname.includes("#"),c$("#","pathname","hash",o)),ro(!o.search||!o.search.includes("#"),c$("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;o.pathname=p.join("/")}s=f>=0?t[f]:"/"}let l=Ilt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var ju=e=>e.join("/").replace(/\/\/+/g,"/"),Mlt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Rlt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Dlt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function klt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var pde=["POST","PUT","PATCH","DELETE"];new Set(pde);var _lt=["GET",...pde];new Set(_lt);var Nv=x.createContext(null);Nv.displayName="DataRouter";var $P=x.createContext(null);$P.displayName="DataRouterState";var hde=x.createContext({isTransitioning:!1});hde.displayName="ViewTransition";var $lt=x.createContext(new Map);$lt.displayName="Fetchers";var Nlt=x.createContext(null);Nlt.displayName="Await";var Xc=x.createContext(null);Xc.displayName="Navigation";var Lw=x.createContext(null);Lw.displayName="Location";var Jc=x.createContext({outlet:null,matches:[],isDataRoute:!1});Jc.displayName="Route";var $V=x.createContext(null);$V.displayName="RouteError";function Llt(e,{relative:t}={}){ro(Fw(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=x.useContext(Xc),{hash:o,pathname:i,search:a}=jw(e,{relative:t}),s=i;return n!=="/"&&(s=i==="/"?n:ju([n,i])),r.createHref({pathname:s,search:a,hash:o})}function Fw(){return x.useContext(Lw)!=null}function em(){return ro(Fw(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Lw).location}var mde="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gde(e){x.useContext(Xc).static||x.useLayoutEffect(e)}function sd(){let{isDataRoute:e}=x.useContext(Jc);return e?Qlt():Flt()}function Flt(){ro(Fw(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(Nv),{basename:t,navigator:n}=x.useContext(Xc),{matches:r}=x.useContext(Jc),{pathname:o}=em(),i=JSON.stringify(dde(r)),a=x.useRef(!1);return gde(()=>{a.current=!0}),x.useCallback((l,c={})=>{if(zc(a.current,mde),!a.current)return;if(typeof l=="number"){n.go(l);return}let u=fde(l,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:ju([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,i,o,e])}x.createContext(null);function Ma(){let{matches:e}=x.useContext(Jc),t=e[e.length-1];return t?t.params:{}}function jw(e,{relative:t}={}){let{matches:n}=x.useContext(Jc),{pathname:r}=em(),o=JSON.stringify(dde(n));return x.useMemo(()=>fde(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function jlt(e,t){return yde(e,t)}function yde(e,t,n,r){var w;ro(Fw(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=x.useContext(Xc),{matches:i}=x.useContext(Jc),a=i[i.length-1],s=a?a.params:{},l=a?a.pathname:"/",c=a?a.pathnameBase:"/",u=a&&a.route;{let C=u&&u.path||"";vde(l,!u||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
-Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let f=Zh(),h;if(t){let C=typeof t=="string"?$v(t):t;ro(c==="/"||((w=C.pathname)==null?void 0:w.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${C.pathname}" was given in the \`location\` prop.`),h=C}else h=f;let m=h.pathname||"/",g=m;if(c!=="/"){let C=c.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(C.length).join("/")}let y=sde(e,{pathname:g});Bc(u||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Bc(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=Hlt(y&&y.map(C=>Object.assign({},C,{params:Object.assign({},s,C.params),pathname:Fu([c,o.encodeLocation?o.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?c:Fu([c,o.encodeLocation?o.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),i,n,r);return t&&v?x.createElement(Lw.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},v):v}function jlt(){let e=Klt(),t=Dlt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:i},"ErrorBoundary")," or"," ",x.createElement("code",{style:i},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:o},n):null,a)}var Blt=x.createElement(jlt,null),zlt=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?x.createElement(Xc.Provider,{value:this.props.routeContext},x.createElement(_V.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Vlt({routeContext:e,match:t,children:n}){let r=x.useContext(Nv);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(Xc.Provider,{value:e},n)}function Hlt(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n==null?void 0:n.errors;if(i!=null){let l=o.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id])!==void 0);ro(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let a=!1,s=-1;if(n)for(let l=0;l<o.length;l++){let c=o[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(s=l),c.route.id){let{loaderData:u,errors:f}=n,h=c.route.loader&&!u.hasOwnProperty(c.route.id)&&(!f||f[c.route.id]===void 0);if(c.route.lazy||h){a=!0,s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}return o.reduceRight((l,c,u)=>{let f,h=!1,m=null,g=null;n&&(f=i&&c.route.id?i[c.route.id]:void 0,m=c.route.errorElement||Blt,a&&(s<0&&u===0?(yde("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,g=null):s===u&&(h=!0,g=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,u+1)),v=()=>{let w;return f?w=m:h?w=g:c.route.Component?w=x.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=l,x.createElement(Vlt,{match:c,routeContext:{outlet:l,matches:y,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?x.createElement(zlt,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}function $V(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ult(e){let t=x.useContext(Nv);return ro(t,$V(e)),t}function Glt(e){let t=x.useContext(_P);return ro(t,$V(e)),t}function qlt(e){let t=x.useContext(Xc);return ro(t,$V(e)),t}function NV(e){let t=qlt(e),n=t.matches[t.matches.length-1];return ro(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Wlt(){return NV("useRouteId")}function Klt(){var r;let e=x.useContext(_V),t=Glt("useRouteError"),n=NV("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Ylt(){let{router:e}=Ult("useNavigate"),t=NV("useNavigate"),n=x.useRef(!1);return mde(()=>{n.current=!0}),x.useCallback(async(o,i={})=>{Bc(n.current,hde),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var eJ={};function yde(e,t,n){!t&&!eJ[e]&&(eJ[e]=!0,Bc(!1,n))}x.memo(Qlt);function Qlt({routes:e,future:t,state:n}){return gde(e,void 0,n,t)}function Ht(e){ro(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Xlt({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1}){ro(!Fw(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:a,navigator:o,static:i,future:{}}),[a,o,i]);typeof n=="string"&&(n=$v(n));let{pathname:l="/",search:c="",hash:u="",state:f=null,key:h="default"}=n,m=x.useMemo(()=>{let g=Qu(l,a);return g==null?null:{location:{pathname:g,search:c,hash:u,state:f,key:h},navigationType:r}},[a,l,c,u,f,h,r]);return Bc(m!=null,`<Router basename="${a}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:x.createElement(Qc.Provider,{value:s},x.createElement(Lw.Provider,{children:t,value:m}))}function Jlt({children:e,location:t}){return Flt(ej(e),t)}function ej(e,t=[]){let n=[];return x.Children.forEach(e,(r,o)=>{if(!x.isValidElement(r))return;let i=[...t,o];if(r.type===x.Fragment){n.push.apply(n,ej(r.props.children,i));return}ro(r.type===Ht,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ro(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=ej(r.props.children,i)),n.push(a)}),n}var PE="get",AE="application/x-www-form-urlencoded";function $P(e){return e!=null&&typeof e.tagName=="string"}function Zlt(e){return $P(e)&&e.tagName.toLowerCase()==="button"}function ect(e){return $P(e)&&e.tagName.toLowerCase()==="form"}function tct(e){return $P(e)&&e.tagName.toLowerCase()==="input"}function nct(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rct(e,t){return e.button===0&&(!t||t==="_self")&&!nct(e)}var J1=null;function oct(){if(J1===null)try{new FormData(document.createElement("form"),0),J1=!1}catch{J1=!0}return J1}var ict=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function c$(e){return e!=null&&!ict.has(e)?(Bc(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${AE}"`),null):e}function act(e,t){let n,r,o,i,a;if(ect(e)){let s=e.getAttribute("action");r=s?Qu(s,t):null,n=e.getAttribute("method")||PE,o=c$(e.getAttribute("enctype"))||AE,i=new FormData(e)}else if(Zlt(e)||tct(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?Qu(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||PE,o=c$(e.getAttribute("formenctype"))||c$(s.getAttribute("enctype"))||AE,i=new FormData(s,e),!oct()){let{name:c,type:u,value:f}=e;if(u==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,f)}}else{if($P(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=PE,r=null,o=AE,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}function LV(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function sct(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lct(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function cct(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await sct(i,n);return a.links?a.links():[]}return[]}));return pct(r.flat(1).filter(lct).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function tJ(e,t,n,r,o,i){let a=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,s=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,c)=>a(l,c)||s(l,c)):i==="data"?t.filter((l,c)=>{var f;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(a(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function uct(e,t,{includeHydrateFallback:n}={}){return dct(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function dct(e){return[...new Set(e)]}function fct(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function pct(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(fct(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var hct=new Set([100,101,204,205]);function mct(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&Qu(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function vde(){let e=x.useContext(Nv);return LV(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function gct(){let e=x.useContext(_P);return LV(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var FV=x.createContext(void 0);FV.displayName="FrameworkContext";function bde(){let e=x.useContext(FV);return LV(e,"You must render this element inside a <HydratedRouter> element"),e}function yct(e,t){let n=x.useContext(FV),[r,o]=x.useState(!1),[i,a]=x.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,h=x.useRef(null);x.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let y=w=>{w.forEach(C=>{a(C.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return h.current&&v.observe(h.current),()=>{v.disconnect()}}},[e]),x.useEffect(()=>{if(r){let y=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(y)}}},[r]);let m=()=>{o(!0)},g=()=>{o(!1),a(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:v0(s,m),onBlur:v0(l,g),onMouseEnter:v0(c,m),onMouseLeave:v0(u,g),onTouchStart:v0(f,m)}]:[!1,h,{}]}function v0(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function vct({page:e,...t}){let{router:n}=vde(),r=x.useMemo(()=>sde(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?x.createElement(xct,{page:e,matches:r,...t}):null}function bct(e){let{manifest:t,routeModules:n}=bde(),[r,o]=x.useState([]);return x.useEffect(()=>{let i=!1;return cct(e,t,n).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,n]),r}function xct({page:e,matches:t,...n}){let r=Zh(),{manifest:o,routeModules:i}=bde(),{basename:a}=vde(),{loaderData:s,matches:l}=gct(),c=x.useMemo(()=>tJ(e,t,l,o,r,"data"),[e,t,l,o,r]),u=x.useMemo(()=>tJ(e,t,l,o,r,"assets"),[e,t,l,o,r]),f=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,y=!1;if(t.forEach(w=>{var E;let C=o.routes[w.route.id];!C||!C.hasLoader||(!c.some(I=>I.route.id===w.route.id)&&w.route.id in s&&((E=i[w.route.id])!=null&&E.shouldRevalidate)||C.hasClientLoader?y=!0:g.add(w.route.id))}),g.size===0)return[];let v=mct(e,a);return y&&g.size>0&&v.searchParams.set("_routes",t.filter(w=>g.has(w.route.id)).map(w=>w.route.id).join(",")),[v.pathname+v.search]},[a,s,r,o,c,t,e,i]),h=x.useMemo(()=>uct(u,o),[u,o]),m=bct(u);return x.createElement(x.Fragment,null,f.map(g=>x.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>x.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),m.map(({key:g,link:y})=>x.createElement("link",{key:g,...y})))}function Sct(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var xde=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{xde&&(window.__reactRouterVersion="7.6.1")}catch{}function jV({basename:e,children:t,window:n}){let r=x.useRef();r.current==null&&(r.current=clt({window:n,v5Compat:!0}));let o=r.current,[i,a]=x.useState({action:o.action,location:o.location}),s=x.useCallback(l=>{x.startTransition(()=>a(l))},[a]);return x.useLayoutEffect(()=>o.listen(s),[o,s]),x.createElement(Xlt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}var Sde=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ro=x.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:f,...h},m){let{basename:g}=x.useContext(Qc),y=typeof c=="string"&&Sde.test(c),v,w=!1;if(typeof c=="string"&&y&&(v=c,xde))try{let M=new URL(window.location.href),A=c.startsWith("//")?new URL(M.protocol+c):new URL(c),_=Qu(A.pathname,g);A.origin===M.origin&&_!=null?c=_+A.search+A.hash:w=!0}catch{Bc(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=Nlt(c,{relative:o}),[E,I,O]=yct(r,h),P=Tct(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:f});function R(M){t&&t(M),M.defaultPrevented||P(M)}let D=x.createElement("a",{...h,...O,href:v||C,onClick:w||i?t:R,ref:Sct(m,I),target:l,"data-discover":!y&&n==="render"?"true":void 0});return E&&!y?x.createElement(x.Fragment,null,D,x.createElement(vct,{page:C})):D});Ro.displayName="Link";var wct=x.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:a,viewTransition:s,children:l,...c},u){let f=jw(a,{relative:c.relative}),h=Zh(),m=x.useContext(_P),{navigator:g,basename:y}=x.useContext(Qc),v=m!=null&&Mct(f)&&s===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,C=h.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(C=C.toLowerCase(),E=E?E.toLowerCase():null,w=w.toLowerCase()),E&&y&&(E=Qu(E,y)||E);const I=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let O=C===w||!o&&C.startsWith(w)&&C.charAt(I)==="/",P=E!=null&&(E===w||!o&&E.startsWith(w)&&E.charAt(w.length)==="/"),R={isActive:O,isPending:P,isTransitioning:v},D=O?t:void 0,M;typeof r=="function"?M=r(R):M=[r,O?"active":null,P?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let A=typeof i=="function"?i(R):i;return x.createElement(Ro,{...c,"aria-current":D,className:M,ref:u,style:A,to:a,viewTransition:s},typeof l=="function"?l(R):l)});wct.displayName="NavLink";var Cct=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:a=PE,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:f,...h},m)=>{let g=Pct(),y=Act(s,{relative:c}),v=a.toLowerCase()==="get"?"get":"post",w=typeof s=="string"&&Sde.test(s),C=E=>{if(l&&l(E),E.defaultPrevented)return;E.preventDefault();let I=E.nativeEvent.submitter,O=(I==null?void 0:I.getAttribute("formmethod"))||a;g(I||E.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:o,state:i,relative:c,preventScrollReset:u,viewTransition:f})};return x.createElement("form",{ref:m,method:v,action:y,onSubmit:r?l:C,...h,"data-discover":!w&&e==="render"?"true":void 0})});Cct.displayName="Form";function Ect(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wde(e){let t=x.useContext(Nv);return ro(t,Ect(e)),t}function Tct(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:a}={}){let s=id(),l=Zh(),c=jw(e,{relative:i});return x.useCallback(u=>{if(rct(u,t)){u.preventDefault();let f=n!==void 0?n:PS(l)===PS(c);s(e,{replace:f,state:r,preventScrollReset:o,relative:i,viewTransition:a})}},[l,s,c,n,r,t,e,o,i,a])}var Oct=0,Ict=()=>`__${String(++Oct)}__`;function Pct(){let{router:e}=wde("useSubmit"),{basename:t}=x.useContext(Qc),n=Wlt();return x.useCallback(async(r,o={})=>{let{action:i,method:a,encType:s,formData:l,body:c}=act(r,t);if(o.navigate===!1){let u=o.fetcherKey||Ict();await e.fetch(u,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function Act(e,{relative:t}={}){let{basename:n}=x.useContext(Qc),r=x.useContext(Xc);ro(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...jw(e||".",{relative:t})},a=Zh();if(e==null){i.search=a.search;let s=new URLSearchParams(i.search),l=s.getAll("index");if(l.some(u=>u==="")){s.delete("index"),l.filter(f=>f).forEach(f=>s.append("index",f));let u=s.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Fu([n,i.pathname])),PS(i)}function Mct(e,t={}){let n=x.useContext(pde);ro(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=wde("useViewTransitionState"),o=jw(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Qu(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Qu(n.nextLocation.pathname,r)||n.nextLocation.pathname;return bO(o.pathname,a)!=null||bO(o.pathname,i)!=null}[...hct];const Rct=()=>{var r,o;const e=Ma(),t=parseInt(e.routineId??"");if(Number.isNaN(t))return S("p",{children:"Please pass an integer as the routine id."});const n=Kc(t);return S(Uu,{maxWidth:"lg",children:S(RP,{query:n,child:n.isSuccess&&Q(Tt,{children:[((r=n.data)==null?void 0:r.description)!==""&&S(at,{variant:"body2",sx:{whiteSpace:"pre-line"},children:(o=n.data)==null?void 0:o.description}),S(Ft,{spacing:2,sx:{mt:2},children:n.data.dayDataCurrentIteration.filter(i=>i.day!==null).map((i,a)=>S(BV,{routineId:t,dayData:i},`dayDetails-${a}`))})]})})})};function Cde(e){var o;const{i18n:t}=je(),n=Yc();let r;return n.isSuccess&&(r=Gu(t.language,n.data)),S(me,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:e.rowHeight,marginBottom:e.marginBottom},children:S(me,{size:12,children:Q(Ft,{spacing:0,children:[S(at,{variant:"h6",children:e.showExercise?(o=e.setConfigData.exercise)==null?void 0:o.getTranslation(r).name:""}),Q("div",{children:[e.setConfigData.textRepr,e.setConfigData.isSpecialType&&S(Wl,{label:e.setConfigData.type,color:"info",size:"small",sx:{marginLeft:"0.5em"}})]}),S(at,{variant:"caption",children:e.setConfigData.comment})]})})})}function Dct(e){return Q(me,{container:!0,justifyContent:"space-between",alignItems:"flex-start",children:[S(me,{size:1,children:S(Ft,{divider:S(Zt,{height:"10px"}),children:e.slotData.exercises.map((t,n)=>S(nlt,{image:t.mainImage,iconSize:40,avatarSize:50},n))})}),S(me,{size:11,children:e.slotData.setConfigs.map((t,n)=>{var o;const r=n===0||t.exerciseId!==((o=e.slotData.setConfigs[n-1])==null?void 0:o.exerciseId);return S(Cde,{setConfigData:t,marginBottom:"1em",showExercise:r},n)})})]})}const BV=e=>{var i;const t=(e.readOnly??!1)||e.dayData.day===null||e.dayData.day.isRest,n=Lr(),[r,o]=je();return Q(ho,{sx:{minWidth:275},children:[S(Jl,{sx:{bgcolor:n.palette.grey.A200},action:e.dayData.day===null||e.dayData.day.isRest||t?null:S(Go,{title:r("routines.addWeightLog"),children:S(pn,{href:cn(Qt.ROUTINE_ADD_LOG,o.language,{id:e.routineId,id2:e.dayData.day.id}),children:S(Cst,{})})}),title:Gre(e.dayData.day),avatar:xa(e.dayData.date,new Date)?S(que,{}):void 0,subheader:S(at,{sx:{whiteSpace:"pre-line"},children:(i=e.dayData.day)==null?void 0:i.description})}),e.dayData.slots.length>0&&S(Fi,{sx:{padding:0,marginBottom:0},children:S(Ft,{children:e.dayData.slots.map((a,s)=>Q("div",{children:[S(Zt,{padding:1,children:S(Dct,{slotData:a,index:s})}),S(ji,{})]},s))})})]})},Ede=()=>{const[e,t]=je(),n=Aat();return n.isLoading?S(Er,{}):n.data!==null?S(kct,{routine:n.data}):S(gB,{title:e("routines.routine"),link:cn(Qt.ROUTINE_ADD,t.language)})},kct=e=>{const[t,n]=je();return Q(ho,{children:[S(Jl,{title:t("routines.routine"),subheader:e.routine.name??"."}),S(Fi,{sx:{height:"510px",overflow:"auto"},children:S(ai,{children:e.routine.dayDataCurrentIteration.filter(r=>r.day!==null).map((r,o)=>S(_ct,{dayData:r},o))})}),S(ll,{children:S(ct,{size:"small",href:cn(Qt.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},_ct=e=>{var i,a;const[t,n]=x.useState(!1),{t:r}=je();return Q(Tt,{children:[Q(Fl,{onClick:()=>n(!t),selected:t,disabled:e.dayData.day===null||((i=e.dayData.day)==null?void 0:i.isRest),children:[S(nl,{children:t?S(J0,{}):S(Du,{})}),S(Wr,{primary:Gre(e.dayData.day),slotProps:{secondary:{noWrap:!0,style:{overflow:"hidden",textOverflow:"ellipsis"}}},secondary:(a=e.dayData.day)==null?void 0:a.description}),S(nl,{children:xa(e.dayData.date,new Date)?S(que,{}):void 0})]}),S(aa,{in:t,timeout:"auto",unmountOnExit:!0,children:e.dayData.slots.map((s,l)=>S("div",{children:s.setConfigs.map((c,u)=>S(Cde,{setConfigData:c,rowHeight:"70px",showExercise:!0},u))},l))})]})};function Bw(e="lastWeek"){return yr({queryKey:[st.BODY_WEIGHT,e],queryFn:()=>UDe(e)})}const $ct=()=>{const e=Mt();return Dt({mutationFn:t=>GDe(t),onSuccess:()=>e.invalidateQueries({queryKey:[st.BODY_WEIGHT]})})},Nct=()=>{const e=Mt();return Dt({mutationFn:t=>WDe(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[st.BODY_WEIGHT]})})},Lct=()=>{const e=Mt();return Dt({mutationFn:t=>qDe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[st.BODY_WEIGHT]})}})},Lv=({weightEntry:e,closeFn:t})=>{const n=Bw(),r=Nct(),o=Lct(),[i,a]=x.useState(e?xt.fromJSDate(e.date):xt.now),[s,l]=je(),c=Wo({weight:Do().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?S(Er,{}):S(Ti,{initialValues:{weight:e?e.weight:0,date:Zn(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{e?(e.weight=u.weight,e.date=new Date(u.date),o.mutate(e)):(e=new gre(new Date(u.date),u.weight),r.mutate(e)),t&&t()},children:u=>S(fi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),S(Ys,{dateAdapter:zl,adapterLocale:l.language,children:S(Ih,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:f=>{f&&u.setFieldValue("date",f.toJSDate()),a(f)},shouldDisableDate:f=>e&&Zn(e.date)===f.toISODate()?!1:f?n.data.some(h=>Zn(h.date)===f.toISODate()):!1})}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},Fct="WeightTableDashboard",Tde={table:`${Fct}-table`},jct=ae("div")(({theme:e})=>({[`&.${Tde.table}`]:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),Bct=({weights:e})=>{const[t]=je(),r=e.slice(0,5);return S(jct,{className:Tde.table,children:S(Fc,{children:Q(Nc,{size:"small",children:[S(Ff,{children:Q(ln,{children:[S(ke,{align:"center",children:t("date")}),S(ke,{align:"center",children:t("weight")})]})}),S(Lc,{children:r.map(o=>Q(ln,{children:[S(ke,{align:"center",children:o.date.toLocaleDateString()}),S(ke,{align:"center",children:o.weight})]},o.date.toLocaleDateString()))})]})})})},zct=({active:e,payload:t,label:n})=>{const[r,o]=je();return e&&t&&t.length?Q(go,{style:{padding:8},children:[S("p",{children:S("strong",{children:new Date(n).toLocaleDateString(o.language)})}),Q("p",{children:[r("weight"),": ",t[0].value]})]}):null},Ode=({weights:e,height:t})=>{t=t||300;const r=Lr(),[o,i]=je(),[a,s]=J.useState(!1),[l,c]=J.useState(),u=()=>s(!1),f=[...e].sort((m,g)=>m.date.getTime()-g.date.getTime()).map(m=>({date:m.date.getTime(),weight:m.weight,entry:m}));function h(m,g){c(g.payload.entry),s(!0)}return Q("div",{children:[l&&S(Bi,{title:o("edit"),isOpen:a,closeFn:u,children:S(Lv,{weightEntry:l})}),S(nd,{height:t,children:Q(qz,{data:f,children:[S(qh,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:f.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:h}}),S(Uf,{stroke:"#ccc",strokeDasharray:"5 5"}),S(ls,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:m=>new Date(m).toLocaleDateString(i.language)}),S(cs,{domain:["auto","auto"]}),S(ba,{content:S(zct,{})})]})})]})},Ide=()=>{var n,r;const[e]=je(),t=Bw("lastYear");return t.isLoading?S(Er,{}):((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?S(Vct,{entries:t.data}):S(gB,{title:e("weight"),modalContent:S(Lv,{})})},Vct=e=>{const[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=je();return Q(Tt,{children:[Q(ho,{children:[S(Jl,{title:i("weight"),subheader:"."}),Q(Fi,{sx:{height:"500px",overflow:"auto"},children:[S(Ode,{weights:e.entries,height:200}),S(Zt,{sx:{mt:2},children:S(Bct,{weights:e.entries})})]}),Q(ll,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[S(ct,{size:"small",href:cn(Qt.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),S(Go,{title:i("addEntry"),children:S(pn,{onClick:r,children:S(Ko,{})})})]})]}),S(Bi,{title:i("add"),isOpen:t,closeFn:o,children:S(Lv,{closeFn:o})})]})},Hct=()=>{const[e,t]=je();return S(vV,{callback:r=>{r!==null&&(window.location.href=cn(Qt.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})};var u$={exports:{}},b0={},d$={exports:{}},f$={};/**
+Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let f=em(),p;if(t){let C=typeof t=="string"?$v(t):t;ro(c==="/"||((w=C.pathname)==null?void 0:w.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${C.pathname}" was given in the \`location\` prop.`),p=C}else p=f;let m=p.pathname||"/",g=m;if(c!=="/"){let C=c.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(C.length).join("/")}let y=lde(e,{pathname:g});zc(u||y!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),zc(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=Ult(y&&y.map(C=>Object.assign({},C,{params:Object.assign({},s,C.params),pathname:ju([c,o.encodeLocation?o.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?c:ju([c,o.encodeLocation?o.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),i,n,r);return t&&v?x.createElement(Lw.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},v):v}function Blt(){let e=Ylt(),t=klt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:i},"ErrorBoundary")," or"," ",x.createElement("code",{style:i},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:o},n):null,a)}var zlt=x.createElement(Blt,null),Vlt=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?x.createElement(Jc.Provider,{value:this.props.routeContext},x.createElement($V.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Hlt({routeContext:e,match:t,children:n}){let r=x.useContext(Nv);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(Jc.Provider,{value:e},n)}function Ult(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n==null?void 0:n.errors;if(i!=null){let l=o.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id])!==void 0);ro(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let a=!1,s=-1;if(n)for(let l=0;l<o.length;l++){let c=o[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(s=l),c.route.id){let{loaderData:u,errors:f}=n,p=c.route.loader&&!u.hasOwnProperty(c.route.id)&&(!f||f[c.route.id]===void 0);if(c.route.lazy||p){a=!0,s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}return o.reduceRight((l,c,u)=>{let f,p=!1,m=null,g=null;n&&(f=i&&c.route.id?i[c.route.id]:void 0,m=c.route.errorElement||zlt,a&&(s<0&&u===0?(vde("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,g=null):s===u&&(p=!0,g=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,u+1)),v=()=>{let w;return f?w=m:p?w=g:c.route.Component?w=x.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=l,x.createElement(Hlt,{match:c,routeContext:{outlet:l,matches:y,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?x.createElement(Vlt,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}function NV(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Glt(e){let t=x.useContext(Nv);return ro(t,NV(e)),t}function qlt(e){let t=x.useContext($P);return ro(t,NV(e)),t}function Wlt(e){let t=x.useContext(Jc);return ro(t,NV(e)),t}function LV(e){let t=Wlt(e),n=t.matches[t.matches.length-1];return ro(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Klt(){return LV("useRouteId")}function Ylt(){var r;let e=x.useContext($V),t=qlt("useRouteError"),n=LV("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Qlt(){let{router:e}=Glt("useNavigate"),t=LV("useNavigate"),n=x.useRef(!1);return gde(()=>{n.current=!0}),x.useCallback(async(o,i={})=>{zc(n.current,mde),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var tJ={};function vde(e,t,n){!t&&!tJ[e]&&(tJ[e]=!0,zc(!1,n))}x.memo(Xlt);function Xlt({routes:e,future:t,state:n}){return yde(e,void 0,n,t)}function qt(e){ro(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Jlt({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1}){ro(!Fw(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:a,navigator:o,static:i,future:{}}),[a,o,i]);typeof n=="string"&&(n=$v(n));let{pathname:l="/",search:c="",hash:u="",state:f=null,key:p="default"}=n,m=x.useMemo(()=>{let g=Xu(l,a);return g==null?null:{location:{pathname:g,search:c,hash:u,state:f,key:p},navigationType:r}},[a,l,c,u,f,p,r]);return zc(m!=null,`<Router basename="${a}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:x.createElement(Xc.Provider,{value:s},x.createElement(Lw.Provider,{children:t,value:m}))}function Zlt({children:e,location:t}){return jlt(tj(e),t)}function tj(e,t=[]){let n=[];return x.Children.forEach(e,(r,o)=>{if(!x.isValidElement(r))return;let i=[...t,o];if(r.type===x.Fragment){n.push.apply(n,tj(r.props.children,i));return}ro(r.type===qt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ro(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=tj(r.props.children,i)),n.push(a)}),n}var AE="get",ME="application/x-www-form-urlencoded";function NP(e){return e!=null&&typeof e.tagName=="string"}function ect(e){return NP(e)&&e.tagName.toLowerCase()==="button"}function tct(e){return NP(e)&&e.tagName.toLowerCase()==="form"}function nct(e){return NP(e)&&e.tagName.toLowerCase()==="input"}function rct(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oct(e,t){return e.button===0&&(!t||t==="_self")&&!rct(e)}var Z1=null;function ict(){if(Z1===null)try{new FormData(document.createElement("form"),0),Z1=!1}catch{Z1=!0}return Z1}var act=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function u$(e){return e!=null&&!act.has(e)?(zc(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ME}"`),null):e}function sct(e,t){let n,r,o,i,a;if(tct(e)){let s=e.getAttribute("action");r=s?Xu(s,t):null,n=e.getAttribute("method")||AE,o=u$(e.getAttribute("enctype"))||ME,i=new FormData(e)}else if(ect(e)||nct(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?Xu(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||AE,o=u$(e.getAttribute("formenctype"))||u$(s.getAttribute("enctype"))||ME,i=new FormData(s,e),!ict()){let{name:c,type:u,value:f}=e;if(u==="image"){let p=c?`${c}.`:"";i.append(`${p}x`,"0"),i.append(`${p}y`,"0")}else c&&i.append(c,f)}}else{if(NP(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=AE,r=null,o=ME,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}function FV(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function lct(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function cct(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function uct(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await lct(i,n);return a.links?a.links():[]}return[]}));return hct(r.flat(1).filter(cct).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function nJ(e,t,n,r,o,i){let a=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,s=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,c)=>a(l,c)||s(l,c)):i==="data"?t.filter((l,c)=>{var f;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(a(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function dct(e,t,{includeHydrateFallback:n}={}){return fct(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function fct(e){return[...new Set(e)]}function pct(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function hct(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(pct(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var mct=new Set([100,101,204,205]);function gct(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&Xu(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function bde(){let e=x.useContext(Nv);return FV(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function yct(){let e=x.useContext($P);return FV(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jV=x.createContext(void 0);jV.displayName="FrameworkContext";function xde(){let e=x.useContext(jV);return FV(e,"You must render this element inside a <HydratedRouter> element"),e}function vct(e,t){let n=x.useContext(jV),[r,o]=x.useState(!1),[i,a]=x.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,p=x.useRef(null);x.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let y=w=>{w.forEach(C=>{a(C.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return p.current&&v.observe(p.current),()=>{v.disconnect()}}},[e]),x.useEffect(()=>{if(r){let y=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(y)}}},[r]);let m=()=>{o(!0)},g=()=>{o(!1),a(!1)};return n?e!=="intent"?[i,p,{}]:[i,p,{onFocus:v0(s,m),onBlur:v0(l,g),onMouseEnter:v0(c,m),onMouseLeave:v0(u,g),onTouchStart:v0(f,m)}]:[!1,p,{}]}function v0(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function bct({page:e,...t}){let{router:n}=bde(),r=x.useMemo(()=>lde(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?x.createElement(Sct,{page:e,matches:r,...t}):null}function xct(e){let{manifest:t,routeModules:n}=xde(),[r,o]=x.useState([]);return x.useEffect(()=>{let i=!1;return uct(e,t,n).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,n]),r}function Sct({page:e,matches:t,...n}){let r=em(),{manifest:o,routeModules:i}=xde(),{basename:a}=bde(),{loaderData:s,matches:l}=yct(),c=x.useMemo(()=>nJ(e,t,l,o,r,"data"),[e,t,l,o,r]),u=x.useMemo(()=>nJ(e,t,l,o,r,"assets"),[e,t,l,o,r]),f=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,y=!1;if(t.forEach(w=>{var E;let C=o.routes[w.route.id];!C||!C.hasLoader||(!c.some(I=>I.route.id===w.route.id)&&w.route.id in s&&((E=i[w.route.id])!=null&&E.shouldRevalidate)||C.hasClientLoader?y=!0:g.add(w.route.id))}),g.size===0)return[];let v=gct(e,a);return y&&g.size>0&&v.searchParams.set("_routes",t.filter(w=>g.has(w.route.id)).map(w=>w.route.id).join(",")),[v.pathname+v.search]},[a,s,r,o,c,t,e,i]),p=x.useMemo(()=>dct(u,o),[u,o]),m=xct(u);return x.createElement(x.Fragment,null,f.map(g=>x.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),p.map(g=>x.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),m.map(({key:g,link:y})=>x.createElement("link",{key:g,...y})))}function wct(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Sde=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Sde&&(window.__reactRouterVersion="7.6.1")}catch{}function BV({basename:e,children:t,window:n}){let r=x.useRef();r.current==null&&(r.current=ult({window:n,v5Compat:!0}));let o=r.current,[i,a]=x.useState({action:o.action,location:o.location}),s=x.useCallback(l=>{x.startTransition(()=>a(l))},[a]);return x.useLayoutEffect(()=>o.listen(s),[o,s]),x.createElement(Jlt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}var wde=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Do=x.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:f,...p},m){let{basename:g}=x.useContext(Xc),y=typeof c=="string"&&wde.test(c),v,w=!1;if(typeof c=="string"&&y&&(v=c,Sde))try{let M=new URL(window.location.href),A=c.startsWith("//")?new URL(M.protocol+c):new URL(c),_=Xu(A.pathname,g);A.origin===M.origin&&_!=null?c=_+A.search+A.hash:w=!0}catch{zc(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=Llt(c,{relative:o}),[E,I,O]=vct(r,p),P=Oct(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:f});function R(M){t&&t(M),M.defaultPrevented||P(M)}let D=x.createElement("a",{...p,...O,href:v||C,onClick:w||i?t:R,ref:wct(m,I),target:l,"data-discover":!y&&n==="render"?"true":void 0});return E&&!y?x.createElement(x.Fragment,null,D,x.createElement(bct,{page:C})):D});Do.displayName="Link";var Cct=x.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:a,viewTransition:s,children:l,...c},u){let f=jw(a,{relative:c.relative}),p=em(),m=x.useContext($P),{navigator:g,basename:y}=x.useContext(Xc),v=m!=null&&Rct(f)&&s===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,C=p.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(C=C.toLowerCase(),E=E?E.toLowerCase():null,w=w.toLowerCase()),E&&y&&(E=Xu(E,y)||E);const I=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let O=C===w||!o&&C.startsWith(w)&&C.charAt(I)==="/",P=E!=null&&(E===w||!o&&E.startsWith(w)&&E.charAt(w.length)==="/"),R={isActive:O,isPending:P,isTransitioning:v},D=O?t:void 0,M;typeof r=="function"?M=r(R):M=[r,O?"active":null,P?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let A=typeof i=="function"?i(R):i;return x.createElement(Do,{...c,"aria-current":D,className:M,ref:u,style:A,to:a,viewTransition:s},typeof l=="function"?l(R):l)});Cct.displayName="NavLink";var Ect=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:a=AE,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:f,...p},m)=>{let g=Act(),y=Mct(s,{relative:c}),v=a.toLowerCase()==="get"?"get":"post",w=typeof s=="string"&&wde.test(s),C=E=>{if(l&&l(E),E.defaultPrevented)return;E.preventDefault();let I=E.nativeEvent.submitter,O=(I==null?void 0:I.getAttribute("formmethod"))||a;g(I||E.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:o,state:i,relative:c,preventScrollReset:u,viewTransition:f})};return x.createElement("form",{ref:m,method:v,action:y,onSubmit:r?l:C,...p,"data-discover":!w&&e==="render"?"true":void 0})});Ect.displayName="Form";function Tct(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cde(e){let t=x.useContext(Nv);return ro(t,Tct(e)),t}function Oct(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:a}={}){let s=sd(),l=em(),c=jw(e,{relative:i});return x.useCallback(u=>{if(oct(u,t)){u.preventDefault();let f=n!==void 0?n:PS(l)===PS(c);s(e,{replace:f,state:r,preventScrollReset:o,relative:i,viewTransition:a})}},[l,s,c,n,r,t,e,o,i,a])}var Ict=0,Pct=()=>`__${String(++Ict)}__`;function Act(){let{router:e}=Cde("useSubmit"),{basename:t}=x.useContext(Xc),n=Klt();return x.useCallback(async(r,o={})=>{let{action:i,method:a,encType:s,formData:l,body:c}=sct(r,t);if(o.navigate===!1){let u=o.fetcherKey||Pct();await e.fetch(u,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function Mct(e,{relative:t}={}){let{basename:n}=x.useContext(Xc),r=x.useContext(Jc);ro(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...jw(e||".",{relative:t})},a=em();if(e==null){i.search=a.search;let s=new URLSearchParams(i.search),l=s.getAll("index");if(l.some(u=>u==="")){s.delete("index"),l.filter(f=>f).forEach(f=>s.append("index",f));let u=s.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:ju([n,i.pathname])),PS(i)}function Rct(e,t={}){let n=x.useContext(hde);ro(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Cde("useViewTransitionState"),o=jw(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Xu(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Xu(n.nextLocation.pathname,r)||n.nextLocation.pathname;return xO(o.pathname,a)!=null||xO(o.pathname,i)!=null}[...mct];const Dct=()=>{var r,o;const e=Ma(),t=parseInt(e.routineId??"");if(Number.isNaN(t))return S("p",{children:"Please pass an integer as the routine id."});const n=Yc(t);return S(Gu,{maxWidth:"lg",children:S(DP,{query:n,child:n.isSuccess&&Q(Tt,{children:[((r=n.data)==null?void 0:r.description)!==""&&S(at,{variant:"body2",sx:{whiteSpace:"pre-line"},children:(o=n.data)==null?void 0:o.description}),S(Ft,{spacing:2,sx:{mt:2},children:n.data.dayDataCurrentIteration.filter(i=>i.day!==null).map((i,a)=>S(zV,{routineId:t,dayData:i},`dayDetails-${a}`))})]})})})};function Ede(e){var o;const{i18n:t}=je(),n=Qc();let r;return n.isSuccess&&(r=qu(t.language,n.data)),S(me,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:e.rowHeight,marginBottom:e.marginBottom},children:S(me,{size:12,children:Q(Ft,{spacing:0,children:[S(at,{variant:"h6",children:e.showExercise?(o=e.setConfigData.exercise)==null?void 0:o.getTranslation(r).name:""}),Q("div",{children:[e.setConfigData.textRepr,e.setConfigData.isSpecialType&&S(nl,{label:e.setConfigData.type,color:"info",size:"small",sx:{marginLeft:"0.5em"}})]}),S(at,{variant:"caption",children:e.setConfigData.comment})]})})})}function kct(e){return Q(me,{container:!0,justifyContent:"space-between",alignItems:"flex-start",children:[S(me,{size:1,children:S(Ft,{divider:S(Xt,{height:"10px"}),children:e.slotData.exercises.map((t,n)=>S(rlt,{image:t.mainImage,iconSize:40,avatarSize:50},n))})}),S(me,{size:11,children:e.slotData.setConfigs.map((t,n)=>{var o;const r=n===0||t.exerciseId!==((o=e.slotData.setConfigs[n-1])==null?void 0:o.exerciseId);return S(Ede,{setConfigData:t,marginBottom:"1em",showExercise:r},n)})})]})}const zV=e=>{var i;const t=(e.readOnly??!1)||e.dayData.day===null||e.dayData.day.isRest,n=Lr(),[r,o]=je();return Q(ho,{sx:{minWidth:275},children:[S(Zl,{sx:{bgcolor:n.palette.grey.A200},action:e.dayData.day===null||e.dayData.day.isRest||t?null:S(qo,{title:r("routines.addWeightLog"),children:S(pn,{href:on(Yt.ROUTINE_ADD_LOG,o.language,{id:e.routineId,id2:e.dayData.day.id}),children:S(Est,{})})}),title:qre(e.dayData.day),avatar:xa(e.dayData.date,new Date)?S(Wue,{}):void 0,subheader:S(at,{sx:{whiteSpace:"pre-line"},children:(i=e.dayData.day)==null?void 0:i.description})}),e.dayData.slots.length>0&&S(ji,{sx:{padding:0,marginBottom:0},children:S(Ft,{children:e.dayData.slots.map((a,s)=>Q("div",{children:[S(Xt,{padding:1,children:S(kct,{slotData:a,index:s})}),S(Bi,{})]},s))})})]})},Tde=()=>{const[e,t]=je(),n=Mat();return n.isLoading?S(Er,{}):n.data!==null?S(_ct,{routine:n.data}):S(yB,{title:e("routines.routine"),link:on(Yt.ROUTINE_ADD,t.language)})},_ct=e=>{const[t,n]=je();return Q(ho,{children:[S(Zl,{title:t("routines.routine"),subheader:e.routine.name??"."}),S(ji,{sx:{height:"510px",overflow:"auto"},children:S(ai,{children:e.routine.dayDataCurrentIteration.filter(r=>r.day!==null).map((r,o)=>S($ct,{dayData:r},o))})}),S(ul,{children:S(ct,{size:"small",href:on(Yt.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},$ct=e=>{var i,a;const[t,n]=x.useState(!1),{t:r}=je();return Q(Tt,{children:[Q(Bl,{onClick:()=>n(!t),selected:t,disabled:e.dayData.day===null||((i=e.dayData.day)==null?void 0:i.isRest),children:[S(rl,{children:t?S(J0,{}):S(ku,{})}),S(Wr,{primary:qre(e.dayData.day),slotProps:{secondary:{noWrap:!0,style:{overflow:"hidden",textOverflow:"ellipsis"}}},secondary:(a=e.dayData.day)==null?void 0:a.description}),S(rl,{children:xa(e.dayData.date,new Date)?S(Wue,{}):void 0})]}),S(aa,{in:t,timeout:"auto",unmountOnExit:!0,children:e.dayData.slots.map((s,l)=>S("div",{children:s.setConfigs.map((c,u)=>S(Ede,{setConfigData:c,rowHeight:"70px",showExercise:!0},u))},l))})]})};function Bw(e="lastWeek"){return yr({queryKey:[st.BODY_WEIGHT,e],queryFn:()=>qDe(e)})}const Nct=()=>{const e=Mt();return Dt({mutationFn:t=>WDe(t),onSuccess:()=>e.invalidateQueries({queryKey:[st.BODY_WEIGHT]})})},Lct=()=>{const e=Mt();return Dt({mutationFn:t=>YDe(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[st.BODY_WEIGHT]})})},Fct=()=>{const e=Mt();return Dt({mutationFn:t=>KDe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[st.BODY_WEIGHT]})}})},Lv=({weightEntry:e,closeFn:t})=>{const n=Bw(),r=Lct(),o=Fct(),[i,a]=x.useState(e?xt.fromJSDate(e.date):xt.now),[s,l]=je(),c=Ko({weight:ko().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?S(Er,{}):S(Oi,{initialValues:{weight:e?e.weight:0,date:Zn(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{e?(e.weight=u.weight,e.date=new Date(u.date),o.mutate(e)):(e=new yre(new Date(u.date),u.weight),r.mutate(e)),t&&t()},children:u=>S(pi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),S(Ys,{dateAdapter:Hl,adapterLocale:l.language,children:S(Ah,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:f=>{f&&u.setFieldValue("date",f.toJSDate()),a(f)},shouldDisableDate:f=>e&&Zn(e.date)===f.toISODate()?!1:f?n.data.some(p=>Zn(p.date)===f.toISODate()):!1})}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},jct="WeightTableDashboard",Ode={table:`${jct}-table`},Bct=ae("div")(({theme:e})=>({[`&.${Ode.table}`]:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),zct=({weights:e})=>{const[t]=je(),r=e.slice(0,5);return S(Bct,{className:Ode.table,children:S(jc,{children:Q(Lc,{size:"small",children:[S(Bf,{children:Q(cn,{children:[S(ke,{align:"center",children:t("date")}),S(ke,{align:"center",children:t("weight")})]})}),S(Fc,{children:r.map(o=>Q(cn,{children:[S(ke,{align:"center",children:o.date.toLocaleDateString()}),S(ke,{align:"center",children:o.weight})]},o.date.toLocaleDateString()))})]})})})},Vct=({active:e,payload:t,label:n})=>{const[r,o]=je();return e&&t&&t.length?Q(go,{style:{padding:8},children:[S("p",{children:S("strong",{children:new Date(n).toLocaleDateString(o.language)})}),Q("p",{children:[r("weight"),": ",t[0].value]})]}):null},Ide=({weights:e,height:t})=>{t=t||300;const r=Lr(),[o,i]=je(),[a,s]=J.useState(!1),[l,c]=J.useState(),u=()=>s(!1),f=[...e].sort((m,g)=>m.date.getTime()-g.date.getTime()).map(m=>({date:m.date.getTime(),weight:m.weight,entry:m}));function p(m,g){c(g.payload.entry),s(!0)}return Q("div",{children:[l&&S(di,{title:o("edit"),isOpen:a,closeFn:u,children:S(Lv,{weightEntry:l})}),S(od,{height:t,children:Q(Wz,{data:f,children:[S(Wh,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:f.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:p}}),S(qf,{stroke:"#ccc",strokeDasharray:"5 5"}),S(ls,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:m=>new Date(m).toLocaleDateString(i.language)}),S(cs,{domain:["auto","auto"]}),S(ba,{content:S(Vct,{})})]})})]})},Pde=()=>{var n,r;const[e]=je(),t=Bw("lastYear");return t.isLoading?S(Er,{}):((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?S(Hct,{entries:t.data}):S(yB,{title:e("weight"),modalContent:S(Lv,{})})},Hct=e=>{const[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=je();return Q(Tt,{children:[Q(ho,{children:[S(Zl,{title:i("weight"),subheader:"."}),Q(ji,{sx:{height:"500px",overflow:"auto"},children:[S(Ide,{weights:e.entries,height:200}),S(Xt,{sx:{mt:2},children:S(zct,{weights:e.entries})})]}),Q(ul,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[S(ct,{size:"small",href:on(Yt.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),S(qo,{title:i("addEntry"),children:S(pn,{onClick:r,children:S(Eo,{})})})]})]}),S(di,{title:i("add"),isOpen:t,closeFn:o,children:S(Lv,{closeFn:o})})]})},Uct=()=>{const[e,t]=je();return S(bV,{callback:r=>{r!==null&&(window.location.href=on(Yt.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})};var d$={exports:{}},b0={},f$={exports:{}},p$={};/**
* @license React
* scheduler.production.js
*
@@ -357,7 +357,7 @@ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var nJ;function Uct(){return nJ||(nJ=1,function(e){function t(L,V){var W=L.length;L.push(V);e:for(;0<W;){var K=W-1>>>1,G=L[K];if(0<o(G,V))L[K]=V,L[W]=G,W=K;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var V=L[0],W=L.pop();if(W!==V){L[0]=W;e:for(var K=0,G=L.length,q=G>>>1;K<q;){var Y=2*(K+1)-1,Z=L[Y],ie=Y+1,se=L[ie];if(0>o(Z,W))ie<G&&0>o(se,Z)?(L[K]=se,L[ie]=W,K=ie):(L[K]=Z,L[Y]=W,K=Y);else if(ie<G&&0>o(se,W))L[K]=se,L[ie]=W,K=ie;else break e}}return V}function o(L,V){var W=L.sortIndex-V.sortIndex;return W!==0?W:L.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,f=null,h=3,m=!1,g=!1,y=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function I(L){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=L)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function O(L){if(y=!1,I(L),!g)if(n(l)!==null)g=!0,P||(P=!0,N());else{var V=n(c);V!==null&&j(O,V.startTime-L)}}var P=!1,R=-1,D=5,M=-1;function A(){return v?!0:!(e.unstable_now()-M<D)}function _(){if(v=!1,P){var L=e.unstable_now();M=L;var V=!0;try{e:{g=!1,y&&(y=!1,C(R),R=-1),m=!0;var W=h;try{t:{for(I(L),f=n(l);f!==null&&!(f.expirationTime>L&&A());){var K=f.callback;if(typeof K=="function"){f.callback=null,h=f.priorityLevel;var G=K(f.expirationTime<=L);if(L=e.unstable_now(),typeof G=="function"){f.callback=G,I(L),V=!0;break t}f===n(l)&&r(l),I(L)}else r(l);f=n(l)}if(f!==null)V=!0;else{var q=n(c);q!==null&&j(O,q.startTime-L),V=!1}}break e}finally{f=null,h=W,m=!1}V=void 0}}finally{V?N():P=!1}}}var N;if(typeof E=="function")N=function(){E(_)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,H=B.port2;B.port1.onmessage=_,N=function(){H.postMessage(null)}}else N=function(){w(_,0)};function j(L,V){R=w(function(){L(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(L){switch(h){case 1:case 2:case 3:var V=3;break;default:V=h}var W=h;h=V;try{return L()}finally{h=W}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(L,V){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var W=h;h=L;try{return V()}finally{h=W}},e.unstable_scheduleCallback=function(L,V,W){var K=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?K+W:K):W=K,L){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=W+G,L={id:u++,callback:V,priorityLevel:L,startTime:W,expirationTime:G,sortIndex:-1},W>K?(L.sortIndex=W,t(c,L),n(l)===null&&L===n(c)&&(y?(C(R),R=-1):y=!0,j(O,W-K))):(L.sortIndex=G,t(l,L),g||m||(g=!0,P||(P=!0,N()))),L},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(L){var V=h;return function(){var W=h;h=V;try{return L.apply(this,arguments)}finally{h=W}}}}(f$)),f$}var rJ;function Gct(){return rJ||(rJ=1,d$.exports=Uct()),d$.exports}/**
+ */var rJ;function Gct(){return rJ||(rJ=1,function(e){function t(L,V){var W=L.length;L.push(V);e:for(;0<W;){var K=W-1>>>1,G=L[K];if(0<o(G,V))L[K]=V,L[W]=G,W=K;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var V=L[0],W=L.pop();if(W!==V){L[0]=W;e:for(var K=0,G=L.length,q=G>>>1;K<q;){var Y=2*(K+1)-1,Z=L[Y],ie=Y+1,se=L[ie];if(0>o(Z,W))ie<G&&0>o(se,Z)?(L[K]=se,L[ie]=W,K=ie):(L[K]=Z,L[Y]=W,K=Y);else if(ie<G&&0>o(se,W))L[K]=se,L[ie]=W,K=ie;else break e}}return V}function o(L,V){var W=L.sortIndex-V.sortIndex;return W!==0?W:L.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,f=null,p=3,m=!1,g=!1,y=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function I(L){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=L)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function O(L){if(y=!1,I(L),!g)if(n(l)!==null)g=!0,P||(P=!0,N());else{var V=n(c);V!==null&&j(O,V.startTime-L)}}var P=!1,R=-1,D=5,M=-1;function A(){return v?!0:!(e.unstable_now()-M<D)}function _(){if(v=!1,P){var L=e.unstable_now();M=L;var V=!0;try{e:{g=!1,y&&(y=!1,C(R),R=-1),m=!0;var W=p;try{t:{for(I(L),f=n(l);f!==null&&!(f.expirationTime>L&&A());){var K=f.callback;if(typeof K=="function"){f.callback=null,p=f.priorityLevel;var G=K(f.expirationTime<=L);if(L=e.unstable_now(),typeof G=="function"){f.callback=G,I(L),V=!0;break t}f===n(l)&&r(l),I(L)}else r(l);f=n(l)}if(f!==null)V=!0;else{var q=n(c);q!==null&&j(O,q.startTime-L),V=!1}}break e}finally{f=null,p=W,m=!1}V=void 0}}finally{V?N():P=!1}}}var N;if(typeof E=="function")N=function(){E(_)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,H=B.port2;B.port1.onmessage=_,N=function(){H.postMessage(null)}}else N=function(){w(_,0)};function j(L,V){R=w(function(){L(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(L){switch(p){case 1:case 2:case 3:var V=3;break;default:V=p}var W=p;p=V;try{return L()}finally{p=W}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(L,V){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var W=p;p=L;try{return V()}finally{p=W}},e.unstable_scheduleCallback=function(L,V,W){var K=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?K+W:K):W=K,L){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=W+G,L={id:u++,callback:V,priorityLevel:L,startTime:W,expirationTime:G,sortIndex:-1},W>K?(L.sortIndex=W,t(c,L),n(l)===null&&L===n(c)&&(y?(C(R),R=-1):y=!0,j(O,W-K))):(L.sortIndex=G,t(l,L),g||m||(g=!0,P||(P=!0,N()))),L},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(L){var V=p;return function(){var W=p;p=V;try{return L.apply(this,arguments)}finally{p=W}}}}(p$)),p$}var oJ;function qct(){return oJ||(oJ=1,f$.exports=Gct()),f$.exports}/**
* @license React
* react-dom-client.production.js
*
@@ -365,16 +365,16 @@ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var oJ;function qct(){if(oJ)return b0;oJ=1;var e=Gct(),t=GS(),n=Qte();function r(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)}function i(d){var p=d,b=d;if(d.alternate)for(;p.return;)p=p.return;else{d=p;do p=d,(p.flags&4098)!==0&&(b=p.return),d=p.return;while(d)}return p.tag===3?b:null}function a(d){if(d.tag===13){var p=d.memoizedState;if(p===null&&(d=d.alternate,d!==null&&(p=d.memoizedState)),p!==null)return p.dehydrated}return null}function s(d){if(i(d)!==d)throw Error(r(188))}function l(d){var p=d.alternate;if(!p){if(p=i(d),p===null)throw Error(r(188));return p!==d?null:d}for(var b=d,T=p;;){var $=b.return;if($===null)break;var F=$.alternate;if(F===null){if(T=$.return,T!==null){b=T;continue}break}if($.child===F.child){for(F=$.child;F;){if(F===b)return s($),d;if(F===T)return s($),p;F=F.sibling}throw Error(r(188))}if(b.return!==T.return)b=$,T=F;else{for(var X=!1,re=$.child;re;){if(re===b){X=!0,b=$,T=F;break}if(re===T){X=!0,T=$,b=F;break}re=re.sibling}if(!X){for(re=F.child;re;){if(re===b){X=!0,b=F,T=$;break}if(re===T){X=!0,T=F,b=$;break}re=re.sibling}if(!X)throw Error(r(189))}}if(b.alternate!==T)throw Error(r(190))}if(b.tag!==3)throw Error(r(188));return b.stateNode.current===b?d:p}function c(d){var p=d.tag;if(p===5||p===26||p===27||p===6)return d;for(d=d.child;d!==null;){if(p=c(d),p!==null)return p;d=d.sibling}return null}var u=Object.assign,f=Symbol.for("react.element"),h=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),_=Symbol.iterator;function N(d){return d===null||typeof d!="object"?null:(d=_&&d[_]||d["@@iterator"],typeof d=="function"?d:null)}var B=Symbol.for("react.client.reference");function H(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===B?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case g:return"Fragment";case v:return"Profiler";case y:return"StrictMode";case O:return"Suspense";case P:return"SuspenseList";case M:return"Activity"}if(typeof d=="object")switch(d.$$typeof){case m:return"Portal";case E:return(d.displayName||"Context")+".Provider";case C:return(d._context.displayName||"Context")+".Consumer";case I:var p=d.render;return d=d.displayName,d||(d=p.displayName||p.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case R:return p=d.displayName||null,p!==null?p:H(d.type)||"Memo";case D:p=d._payload,d=d._init;try{return H(d(p))}catch{}}return null}var j=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},K=[],G=-1;function q(d){return{current:d}}function Y(d){0>G||(d.current=K[G],K[G]=null,G--)}function Z(d,p){G++,K[G]=d.current,d.current=p}var ie=q(null),se=q(null),ce=q(null),ye=q(null);function Se(d,p){switch(Z(ce,p),Z(se,d),Z(ie,null),p.nodeType){case 9:case 11:d=(d=p.documentElement)&&(d=d.namespaceURI)?Z4(d):0;break;default:if(d=p.tagName,p=p.namespaceURI)p=Z4(p),d=e3(p,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}Y(ie),Z(ie,d)}function ne(){Y(ie),Y(se),Y(ce)}function le(d){d.memoizedState!==null&&Z(ye,d);var p=ie.current,b=e3(p,d.type);p!==b&&(Z(se,d),Z(ie,b))}function de(d){se.current===d&&(Y(ie),Y(se)),ye.current===d&&(Y(ye),Bb._currentValue=W)}var oe=Object.prototype.hasOwnProperty,ue=e.unstable_scheduleCallback,pe=e.unstable_cancelCallback,Ee=e.unstable_shouldYield,xe=e.unstable_requestPaint,Re=e.unstable_now,he=e.unstable_getCurrentPriorityLevel,Pe=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Ie=e.unstable_NormalPriority,te=e.unstable_LowPriority,Te=e.unstable_IdlePriority,De=e.log,Ve=e.unstable_setDisableYieldValue,We=null,rt=null;function ut(d){if(typeof De=="function"&&Ve(d),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(We,d)}catch{}}var Be=Math.clz32?Math.clz32:It,et=Math.log,Le=Math.LN2;function It(d){return d>>>=0,d===0?32:31-(et(d)/Le|0)|0}var Lt=256,nt=4194304;function lt(d){var p=d&42;if(p!==0)return p;switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function vt(d,p,b){var T=d.pendingLanes;if(T===0)return 0;var $=0,F=d.suspendedLanes,X=d.pingedLanes;d=d.warmLanes;var re=T&134217727;return re!==0?(T=re&~F,T!==0?$=lt(T):(X&=re,X!==0?$=lt(X):b||(b=re&~d,b!==0&&($=lt(b))))):(re=T&~F,re!==0?$=lt(re):X!==0?$=lt(X):b||(b=T&~d,b!==0&&($=lt(b)))),$===0?0:p!==0&&p!==$&&(p&F)===0&&(F=$&-$,b=p&-p,F>=b||F===32&&(b&4194048)!==0)?p:$}function bt(d,p){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&p)===0}function vn(d,p){switch(d){case 1:case 2:case 4:case 8:case 64:return p+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kn(){var d=Lt;return Lt<<=1,(Lt&4194048)===0&&(Lt=256),d}function Rr(){var d=nt;return nt<<=1,(nt&62914560)===0&&(nt=4194304),d}function nr(d){for(var p=[],b=0;31>b;b++)p.push(d);return p}function Bn(d,p){d.pendingLanes|=p,p!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function yo(d,p,b,T,$,F){var X=d.pendingLanes;d.pendingLanes=b,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=b,d.entangledLanes&=b,d.errorRecoveryDisabledLanes&=b,d.shellSuspendCounter=0;var re=d.entanglements,ge=d.expirationTimes,Ne=d.hiddenUpdates;for(b=X&~b;0<b;){var Ze=31-Be(b),ot=1<<Ze;re[Ze]=0,ge[Ze]=-1;var Fe=Ne[Ze];if(Fe!==null)for(Ne[Ze]=null,Ze=0;Ze<Fe.length;Ze++){var ze=Fe[Ze];ze!==null&&(ze.lane&=-536870913)}b&=~ot}T!==0&&To(d,T,0),F!==0&&$===0&&d.tag!==0&&(d.suspendedLanes|=F&~(X&~p))}function To(d,p,b){d.pendingLanes|=p,d.suspendedLanes&=~p;var T=31-Be(p);d.entangledLanes|=p,d.entanglements[T]=d.entanglements[T]|1073741824|b&4194090}function oo(d,p){var b=d.entangledLanes|=p;for(d=d.entanglements;b;){var T=31-Be(b),$=1<<T;$&p|d[T]&p&&(d[T]|=p),b&=~$}}function Oi(d){switch(d){case 2:d=1;break;case 8:d=4;break;case 32:d=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:d=128;break;case 268435456:d=134217728;break;default:d=0}return d}function Kt(d){return d&=-d,2<d?8<d?(d&134217727)!==0?32:268435456:8:2}function un(){var d=V.p;return d!==0?d:(d=window.event,d===void 0?32:b3(d.type))}function gt(d,p){var b=V.p;try{return V.p=d,p()}finally{V.p=b}}var kt=Math.random().toString(36).slice(2),Ut="__reactFiber$"+kt,Xt="__reactProps$"+kt,Vn="__reactContainer$"+kt,Xo="__reactEvents$"+kt,Da="__reactListeners$"+kt,ps="__reactHandles$"+kt,ud="__reactResources$"+kt,Ii="__reactMarker$"+kt;function vo(d){delete d[Ut],delete d[Xt],delete d[Xo],delete d[Da],delete d[ps]}function Fr(d){var p=d[Ut];if(p)return p;for(var b=d.parentNode;b;){if(p=b[Vn]||b[Ut]){if(b=p.alternate,p.child!==null||b!==null&&b.child!==null)for(d=o3(d);d!==null;){if(b=d[Ut])return b;d=o3(d)}return p}d=b,b=d.parentNode}return null}function zi(d){if(d=d[Ut]||d[Vn]){var p=d.tag;if(p===5||p===6||p===13||p===26||p===27||p===3)return d}return null}function ul(d){var p=d.tag;if(p===5||p===26||p===27||p===6)return d.stateNode;throw Error(r(33))}function dl(d){var p=d[ud];return p||(p=d[ud]={hoistableStyles:new Map,hoistableScripts:new Map}),p}function He(d){d[Ii]=!0}var Ye=new Set,$t={};function hn(d,p){Gt(d,p),Gt(d+"Capture",p)}function Gt(d,p){for($t[d]=p,d=0;d<p.length;d++)Ye.add(p[d])}var Xr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jr={},Vi={};function Jv(d){return oe.call(Vi,d)?!0:oe.call(Jr,d)?!1:Xr.test(d)?Vi[d]=!0:(Jr[d]=!0,!1)}function nm(d,p,b){if(Jv(p))if(b===null)d.removeAttribute(p);else{switch(typeof b){case"undefined":case"function":case"symbol":d.removeAttribute(p);return;case"boolean":var T=p.toLowerCase().slice(0,5);if(T!=="data-"&&T!=="aria-"){d.removeAttribute(p);return}}d.setAttribute(p,""+b)}}function Xf(d,p,b){if(b===null)d.removeAttribute(p);else{switch(typeof b){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(p);return}d.setAttribute(p,""+b)}}function ca(d,p,b,T){if(T===null)d.removeAttribute(b);else{switch(typeof T){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(b);return}d.setAttributeNS(p,b,""+T)}}var dd,Hn;function Hi(d){if(dd===void 0)try{throw Error()}catch(b){var p=b.stack.trim().match(/\n( *(at )?)/);dd=p&&p[1]||"",Hn=-1<b.stack.indexOf(`
+ */var iJ;function Wct(){if(iJ)return b0;iJ=1;var e=qct(),t=GS(),n=Xte();function r(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)}function i(d){var h=d,b=d;if(d.alternate)for(;h.return;)h=h.return;else{d=h;do h=d,(h.flags&4098)!==0&&(b=h.return),d=h.return;while(d)}return h.tag===3?b:null}function a(d){if(d.tag===13){var h=d.memoizedState;if(h===null&&(d=d.alternate,d!==null&&(h=d.memoizedState)),h!==null)return h.dehydrated}return null}function s(d){if(i(d)!==d)throw Error(r(188))}function l(d){var h=d.alternate;if(!h){if(h=i(d),h===null)throw Error(r(188));return h!==d?null:d}for(var b=d,T=h;;){var $=b.return;if($===null)break;var F=$.alternate;if(F===null){if(T=$.return,T!==null){b=T;continue}break}if($.child===F.child){for(F=$.child;F;){if(F===b)return s($),d;if(F===T)return s($),h;F=F.sibling}throw Error(r(188))}if(b.return!==T.return)b=$,T=F;else{for(var X=!1,re=$.child;re;){if(re===b){X=!0,b=$,T=F;break}if(re===T){X=!0,T=$,b=F;break}re=re.sibling}if(!X){for(re=F.child;re;){if(re===b){X=!0,b=F,T=$;break}if(re===T){X=!0,T=F,b=$;break}re=re.sibling}if(!X)throw Error(r(189))}}if(b.alternate!==T)throw Error(r(190))}if(b.tag!==3)throw Error(r(188));return b.stateNode.current===b?d:h}function c(d){var h=d.tag;if(h===5||h===26||h===27||h===6)return d;for(d=d.child;d!==null;){if(h=c(d),h!==null)return h;d=d.sibling}return null}var u=Object.assign,f=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),_=Symbol.iterator;function N(d){return d===null||typeof d!="object"?null:(d=_&&d[_]||d["@@iterator"],typeof d=="function"?d:null)}var B=Symbol.for("react.client.reference");function H(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===B?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case g:return"Fragment";case v:return"Profiler";case y:return"StrictMode";case O:return"Suspense";case P:return"SuspenseList";case M:return"Activity"}if(typeof d=="object")switch(d.$$typeof){case m:return"Portal";case E:return(d.displayName||"Context")+".Provider";case C:return(d._context.displayName||"Context")+".Consumer";case I:var h=d.render;return d=d.displayName,d||(d=h.displayName||h.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case R:return h=d.displayName||null,h!==null?h:H(d.type)||"Memo";case D:h=d._payload,d=d._init;try{return H(d(h))}catch{}}return null}var j=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},K=[],G=-1;function q(d){return{current:d}}function Y(d){0>G||(d.current=K[G],K[G]=null,G--)}function Z(d,h){G++,K[G]=d.current,d.current=h}var ie=q(null),se=q(null),ce=q(null),ye=q(null);function Se(d,h){switch(Z(ce,h),Z(se,d),Z(ie,null),h.nodeType){case 9:case 11:d=(d=h.documentElement)&&(d=d.namespaceURI)?Z4(d):0;break;default:if(d=h.tagName,h=h.namespaceURI)h=Z4(h),d=e3(h,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}Y(ie),Z(ie,d)}function ne(){Y(ie),Y(se),Y(ce)}function le(d){d.memoizedState!==null&&Z(ye,d);var h=ie.current,b=e3(h,d.type);h!==b&&(Z(se,d),Z(ie,b))}function de(d){se.current===d&&(Y(ie),Y(se)),ye.current===d&&(Y(ye),Bb._currentValue=W)}var oe=Object.prototype.hasOwnProperty,ue=e.unstable_scheduleCallback,pe=e.unstable_cancelCallback,Ee=e.unstable_shouldYield,xe=e.unstable_requestPaint,Re=e.unstable_now,he=e.unstable_getCurrentPriorityLevel,Pe=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Ie=e.unstable_NormalPriority,te=e.unstable_LowPriority,Te=e.unstable_IdlePriority,De=e.log,Ve=e.unstable_setDisableYieldValue,We=null,rt=null;function ut(d){if(typeof De=="function"&&Ve(d),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(We,d)}catch{}}var Be=Math.clz32?Math.clz32:It,et=Math.log,Le=Math.LN2;function It(d){return d>>>=0,d===0?32:31-(et(d)/Le|0)|0}var Lt=256,nt=4194304;function lt(d){var h=d&42;if(h!==0)return h;switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function vt(d,h,b){var T=d.pendingLanes;if(T===0)return 0;var $=0,F=d.suspendedLanes,X=d.pingedLanes;d=d.warmLanes;var re=T&134217727;return re!==0?(T=re&~F,T!==0?$=lt(T):(X&=re,X!==0?$=lt(X):b||(b=re&~d,b!==0&&($=lt(b))))):(re=T&~F,re!==0?$=lt(re):X!==0?$=lt(X):b||(b=T&~d,b!==0&&($=lt(b)))),$===0?0:h!==0&&h!==$&&(h&F)===0&&(F=$&-$,b=h&-h,F>=b||F===32&&(b&4194048)!==0)?h:$}function bt(d,h){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&h)===0}function vn(d,h){switch(d){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kn(){var d=Lt;return Lt<<=1,(Lt&4194048)===0&&(Lt=256),d}function Rr(){var d=nt;return nt<<=1,(nt&62914560)===0&&(nt=4194304),d}function nr(d){for(var h=[],b=0;31>b;b++)h.push(d);return h}function Bn(d,h){d.pendingLanes|=h,h!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function yo(d,h,b,T,$,F){var X=d.pendingLanes;d.pendingLanes=b,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=b,d.entangledLanes&=b,d.errorRecoveryDisabledLanes&=b,d.shellSuspendCounter=0;var re=d.entanglements,ge=d.expirationTimes,Ne=d.hiddenUpdates;for(b=X&~b;0<b;){var Ze=31-Be(b),ot=1<<Ze;re[Ze]=0,ge[Ze]=-1;var Fe=Ne[Ze];if(Fe!==null)for(Ne[Ze]=null,Ze=0;Ze<Fe.length;Ze++){var ze=Fe[Ze];ze!==null&&(ze.lane&=-536870913)}b&=~ot}T!==0&&Oo(d,T,0),F!==0&&$===0&&d.tag!==0&&(d.suspendedLanes|=F&~(X&~h))}function Oo(d,h,b){d.pendingLanes|=h,d.suspendedLanes&=~h;var T=31-Be(h);d.entangledLanes|=h,d.entanglements[T]=d.entanglements[T]|1073741824|b&4194090}function oo(d,h){var b=d.entangledLanes|=h;for(d=d.entanglements;b;){var T=31-Be(b),$=1<<T;$&h|d[T]&h&&(d[T]|=h),b&=~$}}function Ii(d){switch(d){case 2:d=1;break;case 8:d=4;break;case 32:d=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:d=128;break;case 268435456:d=134217728;break;default:d=0}return d}function Kt(d){return d&=-d,2<d?8<d?(d&134217727)!==0?32:268435456:8:2}function un(){var d=V.p;return d!==0?d:(d=window.event,d===void 0?32:b3(d.type))}function gt(d,h){var b=V.p;try{return V.p=d,h()}finally{V.p=b}}var kt=Math.random().toString(36).slice(2),Ht="__reactFiber$"+kt,Jt="__reactProps$"+kt,Vn="__reactContainer$"+kt,Xo="__reactEvents$"+kt,Da="__reactListeners$"+kt,ps="__reactHandles$"+kt,fd="__reactResources$"+kt,Pi="__reactMarker$"+kt;function vo(d){delete d[Ht],delete d[Jt],delete d[Xo],delete d[Da],delete d[ps]}function Fr(d){var h=d[Ht];if(h)return h;for(var b=d.parentNode;b;){if(h=b[Vn]||b[Ht]){if(b=h.alternate,h.child!==null||b!==null&&b.child!==null)for(d=o3(d);d!==null;){if(b=d[Ht])return b;d=o3(d)}return h}d=b,b=d.parentNode}return null}function zi(d){if(d=d[Ht]||d[Vn]){var h=d.tag;if(h===5||h===6||h===13||h===26||h===27||h===3)return d}return null}function fl(d){var h=d.tag;if(h===5||h===26||h===27||h===6)return d.stateNode;throw Error(r(33))}function pl(d){var h=d[fd];return h||(h=d[fd]={hoistableStyles:new Map,hoistableScripts:new Map}),h}function He(d){d[Pi]=!0}var Ye=new Set,$t={};function hn(d,h){Ut(d,h),Ut(d+"Capture",h)}function Ut(d,h){for($t[d]=h,d=0;d<h.length;d++)Ye.add(h[d])}var Xr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jr={},Vi={};function Jv(d){return oe.call(Vi,d)?!0:oe.call(Jr,d)?!1:Xr.test(d)?Vi[d]=!0:(Jr[d]=!0,!1)}function rm(d,h,b){if(Jv(h))if(b===null)d.removeAttribute(h);else{switch(typeof b){case"undefined":case"function":case"symbol":d.removeAttribute(h);return;case"boolean":var T=h.toLowerCase().slice(0,5);if(T!=="data-"&&T!=="aria-"){d.removeAttribute(h);return}}d.setAttribute(h,""+b)}}function Zf(d,h,b){if(b===null)d.removeAttribute(h);else{switch(typeof b){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(h);return}d.setAttribute(h,""+b)}}function ca(d,h,b,T){if(T===null)d.removeAttribute(b);else{switch(typeof T){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(b);return}d.setAttributeNS(h,b,""+T)}}var pd,Hn;function Hi(d){if(pd===void 0)try{throw Error()}catch(b){var h=b.stack.trim().match(/\n( *(at )?)/);pd=h&&h[1]||"",Hn=-1<b.stack.indexOf(`
at`)?" (<anonymous>)":-1<b.stack.indexOf("@")?"@unknown:0:0":""}return`
-`+dd+d+Hn}var hs=!1;function eu(d,p){if(!d||hs)return"";hs=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var T={DetermineComponentFrameRoot:function(){try{if(p){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(ze){var Fe=ze}Reflect.construct(d,[],ot)}else{try{ot.call()}catch(ze){Fe=ze}d.call(ot.prototype)}}else{try{throw Error()}catch(ze){Fe=ze}(ot=d())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(ze){if(ze&&Fe&&typeof ze.stack=="string")return[ze.stack,Fe.stack]}return[null,null]}};T.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var $=Object.getOwnPropertyDescriptor(T.DetermineComponentFrameRoot,"name");$&&$.configurable&&Object.defineProperty(T.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var F=T.DetermineComponentFrameRoot(),X=F[0],re=F[1];if(X&&re){var ge=X.split(`
+`+pd+d+Hn}var hs=!1;function tu(d,h){if(!d||hs)return"";hs=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var T={DetermineComponentFrameRoot:function(){try{if(h){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(ze){var Fe=ze}Reflect.construct(d,[],ot)}else{try{ot.call()}catch(ze){Fe=ze}d.call(ot.prototype)}}else{try{throw Error()}catch(ze){Fe=ze}(ot=d())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(ze){if(ze&&Fe&&typeof ze.stack=="string")return[ze.stack,Fe.stack]}return[null,null]}};T.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var $=Object.getOwnPropertyDescriptor(T.DetermineComponentFrameRoot,"name");$&&$.configurable&&Object.defineProperty(T.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var F=T.DetermineComponentFrameRoot(),X=F[0],re=F[1];if(X&&re){var ge=X.split(`
`),Ne=re.split(`
`);for($=T=0;T<ge.length&&!ge[T].includes("DetermineComponentFrameRoot");)T++;for(;$<Ne.length&&!Ne[$].includes("DetermineComponentFrameRoot");)$++;if(T===ge.length||$===Ne.length)for(T=ge.length-1,$=Ne.length-1;1<=T&&0<=$&&ge[T]!==Ne[$];)$--;for(;1<=T&&0<=$;T--,$--)if(ge[T]!==Ne[$]){if(T!==1||$!==1)do if(T--,$--,0>$||ge[T]!==Ne[$]){var Ze=`
-`+ge[T].replace(" at new "," at ");return d.displayName&&Ze.includes("<anonymous>")&&(Ze=Ze.replace("<anonymous>",d.displayName)),Ze}while(1<=T&&0<=$);break}}}finally{hs=!1,Error.prepareStackTrace=b}return(b=d?d.displayName||d.name:"")?Hi(b):""}function fme(d){switch(d.tag){case 26:case 27:case 5:return Hi(d.type);case 16:return Hi("Lazy");case 13:return Hi("Suspense");case 19:return Hi("SuspenseList");case 0:case 15:return eu(d.type,!1);case 11:return eu(d.type.render,!1);case 1:return eu(d.type,!0);case 31:return Hi("Activity");default:return""}}function WH(d){try{var p="";do p+=fme(d),d=d.return;while(d);return p}catch(b){return`
+`+ge[T].replace(" at new "," at ");return d.displayName&&Ze.includes("<anonymous>")&&(Ze=Ze.replace("<anonymous>",d.displayName)),Ze}while(1<=T&&0<=$);break}}}finally{hs=!1,Error.prepareStackTrace=b}return(b=d?d.displayName||d.name:"")?Hi(b):""}function hme(d){switch(d.tag){case 26:case 27:case 5:return Hi(d.type);case 16:return Hi("Lazy");case 13:return Hi("Suspense");case 19:return Hi("SuspenseList");case 0:case 15:return tu(d.type,!1);case 11:return tu(d.type.render,!1);case 1:return tu(d.type,!0);case 31:return Hi("Activity");default:return""}}function WH(d){try{var h="";do h+=hme(d),d=d.return;while(d);return h}catch(b){return`
Error generating stack: `+b.message+`
-`+b.stack}}function ms(d){switch(typeof d){case"bigint":case"boolean":case"number":case"string":case"undefined":return d;case"object":return d;default:return""}}function KH(d){var p=d.type;return(d=d.nodeName)&&d.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function pme(d){var p=KH(d)?"checked":"value",b=Object.getOwnPropertyDescriptor(d.constructor.prototype,p),T=""+d[p];if(!d.hasOwnProperty(p)&&typeof b<"u"&&typeof b.get=="function"&&typeof b.set=="function"){var $=b.get,F=b.set;return Object.defineProperty(d,p,{configurable:!0,get:function(){return $.call(this)},set:function(X){T=""+X,F.call(this,X)}}),Object.defineProperty(d,p,{enumerable:b.enumerable}),{getValue:function(){return T},setValue:function(X){T=""+X},stopTracking:function(){d._valueTracker=null,delete d[p]}}}}function rC(d){d._valueTracker||(d._valueTracker=pme(d))}function YH(d){if(!d)return!1;var p=d._valueTracker;if(!p)return!0;var b=p.getValue(),T="";return d&&(T=KH(d)?d.checked?"true":"false":d.value),d=T,d!==b?(p.setValue(d),!0):!1}function oC(d){if(d=d||(typeof document<"u"?document:void 0),typeof d>"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var hme=/[\n"\\]/g;function gs(d){return d.replace(hme,function(p){return"\\"+p.charCodeAt(0).toString(16)+" "})}function aA(d,p,b,T,$,F,X,re){d.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?d.type=X:d.removeAttribute("type"),p!=null?X==="number"?(p===0&&d.value===""||d.value!=p)&&(d.value=""+ms(p)):d.value!==""+ms(p)&&(d.value=""+ms(p)):X!=="submit"&&X!=="reset"||d.removeAttribute("value"),p!=null?sA(d,X,ms(p)):b!=null?sA(d,X,ms(b)):T!=null&&d.removeAttribute("value"),$==null&&F!=null&&(d.defaultChecked=!!F),$!=null&&(d.checked=$&&typeof $!="function"&&typeof $!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?d.name=""+ms(re):d.removeAttribute("name")}function QH(d,p,b,T,$,F,X,re){if(F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(d.type=F),p!=null||b!=null){if(!(F!=="submit"&&F!=="reset"||p!=null))return;b=b!=null?""+ms(b):"",p=p!=null?""+ms(p):b,re||p===d.value||(d.value=p),d.defaultValue=p}T=T??$,T=typeof T!="function"&&typeof T!="symbol"&&!!T,d.checked=re?d.checked:!!T,d.defaultChecked=!!T,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(d.name=X)}function sA(d,p,b){p==="number"&&oC(d.ownerDocument)===d||d.defaultValue===""+b||(d.defaultValue=""+b)}function rm(d,p,b,T){if(d=d.options,p){p={};for(var $=0;$<b.length;$++)p["$"+b[$]]=!0;for(b=0;b<d.length;b++)$=p.hasOwnProperty("$"+d[b].value),d[b].selected!==$&&(d[b].selected=$),$&&T&&(d[b].defaultSelected=!0)}else{for(b=""+ms(b),p=null,$=0;$<d.length;$++){if(d[$].value===b){d[$].selected=!0,T&&(d[$].defaultSelected=!0);return}p!==null||d[$].disabled||(p=d[$])}p!==null&&(p.selected=!0)}}function XH(d,p,b){if(p!=null&&(p=""+ms(p),p!==d.value&&(d.value=p),b==null)){d.defaultValue!==p&&(d.defaultValue=p);return}d.defaultValue=b!=null?""+ms(b):""}function JH(d,p,b,T){if(p==null){if(T!=null){if(b!=null)throw Error(r(92));if(j(T)){if(1<T.length)throw Error(r(93));T=T[0]}b=T}b==null&&(b=""),p=b}b=ms(p),d.defaultValue=b,T=d.textContent,T===b&&T!==""&&T!==null&&(d.value=T)}function om(d,p){if(p){var b=d.firstChild;if(b&&b===d.lastChild&&b.nodeType===3){b.nodeValue=p;return}}d.textContent=p}var mme=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ZH(d,p,b){var T=p.indexOf("--")===0;b==null||typeof b=="boolean"||b===""?T?d.setProperty(p,""):p==="float"?d.cssFloat="":d[p]="":T?d.setProperty(p,b):typeof b!="number"||b===0||mme.has(p)?p==="float"?d.cssFloat=b:d[p]=(""+b).trim():d[p]=b+"px"}function e5(d,p,b){if(p!=null&&typeof p!="object")throw Error(r(62));if(d=d.style,b!=null){for(var T in b)!b.hasOwnProperty(T)||p!=null&&p.hasOwnProperty(T)||(T.indexOf("--")===0?d.setProperty(T,""):T==="float"?d.cssFloat="":d[T]="");for(var $ in p)T=p[$],p.hasOwnProperty($)&&b[$]!==T&&ZH(d,$,T)}else for(var F in p)p.hasOwnProperty(F)&&ZH(d,F,p[F])}function lA(d){if(d.indexOf("-")===-1)return!1;switch(d){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gme=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),yme=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function iC(d){return yme.test(""+d)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":d}var cA=null;function uA(d){return d=d.target||d.srcElement||window,d.correspondingUseElement&&(d=d.correspondingUseElement),d.nodeType===3?d.parentNode:d}var im=null,am=null;function t5(d){var p=zi(d);if(p&&(d=p.stateNode)){var b=d[Xt]||null;e:switch(d=p.stateNode,p.type){case"input":if(aA(d,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name),p=b.name,b.type==="radio"&&p!=null){for(b=d;b.parentNode;)b=b.parentNode;for(b=b.querySelectorAll('input[name="'+gs(""+p)+'"][type="radio"]'),p=0;p<b.length;p++){var T=b[p];if(T!==d&&T.form===d.form){var $=T[Xt]||null;if(!$)throw Error(r(90));aA(T,$.value,$.defaultValue,$.defaultValue,$.checked,$.defaultChecked,$.type,$.name)}}for(p=0;p<b.length;p++)T=b[p],T.form===d.form&&YH(T)}break e;case"textarea":XH(d,b.value,b.defaultValue);break e;case"select":p=b.value,p!=null&&rm(d,!!b.multiple,p,!1)}}}var dA=!1;function n5(d,p,b){if(dA)return d(p,b);dA=!0;try{var T=d(p);return T}finally{if(dA=!1,(im!==null||am!==null)&&(UC(),im&&(p=im,d=am,am=im=null,t5(p),d)))for(p=0;p<d.length;p++)t5(d[p])}}function Zv(d,p){var b=d.stateNode;if(b===null)return null;var T=b[Xt]||null;if(T===null)return null;b=T[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(T=!T.disabled)||(d=d.type,T=!(d==="button"||d==="input"||d==="select"||d==="textarea")),d=!T;break e;default:d=!1}if(d)return null;if(b&&typeof b!="function")throw Error(r(231,p,typeof b));return b}var tu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fA=!1;if(tu)try{var eb={};Object.defineProperty(eb,"passive",{get:function(){fA=!0}}),window.addEventListener("test",eb,eb),window.removeEventListener("test",eb,eb)}catch{fA=!1}var fd=null,pA=null,aC=null;function r5(){if(aC)return aC;var d,p=pA,b=p.length,T,$="value"in fd?fd.value:fd.textContent,F=$.length;for(d=0;d<b&&p[d]===$[d];d++);var X=b-d;for(T=1;T<=X&&p[b-T]===$[F-T];T++);return aC=$.slice(d,1<T?1-T:void 0)}function sC(d){var p=d.keyCode;return"charCode"in d?(d=d.charCode,d===0&&p===13&&(d=13)):d=p,d===10&&(d=13),32<=d||d===13?d:0}function lC(){return!0}function o5(){return!1}function ua(d){function p(b,T,$,F,X){this._reactName=b,this._targetInst=$,this.type=T,this.nativeEvent=F,this.target=X,this.currentTarget=null;for(var re in d)d.hasOwnProperty(re)&&(b=d[re],this[re]=b?b(F):F[re]);return this.isDefaultPrevented=(F.defaultPrevented!=null?F.defaultPrevented:F.returnValue===!1)?lC:o5,this.isPropagationStopped=o5,this}return u(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var b=this.nativeEvent;b&&(b.preventDefault?b.preventDefault():typeof b.returnValue!="unknown"&&(b.returnValue=!1),this.isDefaultPrevented=lC)},stopPropagation:function(){var b=this.nativeEvent;b&&(b.stopPropagation?b.stopPropagation():typeof b.cancelBubble!="unknown"&&(b.cancelBubble=!0),this.isPropagationStopped=lC)},persist:function(){},isPersistent:lC}),p}var Jf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(d){return d.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cC=ua(Jf),tb=u({},Jf,{view:0,detail:0}),vme=ua(tb),hA,mA,nb,uC=u({},tb,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yA,button:0,buttons:0,relatedTarget:function(d){return d.relatedTarget===void 0?d.fromElement===d.srcElement?d.toElement:d.fromElement:d.relatedTarget},movementX:function(d){return"movementX"in d?d.movementX:(d!==nb&&(nb&&d.type==="mousemove"?(hA=d.screenX-nb.screenX,mA=d.screenY-nb.screenY):mA=hA=0,nb=d),hA)},movementY:function(d){return"movementY"in d?d.movementY:mA}}),i5=ua(uC),bme=u({},uC,{dataTransfer:0}),xme=ua(bme),Sme=u({},tb,{relatedTarget:0}),gA=ua(Sme),wme=u({},Jf,{animationName:0,elapsedTime:0,pseudoElement:0}),Cme=ua(wme),Eme=u({},Jf,{clipboardData:function(d){return"clipboardData"in d?d.clipboardData:window.clipboardData}}),Tme=ua(Eme),Ome=u({},Jf,{data:0}),a5=ua(Ome),Ime={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pme={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ame={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mme(d){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(d):(d=Ame[d])?!!p[d]:!1}function yA(){return Mme}var Rme=u({},tb,{key:function(d){if(d.key){var p=Ime[d.key]||d.key;if(p!=="Unidentified")return p}return d.type==="keypress"?(d=sC(d),d===13?"Enter":String.fromCharCode(d)):d.type==="keydown"||d.type==="keyup"?Pme[d.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yA,charCode:function(d){return d.type==="keypress"?sC(d):0},keyCode:function(d){return d.type==="keydown"||d.type==="keyup"?d.keyCode:0},which:function(d){return d.type==="keypress"?sC(d):d.type==="keydown"||d.type==="keyup"?d.keyCode:0}}),Dme=ua(Rme),kme=u({},uC,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),s5=ua(kme),_me=u({},tb,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yA}),$me=ua(_me),Nme=u({},Jf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lme=ua(Nme),Fme=u({},uC,{deltaX:function(d){return"deltaX"in d?d.deltaX:"wheelDeltaX"in d?-d.wheelDeltaX:0},deltaY:function(d){return"deltaY"in d?d.deltaY:"wheelDeltaY"in d?-d.wheelDeltaY:"wheelDelta"in d?-d.wheelDelta:0},deltaZ:0,deltaMode:0}),jme=ua(Fme),Bme=u({},Jf,{newState:0,oldState:0}),zme=ua(Bme),Vme=[9,13,27,32],vA=tu&&"CompositionEvent"in window,rb=null;tu&&"documentMode"in document&&(rb=document.documentMode);var Hme=tu&&"TextEvent"in window&&!rb,l5=tu&&(!vA||rb&&8<rb&&11>=rb),c5=" ",u5=!1;function d5(d,p){switch(d){case"keyup":return Vme.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f5(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var sm=!1;function Ume(d,p){switch(d){case"compositionend":return f5(p);case"keypress":return p.which!==32?null:(u5=!0,c5);case"textInput":return d=p.data,d===c5&&u5?null:d;default:return null}}function Gme(d,p){if(sm)return d==="compositionend"||!vA&&d5(d,p)?(d=r5(),aC=pA=fd=null,sm=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return l5&&p.locale!=="ko"?null:p.data;default:return null}}var qme={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function p5(d){var p=d&&d.nodeName&&d.nodeName.toLowerCase();return p==="input"?!!qme[d.type]:p==="textarea"}function h5(d,p,b,T){im?am?am.push(T):am=[T]:im=T,p=QC(p,"onChange"),0<p.length&&(b=new cC("onChange","change",null,b,T),d.push({event:b,listeners:p}))}var ob=null,ib=null;function Wme(d){K4(d,0)}function dC(d){var p=ul(d);if(YH(p))return d}function m5(d,p){if(d==="change")return p}var g5=!1;if(tu){var bA;if(tu){var xA="oninput"in document;if(!xA){var y5=document.createElement("div");y5.setAttribute("oninput","return;"),xA=typeof y5.oninput=="function"}bA=xA}else bA=!1;g5=bA&&(!document.documentMode||9<document.documentMode)}function v5(){ob&&(ob.detachEvent("onpropertychange",b5),ib=ob=null)}function b5(d){if(d.propertyName==="value"&&dC(ib)){var p=[];h5(p,ib,d,uA(d)),n5(Wme,p)}}function Kme(d,p,b){d==="focusin"?(v5(),ob=p,ib=b,ob.attachEvent("onpropertychange",b5)):d==="focusout"&&v5()}function Yme(d){if(d==="selectionchange"||d==="keyup"||d==="keydown")return dC(ib)}function Qme(d,p){if(d==="click")return dC(p)}function Xme(d,p){if(d==="input"||d==="change")return dC(p)}function Jme(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var ka=typeof Object.is=="function"?Object.is:Jme;function ab(d,p){if(ka(d,p))return!0;if(typeof d!="object"||d===null||typeof p!="object"||p===null)return!1;var b=Object.keys(d),T=Object.keys(p);if(b.length!==T.length)return!1;for(T=0;T<b.length;T++){var $=b[T];if(!oe.call(p,$)||!ka(d[$],p[$]))return!1}return!0}function x5(d){for(;d&&d.firstChild;)d=d.firstChild;return d}function S5(d,p){var b=x5(d);d=0;for(var T;b;){if(b.nodeType===3){if(T=d+b.textContent.length,d<=p&&T>=p)return{node:b,offset:p-d};d=T}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=x5(b)}}function w5(d,p){return d&&p?d===p?!0:d&&d.nodeType===3?!1:p&&p.nodeType===3?w5(d,p.parentNode):"contains"in d?d.contains(p):d.compareDocumentPosition?!!(d.compareDocumentPosition(p)&16):!1:!1}function C5(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var p=oC(d.document);p instanceof d.HTMLIFrameElement;){try{var b=typeof p.contentWindow.location.href=="string"}catch{b=!1}if(b)d=p.contentWindow;else break;p=oC(d.document)}return p}function SA(d){var p=d&&d.nodeName&&d.nodeName.toLowerCase();return p&&(p==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||p==="textarea"||d.contentEditable==="true")}var Zme=tu&&"documentMode"in document&&11>=document.documentMode,lm=null,wA=null,sb=null,CA=!1;function E5(d,p,b){var T=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;CA||lm==null||lm!==oC(T)||(T=lm,"selectionStart"in T&&SA(T)?T={start:T.selectionStart,end:T.selectionEnd}:(T=(T.ownerDocument&&T.ownerDocument.defaultView||window).getSelection(),T={anchorNode:T.anchorNode,anchorOffset:T.anchorOffset,focusNode:T.focusNode,focusOffset:T.focusOffset}),sb&&ab(sb,T)||(sb=T,T=QC(wA,"onSelect"),0<T.length&&(p=new cC("onSelect","select",null,p,b),d.push({event:p,listeners:T}),p.target=lm)))}function Zf(d,p){var b={};return b[d.toLowerCase()]=p.toLowerCase(),b["Webkit"+d]="webkit"+p,b["Moz"+d]="moz"+p,b}var cm={animationend:Zf("Animation","AnimationEnd"),animationiteration:Zf("Animation","AnimationIteration"),animationstart:Zf("Animation","AnimationStart"),transitionrun:Zf("Transition","TransitionRun"),transitionstart:Zf("Transition","TransitionStart"),transitioncancel:Zf("Transition","TransitionCancel"),transitionend:Zf("Transition","TransitionEnd")},EA={},T5={};tu&&(T5=document.createElement("div").style,"AnimationEvent"in window||(delete cm.animationend.animation,delete cm.animationiteration.animation,delete cm.animationstart.animation),"TransitionEvent"in window||delete cm.transitionend.transition);function ep(d){if(EA[d])return EA[d];if(!cm[d])return d;var p=cm[d],b;for(b in p)if(p.hasOwnProperty(b)&&b in T5)return EA[d]=p[b];return d}var O5=ep("animationend"),I5=ep("animationiteration"),P5=ep("animationstart"),ege=ep("transitionrun"),tge=ep("transitionstart"),nge=ep("transitioncancel"),A5=ep("transitionend"),M5=new Map,TA="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");TA.push("scrollEnd");function fl(d,p){M5.set(d,p),hn(p,[d])}var R5=new WeakMap;function ys(d,p){if(typeof d=="object"&&d!==null){var b=R5.get(d);return b!==void 0?b:(p={value:d,source:p,stack:WH(p)},R5.set(d,p),p)}return{value:d,source:p,stack:WH(p)}}var vs=[],um=0,OA=0;function fC(){for(var d=um,p=OA=um=0;p<d;){var b=vs[p];vs[p++]=null;var T=vs[p];vs[p++]=null;var $=vs[p];vs[p++]=null;var F=vs[p];if(vs[p++]=null,T!==null&&$!==null){var X=T.pending;X===null?$.next=$:($.next=X.next,X.next=$),T.pending=$}F!==0&&D5(b,$,F)}}function pC(d,p,b,T){vs[um++]=d,vs[um++]=p,vs[um++]=b,vs[um++]=T,OA|=T,d.lanes|=T,d=d.alternate,d!==null&&(d.lanes|=T)}function IA(d,p,b,T){return pC(d,p,b,T),hC(d)}function dm(d,p){return pC(d,null,null,p),hC(d)}function D5(d,p,b){d.lanes|=b;var T=d.alternate;T!==null&&(T.lanes|=b);for(var $=!1,F=d.return;F!==null;)F.childLanes|=b,T=F.alternate,T!==null&&(T.childLanes|=b),F.tag===22&&(d=F.stateNode,d===null||d._visibility&1||($=!0)),d=F,F=F.return;return d.tag===3?(F=d.stateNode,$&&p!==null&&($=31-Be(b),d=F.hiddenUpdates,T=d[$],T===null?d[$]=[p]:T.push(p),p.lane=b|536870912),F):null}function hC(d){if(50<Db)throw Db=0,kM=null,Error(r(185));for(var p=d.return;p!==null;)d=p,p=d.return;return d.tag===3?d.stateNode:null}var fm={};function rge(d,p,b,T){this.tag=d,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _a(d,p,b,T){return new rge(d,p,b,T)}function PA(d){return d=d.prototype,!(!d||!d.isReactComponent)}function nu(d,p){var b=d.alternate;return b===null?(b=_a(d.tag,p,d.key,d.mode),b.elementType=d.elementType,b.type=d.type,b.stateNode=d.stateNode,b.alternate=d,d.alternate=b):(b.pendingProps=p,b.type=d.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=d.flags&65011712,b.childLanes=d.childLanes,b.lanes=d.lanes,b.child=d.child,b.memoizedProps=d.memoizedProps,b.memoizedState=d.memoizedState,b.updateQueue=d.updateQueue,p=d.dependencies,b.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},b.sibling=d.sibling,b.index=d.index,b.ref=d.ref,b.refCleanup=d.refCleanup,b}function k5(d,p){d.flags&=65011714;var b=d.alternate;return b===null?(d.childLanes=0,d.lanes=p,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=b.childLanes,d.lanes=b.lanes,d.child=b.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=b.memoizedProps,d.memoizedState=b.memoizedState,d.updateQueue=b.updateQueue,d.type=b.type,p=b.dependencies,d.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext}),d}function mC(d,p,b,T,$,F){var X=0;if(T=d,typeof d=="function")PA(d)&&(X=1);else if(typeof d=="string")X=iye(d,b,ie.current)?26:d==="html"||d==="head"||d==="body"?27:5;else e:switch(d){case M:return d=_a(31,b,p,$),d.elementType=M,d.lanes=F,d;case g:return tp(b.children,$,F,p);case y:X=8,$|=24;break;case v:return d=_a(12,b,p,$|2),d.elementType=v,d.lanes=F,d;case O:return d=_a(13,b,p,$),d.elementType=O,d.lanes=F,d;case P:return d=_a(19,b,p,$),d.elementType=P,d.lanes=F,d;default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case w:case E:X=10;break e;case C:X=9;break e;case I:X=11;break e;case R:X=14;break e;case D:X=16,T=null;break e}X=29,b=Error(r(130,d===null?"null":typeof d,"")),T=null}return p=_a(X,b,p,$),p.elementType=d,p.type=T,p.lanes=F,p}function tp(d,p,b,T){return d=_a(7,d,T,p),d.lanes=b,d}function AA(d,p,b){return d=_a(6,d,null,p),d.lanes=b,d}function MA(d,p,b){return p=_a(4,d.children!==null?d.children:[],d.key,p),p.lanes=b,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}var pm=[],hm=0,gC=null,yC=0,bs=[],xs=0,np=null,ru=1,ou="";function rp(d,p){pm[hm++]=yC,pm[hm++]=gC,gC=d,yC=p}function _5(d,p,b){bs[xs++]=ru,bs[xs++]=ou,bs[xs++]=np,np=d;var T=ru;d=ou;var $=32-Be(T)-1;T&=~(1<<$),b+=1;var F=32-Be(p)+$;if(30<F){var X=$-$%5;F=(T&(1<<X)-1).toString(32),T>>=X,$-=X,ru=1<<32-Be(p)+$|b<<$|T,ou=F+d}else ru=1<<F|b<<$|T,ou=d}function RA(d){d.return!==null&&(rp(d,1),_5(d,1,0))}function DA(d){for(;d===gC;)gC=pm[--hm],pm[hm]=null,yC=pm[--hm],pm[hm]=null;for(;d===np;)np=bs[--xs],bs[xs]=null,ou=bs[--xs],bs[xs]=null,ru=bs[--xs],bs[xs]=null}var Ui=null,io=null,rr=!1,op=null,oc=!1,kA=Error(r(519));function ip(d){var p=Error(r(418,""));throw ub(ys(p,d)),kA}function $5(d){var p=d.stateNode,b=d.type,T=d.memoizedProps;switch(p[Ut]=d,p[Xt]=T,b){case"dialog":Fn("cancel",p),Fn("close",p);break;case"iframe":case"object":case"embed":Fn("load",p);break;case"video":case"audio":for(b=0;b<_b.length;b++)Fn(_b[b],p);break;case"source":Fn("error",p);break;case"img":case"image":case"link":Fn("error",p),Fn("load",p);break;case"details":Fn("toggle",p);break;case"input":Fn("invalid",p),QH(p,T.value,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name,!0),rC(p);break;case"select":Fn("invalid",p);break;case"textarea":Fn("invalid",p),JH(p,T.value,T.defaultValue,T.children),rC(p)}b=T.children,typeof b!="string"&&typeof b!="number"&&typeof b!="bigint"||p.textContent===""+b||T.suppressHydrationWarning===!0||J4(p.textContent,b)?(T.popover!=null&&(Fn("beforetoggle",p),Fn("toggle",p)),T.onScroll!=null&&Fn("scroll",p),T.onScrollEnd!=null&&Fn("scrollend",p),T.onClick!=null&&(p.onclick=XC),p=!0):p=!1,p||ip(d)}function N5(d){for(Ui=d.return;Ui;)switch(Ui.tag){case 5:case 13:oc=!1;return;case 27:case 3:oc=!0;return;default:Ui=Ui.return}}function lb(d){if(d!==Ui)return!1;if(!rr)return N5(d),rr=!0,!1;var p=d.tag,b;if((b=p!==3&&p!==27)&&((b=p===5)&&(b=d.type,b=!(b!=="form"&&b!=="button")||YM(d.type,d.memoizedProps)),b=!b),b&&io&&ip(d),N5(d),p===13){if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(r(317));e:{for(d=d.nextSibling,p=0;d;){if(d.nodeType===8)if(b=d.data,b==="/$"){if(p===0){io=hl(d.nextSibling);break e}p--}else b!=="$"&&b!=="$!"&&b!=="$?"||p++;d=d.nextSibling}io=null}}else p===27?(p=io,Pd(d.type)?(d=ZM,ZM=null,io=d):io=p):io=Ui?hl(d.stateNode.nextSibling):null;return!0}function cb(){io=Ui=null,rr=!1}function L5(){var d=op;return d!==null&&(pa===null?pa=d:pa.push.apply(pa,d),op=null),d}function ub(d){op===null?op=[d]:op.push(d)}var _A=q(null),ap=null,iu=null;function pd(d,p,b){Z(_A,p._currentValue),p._currentValue=b}function au(d){d._currentValue=_A.current,Y(_A)}function $A(d,p,b){for(;d!==null;){var T=d.alternate;if((d.childLanes&p)!==p?(d.childLanes|=p,T!==null&&(T.childLanes|=p)):T!==null&&(T.childLanes&p)!==p&&(T.childLanes|=p),d===b)break;d=d.return}}function NA(d,p,b,T){var $=d.child;for($!==null&&($.return=d);$!==null;){var F=$.dependencies;if(F!==null){var X=$.child;F=F.firstContext;e:for(;F!==null;){var re=F;F=$;for(var ge=0;ge<p.length;ge++)if(re.context===p[ge]){F.lanes|=b,re=F.alternate,re!==null&&(re.lanes|=b),$A(F.return,b,d),T||(X=null);break e}F=re.next}}else if($.tag===18){if(X=$.return,X===null)throw Error(r(341));X.lanes|=b,F=X.alternate,F!==null&&(F.lanes|=b),$A(X,b,d),X=null}else X=$.child;if(X!==null)X.return=$;else for(X=$;X!==null;){if(X===d){X=null;break}if($=X.sibling,$!==null){$.return=X.return,X=$;break}X=X.return}$=X}}function db(d,p,b,T){d=null;for(var $=p,F=!1;$!==null;){if(!F){if(($.flags&524288)!==0)F=!0;else if(($.flags&262144)!==0)break}if($.tag===10){var X=$.alternate;if(X===null)throw Error(r(387));if(X=X.memoizedProps,X!==null){var re=$.type;ka($.pendingProps.value,X.value)||(d!==null?d.push(re):d=[re])}}else if($===ye.current){if(X=$.alternate,X===null)throw Error(r(387));X.memoizedState.memoizedState!==$.memoizedState.memoizedState&&(d!==null?d.push(Bb):d=[Bb])}$=$.return}d!==null&&NA(p,d,b,T),p.flags|=262144}function vC(d){for(d=d.firstContext;d!==null;){if(!ka(d.context._currentValue,d.memoizedValue))return!0;d=d.next}return!1}function sp(d){ap=d,iu=null,d=d.dependencies,d!==null&&(d.firstContext=null)}function Pi(d){return F5(ap,d)}function bC(d,p){return ap===null&&sp(d),F5(d,p)}function F5(d,p){var b=p._currentValue;if(p={context:p,memoizedValue:b,next:null},iu===null){if(d===null)throw Error(r(308));iu=p,d.dependencies={lanes:0,firstContext:p},d.flags|=524288}else iu=iu.next=p;return b}var oge=typeof AbortController<"u"?AbortController:function(){var d=[],p=this.signal={aborted:!1,addEventListener:function(b,T){d.push(T)}};this.abort=function(){p.aborted=!0,d.forEach(function(b){return b()})}},ige=e.unstable_scheduleCallback,age=e.unstable_NormalPriority,$o={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function LA(){return{controller:new oge,data:new Map,refCount:0}}function fb(d){d.refCount--,d.refCount===0&&ige(age,function(){d.controller.abort()})}var pb=null,FA=0,mm=0,gm=null;function sge(d,p){if(pb===null){var b=pb=[];FA=0,mm=BM(),gm={status:"pending",value:void 0,then:function(T){b.push(T)}}}return FA++,p.then(j5,j5),p}function j5(){if(--FA===0&&pb!==null){gm!==null&&(gm.status="fulfilled");var d=pb;pb=null,mm=0,gm=null;for(var p=0;p<d.length;p++)(0,d[p])()}}function lge(d,p){var b=[],T={status:"pending",value:null,reason:null,then:function($){b.push($)}};return d.then(function(){T.status="fulfilled",T.value=p;for(var $=0;$<b.length;$++)(0,b[$])(p)},function($){for(T.status="rejected",T.reason=$,$=0;$<b.length;$++)(0,b[$])(void 0)}),T}var B5=L.S;L.S=function(d,p){typeof p=="object"&&p!==null&&typeof p.then=="function"&&sge(d,p),B5!==null&&B5(d,p)};var lp=q(null);function jA(){var d=lp.current;return d!==null?d:Dr.pooledCache}function xC(d,p){p===null?Z(lp,lp.current):Z(lp,p.pool)}function z5(){var d=jA();return d===null?null:{parent:$o._currentValue,pool:d}}var hb=Error(r(460)),V5=Error(r(474)),SC=Error(r(542)),BA={then:function(){}};function H5(d){return d=d.status,d==="fulfilled"||d==="rejected"}function wC(){}function U5(d,p,b){switch(b=d[b],b===void 0?d.push(p):b!==p&&(p.then(wC,wC),p=b),p.status){case"fulfilled":return p.value;case"rejected":throw d=p.reason,q5(d),d;default:if(typeof p.status=="string")p.then(wC,wC);else{if(d=Dr,d!==null&&100<d.shellSuspendCounter)throw Error(r(482));d=p,d.status="pending",d.then(function(T){if(p.status==="pending"){var $=p;$.status="fulfilled",$.value=T}},function(T){if(p.status==="pending"){var $=p;$.status="rejected",$.reason=T}})}switch(p.status){case"fulfilled":return p.value;case"rejected":throw d=p.reason,q5(d),d}throw mb=p,hb}}var mb=null;function G5(){if(mb===null)throw Error(r(459));var d=mb;return mb=null,d}function q5(d){if(d===hb||d===SC)throw Error(r(483))}var hd=!1;function zA(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function VA(d,p){d=d.updateQueue,p.updateQueue===d&&(p.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function md(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function gd(d,p,b){var T=d.updateQueue;if(T===null)return null;if(T=T.shared,(mr&2)!==0){var $=T.pending;return $===null?p.next=p:(p.next=$.next,$.next=p),T.pending=p,p=hC(d),D5(d,null,b),p}return pC(d,T,p,b),hC(d)}function gb(d,p,b){if(p=p.updateQueue,p!==null&&(p=p.shared,(b&4194048)!==0)){var T=p.lanes;T&=d.pendingLanes,b|=T,p.lanes=b,oo(d,b)}}function HA(d,p){var b=d.updateQueue,T=d.alternate;if(T!==null&&(T=T.updateQueue,b===T)){var $=null,F=null;if(b=b.firstBaseUpdate,b!==null){do{var X={lane:b.lane,tag:b.tag,payload:b.payload,callback:null,next:null};F===null?$=F=X:F=F.next=X,b=b.next}while(b!==null);F===null?$=F=p:F=F.next=p}else $=F=p;b={baseState:T.baseState,firstBaseUpdate:$,lastBaseUpdate:F,shared:T.shared,callbacks:T.callbacks},d.updateQueue=b;return}d=b.lastBaseUpdate,d===null?b.firstBaseUpdate=p:d.next=p,b.lastBaseUpdate=p}var UA=!1;function yb(){if(UA){var d=gm;if(d!==null)throw d}}function vb(d,p,b,T){UA=!1;var $=d.updateQueue;hd=!1;var F=$.firstBaseUpdate,X=$.lastBaseUpdate,re=$.shared.pending;if(re!==null){$.shared.pending=null;var ge=re,Ne=ge.next;ge.next=null,X===null?F=Ne:X.next=Ne,X=ge;var Ze=d.alternate;Ze!==null&&(Ze=Ze.updateQueue,re=Ze.lastBaseUpdate,re!==X&&(re===null?Ze.firstBaseUpdate=Ne:re.next=Ne,Ze.lastBaseUpdate=ge))}if(F!==null){var ot=$.baseState;X=0,Ze=Ne=ge=null,re=F;do{var Fe=re.lane&-536870913,ze=Fe!==re.lane;if(ze?(qn&Fe)===Fe:(T&Fe)===Fe){Fe!==0&&Fe===mm&&(UA=!0),Ze!==null&&(Ze=Ze.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var fn=d,nn=re;Fe=p;var Sr=b;switch(nn.tag){case 1:if(fn=nn.payload,typeof fn=="function"){ot=fn.call(Sr,ot,Fe);break e}ot=fn;break e;case 3:fn.flags=fn.flags&-65537|128;case 0:if(fn=nn.payload,Fe=typeof fn=="function"?fn.call(Sr,ot,Fe):fn,Fe==null)break e;ot=u({},ot,Fe);break e;case 2:hd=!0}}Fe=re.callback,Fe!==null&&(d.flags|=64,ze&&(d.flags|=8192),ze=$.callbacks,ze===null?$.callbacks=[Fe]:ze.push(Fe))}else ze={lane:Fe,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Ze===null?(Ne=Ze=ze,ge=ot):Ze=Ze.next=ze,X|=Fe;if(re=re.next,re===null){if(re=$.shared.pending,re===null)break;ze=re,re=ze.next,ze.next=null,$.lastBaseUpdate=ze,$.shared.pending=null}}while(!0);Ze===null&&(ge=ot),$.baseState=ge,$.firstBaseUpdate=Ne,$.lastBaseUpdate=Ze,F===null&&($.shared.lanes=0),Ed|=X,d.lanes=X,d.memoizedState=ot}}function W5(d,p){if(typeof d!="function")throw Error(r(191,d));d.call(p)}function K5(d,p){var b=d.callbacks;if(b!==null)for(d.callbacks=null,d=0;d<b.length;d++)W5(b[d],p)}var ym=q(null),CC=q(0);function Y5(d,p){d=pu,Z(CC,d),Z(ym,p),pu=d|p.baseLanes}function GA(){Z(CC,pu),Z(ym,ym.current)}function qA(){pu=CC.current,Y(ym),Y(CC)}var yd=0,Rn=null,br=null,Oo=null,EC=!1,vm=!1,cp=!1,TC=0,bb=0,bm=null,cge=0;function bo(){throw Error(r(321))}function WA(d,p){if(p===null)return!1;for(var b=0;b<p.length&&b<d.length;b++)if(!ka(d[b],p[b]))return!1;return!0}function KA(d,p,b,T,$,F){return yd=F,Rn=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,L.H=d===null||d.memoizedState===null?DU:kU,cp=!1,F=b(T,$),cp=!1,vm&&(F=X5(p,b,T,$)),Q5(d),F}function Q5(d){L.H=RC;var p=br!==null&&br.next!==null;if(yd=0,Oo=br=Rn=null,EC=!1,bb=0,bm=null,p)throw Error(r(300));d===null||Jo||(d=d.dependencies,d!==null&&vC(d)&&(Jo=!0))}function X5(d,p,b,T){Rn=d;var $=0;do{if(vm&&(bm=null),bb=0,vm=!1,25<=$)throw Error(r(301));if($+=1,Oo=br=null,d.updateQueue!=null){var F=d.updateQueue;F.lastEffect=null,F.events=null,F.stores=null,F.memoCache!=null&&(F.memoCache.index=0)}L.H=gge,F=p(b,T)}while(vm);return F}function uge(){var d=L.H,p=d.useState()[0];return p=typeof p.then=="function"?xb(p):p,d=d.useState()[0],(br!==null?br.memoizedState:null)!==d&&(Rn.flags|=1024),p}function YA(){var d=TC!==0;return TC=0,d}function QA(d,p,b){p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~b}function XA(d){if(EC){for(d=d.memoizedState;d!==null;){var p=d.queue;p!==null&&(p.pending=null),d=d.next}EC=!1}yd=0,Oo=br=Rn=null,vm=!1,bb=TC=0,bm=null}function da(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oo===null?Rn.memoizedState=Oo=d:Oo=Oo.next=d,Oo}function Io(){if(br===null){var d=Rn.alternate;d=d!==null?d.memoizedState:null}else d=br.next;var p=Oo===null?Rn.memoizedState:Oo.next;if(p!==null)Oo=p,br=d;else{if(d===null)throw Rn.alternate===null?Error(r(467)):Error(r(310));br=d,d={memoizedState:br.memoizedState,baseState:br.baseState,baseQueue:br.baseQueue,queue:br.queue,next:null},Oo===null?Rn.memoizedState=Oo=d:Oo=Oo.next=d}return Oo}function JA(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xb(d){var p=bb;return bb+=1,bm===null&&(bm=[]),d=U5(bm,d,p),p=Rn,(Oo===null?p.memoizedState:Oo.next)===null&&(p=p.alternate,L.H=p===null||p.memoizedState===null?DU:kU),d}function OC(d){if(d!==null&&typeof d=="object"){if(typeof d.then=="function")return xb(d);if(d.$$typeof===E)return Pi(d)}throw Error(r(438,String(d)))}function ZA(d){var p=null,b=Rn.updateQueue;if(b!==null&&(p=b.memoCache),p==null){var T=Rn.alternate;T!==null&&(T=T.updateQueue,T!==null&&(T=T.memoCache,T!=null&&(p={data:T.data.map(function($){return $.slice()}),index:0})))}if(p==null&&(p={data:[],index:0}),b===null&&(b=JA(),Rn.updateQueue=b),b.memoCache=p,b=p.data[p.index],b===void 0)for(b=p.data[p.index]=Array(d),T=0;T<d;T++)b[T]=A;return p.index++,b}function su(d,p){return typeof p=="function"?p(d):p}function IC(d){var p=Io();return eM(p,br,d)}function eM(d,p,b){var T=d.queue;if(T===null)throw Error(r(311));T.lastRenderedReducer=b;var $=d.baseQueue,F=T.pending;if(F!==null){if($!==null){var X=$.next;$.next=F.next,F.next=X}p.baseQueue=$=F,T.pending=null}if(F=d.baseState,$===null)d.memoizedState=F;else{p=$.next;var re=X=null,ge=null,Ne=p,Ze=!1;do{var ot=Ne.lane&-536870913;if(ot!==Ne.lane?(qn&ot)===ot:(yd&ot)===ot){var Fe=Ne.revertLane;if(Fe===0)ge!==null&&(ge=ge.next={lane:0,revertLane:0,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),ot===mm&&(Ze=!0);else if((yd&Fe)===Fe){Ne=Ne.next,Fe===mm&&(Ze=!0);continue}else ot={lane:0,revertLane:Ne.revertLane,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},ge===null?(re=ge=ot,X=F):ge=ge.next=ot,Rn.lanes|=Fe,Ed|=Fe;ot=Ne.action,cp&&b(F,ot),F=Ne.hasEagerState?Ne.eagerState:b(F,ot)}else Fe={lane:ot,revertLane:Ne.revertLane,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},ge===null?(re=ge=Fe,X=F):ge=ge.next=Fe,Rn.lanes|=ot,Ed|=ot;Ne=Ne.next}while(Ne!==null&&Ne!==p);if(ge===null?X=F:ge.next=re,!ka(F,d.memoizedState)&&(Jo=!0,Ze&&(b=gm,b!==null)))throw b;d.memoizedState=F,d.baseState=X,d.baseQueue=ge,T.lastRenderedState=F}return $===null&&(T.lanes=0),[d.memoizedState,T.dispatch]}function tM(d){var p=Io(),b=p.queue;if(b===null)throw Error(r(311));b.lastRenderedReducer=d;var T=b.dispatch,$=b.pending,F=p.memoizedState;if($!==null){b.pending=null;var X=$=$.next;do F=d(F,X.action),X=X.next;while(X!==$);ka(F,p.memoizedState)||(Jo=!0),p.memoizedState=F,p.baseQueue===null&&(p.baseState=F),b.lastRenderedState=F}return[F,T]}function J5(d,p,b){var T=Rn,$=Io(),F=rr;if(F){if(b===void 0)throw Error(r(407));b=b()}else b=p();var X=!ka((br||$).memoizedState,b);X&&($.memoizedState=b,Jo=!0),$=$.queue;var re=tU.bind(null,T,$,d);if(Sb(2048,8,re,[d]),$.getSnapshot!==p||X||Oo!==null&&Oo.memoizedState.tag&1){if(T.flags|=2048,xm(9,PC(),eU.bind(null,T,$,b,p),null),Dr===null)throw Error(r(349));F||(yd&124)!==0||Z5(T,p,b)}return b}function Z5(d,p,b){d.flags|=16384,d={getSnapshot:p,value:b},p=Rn.updateQueue,p===null?(p=JA(),Rn.updateQueue=p,p.stores=[d]):(b=p.stores,b===null?p.stores=[d]:b.push(d))}function eU(d,p,b,T){p.value=b,p.getSnapshot=T,nU(p)&&rU(d)}function tU(d,p,b){return b(function(){nU(p)&&rU(d)})}function nU(d){var p=d.getSnapshot;d=d.value;try{var b=p();return!ka(d,b)}catch{return!0}}function rU(d){var p=dm(d,2);p!==null&&ja(p,d,2)}function nM(d){var p=da();if(typeof d=="function"){var b=d;if(d=b(),cp){ut(!0);try{b()}finally{ut(!1)}}}return p.memoizedState=p.baseState=d,p.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:su,lastRenderedState:d},p}function oU(d,p,b,T){return d.baseState=b,eM(d,br,typeof T=="function"?T:su)}function dge(d,p,b,T,$){if(MC(d))throw Error(r(485));if(d=p.action,d!==null){var F={payload:$,action:d,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(X){F.listeners.push(X)}};L.T!==null?b(!0):F.isTransition=!1,T(F),b=p.pending,b===null?(F.next=p.pending=F,iU(p,F)):(F.next=b.next,p.pending=b.next=F)}}function iU(d,p){var b=p.action,T=p.payload,$=d.state;if(p.isTransition){var F=L.T,X={};L.T=X;try{var re=b($,T),ge=L.S;ge!==null&&ge(X,re),aU(d,p,re)}catch(Ne){rM(d,p,Ne)}finally{L.T=F}}else try{F=b($,T),aU(d,p,F)}catch(Ne){rM(d,p,Ne)}}function aU(d,p,b){b!==null&&typeof b=="object"&&typeof b.then=="function"?b.then(function(T){sU(d,p,T)},function(T){return rM(d,p,T)}):sU(d,p,b)}function sU(d,p,b){p.status="fulfilled",p.value=b,lU(p),d.state=b,p=d.pending,p!==null&&(b=p.next,b===p?d.pending=null:(b=b.next,p.next=b,iU(d,b)))}function rM(d,p,b){var T=d.pending;if(d.pending=null,T!==null){T=T.next;do p.status="rejected",p.reason=b,lU(p),p=p.next;while(p!==T)}d.action=null}function lU(d){d=d.listeners;for(var p=0;p<d.length;p++)(0,d[p])()}function cU(d,p){return p}function uU(d,p){if(rr){var b=Dr.formState;if(b!==null){e:{var T=Rn;if(rr){if(io){t:{for(var $=io,F=oc;$.nodeType!==8;){if(!F){$=null;break t}if($=hl($.nextSibling),$===null){$=null;break t}}F=$.data,$=F==="F!"||F==="F"?$:null}if($){io=hl($.nextSibling),T=$.data==="F!";break e}}ip(T)}T=!1}T&&(p=b[0])}}return b=da(),b.memoizedState=b.baseState=p,T={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cU,lastRenderedState:p},b.queue=T,b=AU.bind(null,Rn,T),T.dispatch=b,T=nM(!1),F=lM.bind(null,Rn,!1,T.queue),T=da(),$={state:p,dispatch:null,action:d,pending:null},T.queue=$,b=dge.bind(null,Rn,$,F,b),$.dispatch=b,T.memoizedState=d,[p,b,!1]}function dU(d){var p=Io();return fU(p,br,d)}function fU(d,p,b){if(p=eM(d,p,cU)[0],d=IC(su)[0],typeof p=="object"&&p!==null&&typeof p.then=="function")try{var T=xb(p)}catch(X){throw X===hb?SC:X}else T=p;p=Io();var $=p.queue,F=$.dispatch;return b!==p.memoizedState&&(Rn.flags|=2048,xm(9,PC(),fge.bind(null,$,b),null)),[T,F,d]}function fge(d,p){d.action=p}function pU(d){var p=Io(),b=br;if(b!==null)return fU(p,b,d);Io(),p=p.memoizedState,b=Io();var T=b.queue.dispatch;return b.memoizedState=d,[p,T,!1]}function xm(d,p,b,T){return d={tag:d,create:b,deps:T,inst:p,next:null},p=Rn.updateQueue,p===null&&(p=JA(),Rn.updateQueue=p),b=p.lastEffect,b===null?p.lastEffect=d.next=d:(T=b.next,b.next=d,d.next=T,p.lastEffect=d),d}function PC(){return{destroy:void 0,resource:void 0}}function hU(){return Io().memoizedState}function AC(d,p,b,T){var $=da();T=T===void 0?null:T,Rn.flags|=d,$.memoizedState=xm(1|p,PC(),b,T)}function Sb(d,p,b,T){var $=Io();T=T===void 0?null:T;var F=$.memoizedState.inst;br!==null&&T!==null&&WA(T,br.memoizedState.deps)?$.memoizedState=xm(p,F,b,T):(Rn.flags|=d,$.memoizedState=xm(1|p,F,b,T))}function mU(d,p){AC(8390656,8,d,p)}function gU(d,p){Sb(2048,8,d,p)}function yU(d,p){return Sb(4,2,d,p)}function vU(d,p){return Sb(4,4,d,p)}function bU(d,p){if(typeof p=="function"){d=d();var b=p(d);return function(){typeof b=="function"?b():p(null)}}if(p!=null)return d=d(),p.current=d,function(){p.current=null}}function xU(d,p,b){b=b!=null?b.concat([d]):null,Sb(4,4,bU.bind(null,p,d),b)}function oM(){}function SU(d,p){var b=Io();p=p===void 0?null:p;var T=b.memoizedState;return p!==null&&WA(p,T[1])?T[0]:(b.memoizedState=[d,p],d)}function wU(d,p){var b=Io();p=p===void 0?null:p;var T=b.memoizedState;if(p!==null&&WA(p,T[1]))return T[0];if(T=d(),cp){ut(!0);try{d()}finally{ut(!1)}}return b.memoizedState=[T,p],T}function iM(d,p,b){return b===void 0||(yd&1073741824)!==0?d.memoizedState=p:(d.memoizedState=b,d=T4(),Rn.lanes|=d,Ed|=d,b)}function CU(d,p,b,T){return ka(b,p)?b:ym.current!==null?(d=iM(d,b,T),ka(d,p)||(Jo=!0),d):(yd&42)===0?(Jo=!0,d.memoizedState=b):(d=T4(),Rn.lanes|=d,Ed|=d,p)}function EU(d,p,b,T,$){var F=V.p;V.p=F!==0&&8>F?F:8;var X=L.T,re={};L.T=re,lM(d,!1,p,b);try{var ge=$(),Ne=L.S;if(Ne!==null&&Ne(re,ge),ge!==null&&typeof ge=="object"&&typeof ge.then=="function"){var Ze=lge(ge,T);wb(d,p,Ze,Fa(d))}else wb(d,p,T,Fa(d))}catch(ot){wb(d,p,{then:function(){},status:"rejected",reason:ot},Fa())}finally{V.p=F,L.T=X}}function pge(){}function aM(d,p,b,T){if(d.tag!==5)throw Error(r(476));var $=TU(d).queue;EU(d,$,p,W,b===null?pge:function(){return OU(d),b(T)})}function TU(d){var p=d.memoizedState;if(p!==null)return p;p={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:su,lastRenderedState:W},next:null};var b={};return p.next={memoizedState:b,baseState:b,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:su,lastRenderedState:b},next:null},d.memoizedState=p,d=d.alternate,d!==null&&(d.memoizedState=p),p}function OU(d){var p=TU(d).next.queue;wb(d,p,{},Fa())}function sM(){return Pi(Bb)}function IU(){return Io().memoizedState}function PU(){return Io().memoizedState}function hge(d){for(var p=d.return;p!==null;){switch(p.tag){case 24:case 3:var b=Fa();d=md(b);var T=gd(p,d,b);T!==null&&(ja(T,p,b),gb(T,p,b)),p={cache:LA()},d.payload=p;return}p=p.return}}function mge(d,p,b){var T=Fa();b={lane:T,revertLane:0,action:b,hasEagerState:!1,eagerState:null,next:null},MC(d)?MU(p,b):(b=IA(d,p,b,T),b!==null&&(ja(b,d,T),RU(b,p,T)))}function AU(d,p,b){var T=Fa();wb(d,p,b,T)}function wb(d,p,b,T){var $={lane:T,revertLane:0,action:b,hasEagerState:!1,eagerState:null,next:null};if(MC(d))MU(p,$);else{var F=d.alternate;if(d.lanes===0&&(F===null||F.lanes===0)&&(F=p.lastRenderedReducer,F!==null))try{var X=p.lastRenderedState,re=F(X,b);if($.hasEagerState=!0,$.eagerState=re,ka(re,X))return pC(d,p,$,0),Dr===null&&fC(),!1}catch{}finally{}if(b=IA(d,p,$,T),b!==null)return ja(b,d,T),RU(b,p,T),!0}return!1}function lM(d,p,b,T){if(T={lane:2,revertLane:BM(),action:T,hasEagerState:!1,eagerState:null,next:null},MC(d)){if(p)throw Error(r(479))}else p=IA(d,b,T,2),p!==null&&ja(p,d,2)}function MC(d){var p=d.alternate;return d===Rn||p!==null&&p===Rn}function MU(d,p){vm=EC=!0;var b=d.pending;b===null?p.next=p:(p.next=b.next,b.next=p),d.pending=p}function RU(d,p,b){if((b&4194048)!==0){var T=p.lanes;T&=d.pendingLanes,b|=T,p.lanes=b,oo(d,b)}}var RC={readContext:Pi,use:OC,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo},DU={readContext:Pi,use:OC,useCallback:function(d,p){return da().memoizedState=[d,p===void 0?null:p],d},useContext:Pi,useEffect:mU,useImperativeHandle:function(d,p,b){b=b!=null?b.concat([d]):null,AC(4194308,4,bU.bind(null,p,d),b)},useLayoutEffect:function(d,p){return AC(4194308,4,d,p)},useInsertionEffect:function(d,p){AC(4,2,d,p)},useMemo:function(d,p){var b=da();p=p===void 0?null:p;var T=d();if(cp){ut(!0);try{d()}finally{ut(!1)}}return b.memoizedState=[T,p],T},useReducer:function(d,p,b){var T=da();if(b!==void 0){var $=b(p);if(cp){ut(!0);try{b(p)}finally{ut(!1)}}}else $=p;return T.memoizedState=T.baseState=$,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:$},T.queue=d,d=d.dispatch=mge.bind(null,Rn,d),[T.memoizedState,d]},useRef:function(d){var p=da();return d={current:d},p.memoizedState=d},useState:function(d){d=nM(d);var p=d.queue,b=AU.bind(null,Rn,p);return p.dispatch=b,[d.memoizedState,b]},useDebugValue:oM,useDeferredValue:function(d,p){var b=da();return iM(b,d,p)},useTransition:function(){var d=nM(!1);return d=EU.bind(null,Rn,d.queue,!0,!1),da().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,p,b){var T=Rn,$=da();if(rr){if(b===void 0)throw Error(r(407));b=b()}else{if(b=p(),Dr===null)throw Error(r(349));(qn&124)!==0||Z5(T,p,b)}$.memoizedState=b;var F={value:b,getSnapshot:p};return $.queue=F,mU(tU.bind(null,T,F,d),[d]),T.flags|=2048,xm(9,PC(),eU.bind(null,T,F,b,p),null),b},useId:function(){var d=da(),p=Dr.identifierPrefix;if(rr){var b=ou,T=ru;b=(T&~(1<<32-Be(T)-1)).toString(32)+b,p="«"+p+"R"+b,b=TC++,0<b&&(p+="H"+b.toString(32)),p+="»"}else b=cge++,p="«"+p+"r"+b.toString(32)+"»";return d.memoizedState=p},useHostTransitionStatus:sM,useFormState:uU,useActionState:uU,useOptimistic:function(d){var p=da();p.memoizedState=p.baseState=d;var b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return p.queue=b,p=lM.bind(null,Rn,!0,b),b.dispatch=p,[d,p]},useMemoCache:ZA,useCacheRefresh:function(){return da().memoizedState=hge.bind(null,Rn)}},kU={readContext:Pi,use:OC,useCallback:SU,useContext:Pi,useEffect:gU,useImperativeHandle:xU,useInsertionEffect:yU,useLayoutEffect:vU,useMemo:wU,useReducer:IC,useRef:hU,useState:function(){return IC(su)},useDebugValue:oM,useDeferredValue:function(d,p){var b=Io();return CU(b,br.memoizedState,d,p)},useTransition:function(){var d=IC(su)[0],p=Io().memoizedState;return[typeof d=="boolean"?d:xb(d),p]},useSyncExternalStore:J5,useId:IU,useHostTransitionStatus:sM,useFormState:dU,useActionState:dU,useOptimistic:function(d,p){var b=Io();return oU(b,br,d,p)},useMemoCache:ZA,useCacheRefresh:PU},gge={readContext:Pi,use:OC,useCallback:SU,useContext:Pi,useEffect:gU,useImperativeHandle:xU,useInsertionEffect:yU,useLayoutEffect:vU,useMemo:wU,useReducer:tM,useRef:hU,useState:function(){return tM(su)},useDebugValue:oM,useDeferredValue:function(d,p){var b=Io();return br===null?iM(b,d,p):CU(b,br.memoizedState,d,p)},useTransition:function(){var d=tM(su)[0],p=Io().memoizedState;return[typeof d=="boolean"?d:xb(d),p]},useSyncExternalStore:J5,useId:IU,useHostTransitionStatus:sM,useFormState:pU,useActionState:pU,useOptimistic:function(d,p){var b=Io();return br!==null?oU(b,br,d,p):(b.baseState=d,[d,b.queue.dispatch])},useMemoCache:ZA,useCacheRefresh:PU},Sm=null,Cb=0;function DC(d){var p=Cb;return Cb+=1,Sm===null&&(Sm=[]),U5(Sm,d,p)}function Eb(d,p){p=p.props.ref,d.ref=p!==void 0?p:null}function kC(d,p){throw p.$$typeof===f?Error(r(525)):(d=Object.prototype.toString.call(p),Error(r(31,d==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":d)))}function _U(d){var p=d._init;return p(d._payload)}function $U(d){function p(Ae,we){if(d){var _e=Ae.deletions;_e===null?(Ae.deletions=[we],Ae.flags|=16):_e.push(we)}}function b(Ae,we){if(!d)return null;for(;we!==null;)p(Ae,we),we=we.sibling;return null}function T(Ae){for(var we=new Map;Ae!==null;)Ae.key!==null?we.set(Ae.key,Ae):we.set(Ae.index,Ae),Ae=Ae.sibling;return we}function $(Ae,we){return Ae=nu(Ae,we),Ae.index=0,Ae.sibling=null,Ae}function F(Ae,we,_e){return Ae.index=_e,d?(_e=Ae.alternate,_e!==null?(_e=_e.index,_e<we?(Ae.flags|=67108866,we):_e):(Ae.flags|=67108866,we)):(Ae.flags|=1048576,we)}function X(Ae){return d&&Ae.alternate===null&&(Ae.flags|=67108866),Ae}function re(Ae,we,_e,tt){return we===null||we.tag!==6?(we=AA(_e,Ae.mode,tt),we.return=Ae,we):(we=$(we,_e),we.return=Ae,we)}function ge(Ae,we,_e,tt){var Bt=_e.type;return Bt===g?Ze(Ae,we,_e.props.children,tt,_e.key):we!==null&&(we.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===D&&_U(Bt)===we.type)?(we=$(we,_e.props),Eb(we,_e),we.return=Ae,we):(we=mC(_e.type,_e.key,_e.props,null,Ae.mode,tt),Eb(we,_e),we.return=Ae,we)}function Ne(Ae,we,_e,tt){return we===null||we.tag!==4||we.stateNode.containerInfo!==_e.containerInfo||we.stateNode.implementation!==_e.implementation?(we=MA(_e,Ae.mode,tt),we.return=Ae,we):(we=$(we,_e.children||[]),we.return=Ae,we)}function Ze(Ae,we,_e,tt,Bt){return we===null||we.tag!==7?(we=tp(_e,Ae.mode,tt,Bt),we.return=Ae,we):(we=$(we,_e),we.return=Ae,we)}function ot(Ae,we,_e){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return we=AA(""+we,Ae.mode,_e),we.return=Ae,we;if(typeof we=="object"&&we!==null){switch(we.$$typeof){case h:return _e=mC(we.type,we.key,we.props,null,Ae.mode,_e),Eb(_e,we),_e.return=Ae,_e;case m:return we=MA(we,Ae.mode,_e),we.return=Ae,we;case D:var tt=we._init;return we=tt(we._payload),ot(Ae,we,_e)}if(j(we)||N(we))return we=tp(we,Ae.mode,_e,null),we.return=Ae,we;if(typeof we.then=="function")return ot(Ae,DC(we),_e);if(we.$$typeof===E)return ot(Ae,bC(Ae,we),_e);kC(Ae,we)}return null}function Fe(Ae,we,_e,tt){var Bt=we!==null?we.key:null;if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return Bt!==null?null:re(Ae,we,""+_e,tt);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case h:return _e.key===Bt?ge(Ae,we,_e,tt):null;case m:return _e.key===Bt?Ne(Ae,we,_e,tt):null;case D:return Bt=_e._init,_e=Bt(_e._payload),Fe(Ae,we,_e,tt)}if(j(_e)||N(_e))return Bt!==null?null:Ze(Ae,we,_e,tt,null);if(typeof _e.then=="function")return Fe(Ae,we,DC(_e),tt);if(_e.$$typeof===E)return Fe(Ae,we,bC(Ae,_e),tt);kC(Ae,_e)}return null}function ze(Ae,we,_e,tt,Bt){if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return Ae=Ae.get(_e)||null,re(we,Ae,""+tt,Bt);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case h:return Ae=Ae.get(tt.key===null?_e:tt.key)||null,ge(we,Ae,tt,Bt);case m:return Ae=Ae.get(tt.key===null?_e:tt.key)||null,Ne(we,Ae,tt,Bt);case D:var _n=tt._init;return tt=_n(tt._payload),ze(Ae,we,_e,tt,Bt)}if(j(tt)||N(tt))return Ae=Ae.get(_e)||null,Ze(we,Ae,tt,Bt,null);if(typeof tt.then=="function")return ze(Ae,we,_e,DC(tt),Bt);if(tt.$$typeof===E)return ze(Ae,we,_e,bC(we,tt),Bt);kC(we,tt)}return null}function fn(Ae,we,_e,tt){for(var Bt=null,_n=null,qt=we,an=we=0,ei=null;qt!==null&&an<_e.length;an++){qt.index>an?(ei=qt,qt=null):ei=qt.sibling;var Jn=Fe(Ae,qt,_e[an],tt);if(Jn===null){qt===null&&(qt=ei);break}d&&qt&&Jn.alternate===null&&p(Ae,qt),we=F(Jn,we,an),_n===null?Bt=Jn:_n.sibling=Jn,_n=Jn,qt=ei}if(an===_e.length)return b(Ae,qt),rr&&rp(Ae,an),Bt;if(qt===null){for(;an<_e.length;an++)qt=ot(Ae,_e[an],tt),qt!==null&&(we=F(qt,we,an),_n===null?Bt=qt:_n.sibling=qt,_n=qt);return rr&&rp(Ae,an),Bt}for(qt=T(qt);an<_e.length;an++)ei=ze(qt,Ae,an,_e[an],tt),ei!==null&&(d&&ei.alternate!==null&&qt.delete(ei.key===null?an:ei.key),we=F(ei,we,an),_n===null?Bt=ei:_n.sibling=ei,_n=ei);return d&&qt.forEach(function(kd){return p(Ae,kd)}),rr&&rp(Ae,an),Bt}function nn(Ae,we,_e,tt){if(_e==null)throw Error(r(151));for(var Bt=null,_n=null,qt=we,an=we=0,ei=null,Jn=_e.next();qt!==null&&!Jn.done;an++,Jn=_e.next()){qt.index>an?(ei=qt,qt=null):ei=qt.sibling;var kd=Fe(Ae,qt,Jn.value,tt);if(kd===null){qt===null&&(qt=ei);break}d&&qt&&kd.alternate===null&&p(Ae,qt),we=F(kd,we,an),_n===null?Bt=kd:_n.sibling=kd,_n=kd,qt=ei}if(Jn.done)return b(Ae,qt),rr&&rp(Ae,an),Bt;if(qt===null){for(;!Jn.done;an++,Jn=_e.next())Jn=ot(Ae,Jn.value,tt),Jn!==null&&(we=F(Jn,we,an),_n===null?Bt=Jn:_n.sibling=Jn,_n=Jn);return rr&&rp(Ae,an),Bt}for(qt=T(qt);!Jn.done;an++,Jn=_e.next())Jn=ze(qt,Ae,an,Jn.value,tt),Jn!==null&&(d&&Jn.alternate!==null&&qt.delete(Jn.key===null?an:Jn.key),we=F(Jn,we,an),_n===null?Bt=Jn:_n.sibling=Jn,_n=Jn);return d&&qt.forEach(function(yye){return p(Ae,yye)}),rr&&rp(Ae,an),Bt}function Sr(Ae,we,_e,tt){if(typeof _e=="object"&&_e!==null&&_e.type===g&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case h:e:{for(var Bt=_e.key;we!==null;){if(we.key===Bt){if(Bt=_e.type,Bt===g){if(we.tag===7){b(Ae,we.sibling),tt=$(we,_e.props.children),tt.return=Ae,Ae=tt;break e}}else if(we.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===D&&_U(Bt)===we.type){b(Ae,we.sibling),tt=$(we,_e.props),Eb(tt,_e),tt.return=Ae,Ae=tt;break e}b(Ae,we);break}else p(Ae,we);we=we.sibling}_e.type===g?(tt=tp(_e.props.children,Ae.mode,tt,_e.key),tt.return=Ae,Ae=tt):(tt=mC(_e.type,_e.key,_e.props,null,Ae.mode,tt),Eb(tt,_e),tt.return=Ae,Ae=tt)}return X(Ae);case m:e:{for(Bt=_e.key;we!==null;){if(we.key===Bt)if(we.tag===4&&we.stateNode.containerInfo===_e.containerInfo&&we.stateNode.implementation===_e.implementation){b(Ae,we.sibling),tt=$(we,_e.children||[]),tt.return=Ae,Ae=tt;break e}else{b(Ae,we);break}else p(Ae,we);we=we.sibling}tt=MA(_e,Ae.mode,tt),tt.return=Ae,Ae=tt}return X(Ae);case D:return Bt=_e._init,_e=Bt(_e._payload),Sr(Ae,we,_e,tt)}if(j(_e))return fn(Ae,we,_e,tt);if(N(_e)){if(Bt=N(_e),typeof Bt!="function")throw Error(r(150));return _e=Bt.call(_e),nn(Ae,we,_e,tt)}if(typeof _e.then=="function")return Sr(Ae,we,DC(_e),tt);if(_e.$$typeof===E)return Sr(Ae,we,bC(Ae,_e),tt);kC(Ae,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint"?(_e=""+_e,we!==null&&we.tag===6?(b(Ae,we.sibling),tt=$(we,_e),tt.return=Ae,Ae=tt):(b(Ae,we),tt=AA(_e,Ae.mode,tt),tt.return=Ae,Ae=tt),X(Ae)):b(Ae,we)}return function(Ae,we,_e,tt){try{Cb=0;var Bt=Sr(Ae,we,_e,tt);return Sm=null,Bt}catch(qt){if(qt===hb||qt===SC)throw qt;var _n=_a(29,qt,null,Ae.mode);return _n.lanes=tt,_n.return=Ae,_n}finally{}}}var wm=$U(!0),NU=$U(!1),Ss=q(null),ic=null;function vd(d){var p=d.alternate;Z(No,No.current&1),Z(Ss,d),ic===null&&(p===null||ym.current!==null||p.memoizedState!==null)&&(ic=d)}function LU(d){if(d.tag===22){if(Z(No,No.current),Z(Ss,d),ic===null){var p=d.alternate;p!==null&&p.memoizedState!==null&&(ic=d)}}else bd()}function bd(){Z(No,No.current),Z(Ss,Ss.current)}function lu(d){Y(Ss),ic===d&&(ic=null),Y(No)}var No=q(0);function _C(d){for(var p=d;p!==null;){if(p.tag===13){var b=p.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||b.data==="$?"||JM(b)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}function cM(d,p,b,T){p=d.memoizedState,b=b(T,p),b=b==null?p:u({},p,b),d.memoizedState=b,d.lanes===0&&(d.updateQueue.baseState=b)}var uM={enqueueSetState:function(d,p,b){d=d._reactInternals;var T=Fa(),$=md(T);$.payload=p,b!=null&&($.callback=b),p=gd(d,$,T),p!==null&&(ja(p,d,T),gb(p,d,T))},enqueueReplaceState:function(d,p,b){d=d._reactInternals;var T=Fa(),$=md(T);$.tag=1,$.payload=p,b!=null&&($.callback=b),p=gd(d,$,T),p!==null&&(ja(p,d,T),gb(p,d,T))},enqueueForceUpdate:function(d,p){d=d._reactInternals;var b=Fa(),T=md(b);T.tag=2,p!=null&&(T.callback=p),p=gd(d,T,b),p!==null&&(ja(p,d,b),gb(p,d,b))}};function FU(d,p,b,T,$,F,X){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(T,F,X):p.prototype&&p.prototype.isPureReactComponent?!ab(b,T)||!ab($,F):!0}function jU(d,p,b,T){d=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(b,T),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(b,T),p.state!==d&&uM.enqueueReplaceState(p,p.state,null)}function up(d,p){var b=p;if("ref"in p){b={};for(var T in p)T!=="ref"&&(b[T]=p[T])}if(d=d.defaultProps){b===p&&(b=u({},b));for(var $ in d)b[$]===void 0&&(b[$]=d[$])}return b}var $C=typeof reportError=="function"?reportError:function(d){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var p=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof d=="object"&&d!==null&&typeof d.message=="string"?String(d.message):String(d),error:d});if(!window.dispatchEvent(p))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",d);return}console.error(d)};function BU(d){$C(d)}function zU(d){console.error(d)}function VU(d){$C(d)}function NC(d,p){try{var b=d.onUncaughtError;b(p.value,{componentStack:p.stack})}catch(T){setTimeout(function(){throw T})}}function HU(d,p,b){try{var T=d.onCaughtError;T(b.value,{componentStack:b.stack,errorBoundary:p.tag===1?p.stateNode:null})}catch($){setTimeout(function(){throw $})}}function dM(d,p,b){return b=md(b),b.tag=3,b.payload={element:null},b.callback=function(){NC(d,p)},b}function UU(d){return d=md(d),d.tag=3,d}function GU(d,p,b,T){var $=b.type.getDerivedStateFromError;if(typeof $=="function"){var F=T.value;d.payload=function(){return $(F)},d.callback=function(){HU(p,b,T)}}var X=b.stateNode;X!==null&&typeof X.componentDidCatch=="function"&&(d.callback=function(){HU(p,b,T),typeof $!="function"&&(Td===null?Td=new Set([this]):Td.add(this));var re=T.stack;this.componentDidCatch(T.value,{componentStack:re!==null?re:""})})}function yge(d,p,b,T,$){if(b.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){if(p=b.alternate,p!==null&&db(p,b,$,!0),b=Ss.current,b!==null){switch(b.tag){case 13:return ic===null?$M():b.alternate===null&&ao===0&&(ao=3),b.flags&=-257,b.flags|=65536,b.lanes=$,T===BA?b.flags|=16384:(p=b.updateQueue,p===null?b.updateQueue=new Set([T]):p.add(T),LM(d,T,$)),!1;case 22:return b.flags|=65536,T===BA?b.flags|=16384:(p=b.updateQueue,p===null?(p={transitions:null,markerInstances:null,retryQueue:new Set([T])},b.updateQueue=p):(b=p.retryQueue,b===null?p.retryQueue=new Set([T]):b.add(T)),LM(d,T,$)),!1}throw Error(r(435,b.tag))}return LM(d,T,$),$M(),!1}if(rr)return p=Ss.current,p!==null?((p.flags&65536)===0&&(p.flags|=256),p.flags|=65536,p.lanes=$,T!==kA&&(d=Error(r(422),{cause:T}),ub(ys(d,b)))):(T!==kA&&(p=Error(r(423),{cause:T}),ub(ys(p,b))),d=d.current.alternate,d.flags|=65536,$&=-$,d.lanes|=$,T=ys(T,b),$=dM(d.stateNode,T,$),HA(d,$),ao!==4&&(ao=2)),!1;var F=Error(r(520),{cause:T});if(F=ys(F,b),Rb===null?Rb=[F]:Rb.push(F),ao!==4&&(ao=2),p===null)return!0;T=ys(T,b),b=p;do{switch(b.tag){case 3:return b.flags|=65536,d=$&-$,b.lanes|=d,d=dM(b.stateNode,T,d),HA(b,d),!1;case 1:if(p=b.type,F=b.stateNode,(b.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(Td===null||!Td.has(F))))return b.flags|=65536,$&=-$,b.lanes|=$,$=UU($),GU($,d,b,T),HA(b,$),!1}b=b.return}while(b!==null);return!1}var qU=Error(r(461)),Jo=!1;function pi(d,p,b,T){p.child=d===null?NU(p,null,b,T):wm(p,d.child,b,T)}function WU(d,p,b,T,$){b=b.render;var F=p.ref;if("ref"in T){var X={};for(var re in T)re!=="ref"&&(X[re]=T[re])}else X=T;return sp(p),T=KA(d,p,b,X,F,$),re=YA(),d!==null&&!Jo?(QA(d,p,$),cu(d,p,$)):(rr&&re&&RA(p),p.flags|=1,pi(d,p,T,$),p.child)}function KU(d,p,b,T,$){if(d===null){var F=b.type;return typeof F=="function"&&!PA(F)&&F.defaultProps===void 0&&b.compare===null?(p.tag=15,p.type=F,YU(d,p,F,T,$)):(d=mC(b.type,null,T,p,p.mode,$),d.ref=p.ref,d.return=p,p.child=d)}if(F=d.child,!bM(d,$)){var X=F.memoizedProps;if(b=b.compare,b=b!==null?b:ab,b(X,T)&&d.ref===p.ref)return cu(d,p,$)}return p.flags|=1,d=nu(F,T),d.ref=p.ref,d.return=p,p.child=d}function YU(d,p,b,T,$){if(d!==null){var F=d.memoizedProps;if(ab(F,T)&&d.ref===p.ref)if(Jo=!1,p.pendingProps=T=F,bM(d,$))(d.flags&131072)!==0&&(Jo=!0);else return p.lanes=d.lanes,cu(d,p,$)}return fM(d,p,b,T,$)}function QU(d,p,b){var T=p.pendingProps,$=T.children,F=d!==null?d.memoizedState:null;if(T.mode==="hidden"){if((p.flags&128)!==0){if(T=F!==null?F.baseLanes|b:b,d!==null){for($=p.child=d.child,F=0;$!==null;)F=F|$.lanes|$.childLanes,$=$.sibling;p.childLanes=F&~T}else p.childLanes=0,p.child=null;return XU(d,p,T,b)}if((b&536870912)!==0)p.memoizedState={baseLanes:0,cachePool:null},d!==null&&xC(p,F!==null?F.cachePool:null),F!==null?Y5(p,F):GA(),LU(p);else return p.lanes=p.childLanes=536870912,XU(d,p,F!==null?F.baseLanes|b:b,b)}else F!==null?(xC(p,F.cachePool),Y5(p,F),bd(),p.memoizedState=null):(d!==null&&xC(p,null),GA(),bd());return pi(d,p,$,b),p.child}function XU(d,p,b,T){var $=jA();return $=$===null?null:{parent:$o._currentValue,pool:$},p.memoizedState={baseLanes:b,cachePool:$},d!==null&&xC(p,null),GA(),LU(p),d!==null&&db(d,p,T,!0),null}function LC(d,p){var b=p.ref;if(b===null)d!==null&&d.ref!==null&&(p.flags|=4194816);else{if(typeof b!="function"&&typeof b!="object")throw Error(r(284));(d===null||d.ref!==b)&&(p.flags|=4194816)}}function fM(d,p,b,T,$){return sp(p),b=KA(d,p,b,T,void 0,$),T=YA(),d!==null&&!Jo?(QA(d,p,$),cu(d,p,$)):(rr&&T&&RA(p),p.flags|=1,pi(d,p,b,$),p.child)}function JU(d,p,b,T,$,F){return sp(p),p.updateQueue=null,b=X5(p,T,b,$),Q5(d),T=YA(),d!==null&&!Jo?(QA(d,p,F),cu(d,p,F)):(rr&&T&&RA(p),p.flags|=1,pi(d,p,b,F),p.child)}function ZU(d,p,b,T,$){if(sp(p),p.stateNode===null){var F=fm,X=b.contextType;typeof X=="object"&&X!==null&&(F=Pi(X)),F=new b(T,F),p.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,F.updater=uM,p.stateNode=F,F._reactInternals=p,F=p.stateNode,F.props=T,F.state=p.memoizedState,F.refs={},zA(p),X=b.contextType,F.context=typeof X=="object"&&X!==null?Pi(X):fm,F.state=p.memoizedState,X=b.getDerivedStateFromProps,typeof X=="function"&&(cM(p,b,X,T),F.state=p.memoizedState),typeof b.getDerivedStateFromProps=="function"||typeof F.getSnapshotBeforeUpdate=="function"||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(X=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),X!==F.state&&uM.enqueueReplaceState(F,F.state,null),vb(p,T,F,$),yb(),F.state=p.memoizedState),typeof F.componentDidMount=="function"&&(p.flags|=4194308),T=!0}else if(d===null){F=p.stateNode;var re=p.memoizedProps,ge=up(b,re);F.props=ge;var Ne=F.context,Ze=b.contextType;X=fm,typeof Ze=="object"&&Ze!==null&&(X=Pi(Ze));var ot=b.getDerivedStateFromProps;Ze=typeof ot=="function"||typeof F.getSnapshotBeforeUpdate=="function",re=p.pendingProps!==re,Ze||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(re||Ne!==X)&&jU(p,F,T,X),hd=!1;var Fe=p.memoizedState;F.state=Fe,vb(p,T,F,$),yb(),Ne=p.memoizedState,re||Fe!==Ne||hd?(typeof ot=="function"&&(cM(p,b,ot,T),Ne=p.memoizedState),(ge=hd||FU(p,b,ge,T,Fe,Ne,X))?(Ze||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(p.flags|=4194308)):(typeof F.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=T,p.memoizedState=Ne),F.props=T,F.state=Ne,F.context=X,T=ge):(typeof F.componentDidMount=="function"&&(p.flags|=4194308),T=!1)}else{F=p.stateNode,VA(d,p),X=p.memoizedProps,Ze=up(b,X),F.props=Ze,ot=p.pendingProps,Fe=F.context,Ne=b.contextType,ge=fm,typeof Ne=="object"&&Ne!==null&&(ge=Pi(Ne)),re=b.getDerivedStateFromProps,(Ne=typeof re=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(X!==ot||Fe!==ge)&&jU(p,F,T,ge),hd=!1,Fe=p.memoizedState,F.state=Fe,vb(p,T,F,$),yb();var ze=p.memoizedState;X!==ot||Fe!==ze||hd||d!==null&&d.dependencies!==null&&vC(d.dependencies)?(typeof re=="function"&&(cM(p,b,re,T),ze=p.memoizedState),(Ze=hd||FU(p,b,Ze,T,Fe,ze,ge)||d!==null&&d.dependencies!==null&&vC(d.dependencies))?(Ne||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(T,ze,ge),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(T,ze,ge)),typeof F.componentDidUpdate=="function"&&(p.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof F.componentDidUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(p.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(p.flags|=1024),p.memoizedProps=T,p.memoizedState=ze),F.props=T,F.state=ze,F.context=ge,T=Ze):(typeof F.componentDidUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(p.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(p.flags|=1024),T=!1)}return F=T,LC(d,p),T=(p.flags&128)!==0,F||T?(F=p.stateNode,b=T&&typeof b.getDerivedStateFromError!="function"?null:F.render(),p.flags|=1,d!==null&&T?(p.child=wm(p,d.child,null,$),p.child=wm(p,null,b,$)):pi(d,p,b,$),p.memoizedState=F.state,d=p.child):d=cu(d,p,$),d}function e4(d,p,b,T){return cb(),p.flags|=256,pi(d,p,b,T),p.child}var pM={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hM(d){return{baseLanes:d,cachePool:z5()}}function mM(d,p,b){return d=d!==null?d.childLanes&~b:0,p&&(d|=ws),d}function t4(d,p,b){var T=p.pendingProps,$=!1,F=(p.flags&128)!==0,X;if((X=F)||(X=d!==null&&d.memoizedState===null?!1:(No.current&2)!==0),X&&($=!0,p.flags&=-129),X=(p.flags&32)!==0,p.flags&=-33,d===null){if(rr){if($?vd(p):bd(),rr){var re=io,ge;if(ge=re){e:{for(ge=re,re=oc;ge.nodeType!==8;){if(!re){re=null;break e}if(ge=hl(ge.nextSibling),ge===null){re=null;break e}}re=ge}re!==null?(p.memoizedState={dehydrated:re,treeContext:np!==null?{id:ru,overflow:ou}:null,retryLane:536870912,hydrationErrors:null},ge=_a(18,null,null,0),ge.stateNode=re,ge.return=p,p.child=ge,Ui=p,io=null,ge=!0):ge=!1}ge||ip(p)}if(re=p.memoizedState,re!==null&&(re=re.dehydrated,re!==null))return JM(re)?p.lanes=32:p.lanes=536870912,null;lu(p)}return re=T.children,T=T.fallback,$?(bd(),$=p.mode,re=FC({mode:"hidden",children:re},$),T=tp(T,$,b,null),re.return=p,T.return=p,re.sibling=T,p.child=re,$=p.child,$.memoizedState=hM(b),$.childLanes=mM(d,X,b),p.memoizedState=pM,T):(vd(p),gM(p,re))}if(ge=d.memoizedState,ge!==null&&(re=ge.dehydrated,re!==null)){if(F)p.flags&256?(vd(p),p.flags&=-257,p=yM(d,p,b)):p.memoizedState!==null?(bd(),p.child=d.child,p.flags|=128,p=null):(bd(),$=T.fallback,re=p.mode,T=FC({mode:"visible",children:T.children},re),$=tp($,re,b,null),$.flags|=2,T.return=p,$.return=p,T.sibling=$,p.child=T,wm(p,d.child,null,b),T=p.child,T.memoizedState=hM(b),T.childLanes=mM(d,X,b),p.memoizedState=pM,p=$);else if(vd(p),JM(re)){if(X=re.nextSibling&&re.nextSibling.dataset,X)var Ne=X.dgst;X=Ne,T=Error(r(419)),T.stack="",T.digest=X,ub({value:T,source:null,stack:null}),p=yM(d,p,b)}else if(Jo||db(d,p,b,!1),X=(b&d.childLanes)!==0,Jo||X){if(X=Dr,X!==null&&(T=b&-b,T=(T&42)!==0?1:Oi(T),T=(T&(X.suspendedLanes|b))!==0?0:T,T!==0&&T!==ge.retryLane))throw ge.retryLane=T,dm(d,T),ja(X,d,T),qU;re.data==="$?"||$M(),p=yM(d,p,b)}else re.data==="$?"?(p.flags|=192,p.child=d.child,p=null):(d=ge.treeContext,io=hl(re.nextSibling),Ui=p,rr=!0,op=null,oc=!1,d!==null&&(bs[xs++]=ru,bs[xs++]=ou,bs[xs++]=np,ru=d.id,ou=d.overflow,np=p),p=gM(p,T.children),p.flags|=4096);return p}return $?(bd(),$=T.fallback,re=p.mode,ge=d.child,Ne=ge.sibling,T=nu(ge,{mode:"hidden",children:T.children}),T.subtreeFlags=ge.subtreeFlags&65011712,Ne!==null?$=nu(Ne,$):($=tp($,re,b,null),$.flags|=2),$.return=p,T.return=p,T.sibling=$,p.child=T,T=$,$=p.child,re=d.child.memoizedState,re===null?re=hM(b):(ge=re.cachePool,ge!==null?(Ne=$o._currentValue,ge=ge.parent!==Ne?{parent:Ne,pool:Ne}:ge):ge=z5(),re={baseLanes:re.baseLanes|b,cachePool:ge}),$.memoizedState=re,$.childLanes=mM(d,X,b),p.memoizedState=pM,T):(vd(p),b=d.child,d=b.sibling,b=nu(b,{mode:"visible",children:T.children}),b.return=p,b.sibling=null,d!==null&&(X=p.deletions,X===null?(p.deletions=[d],p.flags|=16):X.push(d)),p.child=b,p.memoizedState=null,b)}function gM(d,p){return p=FC({mode:"visible",children:p},d.mode),p.return=d,d.child=p}function FC(d,p){return d=_a(22,d,null,p),d.lanes=0,d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},d}function yM(d,p,b){return wm(p,d.child,null,b),d=gM(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function n4(d,p,b){d.lanes|=p;var T=d.alternate;T!==null&&(T.lanes|=p),$A(d.return,p,b)}function vM(d,p,b,T,$){var F=d.memoizedState;F===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:T,tail:b,tailMode:$}:(F.isBackwards=p,F.rendering=null,F.renderingStartTime=0,F.last=T,F.tail=b,F.tailMode=$)}function r4(d,p,b){var T=p.pendingProps,$=T.revealOrder,F=T.tail;if(pi(d,p,T.children,b),T=No.current,(T&2)!==0)T=T&1|2,p.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=p.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&n4(d,b,p);else if(d.tag===19)n4(d,b,p);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===p)break e;for(;d.sibling===null;){if(d.return===null||d.return===p)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}T&=1}switch(Z(No,T),$){case"forwards":for(b=p.child,$=null;b!==null;)d=b.alternate,d!==null&&_C(d)===null&&($=b),b=b.sibling;b=$,b===null?($=p.child,p.child=null):($=b.sibling,b.sibling=null),vM(p,!1,$,b,F);break;case"backwards":for(b=null,$=p.child,p.child=null;$!==null;){if(d=$.alternate,d!==null&&_C(d)===null){p.child=$;break}d=$.sibling,$.sibling=b,b=$,$=d}vM(p,!0,b,null,F);break;case"together":vM(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function cu(d,p,b){if(d!==null&&(p.dependencies=d.dependencies),Ed|=p.lanes,(b&p.childLanes)===0)if(d!==null){if(db(d,p,b,!1),(b&p.childLanes)===0)return null}else return null;if(d!==null&&p.child!==d.child)throw Error(r(153));if(p.child!==null){for(d=p.child,b=nu(d,d.pendingProps),p.child=b,b.return=p;d.sibling!==null;)d=d.sibling,b=b.sibling=nu(d,d.pendingProps),b.return=p;b.sibling=null}return p.child}function bM(d,p){return(d.lanes&p)!==0?!0:(d=d.dependencies,!!(d!==null&&vC(d)))}function vge(d,p,b){switch(p.tag){case 3:Se(p,p.stateNode.containerInfo),pd(p,$o,d.memoizedState.cache),cb();break;case 27:case 5:le(p);break;case 4:Se(p,p.stateNode.containerInfo);break;case 10:pd(p,p.type,p.memoizedProps.value);break;case 13:var T=p.memoizedState;if(T!==null)return T.dehydrated!==null?(vd(p),p.flags|=128,null):(b&p.child.childLanes)!==0?t4(d,p,b):(vd(p),d=cu(d,p,b),d!==null?d.sibling:null);vd(p);break;case 19:var $=(d.flags&128)!==0;if(T=(b&p.childLanes)!==0,T||(db(d,p,b,!1),T=(b&p.childLanes)!==0),$){if(T)return r4(d,p,b);p.flags|=128}if($=p.memoizedState,$!==null&&($.rendering=null,$.tail=null,$.lastEffect=null),Z(No,No.current),T)break;return null;case 22:case 23:return p.lanes=0,QU(d,p,b);case 24:pd(p,$o,d.memoizedState.cache)}return cu(d,p,b)}function o4(d,p,b){if(d!==null)if(d.memoizedProps!==p.pendingProps)Jo=!0;else{if(!bM(d,b)&&(p.flags&128)===0)return Jo=!1,vge(d,p,b);Jo=(d.flags&131072)!==0}else Jo=!1,rr&&(p.flags&1048576)!==0&&_5(p,yC,p.index);switch(p.lanes=0,p.tag){case 16:e:{d=p.pendingProps;var T=p.elementType,$=T._init;if(T=$(T._payload),p.type=T,typeof T=="function")PA(T)?(d=up(T,d),p.tag=1,p=ZU(null,p,T,d,b)):(p.tag=0,p=fM(null,p,T,d,b));else{if(T!=null){if($=T.$$typeof,$===I){p.tag=11,p=WU(null,p,T,d,b);break e}else if($===R){p.tag=14,p=KU(null,p,T,d,b);break e}}throw p=H(T)||T,Error(r(306,p,""))}}return p;case 0:return fM(d,p,p.type,p.pendingProps,b);case 1:return T=p.type,$=up(T,p.pendingProps),ZU(d,p,T,$,b);case 3:e:{if(Se(p,p.stateNode.containerInfo),d===null)throw Error(r(387));T=p.pendingProps;var F=p.memoizedState;$=F.element,VA(d,p),vb(p,T,null,b);var X=p.memoizedState;if(T=X.cache,pd(p,$o,T),T!==F.cache&&NA(p,[$o],b,!0),yb(),T=X.element,F.isDehydrated)if(F={element:T,isDehydrated:!1,cache:X.cache},p.updateQueue.baseState=F,p.memoizedState=F,p.flags&256){p=e4(d,p,T,b);break e}else if(T!==$){$=ys(Error(r(424)),p),ub($),p=e4(d,p,T,b);break e}else{switch(d=p.stateNode.containerInfo,d.nodeType){case 9:d=d.body;break;default:d=d.nodeName==="HTML"?d.ownerDocument.body:d}for(io=hl(d.firstChild),Ui=p,rr=!0,op=null,oc=!0,b=NU(p,null,T,b),p.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling}else{if(cb(),T===$){p=cu(d,p,b);break e}pi(d,p,T,b)}p=p.child}return p;case 26:return LC(d,p),d===null?(b=l3(p.type,null,p.pendingProps,null))?p.memoizedState=b:rr||(b=p.type,d=p.pendingProps,T=JC(ce.current).createElement(b),T[Ut]=p,T[Xt]=d,mi(T,b,d),He(T),p.stateNode=T):p.memoizedState=l3(p.type,d.memoizedProps,p.pendingProps,d.memoizedState),null;case 27:return le(p),d===null&&rr&&(T=p.stateNode=i3(p.type,p.pendingProps,ce.current),Ui=p,oc=!0,$=io,Pd(p.type)?(ZM=$,io=hl(T.firstChild)):io=$),pi(d,p,p.pendingProps.children,b),LC(d,p),d===null&&(p.flags|=4194304),p.child;case 5:return d===null&&rr&&(($=T=io)&&(T=qge(T,p.type,p.pendingProps,oc),T!==null?(p.stateNode=T,Ui=p,io=hl(T.firstChild),oc=!1,$=!0):$=!1),$||ip(p)),le(p),$=p.type,F=p.pendingProps,X=d!==null?d.memoizedProps:null,T=F.children,YM($,F)?T=null:X!==null&&YM($,X)&&(p.flags|=32),p.memoizedState!==null&&($=KA(d,p,uge,null,null,b),Bb._currentValue=$),LC(d,p),pi(d,p,T,b),p.child;case 6:return d===null&&rr&&((d=b=io)&&(b=Wge(b,p.pendingProps,oc),b!==null?(p.stateNode=b,Ui=p,io=null,d=!0):d=!1),d||ip(p)),null;case 13:return t4(d,p,b);case 4:return Se(p,p.stateNode.containerInfo),T=p.pendingProps,d===null?p.child=wm(p,null,T,b):pi(d,p,T,b),p.child;case 11:return WU(d,p,p.type,p.pendingProps,b);case 7:return pi(d,p,p.pendingProps,b),p.child;case 8:return pi(d,p,p.pendingProps.children,b),p.child;case 12:return pi(d,p,p.pendingProps.children,b),p.child;case 10:return T=p.pendingProps,pd(p,p.type,T.value),pi(d,p,T.children,b),p.child;case 9:return $=p.type._context,T=p.pendingProps.children,sp(p),$=Pi($),T=T($),p.flags|=1,pi(d,p,T,b),p.child;case 14:return KU(d,p,p.type,p.pendingProps,b);case 15:return YU(d,p,p.type,p.pendingProps,b);case 19:return r4(d,p,b);case 31:return T=p.pendingProps,b=p.mode,T={mode:T.mode,children:T.children},d===null?(b=FC(T,b),b.ref=p.ref,p.child=b,b.return=p,p=b):(b=nu(d.child,T),b.ref=p.ref,p.child=b,b.return=p,p=b),p;case 22:return QU(d,p,b);case 24:return sp(p),T=Pi($o),d===null?($=jA(),$===null&&($=Dr,F=LA(),$.pooledCache=F,F.refCount++,F!==null&&($.pooledCacheLanes|=b),$=F),p.memoizedState={parent:T,cache:$},zA(p),pd(p,$o,$)):((d.lanes&b)!==0&&(VA(d,p),vb(p,null,null,b),yb()),$=d.memoizedState,F=p.memoizedState,$.parent!==T?($={parent:T,cache:T},p.memoizedState=$,p.lanes===0&&(p.memoizedState=p.updateQueue.baseState=$),pd(p,$o,T)):(T=F.cache,pd(p,$o,T),T!==$.cache&&NA(p,[$o],b,!0))),pi(d,p,p.pendingProps.children,b),p.child;case 29:throw p.pendingProps}throw Error(r(156,p.tag))}function uu(d){d.flags|=4}function i4(d,p){if(p.type!=="stylesheet"||(p.state.loading&4)!==0)d.flags&=-16777217;else if(d.flags|=16777216,!p3(p)){if(p=Ss.current,p!==null&&((qn&4194048)===qn?ic!==null:(qn&62914560)!==qn&&(qn&536870912)===0||p!==ic))throw mb=BA,V5;d.flags|=8192}}function jC(d,p){p!==null&&(d.flags|=4),d.flags&16384&&(p=d.tag!==22?Rr():536870912,d.lanes|=p,Om|=p)}function Tb(d,p){if(!rr)switch(d.tailMode){case"hidden":p=d.tail;for(var b=null;p!==null;)p.alternate!==null&&(b=p),p=p.sibling;b===null?d.tail=null:b.sibling=null;break;case"collapsed":b=d.tail;for(var T=null;b!==null;)b.alternate!==null&&(T=b),b=b.sibling;T===null?p||d.tail===null?d.tail=null:d.tail.sibling=null:T.sibling=null}}function Zr(d){var p=d.alternate!==null&&d.alternate.child===d.child,b=0,T=0;if(p)for(var $=d.child;$!==null;)b|=$.lanes|$.childLanes,T|=$.subtreeFlags&65011712,T|=$.flags&65011712,$.return=d,$=$.sibling;else for($=d.child;$!==null;)b|=$.lanes|$.childLanes,T|=$.subtreeFlags,T|=$.flags,$.return=d,$=$.sibling;return d.subtreeFlags|=T,d.childLanes=b,p}function bge(d,p,b){var T=p.pendingProps;switch(DA(p),p.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zr(p),null;case 1:return Zr(p),null;case 3:return b=p.stateNode,T=null,d!==null&&(T=d.memoizedState.cache),p.memoizedState.cache!==T&&(p.flags|=2048),au($o),ne(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(d===null||d.child===null)&&(lb(p)?uu(p):d===null||d.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,L5())),Zr(p),null;case 26:return b=p.memoizedState,d===null?(uu(p),b!==null?(Zr(p),i4(p,b)):(Zr(p),p.flags&=-16777217)):b?b!==d.memoizedState?(uu(p),Zr(p),i4(p,b)):(Zr(p),p.flags&=-16777217):(d.memoizedProps!==T&&uu(p),Zr(p),p.flags&=-16777217),null;case 27:de(p),b=ce.current;var $=p.type;if(d!==null&&p.stateNode!=null)d.memoizedProps!==T&&uu(p);else{if(!T){if(p.stateNode===null)throw Error(r(166));return Zr(p),null}d=ie.current,lb(p)?$5(p):(d=i3($,T,b),p.stateNode=d,uu(p))}return Zr(p),null;case 5:if(de(p),b=p.type,d!==null&&p.stateNode!=null)d.memoizedProps!==T&&uu(p);else{if(!T){if(p.stateNode===null)throw Error(r(166));return Zr(p),null}if(d=ie.current,lb(p))$5(p);else{switch($=JC(ce.current),d){case 1:d=$.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:d=$.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":d=$.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":d=$.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":d=$.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof T.is=="string"?$.createElement("select",{is:T.is}):$.createElement("select"),T.multiple?d.multiple=!0:T.size&&(d.size=T.size);break;default:d=typeof T.is=="string"?$.createElement(b,{is:T.is}):$.createElement(b)}}d[Ut]=p,d[Xt]=T;e:for($=p.child;$!==null;){if($.tag===5||$.tag===6)d.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===p)break e;for(;$.sibling===null;){if($.return===null||$.return===p)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}p.stateNode=d;e:switch(mi(d,b,T),b){case"button":case"input":case"select":case"textarea":d=!!T.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&uu(p)}}return Zr(p),p.flags&=-16777217,null;case 6:if(d&&p.stateNode!=null)d.memoizedProps!==T&&uu(p);else{if(typeof T!="string"&&p.stateNode===null)throw Error(r(166));if(d=ce.current,lb(p)){if(d=p.stateNode,b=p.memoizedProps,T=null,$=Ui,$!==null)switch($.tag){case 27:case 5:T=$.memoizedProps}d[Ut]=p,d=!!(d.nodeValue===b||T!==null&&T.suppressHydrationWarning===!0||J4(d.nodeValue,b)),d||ip(p)}else d=JC(d).createTextNode(T),d[Ut]=p,p.stateNode=d}return Zr(p),null;case 13:if(T=p.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if($=lb(p),T!==null&&T.dehydrated!==null){if(d===null){if(!$)throw Error(r(318));if($=p.memoizedState,$=$!==null?$.dehydrated:null,!$)throw Error(r(317));$[Ut]=p}else cb(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;Zr(p),$=!1}else $=L5(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=$),$=!0;if(!$)return p.flags&256?(lu(p),p):(lu(p),null)}if(lu(p),(p.flags&128)!==0)return p.lanes=b,p;if(b=T!==null,d=d!==null&&d.memoizedState!==null,b){T=p.child,$=null,T.alternate!==null&&T.alternate.memoizedState!==null&&T.alternate.memoizedState.cachePool!==null&&($=T.alternate.memoizedState.cachePool.pool);var F=null;T.memoizedState!==null&&T.memoizedState.cachePool!==null&&(F=T.memoizedState.cachePool.pool),F!==$&&(T.flags|=2048)}return b!==d&&b&&(p.child.flags|=8192),jC(p,p.updateQueue),Zr(p),null;case 4:return ne(),d===null&&UM(p.stateNode.containerInfo),Zr(p),null;case 10:return au(p.type),Zr(p),null;case 19:if(Y(No),$=p.memoizedState,$===null)return Zr(p),null;if(T=(p.flags&128)!==0,F=$.rendering,F===null)if(T)Tb($,!1);else{if(ao!==0||d!==null&&(d.flags&128)!==0)for(d=p.child;d!==null;){if(F=_C(d),F!==null){for(p.flags|=128,Tb($,!1),d=F.updateQueue,p.updateQueue=d,jC(p,d),p.subtreeFlags=0,d=b,b=p.child;b!==null;)k5(b,d),b=b.sibling;return Z(No,No.current&1|2),p.child}d=d.sibling}$.tail!==null&&Re()>VC&&(p.flags|=128,T=!0,Tb($,!1),p.lanes=4194304)}else{if(!T)if(d=_C(F),d!==null){if(p.flags|=128,T=!0,d=d.updateQueue,p.updateQueue=d,jC(p,d),Tb($,!0),$.tail===null&&$.tailMode==="hidden"&&!F.alternate&&!rr)return Zr(p),null}else 2*Re()-$.renderingStartTime>VC&&b!==536870912&&(p.flags|=128,T=!0,Tb($,!1),p.lanes=4194304);$.isBackwards?(F.sibling=p.child,p.child=F):(d=$.last,d!==null?d.sibling=F:p.child=F,$.last=F)}return $.tail!==null?(p=$.tail,$.rendering=p,$.tail=p.sibling,$.renderingStartTime=Re(),p.sibling=null,d=No.current,Z(No,T?d&1|2:d&1),p):(Zr(p),null);case 22:case 23:return lu(p),qA(),T=p.memoizedState!==null,d!==null?d.memoizedState!==null!==T&&(p.flags|=8192):T&&(p.flags|=8192),T?(b&536870912)!==0&&(p.flags&128)===0&&(Zr(p),p.subtreeFlags&6&&(p.flags|=8192)):Zr(p),b=p.updateQueue,b!==null&&jC(p,b.retryQueue),b=null,d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),T=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(T=p.memoizedState.cachePool.pool),T!==b&&(p.flags|=2048),d!==null&&Y(lp),null;case 24:return b=null,d!==null&&(b=d.memoizedState.cache),p.memoizedState.cache!==b&&(p.flags|=2048),au($o),Zr(p),null;case 25:return null;case 30:return null}throw Error(r(156,p.tag))}function xge(d,p){switch(DA(p),p.tag){case 1:return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return au($o),ne(),d=p.flags,(d&65536)!==0&&(d&128)===0?(p.flags=d&-65537|128,p):null;case 26:case 27:case 5:return de(p),null;case 13:if(lu(p),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(r(340));cb()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return Y(No),null;case 4:return ne(),null;case 10:return au(p.type),null;case 22:case 23:return lu(p),qA(),d!==null&&Y(lp),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 24:return au($o),null;case 25:return null;default:return null}}function a4(d,p){switch(DA(p),p.tag){case 3:au($o),ne();break;case 26:case 27:case 5:de(p);break;case 4:ne();break;case 13:lu(p);break;case 19:Y(No);break;case 10:au(p.type);break;case 22:case 23:lu(p),qA(),d!==null&&Y(lp);break;case 24:au($o)}}function Ob(d,p){try{var b=p.updateQueue,T=b!==null?b.lastEffect:null;if(T!==null){var $=T.next;b=$;do{if((b.tag&d)===d){T=void 0;var F=b.create,X=b.inst;T=F(),X.destroy=T}b=b.next}while(b!==$)}}catch(re){Or(p,p.return,re)}}function xd(d,p,b){try{var T=p.updateQueue,$=T!==null?T.lastEffect:null;if($!==null){var F=$.next;T=F;do{if((T.tag&d)===d){var X=T.inst,re=X.destroy;if(re!==void 0){X.destroy=void 0,$=p;var ge=b,Ne=re;try{Ne()}catch(Ze){Or($,ge,Ze)}}}T=T.next}while(T!==F)}}catch(Ze){Or(p,p.return,Ze)}}function s4(d){var p=d.updateQueue;if(p!==null){var b=d.stateNode;try{K5(p,b)}catch(T){Or(d,d.return,T)}}}function l4(d,p,b){b.props=up(d.type,d.memoizedProps),b.state=d.memoizedState;try{b.componentWillUnmount()}catch(T){Or(d,p,T)}}function Ib(d,p){try{var b=d.ref;if(b!==null){switch(d.tag){case 26:case 27:case 5:var T=d.stateNode;break;case 30:T=d.stateNode;break;default:T=d.stateNode}typeof b=="function"?d.refCleanup=b(T):b.current=T}}catch($){Or(d,p,$)}}function ac(d,p){var b=d.ref,T=d.refCleanup;if(b!==null)if(typeof T=="function")try{T()}catch($){Or(d,p,$)}finally{d.refCleanup=null,d=d.alternate,d!=null&&(d.refCleanup=null)}else if(typeof b=="function")try{b(null)}catch($){Or(d,p,$)}else b.current=null}function c4(d){var p=d.type,b=d.memoizedProps,T=d.stateNode;try{e:switch(p){case"button":case"input":case"select":case"textarea":b.autoFocus&&T.focus();break e;case"img":b.src?T.src=b.src:b.srcSet&&(T.srcset=b.srcSet)}}catch($){Or(d,d.return,$)}}function xM(d,p,b){try{var T=d.stateNode;zge(T,d.type,b,p),T[Xt]=p}catch($){Or(d,d.return,$)}}function u4(d){return d.tag===5||d.tag===3||d.tag===26||d.tag===27&&Pd(d.type)||d.tag===4}function SM(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||u4(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.tag===27&&Pd(d.type)||d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function wM(d,p,b){var T=d.tag;if(T===5||T===6)d=d.stateNode,p?(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).insertBefore(d,p):(p=b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,p.appendChild(d),b=b._reactRootContainer,b!=null||p.onclick!==null||(p.onclick=XC));else if(T!==4&&(T===27&&Pd(d.type)&&(b=d.stateNode,p=null),d=d.child,d!==null))for(wM(d,p,b),d=d.sibling;d!==null;)wM(d,p,b),d=d.sibling}function BC(d,p,b){var T=d.tag;if(T===5||T===6)d=d.stateNode,p?b.insertBefore(d,p):b.appendChild(d);else if(T!==4&&(T===27&&Pd(d.type)&&(b=d.stateNode),d=d.child,d!==null))for(BC(d,p,b),d=d.sibling;d!==null;)BC(d,p,b),d=d.sibling}function d4(d){var p=d.stateNode,b=d.memoizedProps;try{for(var T=d.type,$=p.attributes;$.length;)p.removeAttributeNode($[0]);mi(p,T,b),p[Ut]=d,p[Xt]=b}catch(F){Or(d,d.return,F)}}var du=!1,xo=!1,CM=!1,f4=typeof WeakSet=="function"?WeakSet:Set,Zo=null;function Sge(d,p){if(d=d.containerInfo,WM=o1,d=C5(d),SA(d)){if("selectionStart"in d)var b={start:d.selectionStart,end:d.selectionEnd};else e:{b=(b=d.ownerDocument)&&b.defaultView||window;var T=b.getSelection&&b.getSelection();if(T&&T.rangeCount!==0){b=T.anchorNode;var $=T.anchorOffset,F=T.focusNode;T=T.focusOffset;try{b.nodeType,F.nodeType}catch{b=null;break e}var X=0,re=-1,ge=-1,Ne=0,Ze=0,ot=d,Fe=null;t:for(;;){for(var ze;ot!==b||$!==0&&ot.nodeType!==3||(re=X+$),ot!==F||T!==0&&ot.nodeType!==3||(ge=X+T),ot.nodeType===3&&(X+=ot.nodeValue.length),(ze=ot.firstChild)!==null;)Fe=ot,ot=ze;for(;;){if(ot===d)break t;if(Fe===b&&++Ne===$&&(re=X),Fe===F&&++Ze===T&&(ge=X),(ze=ot.nextSibling)!==null)break;ot=Fe,Fe=ot.parentNode}ot=ze}b=re===-1||ge===-1?null:{start:re,end:ge}}else b=null}b=b||{start:0,end:0}}else b=null;for(KM={focusedElem:d,selectionRange:b},o1=!1,Zo=p;Zo!==null;)if(p=Zo,d=p.child,(p.subtreeFlags&1024)!==0&&d!==null)d.return=p,Zo=d;else for(;Zo!==null;){switch(p=Zo,F=p.alternate,d=p.flags,p.tag){case 0:break;case 11:case 15:break;case 1:if((d&1024)!==0&&F!==null){d=void 0,b=p,$=F.memoizedProps,F=F.memoizedState,T=b.stateNode;try{var fn=up(b.type,$,b.elementType===b.type);d=T.getSnapshotBeforeUpdate(fn,F),T.__reactInternalSnapshotBeforeUpdate=d}catch(nn){Or(b,b.return,nn)}}break;case 3:if((d&1024)!==0){if(d=p.stateNode.containerInfo,b=d.nodeType,b===9)XM(d);else if(b===1)switch(d.nodeName){case"HEAD":case"HTML":case"BODY":XM(d);break;default:d.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error(r(163))}if(d=p.sibling,d!==null){d.return=p.return,Zo=d;break}Zo=p.return}}function p4(d,p,b){var T=b.flags;switch(b.tag){case 0:case 11:case 15:Sd(d,b),T&4&&Ob(5,b);break;case 1:if(Sd(d,b),T&4)if(d=b.stateNode,p===null)try{d.componentDidMount()}catch(X){Or(b,b.return,X)}else{var $=up(b.type,p.memoizedProps);p=p.memoizedState;try{d.componentDidUpdate($,p,d.__reactInternalSnapshotBeforeUpdate)}catch(X){Or(b,b.return,X)}}T&64&&s4(b),T&512&&Ib(b,b.return);break;case 3:if(Sd(d,b),T&64&&(d=b.updateQueue,d!==null)){if(p=null,b.child!==null)switch(b.child.tag){case 27:case 5:p=b.child.stateNode;break;case 1:p=b.child.stateNode}try{K5(d,p)}catch(X){Or(b,b.return,X)}}break;case 27:p===null&&T&4&&d4(b);case 26:case 5:Sd(d,b),p===null&&T&4&&c4(b),T&512&&Ib(b,b.return);break;case 12:Sd(d,b);break;case 13:Sd(d,b),T&4&&g4(d,b),T&64&&(d=b.memoizedState,d!==null&&(d=d.dehydrated,d!==null&&(b=Mge.bind(null,b),Kge(d,b))));break;case 22:if(T=b.memoizedState!==null||du,!T){p=p!==null&&p.memoizedState!==null||xo,$=du;var F=xo;du=T,(xo=p)&&!F?wd(d,b,(b.subtreeFlags&8772)!==0):Sd(d,b),du=$,xo=F}break;case 30:break;default:Sd(d,b)}}function h4(d){var p=d.alternate;p!==null&&(d.alternate=null,h4(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&vo(p)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}var Gr=null,fa=!1;function fu(d,p,b){for(b=b.child;b!==null;)m4(d,p,b),b=b.sibling}function m4(d,p,b){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(We,b)}catch{}switch(b.tag){case 26:xo||ac(b,p),fu(d,p,b),b.memoizedState?b.memoizedState.count--:b.stateNode&&(b=b.stateNode,b.parentNode.removeChild(b));break;case 27:xo||ac(b,p);var T=Gr,$=fa;Pd(b.type)&&(Gr=b.stateNode,fa=!1),fu(d,p,b),Nb(b.stateNode),Gr=T,fa=$;break;case 5:xo||ac(b,p);case 6:if(T=Gr,$=fa,Gr=null,fu(d,p,b),Gr=T,fa=$,Gr!==null)if(fa)try{(Gr.nodeType===9?Gr.body:Gr.nodeName==="HTML"?Gr.ownerDocument.body:Gr).removeChild(b.stateNode)}catch(F){Or(b,p,F)}else try{Gr.removeChild(b.stateNode)}catch(F){Or(b,p,F)}break;case 18:Gr!==null&&(fa?(d=Gr,r3(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,b.stateNode),Ub(d)):r3(Gr,b.stateNode));break;case 4:T=Gr,$=fa,Gr=b.stateNode.containerInfo,fa=!0,fu(d,p,b),Gr=T,fa=$;break;case 0:case 11:case 14:case 15:xo||xd(2,b,p),xo||xd(4,b,p),fu(d,p,b);break;case 1:xo||(ac(b,p),T=b.stateNode,typeof T.componentWillUnmount=="function"&&l4(b,p,T)),fu(d,p,b);break;case 21:fu(d,p,b);break;case 22:xo=(T=xo)||b.memoizedState!==null,fu(d,p,b),xo=T;break;default:fu(d,p,b)}}function g4(d,p){if(p.memoizedState===null&&(d=p.alternate,d!==null&&(d=d.memoizedState,d!==null&&(d=d.dehydrated,d!==null))))try{Ub(d)}catch(b){Or(p,p.return,b)}}function wge(d){switch(d.tag){case 13:case 19:var p=d.stateNode;return p===null&&(p=d.stateNode=new f4),p;case 22:return d=d.stateNode,p=d._retryCache,p===null&&(p=d._retryCache=new f4),p;default:throw Error(r(435,d.tag))}}function EM(d,p){var b=wge(d);p.forEach(function(T){var $=Rge.bind(null,d,T);b.has(T)||(b.add(T),T.then($,$))})}function $a(d,p){var b=p.deletions;if(b!==null)for(var T=0;T<b.length;T++){var $=b[T],F=d,X=p,re=X;e:for(;re!==null;){switch(re.tag){case 27:if(Pd(re.type)){Gr=re.stateNode,fa=!1;break e}break;case 5:Gr=re.stateNode,fa=!1;break e;case 3:case 4:Gr=re.stateNode.containerInfo,fa=!0;break e}re=re.return}if(Gr===null)throw Error(r(160));m4(F,X,$),Gr=null,fa=!1,F=$.alternate,F!==null&&(F.return=null),$.return=null}if(p.subtreeFlags&13878)for(p=p.child;p!==null;)y4(p,d),p=p.sibling}var pl=null;function y4(d,p){var b=d.alternate,T=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:$a(p,d),Na(d),T&4&&(xd(3,d,d.return),Ob(3,d),xd(5,d,d.return));break;case 1:$a(p,d),Na(d),T&512&&(xo||b===null||ac(b,b.return)),T&64&&du&&(d=d.updateQueue,d!==null&&(T=d.callbacks,T!==null&&(b=d.shared.hiddenCallbacks,d.shared.hiddenCallbacks=b===null?T:b.concat(T))));break;case 26:var $=pl;if($a(p,d),Na(d),T&512&&(xo||b===null||ac(b,b.return)),T&4){var F=b!==null?b.memoizedState:null;if(T=d.memoizedState,b===null)if(T===null)if(d.stateNode===null){e:{T=d.type,b=d.memoizedProps,$=$.ownerDocument||$;t:switch(T){case"title":F=$.getElementsByTagName("title")[0],(!F||F[Ii]||F[Ut]||F.namespaceURI==="http://www.w3.org/2000/svg"||F.hasAttribute("itemprop"))&&(F=$.createElement(T),$.head.insertBefore(F,$.querySelector("head > title"))),mi(F,T,b),F[Ut]=d,He(F),T=F;break e;case"link":var X=d3("link","href",$).get(T+(b.href||""));if(X){for(var re=0;re<X.length;re++)if(F=X[re],F.getAttribute("href")===(b.href==null||b.href===""?null:b.href)&&F.getAttribute("rel")===(b.rel==null?null:b.rel)&&F.getAttribute("title")===(b.title==null?null:b.title)&&F.getAttribute("crossorigin")===(b.crossOrigin==null?null:b.crossOrigin)){X.splice(re,1);break t}}F=$.createElement(T),mi(F,T,b),$.head.appendChild(F);break;case"meta":if(X=d3("meta","content",$).get(T+(b.content||""))){for(re=0;re<X.length;re++)if(F=X[re],F.getAttribute("content")===(b.content==null?null:""+b.content)&&F.getAttribute("name")===(b.name==null?null:b.name)&&F.getAttribute("property")===(b.property==null?null:b.property)&&F.getAttribute("http-equiv")===(b.httpEquiv==null?null:b.httpEquiv)&&F.getAttribute("charset")===(b.charSet==null?null:b.charSet)){X.splice(re,1);break t}}F=$.createElement(T),mi(F,T,b),$.head.appendChild(F);break;default:throw Error(r(468,T))}F[Ut]=d,He(F),T=F}d.stateNode=T}else f3($,d.type,d.stateNode);else d.stateNode=u3($,T,d.memoizedProps);else F!==T?(F===null?b.stateNode!==null&&(b=b.stateNode,b.parentNode.removeChild(b)):F.count--,T===null?f3($,d.type,d.stateNode):u3($,T,d.memoizedProps)):T===null&&d.stateNode!==null&&xM(d,d.memoizedProps,b.memoizedProps)}break;case 27:$a(p,d),Na(d),T&512&&(xo||b===null||ac(b,b.return)),b!==null&&T&4&&xM(d,d.memoizedProps,b.memoizedProps);break;case 5:if($a(p,d),Na(d),T&512&&(xo||b===null||ac(b,b.return)),d.flags&32){$=d.stateNode;try{om($,"")}catch(ze){Or(d,d.return,ze)}}T&4&&d.stateNode!=null&&($=d.memoizedProps,xM(d,$,b!==null?b.memoizedProps:$)),T&1024&&(CM=!0);break;case 6:if($a(p,d),Na(d),T&4){if(d.stateNode===null)throw Error(r(162));T=d.memoizedProps,b=d.stateNode;try{b.nodeValue=T}catch(ze){Or(d,d.return,ze)}}break;case 3:if(t1=null,$=pl,pl=ZC(p.containerInfo),$a(p,d),pl=$,Na(d),T&4&&b!==null&&b.memoizedState.isDehydrated)try{Ub(p.containerInfo)}catch(ze){Or(d,d.return,ze)}CM&&(CM=!1,v4(d));break;case 4:T=pl,pl=ZC(d.stateNode.containerInfo),$a(p,d),Na(d),pl=T;break;case 12:$a(p,d),Na(d);break;case 13:$a(p,d),Na(d),d.child.flags&8192&&d.memoizedState!==null!=(b!==null&&b.memoizedState!==null)&&(MM=Re()),T&4&&(T=d.updateQueue,T!==null&&(d.updateQueue=null,EM(d,T)));break;case 22:$=d.memoizedState!==null;var ge=b!==null&&b.memoizedState!==null,Ne=du,Ze=xo;if(du=Ne||$,xo=Ze||ge,$a(p,d),xo=Ze,du=Ne,Na(d),T&8192)e:for(p=d.stateNode,p._visibility=$?p._visibility&-2:p._visibility|1,$&&(b===null||ge||du||xo||dp(d)),b=null,p=d;;){if(p.tag===5||p.tag===26){if(b===null){ge=b=p;try{if(F=ge.stateNode,$)X=F.style,typeof X.setProperty=="function"?X.setProperty("display","none","important"):X.display="none";else{re=ge.stateNode;var ot=ge.memoizedProps.style,Fe=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;re.style.display=Fe==null||typeof Fe=="boolean"?"":(""+Fe).trim()}}catch(ze){Or(ge,ge.return,ze)}}}else if(p.tag===6){if(b===null){ge=p;try{ge.stateNode.nodeValue=$?"":ge.memoizedProps}catch(ze){Or(ge,ge.return,ze)}}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===d)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break e;for(;p.sibling===null;){if(p.return===null||p.return===d)break e;b===p&&(b=null),p=p.return}b===p&&(b=null),p.sibling.return=p.return,p=p.sibling}T&4&&(T=d.updateQueue,T!==null&&(b=T.retryQueue,b!==null&&(T.retryQueue=null,EM(d,b))));break;case 19:$a(p,d),Na(d),T&4&&(T=d.updateQueue,T!==null&&(d.updateQueue=null,EM(d,T)));break;case 30:break;case 21:break;default:$a(p,d),Na(d)}}function Na(d){var p=d.flags;if(p&2){try{for(var b,T=d.return;T!==null;){if(u4(T)){b=T;break}T=T.return}if(b==null)throw Error(r(160));switch(b.tag){case 27:var $=b.stateNode,F=SM(d);BC(d,F,$);break;case 5:var X=b.stateNode;b.flags&32&&(om(X,""),b.flags&=-33);var re=SM(d);BC(d,re,X);break;case 3:case 4:var ge=b.stateNode.containerInfo,Ne=SM(d);wM(d,Ne,ge);break;default:throw Error(r(161))}}catch(Ze){Or(d,d.return,Ze)}d.flags&=-3}p&4096&&(d.flags&=-4097)}function v4(d){if(d.subtreeFlags&1024)for(d=d.child;d!==null;){var p=d;v4(p),p.tag===5&&p.flags&1024&&p.stateNode.reset(),d=d.sibling}}function Sd(d,p){if(p.subtreeFlags&8772)for(p=p.child;p!==null;)p4(d,p.alternate,p),p=p.sibling}function dp(d){for(d=d.child;d!==null;){var p=d;switch(p.tag){case 0:case 11:case 14:case 15:xd(4,p,p.return),dp(p);break;case 1:ac(p,p.return);var b=p.stateNode;typeof b.componentWillUnmount=="function"&&l4(p,p.return,b),dp(p);break;case 27:Nb(p.stateNode);case 26:case 5:ac(p,p.return),dp(p);break;case 22:p.memoizedState===null&&dp(p);break;case 30:dp(p);break;default:dp(p)}d=d.sibling}}function wd(d,p,b){for(b=b&&(p.subtreeFlags&8772)!==0,p=p.child;p!==null;){var T=p.alternate,$=d,F=p,X=F.flags;switch(F.tag){case 0:case 11:case 15:wd($,F,b),Ob(4,F);break;case 1:if(wd($,F,b),T=F,$=T.stateNode,typeof $.componentDidMount=="function")try{$.componentDidMount()}catch(Ne){Or(T,T.return,Ne)}if(T=F,$=T.updateQueue,$!==null){var re=T.stateNode;try{var ge=$.shared.hiddenCallbacks;if(ge!==null)for($.shared.hiddenCallbacks=null,$=0;$<ge.length;$++)W5(ge[$],re)}catch(Ne){Or(T,T.return,Ne)}}b&&X&64&&s4(F),Ib(F,F.return);break;case 27:d4(F);case 26:case 5:wd($,F,b),b&&T===null&&X&4&&c4(F),Ib(F,F.return);break;case 12:wd($,F,b);break;case 13:wd($,F,b),b&&X&4&&g4($,F);break;case 22:F.memoizedState===null&&wd($,F,b),Ib(F,F.return);break;case 30:break;default:wd($,F,b)}p=p.sibling}}function TM(d,p){var b=null;d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),d=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(d=p.memoizedState.cachePool.pool),d!==b&&(d!=null&&d.refCount++,b!=null&&fb(b))}function OM(d,p){d=null,p.alternate!==null&&(d=p.alternate.memoizedState.cache),p=p.memoizedState.cache,p!==d&&(p.refCount++,d!=null&&fb(d))}function sc(d,p,b,T){if(p.subtreeFlags&10256)for(p=p.child;p!==null;)b4(d,p,b,T),p=p.sibling}function b4(d,p,b,T){var $=p.flags;switch(p.tag){case 0:case 11:case 15:sc(d,p,b,T),$&2048&&Ob(9,p);break;case 1:sc(d,p,b,T);break;case 3:sc(d,p,b,T),$&2048&&(d=null,p.alternate!==null&&(d=p.alternate.memoizedState.cache),p=p.memoizedState.cache,p!==d&&(p.refCount++,d!=null&&fb(d)));break;case 12:if($&2048){sc(d,p,b,T),d=p.stateNode;try{var F=p.memoizedProps,X=F.id,re=F.onPostCommit;typeof re=="function"&&re(X,p.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(ge){Or(p,p.return,ge)}}else sc(d,p,b,T);break;case 13:sc(d,p,b,T);break;case 23:break;case 22:F=p.stateNode,X=p.alternate,p.memoizedState!==null?F._visibility&2?sc(d,p,b,T):Pb(d,p):F._visibility&2?sc(d,p,b,T):(F._visibility|=2,Cm(d,p,b,T,(p.subtreeFlags&10256)!==0)),$&2048&&TM(X,p);break;case 24:sc(d,p,b,T),$&2048&&OM(p.alternate,p);break;default:sc(d,p,b,T)}}function Cm(d,p,b,T,$){for($=$&&(p.subtreeFlags&10256)!==0,p=p.child;p!==null;){var F=d,X=p,re=b,ge=T,Ne=X.flags;switch(X.tag){case 0:case 11:case 15:Cm(F,X,re,ge,$),Ob(8,X);break;case 23:break;case 22:var Ze=X.stateNode;X.memoizedState!==null?Ze._visibility&2?Cm(F,X,re,ge,$):Pb(F,X):(Ze._visibility|=2,Cm(F,X,re,ge,$)),$&&Ne&2048&&TM(X.alternate,X);break;case 24:Cm(F,X,re,ge,$),$&&Ne&2048&&OM(X.alternate,X);break;default:Cm(F,X,re,ge,$)}p=p.sibling}}function Pb(d,p){if(p.subtreeFlags&10256)for(p=p.child;p!==null;){var b=d,T=p,$=T.flags;switch(T.tag){case 22:Pb(b,T),$&2048&&TM(T.alternate,T);break;case 24:Pb(b,T),$&2048&&OM(T.alternate,T);break;default:Pb(b,T)}p=p.sibling}}var Ab=8192;function Em(d){if(d.subtreeFlags&Ab)for(d=d.child;d!==null;)x4(d),d=d.sibling}function x4(d){switch(d.tag){case 26:Em(d),d.flags&Ab&&d.memoizedState!==null&&sye(pl,d.memoizedState,d.memoizedProps);break;case 5:Em(d);break;case 3:case 4:var p=pl;pl=ZC(d.stateNode.containerInfo),Em(d),pl=p;break;case 22:d.memoizedState===null&&(p=d.alternate,p!==null&&p.memoizedState!==null?(p=Ab,Ab=16777216,Em(d),Ab=p):Em(d));break;default:Em(d)}}function S4(d){var p=d.alternate;if(p!==null&&(d=p.child,d!==null)){p.child=null;do p=d.sibling,d.sibling=null,d=p;while(d!==null)}}function Mb(d){var p=d.deletions;if((d.flags&16)!==0){if(p!==null)for(var b=0;b<p.length;b++){var T=p[b];Zo=T,C4(T,d)}S4(d)}if(d.subtreeFlags&10256)for(d=d.child;d!==null;)w4(d),d=d.sibling}function w4(d){switch(d.tag){case 0:case 11:case 15:Mb(d),d.flags&2048&&xd(9,d,d.return);break;case 3:Mb(d);break;case 12:Mb(d);break;case 22:var p=d.stateNode;d.memoizedState!==null&&p._visibility&2&&(d.return===null||d.return.tag!==13)?(p._visibility&=-3,zC(d)):Mb(d);break;default:Mb(d)}}function zC(d){var p=d.deletions;if((d.flags&16)!==0){if(p!==null)for(var b=0;b<p.length;b++){var T=p[b];Zo=T,C4(T,d)}S4(d)}for(d=d.child;d!==null;){switch(p=d,p.tag){case 0:case 11:case 15:xd(8,p,p.return),zC(p);break;case 22:b=p.stateNode,b._visibility&2&&(b._visibility&=-3,zC(p));break;default:zC(p)}d=d.sibling}}function C4(d,p){for(;Zo!==null;){var b=Zo;switch(b.tag){case 0:case 11:case 15:xd(8,b,p);break;case 23:case 22:if(b.memoizedState!==null&&b.memoizedState.cachePool!==null){var T=b.memoizedState.cachePool.pool;T!=null&&T.refCount++}break;case 24:fb(b.memoizedState.cache)}if(T=b.child,T!==null)T.return=b,Zo=T;else e:for(b=d;Zo!==null;){T=Zo;var $=T.sibling,F=T.return;if(h4(T),T===b){Zo=null;break e}if($!==null){$.return=F,Zo=$;break e}Zo=F}}}var Cge={getCacheForType:function(d){var p=Pi($o),b=p.data.get(d);return b===void 0&&(b=d(),p.data.set(d,b)),b}},Ege=typeof WeakMap=="function"?WeakMap:Map,mr=0,Dr=null,Ln=null,qn=0,gr=0,La=null,Cd=!1,Tm=!1,IM=!1,pu=0,ao=0,Ed=0,fp=0,PM=0,ws=0,Om=0,Rb=null,pa=null,AM=!1,MM=0,VC=1/0,HC=null,Td=null,hi=0,Od=null,Im=null,Pm=0,RM=0,DM=null,E4=null,Db=0,kM=null;function Fa(){if((mr&2)!==0&&qn!==0)return qn&-qn;if(L.T!==null){var d=mm;return d!==0?d:BM()}return un()}function T4(){ws===0&&(ws=(qn&536870912)===0||rr?kn():536870912);var d=Ss.current;return d!==null&&(d.flags|=32),ws}function ja(d,p,b){(d===Dr&&(gr===2||gr===9)||d.cancelPendingCommit!==null)&&(Am(d,0),Id(d,qn,ws,!1)),Bn(d,b),((mr&2)===0||d!==Dr)&&(d===Dr&&((mr&2)===0&&(fp|=b),ao===4&&Id(d,qn,ws,!1)),lc(d))}function O4(d,p,b){if((mr&6)!==0)throw Error(r(327));var T=!b&&(p&124)===0&&(p&d.expiredLanes)===0||bt(d,p),$=T?Ige(d,p):NM(d,p,!0),F=T;do{if($===0){Tm&&!T&&Id(d,p,0,!1);break}else{if(b=d.current.alternate,F&&!Tge(b)){$=NM(d,p,!1),F=!1;continue}if($===2){if(F=p,d.errorRecoveryDisabledLanes&F)var X=0;else X=d.pendingLanes&-536870913,X=X!==0?X:X&536870912?536870912:0;if(X!==0){p=X;e:{var re=d;$=Rb;var ge=re.current.memoizedState.isDehydrated;if(ge&&(Am(re,X).flags|=256),X=NM(re,X,!1),X!==2){if(IM&&!ge){re.errorRecoveryDisabledLanes|=F,fp|=F,$=4;break e}F=pa,pa=$,F!==null&&(pa===null?pa=F:pa.push.apply(pa,F))}$=X}if(F=!1,$!==2)continue}}if($===1){Am(d,0),Id(d,p,0,!0);break}e:{switch(T=d,F=$,F){case 0:case 1:throw Error(r(345));case 4:if((p&4194048)!==p)break;case 6:Id(T,p,ws,!Cd);break e;case 2:pa=null;break;case 3:case 5:break;default:throw Error(r(329))}if((p&62914560)===p&&($=MM+300-Re(),10<$)){if(Id(T,p,ws,!Cd),vt(T,0,!0)!==0)break e;T.timeoutHandle=t3(I4.bind(null,T,b,pa,HC,AM,p,ws,fp,Om,Cd,F,2,-0,0),$);break e}I4(T,b,pa,HC,AM,p,ws,fp,Om,Cd,F,0,-0,0)}}break}while(!0);lc(d)}function I4(d,p,b,T,$,F,X,re,ge,Ne,Ze,ot,Fe,ze){if(d.timeoutHandle=-1,ot=p.subtreeFlags,(ot&8192||(ot&16785408)===16785408)&&(jb={stylesheets:null,count:0,unsuspend:aye},x4(p),ot=lye(),ot!==null)){d.cancelPendingCommit=ot(_4.bind(null,d,p,F,b,T,$,X,re,ge,Ze,1,Fe,ze)),Id(d,F,X,!Ne);return}_4(d,p,F,b,T,$,X,re,ge)}function Tge(d){for(var p=d;;){var b=p.tag;if((b===0||b===11||b===15)&&p.flags&16384&&(b=p.updateQueue,b!==null&&(b=b.stores,b!==null)))for(var T=0;T<b.length;T++){var $=b[T],F=$.getSnapshot;$=$.value;try{if(!ka(F(),$))return!1}catch{return!1}}if(b=p.child,p.subtreeFlags&16384&&b!==null)b.return=p,p=b;else{if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function Id(d,p,b,T){p&=~PM,p&=~fp,d.suspendedLanes|=p,d.pingedLanes&=~p,T&&(d.warmLanes|=p),T=d.expirationTimes;for(var $=p;0<$;){var F=31-Be($),X=1<<F;T[F]=-1,$&=~X}b!==0&&To(d,b,p)}function UC(){return(mr&6)===0?(kb(0),!1):!0}function _M(){if(Ln!==null){if(gr===0)var d=Ln.return;else d=Ln,iu=ap=null,XA(d),Sm=null,Cb=0,d=Ln;for(;d!==null;)a4(d.alternate,d),d=d.return;Ln=null}}function Am(d,p){var b=d.timeoutHandle;b!==-1&&(d.timeoutHandle=-1,Hge(b)),b=d.cancelPendingCommit,b!==null&&(d.cancelPendingCommit=null,b()),_M(),Dr=d,Ln=b=nu(d.current,null),qn=p,gr=0,La=null,Cd=!1,Tm=bt(d,p),IM=!1,Om=ws=PM=fp=Ed=ao=0,pa=Rb=null,AM=!1,(p&8)!==0&&(p|=p&32);var T=d.entangledLanes;if(T!==0)for(d=d.entanglements,T&=p;0<T;){var $=31-Be(T),F=1<<$;p|=d[$],T&=~F}return pu=p,fC(),b}function P4(d,p){Rn=null,L.H=RC,p===hb||p===SC?(p=G5(),gr=3):p===V5?(p=G5(),gr=4):gr=p===qU?8:p!==null&&typeof p=="object"&&typeof p.then=="function"?6:1,La=p,Ln===null&&(ao=1,NC(d,ys(p,d.current)))}function A4(){var d=L.H;return L.H=RC,d===null?RC:d}function M4(){var d=L.A;return L.A=Cge,d}function $M(){ao=4,Cd||(qn&4194048)!==qn&&Ss.current!==null||(Tm=!0),(Ed&134217727)===0&&(fp&134217727)===0||Dr===null||Id(Dr,qn,ws,!1)}function NM(d,p,b){var T=mr;mr|=2;var $=A4(),F=M4();(Dr!==d||qn!==p)&&(HC=null,Am(d,p)),p=!1;var X=ao;e:do try{if(gr!==0&&Ln!==null){var re=Ln,ge=La;switch(gr){case 8:_M(),X=6;break e;case 3:case 2:case 9:case 6:Ss.current===null&&(p=!0);var Ne=gr;if(gr=0,La=null,Mm(d,re,ge,Ne),b&&Tm){X=0;break e}break;default:Ne=gr,gr=0,La=null,Mm(d,re,ge,Ne)}}Oge(),X=ao;break}catch(Ze){P4(d,Ze)}while(!0);return p&&d.shellSuspendCounter++,iu=ap=null,mr=T,L.H=$,L.A=F,Ln===null&&(Dr=null,qn=0,fC()),X}function Oge(){for(;Ln!==null;)R4(Ln)}function Ige(d,p){var b=mr;mr|=2;var T=A4(),$=M4();Dr!==d||qn!==p?(HC=null,VC=Re()+500,Am(d,p)):Tm=bt(d,p);e:do try{if(gr!==0&&Ln!==null){p=Ln;var F=La;t:switch(gr){case 1:gr=0,La=null,Mm(d,p,F,1);break;case 2:case 9:if(H5(F)){gr=0,La=null,D4(p);break}p=function(){gr!==2&&gr!==9||Dr!==d||(gr=7),lc(d)},F.then(p,p);break e;case 3:gr=7;break e;case 4:gr=5;break e;case 7:H5(F)?(gr=0,La=null,D4(p)):(gr=0,La=null,Mm(d,p,F,7));break;case 5:var X=null;switch(Ln.tag){case 26:X=Ln.memoizedState;case 5:case 27:var re=Ln;if(!X||p3(X)){gr=0,La=null;var ge=re.sibling;if(ge!==null)Ln=ge;else{var Ne=re.return;Ne!==null?(Ln=Ne,GC(Ne)):Ln=null}break t}}gr=0,La=null,Mm(d,p,F,5);break;case 6:gr=0,La=null,Mm(d,p,F,6);break;case 8:_M(),ao=6;break e;default:throw Error(r(462))}}Pge();break}catch(Ze){P4(d,Ze)}while(!0);return iu=ap=null,L.H=T,L.A=$,mr=b,Ln!==null?0:(Dr=null,qn=0,fC(),ao)}function Pge(){for(;Ln!==null&&!Ee();)R4(Ln)}function R4(d){var p=o4(d.alternate,d,pu);d.memoizedProps=d.pendingProps,p===null?GC(d):Ln=p}function D4(d){var p=d,b=p.alternate;switch(p.tag){case 15:case 0:p=JU(b,p,p.pendingProps,p.type,void 0,qn);break;case 11:p=JU(b,p,p.pendingProps,p.type.render,p.ref,qn);break;case 5:XA(p);default:a4(b,p),p=Ln=k5(p,pu),p=o4(b,p,pu)}d.memoizedProps=d.pendingProps,p===null?GC(d):Ln=p}function Mm(d,p,b,T){iu=ap=null,XA(p),Sm=null,Cb=0;var $=p.return;try{if(yge(d,$,p,b,qn)){ao=1,NC(d,ys(b,d.current)),Ln=null;return}}catch(F){if($!==null)throw Ln=$,F;ao=1,NC(d,ys(b,d.current)),Ln=null;return}p.flags&32768?(rr||T===1?d=!0:Tm||(qn&536870912)!==0?d=!1:(Cd=d=!0,(T===2||T===9||T===3||T===6)&&(T=Ss.current,T!==null&&T.tag===13&&(T.flags|=16384))),k4(p,d)):GC(p)}function GC(d){var p=d;do{if((p.flags&32768)!==0){k4(p,Cd);return}d=p.return;var b=bge(p.alternate,p,pu);if(b!==null){Ln=b;return}if(p=p.sibling,p!==null){Ln=p;return}Ln=p=d}while(p!==null);ao===0&&(ao=5)}function k4(d,p){do{var b=xge(d.alternate,d);if(b!==null){b.flags&=32767,Ln=b;return}if(b=d.return,b!==null&&(b.flags|=32768,b.subtreeFlags=0,b.deletions=null),!p&&(d=d.sibling,d!==null)){Ln=d;return}Ln=d=b}while(d!==null);ao=6,Ln=null}function _4(d,p,b,T,$,F,X,re,ge){d.cancelPendingCommit=null;do qC();while(hi!==0);if((mr&6)!==0)throw Error(r(327));if(p!==null){if(p===d.current)throw Error(r(177));if(F=p.lanes|p.childLanes,F|=OA,yo(d,b,F,X,re,ge),d===Dr&&(Ln=Dr=null,qn=0),Im=p,Od=d,Pm=b,RM=F,DM=$,E4=T,(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0?(d.callbackNode=null,d.callbackPriority=0,Dge(Ie,function(){return j4(),null})):(d.callbackNode=null,d.callbackPriority=0),T=(p.flags&13878)!==0,(p.subtreeFlags&13878)!==0||T){T=L.T,L.T=null,$=V.p,V.p=2,X=mr,mr|=4;try{Sge(d,p,b)}finally{mr=X,V.p=$,L.T=T}}hi=1,$4(),N4(),L4()}}function $4(){if(hi===1){hi=0;var d=Od,p=Im,b=(p.flags&13878)!==0;if((p.subtreeFlags&13878)!==0||b){b=L.T,L.T=null;var T=V.p;V.p=2;var $=mr;mr|=4;try{y4(p,d);var F=KM,X=C5(d.containerInfo),re=F.focusedElem,ge=F.selectionRange;if(X!==re&&re&&re.ownerDocument&&w5(re.ownerDocument.documentElement,re)){if(ge!==null&&SA(re)){var Ne=ge.start,Ze=ge.end;if(Ze===void 0&&(Ze=Ne),"selectionStart"in re)re.selectionStart=Ne,re.selectionEnd=Math.min(Ze,re.value.length);else{var ot=re.ownerDocument||document,Fe=ot&&ot.defaultView||window;if(Fe.getSelection){var ze=Fe.getSelection(),fn=re.textContent.length,nn=Math.min(ge.start,fn),Sr=ge.end===void 0?nn:Math.min(ge.end,fn);!ze.extend&&nn>Sr&&(X=Sr,Sr=nn,nn=X);var Ae=S5(re,nn),we=S5(re,Sr);if(Ae&&we&&(ze.rangeCount!==1||ze.anchorNode!==Ae.node||ze.anchorOffset!==Ae.offset||ze.focusNode!==we.node||ze.focusOffset!==we.offset)){var _e=ot.createRange();_e.setStart(Ae.node,Ae.offset),ze.removeAllRanges(),nn>Sr?(ze.addRange(_e),ze.extend(we.node,we.offset)):(_e.setEnd(we.node,we.offset),ze.addRange(_e))}}}}for(ot=[],ze=re;ze=ze.parentNode;)ze.nodeType===1&&ot.push({element:ze,left:ze.scrollLeft,top:ze.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;re<ot.length;re++){var tt=ot[re];tt.element.scrollLeft=tt.left,tt.element.scrollTop=tt.top}}o1=!!WM,KM=WM=null}finally{mr=$,V.p=T,L.T=b}}d.current=p,hi=2}}function N4(){if(hi===2){hi=0;var d=Od,p=Im,b=(p.flags&8772)!==0;if((p.subtreeFlags&8772)!==0||b){b=L.T,L.T=null;var T=V.p;V.p=2;var $=mr;mr|=4;try{p4(d,p.alternate,p)}finally{mr=$,V.p=T,L.T=b}}hi=3}}function L4(){if(hi===4||hi===3){hi=0,xe();var d=Od,p=Im,b=Pm,T=E4;(p.subtreeFlags&10256)!==0||(p.flags&10256)!==0?hi=5:(hi=0,Im=Od=null,F4(d,d.pendingLanes));var $=d.pendingLanes;if($===0&&(Td=null),Kt(b),p=p.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(We,p,void 0,(p.current.flags&128)===128)}catch{}if(T!==null){p=L.T,$=V.p,V.p=2,L.T=null;try{for(var F=d.onRecoverableError,X=0;X<T.length;X++){var re=T[X];F(re.value,{componentStack:re.stack})}}finally{L.T=p,V.p=$}}(Pm&3)!==0&&qC(),lc(d),$=d.pendingLanes,(b&4194090)!==0&&($&42)!==0?d===kM?Db++:(Db=0,kM=d):Db=0,kb(0)}}function F4(d,p){(d.pooledCacheLanes&=p)===0&&(p=d.pooledCache,p!=null&&(d.pooledCache=null,fb(p)))}function qC(d){return $4(),N4(),L4(),j4()}function j4(){if(hi!==5)return!1;var d=Od,p=RM;RM=0;var b=Kt(Pm),T=L.T,$=V.p;try{V.p=32>b?32:b,L.T=null,b=DM,DM=null;var F=Od,X=Pm;if(hi=0,Im=Od=null,Pm=0,(mr&6)!==0)throw Error(r(331));var re=mr;if(mr|=4,w4(F.current),b4(F,F.current,X,b),mr=re,kb(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(We,F)}catch{}return!0}finally{V.p=$,L.T=T,F4(d,p)}}function B4(d,p,b){p=ys(b,p),p=dM(d.stateNode,p,2),d=gd(d,p,2),d!==null&&(Bn(d,2),lc(d))}function Or(d,p,b){if(d.tag===3)B4(d,d,b);else for(;p!==null;){if(p.tag===3){B4(p,d,b);break}else if(p.tag===1){var T=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(Td===null||!Td.has(T))){d=ys(b,d),b=UU(2),T=gd(p,b,2),T!==null&&(GU(b,T,p,d),Bn(T,2),lc(T));break}}p=p.return}}function LM(d,p,b){var T=d.pingCache;if(T===null){T=d.pingCache=new Ege;var $=new Set;T.set(p,$)}else $=T.get(p),$===void 0&&($=new Set,T.set(p,$));$.has(b)||(IM=!0,$.add(b),d=Age.bind(null,d,p,b),p.then(d,d))}function Age(d,p,b){var T=d.pingCache;T!==null&&T.delete(p),d.pingedLanes|=d.suspendedLanes&b,d.warmLanes&=~b,Dr===d&&(qn&b)===b&&(ao===4||ao===3&&(qn&62914560)===qn&&300>Re()-MM?(mr&2)===0&&Am(d,0):PM|=b,Om===qn&&(Om=0)),lc(d)}function z4(d,p){p===0&&(p=Rr()),d=dm(d,p),d!==null&&(Bn(d,p),lc(d))}function Mge(d){var p=d.memoizedState,b=0;p!==null&&(b=p.retryLane),z4(d,b)}function Rge(d,p){var b=0;switch(d.tag){case 13:var T=d.stateNode,$=d.memoizedState;$!==null&&(b=$.retryLane);break;case 19:T=d.stateNode;break;case 22:T=d.stateNode._retryCache;break;default:throw Error(r(314))}T!==null&&T.delete(p),z4(d,b)}function Dge(d,p){return ue(d,p)}var WC=null,Rm=null,FM=!1,KC=!1,jM=!1,pp=0;function lc(d){d!==Rm&&d.next===null&&(Rm===null?WC=Rm=d:Rm=Rm.next=d),KC=!0,FM||(FM=!0,_ge())}function kb(d,p){if(!jM&&KC){jM=!0;do for(var b=!1,T=WC;T!==null;){if(d!==0){var $=T.pendingLanes;if($===0)var F=0;else{var X=T.suspendedLanes,re=T.pingedLanes;F=(1<<31-Be(42|d)+1)-1,F&=$&~(X&~re),F=F&201326741?F&201326741|1:F?F|2:0}F!==0&&(b=!0,G4(T,F))}else F=qn,F=vt(T,T===Dr?F:0,T.cancelPendingCommit!==null||T.timeoutHandle!==-1),(F&3)===0||bt(T,F)||(b=!0,G4(T,F));T=T.next}while(b);jM=!1}}function kge(){V4()}function V4(){KC=FM=!1;var d=0;pp!==0&&(Vge()&&(d=pp),pp=0);for(var p=Re(),b=null,T=WC;T!==null;){var $=T.next,F=H4(T,p);F===0?(T.next=null,b===null?WC=$:b.next=$,$===null&&(Rm=b)):(b=T,(d!==0||(F&3)!==0)&&(KC=!0)),T=$}kb(d)}function H4(d,p){for(var b=d.suspendedLanes,T=d.pingedLanes,$=d.expirationTimes,F=d.pendingLanes&-62914561;0<F;){var X=31-Be(F),re=1<<X,ge=$[X];ge===-1?((re&b)===0||(re&T)!==0)&&($[X]=vn(re,p)):ge<=p&&(d.expiredLanes|=re),F&=~re}if(p=Dr,b=qn,b=vt(d,d===p?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),T=d.callbackNode,b===0||d===p&&(gr===2||gr===9)||d.cancelPendingCommit!==null)return T!==null&&T!==null&&pe(T),d.callbackNode=null,d.callbackPriority=0;if((b&3)===0||bt(d,b)){if(p=b&-b,p===d.callbackPriority)return p;switch(T!==null&&pe(T),Kt(b)){case 2:case 8:b=ve;break;case 32:b=Ie;break;case 268435456:b=Te;break;default:b=Ie}return T=U4.bind(null,d),b=ue(b,T),d.callbackPriority=p,d.callbackNode=b,p}return T!==null&&T!==null&&pe(T),d.callbackPriority=2,d.callbackNode=null,2}function U4(d,p){if(hi!==0&&hi!==5)return d.callbackNode=null,d.callbackPriority=0,null;var b=d.callbackNode;if(qC()&&d.callbackNode!==b)return null;var T=qn;return T=vt(d,d===Dr?T:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),T===0?null:(O4(d,T,p),H4(d,Re()),d.callbackNode!=null&&d.callbackNode===b?U4.bind(null,d):null)}function G4(d,p){if(qC())return null;O4(d,p,!0)}function _ge(){Uge(function(){(mr&6)!==0?ue(Pe,kge):V4()})}function BM(){return pp===0&&(pp=kn()),pp}function q4(d){return d==null||typeof d=="symbol"||typeof d=="boolean"?null:typeof d=="function"?d:iC(""+d)}function W4(d,p){var b=p.ownerDocument.createElement("input");return b.name=p.name,b.value=p.value,d.id&&b.setAttribute("form",d.id),p.parentNode.insertBefore(b,p),d=new FormData(d),b.parentNode.removeChild(b),d}function $ge(d,p,b,T,$){if(p==="submit"&&b&&b.stateNode===$){var F=q4(($[Xt]||null).action),X=T.submitter;X&&(p=(p=X[Xt]||null)?q4(p.formAction):X.getAttribute("formAction"),p!==null&&(F=p,X=null));var re=new cC("action","action",null,T,$);d.push({event:re,listeners:[{instance:null,listener:function(){if(T.defaultPrevented){if(pp!==0){var ge=X?W4($,X):new FormData($);aM(b,{pending:!0,data:ge,method:$.method,action:F},null,ge)}}else typeof F=="function"&&(re.preventDefault(),ge=X?W4($,X):new FormData($),aM(b,{pending:!0,data:ge,method:$.method,action:F},F,ge))},currentTarget:$}]})}}for(var zM=0;zM<TA.length;zM++){var VM=TA[zM],Nge=VM.toLowerCase(),Lge=VM[0].toUpperCase()+VM.slice(1);fl(Nge,"on"+Lge)}fl(O5,"onAnimationEnd"),fl(I5,"onAnimationIteration"),fl(P5,"onAnimationStart"),fl("dblclick","onDoubleClick"),fl("focusin","onFocus"),fl("focusout","onBlur"),fl(ege,"onTransitionRun"),fl(tge,"onTransitionStart"),fl(nge,"onTransitionCancel"),fl(A5,"onTransitionEnd"),Gt("onMouseEnter",["mouseout","mouseover"]),Gt("onMouseLeave",["mouseout","mouseover"]),Gt("onPointerEnter",["pointerout","pointerover"]),Gt("onPointerLeave",["pointerout","pointerover"]),hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),hn("onBeforeInput",["compositionend","keypress","textInput","paste"]),hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _b="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fge=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_b));function K4(d,p){p=(p&4)!==0;for(var b=0;b<d.length;b++){var T=d[b],$=T.event;T=T.listeners;e:{var F=void 0;if(p)for(var X=T.length-1;0<=X;X--){var re=T[X],ge=re.instance,Ne=re.currentTarget;if(re=re.listener,ge!==F&&$.isPropagationStopped())break e;F=re,$.currentTarget=Ne;try{F($)}catch(Ze){$C(Ze)}$.currentTarget=null,F=ge}else for(X=0;X<T.length;X++){if(re=T[X],ge=re.instance,Ne=re.currentTarget,re=re.listener,ge!==F&&$.isPropagationStopped())break e;F=re,$.currentTarget=Ne;try{F($)}catch(Ze){$C(Ze)}$.currentTarget=null,F=ge}}}}function Fn(d,p){var b=p[Xo];b===void 0&&(b=p[Xo]=new Set);var T=d+"__bubble";b.has(T)||(Y4(p,d,2,!1),b.add(T))}function HM(d,p,b){var T=0;p&&(T|=4),Y4(b,d,T,p)}var YC="_reactListening"+Math.random().toString(36).slice(2);function UM(d){if(!d[YC]){d[YC]=!0,Ye.forEach(function(b){b!=="selectionchange"&&(Fge.has(b)||HM(b,!1,d),HM(b,!0,d))});var p=d.nodeType===9?d:d.ownerDocument;p===null||p[YC]||(p[YC]=!0,HM("selectionchange",!1,p))}}function Y4(d,p,b,T){switch(b3(p)){case 2:var $=dye;break;case 8:$=fye;break;default:$=oR}b=$.bind(null,p,b,d),$=void 0,!fA||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||($=!0),T?$!==void 0?d.addEventListener(p,b,{capture:!0,passive:$}):d.addEventListener(p,b,!0):$!==void 0?d.addEventListener(p,b,{passive:$}):d.addEventListener(p,b,!1)}function GM(d,p,b,T,$){var F=T;if((p&1)===0&&(p&2)===0&&T!==null)e:for(;;){if(T===null)return;var X=T.tag;if(X===3||X===4){var re=T.stateNode.containerInfo;if(re===$)break;if(X===4)for(X=T.return;X!==null;){var ge=X.tag;if((ge===3||ge===4)&&X.stateNode.containerInfo===$)return;X=X.return}for(;re!==null;){if(X=Fr(re),X===null)return;if(ge=X.tag,ge===5||ge===6||ge===26||ge===27){T=F=X;continue e}re=re.parentNode}}T=T.return}n5(function(){var Ne=F,Ze=uA(b),ot=[];e:{var Fe=M5.get(d);if(Fe!==void 0){var ze=cC,fn=d;switch(d){case"keypress":if(sC(b)===0)break e;case"keydown":case"keyup":ze=Dme;break;case"focusin":fn="focus",ze=gA;break;case"focusout":fn="blur",ze=gA;break;case"beforeblur":case"afterblur":ze=gA;break;case"click":if(b.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ze=i5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ze=xme;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ze=$me;break;case O5:case I5:case P5:ze=Cme;break;case A5:ze=Lme;break;case"scroll":case"scrollend":ze=vme;break;case"wheel":ze=jme;break;case"copy":case"cut":case"paste":ze=Tme;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ze=s5;break;case"toggle":case"beforetoggle":ze=zme}var nn=(p&4)!==0,Sr=!nn&&(d==="scroll"||d==="scrollend"),Ae=nn?Fe!==null?Fe+"Capture":null:Fe;nn=[];for(var we=Ne,_e;we!==null;){var tt=we;if(_e=tt.stateNode,tt=tt.tag,tt!==5&&tt!==26&&tt!==27||_e===null||Ae===null||(tt=Zv(we,Ae),tt!=null&&nn.push($b(we,tt,_e))),Sr)break;we=we.return}0<nn.length&&(Fe=new ze(Fe,fn,null,b,Ze),ot.push({event:Fe,listeners:nn}))}}if((p&7)===0){e:{if(Fe=d==="mouseover"||d==="pointerover",ze=d==="mouseout"||d==="pointerout",Fe&&b!==cA&&(fn=b.relatedTarget||b.fromElement)&&(Fr(fn)||fn[Vn]))break e;if((ze||Fe)&&(Fe=Ze.window===Ze?Ze:(Fe=Ze.ownerDocument)?Fe.defaultView||Fe.parentWindow:window,ze?(fn=b.relatedTarget||b.toElement,ze=Ne,fn=fn?Fr(fn):null,fn!==null&&(Sr=i(fn),nn=fn.tag,fn!==Sr||nn!==5&&nn!==27&&nn!==6)&&(fn=null)):(ze=null,fn=Ne),ze!==fn)){if(nn=i5,tt="onMouseLeave",Ae="onMouseEnter",we="mouse",(d==="pointerout"||d==="pointerover")&&(nn=s5,tt="onPointerLeave",Ae="onPointerEnter",we="pointer"),Sr=ze==null?Fe:ul(ze),_e=fn==null?Fe:ul(fn),Fe=new nn(tt,we+"leave",ze,b,Ze),Fe.target=Sr,Fe.relatedTarget=_e,tt=null,Fr(Ze)===Ne&&(nn=new nn(Ae,we+"enter",fn,b,Ze),nn.target=_e,nn.relatedTarget=Sr,tt=nn),Sr=tt,ze&&fn)t:{for(nn=ze,Ae=fn,we=0,_e=nn;_e;_e=Dm(_e))we++;for(_e=0,tt=Ae;tt;tt=Dm(tt))_e++;for(;0<we-_e;)nn=Dm(nn),we--;for(;0<_e-we;)Ae=Dm(Ae),_e--;for(;we--;){if(nn===Ae||Ae!==null&&nn===Ae.alternate)break t;nn=Dm(nn),Ae=Dm(Ae)}nn=null}else nn=null;ze!==null&&Q4(ot,Fe,ze,nn,!1),fn!==null&&Sr!==null&&Q4(ot,Sr,fn,nn,!0)}}e:{if(Fe=Ne?ul(Ne):window,ze=Fe.nodeName&&Fe.nodeName.toLowerCase(),ze==="select"||ze==="input"&&Fe.type==="file")var Bt=m5;else if(p5(Fe))if(g5)Bt=Xme;else{Bt=Yme;var _n=Kme}else ze=Fe.nodeName,!ze||ze.toLowerCase()!=="input"||Fe.type!=="checkbox"&&Fe.type!=="radio"?Ne&&lA(Ne.elementType)&&(Bt=m5):Bt=Qme;if(Bt&&(Bt=Bt(d,Ne))){h5(ot,Bt,b,Ze);break e}_n&&_n(d,Fe,Ne),d==="focusout"&&Ne&&Fe.type==="number"&&Ne.memoizedProps.value!=null&&sA(Fe,"number",Fe.value)}switch(_n=Ne?ul(Ne):window,d){case"focusin":(p5(_n)||_n.contentEditable==="true")&&(lm=_n,wA=Ne,sb=null);break;case"focusout":sb=wA=lm=null;break;case"mousedown":CA=!0;break;case"contextmenu":case"mouseup":case"dragend":CA=!1,E5(ot,b,Ze);break;case"selectionchange":if(Zme)break;case"keydown":case"keyup":E5(ot,b,Ze)}var qt;if(vA)e:{switch(d){case"compositionstart":var an="onCompositionStart";break e;case"compositionend":an="onCompositionEnd";break e;case"compositionupdate":an="onCompositionUpdate";break e}an=void 0}else sm?d5(d,b)&&(an="onCompositionEnd"):d==="keydown"&&b.keyCode===229&&(an="onCompositionStart");an&&(l5&&b.locale!=="ko"&&(sm||an!=="onCompositionStart"?an==="onCompositionEnd"&&sm&&(qt=r5()):(fd=Ze,pA="value"in fd?fd.value:fd.textContent,sm=!0)),_n=QC(Ne,an),0<_n.length&&(an=new a5(an,d,null,b,Ze),ot.push({event:an,listeners:_n}),qt?an.data=qt:(qt=f5(b),qt!==null&&(an.data=qt)))),(qt=Hme?Ume(d,b):Gme(d,b))&&(an=QC(Ne,"onBeforeInput"),0<an.length&&(_n=new a5("onBeforeInput","beforeinput",null,b,Ze),ot.push({event:_n,listeners:an}),_n.data=qt)),$ge(ot,d,Ne,b,Ze)}K4(ot,p)})}function $b(d,p,b){return{instance:d,listener:p,currentTarget:b}}function QC(d,p){for(var b=p+"Capture",T=[];d!==null;){var $=d,F=$.stateNode;if($=$.tag,$!==5&&$!==26&&$!==27||F===null||($=Zv(d,b),$!=null&&T.unshift($b(d,$,F)),$=Zv(d,p),$!=null&&T.push($b(d,$,F))),d.tag===3)return T;d=d.return}return[]}function Dm(d){if(d===null)return null;do d=d.return;while(d&&d.tag!==5&&d.tag!==27);return d||null}function Q4(d,p,b,T,$){for(var F=p._reactName,X=[];b!==null&&b!==T;){var re=b,ge=re.alternate,Ne=re.stateNode;if(re=re.tag,ge!==null&&ge===T)break;re!==5&&re!==26&&re!==27||Ne===null||(ge=Ne,$?(Ne=Zv(b,F),Ne!=null&&X.unshift($b(b,Ne,ge))):$||(Ne=Zv(b,F),Ne!=null&&X.push($b(b,Ne,ge)))),b=b.return}X.length!==0&&d.push({event:p,listeners:X})}var jge=/\r\n?/g,Bge=/\u0000|\uFFFD/g;function X4(d){return(typeof d=="string"?d:""+d).replace(jge,`
-`).replace(Bge,"")}function J4(d,p){return p=X4(p),X4(d)===p}function XC(){}function xr(d,p,b,T,$,F){switch(b){case"children":typeof T=="string"?p==="body"||p==="textarea"&&T===""||om(d,T):(typeof T=="number"||typeof T=="bigint")&&p!=="body"&&om(d,""+T);break;case"className":Xf(d,"class",T);break;case"tabIndex":Xf(d,"tabindex",T);break;case"dir":case"role":case"viewBox":case"width":case"height":Xf(d,b,T);break;case"style":e5(d,T,F);break;case"data":if(p!=="object"){Xf(d,"data",T);break}case"src":case"href":if(T===""&&(p!=="a"||b!=="href")){d.removeAttribute(b);break}if(T==null||typeof T=="function"||typeof T=="symbol"||typeof T=="boolean"){d.removeAttribute(b);break}T=iC(""+T),d.setAttribute(b,T);break;case"action":case"formAction":if(typeof T=="function"){d.setAttribute(b,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof F=="function"&&(b==="formAction"?(p!=="input"&&xr(d,p,"name",$.name,$,null),xr(d,p,"formEncType",$.formEncType,$,null),xr(d,p,"formMethod",$.formMethod,$,null),xr(d,p,"formTarget",$.formTarget,$,null)):(xr(d,p,"encType",$.encType,$,null),xr(d,p,"method",$.method,$,null),xr(d,p,"target",$.target,$,null)));if(T==null||typeof T=="symbol"||typeof T=="boolean"){d.removeAttribute(b);break}T=iC(""+T),d.setAttribute(b,T);break;case"onClick":T!=null&&(d.onclick=XC);break;case"onScroll":T!=null&&Fn("scroll",d);break;case"onScrollEnd":T!=null&&Fn("scrollend",d);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(b=T.__html,b!=null){if($.children!=null)throw Error(r(60));d.innerHTML=b}}break;case"multiple":d.multiple=T&&typeof T!="function"&&typeof T!="symbol";break;case"muted":d.muted=T&&typeof T!="function"&&typeof T!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(T==null||typeof T=="function"||typeof T=="boolean"||typeof T=="symbol"){d.removeAttribute("xlink:href");break}b=iC(""+T),d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":T!=null&&typeof T!="function"&&typeof T!="symbol"?d.setAttribute(b,""+T):d.removeAttribute(b);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":T&&typeof T!="function"&&typeof T!="symbol"?d.setAttribute(b,""):d.removeAttribute(b);break;case"capture":case"download":T===!0?d.setAttribute(b,""):T!==!1&&T!=null&&typeof T!="function"&&typeof T!="symbol"?d.setAttribute(b,T):d.removeAttribute(b);break;case"cols":case"rows":case"size":case"span":T!=null&&typeof T!="function"&&typeof T!="symbol"&&!isNaN(T)&&1<=T?d.setAttribute(b,T):d.removeAttribute(b);break;case"rowSpan":case"start":T==null||typeof T=="function"||typeof T=="symbol"||isNaN(T)?d.removeAttribute(b):d.setAttribute(b,T);break;case"popover":Fn("beforetoggle",d),Fn("toggle",d),nm(d,"popover",T);break;case"xlinkActuate":ca(d,"http://www.w3.org/1999/xlink","xlink:actuate",T);break;case"xlinkArcrole":ca(d,"http://www.w3.org/1999/xlink","xlink:arcrole",T);break;case"xlinkRole":ca(d,"http://www.w3.org/1999/xlink","xlink:role",T);break;case"xlinkShow":ca(d,"http://www.w3.org/1999/xlink","xlink:show",T);break;case"xlinkTitle":ca(d,"http://www.w3.org/1999/xlink","xlink:title",T);break;case"xlinkType":ca(d,"http://www.w3.org/1999/xlink","xlink:type",T);break;case"xmlBase":ca(d,"http://www.w3.org/XML/1998/namespace","xml:base",T);break;case"xmlLang":ca(d,"http://www.w3.org/XML/1998/namespace","xml:lang",T);break;case"xmlSpace":ca(d,"http://www.w3.org/XML/1998/namespace","xml:space",T);break;case"is":nm(d,"is",T);break;case"innerText":case"textContent":break;default:(!(2<b.length)||b[0]!=="o"&&b[0]!=="O"||b[1]!=="n"&&b[1]!=="N")&&(b=gme.get(b)||b,nm(d,b,T))}}function qM(d,p,b,T,$,F){switch(b){case"style":e5(d,T,F);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(b=T.__html,b!=null){if($.children!=null)throw Error(r(60));d.innerHTML=b}}break;case"children":typeof T=="string"?om(d,T):(typeof T=="number"||typeof T=="bigint")&&om(d,""+T);break;case"onScroll":T!=null&&Fn("scroll",d);break;case"onScrollEnd":T!=null&&Fn("scrollend",d);break;case"onClick":T!=null&&(d.onclick=XC);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$t.hasOwnProperty(b))e:{if(b[0]==="o"&&b[1]==="n"&&($=b.endsWith("Capture"),p=b.slice(2,$?b.length-7:void 0),F=d[Xt]||null,F=F!=null?F[b]:null,typeof F=="function"&&d.removeEventListener(p,F,$),typeof T=="function")){typeof F!="function"&&F!==null&&(b in d?d[b]=null:d.hasAttribute(b)&&d.removeAttribute(b)),d.addEventListener(p,T,$);break e}b in d?d[b]=T:T===!0?d.setAttribute(b,""):nm(d,b,T)}}}function mi(d,p,b){switch(p){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fn("error",d),Fn("load",d);var T=!1,$=!1,F;for(F in b)if(b.hasOwnProperty(F)){var X=b[F];if(X!=null)switch(F){case"src":T=!0;break;case"srcSet":$=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,p));default:xr(d,p,F,X,b,null)}}$&&xr(d,p,"srcSet",b.srcSet,b,null),T&&xr(d,p,"src",b.src,b,null);return;case"input":Fn("invalid",d);var re=F=X=$=null,ge=null,Ne=null;for(T in b)if(b.hasOwnProperty(T)){var Ze=b[T];if(Ze!=null)switch(T){case"name":$=Ze;break;case"type":X=Ze;break;case"checked":ge=Ze;break;case"defaultChecked":Ne=Ze;break;case"value":F=Ze;break;case"defaultValue":re=Ze;break;case"children":case"dangerouslySetInnerHTML":if(Ze!=null)throw Error(r(137,p));break;default:xr(d,p,T,Ze,b,null)}}QH(d,F,re,ge,Ne,X,$,!1),rC(d);return;case"select":Fn("invalid",d),T=X=F=null;for($ in b)if(b.hasOwnProperty($)&&(re=b[$],re!=null))switch($){case"value":F=re;break;case"defaultValue":X=re;break;case"multiple":T=re;default:xr(d,p,$,re,b,null)}p=F,b=X,d.multiple=!!T,p!=null?rm(d,!!T,p,!1):b!=null&&rm(d,!!T,b,!0);return;case"textarea":Fn("invalid",d),F=$=T=null;for(X in b)if(b.hasOwnProperty(X)&&(re=b[X],re!=null))switch(X){case"value":T=re;break;case"defaultValue":$=re;break;case"children":F=re;break;case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(91));break;default:xr(d,p,X,re,b,null)}JH(d,T,$,F),rC(d);return;case"option":for(ge in b)if(b.hasOwnProperty(ge)&&(T=b[ge],T!=null))switch(ge){case"selected":d.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:xr(d,p,ge,T,b,null)}return;case"dialog":Fn("beforetoggle",d),Fn("toggle",d),Fn("cancel",d),Fn("close",d);break;case"iframe":case"object":Fn("load",d);break;case"video":case"audio":for(T=0;T<_b.length;T++)Fn(_b[T],d);break;case"image":Fn("error",d),Fn("load",d);break;case"details":Fn("toggle",d);break;case"embed":case"source":case"link":Fn("error",d),Fn("load",d);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ne in b)if(b.hasOwnProperty(Ne)&&(T=b[Ne],T!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,p));default:xr(d,p,Ne,T,b,null)}return;default:if(lA(p)){for(Ze in b)b.hasOwnProperty(Ze)&&(T=b[Ze],T!==void 0&&qM(d,p,Ze,T,b,void 0));return}}for(re in b)b.hasOwnProperty(re)&&(T=b[re],T!=null&&xr(d,p,re,T,b,null))}function zge(d,p,b,T){switch(p){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var $=null,F=null,X=null,re=null,ge=null,Ne=null,Ze=null;for(ze in b){var ot=b[ze];if(b.hasOwnProperty(ze)&&ot!=null)switch(ze){case"checked":break;case"value":break;case"defaultValue":ge=ot;default:T.hasOwnProperty(ze)||xr(d,p,ze,null,T,ot)}}for(var Fe in T){var ze=T[Fe];if(ot=b[Fe],T.hasOwnProperty(Fe)&&(ze!=null||ot!=null))switch(Fe){case"type":F=ze;break;case"name":$=ze;break;case"checked":Ne=ze;break;case"defaultChecked":Ze=ze;break;case"value":X=ze;break;case"defaultValue":re=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(r(137,p));break;default:ze!==ot&&xr(d,p,Fe,ze,T,ot)}}aA(d,X,re,ge,Ne,Ze,F,$);return;case"select":ze=X=re=Fe=null;for(F in b)if(ge=b[F],b.hasOwnProperty(F)&&ge!=null)switch(F){case"value":break;case"multiple":ze=ge;default:T.hasOwnProperty(F)||xr(d,p,F,null,T,ge)}for($ in T)if(F=T[$],ge=b[$],T.hasOwnProperty($)&&(F!=null||ge!=null))switch($){case"value":Fe=F;break;case"defaultValue":re=F;break;case"multiple":X=F;default:F!==ge&&xr(d,p,$,F,T,ge)}p=re,b=X,T=ze,Fe!=null?rm(d,!!b,Fe,!1):!!T!=!!b&&(p!=null?rm(d,!!b,p,!0):rm(d,!!b,b?[]:"",!1));return;case"textarea":ze=Fe=null;for(re in b)if($=b[re],b.hasOwnProperty(re)&&$!=null&&!T.hasOwnProperty(re))switch(re){case"value":break;case"children":break;default:xr(d,p,re,null,T,$)}for(X in T)if($=T[X],F=b[X],T.hasOwnProperty(X)&&($!=null||F!=null))switch(X){case"value":Fe=$;break;case"defaultValue":ze=$;break;case"children":break;case"dangerouslySetInnerHTML":if($!=null)throw Error(r(91));break;default:$!==F&&xr(d,p,X,$,T,F)}XH(d,Fe,ze);return;case"option":for(var fn in b)if(Fe=b[fn],b.hasOwnProperty(fn)&&Fe!=null&&!T.hasOwnProperty(fn))switch(fn){case"selected":d.selected=!1;break;default:xr(d,p,fn,null,T,Fe)}for(ge in T)if(Fe=T[ge],ze=b[ge],T.hasOwnProperty(ge)&&Fe!==ze&&(Fe!=null||ze!=null))switch(ge){case"selected":d.selected=Fe&&typeof Fe!="function"&&typeof Fe!="symbol";break;default:xr(d,p,ge,Fe,T,ze)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var nn in b)Fe=b[nn],b.hasOwnProperty(nn)&&Fe!=null&&!T.hasOwnProperty(nn)&&xr(d,p,nn,null,T,Fe);for(Ne in T)if(Fe=T[Ne],ze=b[Ne],T.hasOwnProperty(Ne)&&Fe!==ze&&(Fe!=null||ze!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":if(Fe!=null)throw Error(r(137,p));break;default:xr(d,p,Ne,Fe,T,ze)}return;default:if(lA(p)){for(var Sr in b)Fe=b[Sr],b.hasOwnProperty(Sr)&&Fe!==void 0&&!T.hasOwnProperty(Sr)&&qM(d,p,Sr,void 0,T,Fe);for(Ze in T)Fe=T[Ze],ze=b[Ze],!T.hasOwnProperty(Ze)||Fe===ze||Fe===void 0&&ze===void 0||qM(d,p,Ze,Fe,T,ze);return}}for(var Ae in b)Fe=b[Ae],b.hasOwnProperty(Ae)&&Fe!=null&&!T.hasOwnProperty(Ae)&&xr(d,p,Ae,null,T,Fe);for(ot in T)Fe=T[ot],ze=b[ot],!T.hasOwnProperty(ot)||Fe===ze||Fe==null&&ze==null||xr(d,p,ot,Fe,T,ze)}var WM=null,KM=null;function JC(d){return d.nodeType===9?d:d.ownerDocument}function Z4(d){switch(d){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function e3(d,p){if(d===0)switch(p){case"svg":return 1;case"math":return 2;default:return 0}return d===1&&p==="foreignObject"?0:d}function YM(d,p){return d==="textarea"||d==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.children=="bigint"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var QM=null;function Vge(){var d=window.event;return d&&d.type==="popstate"?d===QM?!1:(QM=d,!0):(QM=null,!1)}var t3=typeof setTimeout=="function"?setTimeout:void 0,Hge=typeof clearTimeout=="function"?clearTimeout:void 0,n3=typeof Promise=="function"?Promise:void 0,Uge=typeof queueMicrotask=="function"?queueMicrotask:typeof n3<"u"?function(d){return n3.resolve(null).then(d).catch(Gge)}:t3;function Gge(d){setTimeout(function(){throw d})}function Pd(d){return d==="head"}function r3(d,p){var b=p,T=0,$=0;do{var F=b.nextSibling;if(d.removeChild(b),F&&F.nodeType===8)if(b=F.data,b==="/$"){if(0<T&&8>T){b=T;var X=d.ownerDocument;if(b&1&&Nb(X.documentElement),b&2&&Nb(X.body),b&4)for(b=X.head,Nb(b),X=b.firstChild;X;){var re=X.nextSibling,ge=X.nodeName;X[Ii]||ge==="SCRIPT"||ge==="STYLE"||ge==="LINK"&&X.rel.toLowerCase()==="stylesheet"||b.removeChild(X),X=re}}if($===0){d.removeChild(F),Ub(p);return}$--}else b==="$"||b==="$?"||b==="$!"?$++:T=b.charCodeAt(0)-48;else T=0;b=F}while(b);Ub(p)}function XM(d){var p=d.firstChild;for(p&&p.nodeType===10&&(p=p.nextSibling);p;){var b=p;switch(p=p.nextSibling,b.nodeName){case"HTML":case"HEAD":case"BODY":XM(b),vo(b);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(b.rel.toLowerCase()==="stylesheet")continue}d.removeChild(b)}}function qge(d,p,b,T){for(;d.nodeType===1;){var $=b;if(d.nodeName.toLowerCase()!==p.toLowerCase()){if(!T&&(d.nodeName!=="INPUT"||d.type!=="hidden"))break}else if(T){if(!d[Ii])switch(p){case"meta":if(!d.hasAttribute("itemprop"))break;return d;case"link":if(F=d.getAttribute("rel"),F==="stylesheet"&&d.hasAttribute("data-precedence"))break;if(F!==$.rel||d.getAttribute("href")!==($.href==null||$.href===""?null:$.href)||d.getAttribute("crossorigin")!==($.crossOrigin==null?null:$.crossOrigin)||d.getAttribute("title")!==($.title==null?null:$.title))break;return d;case"style":if(d.hasAttribute("data-precedence"))break;return d;case"script":if(F=d.getAttribute("src"),(F!==($.src==null?null:$.src)||d.getAttribute("type")!==($.type==null?null:$.type)||d.getAttribute("crossorigin")!==($.crossOrigin==null?null:$.crossOrigin))&&F&&d.hasAttribute("async")&&!d.hasAttribute("itemprop"))break;return d;default:return d}}else if(p==="input"&&d.type==="hidden"){var F=$.name==null?null:""+$.name;if($.type==="hidden"&&d.getAttribute("name")===F)return d}else return d;if(d=hl(d.nextSibling),d===null)break}return null}function Wge(d,p,b){if(p==="")return null;for(;d.nodeType!==3;)if((d.nodeType!==1||d.nodeName!=="INPUT"||d.type!=="hidden")&&!b||(d=hl(d.nextSibling),d===null))return null;return d}function JM(d){return d.data==="$!"||d.data==="$?"&&d.ownerDocument.readyState==="complete"}function Kge(d,p){var b=d.ownerDocument;if(d.data!=="$?"||b.readyState==="complete")p();else{var T=function(){p(),b.removeEventListener("DOMContentLoaded",T)};b.addEventListener("DOMContentLoaded",T),d._reactRetry=T}}function hl(d){for(;d!=null;d=d.nextSibling){var p=d.nodeType;if(p===1||p===3)break;if(p===8){if(p=d.data,p==="$"||p==="$!"||p==="$?"||p==="F!"||p==="F")break;if(p==="/$")return null}}return d}var ZM=null;function o3(d){d=d.previousSibling;for(var p=0;d;){if(d.nodeType===8){var b=d.data;if(b==="$"||b==="$!"||b==="$?"){if(p===0)return d;p--}else b==="/$"&&p++}d=d.previousSibling}return null}function i3(d,p,b){switch(p=JC(b),d){case"html":if(d=p.documentElement,!d)throw Error(r(452));return d;case"head":if(d=p.head,!d)throw Error(r(453));return d;case"body":if(d=p.body,!d)throw Error(r(454));return d;default:throw Error(r(451))}}function Nb(d){for(var p=d.attributes;p.length;)d.removeAttributeNode(p[0]);vo(d)}var Cs=new Map,a3=new Set;function ZC(d){return typeof d.getRootNode=="function"?d.getRootNode():d.nodeType===9?d:d.ownerDocument}var hu=V.d;V.d={f:Yge,r:Qge,D:Xge,C:Jge,L:Zge,m:eye,X:nye,S:tye,M:rye};function Yge(){var d=hu.f(),p=UC();return d||p}function Qge(d){var p=zi(d);p!==null&&p.tag===5&&p.type==="form"?OU(p):hu.r(d)}var km=typeof document>"u"?null:document;function s3(d,p,b){var T=km;if(T&&typeof p=="string"&&p){var $=gs(p);$='link[rel="'+d+'"][href="'+$+'"]',typeof b=="string"&&($+='[crossorigin="'+b+'"]'),a3.has($)||(a3.add($),d={rel:d,crossOrigin:b,href:p},T.querySelector($)===null&&(p=T.createElement("link"),mi(p,"link",d),He(p),T.head.appendChild(p)))}}function Xge(d){hu.D(d),s3("dns-prefetch",d,null)}function Jge(d,p){hu.C(d,p),s3("preconnect",d,p)}function Zge(d,p,b){hu.L(d,p,b);var T=km;if(T&&d&&p){var $='link[rel="preload"][as="'+gs(p)+'"]';p==="image"&&b&&b.imageSrcSet?($+='[imagesrcset="'+gs(b.imageSrcSet)+'"]',typeof b.imageSizes=="string"&&($+='[imagesizes="'+gs(b.imageSizes)+'"]')):$+='[href="'+gs(d)+'"]';var F=$;switch(p){case"style":F=_m(d);break;case"script":F=$m(d)}Cs.has(F)||(d=u({rel:"preload",href:p==="image"&&b&&b.imageSrcSet?void 0:d,as:p},b),Cs.set(F,d),T.querySelector($)!==null||p==="style"&&T.querySelector(Lb(F))||p==="script"&&T.querySelector(Fb(F))||(p=T.createElement("link"),mi(p,"link",d),He(p),T.head.appendChild(p)))}}function eye(d,p){hu.m(d,p);var b=km;if(b&&d){var T=p&&typeof p.as=="string"?p.as:"script",$='link[rel="modulepreload"][as="'+gs(T)+'"][href="'+gs(d)+'"]',F=$;switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":F=$m(d)}if(!Cs.has(F)&&(d=u({rel:"modulepreload",href:d},p),Cs.set(F,d),b.querySelector($)===null)){switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(b.querySelector(Fb(F)))return}T=b.createElement("link"),mi(T,"link",d),He(T),b.head.appendChild(T)}}}function tye(d,p,b){hu.S(d,p,b);var T=km;if(T&&d){var $=dl(T).hoistableStyles,F=_m(d);p=p||"default";var X=$.get(F);if(!X){var re={loading:0,preload:null};if(X=T.querySelector(Lb(F)))re.loading=5;else{d=u({rel:"stylesheet",href:d,"data-precedence":p},b),(b=Cs.get(F))&&eR(d,b);var ge=X=T.createElement("link");He(ge),mi(ge,"link",d),ge._p=new Promise(function(Ne,Ze){ge.onload=Ne,ge.onerror=Ze}),ge.addEventListener("load",function(){re.loading|=1}),ge.addEventListener("error",function(){re.loading|=2}),re.loading|=4,e1(X,p,T)}X={type:"stylesheet",instance:X,count:1,state:re},$.set(F,X)}}}function nye(d,p){hu.X(d,p);var b=km;if(b&&d){var T=dl(b).hoistableScripts,$=$m(d),F=T.get($);F||(F=b.querySelector(Fb($)),F||(d=u({src:d,async:!0},p),(p=Cs.get($))&&tR(d,p),F=b.createElement("script"),He(F),mi(F,"link",d),b.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},T.set($,F))}}function rye(d,p){hu.M(d,p);var b=km;if(b&&d){var T=dl(b).hoistableScripts,$=$m(d),F=T.get($);F||(F=b.querySelector(Fb($)),F||(d=u({src:d,async:!0,type:"module"},p),(p=Cs.get($))&&tR(d,p),F=b.createElement("script"),He(F),mi(F,"link",d),b.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},T.set($,F))}}function l3(d,p,b,T){var $=($=ce.current)?ZC($):null;if(!$)throw Error(r(446));switch(d){case"meta":case"title":return null;case"style":return typeof b.precedence=="string"&&typeof b.href=="string"?(p=_m(b.href),b=dl($).hoistableStyles,T=b.get(p),T||(T={type:"style",instance:null,count:0,state:null},b.set(p,T)),T):{type:"void",instance:null,count:0,state:null};case"link":if(b.rel==="stylesheet"&&typeof b.href=="string"&&typeof b.precedence=="string"){d=_m(b.href);var F=dl($).hoistableStyles,X=F.get(d);if(X||($=$.ownerDocument||$,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},F.set(d,X),(F=$.querySelector(Lb(d)))&&!F._p&&(X.instance=F,X.state.loading=5),Cs.has(d)||(b={rel:"preload",as:"style",href:b.href,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy},Cs.set(d,b),F||oye($,d,b,X.state))),p&&T===null)throw Error(r(528,""));return X}if(p&&T!==null)throw Error(r(529,""));return null;case"script":return p=b.async,b=b.src,typeof b=="string"&&p&&typeof p!="function"&&typeof p!="symbol"?(p=$m(b),b=dl($).hoistableScripts,T=b.get(p),T||(T={type:"script",instance:null,count:0,state:null},b.set(p,T)),T):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,d))}}function _m(d){return'href="'+gs(d)+'"'}function Lb(d){return'link[rel="stylesheet"]['+d+"]"}function c3(d){return u({},d,{"data-precedence":d.precedence,precedence:null})}function oye(d,p,b,T){d.querySelector('link[rel="preload"][as="style"]['+p+"]")?T.loading=1:(p=d.createElement("link"),T.preload=p,p.addEventListener("load",function(){return T.loading|=1}),p.addEventListener("error",function(){return T.loading|=2}),mi(p,"link",b),He(p),d.head.appendChild(p))}function $m(d){return'[src="'+gs(d)+'"]'}function Fb(d){return"script[async]"+d}function u3(d,p,b){if(p.count++,p.instance===null)switch(p.type){case"style":var T=d.querySelector('style[data-href~="'+gs(b.href)+'"]');if(T)return p.instance=T,He(T),T;var $=u({},b,{"data-href":b.href,"data-precedence":b.precedence,href:null,precedence:null});return T=(d.ownerDocument||d).createElement("style"),He(T),mi(T,"style",$),e1(T,b.precedence,d),p.instance=T;case"stylesheet":$=_m(b.href);var F=d.querySelector(Lb($));if(F)return p.state.loading|=4,p.instance=F,He(F),F;T=c3(b),($=Cs.get($))&&eR(T,$),F=(d.ownerDocument||d).createElement("link"),He(F);var X=F;return X._p=new Promise(function(re,ge){X.onload=re,X.onerror=ge}),mi(F,"link",T),p.state.loading|=4,e1(F,b.precedence,d),p.instance=F;case"script":return F=$m(b.src),($=d.querySelector(Fb(F)))?(p.instance=$,He($),$):(T=b,($=Cs.get(F))&&(T=u({},b),tR(T,$)),d=d.ownerDocument||d,$=d.createElement("script"),He($),mi($,"link",T),d.head.appendChild($),p.instance=$);case"void":return null;default:throw Error(r(443,p.type))}else p.type==="stylesheet"&&(p.state.loading&4)===0&&(T=p.instance,p.state.loading|=4,e1(T,b.precedence,d));return p.instance}function e1(d,p,b){for(var T=b.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),$=T.length?T[T.length-1]:null,F=$,X=0;X<T.length;X++){var re=T[X];if(re.dataset.precedence===p)F=re;else if(F!==$)break}F?F.parentNode.insertBefore(d,F.nextSibling):(p=b.nodeType===9?b.head:b,p.insertBefore(d,p.firstChild))}function eR(d,p){d.crossOrigin==null&&(d.crossOrigin=p.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=p.referrerPolicy),d.title==null&&(d.title=p.title)}function tR(d,p){d.crossOrigin==null&&(d.crossOrigin=p.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=p.referrerPolicy),d.integrity==null&&(d.integrity=p.integrity)}var t1=null;function d3(d,p,b){if(t1===null){var T=new Map,$=t1=new Map;$.set(b,T)}else $=t1,T=$.get(b),T||(T=new Map,$.set(b,T));if(T.has(d))return T;for(T.set(d,null),b=b.getElementsByTagName(d),$=0;$<b.length;$++){var F=b[$];if(!(F[Ii]||F[Ut]||d==="link"&&F.getAttribute("rel")==="stylesheet")&&F.namespaceURI!=="http://www.w3.org/2000/svg"){var X=F.getAttribute(p)||"";X=d+X;var re=T.get(X);re?re.push(F):T.set(X,[F])}}return T}function f3(d,p,b){d=d.ownerDocument||d,d.head.insertBefore(b,p==="title"?d.querySelector("head > title"):null)}function iye(d,p,b){if(b===1||p.itemProp!=null)return!1;switch(d){case"meta":case"title":return!0;case"style":if(typeof p.precedence!="string"||typeof p.href!="string"||p.href==="")break;return!0;case"link":if(typeof p.rel!="string"||typeof p.href!="string"||p.href===""||p.onLoad||p.onError)break;switch(p.rel){case"stylesheet":return d=p.disabled,typeof p.precedence=="string"&&d==null;default:return!0}case"script":if(p.async&&typeof p.async!="function"&&typeof p.async!="symbol"&&!p.onLoad&&!p.onError&&p.src&&typeof p.src=="string")return!0}return!1}function p3(d){return!(d.type==="stylesheet"&&(d.state.loading&3)===0)}var jb=null;function aye(){}function sye(d,p,b){if(jb===null)throw Error(r(475));var T=jb;if(p.type==="stylesheet"&&(typeof b.media!="string"||matchMedia(b.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var $=_m(b.href),F=d.querySelector(Lb($));if(F){d=F._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(T.count++,T=n1.bind(T),d.then(T,T)),p.state.loading|=4,p.instance=F,He(F);return}F=d.ownerDocument||d,b=c3(b),($=Cs.get($))&&eR(b,$),F=F.createElement("link"),He(F);var X=F;X._p=new Promise(function(re,ge){X.onload=re,X.onerror=ge}),mi(F,"link",b),p.instance=F}T.stylesheets===null&&(T.stylesheets=new Map),T.stylesheets.set(p,d),(d=p.state.preload)&&(p.state.loading&3)===0&&(T.count++,p=n1.bind(T),d.addEventListener("load",p),d.addEventListener("error",p))}}function lye(){if(jb===null)throw Error(r(475));var d=jb;return d.stylesheets&&d.count===0&&nR(d,d.stylesheets),0<d.count?function(p){var b=setTimeout(function(){if(d.stylesheets&&nR(d,d.stylesheets),d.unsuspend){var T=d.unsuspend;d.unsuspend=null,T()}},6e4);return d.unsuspend=p,function(){d.unsuspend=null,clearTimeout(b)}}:null}function n1(){if(this.count--,this.count===0){if(this.stylesheets)nR(this,this.stylesheets);else if(this.unsuspend){var d=this.unsuspend;this.unsuspend=null,d()}}}var r1=null;function nR(d,p){d.stylesheets=null,d.unsuspend!==null&&(d.count++,r1=new Map,p.forEach(cye,d),r1=null,n1.call(d))}function cye(d,p){if(!(p.state.loading&4)){var b=r1.get(d);if(b)var T=b.get(null);else{b=new Map,r1.set(d,b);for(var $=d.querySelectorAll("link[data-precedence],style[data-precedence]"),F=0;F<$.length;F++){var X=$[F];(X.nodeName==="LINK"||X.getAttribute("media")!=="not all")&&(b.set(X.dataset.precedence,X),T=X)}T&&b.set(null,T)}$=p.instance,X=$.getAttribute("data-precedence"),F=b.get(X)||T,F===T&&b.set(null,$),b.set(X,$),this.count++,T=n1.bind(this),$.addEventListener("load",T),$.addEventListener("error",T),F?F.parentNode.insertBefore($,F.nextSibling):(d=d.nodeType===9?d.head:d,d.insertBefore($,d.firstChild)),p.state.loading|=4}}var Bb={$$typeof:E,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function uye(d,p,b,T,$,F,X,re){this.tag=1,this.containerInfo=d,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nr(0),this.hiddenUpdates=nr(null),this.identifierPrefix=T,this.onUncaughtError=$,this.onCaughtError=F,this.onRecoverableError=X,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function h3(d,p,b,T,$,F,X,re,ge,Ne,Ze,ot){return d=new uye(d,p,b,X,re,ge,Ne,ot),p=1,F===!0&&(p|=24),F=_a(3,null,null,p),d.current=F,F.stateNode=d,p=LA(),p.refCount++,d.pooledCache=p,p.refCount++,F.memoizedState={element:T,isDehydrated:b,cache:p},zA(F),d}function m3(d){return d?(d=fm,d):fm}function g3(d,p,b,T,$,F){$=m3($),T.context===null?T.context=$:T.pendingContext=$,T=md(p),T.payload={element:b},F=F===void 0?null:F,F!==null&&(T.callback=F),b=gd(d,T,p),b!==null&&(ja(b,d,p),gb(b,d,p))}function y3(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var b=d.retryLane;d.retryLane=b!==0&&b<p?b:p}}function rR(d,p){y3(d,p),(d=d.alternate)&&y3(d,p)}function v3(d){if(d.tag===13){var p=dm(d,67108864);p!==null&&ja(p,d,67108864),rR(d,67108864)}}var o1=!0;function dye(d,p,b,T){var $=L.T;L.T=null;var F=V.p;try{V.p=2,oR(d,p,b,T)}finally{V.p=F,L.T=$}}function fye(d,p,b,T){var $=L.T;L.T=null;var F=V.p;try{V.p=8,oR(d,p,b,T)}finally{V.p=F,L.T=$}}function oR(d,p,b,T){if(o1){var $=iR(T);if($===null)GM(d,p,T,i1,b),x3(d,T);else if(hye($,d,p,b,T))T.stopPropagation();else if(x3(d,T),p&4&&-1<pye.indexOf(d)){for(;$!==null;){var F=zi($);if(F!==null)switch(F.tag){case 3:if(F=F.stateNode,F.current.memoizedState.isDehydrated){var X=lt(F.pendingLanes);if(X!==0){var re=F;for(re.pendingLanes|=2,re.entangledLanes|=2;X;){var ge=1<<31-Be(X);re.entanglements[1]|=ge,X&=~ge}lc(F),(mr&6)===0&&(VC=Re()+500,kb(0))}}break;case 13:re=dm(F,2),re!==null&&ja(re,F,2),UC(),rR(F,2)}if(F=iR(T),F===null&&GM(d,p,T,i1,b),F===$)break;$=F}$!==null&&T.stopPropagation()}else GM(d,p,T,null,b)}}function iR(d){return d=uA(d),aR(d)}var i1=null;function aR(d){if(i1=null,d=Fr(d),d!==null){var p=i(d);if(p===null)d=null;else{var b=p.tag;if(b===13){if(d=a(p),d!==null)return d;d=null}else if(b===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;d=null}else p!==d&&(d=null)}}return i1=d,null}function b3(d){switch(d){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(he()){case Pe:return 2;case ve:return 8;case Ie:case te:return 32;case Te:return 268435456;default:return 32}default:return 32}}var sR=!1,Ad=null,Md=null,Rd=null,zb=new Map,Vb=new Map,Dd=[],pye="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function x3(d,p){switch(d){case"focusin":case"focusout":Ad=null;break;case"dragenter":case"dragleave":Md=null;break;case"mouseover":case"mouseout":Rd=null;break;case"pointerover":case"pointerout":zb.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vb.delete(p.pointerId)}}function Hb(d,p,b,T,$,F){return d===null||d.nativeEvent!==F?(d={blockedOn:p,domEventName:b,eventSystemFlags:T,nativeEvent:F,targetContainers:[$]},p!==null&&(p=zi(p),p!==null&&v3(p)),d):(d.eventSystemFlags|=T,p=d.targetContainers,$!==null&&p.indexOf($)===-1&&p.push($),d)}function hye(d,p,b,T,$){switch(p){case"focusin":return Ad=Hb(Ad,d,p,b,T,$),!0;case"dragenter":return Md=Hb(Md,d,p,b,T,$),!0;case"mouseover":return Rd=Hb(Rd,d,p,b,T,$),!0;case"pointerover":var F=$.pointerId;return zb.set(F,Hb(zb.get(F)||null,d,p,b,T,$)),!0;case"gotpointercapture":return F=$.pointerId,Vb.set(F,Hb(Vb.get(F)||null,d,p,b,T,$)),!0}return!1}function S3(d){var p=Fr(d.target);if(p!==null){var b=i(p);if(b!==null){if(p=b.tag,p===13){if(p=a(b),p!==null){d.blockedOn=p,gt(d.priority,function(){if(b.tag===13){var T=Fa();T=Oi(T);var $=dm(b,T);$!==null&&ja($,b,T),rR(b,T)}});return}}else if(p===3&&b.stateNode.current.memoizedState.isDehydrated){d.blockedOn=b.tag===3?b.stateNode.containerInfo:null;return}}}d.blockedOn=null}function a1(d){if(d.blockedOn!==null)return!1;for(var p=d.targetContainers;0<p.length;){var b=iR(d.nativeEvent);if(b===null){b=d.nativeEvent;var T=new b.constructor(b.type,b);cA=T,b.target.dispatchEvent(T),cA=null}else return p=zi(b),p!==null&&v3(p),d.blockedOn=b,!1;p.shift()}return!0}function w3(d,p,b){a1(d)&&b.delete(p)}function mye(){sR=!1,Ad!==null&&a1(Ad)&&(Ad=null),Md!==null&&a1(Md)&&(Md=null),Rd!==null&&a1(Rd)&&(Rd=null),zb.forEach(w3),Vb.forEach(w3)}function s1(d,p){d.blockedOn===p&&(d.blockedOn=null,sR||(sR=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,mye)))}var l1=null;function C3(d){l1!==d&&(l1=d,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){l1===d&&(l1=null);for(var p=0;p<d.length;p+=3){var b=d[p],T=d[p+1],$=d[p+2];if(typeof T!="function"){if(aR(T||b)===null)continue;break}var F=zi(b);F!==null&&(d.splice(p,3),p-=3,aM(F,{pending:!0,data:$,method:b.method,action:T},T,$))}}))}function Ub(d){function p(ge){return s1(ge,d)}Ad!==null&&s1(Ad,d),Md!==null&&s1(Md,d),Rd!==null&&s1(Rd,d),zb.forEach(p),Vb.forEach(p);for(var b=0;b<Dd.length;b++){var T=Dd[b];T.blockedOn===d&&(T.blockedOn=null)}for(;0<Dd.length&&(b=Dd[0],b.blockedOn===null);)S3(b),b.blockedOn===null&&Dd.shift();if(b=(d.ownerDocument||d).$$reactFormReplay,b!=null)for(T=0;T<b.length;T+=3){var $=b[T],F=b[T+1],X=$[Xt]||null;if(typeof F=="function")X||C3(b);else if(X){var re=null;if(F&&F.hasAttribute("formAction")){if($=F,X=F[Xt]||null)re=X.formAction;else if(aR($)!==null)continue}else re=X.action;typeof re=="function"?b[T+1]=re:(b.splice(T,3),T-=3),C3(b)}}}function lR(d){this._internalRoot=d}c1.prototype.render=lR.prototype.render=function(d){var p=this._internalRoot;if(p===null)throw Error(r(409));var b=p.current,T=Fa();g3(b,T,d,p,null,null)},c1.prototype.unmount=lR.prototype.unmount=function(){var d=this._internalRoot;if(d!==null){this._internalRoot=null;var p=d.containerInfo;g3(d.current,2,null,d,null,null),UC(),p[Vn]=null}};function c1(d){this._internalRoot=d}c1.prototype.unstable_scheduleHydration=function(d){if(d){var p=un();d={blockedOn:null,target:d,priority:p};for(var b=0;b<Dd.length&&p!==0&&p<Dd[b].priority;b++);Dd.splice(b,0,d),b===0&&S3(d)}};var E3=t.version;if(E3!=="19.1.0")throw Error(r(527,E3,"19.1.0"));V.findDOMNode=function(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(r(188)):(d=Object.keys(d).join(","),Error(r(268,d)));return d=l(p),d=d!==null?c(d):null,d=d===null?null:d.stateNode,d};var gye={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var u1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!u1.isDisabled&&u1.supportsFiber)try{We=u1.inject(gye),rt=u1}catch{}}return b0.createRoot=function(d,p){if(!o(d))throw Error(r(299));var b=!1,T="",$=BU,F=zU,X=VU,re=null;return p!=null&&(p.unstable_strictMode===!0&&(b=!0),p.identifierPrefix!==void 0&&(T=p.identifierPrefix),p.onUncaughtError!==void 0&&($=p.onUncaughtError),p.onCaughtError!==void 0&&(F=p.onCaughtError),p.onRecoverableError!==void 0&&(X=p.onRecoverableError),p.unstable_transitionCallbacks!==void 0&&(re=p.unstable_transitionCallbacks)),p=h3(d,1,!1,null,null,b,T,$,F,X,re,null),d[Vn]=p.current,UM(d),new lR(p)},b0.hydrateRoot=function(d,p,b){if(!o(d))throw Error(r(299));var T=!1,$="",F=BU,X=zU,re=VU,ge=null,Ne=null;return b!=null&&(b.unstable_strictMode===!0&&(T=!0),b.identifierPrefix!==void 0&&($=b.identifierPrefix),b.onUncaughtError!==void 0&&(F=b.onUncaughtError),b.onCaughtError!==void 0&&(X=b.onCaughtError),b.onRecoverableError!==void 0&&(re=b.onRecoverableError),b.unstable_transitionCallbacks!==void 0&&(ge=b.unstable_transitionCallbacks),b.formState!==void 0&&(Ne=b.formState)),p=h3(d,1,!0,p,b??null,T,$,F,X,re,ge,Ne),p.context=m3(null),b=p.current,T=Fa(),T=Oi(T),$=md(T),$.callback=null,gd(b,$,T),b=T,p.current.lanes=b,Bn(p,b),lc(p),d[Vn]=p.current,UM(d),new c1(p)},b0.version="19.1.0",b0}var iJ;function Wct(){if(iJ)return u$.exports;iJ=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),u$.exports=qct(),u$.exports}var em=Wct();const Kct=()=>Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:4},children:S(Ede,{})}),S(me,{size:{xs:12,sm:4},children:S(Gue,{})}),S(me,{size:{xs:12,sm:4},children:S(Ide,{})})]}),zw=x.createContext({}),Pde=()=>{const{data:e,isLoading:t}=DP(),{selectedCategories:n,setSelectedCategories:r}=x.useContext(zw),[o]=je(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?S(Er,{}):S(ai,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return S(Co,{disablePadding:!0,children:Q(Fl,{role:void 0,onClick:i(a),dense:!0,children:[S(nl,{children:S(qo,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),S(Wr,{id:s,primary:a.translatedName})]})},a.id)})})},Yct=()=>{const[e]=je();return Q(Xj,{children:[S(Zj,{expandIcon:S(Du,{}),children:e("category")}),S(Jj,{children:S(Pde,{})})]})},Qct=()=>{const[e]=je();return S("div",{"data-testid":"categories",children:Q(go,{children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),S(Pde,{})]})})},Ade=()=>{const{data:e,isLoading:t}=kP(),{selectedEquipment:n,setSelectedEquipment:r}=x.useContext(zw),[o]=je(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?S(Er,{}):S(ai,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return S(Co,{disablePadding:!0,children:Q(Fl,{role:void 0,onClick:i(a),dense:!0,children:[S(nl,{children:S(qo,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),S(Wr,{id:s,primary:a.translatedName})]})},a.id)})})},Xct=()=>{const[e]=je();return Q(Xj,{children:[S(Zj,{expandIcon:S(Du,{}),children:e("exercises.equipment")}),S(Jj,{children:S(Ade,{})})]})},Jct=()=>{const[e]=je();return S("div",{"data-testid":"equipment",children:Q(go,{sx:{mt:2},children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),S(Ade,{})]})})},Zct=ae(({className:e,...t})=>S(Go,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${eo.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),Ql=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${LDe}${i})`).join(", ");return S("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})},Mde=()=>{const{data:e,isLoading:t}=_v(),{selectedMuscles:n,setSelectedMuscles:r}=x.useContext(zw),[o]=je(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?S(Er,{}):S(ai,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return S(Co,{disablePadding:!0,secondaryAction:S(Zct,{title:S(Ql,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:S(pn,{edge:"end","aria-label":"comments",children:S(rde,{})})}),children:Q(Fl,{role:void 0,onClick:i(a),dense:!0,children:[S(nl,{children:S(qo,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),S(Wr,{id:s,primary:a.name,secondary:a.nameEn!==""?a.translatedName:""})]})},a.id)})})},eut=()=>{const[e]=je();return Q(Xj,{children:[S(Zj,{expandIcon:S(Du,{}),children:e("exercises.muscles")}),S(Jj,{children:S(Mde,{})})]})},tut=()=>{const[e]=je();return S("div",{"data-testid":"muscles",children:Q(go,{sx:{mt:2},children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),S(Mde,{})]})})};function Wy({callback:e,loadExercise:t}){const[n,r]=x.useState(null),[o,i]=x.useState(""),[a,s]=x.useState(!0),[l,c]=x.useState([]),[u,f]=je();t=t===void 0?!1:t;const h=x.useMemo(()=>tue(m=>v2e(m,f.language,a).then(g=>c(g)),200),[f.language,a]);return x.useEffect(()=>{if(o===""){c(n?[n]:[]);return}return h(o),()=>{}},[n,o,h]),Q(Tt,{children:[S(_c,{id:"exercise-name-autocomplete",getOptionLabel:m=>m.value,"data-testid":"autocomplete",filterOptions:m=>m,options:l,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:n,noOptionsText:u("noResults"),isOptionEqualToValue:(m,g)=>m.value===g.value,onChange:async(m,g)=>{c(g?[g,...l]:l),r(g),t&&g!==null&&(g.exercise=await pv(g.data.base_id)),e(g)},onInputChange:(m,g)=>{i(g)},renderInput:m=>S(dn,{...m,label:u("exercises.searchExerciseName"),fullWidth:!0,slotProps:{input:{...m.InputProps,startAdornment:Q(Tt,{children:[S(So,{position:"start",children:S(yV,{})}),m.InputProps.startAdornment]})}}}),renderOption:(m,g,y)=>Sx("li",{...m,key:`exercise-${y.index}-${g.data.id}`,"data-testid":`autocompleter-result-${g.data.base_id}`},Q(Co,{disablePadding:!0,component:"div",children:[S(nl,{children:g.data.image?S(Kl,{alt:"",src:`${wB}${g.data.image}`,variant:"rounded"}):S(Ju,{fontSize:"large"})}),S(Wr,{primary:g.value,slotProps:{primary:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:g.data.category})]}))}),f.language!==uy&&S(Mx,{children:S(os,{control:S(qo,{checked:a,onChange:(m,g)=>s(g)}),label:u("alsoSearchEnglish")})})]})}const nut=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return S(Zt,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:S(Ju,{sx:{fontSize:80,color:n}})})},Rde=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new TB(bh,"en","English")),[r,o]=je();return S(ho,{sx:{width:"100%"},children:Q(TEe,{href:cn(Qt.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?S($c,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):S($c,{children:S(nut,{})}),Q(Fi,{children:[S(Go,{title:n.name,placement:"top",arrow:!0,children:S(at,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),S(Wl,{label:e.category.translatedName,sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>S(at,{display:"inline",mr:1,children:i.translatedName},i.id)),e.equipment.length===0&&S(at,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},rut=({exercises:e})=>{const t=Yc(),[n,r]=je();let o;return t.isSuccess&&(o=Gu(r.language,t.data)),S(me,{container:!0,spacing:1,children:e.map(i=>S(me,{sx:{display:"flex"},size:{xs:6,md:4},children:S(Rde,{exercise:i,language:o})},i.id))})},out=()=>S(me,{container:!0,spacing:1,children:[...Array(21)].map((e,t)=>S(me,{sx:{display:"flex"},size:4,children:Q(ho,{children:[S($c,{children:S(hE,{variant:"rectangular",width:250,height:150})}),S(Fi,{children:Q(Zt,{sx:{pt:.5},children:[S(hE,{width:"60%"}),S(hE,{})]})})]})},t))}),iut=({children:e})=>{const[t]=je(),[n,r]=x.useState(!1),o=i=>()=>{r(i)};return Q(Tt,{children:[S(ct,{onClick:o(!0),children:S(jst,{})}),Q(tOe,{open:n,onClose:o(!1),anchor:"right",children:[Q(Ft,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),S(ct,{onClick:o(!1),children:S(cw,{})})]}),S(ji,{}),e]})]})},aut=()=>{const[e,t]=je();return Q(Zt,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[S(at,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),S(at,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),S(Ro,{to:cn(Qt.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},sut=()=>{const e=ade(),[t,n]=je(),r=id(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=x.useContext(zw),s=Tf("(max-width:600px)"),[l,c]=J.useState(1),u=(v,w)=>{c(w),window.scrollTo({top:0,behavior:"smooth"})},f=x.useMemo(()=>{let v=e.data||[];return o.length>0&&(v=v.filter(w=>o.some(C=>w.category.id===C.id))),i.length>0&&(v=v.filter(w=>w.equipment.some(C=>i.some(E=>E.id===C.id)))),a.length>0&&(v=v.filter(w=>w.muscles.some(C=>a.some(E=>E.id===C.id)))),v},[e.data,o,i,a]),h=21,m=Math.ceil(f.length/h),g=f.slice((l-1)*h,l*h),y=v=>{v&&r(cn(Qt.EXERCISE_DETAIL,n.language,{id:v.data.base_id}))};return S(Uu,{maxWidth:"lg",children:Q(me,{container:!0,spacing:2,mt:2,children:[S(me,{size:{xs:10,sm:6},children:S(at,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?Q(Tt,{children:[S(me,{size:{xs:2,sm:6},children:S(ct,{variant:"contained",onClick:()=>r(cn(Qt.EXERCISE_CONTRIBUTE,n.language)),children:S(Ko,{})})}),S(me,{flexGrow:1,size:{sm:6},children:S(Wy,{callback:y})}),S(me,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:Q(iut,{children:[S(Yct,{}),S(Xct,{}),S(eut,{})]})})]}):Q(Tt,{children:[S(me,{size:{xs:12,sm:3},children:S(Wy,{callback:y})}),S(me,{size:{xs:12,sm:3},children:S(ct,{variant:"contained",startIcon:S(Ko,{}),onClick:()=>r(cn(Qt.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&S(me,{size:{xs:12,sm:3},children:Q(me,{container:!0,spacing:1,children:[S(me,{size:{xs:6,sm:12},children:S(Qct,{})}),S(me,{size:{xs:6,sm:12},children:S(Jct,{})}),S(me,{size:12,children:S(tut,{})})]})}),Q(me,{size:{xs:12,sm:9},children:[e.isLoading?S(out,{}):Q(Tt,{children:[S(rut,{exercises:g}),S(Ft,{spacing:2,alignItems:"center",sx:{mt:2},children:S(yPe,{count:m,color:"primary",page:l,onChange:u})})]}),S(aut,{})]})]})})},aJ=()=>{const[e,t]=x.useState([]),[n,r]=x.useState([]),[o,i]=J.useState([]);return S(zw.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:S(sut,{})})};function Dde(e){const{t}=je();return Q(ct,{size:"small",component:"a",href:e.href,children:[S(kst,{fontSize:"inherit"}),e.backToTitle??t("goBack")]})}const ds=e=>{const t=S(Dde,{href:e.backToUrl,backToTitle:e.backToTitle});return Q(Uu,{maxWidth:"lg",children:[Q(me,{container:!0,spacing:2,children:[S(me,{sx:{mb:2},size:8,children:Q(Ft,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[Q(Ft,{alignItems:"start",children:[S(at,{variant:"h3",children:e.title}),e.subTitle&&S(at,{variant:"h6",children:e.subTitle}),e.backToUrl&&t]}),e.optionsMenu]})}),S(me,{size:{xs:12,sm:8},children:e.mainContent}),S(me,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]})},Vw=e=>{const t=S(Dde,{href:e.backToUrl,backToTitle:e.backToTitle});return S(Uu,{maxWidth:e.maxWidth,children:Q(me,{container:!0,spacing:2,children:[S(me,{sx:{mb:2},size:12,children:Q(Ft,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[Q(Ft,{alignItems:"start",children:[S(at,{variant:"h3",children:e.title}),e.backToUrl&&t]}),e.optionsMenu]})}),S(me,{size:12,children:e.children})]})})};function kde(e){return yr({queryKey:[fv,JSON.stringify(e||{})],queryFn:()=>SNe(e)})}const lut=()=>{const e=Mt();return Dt({mutationFn:t=>CNe(t),onSuccess:()=>e.invalidateQueries({queryKey:[fv]})})},cut=e=>{const t=Mt();return Dt({mutationFn:n=>ENe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[dv,e]}),t.invalidateQueries({queryKey:[fv]})}})},uut=e=>{const t=Mt();return Dt({mutationFn:n=>TNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[dv,e]}),t.invalidateQueries({queryKey:[fv]})}})};function _de(e){return yr({queryKey:[dv,e],queryFn:()=>wNe(e)})}const dut=()=>{const e=Mt();return Dt({mutationFn:t=>PNe(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[dv]}),e.invalidateQueries({queryKey:[fv]})}})},$de=()=>{const e=Mt();return Dt({mutationFn:t=>INe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[dv]}),e.invalidateQueries({queryKey:[fv]})}})},fut=()=>{const e=Mt();return Dt({mutationFn:t=>ONe(t),onSuccess:()=>e.invalidateQueries({queryKey:[dv]})})},Nde=x.createContext(void 0);function tn(){const e=x.useContext(Nde);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
-`));return e}const Lde=x.createContext(void 0),yt=()=>{const e=x.useContext(Lde);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},Fde=parseInt(x.version,10),Vt=e=>{if(Fde>=19){const t=n=>e(n,n.ref??null);return t.displayName=e.displayName??e.name,t}return x.forwardRef(e)};var xO=Symbol("NOT_FOUND");function put(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function hut(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mut(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var sJ=e=>Array.isArray(e)?e:[e];function gut(e){const t=Array.isArray(e[0])?e[0]:e;return mut(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yut(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function vut(e){let t;return{get(n){return t&&e(t.key,n)?t.value:xO},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function but(e,t){let n=[];function r(s){const l=n.findIndex(c=>t(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return xO}function o(s,l){r(s)===xO&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var xut=(e,t)=>e===t;function Sut(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function jde(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=xut,maxSize:o=1,resultEqualityCheck:i}=n,a=Sut(r);let s=0;const l=o<=1?vut(a):but(o,a);function c(){let u=l.get(arguments);if(u===xO){if(u=e.apply(null,arguments),s++,i){const h=l.getEntries().find(m=>i(m.value,u));h&&(u=h.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var wut=class{constructor(t){this.value=t}deref(){return this.value}},Cut=typeof WeakRef<"u"?WeakRef:wut,Eut=0,lJ=1;function Z1(){return{s:Eut,v:void 0,o:null,p:null}}function Bde(e,t={}){let n=Z1();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var f;let s=n;const{length:l}=arguments;for(let h=0,m=l;h<m;h++){const g=arguments[h];if(typeof g=="function"||typeof g=="object"&&g!==null){let y=s.o;y===null&&(s.o=y=new WeakMap);const v=y.get(g);v===void 0?(s=Z1(),y.set(g,s)):s=v}else{let y=s.p;y===null&&(s.p=y=new Map);const v=y.get(g);v===void 0?(s=Z1(),y.set(g,s)):s=v}}const c=s;let u;if(s.s===lJ)u=s.v;else if(u=e.apply(null,arguments),i++,r){const h=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;h!=null&&r(h,u)&&(u=h,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new Cut(u):u}return c.s=lJ,c.v=u,u}return a.clearCache=()=>{n=Z1(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function zde(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),put(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:m=Bde,argsMemoizeOptions:g=[]}=u,y=sJ(h),v=sJ(g),w=gut(o),C=f(function(){return i++,c.apply(null,arguments)},...y),E=m(function(){a++;const O=yut(w,arguments);return s=C.apply(null,O),s},...v);return Object.assign(E,{resultFunc:c,memoizedResultFunc:C,dependencies:w,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var Tut=zde(Bde),Out=Object.assign((e,t=Tut)=>{hut(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>Out});const Iut=Object.is;function Vde(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!Iut(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}var p$={exports:{}},h$={};/**
+`+b.stack}}function ms(d){switch(typeof d){case"bigint":case"boolean":case"number":case"string":case"undefined":return d;case"object":return d;default:return""}}function KH(d){var h=d.type;return(d=d.nodeName)&&d.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function mme(d){var h=KH(d)?"checked":"value",b=Object.getOwnPropertyDescriptor(d.constructor.prototype,h),T=""+d[h];if(!d.hasOwnProperty(h)&&typeof b<"u"&&typeof b.get=="function"&&typeof b.set=="function"){var $=b.get,F=b.set;return Object.defineProperty(d,h,{configurable:!0,get:function(){return $.call(this)},set:function(X){T=""+X,F.call(this,X)}}),Object.defineProperty(d,h,{enumerable:b.enumerable}),{getValue:function(){return T},setValue:function(X){T=""+X},stopTracking:function(){d._valueTracker=null,delete d[h]}}}}function oC(d){d._valueTracker||(d._valueTracker=mme(d))}function YH(d){if(!d)return!1;var h=d._valueTracker;if(!h)return!0;var b=h.getValue(),T="";return d&&(T=KH(d)?d.checked?"true":"false":d.value),d=T,d!==b?(h.setValue(d),!0):!1}function iC(d){if(d=d||(typeof document<"u"?document:void 0),typeof d>"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var gme=/[\n"\\]/g;function gs(d){return d.replace(gme,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function sA(d,h,b,T,$,F,X,re){d.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?d.type=X:d.removeAttribute("type"),h!=null?X==="number"?(h===0&&d.value===""||d.value!=h)&&(d.value=""+ms(h)):d.value!==""+ms(h)&&(d.value=""+ms(h)):X!=="submit"&&X!=="reset"||d.removeAttribute("value"),h!=null?lA(d,X,ms(h)):b!=null?lA(d,X,ms(b)):T!=null&&d.removeAttribute("value"),$==null&&F!=null&&(d.defaultChecked=!!F),$!=null&&(d.checked=$&&typeof $!="function"&&typeof $!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?d.name=""+ms(re):d.removeAttribute("name")}function QH(d,h,b,T,$,F,X,re){if(F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(d.type=F),h!=null||b!=null){if(!(F!=="submit"&&F!=="reset"||h!=null))return;b=b!=null?""+ms(b):"",h=h!=null?""+ms(h):b,re||h===d.value||(d.value=h),d.defaultValue=h}T=T??$,T=typeof T!="function"&&typeof T!="symbol"&&!!T,d.checked=re?d.checked:!!T,d.defaultChecked=!!T,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(d.name=X)}function lA(d,h,b){h==="number"&&iC(d.ownerDocument)===d||d.defaultValue===""+b||(d.defaultValue=""+b)}function om(d,h,b,T){if(d=d.options,h){h={};for(var $=0;$<b.length;$++)h["$"+b[$]]=!0;for(b=0;b<d.length;b++)$=h.hasOwnProperty("$"+d[b].value),d[b].selected!==$&&(d[b].selected=$),$&&T&&(d[b].defaultSelected=!0)}else{for(b=""+ms(b),h=null,$=0;$<d.length;$++){if(d[$].value===b){d[$].selected=!0,T&&(d[$].defaultSelected=!0);return}h!==null||d[$].disabled||(h=d[$])}h!==null&&(h.selected=!0)}}function XH(d,h,b){if(h!=null&&(h=""+ms(h),h!==d.value&&(d.value=h),b==null)){d.defaultValue!==h&&(d.defaultValue=h);return}d.defaultValue=b!=null?""+ms(b):""}function JH(d,h,b,T){if(h==null){if(T!=null){if(b!=null)throw Error(r(92));if(j(T)){if(1<T.length)throw Error(r(93));T=T[0]}b=T}b==null&&(b=""),h=b}b=ms(h),d.defaultValue=b,T=d.textContent,T===b&&T!==""&&T!==null&&(d.value=T)}function im(d,h){if(h){var b=d.firstChild;if(b&&b===d.lastChild&&b.nodeType===3){b.nodeValue=h;return}}d.textContent=h}var yme=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ZH(d,h,b){var T=h.indexOf("--")===0;b==null||typeof b=="boolean"||b===""?T?d.setProperty(h,""):h==="float"?d.cssFloat="":d[h]="":T?d.setProperty(h,b):typeof b!="number"||b===0||yme.has(h)?h==="float"?d.cssFloat=b:d[h]=(""+b).trim():d[h]=b+"px"}function e5(d,h,b){if(h!=null&&typeof h!="object")throw Error(r(62));if(d=d.style,b!=null){for(var T in b)!b.hasOwnProperty(T)||h!=null&&h.hasOwnProperty(T)||(T.indexOf("--")===0?d.setProperty(T,""):T==="float"?d.cssFloat="":d[T]="");for(var $ in h)T=h[$],h.hasOwnProperty($)&&b[$]!==T&&ZH(d,$,T)}else for(var F in h)h.hasOwnProperty(F)&&ZH(d,F,h[F])}function cA(d){if(d.indexOf("-")===-1)return!1;switch(d){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vme=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),bme=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function aC(d){return bme.test(""+d)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":d}var uA=null;function dA(d){return d=d.target||d.srcElement||window,d.correspondingUseElement&&(d=d.correspondingUseElement),d.nodeType===3?d.parentNode:d}var am=null,sm=null;function t5(d){var h=zi(d);if(h&&(d=h.stateNode)){var b=d[Jt]||null;e:switch(d=h.stateNode,h.type){case"input":if(sA(d,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name),h=b.name,b.type==="radio"&&h!=null){for(b=d;b.parentNode;)b=b.parentNode;for(b=b.querySelectorAll('input[name="'+gs(""+h)+'"][type="radio"]'),h=0;h<b.length;h++){var T=b[h];if(T!==d&&T.form===d.form){var $=T[Jt]||null;if(!$)throw Error(r(90));sA(T,$.value,$.defaultValue,$.defaultValue,$.checked,$.defaultChecked,$.type,$.name)}}for(h=0;h<b.length;h++)T=b[h],T.form===d.form&&YH(T)}break e;case"textarea":XH(d,b.value,b.defaultValue);break e;case"select":h=b.value,h!=null&&om(d,!!b.multiple,h,!1)}}}var fA=!1;function n5(d,h,b){if(fA)return d(h,b);fA=!0;try{var T=d(h);return T}finally{if(fA=!1,(am!==null||sm!==null)&&(GC(),am&&(h=am,d=sm,sm=am=null,t5(h),d)))for(h=0;h<d.length;h++)t5(d[h])}}function Zv(d,h){var b=d.stateNode;if(b===null)return null;var T=b[Jt]||null;if(T===null)return null;b=T[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(T=!T.disabled)||(d=d.type,T=!(d==="button"||d==="input"||d==="select"||d==="textarea")),d=!T;break e;default:d=!1}if(d)return null;if(b&&typeof b!="function")throw Error(r(231,h,typeof b));return b}var nu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pA=!1;if(nu)try{var eb={};Object.defineProperty(eb,"passive",{get:function(){pA=!0}}),window.addEventListener("test",eb,eb),window.removeEventListener("test",eb,eb)}catch{pA=!1}var hd=null,hA=null,sC=null;function r5(){if(sC)return sC;var d,h=hA,b=h.length,T,$="value"in hd?hd.value:hd.textContent,F=$.length;for(d=0;d<b&&h[d]===$[d];d++);var X=b-d;for(T=1;T<=X&&h[b-T]===$[F-T];T++);return sC=$.slice(d,1<T?1-T:void 0)}function lC(d){var h=d.keyCode;return"charCode"in d?(d=d.charCode,d===0&&h===13&&(d=13)):d=h,d===10&&(d=13),32<=d||d===13?d:0}function cC(){return!0}function o5(){return!1}function ua(d){function h(b,T,$,F,X){this._reactName=b,this._targetInst=$,this.type=T,this.nativeEvent=F,this.target=X,this.currentTarget=null;for(var re in d)d.hasOwnProperty(re)&&(b=d[re],this[re]=b?b(F):F[re]);return this.isDefaultPrevented=(F.defaultPrevented!=null?F.defaultPrevented:F.returnValue===!1)?cC:o5,this.isPropagationStopped=o5,this}return u(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var b=this.nativeEvent;b&&(b.preventDefault?b.preventDefault():typeof b.returnValue!="unknown"&&(b.returnValue=!1),this.isDefaultPrevented=cC)},stopPropagation:function(){var b=this.nativeEvent;b&&(b.stopPropagation?b.stopPropagation():typeof b.cancelBubble!="unknown"&&(b.cancelBubble=!0),this.isPropagationStopped=cC)},persist:function(){},isPersistent:cC}),h}var ep={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(d){return d.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uC=ua(ep),tb=u({},ep,{view:0,detail:0}),xme=ua(tb),mA,gA,nb,dC=u({},tb,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vA,button:0,buttons:0,relatedTarget:function(d){return d.relatedTarget===void 0?d.fromElement===d.srcElement?d.toElement:d.fromElement:d.relatedTarget},movementX:function(d){return"movementX"in d?d.movementX:(d!==nb&&(nb&&d.type==="mousemove"?(mA=d.screenX-nb.screenX,gA=d.screenY-nb.screenY):gA=mA=0,nb=d),mA)},movementY:function(d){return"movementY"in d?d.movementY:gA}}),i5=ua(dC),Sme=u({},dC,{dataTransfer:0}),wme=ua(Sme),Cme=u({},tb,{relatedTarget:0}),yA=ua(Cme),Eme=u({},ep,{animationName:0,elapsedTime:0,pseudoElement:0}),Tme=ua(Eme),Ome=u({},ep,{clipboardData:function(d){return"clipboardData"in d?d.clipboardData:window.clipboardData}}),Ime=ua(Ome),Pme=u({},ep,{data:0}),a5=ua(Pme),Ame={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mme={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Rme={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dme(d){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(d):(d=Rme[d])?!!h[d]:!1}function vA(){return Dme}var kme=u({},tb,{key:function(d){if(d.key){var h=Ame[d.key]||d.key;if(h!=="Unidentified")return h}return d.type==="keypress"?(d=lC(d),d===13?"Enter":String.fromCharCode(d)):d.type==="keydown"||d.type==="keyup"?Mme[d.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vA,charCode:function(d){return d.type==="keypress"?lC(d):0},keyCode:function(d){return d.type==="keydown"||d.type==="keyup"?d.keyCode:0},which:function(d){return d.type==="keypress"?lC(d):d.type==="keydown"||d.type==="keyup"?d.keyCode:0}}),_me=ua(kme),$me=u({},dC,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),s5=ua($me),Nme=u({},tb,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vA}),Lme=ua(Nme),Fme=u({},ep,{propertyName:0,elapsedTime:0,pseudoElement:0}),jme=ua(Fme),Bme=u({},dC,{deltaX:function(d){return"deltaX"in d?d.deltaX:"wheelDeltaX"in d?-d.wheelDeltaX:0},deltaY:function(d){return"deltaY"in d?d.deltaY:"wheelDeltaY"in d?-d.wheelDeltaY:"wheelDelta"in d?-d.wheelDelta:0},deltaZ:0,deltaMode:0}),zme=ua(Bme),Vme=u({},ep,{newState:0,oldState:0}),Hme=ua(Vme),Ume=[9,13,27,32],bA=nu&&"CompositionEvent"in window,rb=null;nu&&"documentMode"in document&&(rb=document.documentMode);var Gme=nu&&"TextEvent"in window&&!rb,l5=nu&&(!bA||rb&&8<rb&&11>=rb),c5=" ",u5=!1;function d5(d,h){switch(d){case"keyup":return Ume.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f5(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var lm=!1;function qme(d,h){switch(d){case"compositionend":return f5(h);case"keypress":return h.which!==32?null:(u5=!0,c5);case"textInput":return d=h.data,d===c5&&u5?null:d;default:return null}}function Wme(d,h){if(lm)return d==="compositionend"||!bA&&d5(d,h)?(d=r5(),sC=hA=hd=null,lm=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return l5&&h.locale!=="ko"?null:h.data;default:return null}}var Kme={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function p5(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h==="input"?!!Kme[d.type]:h==="textarea"}function h5(d,h,b,T){am?sm?sm.push(T):sm=[T]:am=T,h=XC(h,"onChange"),0<h.length&&(b=new uC("onChange","change",null,b,T),d.push({event:b,listeners:h}))}var ob=null,ib=null;function Yme(d){K4(d,0)}function fC(d){var h=fl(d);if(YH(h))return d}function m5(d,h){if(d==="change")return h}var g5=!1;if(nu){var xA;if(nu){var SA="oninput"in document;if(!SA){var y5=document.createElement("div");y5.setAttribute("oninput","return;"),SA=typeof y5.oninput=="function"}xA=SA}else xA=!1;g5=xA&&(!document.documentMode||9<document.documentMode)}function v5(){ob&&(ob.detachEvent("onpropertychange",b5),ib=ob=null)}function b5(d){if(d.propertyName==="value"&&fC(ib)){var h=[];h5(h,ib,d,dA(d)),n5(Yme,h)}}function Qme(d,h,b){d==="focusin"?(v5(),ob=h,ib=b,ob.attachEvent("onpropertychange",b5)):d==="focusout"&&v5()}function Xme(d){if(d==="selectionchange"||d==="keyup"||d==="keydown")return fC(ib)}function Jme(d,h){if(d==="click")return fC(h)}function Zme(d,h){if(d==="input"||d==="change")return fC(h)}function ege(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var ka=typeof Object.is=="function"?Object.is:ege;function ab(d,h){if(ka(d,h))return!0;if(typeof d!="object"||d===null||typeof h!="object"||h===null)return!1;var b=Object.keys(d),T=Object.keys(h);if(b.length!==T.length)return!1;for(T=0;T<b.length;T++){var $=b[T];if(!oe.call(h,$)||!ka(d[$],h[$]))return!1}return!0}function x5(d){for(;d&&d.firstChild;)d=d.firstChild;return d}function S5(d,h){var b=x5(d);d=0;for(var T;b;){if(b.nodeType===3){if(T=d+b.textContent.length,d<=h&&T>=h)return{node:b,offset:h-d};d=T}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=x5(b)}}function w5(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?w5(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function C5(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var h=iC(d.document);h instanceof d.HTMLIFrameElement;){try{var b=typeof h.contentWindow.location.href=="string"}catch{b=!1}if(b)d=h.contentWindow;else break;h=iC(d.document)}return h}function wA(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}var tge=nu&&"documentMode"in document&&11>=document.documentMode,cm=null,CA=null,sb=null,EA=!1;function E5(d,h,b){var T=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;EA||cm==null||cm!==iC(T)||(T=cm,"selectionStart"in T&&wA(T)?T={start:T.selectionStart,end:T.selectionEnd}:(T=(T.ownerDocument&&T.ownerDocument.defaultView||window).getSelection(),T={anchorNode:T.anchorNode,anchorOffset:T.anchorOffset,focusNode:T.focusNode,focusOffset:T.focusOffset}),sb&&ab(sb,T)||(sb=T,T=XC(CA,"onSelect"),0<T.length&&(h=new uC("onSelect","select",null,h,b),d.push({event:h,listeners:T}),h.target=cm)))}function tp(d,h){var b={};return b[d.toLowerCase()]=h.toLowerCase(),b["Webkit"+d]="webkit"+h,b["Moz"+d]="moz"+h,b}var um={animationend:tp("Animation","AnimationEnd"),animationiteration:tp("Animation","AnimationIteration"),animationstart:tp("Animation","AnimationStart"),transitionrun:tp("Transition","TransitionRun"),transitionstart:tp("Transition","TransitionStart"),transitioncancel:tp("Transition","TransitionCancel"),transitionend:tp("Transition","TransitionEnd")},TA={},T5={};nu&&(T5=document.createElement("div").style,"AnimationEvent"in window||(delete um.animationend.animation,delete um.animationiteration.animation,delete um.animationstart.animation),"TransitionEvent"in window||delete um.transitionend.transition);function np(d){if(TA[d])return TA[d];if(!um[d])return d;var h=um[d],b;for(b in h)if(h.hasOwnProperty(b)&&b in T5)return TA[d]=h[b];return d}var O5=np("animationend"),I5=np("animationiteration"),P5=np("animationstart"),nge=np("transitionrun"),rge=np("transitionstart"),oge=np("transitioncancel"),A5=np("transitionend"),M5=new Map,OA="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");OA.push("scrollEnd");function hl(d,h){M5.set(d,h),hn(h,[d])}var R5=new WeakMap;function ys(d,h){if(typeof d=="object"&&d!==null){var b=R5.get(d);return b!==void 0?b:(h={value:d,source:h,stack:WH(h)},R5.set(d,h),h)}return{value:d,source:h,stack:WH(h)}}var vs=[],dm=0,IA=0;function pC(){for(var d=dm,h=IA=dm=0;h<d;){var b=vs[h];vs[h++]=null;var T=vs[h];vs[h++]=null;var $=vs[h];vs[h++]=null;var F=vs[h];if(vs[h++]=null,T!==null&&$!==null){var X=T.pending;X===null?$.next=$:($.next=X.next,X.next=$),T.pending=$}F!==0&&D5(b,$,F)}}function hC(d,h,b,T){vs[dm++]=d,vs[dm++]=h,vs[dm++]=b,vs[dm++]=T,IA|=T,d.lanes|=T,d=d.alternate,d!==null&&(d.lanes|=T)}function PA(d,h,b,T){return hC(d,h,b,T),mC(d)}function fm(d,h){return hC(d,null,null,h),mC(d)}function D5(d,h,b){d.lanes|=b;var T=d.alternate;T!==null&&(T.lanes|=b);for(var $=!1,F=d.return;F!==null;)F.childLanes|=b,T=F.alternate,T!==null&&(T.childLanes|=b),F.tag===22&&(d=F.stateNode,d===null||d._visibility&1||($=!0)),d=F,F=F.return;return d.tag===3?(F=d.stateNode,$&&h!==null&&($=31-Be(b),d=F.hiddenUpdates,T=d[$],T===null?d[$]=[h]:T.push(h),h.lane=b|536870912),F):null}function mC(d){if(50<Db)throw Db=0,_M=null,Error(r(185));for(var h=d.return;h!==null;)d=h,h=d.return;return d.tag===3?d.stateNode:null}var pm={};function ige(d,h,b,T){this.tag=d,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _a(d,h,b,T){return new ige(d,h,b,T)}function AA(d){return d=d.prototype,!(!d||!d.isReactComponent)}function ru(d,h){var b=d.alternate;return b===null?(b=_a(d.tag,h,d.key,d.mode),b.elementType=d.elementType,b.type=d.type,b.stateNode=d.stateNode,b.alternate=d,d.alternate=b):(b.pendingProps=h,b.type=d.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=d.flags&65011712,b.childLanes=d.childLanes,b.lanes=d.lanes,b.child=d.child,b.memoizedProps=d.memoizedProps,b.memoizedState=d.memoizedState,b.updateQueue=d.updateQueue,h=d.dependencies,b.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},b.sibling=d.sibling,b.index=d.index,b.ref=d.ref,b.refCleanup=d.refCleanup,b}function k5(d,h){d.flags&=65011714;var b=d.alternate;return b===null?(d.childLanes=0,d.lanes=h,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=b.childLanes,d.lanes=b.lanes,d.child=b.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=b.memoizedProps,d.memoizedState=b.memoizedState,d.updateQueue=b.updateQueue,d.type=b.type,h=b.dependencies,d.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),d}function gC(d,h,b,T,$,F){var X=0;if(T=d,typeof d=="function")AA(d)&&(X=1);else if(typeof d=="string")X=sye(d,b,ie.current)?26:d==="html"||d==="head"||d==="body"?27:5;else e:switch(d){case M:return d=_a(31,b,h,$),d.elementType=M,d.lanes=F,d;case g:return rp(b.children,$,F,h);case y:X=8,$|=24;break;case v:return d=_a(12,b,h,$|2),d.elementType=v,d.lanes=F,d;case O:return d=_a(13,b,h,$),d.elementType=O,d.lanes=F,d;case P:return d=_a(19,b,h,$),d.elementType=P,d.lanes=F,d;default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case w:case E:X=10;break e;case C:X=9;break e;case I:X=11;break e;case R:X=14;break e;case D:X=16,T=null;break e}X=29,b=Error(r(130,d===null?"null":typeof d,"")),T=null}return h=_a(X,b,h,$),h.elementType=d,h.type=T,h.lanes=F,h}function rp(d,h,b,T){return d=_a(7,d,T,h),d.lanes=b,d}function MA(d,h,b){return d=_a(6,d,null,h),d.lanes=b,d}function RA(d,h,b){return h=_a(4,d.children!==null?d.children:[],d.key,h),h.lanes=b,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}var hm=[],mm=0,yC=null,vC=0,bs=[],xs=0,op=null,ou=1,iu="";function ip(d,h){hm[mm++]=vC,hm[mm++]=yC,yC=d,vC=h}function _5(d,h,b){bs[xs++]=ou,bs[xs++]=iu,bs[xs++]=op,op=d;var T=ou;d=iu;var $=32-Be(T)-1;T&=~(1<<$),b+=1;var F=32-Be(h)+$;if(30<F){var X=$-$%5;F=(T&(1<<X)-1).toString(32),T>>=X,$-=X,ou=1<<32-Be(h)+$|b<<$|T,iu=F+d}else ou=1<<F|b<<$|T,iu=d}function DA(d){d.return!==null&&(ip(d,1),_5(d,1,0))}function kA(d){for(;d===yC;)yC=hm[--mm],hm[mm]=null,vC=hm[--mm],hm[mm]=null;for(;d===op;)op=bs[--xs],bs[xs]=null,iu=bs[--xs],bs[xs]=null,ou=bs[--xs],bs[xs]=null}var Ui=null,io=null,rr=!1,ap=null,ic=!1,_A=Error(r(519));function sp(d){var h=Error(r(418,""));throw ub(ys(h,d)),_A}function $5(d){var h=d.stateNode,b=d.type,T=d.memoizedProps;switch(h[Ht]=d,h[Jt]=T,b){case"dialog":Fn("cancel",h),Fn("close",h);break;case"iframe":case"object":case"embed":Fn("load",h);break;case"video":case"audio":for(b=0;b<_b.length;b++)Fn(_b[b],h);break;case"source":Fn("error",h);break;case"img":case"image":case"link":Fn("error",h),Fn("load",h);break;case"details":Fn("toggle",h);break;case"input":Fn("invalid",h),QH(h,T.value,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name,!0),oC(h);break;case"select":Fn("invalid",h);break;case"textarea":Fn("invalid",h),JH(h,T.value,T.defaultValue,T.children),oC(h)}b=T.children,typeof b!="string"&&typeof b!="number"&&typeof b!="bigint"||h.textContent===""+b||T.suppressHydrationWarning===!0||J4(h.textContent,b)?(T.popover!=null&&(Fn("beforetoggle",h),Fn("toggle",h)),T.onScroll!=null&&Fn("scroll",h),T.onScrollEnd!=null&&Fn("scrollend",h),T.onClick!=null&&(h.onclick=JC),h=!0):h=!1,h||sp(d)}function N5(d){for(Ui=d.return;Ui;)switch(Ui.tag){case 5:case 13:ic=!1;return;case 27:case 3:ic=!0;return;default:Ui=Ui.return}}function lb(d){if(d!==Ui)return!1;if(!rr)return N5(d),rr=!0,!1;var h=d.tag,b;if((b=h!==3&&h!==27)&&((b=h===5)&&(b=d.type,b=!(b!=="form"&&b!=="button")||QM(d.type,d.memoizedProps)),b=!b),b&&io&&sp(d),N5(d),h===13){if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(r(317));e:{for(d=d.nextSibling,h=0;d;){if(d.nodeType===8)if(b=d.data,b==="/$"){if(h===0){io=gl(d.nextSibling);break e}h--}else b!=="$"&&b!=="$!"&&b!=="$?"||h++;d=d.nextSibling}io=null}}else h===27?(h=io,Md(d.type)?(d=eR,eR=null,io=d):io=h):io=Ui?gl(d.stateNode.nextSibling):null;return!0}function cb(){io=Ui=null,rr=!1}function L5(){var d=ap;return d!==null&&(pa===null?pa=d:pa.push.apply(pa,d),ap=null),d}function ub(d){ap===null?ap=[d]:ap.push(d)}var $A=q(null),lp=null,au=null;function md(d,h,b){Z($A,h._currentValue),h._currentValue=b}function su(d){d._currentValue=$A.current,Y($A)}function NA(d,h,b){for(;d!==null;){var T=d.alternate;if((d.childLanes&h)!==h?(d.childLanes|=h,T!==null&&(T.childLanes|=h)):T!==null&&(T.childLanes&h)!==h&&(T.childLanes|=h),d===b)break;d=d.return}}function LA(d,h,b,T){var $=d.child;for($!==null&&($.return=d);$!==null;){var F=$.dependencies;if(F!==null){var X=$.child;F=F.firstContext;e:for(;F!==null;){var re=F;F=$;for(var ge=0;ge<h.length;ge++)if(re.context===h[ge]){F.lanes|=b,re=F.alternate,re!==null&&(re.lanes|=b),NA(F.return,b,d),T||(X=null);break e}F=re.next}}else if($.tag===18){if(X=$.return,X===null)throw Error(r(341));X.lanes|=b,F=X.alternate,F!==null&&(F.lanes|=b),NA(X,b,d),X=null}else X=$.child;if(X!==null)X.return=$;else for(X=$;X!==null;){if(X===d){X=null;break}if($=X.sibling,$!==null){$.return=X.return,X=$;break}X=X.return}$=X}}function db(d,h,b,T){d=null;for(var $=h,F=!1;$!==null;){if(!F){if(($.flags&524288)!==0)F=!0;else if(($.flags&262144)!==0)break}if($.tag===10){var X=$.alternate;if(X===null)throw Error(r(387));if(X=X.memoizedProps,X!==null){var re=$.type;ka($.pendingProps.value,X.value)||(d!==null?d.push(re):d=[re])}}else if($===ye.current){if(X=$.alternate,X===null)throw Error(r(387));X.memoizedState.memoizedState!==$.memoizedState.memoizedState&&(d!==null?d.push(Bb):d=[Bb])}$=$.return}d!==null&&LA(h,d,b,T),h.flags|=262144}function bC(d){for(d=d.firstContext;d!==null;){if(!ka(d.context._currentValue,d.memoizedValue))return!0;d=d.next}return!1}function cp(d){lp=d,au=null,d=d.dependencies,d!==null&&(d.firstContext=null)}function Ai(d){return F5(lp,d)}function xC(d,h){return lp===null&&cp(d),F5(d,h)}function F5(d,h){var b=h._currentValue;if(h={context:h,memoizedValue:b,next:null},au===null){if(d===null)throw Error(r(308));au=h,d.dependencies={lanes:0,firstContext:h},d.flags|=524288}else au=au.next=h;return b}var age=typeof AbortController<"u"?AbortController:function(){var d=[],h=this.signal={aborted:!1,addEventListener:function(b,T){d.push(T)}};this.abort=function(){h.aborted=!0,d.forEach(function(b){return b()})}},sge=e.unstable_scheduleCallback,lge=e.unstable_NormalPriority,No={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function FA(){return{controller:new age,data:new Map,refCount:0}}function fb(d){d.refCount--,d.refCount===0&&sge(lge,function(){d.controller.abort()})}var pb=null,jA=0,gm=0,ym=null;function cge(d,h){if(pb===null){var b=pb=[];jA=0,gm=zM(),ym={status:"pending",value:void 0,then:function(T){b.push(T)}}}return jA++,h.then(j5,j5),h}function j5(){if(--jA===0&&pb!==null){ym!==null&&(ym.status="fulfilled");var d=pb;pb=null,gm=0,ym=null;for(var h=0;h<d.length;h++)(0,d[h])()}}function uge(d,h){var b=[],T={status:"pending",value:null,reason:null,then:function($){b.push($)}};return d.then(function(){T.status="fulfilled",T.value=h;for(var $=0;$<b.length;$++)(0,b[$])(h)},function($){for(T.status="rejected",T.reason=$,$=0;$<b.length;$++)(0,b[$])(void 0)}),T}var B5=L.S;L.S=function(d,h){typeof h=="object"&&h!==null&&typeof h.then=="function"&&cge(d,h),B5!==null&&B5(d,h)};var up=q(null);function BA(){var d=up.current;return d!==null?d:Dr.pooledCache}function SC(d,h){h===null?Z(up,up.current):Z(up,h.pool)}function z5(){var d=BA();return d===null?null:{parent:No._currentValue,pool:d}}var hb=Error(r(460)),V5=Error(r(474)),wC=Error(r(542)),zA={then:function(){}};function H5(d){return d=d.status,d==="fulfilled"||d==="rejected"}function CC(){}function U5(d,h,b){switch(b=d[b],b===void 0?d.push(h):b!==h&&(h.then(CC,CC),h=b),h.status){case"fulfilled":return h.value;case"rejected":throw d=h.reason,q5(d),d;default:if(typeof h.status=="string")h.then(CC,CC);else{if(d=Dr,d!==null&&100<d.shellSuspendCounter)throw Error(r(482));d=h,d.status="pending",d.then(function(T){if(h.status==="pending"){var $=h;$.status="fulfilled",$.value=T}},function(T){if(h.status==="pending"){var $=h;$.status="rejected",$.reason=T}})}switch(h.status){case"fulfilled":return h.value;case"rejected":throw d=h.reason,q5(d),d}throw mb=h,hb}}var mb=null;function G5(){if(mb===null)throw Error(r(459));var d=mb;return mb=null,d}function q5(d){if(d===hb||d===wC)throw Error(r(483))}var gd=!1;function VA(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function HA(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function yd(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function vd(d,h,b){var T=d.updateQueue;if(T===null)return null;if(T=T.shared,(mr&2)!==0){var $=T.pending;return $===null?h.next=h:(h.next=$.next,$.next=h),T.pending=h,h=mC(d),D5(d,null,b),h}return hC(d,T,h,b),mC(d)}function gb(d,h,b){if(h=h.updateQueue,h!==null&&(h=h.shared,(b&4194048)!==0)){var T=h.lanes;T&=d.pendingLanes,b|=T,h.lanes=b,oo(d,b)}}function UA(d,h){var b=d.updateQueue,T=d.alternate;if(T!==null&&(T=T.updateQueue,b===T)){var $=null,F=null;if(b=b.firstBaseUpdate,b!==null){do{var X={lane:b.lane,tag:b.tag,payload:b.payload,callback:null,next:null};F===null?$=F=X:F=F.next=X,b=b.next}while(b!==null);F===null?$=F=h:F=F.next=h}else $=F=h;b={baseState:T.baseState,firstBaseUpdate:$,lastBaseUpdate:F,shared:T.shared,callbacks:T.callbacks},d.updateQueue=b;return}d=b.lastBaseUpdate,d===null?b.firstBaseUpdate=h:d.next=h,b.lastBaseUpdate=h}var GA=!1;function yb(){if(GA){var d=ym;if(d!==null)throw d}}function vb(d,h,b,T){GA=!1;var $=d.updateQueue;gd=!1;var F=$.firstBaseUpdate,X=$.lastBaseUpdate,re=$.shared.pending;if(re!==null){$.shared.pending=null;var ge=re,Ne=ge.next;ge.next=null,X===null?F=Ne:X.next=Ne,X=ge;var Ze=d.alternate;Ze!==null&&(Ze=Ze.updateQueue,re=Ze.lastBaseUpdate,re!==X&&(re===null?Ze.firstBaseUpdate=Ne:re.next=Ne,Ze.lastBaseUpdate=ge))}if(F!==null){var ot=$.baseState;X=0,Ze=Ne=ge=null,re=F;do{var Fe=re.lane&-536870913,ze=Fe!==re.lane;if(ze?(qn&Fe)===Fe:(T&Fe)===Fe){Fe!==0&&Fe===gm&&(GA=!0),Ze!==null&&(Ze=Ze.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var fn=d,nn=re;Fe=h;var Sr=b;switch(nn.tag){case 1:if(fn=nn.payload,typeof fn=="function"){ot=fn.call(Sr,ot,Fe);break e}ot=fn;break e;case 3:fn.flags=fn.flags&-65537|128;case 0:if(fn=nn.payload,Fe=typeof fn=="function"?fn.call(Sr,ot,Fe):fn,Fe==null)break e;ot=u({},ot,Fe);break e;case 2:gd=!0}}Fe=re.callback,Fe!==null&&(d.flags|=64,ze&&(d.flags|=8192),ze=$.callbacks,ze===null?$.callbacks=[Fe]:ze.push(Fe))}else ze={lane:Fe,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Ze===null?(Ne=Ze=ze,ge=ot):Ze=Ze.next=ze,X|=Fe;if(re=re.next,re===null){if(re=$.shared.pending,re===null)break;ze=re,re=ze.next,ze.next=null,$.lastBaseUpdate=ze,$.shared.pending=null}}while(!0);Ze===null&&(ge=ot),$.baseState=ge,$.firstBaseUpdate=Ne,$.lastBaseUpdate=Ze,F===null&&($.shared.lanes=0),Od|=X,d.lanes=X,d.memoizedState=ot}}function W5(d,h){if(typeof d!="function")throw Error(r(191,d));d.call(h)}function K5(d,h){var b=d.callbacks;if(b!==null)for(d.callbacks=null,d=0;d<b.length;d++)W5(b[d],h)}var vm=q(null),EC=q(0);function Y5(d,h){d=hu,Z(EC,d),Z(vm,h),hu=d|h.baseLanes}function qA(){Z(EC,hu),Z(vm,vm.current)}function WA(){hu=EC.current,Y(vm),Y(EC)}var bd=0,Rn=null,br=null,Io=null,TC=!1,bm=!1,dp=!1,OC=0,bb=0,xm=null,dge=0;function bo(){throw Error(r(321))}function KA(d,h){if(h===null)return!1;for(var b=0;b<h.length&&b<d.length;b++)if(!ka(d[b],h[b]))return!1;return!0}function YA(d,h,b,T,$,F){return bd=F,Rn=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,L.H=d===null||d.memoizedState===null?DU:kU,dp=!1,F=b(T,$),dp=!1,bm&&(F=X5(h,b,T,$)),Q5(d),F}function Q5(d){L.H=DC;var h=br!==null&&br.next!==null;if(bd=0,Io=br=Rn=null,TC=!1,bb=0,xm=null,h)throw Error(r(300));d===null||Jo||(d=d.dependencies,d!==null&&bC(d)&&(Jo=!0))}function X5(d,h,b,T){Rn=d;var $=0;do{if(bm&&(xm=null),bb=0,bm=!1,25<=$)throw Error(r(301));if($+=1,Io=br=null,d.updateQueue!=null){var F=d.updateQueue;F.lastEffect=null,F.events=null,F.stores=null,F.memoCache!=null&&(F.memoCache.index=0)}L.H=vge,F=h(b,T)}while(bm);return F}function fge(){var d=L.H,h=d.useState()[0];return h=typeof h.then=="function"?xb(h):h,d=d.useState()[0],(br!==null?br.memoizedState:null)!==d&&(Rn.flags|=1024),h}function QA(){var d=OC!==0;return OC=0,d}function XA(d,h,b){h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~b}function JA(d){if(TC){for(d=d.memoizedState;d!==null;){var h=d.queue;h!==null&&(h.pending=null),d=d.next}TC=!1}bd=0,Io=br=Rn=null,bm=!1,bb=OC=0,xm=null}function da(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Io===null?Rn.memoizedState=Io=d:Io=Io.next=d,Io}function Po(){if(br===null){var d=Rn.alternate;d=d!==null?d.memoizedState:null}else d=br.next;var h=Io===null?Rn.memoizedState:Io.next;if(h!==null)Io=h,br=d;else{if(d===null)throw Rn.alternate===null?Error(r(467)):Error(r(310));br=d,d={memoizedState:br.memoizedState,baseState:br.baseState,baseQueue:br.baseQueue,queue:br.queue,next:null},Io===null?Rn.memoizedState=Io=d:Io=Io.next=d}return Io}function ZA(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xb(d){var h=bb;return bb+=1,xm===null&&(xm=[]),d=U5(xm,d,h),h=Rn,(Io===null?h.memoizedState:Io.next)===null&&(h=h.alternate,L.H=h===null||h.memoizedState===null?DU:kU),d}function IC(d){if(d!==null&&typeof d=="object"){if(typeof d.then=="function")return xb(d);if(d.$$typeof===E)return Ai(d)}throw Error(r(438,String(d)))}function eM(d){var h=null,b=Rn.updateQueue;if(b!==null&&(h=b.memoCache),h==null){var T=Rn.alternate;T!==null&&(T=T.updateQueue,T!==null&&(T=T.memoCache,T!=null&&(h={data:T.data.map(function($){return $.slice()}),index:0})))}if(h==null&&(h={data:[],index:0}),b===null&&(b=ZA(),Rn.updateQueue=b),b.memoCache=h,b=h.data[h.index],b===void 0)for(b=h.data[h.index]=Array(d),T=0;T<d;T++)b[T]=A;return h.index++,b}function lu(d,h){return typeof h=="function"?h(d):h}function PC(d){var h=Po();return tM(h,br,d)}function tM(d,h,b){var T=d.queue;if(T===null)throw Error(r(311));T.lastRenderedReducer=b;var $=d.baseQueue,F=T.pending;if(F!==null){if($!==null){var X=$.next;$.next=F.next,F.next=X}h.baseQueue=$=F,T.pending=null}if(F=d.baseState,$===null)d.memoizedState=F;else{h=$.next;var re=X=null,ge=null,Ne=h,Ze=!1;do{var ot=Ne.lane&-536870913;if(ot!==Ne.lane?(qn&ot)===ot:(bd&ot)===ot){var Fe=Ne.revertLane;if(Fe===0)ge!==null&&(ge=ge.next={lane:0,revertLane:0,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),ot===gm&&(Ze=!0);else if((bd&Fe)===Fe){Ne=Ne.next,Fe===gm&&(Ze=!0);continue}else ot={lane:0,revertLane:Ne.revertLane,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},ge===null?(re=ge=ot,X=F):ge=ge.next=ot,Rn.lanes|=Fe,Od|=Fe;ot=Ne.action,dp&&b(F,ot),F=Ne.hasEagerState?Ne.eagerState:b(F,ot)}else Fe={lane:ot,revertLane:Ne.revertLane,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},ge===null?(re=ge=Fe,X=F):ge=ge.next=Fe,Rn.lanes|=ot,Od|=ot;Ne=Ne.next}while(Ne!==null&&Ne!==h);if(ge===null?X=F:ge.next=re,!ka(F,d.memoizedState)&&(Jo=!0,Ze&&(b=ym,b!==null)))throw b;d.memoizedState=F,d.baseState=X,d.baseQueue=ge,T.lastRenderedState=F}return $===null&&(T.lanes=0),[d.memoizedState,T.dispatch]}function nM(d){var h=Po(),b=h.queue;if(b===null)throw Error(r(311));b.lastRenderedReducer=d;var T=b.dispatch,$=b.pending,F=h.memoizedState;if($!==null){b.pending=null;var X=$=$.next;do F=d(F,X.action),X=X.next;while(X!==$);ka(F,h.memoizedState)||(Jo=!0),h.memoizedState=F,h.baseQueue===null&&(h.baseState=F),b.lastRenderedState=F}return[F,T]}function J5(d,h,b){var T=Rn,$=Po(),F=rr;if(F){if(b===void 0)throw Error(r(407));b=b()}else b=h();var X=!ka((br||$).memoizedState,b);X&&($.memoizedState=b,Jo=!0),$=$.queue;var re=tU.bind(null,T,$,d);if(Sb(2048,8,re,[d]),$.getSnapshot!==h||X||Io!==null&&Io.memoizedState.tag&1){if(T.flags|=2048,Sm(9,AC(),eU.bind(null,T,$,b,h),null),Dr===null)throw Error(r(349));F||(bd&124)!==0||Z5(T,h,b)}return b}function Z5(d,h,b){d.flags|=16384,d={getSnapshot:h,value:b},h=Rn.updateQueue,h===null?(h=ZA(),Rn.updateQueue=h,h.stores=[d]):(b=h.stores,b===null?h.stores=[d]:b.push(d))}function eU(d,h,b,T){h.value=b,h.getSnapshot=T,nU(h)&&rU(d)}function tU(d,h,b){return b(function(){nU(h)&&rU(d)})}function nU(d){var h=d.getSnapshot;d=d.value;try{var b=h();return!ka(d,b)}catch{return!0}}function rU(d){var h=fm(d,2);h!==null&&ja(h,d,2)}function rM(d){var h=da();if(typeof d=="function"){var b=d;if(d=b(),dp){ut(!0);try{b()}finally{ut(!1)}}}return h.memoizedState=h.baseState=d,h.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:d},h}function oU(d,h,b,T){return d.baseState=b,tM(d,br,typeof T=="function"?T:lu)}function pge(d,h,b,T,$){if(RC(d))throw Error(r(485));if(d=h.action,d!==null){var F={payload:$,action:d,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(X){F.listeners.push(X)}};L.T!==null?b(!0):F.isTransition=!1,T(F),b=h.pending,b===null?(F.next=h.pending=F,iU(h,F)):(F.next=b.next,h.pending=b.next=F)}}function iU(d,h){var b=h.action,T=h.payload,$=d.state;if(h.isTransition){var F=L.T,X={};L.T=X;try{var re=b($,T),ge=L.S;ge!==null&&ge(X,re),aU(d,h,re)}catch(Ne){oM(d,h,Ne)}finally{L.T=F}}else try{F=b($,T),aU(d,h,F)}catch(Ne){oM(d,h,Ne)}}function aU(d,h,b){b!==null&&typeof b=="object"&&typeof b.then=="function"?b.then(function(T){sU(d,h,T)},function(T){return oM(d,h,T)}):sU(d,h,b)}function sU(d,h,b){h.status="fulfilled",h.value=b,lU(h),d.state=b,h=d.pending,h!==null&&(b=h.next,b===h?d.pending=null:(b=b.next,h.next=b,iU(d,b)))}function oM(d,h,b){var T=d.pending;if(d.pending=null,T!==null){T=T.next;do h.status="rejected",h.reason=b,lU(h),h=h.next;while(h!==T)}d.action=null}function lU(d){d=d.listeners;for(var h=0;h<d.length;h++)(0,d[h])()}function cU(d,h){return h}function uU(d,h){if(rr){var b=Dr.formState;if(b!==null){e:{var T=Rn;if(rr){if(io){t:{for(var $=io,F=ic;$.nodeType!==8;){if(!F){$=null;break t}if($=gl($.nextSibling),$===null){$=null;break t}}F=$.data,$=F==="F!"||F==="F"?$:null}if($){io=gl($.nextSibling),T=$.data==="F!";break e}}sp(T)}T=!1}T&&(h=b[0])}}return b=da(),b.memoizedState=b.baseState=h,T={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cU,lastRenderedState:h},b.queue=T,b=AU.bind(null,Rn,T),T.dispatch=b,T=rM(!1),F=cM.bind(null,Rn,!1,T.queue),T=da(),$={state:h,dispatch:null,action:d,pending:null},T.queue=$,b=pge.bind(null,Rn,$,F,b),$.dispatch=b,T.memoizedState=d,[h,b,!1]}function dU(d){var h=Po();return fU(h,br,d)}function fU(d,h,b){if(h=tM(d,h,cU)[0],d=PC(lu)[0],typeof h=="object"&&h!==null&&typeof h.then=="function")try{var T=xb(h)}catch(X){throw X===hb?wC:X}else T=h;h=Po();var $=h.queue,F=$.dispatch;return b!==h.memoizedState&&(Rn.flags|=2048,Sm(9,AC(),hge.bind(null,$,b),null)),[T,F,d]}function hge(d,h){d.action=h}function pU(d){var h=Po(),b=br;if(b!==null)return fU(h,b,d);Po(),h=h.memoizedState,b=Po();var T=b.queue.dispatch;return b.memoizedState=d,[h,T,!1]}function Sm(d,h,b,T){return d={tag:d,create:b,deps:T,inst:h,next:null},h=Rn.updateQueue,h===null&&(h=ZA(),Rn.updateQueue=h),b=h.lastEffect,b===null?h.lastEffect=d.next=d:(T=b.next,b.next=d,d.next=T,h.lastEffect=d),d}function AC(){return{destroy:void 0,resource:void 0}}function hU(){return Po().memoizedState}function MC(d,h,b,T){var $=da();T=T===void 0?null:T,Rn.flags|=d,$.memoizedState=Sm(1|h,AC(),b,T)}function Sb(d,h,b,T){var $=Po();T=T===void 0?null:T;var F=$.memoizedState.inst;br!==null&&T!==null&&KA(T,br.memoizedState.deps)?$.memoizedState=Sm(h,F,b,T):(Rn.flags|=d,$.memoizedState=Sm(1|h,F,b,T))}function mU(d,h){MC(8390656,8,d,h)}function gU(d,h){Sb(2048,8,d,h)}function yU(d,h){return Sb(4,2,d,h)}function vU(d,h){return Sb(4,4,d,h)}function bU(d,h){if(typeof h=="function"){d=d();var b=h(d);return function(){typeof b=="function"?b():h(null)}}if(h!=null)return d=d(),h.current=d,function(){h.current=null}}function xU(d,h,b){b=b!=null?b.concat([d]):null,Sb(4,4,bU.bind(null,h,d),b)}function iM(){}function SU(d,h){var b=Po();h=h===void 0?null:h;var T=b.memoizedState;return h!==null&&KA(h,T[1])?T[0]:(b.memoizedState=[d,h],d)}function wU(d,h){var b=Po();h=h===void 0?null:h;var T=b.memoizedState;if(h!==null&&KA(h,T[1]))return T[0];if(T=d(),dp){ut(!0);try{d()}finally{ut(!1)}}return b.memoizedState=[T,h],T}function aM(d,h,b){return b===void 0||(bd&1073741824)!==0?d.memoizedState=h:(d.memoizedState=b,d=T4(),Rn.lanes|=d,Od|=d,b)}function CU(d,h,b,T){return ka(b,h)?b:vm.current!==null?(d=aM(d,b,T),ka(d,h)||(Jo=!0),d):(bd&42)===0?(Jo=!0,d.memoizedState=b):(d=T4(),Rn.lanes|=d,Od|=d,h)}function EU(d,h,b,T,$){var F=V.p;V.p=F!==0&&8>F?F:8;var X=L.T,re={};L.T=re,cM(d,!1,h,b);try{var ge=$(),Ne=L.S;if(Ne!==null&&Ne(re,ge),ge!==null&&typeof ge=="object"&&typeof ge.then=="function"){var Ze=uge(ge,T);wb(d,h,Ze,Fa(d))}else wb(d,h,T,Fa(d))}catch(ot){wb(d,h,{then:function(){},status:"rejected",reason:ot},Fa())}finally{V.p=F,L.T=X}}function mge(){}function sM(d,h,b,T){if(d.tag!==5)throw Error(r(476));var $=TU(d).queue;EU(d,$,h,W,b===null?mge:function(){return OU(d),b(T)})}function TU(d){var h=d.memoizedState;if(h!==null)return h;h={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:W},next:null};var b={};return h.next={memoizedState:b,baseState:b,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:b},next:null},d.memoizedState=h,d=d.alternate,d!==null&&(d.memoizedState=h),h}function OU(d){var h=TU(d).next.queue;wb(d,h,{},Fa())}function lM(){return Ai(Bb)}function IU(){return Po().memoizedState}function PU(){return Po().memoizedState}function gge(d){for(var h=d.return;h!==null;){switch(h.tag){case 24:case 3:var b=Fa();d=yd(b);var T=vd(h,d,b);T!==null&&(ja(T,h,b),gb(T,h,b)),h={cache:FA()},d.payload=h;return}h=h.return}}function yge(d,h,b){var T=Fa();b={lane:T,revertLane:0,action:b,hasEagerState:!1,eagerState:null,next:null},RC(d)?MU(h,b):(b=PA(d,h,b,T),b!==null&&(ja(b,d,T),RU(b,h,T)))}function AU(d,h,b){var T=Fa();wb(d,h,b,T)}function wb(d,h,b,T){var $={lane:T,revertLane:0,action:b,hasEagerState:!1,eagerState:null,next:null};if(RC(d))MU(h,$);else{var F=d.alternate;if(d.lanes===0&&(F===null||F.lanes===0)&&(F=h.lastRenderedReducer,F!==null))try{var X=h.lastRenderedState,re=F(X,b);if($.hasEagerState=!0,$.eagerState=re,ka(re,X))return hC(d,h,$,0),Dr===null&&pC(),!1}catch{}finally{}if(b=PA(d,h,$,T),b!==null)return ja(b,d,T),RU(b,h,T),!0}return!1}function cM(d,h,b,T){if(T={lane:2,revertLane:zM(),action:T,hasEagerState:!1,eagerState:null,next:null},RC(d)){if(h)throw Error(r(479))}else h=PA(d,b,T,2),h!==null&&ja(h,d,2)}function RC(d){var h=d.alternate;return d===Rn||h!==null&&h===Rn}function MU(d,h){bm=TC=!0;var b=d.pending;b===null?h.next=h:(h.next=b.next,b.next=h),d.pending=h}function RU(d,h,b){if((b&4194048)!==0){var T=h.lanes;T&=d.pendingLanes,b|=T,h.lanes=b,oo(d,b)}}var DC={readContext:Ai,use:IC,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo},DU={readContext:Ai,use:IC,useCallback:function(d,h){return da().memoizedState=[d,h===void 0?null:h],d},useContext:Ai,useEffect:mU,useImperativeHandle:function(d,h,b){b=b!=null?b.concat([d]):null,MC(4194308,4,bU.bind(null,h,d),b)},useLayoutEffect:function(d,h){return MC(4194308,4,d,h)},useInsertionEffect:function(d,h){MC(4,2,d,h)},useMemo:function(d,h){var b=da();h=h===void 0?null:h;var T=d();if(dp){ut(!0);try{d()}finally{ut(!1)}}return b.memoizedState=[T,h],T},useReducer:function(d,h,b){var T=da();if(b!==void 0){var $=b(h);if(dp){ut(!0);try{b(h)}finally{ut(!1)}}}else $=h;return T.memoizedState=T.baseState=$,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:$},T.queue=d,d=d.dispatch=yge.bind(null,Rn,d),[T.memoizedState,d]},useRef:function(d){var h=da();return d={current:d},h.memoizedState=d},useState:function(d){d=rM(d);var h=d.queue,b=AU.bind(null,Rn,h);return h.dispatch=b,[d.memoizedState,b]},useDebugValue:iM,useDeferredValue:function(d,h){var b=da();return aM(b,d,h)},useTransition:function(){var d=rM(!1);return d=EU.bind(null,Rn,d.queue,!0,!1),da().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,h,b){var T=Rn,$=da();if(rr){if(b===void 0)throw Error(r(407));b=b()}else{if(b=h(),Dr===null)throw Error(r(349));(qn&124)!==0||Z5(T,h,b)}$.memoizedState=b;var F={value:b,getSnapshot:h};return $.queue=F,mU(tU.bind(null,T,F,d),[d]),T.flags|=2048,Sm(9,AC(),eU.bind(null,T,F,b,h),null),b},useId:function(){var d=da(),h=Dr.identifierPrefix;if(rr){var b=iu,T=ou;b=(T&~(1<<32-Be(T)-1)).toString(32)+b,h="«"+h+"R"+b,b=OC++,0<b&&(h+="H"+b.toString(32)),h+="»"}else b=dge++,h="«"+h+"r"+b.toString(32)+"»";return d.memoizedState=h},useHostTransitionStatus:lM,useFormState:uU,useActionState:uU,useOptimistic:function(d){var h=da();h.memoizedState=h.baseState=d;var b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return h.queue=b,h=cM.bind(null,Rn,!0,b),b.dispatch=h,[d,h]},useMemoCache:eM,useCacheRefresh:function(){return da().memoizedState=gge.bind(null,Rn)}},kU={readContext:Ai,use:IC,useCallback:SU,useContext:Ai,useEffect:gU,useImperativeHandle:xU,useInsertionEffect:yU,useLayoutEffect:vU,useMemo:wU,useReducer:PC,useRef:hU,useState:function(){return PC(lu)},useDebugValue:iM,useDeferredValue:function(d,h){var b=Po();return CU(b,br.memoizedState,d,h)},useTransition:function(){var d=PC(lu)[0],h=Po().memoizedState;return[typeof d=="boolean"?d:xb(d),h]},useSyncExternalStore:J5,useId:IU,useHostTransitionStatus:lM,useFormState:dU,useActionState:dU,useOptimistic:function(d,h){var b=Po();return oU(b,br,d,h)},useMemoCache:eM,useCacheRefresh:PU},vge={readContext:Ai,use:IC,useCallback:SU,useContext:Ai,useEffect:gU,useImperativeHandle:xU,useInsertionEffect:yU,useLayoutEffect:vU,useMemo:wU,useReducer:nM,useRef:hU,useState:function(){return nM(lu)},useDebugValue:iM,useDeferredValue:function(d,h){var b=Po();return br===null?aM(b,d,h):CU(b,br.memoizedState,d,h)},useTransition:function(){var d=nM(lu)[0],h=Po().memoizedState;return[typeof d=="boolean"?d:xb(d),h]},useSyncExternalStore:J5,useId:IU,useHostTransitionStatus:lM,useFormState:pU,useActionState:pU,useOptimistic:function(d,h){var b=Po();return br!==null?oU(b,br,d,h):(b.baseState=d,[d,b.queue.dispatch])},useMemoCache:eM,useCacheRefresh:PU},wm=null,Cb=0;function kC(d){var h=Cb;return Cb+=1,wm===null&&(wm=[]),U5(wm,d,h)}function Eb(d,h){h=h.props.ref,d.ref=h!==void 0?h:null}function _C(d,h){throw h.$$typeof===f?Error(r(525)):(d=Object.prototype.toString.call(h),Error(r(31,d==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":d)))}function _U(d){var h=d._init;return h(d._payload)}function $U(d){function h(Ae,we){if(d){var _e=Ae.deletions;_e===null?(Ae.deletions=[we],Ae.flags|=16):_e.push(we)}}function b(Ae,we){if(!d)return null;for(;we!==null;)h(Ae,we),we=we.sibling;return null}function T(Ae){for(var we=new Map;Ae!==null;)Ae.key!==null?we.set(Ae.key,Ae):we.set(Ae.index,Ae),Ae=Ae.sibling;return we}function $(Ae,we){return Ae=ru(Ae,we),Ae.index=0,Ae.sibling=null,Ae}function F(Ae,we,_e){return Ae.index=_e,d?(_e=Ae.alternate,_e!==null?(_e=_e.index,_e<we?(Ae.flags|=67108866,we):_e):(Ae.flags|=67108866,we)):(Ae.flags|=1048576,we)}function X(Ae){return d&&Ae.alternate===null&&(Ae.flags|=67108866),Ae}function re(Ae,we,_e,tt){return we===null||we.tag!==6?(we=MA(_e,Ae.mode,tt),we.return=Ae,we):(we=$(we,_e),we.return=Ae,we)}function ge(Ae,we,_e,tt){var Bt=_e.type;return Bt===g?Ze(Ae,we,_e.props.children,tt,_e.key):we!==null&&(we.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===D&&_U(Bt)===we.type)?(we=$(we,_e.props),Eb(we,_e),we.return=Ae,we):(we=gC(_e.type,_e.key,_e.props,null,Ae.mode,tt),Eb(we,_e),we.return=Ae,we)}function Ne(Ae,we,_e,tt){return we===null||we.tag!==4||we.stateNode.containerInfo!==_e.containerInfo||we.stateNode.implementation!==_e.implementation?(we=RA(_e,Ae.mode,tt),we.return=Ae,we):(we=$(we,_e.children||[]),we.return=Ae,we)}function Ze(Ae,we,_e,tt,Bt){return we===null||we.tag!==7?(we=rp(_e,Ae.mode,tt,Bt),we.return=Ae,we):(we=$(we,_e),we.return=Ae,we)}function ot(Ae,we,_e){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return we=MA(""+we,Ae.mode,_e),we.return=Ae,we;if(typeof we=="object"&&we!==null){switch(we.$$typeof){case p:return _e=gC(we.type,we.key,we.props,null,Ae.mode,_e),Eb(_e,we),_e.return=Ae,_e;case m:return we=RA(we,Ae.mode,_e),we.return=Ae,we;case D:var tt=we._init;return we=tt(we._payload),ot(Ae,we,_e)}if(j(we)||N(we))return we=rp(we,Ae.mode,_e,null),we.return=Ae,we;if(typeof we.then=="function")return ot(Ae,kC(we),_e);if(we.$$typeof===E)return ot(Ae,xC(Ae,we),_e);_C(Ae,we)}return null}function Fe(Ae,we,_e,tt){var Bt=we!==null?we.key:null;if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return Bt!==null?null:re(Ae,we,""+_e,tt);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case p:return _e.key===Bt?ge(Ae,we,_e,tt):null;case m:return _e.key===Bt?Ne(Ae,we,_e,tt):null;case D:return Bt=_e._init,_e=Bt(_e._payload),Fe(Ae,we,_e,tt)}if(j(_e)||N(_e))return Bt!==null?null:Ze(Ae,we,_e,tt,null);if(typeof _e.then=="function")return Fe(Ae,we,kC(_e),tt);if(_e.$$typeof===E)return Fe(Ae,we,xC(Ae,_e),tt);_C(Ae,_e)}return null}function ze(Ae,we,_e,tt,Bt){if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return Ae=Ae.get(_e)||null,re(we,Ae,""+tt,Bt);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case p:return Ae=Ae.get(tt.key===null?_e:tt.key)||null,ge(we,Ae,tt,Bt);case m:return Ae=Ae.get(tt.key===null?_e:tt.key)||null,Ne(we,Ae,tt,Bt);case D:var _n=tt._init;return tt=_n(tt._payload),ze(Ae,we,_e,tt,Bt)}if(j(tt)||N(tt))return Ae=Ae.get(_e)||null,Ze(we,Ae,tt,Bt,null);if(typeof tt.then=="function")return ze(Ae,we,_e,kC(tt),Bt);if(tt.$$typeof===E)return ze(Ae,we,_e,xC(we,tt),Bt);_C(we,tt)}return null}function fn(Ae,we,_e,tt){for(var Bt=null,_n=null,Gt=we,sn=we=0,ei=null;Gt!==null&&sn<_e.length;sn++){Gt.index>sn?(ei=Gt,Gt=null):ei=Gt.sibling;var Jn=Fe(Ae,Gt,_e[sn],tt);if(Jn===null){Gt===null&&(Gt=ei);break}d&&Gt&&Jn.alternate===null&&h(Ae,Gt),we=F(Jn,we,sn),_n===null?Bt=Jn:_n.sibling=Jn,_n=Jn,Gt=ei}if(sn===_e.length)return b(Ae,Gt),rr&&ip(Ae,sn),Bt;if(Gt===null){for(;sn<_e.length;sn++)Gt=ot(Ae,_e[sn],tt),Gt!==null&&(we=F(Gt,we,sn),_n===null?Bt=Gt:_n.sibling=Gt,_n=Gt);return rr&&ip(Ae,sn),Bt}for(Gt=T(Gt);sn<_e.length;sn++)ei=ze(Gt,Ae,sn,_e[sn],tt),ei!==null&&(d&&ei.alternate!==null&&Gt.delete(ei.key===null?sn:ei.key),we=F(ei,we,sn),_n===null?Bt=ei:_n.sibling=ei,_n=ei);return d&&Gt.forEach(function($d){return h(Ae,$d)}),rr&&ip(Ae,sn),Bt}function nn(Ae,we,_e,tt){if(_e==null)throw Error(r(151));for(var Bt=null,_n=null,Gt=we,sn=we=0,ei=null,Jn=_e.next();Gt!==null&&!Jn.done;sn++,Jn=_e.next()){Gt.index>sn?(ei=Gt,Gt=null):ei=Gt.sibling;var $d=Fe(Ae,Gt,Jn.value,tt);if($d===null){Gt===null&&(Gt=ei);break}d&&Gt&&$d.alternate===null&&h(Ae,Gt),we=F($d,we,sn),_n===null?Bt=$d:_n.sibling=$d,_n=$d,Gt=ei}if(Jn.done)return b(Ae,Gt),rr&&ip(Ae,sn),Bt;if(Gt===null){for(;!Jn.done;sn++,Jn=_e.next())Jn=ot(Ae,Jn.value,tt),Jn!==null&&(we=F(Jn,we,sn),_n===null?Bt=Jn:_n.sibling=Jn,_n=Jn);return rr&&ip(Ae,sn),Bt}for(Gt=T(Gt);!Jn.done;sn++,Jn=_e.next())Jn=ze(Gt,Ae,sn,Jn.value,tt),Jn!==null&&(d&&Jn.alternate!==null&&Gt.delete(Jn.key===null?sn:Jn.key),we=F(Jn,we,sn),_n===null?Bt=Jn:_n.sibling=Jn,_n=Jn);return d&&Gt.forEach(function(bye){return h(Ae,bye)}),rr&&ip(Ae,sn),Bt}function Sr(Ae,we,_e,tt){if(typeof _e=="object"&&_e!==null&&_e.type===g&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case p:e:{for(var Bt=_e.key;we!==null;){if(we.key===Bt){if(Bt=_e.type,Bt===g){if(we.tag===7){b(Ae,we.sibling),tt=$(we,_e.props.children),tt.return=Ae,Ae=tt;break e}}else if(we.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===D&&_U(Bt)===we.type){b(Ae,we.sibling),tt=$(we,_e.props),Eb(tt,_e),tt.return=Ae,Ae=tt;break e}b(Ae,we);break}else h(Ae,we);we=we.sibling}_e.type===g?(tt=rp(_e.props.children,Ae.mode,tt,_e.key),tt.return=Ae,Ae=tt):(tt=gC(_e.type,_e.key,_e.props,null,Ae.mode,tt),Eb(tt,_e),tt.return=Ae,Ae=tt)}return X(Ae);case m:e:{for(Bt=_e.key;we!==null;){if(we.key===Bt)if(we.tag===4&&we.stateNode.containerInfo===_e.containerInfo&&we.stateNode.implementation===_e.implementation){b(Ae,we.sibling),tt=$(we,_e.children||[]),tt.return=Ae,Ae=tt;break e}else{b(Ae,we);break}else h(Ae,we);we=we.sibling}tt=RA(_e,Ae.mode,tt),tt.return=Ae,Ae=tt}return X(Ae);case D:return Bt=_e._init,_e=Bt(_e._payload),Sr(Ae,we,_e,tt)}if(j(_e))return fn(Ae,we,_e,tt);if(N(_e)){if(Bt=N(_e),typeof Bt!="function")throw Error(r(150));return _e=Bt.call(_e),nn(Ae,we,_e,tt)}if(typeof _e.then=="function")return Sr(Ae,we,kC(_e),tt);if(_e.$$typeof===E)return Sr(Ae,we,xC(Ae,_e),tt);_C(Ae,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint"?(_e=""+_e,we!==null&&we.tag===6?(b(Ae,we.sibling),tt=$(we,_e),tt.return=Ae,Ae=tt):(b(Ae,we),tt=MA(_e,Ae.mode,tt),tt.return=Ae,Ae=tt),X(Ae)):b(Ae,we)}return function(Ae,we,_e,tt){try{Cb=0;var Bt=Sr(Ae,we,_e,tt);return wm=null,Bt}catch(Gt){if(Gt===hb||Gt===wC)throw Gt;var _n=_a(29,Gt,null,Ae.mode);return _n.lanes=tt,_n.return=Ae,_n}finally{}}}var Cm=$U(!0),NU=$U(!1),Ss=q(null),ac=null;function xd(d){var h=d.alternate;Z(Lo,Lo.current&1),Z(Ss,d),ac===null&&(h===null||vm.current!==null||h.memoizedState!==null)&&(ac=d)}function LU(d){if(d.tag===22){if(Z(Lo,Lo.current),Z(Ss,d),ac===null){var h=d.alternate;h!==null&&h.memoizedState!==null&&(ac=d)}}else Sd()}function Sd(){Z(Lo,Lo.current),Z(Ss,Ss.current)}function cu(d){Y(Ss),ac===d&&(ac=null),Y(Lo)}var Lo=q(0);function $C(d){for(var h=d;h!==null;){if(h.tag===13){var b=h.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||b.data==="$?"||ZM(b)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}function uM(d,h,b,T){h=d.memoizedState,b=b(T,h),b=b==null?h:u({},h,b),d.memoizedState=b,d.lanes===0&&(d.updateQueue.baseState=b)}var dM={enqueueSetState:function(d,h,b){d=d._reactInternals;var T=Fa(),$=yd(T);$.payload=h,b!=null&&($.callback=b),h=vd(d,$,T),h!==null&&(ja(h,d,T),gb(h,d,T))},enqueueReplaceState:function(d,h,b){d=d._reactInternals;var T=Fa(),$=yd(T);$.tag=1,$.payload=h,b!=null&&($.callback=b),h=vd(d,$,T),h!==null&&(ja(h,d,T),gb(h,d,T))},enqueueForceUpdate:function(d,h){d=d._reactInternals;var b=Fa(),T=yd(b);T.tag=2,h!=null&&(T.callback=h),h=vd(d,T,b),h!==null&&(ja(h,d,b),gb(h,d,b))}};function FU(d,h,b,T,$,F,X){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(T,F,X):h.prototype&&h.prototype.isPureReactComponent?!ab(b,T)||!ab($,F):!0}function jU(d,h,b,T){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(b,T),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(b,T),h.state!==d&&dM.enqueueReplaceState(h,h.state,null)}function fp(d,h){var b=h;if("ref"in h){b={};for(var T in h)T!=="ref"&&(b[T]=h[T])}if(d=d.defaultProps){b===h&&(b=u({},b));for(var $ in d)b[$]===void 0&&(b[$]=d[$])}return b}var NC=typeof reportError=="function"?reportError:function(d){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof d=="object"&&d!==null&&typeof d.message=="string"?String(d.message):String(d),error:d});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",d);return}console.error(d)};function BU(d){NC(d)}function zU(d){console.error(d)}function VU(d){NC(d)}function LC(d,h){try{var b=d.onUncaughtError;b(h.value,{componentStack:h.stack})}catch(T){setTimeout(function(){throw T})}}function HU(d,h,b){try{var T=d.onCaughtError;T(b.value,{componentStack:b.stack,errorBoundary:h.tag===1?h.stateNode:null})}catch($){setTimeout(function(){throw $})}}function fM(d,h,b){return b=yd(b),b.tag=3,b.payload={element:null},b.callback=function(){LC(d,h)},b}function UU(d){return d=yd(d),d.tag=3,d}function GU(d,h,b,T){var $=b.type.getDerivedStateFromError;if(typeof $=="function"){var F=T.value;d.payload=function(){return $(F)},d.callback=function(){HU(h,b,T)}}var X=b.stateNode;X!==null&&typeof X.componentDidCatch=="function"&&(d.callback=function(){HU(h,b,T),typeof $!="function"&&(Id===null?Id=new Set([this]):Id.add(this));var re=T.stack;this.componentDidCatch(T.value,{componentStack:re!==null?re:""})})}function bge(d,h,b,T,$){if(b.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){if(h=b.alternate,h!==null&&db(h,b,$,!0),b=Ss.current,b!==null){switch(b.tag){case 13:return ac===null?NM():b.alternate===null&&ao===0&&(ao=3),b.flags&=-257,b.flags|=65536,b.lanes=$,T===zA?b.flags|=16384:(h=b.updateQueue,h===null?b.updateQueue=new Set([T]):h.add(T),FM(d,T,$)),!1;case 22:return b.flags|=65536,T===zA?b.flags|=16384:(h=b.updateQueue,h===null?(h={transitions:null,markerInstances:null,retryQueue:new Set([T])},b.updateQueue=h):(b=h.retryQueue,b===null?h.retryQueue=new Set([T]):b.add(T)),FM(d,T,$)),!1}throw Error(r(435,b.tag))}return FM(d,T,$),NM(),!1}if(rr)return h=Ss.current,h!==null?((h.flags&65536)===0&&(h.flags|=256),h.flags|=65536,h.lanes=$,T!==_A&&(d=Error(r(422),{cause:T}),ub(ys(d,b)))):(T!==_A&&(h=Error(r(423),{cause:T}),ub(ys(h,b))),d=d.current.alternate,d.flags|=65536,$&=-$,d.lanes|=$,T=ys(T,b),$=fM(d.stateNode,T,$),UA(d,$),ao!==4&&(ao=2)),!1;var F=Error(r(520),{cause:T});if(F=ys(F,b),Rb===null?Rb=[F]:Rb.push(F),ao!==4&&(ao=2),h===null)return!0;T=ys(T,b),b=h;do{switch(b.tag){case 3:return b.flags|=65536,d=$&-$,b.lanes|=d,d=fM(b.stateNode,T,d),UA(b,d),!1;case 1:if(h=b.type,F=b.stateNode,(b.flags&128)===0&&(typeof h.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(Id===null||!Id.has(F))))return b.flags|=65536,$&=-$,b.lanes|=$,$=UU($),GU($,d,b,T),UA(b,$),!1}b=b.return}while(b!==null);return!1}var qU=Error(r(461)),Jo=!1;function hi(d,h,b,T){h.child=d===null?NU(h,null,b,T):Cm(h,d.child,b,T)}function WU(d,h,b,T,$){b=b.render;var F=h.ref;if("ref"in T){var X={};for(var re in T)re!=="ref"&&(X[re]=T[re])}else X=T;return cp(h),T=YA(d,h,b,X,F,$),re=QA(),d!==null&&!Jo?(XA(d,h,$),uu(d,h,$)):(rr&&re&&DA(h),h.flags|=1,hi(d,h,T,$),h.child)}function KU(d,h,b,T,$){if(d===null){var F=b.type;return typeof F=="function"&&!AA(F)&&F.defaultProps===void 0&&b.compare===null?(h.tag=15,h.type=F,YU(d,h,F,T,$)):(d=gC(b.type,null,T,h,h.mode,$),d.ref=h.ref,d.return=h,h.child=d)}if(F=d.child,!xM(d,$)){var X=F.memoizedProps;if(b=b.compare,b=b!==null?b:ab,b(X,T)&&d.ref===h.ref)return uu(d,h,$)}return h.flags|=1,d=ru(F,T),d.ref=h.ref,d.return=h,h.child=d}function YU(d,h,b,T,$){if(d!==null){var F=d.memoizedProps;if(ab(F,T)&&d.ref===h.ref)if(Jo=!1,h.pendingProps=T=F,xM(d,$))(d.flags&131072)!==0&&(Jo=!0);else return h.lanes=d.lanes,uu(d,h,$)}return pM(d,h,b,T,$)}function QU(d,h,b){var T=h.pendingProps,$=T.children,F=d!==null?d.memoizedState:null;if(T.mode==="hidden"){if((h.flags&128)!==0){if(T=F!==null?F.baseLanes|b:b,d!==null){for($=h.child=d.child,F=0;$!==null;)F=F|$.lanes|$.childLanes,$=$.sibling;h.childLanes=F&~T}else h.childLanes=0,h.child=null;return XU(d,h,T,b)}if((b&536870912)!==0)h.memoizedState={baseLanes:0,cachePool:null},d!==null&&SC(h,F!==null?F.cachePool:null),F!==null?Y5(h,F):qA(),LU(h);else return h.lanes=h.childLanes=536870912,XU(d,h,F!==null?F.baseLanes|b:b,b)}else F!==null?(SC(h,F.cachePool),Y5(h,F),Sd(),h.memoizedState=null):(d!==null&&SC(h,null),qA(),Sd());return hi(d,h,$,b),h.child}function XU(d,h,b,T){var $=BA();return $=$===null?null:{parent:No._currentValue,pool:$},h.memoizedState={baseLanes:b,cachePool:$},d!==null&&SC(h,null),qA(),LU(h),d!==null&&db(d,h,T,!0),null}function FC(d,h){var b=h.ref;if(b===null)d!==null&&d.ref!==null&&(h.flags|=4194816);else{if(typeof b!="function"&&typeof b!="object")throw Error(r(284));(d===null||d.ref!==b)&&(h.flags|=4194816)}}function pM(d,h,b,T,$){return cp(h),b=YA(d,h,b,T,void 0,$),T=QA(),d!==null&&!Jo?(XA(d,h,$),uu(d,h,$)):(rr&&T&&DA(h),h.flags|=1,hi(d,h,b,$),h.child)}function JU(d,h,b,T,$,F){return cp(h),h.updateQueue=null,b=X5(h,T,b,$),Q5(d),T=QA(),d!==null&&!Jo?(XA(d,h,F),uu(d,h,F)):(rr&&T&&DA(h),h.flags|=1,hi(d,h,b,F),h.child)}function ZU(d,h,b,T,$){if(cp(h),h.stateNode===null){var F=pm,X=b.contextType;typeof X=="object"&&X!==null&&(F=Ai(X)),F=new b(T,F),h.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,F.updater=dM,h.stateNode=F,F._reactInternals=h,F=h.stateNode,F.props=T,F.state=h.memoizedState,F.refs={},VA(h),X=b.contextType,F.context=typeof X=="object"&&X!==null?Ai(X):pm,F.state=h.memoizedState,X=b.getDerivedStateFromProps,typeof X=="function"&&(uM(h,b,X,T),F.state=h.memoizedState),typeof b.getDerivedStateFromProps=="function"||typeof F.getSnapshotBeforeUpdate=="function"||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(X=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),X!==F.state&&dM.enqueueReplaceState(F,F.state,null),vb(h,T,F,$),yb(),F.state=h.memoizedState),typeof F.componentDidMount=="function"&&(h.flags|=4194308),T=!0}else if(d===null){F=h.stateNode;var re=h.memoizedProps,ge=fp(b,re);F.props=ge;var Ne=F.context,Ze=b.contextType;X=pm,typeof Ze=="object"&&Ze!==null&&(X=Ai(Ze));var ot=b.getDerivedStateFromProps;Ze=typeof ot=="function"||typeof F.getSnapshotBeforeUpdate=="function",re=h.pendingProps!==re,Ze||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(re||Ne!==X)&&jU(h,F,T,X),gd=!1;var Fe=h.memoizedState;F.state=Fe,vb(h,T,F,$),yb(),Ne=h.memoizedState,re||Fe!==Ne||gd?(typeof ot=="function"&&(uM(h,b,ot,T),Ne=h.memoizedState),(ge=gd||FU(h,b,ge,T,Fe,Ne,X))?(Ze||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(h.flags|=4194308)):(typeof F.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=T,h.memoizedState=Ne),F.props=T,F.state=Ne,F.context=X,T=ge):(typeof F.componentDidMount=="function"&&(h.flags|=4194308),T=!1)}else{F=h.stateNode,HA(d,h),X=h.memoizedProps,Ze=fp(b,X),F.props=Ze,ot=h.pendingProps,Fe=F.context,Ne=b.contextType,ge=pm,typeof Ne=="object"&&Ne!==null&&(ge=Ai(Ne)),re=b.getDerivedStateFromProps,(Ne=typeof re=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(X!==ot||Fe!==ge)&&jU(h,F,T,ge),gd=!1,Fe=h.memoizedState,F.state=Fe,vb(h,T,F,$),yb();var ze=h.memoizedState;X!==ot||Fe!==ze||gd||d!==null&&d.dependencies!==null&&bC(d.dependencies)?(typeof re=="function"&&(uM(h,b,re,T),ze=h.memoizedState),(Ze=gd||FU(h,b,Ze,T,Fe,ze,ge)||d!==null&&d.dependencies!==null&&bC(d.dependencies))?(Ne||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(T,ze,ge),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(T,ze,ge)),typeof F.componentDidUpdate=="function"&&(h.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof F.componentDidUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(h.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(h.flags|=1024),h.memoizedProps=T,h.memoizedState=ze),F.props=T,F.state=ze,F.context=ge,T=Ze):(typeof F.componentDidUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(h.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===d.memoizedProps&&Fe===d.memoizedState||(h.flags|=1024),T=!1)}return F=T,FC(d,h),T=(h.flags&128)!==0,F||T?(F=h.stateNode,b=T&&typeof b.getDerivedStateFromError!="function"?null:F.render(),h.flags|=1,d!==null&&T?(h.child=Cm(h,d.child,null,$),h.child=Cm(h,null,b,$)):hi(d,h,b,$),h.memoizedState=F.state,d=h.child):d=uu(d,h,$),d}function e4(d,h,b,T){return cb(),h.flags|=256,hi(d,h,b,T),h.child}var hM={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mM(d){return{baseLanes:d,cachePool:z5()}}function gM(d,h,b){return d=d!==null?d.childLanes&~b:0,h&&(d|=ws),d}function t4(d,h,b){var T=h.pendingProps,$=!1,F=(h.flags&128)!==0,X;if((X=F)||(X=d!==null&&d.memoizedState===null?!1:(Lo.current&2)!==0),X&&($=!0,h.flags&=-129),X=(h.flags&32)!==0,h.flags&=-33,d===null){if(rr){if($?xd(h):Sd(),rr){var re=io,ge;if(ge=re){e:{for(ge=re,re=ic;ge.nodeType!==8;){if(!re){re=null;break e}if(ge=gl(ge.nextSibling),ge===null){re=null;break e}}re=ge}re!==null?(h.memoizedState={dehydrated:re,treeContext:op!==null?{id:ou,overflow:iu}:null,retryLane:536870912,hydrationErrors:null},ge=_a(18,null,null,0),ge.stateNode=re,ge.return=h,h.child=ge,Ui=h,io=null,ge=!0):ge=!1}ge||sp(h)}if(re=h.memoizedState,re!==null&&(re=re.dehydrated,re!==null))return ZM(re)?h.lanes=32:h.lanes=536870912,null;cu(h)}return re=T.children,T=T.fallback,$?(Sd(),$=h.mode,re=jC({mode:"hidden",children:re},$),T=rp(T,$,b,null),re.return=h,T.return=h,re.sibling=T,h.child=re,$=h.child,$.memoizedState=mM(b),$.childLanes=gM(d,X,b),h.memoizedState=hM,T):(xd(h),yM(h,re))}if(ge=d.memoizedState,ge!==null&&(re=ge.dehydrated,re!==null)){if(F)h.flags&256?(xd(h),h.flags&=-257,h=vM(d,h,b)):h.memoizedState!==null?(Sd(),h.child=d.child,h.flags|=128,h=null):(Sd(),$=T.fallback,re=h.mode,T=jC({mode:"visible",children:T.children},re),$=rp($,re,b,null),$.flags|=2,T.return=h,$.return=h,T.sibling=$,h.child=T,Cm(h,d.child,null,b),T=h.child,T.memoizedState=mM(b),T.childLanes=gM(d,X,b),h.memoizedState=hM,h=$);else if(xd(h),ZM(re)){if(X=re.nextSibling&&re.nextSibling.dataset,X)var Ne=X.dgst;X=Ne,T=Error(r(419)),T.stack="",T.digest=X,ub({value:T,source:null,stack:null}),h=vM(d,h,b)}else if(Jo||db(d,h,b,!1),X=(b&d.childLanes)!==0,Jo||X){if(X=Dr,X!==null&&(T=b&-b,T=(T&42)!==0?1:Ii(T),T=(T&(X.suspendedLanes|b))!==0?0:T,T!==0&&T!==ge.retryLane))throw ge.retryLane=T,fm(d,T),ja(X,d,T),qU;re.data==="$?"||NM(),h=vM(d,h,b)}else re.data==="$?"?(h.flags|=192,h.child=d.child,h=null):(d=ge.treeContext,io=gl(re.nextSibling),Ui=h,rr=!0,ap=null,ic=!1,d!==null&&(bs[xs++]=ou,bs[xs++]=iu,bs[xs++]=op,ou=d.id,iu=d.overflow,op=h),h=yM(h,T.children),h.flags|=4096);return h}return $?(Sd(),$=T.fallback,re=h.mode,ge=d.child,Ne=ge.sibling,T=ru(ge,{mode:"hidden",children:T.children}),T.subtreeFlags=ge.subtreeFlags&65011712,Ne!==null?$=ru(Ne,$):($=rp($,re,b,null),$.flags|=2),$.return=h,T.return=h,T.sibling=$,h.child=T,T=$,$=h.child,re=d.child.memoizedState,re===null?re=mM(b):(ge=re.cachePool,ge!==null?(Ne=No._currentValue,ge=ge.parent!==Ne?{parent:Ne,pool:Ne}:ge):ge=z5(),re={baseLanes:re.baseLanes|b,cachePool:ge}),$.memoizedState=re,$.childLanes=gM(d,X,b),h.memoizedState=hM,T):(xd(h),b=d.child,d=b.sibling,b=ru(b,{mode:"visible",children:T.children}),b.return=h,b.sibling=null,d!==null&&(X=h.deletions,X===null?(h.deletions=[d],h.flags|=16):X.push(d)),h.child=b,h.memoizedState=null,b)}function yM(d,h){return h=jC({mode:"visible",children:h},d.mode),h.return=d,d.child=h}function jC(d,h){return d=_a(22,d,null,h),d.lanes=0,d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},d}function vM(d,h,b){return Cm(h,d.child,null,b),d=yM(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function n4(d,h,b){d.lanes|=h;var T=d.alternate;T!==null&&(T.lanes|=h),NA(d.return,h,b)}function bM(d,h,b,T,$){var F=d.memoizedState;F===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:T,tail:b,tailMode:$}:(F.isBackwards=h,F.rendering=null,F.renderingStartTime=0,F.last=T,F.tail=b,F.tailMode=$)}function r4(d,h,b){var T=h.pendingProps,$=T.revealOrder,F=T.tail;if(hi(d,h,T.children,b),T=Lo.current,(T&2)!==0)T=T&1|2,h.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&n4(d,b,h);else if(d.tag===19)n4(d,b,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}T&=1}switch(Z(Lo,T),$){case"forwards":for(b=h.child,$=null;b!==null;)d=b.alternate,d!==null&&$C(d)===null&&($=b),b=b.sibling;b=$,b===null?($=h.child,h.child=null):($=b.sibling,b.sibling=null),bM(h,!1,$,b,F);break;case"backwards":for(b=null,$=h.child,h.child=null;$!==null;){if(d=$.alternate,d!==null&&$C(d)===null){h.child=$;break}d=$.sibling,$.sibling=b,b=$,$=d}bM(h,!0,b,null,F);break;case"together":bM(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function uu(d,h,b){if(d!==null&&(h.dependencies=d.dependencies),Od|=h.lanes,(b&h.childLanes)===0)if(d!==null){if(db(d,h,b,!1),(b&h.childLanes)===0)return null}else return null;if(d!==null&&h.child!==d.child)throw Error(r(153));if(h.child!==null){for(d=h.child,b=ru(d,d.pendingProps),h.child=b,b.return=h;d.sibling!==null;)d=d.sibling,b=b.sibling=ru(d,d.pendingProps),b.return=h;b.sibling=null}return h.child}function xM(d,h){return(d.lanes&h)!==0?!0:(d=d.dependencies,!!(d!==null&&bC(d)))}function xge(d,h,b){switch(h.tag){case 3:Se(h,h.stateNode.containerInfo),md(h,No,d.memoizedState.cache),cb();break;case 27:case 5:le(h);break;case 4:Se(h,h.stateNode.containerInfo);break;case 10:md(h,h.type,h.memoizedProps.value);break;case 13:var T=h.memoizedState;if(T!==null)return T.dehydrated!==null?(xd(h),h.flags|=128,null):(b&h.child.childLanes)!==0?t4(d,h,b):(xd(h),d=uu(d,h,b),d!==null?d.sibling:null);xd(h);break;case 19:var $=(d.flags&128)!==0;if(T=(b&h.childLanes)!==0,T||(db(d,h,b,!1),T=(b&h.childLanes)!==0),$){if(T)return r4(d,h,b);h.flags|=128}if($=h.memoizedState,$!==null&&($.rendering=null,$.tail=null,$.lastEffect=null),Z(Lo,Lo.current),T)break;return null;case 22:case 23:return h.lanes=0,QU(d,h,b);case 24:md(h,No,d.memoizedState.cache)}return uu(d,h,b)}function o4(d,h,b){if(d!==null)if(d.memoizedProps!==h.pendingProps)Jo=!0;else{if(!xM(d,b)&&(h.flags&128)===0)return Jo=!1,xge(d,h,b);Jo=(d.flags&131072)!==0}else Jo=!1,rr&&(h.flags&1048576)!==0&&_5(h,vC,h.index);switch(h.lanes=0,h.tag){case 16:e:{d=h.pendingProps;var T=h.elementType,$=T._init;if(T=$(T._payload),h.type=T,typeof T=="function")AA(T)?(d=fp(T,d),h.tag=1,h=ZU(null,h,T,d,b)):(h.tag=0,h=pM(null,h,T,d,b));else{if(T!=null){if($=T.$$typeof,$===I){h.tag=11,h=WU(null,h,T,d,b);break e}else if($===R){h.tag=14,h=KU(null,h,T,d,b);break e}}throw h=H(T)||T,Error(r(306,h,""))}}return h;case 0:return pM(d,h,h.type,h.pendingProps,b);case 1:return T=h.type,$=fp(T,h.pendingProps),ZU(d,h,T,$,b);case 3:e:{if(Se(h,h.stateNode.containerInfo),d===null)throw Error(r(387));T=h.pendingProps;var F=h.memoizedState;$=F.element,HA(d,h),vb(h,T,null,b);var X=h.memoizedState;if(T=X.cache,md(h,No,T),T!==F.cache&&LA(h,[No],b,!0),yb(),T=X.element,F.isDehydrated)if(F={element:T,isDehydrated:!1,cache:X.cache},h.updateQueue.baseState=F,h.memoizedState=F,h.flags&256){h=e4(d,h,T,b);break e}else if(T!==$){$=ys(Error(r(424)),h),ub($),h=e4(d,h,T,b);break e}else{switch(d=h.stateNode.containerInfo,d.nodeType){case 9:d=d.body;break;default:d=d.nodeName==="HTML"?d.ownerDocument.body:d}for(io=gl(d.firstChild),Ui=h,rr=!0,ap=null,ic=!0,b=NU(h,null,T,b),h.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling}else{if(cb(),T===$){h=uu(d,h,b);break e}hi(d,h,T,b)}h=h.child}return h;case 26:return FC(d,h),d===null?(b=l3(h.type,null,h.pendingProps,null))?h.memoizedState=b:rr||(b=h.type,d=h.pendingProps,T=ZC(ce.current).createElement(b),T[Ht]=h,T[Jt]=d,gi(T,b,d),He(T),h.stateNode=T):h.memoizedState=l3(h.type,d.memoizedProps,h.pendingProps,d.memoizedState),null;case 27:return le(h),d===null&&rr&&(T=h.stateNode=i3(h.type,h.pendingProps,ce.current),Ui=h,ic=!0,$=io,Md(h.type)?(eR=$,io=gl(T.firstChild)):io=$),hi(d,h,h.pendingProps.children,b),FC(d,h),d===null&&(h.flags|=4194304),h.child;case 5:return d===null&&rr&&(($=T=io)&&(T=Kge(T,h.type,h.pendingProps,ic),T!==null?(h.stateNode=T,Ui=h,io=gl(T.firstChild),ic=!1,$=!0):$=!1),$||sp(h)),le(h),$=h.type,F=h.pendingProps,X=d!==null?d.memoizedProps:null,T=F.children,QM($,F)?T=null:X!==null&&QM($,X)&&(h.flags|=32),h.memoizedState!==null&&($=YA(d,h,fge,null,null,b),Bb._currentValue=$),FC(d,h),hi(d,h,T,b),h.child;case 6:return d===null&&rr&&((d=b=io)&&(b=Yge(b,h.pendingProps,ic),b!==null?(h.stateNode=b,Ui=h,io=null,d=!0):d=!1),d||sp(h)),null;case 13:return t4(d,h,b);case 4:return Se(h,h.stateNode.containerInfo),T=h.pendingProps,d===null?h.child=Cm(h,null,T,b):hi(d,h,T,b),h.child;case 11:return WU(d,h,h.type,h.pendingProps,b);case 7:return hi(d,h,h.pendingProps,b),h.child;case 8:return hi(d,h,h.pendingProps.children,b),h.child;case 12:return hi(d,h,h.pendingProps.children,b),h.child;case 10:return T=h.pendingProps,md(h,h.type,T.value),hi(d,h,T.children,b),h.child;case 9:return $=h.type._context,T=h.pendingProps.children,cp(h),$=Ai($),T=T($),h.flags|=1,hi(d,h,T,b),h.child;case 14:return KU(d,h,h.type,h.pendingProps,b);case 15:return YU(d,h,h.type,h.pendingProps,b);case 19:return r4(d,h,b);case 31:return T=h.pendingProps,b=h.mode,T={mode:T.mode,children:T.children},d===null?(b=jC(T,b),b.ref=h.ref,h.child=b,b.return=h,h=b):(b=ru(d.child,T),b.ref=h.ref,h.child=b,b.return=h,h=b),h;case 22:return QU(d,h,b);case 24:return cp(h),T=Ai(No),d===null?($=BA(),$===null&&($=Dr,F=FA(),$.pooledCache=F,F.refCount++,F!==null&&($.pooledCacheLanes|=b),$=F),h.memoizedState={parent:T,cache:$},VA(h),md(h,No,$)):((d.lanes&b)!==0&&(HA(d,h),vb(h,null,null,b),yb()),$=d.memoizedState,F=h.memoizedState,$.parent!==T?($={parent:T,cache:T},h.memoizedState=$,h.lanes===0&&(h.memoizedState=h.updateQueue.baseState=$),md(h,No,T)):(T=F.cache,md(h,No,T),T!==$.cache&&LA(h,[No],b,!0))),hi(d,h,h.pendingProps.children,b),h.child;case 29:throw h.pendingProps}throw Error(r(156,h.tag))}function du(d){d.flags|=4}function i4(d,h){if(h.type!=="stylesheet"||(h.state.loading&4)!==0)d.flags&=-16777217;else if(d.flags|=16777216,!p3(h)){if(h=Ss.current,h!==null&&((qn&4194048)===qn?ac!==null:(qn&62914560)!==qn&&(qn&536870912)===0||h!==ac))throw mb=zA,V5;d.flags|=8192}}function BC(d,h){h!==null&&(d.flags|=4),d.flags&16384&&(h=d.tag!==22?Rr():536870912,d.lanes|=h,Im|=h)}function Tb(d,h){if(!rr)switch(d.tailMode){case"hidden":h=d.tail;for(var b=null;h!==null;)h.alternate!==null&&(b=h),h=h.sibling;b===null?d.tail=null:b.sibling=null;break;case"collapsed":b=d.tail;for(var T=null;b!==null;)b.alternate!==null&&(T=b),b=b.sibling;T===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:T.sibling=null}}function Zr(d){var h=d.alternate!==null&&d.alternate.child===d.child,b=0,T=0;if(h)for(var $=d.child;$!==null;)b|=$.lanes|$.childLanes,T|=$.subtreeFlags&65011712,T|=$.flags&65011712,$.return=d,$=$.sibling;else for($=d.child;$!==null;)b|=$.lanes|$.childLanes,T|=$.subtreeFlags,T|=$.flags,$.return=d,$=$.sibling;return d.subtreeFlags|=T,d.childLanes=b,h}function Sge(d,h,b){var T=h.pendingProps;switch(kA(h),h.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zr(h),null;case 1:return Zr(h),null;case 3:return b=h.stateNode,T=null,d!==null&&(T=d.memoizedState.cache),h.memoizedState.cache!==T&&(h.flags|=2048),su(No),ne(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(d===null||d.child===null)&&(lb(h)?du(h):d===null||d.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,L5())),Zr(h),null;case 26:return b=h.memoizedState,d===null?(du(h),b!==null?(Zr(h),i4(h,b)):(Zr(h),h.flags&=-16777217)):b?b!==d.memoizedState?(du(h),Zr(h),i4(h,b)):(Zr(h),h.flags&=-16777217):(d.memoizedProps!==T&&du(h),Zr(h),h.flags&=-16777217),null;case 27:de(h),b=ce.current;var $=h.type;if(d!==null&&h.stateNode!=null)d.memoizedProps!==T&&du(h);else{if(!T){if(h.stateNode===null)throw Error(r(166));return Zr(h),null}d=ie.current,lb(h)?$5(h):(d=i3($,T,b),h.stateNode=d,du(h))}return Zr(h),null;case 5:if(de(h),b=h.type,d!==null&&h.stateNode!=null)d.memoizedProps!==T&&du(h);else{if(!T){if(h.stateNode===null)throw Error(r(166));return Zr(h),null}if(d=ie.current,lb(h))$5(h);else{switch($=ZC(ce.current),d){case 1:d=$.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:d=$.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":d=$.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":d=$.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":d=$.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof T.is=="string"?$.createElement("select",{is:T.is}):$.createElement("select"),T.multiple?d.multiple=!0:T.size&&(d.size=T.size);break;default:d=typeof T.is=="string"?$.createElement(b,{is:T.is}):$.createElement(b)}}d[Ht]=h,d[Jt]=T;e:for($=h.child;$!==null;){if($.tag===5||$.tag===6)d.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===h)break e;for(;$.sibling===null;){if($.return===null||$.return===h)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}h.stateNode=d;e:switch(gi(d,b,T),b){case"button":case"input":case"select":case"textarea":d=!!T.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&du(h)}}return Zr(h),h.flags&=-16777217,null;case 6:if(d&&h.stateNode!=null)d.memoizedProps!==T&&du(h);else{if(typeof T!="string"&&h.stateNode===null)throw Error(r(166));if(d=ce.current,lb(h)){if(d=h.stateNode,b=h.memoizedProps,T=null,$=Ui,$!==null)switch($.tag){case 27:case 5:T=$.memoizedProps}d[Ht]=h,d=!!(d.nodeValue===b||T!==null&&T.suppressHydrationWarning===!0||J4(d.nodeValue,b)),d||sp(h)}else d=ZC(d).createTextNode(T),d[Ht]=h,h.stateNode=d}return Zr(h),null;case 13:if(T=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if($=lb(h),T!==null&&T.dehydrated!==null){if(d===null){if(!$)throw Error(r(318));if($=h.memoizedState,$=$!==null?$.dehydrated:null,!$)throw Error(r(317));$[Ht]=h}else cb(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Zr(h),$=!1}else $=L5(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=$),$=!0;if(!$)return h.flags&256?(cu(h),h):(cu(h),null)}if(cu(h),(h.flags&128)!==0)return h.lanes=b,h;if(b=T!==null,d=d!==null&&d.memoizedState!==null,b){T=h.child,$=null,T.alternate!==null&&T.alternate.memoizedState!==null&&T.alternate.memoizedState.cachePool!==null&&($=T.alternate.memoizedState.cachePool.pool);var F=null;T.memoizedState!==null&&T.memoizedState.cachePool!==null&&(F=T.memoizedState.cachePool.pool),F!==$&&(T.flags|=2048)}return b!==d&&b&&(h.child.flags|=8192),BC(h,h.updateQueue),Zr(h),null;case 4:return ne(),d===null&&GM(h.stateNode.containerInfo),Zr(h),null;case 10:return su(h.type),Zr(h),null;case 19:if(Y(Lo),$=h.memoizedState,$===null)return Zr(h),null;if(T=(h.flags&128)!==0,F=$.rendering,F===null)if(T)Tb($,!1);else{if(ao!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(F=$C(d),F!==null){for(h.flags|=128,Tb($,!1),d=F.updateQueue,h.updateQueue=d,BC(h,d),h.subtreeFlags=0,d=b,b=h.child;b!==null;)k5(b,d),b=b.sibling;return Z(Lo,Lo.current&1|2),h.child}d=d.sibling}$.tail!==null&&Re()>HC&&(h.flags|=128,T=!0,Tb($,!1),h.lanes=4194304)}else{if(!T)if(d=$C(F),d!==null){if(h.flags|=128,T=!0,d=d.updateQueue,h.updateQueue=d,BC(h,d),Tb($,!0),$.tail===null&&$.tailMode==="hidden"&&!F.alternate&&!rr)return Zr(h),null}else 2*Re()-$.renderingStartTime>HC&&b!==536870912&&(h.flags|=128,T=!0,Tb($,!1),h.lanes=4194304);$.isBackwards?(F.sibling=h.child,h.child=F):(d=$.last,d!==null?d.sibling=F:h.child=F,$.last=F)}return $.tail!==null?(h=$.tail,$.rendering=h,$.tail=h.sibling,$.renderingStartTime=Re(),h.sibling=null,d=Lo.current,Z(Lo,T?d&1|2:d&1),h):(Zr(h),null);case 22:case 23:return cu(h),WA(),T=h.memoizedState!==null,d!==null?d.memoizedState!==null!==T&&(h.flags|=8192):T&&(h.flags|=8192),T?(b&536870912)!==0&&(h.flags&128)===0&&(Zr(h),h.subtreeFlags&6&&(h.flags|=8192)):Zr(h),b=h.updateQueue,b!==null&&BC(h,b.retryQueue),b=null,d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),T=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(T=h.memoizedState.cachePool.pool),T!==b&&(h.flags|=2048),d!==null&&Y(up),null;case 24:return b=null,d!==null&&(b=d.memoizedState.cache),h.memoizedState.cache!==b&&(h.flags|=2048),su(No),Zr(h),null;case 25:return null;case 30:return null}throw Error(r(156,h.tag))}function wge(d,h){switch(kA(h),h.tag){case 1:return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return su(No),ne(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 26:case 27:case 5:return de(h),null;case 13:if(cu(h),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(r(340));cb()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return Y(Lo),null;case 4:return ne(),null;case 10:return su(h.type),null;case 22:case 23:return cu(h),WA(),d!==null&&Y(up),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 24:return su(No),null;case 25:return null;default:return null}}function a4(d,h){switch(kA(h),h.tag){case 3:su(No),ne();break;case 26:case 27:case 5:de(h);break;case 4:ne();break;case 13:cu(h);break;case 19:Y(Lo);break;case 10:su(h.type);break;case 22:case 23:cu(h),WA(),d!==null&&Y(up);break;case 24:su(No)}}function Ob(d,h){try{var b=h.updateQueue,T=b!==null?b.lastEffect:null;if(T!==null){var $=T.next;b=$;do{if((b.tag&d)===d){T=void 0;var F=b.create,X=b.inst;T=F(),X.destroy=T}b=b.next}while(b!==$)}}catch(re){Or(h,h.return,re)}}function wd(d,h,b){try{var T=h.updateQueue,$=T!==null?T.lastEffect:null;if($!==null){var F=$.next;T=F;do{if((T.tag&d)===d){var X=T.inst,re=X.destroy;if(re!==void 0){X.destroy=void 0,$=h;var ge=b,Ne=re;try{Ne()}catch(Ze){Or($,ge,Ze)}}}T=T.next}while(T!==F)}}catch(Ze){Or(h,h.return,Ze)}}function s4(d){var h=d.updateQueue;if(h!==null){var b=d.stateNode;try{K5(h,b)}catch(T){Or(d,d.return,T)}}}function l4(d,h,b){b.props=fp(d.type,d.memoizedProps),b.state=d.memoizedState;try{b.componentWillUnmount()}catch(T){Or(d,h,T)}}function Ib(d,h){try{var b=d.ref;if(b!==null){switch(d.tag){case 26:case 27:case 5:var T=d.stateNode;break;case 30:T=d.stateNode;break;default:T=d.stateNode}typeof b=="function"?d.refCleanup=b(T):b.current=T}}catch($){Or(d,h,$)}}function sc(d,h){var b=d.ref,T=d.refCleanup;if(b!==null)if(typeof T=="function")try{T()}catch($){Or(d,h,$)}finally{d.refCleanup=null,d=d.alternate,d!=null&&(d.refCleanup=null)}else if(typeof b=="function")try{b(null)}catch($){Or(d,h,$)}else b.current=null}function c4(d){var h=d.type,b=d.memoizedProps,T=d.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":b.autoFocus&&T.focus();break e;case"img":b.src?T.src=b.src:b.srcSet&&(T.srcset=b.srcSet)}}catch($){Or(d,d.return,$)}}function SM(d,h,b){try{var T=d.stateNode;Hge(T,d.type,b,h),T[Jt]=h}catch($){Or(d,d.return,$)}}function u4(d){return d.tag===5||d.tag===3||d.tag===26||d.tag===27&&Md(d.type)||d.tag===4}function wM(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||u4(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.tag===27&&Md(d.type)||d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function CM(d,h,b){var T=d.tag;if(T===5||T===6)d=d.stateNode,h?(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).insertBefore(d,h):(h=b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,h.appendChild(d),b=b._reactRootContainer,b!=null||h.onclick!==null||(h.onclick=JC));else if(T!==4&&(T===27&&Md(d.type)&&(b=d.stateNode,h=null),d=d.child,d!==null))for(CM(d,h,b),d=d.sibling;d!==null;)CM(d,h,b),d=d.sibling}function zC(d,h,b){var T=d.tag;if(T===5||T===6)d=d.stateNode,h?b.insertBefore(d,h):b.appendChild(d);else if(T!==4&&(T===27&&Md(d.type)&&(b=d.stateNode),d=d.child,d!==null))for(zC(d,h,b),d=d.sibling;d!==null;)zC(d,h,b),d=d.sibling}function d4(d){var h=d.stateNode,b=d.memoizedProps;try{for(var T=d.type,$=h.attributes;$.length;)h.removeAttributeNode($[0]);gi(h,T,b),h[Ht]=d,h[Jt]=b}catch(F){Or(d,d.return,F)}}var fu=!1,xo=!1,EM=!1,f4=typeof WeakSet=="function"?WeakSet:Set,Zo=null;function Cge(d,h){if(d=d.containerInfo,KM=i1,d=C5(d),wA(d)){if("selectionStart"in d)var b={start:d.selectionStart,end:d.selectionEnd};else e:{b=(b=d.ownerDocument)&&b.defaultView||window;var T=b.getSelection&&b.getSelection();if(T&&T.rangeCount!==0){b=T.anchorNode;var $=T.anchorOffset,F=T.focusNode;T=T.focusOffset;try{b.nodeType,F.nodeType}catch{b=null;break e}var X=0,re=-1,ge=-1,Ne=0,Ze=0,ot=d,Fe=null;t:for(;;){for(var ze;ot!==b||$!==0&&ot.nodeType!==3||(re=X+$),ot!==F||T!==0&&ot.nodeType!==3||(ge=X+T),ot.nodeType===3&&(X+=ot.nodeValue.length),(ze=ot.firstChild)!==null;)Fe=ot,ot=ze;for(;;){if(ot===d)break t;if(Fe===b&&++Ne===$&&(re=X),Fe===F&&++Ze===T&&(ge=X),(ze=ot.nextSibling)!==null)break;ot=Fe,Fe=ot.parentNode}ot=ze}b=re===-1||ge===-1?null:{start:re,end:ge}}else b=null}b=b||{start:0,end:0}}else b=null;for(YM={focusedElem:d,selectionRange:b},i1=!1,Zo=h;Zo!==null;)if(h=Zo,d=h.child,(h.subtreeFlags&1024)!==0&&d!==null)d.return=h,Zo=d;else for(;Zo!==null;){switch(h=Zo,F=h.alternate,d=h.flags,h.tag){case 0:break;case 11:case 15:break;case 1:if((d&1024)!==0&&F!==null){d=void 0,b=h,$=F.memoizedProps,F=F.memoizedState,T=b.stateNode;try{var fn=fp(b.type,$,b.elementType===b.type);d=T.getSnapshotBeforeUpdate(fn,F),T.__reactInternalSnapshotBeforeUpdate=d}catch(nn){Or(b,b.return,nn)}}break;case 3:if((d&1024)!==0){if(d=h.stateNode.containerInfo,b=d.nodeType,b===9)JM(d);else if(b===1)switch(d.nodeName){case"HEAD":case"HTML":case"BODY":JM(d);break;default:d.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error(r(163))}if(d=h.sibling,d!==null){d.return=h.return,Zo=d;break}Zo=h.return}}function p4(d,h,b){var T=b.flags;switch(b.tag){case 0:case 11:case 15:Cd(d,b),T&4&&Ob(5,b);break;case 1:if(Cd(d,b),T&4)if(d=b.stateNode,h===null)try{d.componentDidMount()}catch(X){Or(b,b.return,X)}else{var $=fp(b.type,h.memoizedProps);h=h.memoizedState;try{d.componentDidUpdate($,h,d.__reactInternalSnapshotBeforeUpdate)}catch(X){Or(b,b.return,X)}}T&64&&s4(b),T&512&&Ib(b,b.return);break;case 3:if(Cd(d,b),T&64&&(d=b.updateQueue,d!==null)){if(h=null,b.child!==null)switch(b.child.tag){case 27:case 5:h=b.child.stateNode;break;case 1:h=b.child.stateNode}try{K5(d,h)}catch(X){Or(b,b.return,X)}}break;case 27:h===null&&T&4&&d4(b);case 26:case 5:Cd(d,b),h===null&&T&4&&c4(b),T&512&&Ib(b,b.return);break;case 12:Cd(d,b);break;case 13:Cd(d,b),T&4&&g4(d,b),T&64&&(d=b.memoizedState,d!==null&&(d=d.dehydrated,d!==null&&(b=Dge.bind(null,b),Qge(d,b))));break;case 22:if(T=b.memoizedState!==null||fu,!T){h=h!==null&&h.memoizedState!==null||xo,$=fu;var F=xo;fu=T,(xo=h)&&!F?Ed(d,b,(b.subtreeFlags&8772)!==0):Cd(d,b),fu=$,xo=F}break;case 30:break;default:Cd(d,b)}}function h4(d){var h=d.alternate;h!==null&&(d.alternate=null,h4(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&vo(h)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}var Gr=null,fa=!1;function pu(d,h,b){for(b=b.child;b!==null;)m4(d,h,b),b=b.sibling}function m4(d,h,b){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(We,b)}catch{}switch(b.tag){case 26:xo||sc(b,h),pu(d,h,b),b.memoizedState?b.memoizedState.count--:b.stateNode&&(b=b.stateNode,b.parentNode.removeChild(b));break;case 27:xo||sc(b,h);var T=Gr,$=fa;Md(b.type)&&(Gr=b.stateNode,fa=!1),pu(d,h,b),Nb(b.stateNode),Gr=T,fa=$;break;case 5:xo||sc(b,h);case 6:if(T=Gr,$=fa,Gr=null,pu(d,h,b),Gr=T,fa=$,Gr!==null)if(fa)try{(Gr.nodeType===9?Gr.body:Gr.nodeName==="HTML"?Gr.ownerDocument.body:Gr).removeChild(b.stateNode)}catch(F){Or(b,h,F)}else try{Gr.removeChild(b.stateNode)}catch(F){Or(b,h,F)}break;case 18:Gr!==null&&(fa?(d=Gr,r3(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,b.stateNode),Ub(d)):r3(Gr,b.stateNode));break;case 4:T=Gr,$=fa,Gr=b.stateNode.containerInfo,fa=!0,pu(d,h,b),Gr=T,fa=$;break;case 0:case 11:case 14:case 15:xo||wd(2,b,h),xo||wd(4,b,h),pu(d,h,b);break;case 1:xo||(sc(b,h),T=b.stateNode,typeof T.componentWillUnmount=="function"&&l4(b,h,T)),pu(d,h,b);break;case 21:pu(d,h,b);break;case 22:xo=(T=xo)||b.memoizedState!==null,pu(d,h,b),xo=T;break;default:pu(d,h,b)}}function g4(d,h){if(h.memoizedState===null&&(d=h.alternate,d!==null&&(d=d.memoizedState,d!==null&&(d=d.dehydrated,d!==null))))try{Ub(d)}catch(b){Or(h,h.return,b)}}function Ege(d){switch(d.tag){case 13:case 19:var h=d.stateNode;return h===null&&(h=d.stateNode=new f4),h;case 22:return d=d.stateNode,h=d._retryCache,h===null&&(h=d._retryCache=new f4),h;default:throw Error(r(435,d.tag))}}function TM(d,h){var b=Ege(d);h.forEach(function(T){var $=kge.bind(null,d,T);b.has(T)||(b.add(T),T.then($,$))})}function $a(d,h){var b=h.deletions;if(b!==null)for(var T=0;T<b.length;T++){var $=b[T],F=d,X=h,re=X;e:for(;re!==null;){switch(re.tag){case 27:if(Md(re.type)){Gr=re.stateNode,fa=!1;break e}break;case 5:Gr=re.stateNode,fa=!1;break e;case 3:case 4:Gr=re.stateNode.containerInfo,fa=!0;break e}re=re.return}if(Gr===null)throw Error(r(160));m4(F,X,$),Gr=null,fa=!1,F=$.alternate,F!==null&&(F.return=null),$.return=null}if(h.subtreeFlags&13878)for(h=h.child;h!==null;)y4(h,d),h=h.sibling}var ml=null;function y4(d,h){var b=d.alternate,T=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:$a(h,d),Na(d),T&4&&(wd(3,d,d.return),Ob(3,d),wd(5,d,d.return));break;case 1:$a(h,d),Na(d),T&512&&(xo||b===null||sc(b,b.return)),T&64&&fu&&(d=d.updateQueue,d!==null&&(T=d.callbacks,T!==null&&(b=d.shared.hiddenCallbacks,d.shared.hiddenCallbacks=b===null?T:b.concat(T))));break;case 26:var $=ml;if($a(h,d),Na(d),T&512&&(xo||b===null||sc(b,b.return)),T&4){var F=b!==null?b.memoizedState:null;if(T=d.memoizedState,b===null)if(T===null)if(d.stateNode===null){e:{T=d.type,b=d.memoizedProps,$=$.ownerDocument||$;t:switch(T){case"title":F=$.getElementsByTagName("title")[0],(!F||F[Pi]||F[Ht]||F.namespaceURI==="http://www.w3.org/2000/svg"||F.hasAttribute("itemprop"))&&(F=$.createElement(T),$.head.insertBefore(F,$.querySelector("head > title"))),gi(F,T,b),F[Ht]=d,He(F),T=F;break e;case"link":var X=d3("link","href",$).get(T+(b.href||""));if(X){for(var re=0;re<X.length;re++)if(F=X[re],F.getAttribute("href")===(b.href==null||b.href===""?null:b.href)&&F.getAttribute("rel")===(b.rel==null?null:b.rel)&&F.getAttribute("title")===(b.title==null?null:b.title)&&F.getAttribute("crossorigin")===(b.crossOrigin==null?null:b.crossOrigin)){X.splice(re,1);break t}}F=$.createElement(T),gi(F,T,b),$.head.appendChild(F);break;case"meta":if(X=d3("meta","content",$).get(T+(b.content||""))){for(re=0;re<X.length;re++)if(F=X[re],F.getAttribute("content")===(b.content==null?null:""+b.content)&&F.getAttribute("name")===(b.name==null?null:b.name)&&F.getAttribute("property")===(b.property==null?null:b.property)&&F.getAttribute("http-equiv")===(b.httpEquiv==null?null:b.httpEquiv)&&F.getAttribute("charset")===(b.charSet==null?null:b.charSet)){X.splice(re,1);break t}}F=$.createElement(T),gi(F,T,b),$.head.appendChild(F);break;default:throw Error(r(468,T))}F[Ht]=d,He(F),T=F}d.stateNode=T}else f3($,d.type,d.stateNode);else d.stateNode=u3($,T,d.memoizedProps);else F!==T?(F===null?b.stateNode!==null&&(b=b.stateNode,b.parentNode.removeChild(b)):F.count--,T===null?f3($,d.type,d.stateNode):u3($,T,d.memoizedProps)):T===null&&d.stateNode!==null&&SM(d,d.memoizedProps,b.memoizedProps)}break;case 27:$a(h,d),Na(d),T&512&&(xo||b===null||sc(b,b.return)),b!==null&&T&4&&SM(d,d.memoizedProps,b.memoizedProps);break;case 5:if($a(h,d),Na(d),T&512&&(xo||b===null||sc(b,b.return)),d.flags&32){$=d.stateNode;try{im($,"")}catch(ze){Or(d,d.return,ze)}}T&4&&d.stateNode!=null&&($=d.memoizedProps,SM(d,$,b!==null?b.memoizedProps:$)),T&1024&&(EM=!0);break;case 6:if($a(h,d),Na(d),T&4){if(d.stateNode===null)throw Error(r(162));T=d.memoizedProps,b=d.stateNode;try{b.nodeValue=T}catch(ze){Or(d,d.return,ze)}}break;case 3:if(n1=null,$=ml,ml=e1(h.containerInfo),$a(h,d),ml=$,Na(d),T&4&&b!==null&&b.memoizedState.isDehydrated)try{Ub(h.containerInfo)}catch(ze){Or(d,d.return,ze)}EM&&(EM=!1,v4(d));break;case 4:T=ml,ml=e1(d.stateNode.containerInfo),$a(h,d),Na(d),ml=T;break;case 12:$a(h,d),Na(d);break;case 13:$a(h,d),Na(d),d.child.flags&8192&&d.memoizedState!==null!=(b!==null&&b.memoizedState!==null)&&(RM=Re()),T&4&&(T=d.updateQueue,T!==null&&(d.updateQueue=null,TM(d,T)));break;case 22:$=d.memoizedState!==null;var ge=b!==null&&b.memoizedState!==null,Ne=fu,Ze=xo;if(fu=Ne||$,xo=Ze||ge,$a(h,d),xo=Ze,fu=Ne,Na(d),T&8192)e:for(h=d.stateNode,h._visibility=$?h._visibility&-2:h._visibility|1,$&&(b===null||ge||fu||xo||pp(d)),b=null,h=d;;){if(h.tag===5||h.tag===26){if(b===null){ge=b=h;try{if(F=ge.stateNode,$)X=F.style,typeof X.setProperty=="function"?X.setProperty("display","none","important"):X.display="none";else{re=ge.stateNode;var ot=ge.memoizedProps.style,Fe=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;re.style.display=Fe==null||typeof Fe=="boolean"?"":(""+Fe).trim()}}catch(ze){Or(ge,ge.return,ze)}}}else if(h.tag===6){if(b===null){ge=h;try{ge.stateNode.nodeValue=$?"":ge.memoizedProps}catch(ze){Or(ge,ge.return,ze)}}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===d)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;b===h&&(b=null),h=h.return}b===h&&(b=null),h.sibling.return=h.return,h=h.sibling}T&4&&(T=d.updateQueue,T!==null&&(b=T.retryQueue,b!==null&&(T.retryQueue=null,TM(d,b))));break;case 19:$a(h,d),Na(d),T&4&&(T=d.updateQueue,T!==null&&(d.updateQueue=null,TM(d,T)));break;case 30:break;case 21:break;default:$a(h,d),Na(d)}}function Na(d){var h=d.flags;if(h&2){try{for(var b,T=d.return;T!==null;){if(u4(T)){b=T;break}T=T.return}if(b==null)throw Error(r(160));switch(b.tag){case 27:var $=b.stateNode,F=wM(d);zC(d,F,$);break;case 5:var X=b.stateNode;b.flags&32&&(im(X,""),b.flags&=-33);var re=wM(d);zC(d,re,X);break;case 3:case 4:var ge=b.stateNode.containerInfo,Ne=wM(d);CM(d,Ne,ge);break;default:throw Error(r(161))}}catch(Ze){Or(d,d.return,Ze)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function v4(d){if(d.subtreeFlags&1024)for(d=d.child;d!==null;){var h=d;v4(h),h.tag===5&&h.flags&1024&&h.stateNode.reset(),d=d.sibling}}function Cd(d,h){if(h.subtreeFlags&8772)for(h=h.child;h!==null;)p4(d,h.alternate,h),h=h.sibling}function pp(d){for(d=d.child;d!==null;){var h=d;switch(h.tag){case 0:case 11:case 14:case 15:wd(4,h,h.return),pp(h);break;case 1:sc(h,h.return);var b=h.stateNode;typeof b.componentWillUnmount=="function"&&l4(h,h.return,b),pp(h);break;case 27:Nb(h.stateNode);case 26:case 5:sc(h,h.return),pp(h);break;case 22:h.memoizedState===null&&pp(h);break;case 30:pp(h);break;default:pp(h)}d=d.sibling}}function Ed(d,h,b){for(b=b&&(h.subtreeFlags&8772)!==0,h=h.child;h!==null;){var T=h.alternate,$=d,F=h,X=F.flags;switch(F.tag){case 0:case 11:case 15:Ed($,F,b),Ob(4,F);break;case 1:if(Ed($,F,b),T=F,$=T.stateNode,typeof $.componentDidMount=="function")try{$.componentDidMount()}catch(Ne){Or(T,T.return,Ne)}if(T=F,$=T.updateQueue,$!==null){var re=T.stateNode;try{var ge=$.shared.hiddenCallbacks;if(ge!==null)for($.shared.hiddenCallbacks=null,$=0;$<ge.length;$++)W5(ge[$],re)}catch(Ne){Or(T,T.return,Ne)}}b&&X&64&&s4(F),Ib(F,F.return);break;case 27:d4(F);case 26:case 5:Ed($,F,b),b&&T===null&&X&4&&c4(F),Ib(F,F.return);break;case 12:Ed($,F,b);break;case 13:Ed($,F,b),b&&X&4&&g4($,F);break;case 22:F.memoizedState===null&&Ed($,F,b),Ib(F,F.return);break;case 30:break;default:Ed($,F,b)}h=h.sibling}}function OM(d,h){var b=null;d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),d=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(d=h.memoizedState.cachePool.pool),d!==b&&(d!=null&&d.refCount++,b!=null&&fb(b))}function IM(d,h){d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&fb(d))}function lc(d,h,b,T){if(h.subtreeFlags&10256)for(h=h.child;h!==null;)b4(d,h,b,T),h=h.sibling}function b4(d,h,b,T){var $=h.flags;switch(h.tag){case 0:case 11:case 15:lc(d,h,b,T),$&2048&&Ob(9,h);break;case 1:lc(d,h,b,T);break;case 3:lc(d,h,b,T),$&2048&&(d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&fb(d)));break;case 12:if($&2048){lc(d,h,b,T),d=h.stateNode;try{var F=h.memoizedProps,X=F.id,re=F.onPostCommit;typeof re=="function"&&re(X,h.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(ge){Or(h,h.return,ge)}}else lc(d,h,b,T);break;case 13:lc(d,h,b,T);break;case 23:break;case 22:F=h.stateNode,X=h.alternate,h.memoizedState!==null?F._visibility&2?lc(d,h,b,T):Pb(d,h):F._visibility&2?lc(d,h,b,T):(F._visibility|=2,Em(d,h,b,T,(h.subtreeFlags&10256)!==0)),$&2048&&OM(X,h);break;case 24:lc(d,h,b,T),$&2048&&IM(h.alternate,h);break;default:lc(d,h,b,T)}}function Em(d,h,b,T,$){for($=$&&(h.subtreeFlags&10256)!==0,h=h.child;h!==null;){var F=d,X=h,re=b,ge=T,Ne=X.flags;switch(X.tag){case 0:case 11:case 15:Em(F,X,re,ge,$),Ob(8,X);break;case 23:break;case 22:var Ze=X.stateNode;X.memoizedState!==null?Ze._visibility&2?Em(F,X,re,ge,$):Pb(F,X):(Ze._visibility|=2,Em(F,X,re,ge,$)),$&&Ne&2048&&OM(X.alternate,X);break;case 24:Em(F,X,re,ge,$),$&&Ne&2048&&IM(X.alternate,X);break;default:Em(F,X,re,ge,$)}h=h.sibling}}function Pb(d,h){if(h.subtreeFlags&10256)for(h=h.child;h!==null;){var b=d,T=h,$=T.flags;switch(T.tag){case 22:Pb(b,T),$&2048&&OM(T.alternate,T);break;case 24:Pb(b,T),$&2048&&IM(T.alternate,T);break;default:Pb(b,T)}h=h.sibling}}var Ab=8192;function Tm(d){if(d.subtreeFlags&Ab)for(d=d.child;d!==null;)x4(d),d=d.sibling}function x4(d){switch(d.tag){case 26:Tm(d),d.flags&Ab&&d.memoizedState!==null&&cye(ml,d.memoizedState,d.memoizedProps);break;case 5:Tm(d);break;case 3:case 4:var h=ml;ml=e1(d.stateNode.containerInfo),Tm(d),ml=h;break;case 22:d.memoizedState===null&&(h=d.alternate,h!==null&&h.memoizedState!==null?(h=Ab,Ab=16777216,Tm(d),Ab=h):Tm(d));break;default:Tm(d)}}function S4(d){var h=d.alternate;if(h!==null&&(d=h.child,d!==null)){h.child=null;do h=d.sibling,d.sibling=null,d=h;while(d!==null)}}function Mb(d){var h=d.deletions;if((d.flags&16)!==0){if(h!==null)for(var b=0;b<h.length;b++){var T=h[b];Zo=T,C4(T,d)}S4(d)}if(d.subtreeFlags&10256)for(d=d.child;d!==null;)w4(d),d=d.sibling}function w4(d){switch(d.tag){case 0:case 11:case 15:Mb(d),d.flags&2048&&wd(9,d,d.return);break;case 3:Mb(d);break;case 12:Mb(d);break;case 22:var h=d.stateNode;d.memoizedState!==null&&h._visibility&2&&(d.return===null||d.return.tag!==13)?(h._visibility&=-3,VC(d)):Mb(d);break;default:Mb(d)}}function VC(d){var h=d.deletions;if((d.flags&16)!==0){if(h!==null)for(var b=0;b<h.length;b++){var T=h[b];Zo=T,C4(T,d)}S4(d)}for(d=d.child;d!==null;){switch(h=d,h.tag){case 0:case 11:case 15:wd(8,h,h.return),VC(h);break;case 22:b=h.stateNode,b._visibility&2&&(b._visibility&=-3,VC(h));break;default:VC(h)}d=d.sibling}}function C4(d,h){for(;Zo!==null;){var b=Zo;switch(b.tag){case 0:case 11:case 15:wd(8,b,h);break;case 23:case 22:if(b.memoizedState!==null&&b.memoizedState.cachePool!==null){var T=b.memoizedState.cachePool.pool;T!=null&&T.refCount++}break;case 24:fb(b.memoizedState.cache)}if(T=b.child,T!==null)T.return=b,Zo=T;else e:for(b=d;Zo!==null;){T=Zo;var $=T.sibling,F=T.return;if(h4(T),T===b){Zo=null;break e}if($!==null){$.return=F,Zo=$;break e}Zo=F}}}var Tge={getCacheForType:function(d){var h=Ai(No),b=h.data.get(d);return b===void 0&&(b=d(),h.data.set(d,b)),b}},Oge=typeof WeakMap=="function"?WeakMap:Map,mr=0,Dr=null,Ln=null,qn=0,gr=0,La=null,Td=!1,Om=!1,PM=!1,hu=0,ao=0,Od=0,hp=0,AM=0,ws=0,Im=0,Rb=null,pa=null,MM=!1,RM=0,HC=1/0,UC=null,Id=null,mi=0,Pd=null,Pm=null,Am=0,DM=0,kM=null,E4=null,Db=0,_M=null;function Fa(){if((mr&2)!==0&&qn!==0)return qn&-qn;if(L.T!==null){var d=gm;return d!==0?d:zM()}return un()}function T4(){ws===0&&(ws=(qn&536870912)===0||rr?kn():536870912);var d=Ss.current;return d!==null&&(d.flags|=32),ws}function ja(d,h,b){(d===Dr&&(gr===2||gr===9)||d.cancelPendingCommit!==null)&&(Mm(d,0),Ad(d,qn,ws,!1)),Bn(d,b),((mr&2)===0||d!==Dr)&&(d===Dr&&((mr&2)===0&&(hp|=b),ao===4&&Ad(d,qn,ws,!1)),cc(d))}function O4(d,h,b){if((mr&6)!==0)throw Error(r(327));var T=!b&&(h&124)===0&&(h&d.expiredLanes)===0||bt(d,h),$=T?Age(d,h):LM(d,h,!0),F=T;do{if($===0){Om&&!T&&Ad(d,h,0,!1);break}else{if(b=d.current.alternate,F&&!Ige(b)){$=LM(d,h,!1),F=!1;continue}if($===2){if(F=h,d.errorRecoveryDisabledLanes&F)var X=0;else X=d.pendingLanes&-536870913,X=X!==0?X:X&536870912?536870912:0;if(X!==0){h=X;e:{var re=d;$=Rb;var ge=re.current.memoizedState.isDehydrated;if(ge&&(Mm(re,X).flags|=256),X=LM(re,X,!1),X!==2){if(PM&&!ge){re.errorRecoveryDisabledLanes|=F,hp|=F,$=4;break e}F=pa,pa=$,F!==null&&(pa===null?pa=F:pa.push.apply(pa,F))}$=X}if(F=!1,$!==2)continue}}if($===1){Mm(d,0),Ad(d,h,0,!0);break}e:{switch(T=d,F=$,F){case 0:case 1:throw Error(r(345));case 4:if((h&4194048)!==h)break;case 6:Ad(T,h,ws,!Td);break e;case 2:pa=null;break;case 3:case 5:break;default:throw Error(r(329))}if((h&62914560)===h&&($=RM+300-Re(),10<$)){if(Ad(T,h,ws,!Td),vt(T,0,!0)!==0)break e;T.timeoutHandle=t3(I4.bind(null,T,b,pa,UC,MM,h,ws,hp,Im,Td,F,2,-0,0),$);break e}I4(T,b,pa,UC,MM,h,ws,hp,Im,Td,F,0,-0,0)}}break}while(!0);cc(d)}function I4(d,h,b,T,$,F,X,re,ge,Ne,Ze,ot,Fe,ze){if(d.timeoutHandle=-1,ot=h.subtreeFlags,(ot&8192||(ot&16785408)===16785408)&&(jb={stylesheets:null,count:0,unsuspend:lye},x4(h),ot=uye(),ot!==null)){d.cancelPendingCommit=ot(_4.bind(null,d,h,F,b,T,$,X,re,ge,Ze,1,Fe,ze)),Ad(d,F,X,!Ne);return}_4(d,h,F,b,T,$,X,re,ge)}function Ige(d){for(var h=d;;){var b=h.tag;if((b===0||b===11||b===15)&&h.flags&16384&&(b=h.updateQueue,b!==null&&(b=b.stores,b!==null)))for(var T=0;T<b.length;T++){var $=b[T],F=$.getSnapshot;$=$.value;try{if(!ka(F(),$))return!1}catch{return!1}}if(b=h.child,h.subtreeFlags&16384&&b!==null)b.return=h,h=b;else{if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Ad(d,h,b,T){h&=~AM,h&=~hp,d.suspendedLanes|=h,d.pingedLanes&=~h,T&&(d.warmLanes|=h),T=d.expirationTimes;for(var $=h;0<$;){var F=31-Be($),X=1<<F;T[F]=-1,$&=~X}b!==0&&Oo(d,b,h)}function GC(){return(mr&6)===0?(kb(0),!1):!0}function $M(){if(Ln!==null){if(gr===0)var d=Ln.return;else d=Ln,au=lp=null,JA(d),wm=null,Cb=0,d=Ln;for(;d!==null;)a4(d.alternate,d),d=d.return;Ln=null}}function Mm(d,h){var b=d.timeoutHandle;b!==-1&&(d.timeoutHandle=-1,Gge(b)),b=d.cancelPendingCommit,b!==null&&(d.cancelPendingCommit=null,b()),$M(),Dr=d,Ln=b=ru(d.current,null),qn=h,gr=0,La=null,Td=!1,Om=bt(d,h),PM=!1,Im=ws=AM=hp=Od=ao=0,pa=Rb=null,MM=!1,(h&8)!==0&&(h|=h&32);var T=d.entangledLanes;if(T!==0)for(d=d.entanglements,T&=h;0<T;){var $=31-Be(T),F=1<<$;h|=d[$],T&=~F}return hu=h,pC(),b}function P4(d,h){Rn=null,L.H=DC,h===hb||h===wC?(h=G5(),gr=3):h===V5?(h=G5(),gr=4):gr=h===qU?8:h!==null&&typeof h=="object"&&typeof h.then=="function"?6:1,La=h,Ln===null&&(ao=1,LC(d,ys(h,d.current)))}function A4(){var d=L.H;return L.H=DC,d===null?DC:d}function M4(){var d=L.A;return L.A=Tge,d}function NM(){ao=4,Td||(qn&4194048)!==qn&&Ss.current!==null||(Om=!0),(Od&134217727)===0&&(hp&134217727)===0||Dr===null||Ad(Dr,qn,ws,!1)}function LM(d,h,b){var T=mr;mr|=2;var $=A4(),F=M4();(Dr!==d||qn!==h)&&(UC=null,Mm(d,h)),h=!1;var X=ao;e:do try{if(gr!==0&&Ln!==null){var re=Ln,ge=La;switch(gr){case 8:$M(),X=6;break e;case 3:case 2:case 9:case 6:Ss.current===null&&(h=!0);var Ne=gr;if(gr=0,La=null,Rm(d,re,ge,Ne),b&&Om){X=0;break e}break;default:Ne=gr,gr=0,La=null,Rm(d,re,ge,Ne)}}Pge(),X=ao;break}catch(Ze){P4(d,Ze)}while(!0);return h&&d.shellSuspendCounter++,au=lp=null,mr=T,L.H=$,L.A=F,Ln===null&&(Dr=null,qn=0,pC()),X}function Pge(){for(;Ln!==null;)R4(Ln)}function Age(d,h){var b=mr;mr|=2;var T=A4(),$=M4();Dr!==d||qn!==h?(UC=null,HC=Re()+500,Mm(d,h)):Om=bt(d,h);e:do try{if(gr!==0&&Ln!==null){h=Ln;var F=La;t:switch(gr){case 1:gr=0,La=null,Rm(d,h,F,1);break;case 2:case 9:if(H5(F)){gr=0,La=null,D4(h);break}h=function(){gr!==2&&gr!==9||Dr!==d||(gr=7),cc(d)},F.then(h,h);break e;case 3:gr=7;break e;case 4:gr=5;break e;case 7:H5(F)?(gr=0,La=null,D4(h)):(gr=0,La=null,Rm(d,h,F,7));break;case 5:var X=null;switch(Ln.tag){case 26:X=Ln.memoizedState;case 5:case 27:var re=Ln;if(!X||p3(X)){gr=0,La=null;var ge=re.sibling;if(ge!==null)Ln=ge;else{var Ne=re.return;Ne!==null?(Ln=Ne,qC(Ne)):Ln=null}break t}}gr=0,La=null,Rm(d,h,F,5);break;case 6:gr=0,La=null,Rm(d,h,F,6);break;case 8:$M(),ao=6;break e;default:throw Error(r(462))}}Mge();break}catch(Ze){P4(d,Ze)}while(!0);return au=lp=null,L.H=T,L.A=$,mr=b,Ln!==null?0:(Dr=null,qn=0,pC(),ao)}function Mge(){for(;Ln!==null&&!Ee();)R4(Ln)}function R4(d){var h=o4(d.alternate,d,hu);d.memoizedProps=d.pendingProps,h===null?qC(d):Ln=h}function D4(d){var h=d,b=h.alternate;switch(h.tag){case 15:case 0:h=JU(b,h,h.pendingProps,h.type,void 0,qn);break;case 11:h=JU(b,h,h.pendingProps,h.type.render,h.ref,qn);break;case 5:JA(h);default:a4(b,h),h=Ln=k5(h,hu),h=o4(b,h,hu)}d.memoizedProps=d.pendingProps,h===null?qC(d):Ln=h}function Rm(d,h,b,T){au=lp=null,JA(h),wm=null,Cb=0;var $=h.return;try{if(bge(d,$,h,b,qn)){ao=1,LC(d,ys(b,d.current)),Ln=null;return}}catch(F){if($!==null)throw Ln=$,F;ao=1,LC(d,ys(b,d.current)),Ln=null;return}h.flags&32768?(rr||T===1?d=!0:Om||(qn&536870912)!==0?d=!1:(Td=d=!0,(T===2||T===9||T===3||T===6)&&(T=Ss.current,T!==null&&T.tag===13&&(T.flags|=16384))),k4(h,d)):qC(h)}function qC(d){var h=d;do{if((h.flags&32768)!==0){k4(h,Td);return}d=h.return;var b=Sge(h.alternate,h,hu);if(b!==null){Ln=b;return}if(h=h.sibling,h!==null){Ln=h;return}Ln=h=d}while(h!==null);ao===0&&(ao=5)}function k4(d,h){do{var b=wge(d.alternate,d);if(b!==null){b.flags&=32767,Ln=b;return}if(b=d.return,b!==null&&(b.flags|=32768,b.subtreeFlags=0,b.deletions=null),!h&&(d=d.sibling,d!==null)){Ln=d;return}Ln=d=b}while(d!==null);ao=6,Ln=null}function _4(d,h,b,T,$,F,X,re,ge){d.cancelPendingCommit=null;do WC();while(mi!==0);if((mr&6)!==0)throw Error(r(327));if(h!==null){if(h===d.current)throw Error(r(177));if(F=h.lanes|h.childLanes,F|=IA,yo(d,b,F,X,re,ge),d===Dr&&(Ln=Dr=null,qn=0),Pm=h,Pd=d,Am=b,DM=F,kM=$,E4=T,(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?(d.callbackNode=null,d.callbackPriority=0,_ge(Ie,function(){return j4(),null})):(d.callbackNode=null,d.callbackPriority=0),T=(h.flags&13878)!==0,(h.subtreeFlags&13878)!==0||T){T=L.T,L.T=null,$=V.p,V.p=2,X=mr,mr|=4;try{Cge(d,h,b)}finally{mr=X,V.p=$,L.T=T}}mi=1,$4(),N4(),L4()}}function $4(){if(mi===1){mi=0;var d=Pd,h=Pm,b=(h.flags&13878)!==0;if((h.subtreeFlags&13878)!==0||b){b=L.T,L.T=null;var T=V.p;V.p=2;var $=mr;mr|=4;try{y4(h,d);var F=YM,X=C5(d.containerInfo),re=F.focusedElem,ge=F.selectionRange;if(X!==re&&re&&re.ownerDocument&&w5(re.ownerDocument.documentElement,re)){if(ge!==null&&wA(re)){var Ne=ge.start,Ze=ge.end;if(Ze===void 0&&(Ze=Ne),"selectionStart"in re)re.selectionStart=Ne,re.selectionEnd=Math.min(Ze,re.value.length);else{var ot=re.ownerDocument||document,Fe=ot&&ot.defaultView||window;if(Fe.getSelection){var ze=Fe.getSelection(),fn=re.textContent.length,nn=Math.min(ge.start,fn),Sr=ge.end===void 0?nn:Math.min(ge.end,fn);!ze.extend&&nn>Sr&&(X=Sr,Sr=nn,nn=X);var Ae=S5(re,nn),we=S5(re,Sr);if(Ae&&we&&(ze.rangeCount!==1||ze.anchorNode!==Ae.node||ze.anchorOffset!==Ae.offset||ze.focusNode!==we.node||ze.focusOffset!==we.offset)){var _e=ot.createRange();_e.setStart(Ae.node,Ae.offset),ze.removeAllRanges(),nn>Sr?(ze.addRange(_e),ze.extend(we.node,we.offset)):(_e.setEnd(we.node,we.offset),ze.addRange(_e))}}}}for(ot=[],ze=re;ze=ze.parentNode;)ze.nodeType===1&&ot.push({element:ze,left:ze.scrollLeft,top:ze.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;re<ot.length;re++){var tt=ot[re];tt.element.scrollLeft=tt.left,tt.element.scrollTop=tt.top}}i1=!!KM,YM=KM=null}finally{mr=$,V.p=T,L.T=b}}d.current=h,mi=2}}function N4(){if(mi===2){mi=0;var d=Pd,h=Pm,b=(h.flags&8772)!==0;if((h.subtreeFlags&8772)!==0||b){b=L.T,L.T=null;var T=V.p;V.p=2;var $=mr;mr|=4;try{p4(d,h.alternate,h)}finally{mr=$,V.p=T,L.T=b}}mi=3}}function L4(){if(mi===4||mi===3){mi=0,xe();var d=Pd,h=Pm,b=Am,T=E4;(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?mi=5:(mi=0,Pm=Pd=null,F4(d,d.pendingLanes));var $=d.pendingLanes;if($===0&&(Id=null),Kt(b),h=h.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(We,h,void 0,(h.current.flags&128)===128)}catch{}if(T!==null){h=L.T,$=V.p,V.p=2,L.T=null;try{for(var F=d.onRecoverableError,X=0;X<T.length;X++){var re=T[X];F(re.value,{componentStack:re.stack})}}finally{L.T=h,V.p=$}}(Am&3)!==0&&WC(),cc(d),$=d.pendingLanes,(b&4194090)!==0&&($&42)!==0?d===_M?Db++:(Db=0,_M=d):Db=0,kb(0)}}function F4(d,h){(d.pooledCacheLanes&=h)===0&&(h=d.pooledCache,h!=null&&(d.pooledCache=null,fb(h)))}function WC(d){return $4(),N4(),L4(),j4()}function j4(){if(mi!==5)return!1;var d=Pd,h=DM;DM=0;var b=Kt(Am),T=L.T,$=V.p;try{V.p=32>b?32:b,L.T=null,b=kM,kM=null;var F=Pd,X=Am;if(mi=0,Pm=Pd=null,Am=0,(mr&6)!==0)throw Error(r(331));var re=mr;if(mr|=4,w4(F.current),b4(F,F.current,X,b),mr=re,kb(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(We,F)}catch{}return!0}finally{V.p=$,L.T=T,F4(d,h)}}function B4(d,h,b){h=ys(b,h),h=fM(d.stateNode,h,2),d=vd(d,h,2),d!==null&&(Bn(d,2),cc(d))}function Or(d,h,b){if(d.tag===3)B4(d,d,b);else for(;h!==null;){if(h.tag===3){B4(h,d,b);break}else if(h.tag===1){var T=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(Id===null||!Id.has(T))){d=ys(b,d),b=UU(2),T=vd(h,b,2),T!==null&&(GU(b,T,h,d),Bn(T,2),cc(T));break}}h=h.return}}function FM(d,h,b){var T=d.pingCache;if(T===null){T=d.pingCache=new Oge;var $=new Set;T.set(h,$)}else $=T.get(h),$===void 0&&($=new Set,T.set(h,$));$.has(b)||(PM=!0,$.add(b),d=Rge.bind(null,d,h,b),h.then(d,d))}function Rge(d,h,b){var T=d.pingCache;T!==null&&T.delete(h),d.pingedLanes|=d.suspendedLanes&b,d.warmLanes&=~b,Dr===d&&(qn&b)===b&&(ao===4||ao===3&&(qn&62914560)===qn&&300>Re()-RM?(mr&2)===0&&Mm(d,0):AM|=b,Im===qn&&(Im=0)),cc(d)}function z4(d,h){h===0&&(h=Rr()),d=fm(d,h),d!==null&&(Bn(d,h),cc(d))}function Dge(d){var h=d.memoizedState,b=0;h!==null&&(b=h.retryLane),z4(d,b)}function kge(d,h){var b=0;switch(d.tag){case 13:var T=d.stateNode,$=d.memoizedState;$!==null&&(b=$.retryLane);break;case 19:T=d.stateNode;break;case 22:T=d.stateNode._retryCache;break;default:throw Error(r(314))}T!==null&&T.delete(h),z4(d,b)}function _ge(d,h){return ue(d,h)}var KC=null,Dm=null,jM=!1,YC=!1,BM=!1,mp=0;function cc(d){d!==Dm&&d.next===null&&(Dm===null?KC=Dm=d:Dm=Dm.next=d),YC=!0,jM||(jM=!0,Nge())}function kb(d,h){if(!BM&&YC){BM=!0;do for(var b=!1,T=KC;T!==null;){if(d!==0){var $=T.pendingLanes;if($===0)var F=0;else{var X=T.suspendedLanes,re=T.pingedLanes;F=(1<<31-Be(42|d)+1)-1,F&=$&~(X&~re),F=F&201326741?F&201326741|1:F?F|2:0}F!==0&&(b=!0,G4(T,F))}else F=qn,F=vt(T,T===Dr?F:0,T.cancelPendingCommit!==null||T.timeoutHandle!==-1),(F&3)===0||bt(T,F)||(b=!0,G4(T,F));T=T.next}while(b);BM=!1}}function $ge(){V4()}function V4(){YC=jM=!1;var d=0;mp!==0&&(Uge()&&(d=mp),mp=0);for(var h=Re(),b=null,T=KC;T!==null;){var $=T.next,F=H4(T,h);F===0?(T.next=null,b===null?KC=$:b.next=$,$===null&&(Dm=b)):(b=T,(d!==0||(F&3)!==0)&&(YC=!0)),T=$}kb(d)}function H4(d,h){for(var b=d.suspendedLanes,T=d.pingedLanes,$=d.expirationTimes,F=d.pendingLanes&-62914561;0<F;){var X=31-Be(F),re=1<<X,ge=$[X];ge===-1?((re&b)===0||(re&T)!==0)&&($[X]=vn(re,h)):ge<=h&&(d.expiredLanes|=re),F&=~re}if(h=Dr,b=qn,b=vt(d,d===h?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),T=d.callbackNode,b===0||d===h&&(gr===2||gr===9)||d.cancelPendingCommit!==null)return T!==null&&T!==null&&pe(T),d.callbackNode=null,d.callbackPriority=0;if((b&3)===0||bt(d,b)){if(h=b&-b,h===d.callbackPriority)return h;switch(T!==null&&pe(T),Kt(b)){case 2:case 8:b=ve;break;case 32:b=Ie;break;case 268435456:b=Te;break;default:b=Ie}return T=U4.bind(null,d),b=ue(b,T),d.callbackPriority=h,d.callbackNode=b,h}return T!==null&&T!==null&&pe(T),d.callbackPriority=2,d.callbackNode=null,2}function U4(d,h){if(mi!==0&&mi!==5)return d.callbackNode=null,d.callbackPriority=0,null;var b=d.callbackNode;if(WC()&&d.callbackNode!==b)return null;var T=qn;return T=vt(d,d===Dr?T:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),T===0?null:(O4(d,T,h),H4(d,Re()),d.callbackNode!=null&&d.callbackNode===b?U4.bind(null,d):null)}function G4(d,h){if(WC())return null;O4(d,h,!0)}function Nge(){qge(function(){(mr&6)!==0?ue(Pe,$ge):V4()})}function zM(){return mp===0&&(mp=kn()),mp}function q4(d){return d==null||typeof d=="symbol"||typeof d=="boolean"?null:typeof d=="function"?d:aC(""+d)}function W4(d,h){var b=h.ownerDocument.createElement("input");return b.name=h.name,b.value=h.value,d.id&&b.setAttribute("form",d.id),h.parentNode.insertBefore(b,h),d=new FormData(d),b.parentNode.removeChild(b),d}function Lge(d,h,b,T,$){if(h==="submit"&&b&&b.stateNode===$){var F=q4(($[Jt]||null).action),X=T.submitter;X&&(h=(h=X[Jt]||null)?q4(h.formAction):X.getAttribute("formAction"),h!==null&&(F=h,X=null));var re=new uC("action","action",null,T,$);d.push({event:re,listeners:[{instance:null,listener:function(){if(T.defaultPrevented){if(mp!==0){var ge=X?W4($,X):new FormData($);sM(b,{pending:!0,data:ge,method:$.method,action:F},null,ge)}}else typeof F=="function"&&(re.preventDefault(),ge=X?W4($,X):new FormData($),sM(b,{pending:!0,data:ge,method:$.method,action:F},F,ge))},currentTarget:$}]})}}for(var VM=0;VM<OA.length;VM++){var HM=OA[VM],Fge=HM.toLowerCase(),jge=HM[0].toUpperCase()+HM.slice(1);hl(Fge,"on"+jge)}hl(O5,"onAnimationEnd"),hl(I5,"onAnimationIteration"),hl(P5,"onAnimationStart"),hl("dblclick","onDoubleClick"),hl("focusin","onFocus"),hl("focusout","onBlur"),hl(nge,"onTransitionRun"),hl(rge,"onTransitionStart"),hl(oge,"onTransitionCancel"),hl(A5,"onTransitionEnd"),Ut("onMouseEnter",["mouseout","mouseover"]),Ut("onMouseLeave",["mouseout","mouseover"]),Ut("onPointerEnter",["pointerout","pointerover"]),Ut("onPointerLeave",["pointerout","pointerover"]),hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),hn("onBeforeInput",["compositionend","keypress","textInput","paste"]),hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _b="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Bge=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_b));function K4(d,h){h=(h&4)!==0;for(var b=0;b<d.length;b++){var T=d[b],$=T.event;T=T.listeners;e:{var F=void 0;if(h)for(var X=T.length-1;0<=X;X--){var re=T[X],ge=re.instance,Ne=re.currentTarget;if(re=re.listener,ge!==F&&$.isPropagationStopped())break e;F=re,$.currentTarget=Ne;try{F($)}catch(Ze){NC(Ze)}$.currentTarget=null,F=ge}else for(X=0;X<T.length;X++){if(re=T[X],ge=re.instance,Ne=re.currentTarget,re=re.listener,ge!==F&&$.isPropagationStopped())break e;F=re,$.currentTarget=Ne;try{F($)}catch(Ze){NC(Ze)}$.currentTarget=null,F=ge}}}}function Fn(d,h){var b=h[Xo];b===void 0&&(b=h[Xo]=new Set);var T=d+"__bubble";b.has(T)||(Y4(h,d,2,!1),b.add(T))}function UM(d,h,b){var T=0;h&&(T|=4),Y4(b,d,T,h)}var QC="_reactListening"+Math.random().toString(36).slice(2);function GM(d){if(!d[QC]){d[QC]=!0,Ye.forEach(function(b){b!=="selectionchange"&&(Bge.has(b)||UM(b,!1,d),UM(b,!0,d))});var h=d.nodeType===9?d:d.ownerDocument;h===null||h[QC]||(h[QC]=!0,UM("selectionchange",!1,h))}}function Y4(d,h,b,T){switch(b3(h)){case 2:var $=pye;break;case 8:$=hye;break;default:$=iR}b=$.bind(null,h,b,d),$=void 0,!pA||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||($=!0),T?$!==void 0?d.addEventListener(h,b,{capture:!0,passive:$}):d.addEventListener(h,b,!0):$!==void 0?d.addEventListener(h,b,{passive:$}):d.addEventListener(h,b,!1)}function qM(d,h,b,T,$){var F=T;if((h&1)===0&&(h&2)===0&&T!==null)e:for(;;){if(T===null)return;var X=T.tag;if(X===3||X===4){var re=T.stateNode.containerInfo;if(re===$)break;if(X===4)for(X=T.return;X!==null;){var ge=X.tag;if((ge===3||ge===4)&&X.stateNode.containerInfo===$)return;X=X.return}for(;re!==null;){if(X=Fr(re),X===null)return;if(ge=X.tag,ge===5||ge===6||ge===26||ge===27){T=F=X;continue e}re=re.parentNode}}T=T.return}n5(function(){var Ne=F,Ze=dA(b),ot=[];e:{var Fe=M5.get(d);if(Fe!==void 0){var ze=uC,fn=d;switch(d){case"keypress":if(lC(b)===0)break e;case"keydown":case"keyup":ze=_me;break;case"focusin":fn="focus",ze=yA;break;case"focusout":fn="blur",ze=yA;break;case"beforeblur":case"afterblur":ze=yA;break;case"click":if(b.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ze=i5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ze=wme;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ze=Lme;break;case O5:case I5:case P5:ze=Tme;break;case A5:ze=jme;break;case"scroll":case"scrollend":ze=xme;break;case"wheel":ze=zme;break;case"copy":case"cut":case"paste":ze=Ime;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ze=s5;break;case"toggle":case"beforetoggle":ze=Hme}var nn=(h&4)!==0,Sr=!nn&&(d==="scroll"||d==="scrollend"),Ae=nn?Fe!==null?Fe+"Capture":null:Fe;nn=[];for(var we=Ne,_e;we!==null;){var tt=we;if(_e=tt.stateNode,tt=tt.tag,tt!==5&&tt!==26&&tt!==27||_e===null||Ae===null||(tt=Zv(we,Ae),tt!=null&&nn.push($b(we,tt,_e))),Sr)break;we=we.return}0<nn.length&&(Fe=new ze(Fe,fn,null,b,Ze),ot.push({event:Fe,listeners:nn}))}}if((h&7)===0){e:{if(Fe=d==="mouseover"||d==="pointerover",ze=d==="mouseout"||d==="pointerout",Fe&&b!==uA&&(fn=b.relatedTarget||b.fromElement)&&(Fr(fn)||fn[Vn]))break e;if((ze||Fe)&&(Fe=Ze.window===Ze?Ze:(Fe=Ze.ownerDocument)?Fe.defaultView||Fe.parentWindow:window,ze?(fn=b.relatedTarget||b.toElement,ze=Ne,fn=fn?Fr(fn):null,fn!==null&&(Sr=i(fn),nn=fn.tag,fn!==Sr||nn!==5&&nn!==27&&nn!==6)&&(fn=null)):(ze=null,fn=Ne),ze!==fn)){if(nn=i5,tt="onMouseLeave",Ae="onMouseEnter",we="mouse",(d==="pointerout"||d==="pointerover")&&(nn=s5,tt="onPointerLeave",Ae="onPointerEnter",we="pointer"),Sr=ze==null?Fe:fl(ze),_e=fn==null?Fe:fl(fn),Fe=new nn(tt,we+"leave",ze,b,Ze),Fe.target=Sr,Fe.relatedTarget=_e,tt=null,Fr(Ze)===Ne&&(nn=new nn(Ae,we+"enter",fn,b,Ze),nn.target=_e,nn.relatedTarget=Sr,tt=nn),Sr=tt,ze&&fn)t:{for(nn=ze,Ae=fn,we=0,_e=nn;_e;_e=km(_e))we++;for(_e=0,tt=Ae;tt;tt=km(tt))_e++;for(;0<we-_e;)nn=km(nn),we--;for(;0<_e-we;)Ae=km(Ae),_e--;for(;we--;){if(nn===Ae||Ae!==null&&nn===Ae.alternate)break t;nn=km(nn),Ae=km(Ae)}nn=null}else nn=null;ze!==null&&Q4(ot,Fe,ze,nn,!1),fn!==null&&Sr!==null&&Q4(ot,Sr,fn,nn,!0)}}e:{if(Fe=Ne?fl(Ne):window,ze=Fe.nodeName&&Fe.nodeName.toLowerCase(),ze==="select"||ze==="input"&&Fe.type==="file")var Bt=m5;else if(p5(Fe))if(g5)Bt=Zme;else{Bt=Xme;var _n=Qme}else ze=Fe.nodeName,!ze||ze.toLowerCase()!=="input"||Fe.type!=="checkbox"&&Fe.type!=="radio"?Ne&&cA(Ne.elementType)&&(Bt=m5):Bt=Jme;if(Bt&&(Bt=Bt(d,Ne))){h5(ot,Bt,b,Ze);break e}_n&&_n(d,Fe,Ne),d==="focusout"&&Ne&&Fe.type==="number"&&Ne.memoizedProps.value!=null&&lA(Fe,"number",Fe.value)}switch(_n=Ne?fl(Ne):window,d){case"focusin":(p5(_n)||_n.contentEditable==="true")&&(cm=_n,CA=Ne,sb=null);break;case"focusout":sb=CA=cm=null;break;case"mousedown":EA=!0;break;case"contextmenu":case"mouseup":case"dragend":EA=!1,E5(ot,b,Ze);break;case"selectionchange":if(tge)break;case"keydown":case"keyup":E5(ot,b,Ze)}var Gt;if(bA)e:{switch(d){case"compositionstart":var sn="onCompositionStart";break e;case"compositionend":sn="onCompositionEnd";break e;case"compositionupdate":sn="onCompositionUpdate";break e}sn=void 0}else lm?d5(d,b)&&(sn="onCompositionEnd"):d==="keydown"&&b.keyCode===229&&(sn="onCompositionStart");sn&&(l5&&b.locale!=="ko"&&(lm||sn!=="onCompositionStart"?sn==="onCompositionEnd"&&lm&&(Gt=r5()):(hd=Ze,hA="value"in hd?hd.value:hd.textContent,lm=!0)),_n=XC(Ne,sn),0<_n.length&&(sn=new a5(sn,d,null,b,Ze),ot.push({event:sn,listeners:_n}),Gt?sn.data=Gt:(Gt=f5(b),Gt!==null&&(sn.data=Gt)))),(Gt=Gme?qme(d,b):Wme(d,b))&&(sn=XC(Ne,"onBeforeInput"),0<sn.length&&(_n=new a5("onBeforeInput","beforeinput",null,b,Ze),ot.push({event:_n,listeners:sn}),_n.data=Gt)),Lge(ot,d,Ne,b,Ze)}K4(ot,h)})}function $b(d,h,b){return{instance:d,listener:h,currentTarget:b}}function XC(d,h){for(var b=h+"Capture",T=[];d!==null;){var $=d,F=$.stateNode;if($=$.tag,$!==5&&$!==26&&$!==27||F===null||($=Zv(d,b),$!=null&&T.unshift($b(d,$,F)),$=Zv(d,h),$!=null&&T.push($b(d,$,F))),d.tag===3)return T;d=d.return}return[]}function km(d){if(d===null)return null;do d=d.return;while(d&&d.tag!==5&&d.tag!==27);return d||null}function Q4(d,h,b,T,$){for(var F=h._reactName,X=[];b!==null&&b!==T;){var re=b,ge=re.alternate,Ne=re.stateNode;if(re=re.tag,ge!==null&&ge===T)break;re!==5&&re!==26&&re!==27||Ne===null||(ge=Ne,$?(Ne=Zv(b,F),Ne!=null&&X.unshift($b(b,Ne,ge))):$||(Ne=Zv(b,F),Ne!=null&&X.push($b(b,Ne,ge)))),b=b.return}X.length!==0&&d.push({event:h,listeners:X})}var zge=/\r\n?/g,Vge=/\u0000|\uFFFD/g;function X4(d){return(typeof d=="string"?d:""+d).replace(zge,`
+`).replace(Vge,"")}function J4(d,h){return h=X4(h),X4(d)===h}function JC(){}function xr(d,h,b,T,$,F){switch(b){case"children":typeof T=="string"?h==="body"||h==="textarea"&&T===""||im(d,T):(typeof T=="number"||typeof T=="bigint")&&h!=="body"&&im(d,""+T);break;case"className":Zf(d,"class",T);break;case"tabIndex":Zf(d,"tabindex",T);break;case"dir":case"role":case"viewBox":case"width":case"height":Zf(d,b,T);break;case"style":e5(d,T,F);break;case"data":if(h!=="object"){Zf(d,"data",T);break}case"src":case"href":if(T===""&&(h!=="a"||b!=="href")){d.removeAttribute(b);break}if(T==null||typeof T=="function"||typeof T=="symbol"||typeof T=="boolean"){d.removeAttribute(b);break}T=aC(""+T),d.setAttribute(b,T);break;case"action":case"formAction":if(typeof T=="function"){d.setAttribute(b,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof F=="function"&&(b==="formAction"?(h!=="input"&&xr(d,h,"name",$.name,$,null),xr(d,h,"formEncType",$.formEncType,$,null),xr(d,h,"formMethod",$.formMethod,$,null),xr(d,h,"formTarget",$.formTarget,$,null)):(xr(d,h,"encType",$.encType,$,null),xr(d,h,"method",$.method,$,null),xr(d,h,"target",$.target,$,null)));if(T==null||typeof T=="symbol"||typeof T=="boolean"){d.removeAttribute(b);break}T=aC(""+T),d.setAttribute(b,T);break;case"onClick":T!=null&&(d.onclick=JC);break;case"onScroll":T!=null&&Fn("scroll",d);break;case"onScrollEnd":T!=null&&Fn("scrollend",d);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(b=T.__html,b!=null){if($.children!=null)throw Error(r(60));d.innerHTML=b}}break;case"multiple":d.multiple=T&&typeof T!="function"&&typeof T!="symbol";break;case"muted":d.muted=T&&typeof T!="function"&&typeof T!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(T==null||typeof T=="function"||typeof T=="boolean"||typeof T=="symbol"){d.removeAttribute("xlink:href");break}b=aC(""+T),d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":T!=null&&typeof T!="function"&&typeof T!="symbol"?d.setAttribute(b,""+T):d.removeAttribute(b);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":T&&typeof T!="function"&&typeof T!="symbol"?d.setAttribute(b,""):d.removeAttribute(b);break;case"capture":case"download":T===!0?d.setAttribute(b,""):T!==!1&&T!=null&&typeof T!="function"&&typeof T!="symbol"?d.setAttribute(b,T):d.removeAttribute(b);break;case"cols":case"rows":case"size":case"span":T!=null&&typeof T!="function"&&typeof T!="symbol"&&!isNaN(T)&&1<=T?d.setAttribute(b,T):d.removeAttribute(b);break;case"rowSpan":case"start":T==null||typeof T=="function"||typeof T=="symbol"||isNaN(T)?d.removeAttribute(b):d.setAttribute(b,T);break;case"popover":Fn("beforetoggle",d),Fn("toggle",d),rm(d,"popover",T);break;case"xlinkActuate":ca(d,"http://www.w3.org/1999/xlink","xlink:actuate",T);break;case"xlinkArcrole":ca(d,"http://www.w3.org/1999/xlink","xlink:arcrole",T);break;case"xlinkRole":ca(d,"http://www.w3.org/1999/xlink","xlink:role",T);break;case"xlinkShow":ca(d,"http://www.w3.org/1999/xlink","xlink:show",T);break;case"xlinkTitle":ca(d,"http://www.w3.org/1999/xlink","xlink:title",T);break;case"xlinkType":ca(d,"http://www.w3.org/1999/xlink","xlink:type",T);break;case"xmlBase":ca(d,"http://www.w3.org/XML/1998/namespace","xml:base",T);break;case"xmlLang":ca(d,"http://www.w3.org/XML/1998/namespace","xml:lang",T);break;case"xmlSpace":ca(d,"http://www.w3.org/XML/1998/namespace","xml:space",T);break;case"is":rm(d,"is",T);break;case"innerText":case"textContent":break;default:(!(2<b.length)||b[0]!=="o"&&b[0]!=="O"||b[1]!=="n"&&b[1]!=="N")&&(b=vme.get(b)||b,rm(d,b,T))}}function WM(d,h,b,T,$,F){switch(b){case"style":e5(d,T,F);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(b=T.__html,b!=null){if($.children!=null)throw Error(r(60));d.innerHTML=b}}break;case"children":typeof T=="string"?im(d,T):(typeof T=="number"||typeof T=="bigint")&&im(d,""+T);break;case"onScroll":T!=null&&Fn("scroll",d);break;case"onScrollEnd":T!=null&&Fn("scrollend",d);break;case"onClick":T!=null&&(d.onclick=JC);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$t.hasOwnProperty(b))e:{if(b[0]==="o"&&b[1]==="n"&&($=b.endsWith("Capture"),h=b.slice(2,$?b.length-7:void 0),F=d[Jt]||null,F=F!=null?F[b]:null,typeof F=="function"&&d.removeEventListener(h,F,$),typeof T=="function")){typeof F!="function"&&F!==null&&(b in d?d[b]=null:d.hasAttribute(b)&&d.removeAttribute(b)),d.addEventListener(h,T,$);break e}b in d?d[b]=T:T===!0?d.setAttribute(b,""):rm(d,b,T)}}}function gi(d,h,b){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fn("error",d),Fn("load",d);var T=!1,$=!1,F;for(F in b)if(b.hasOwnProperty(F)){var X=b[F];if(X!=null)switch(F){case"src":T=!0;break;case"srcSet":$=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,h));default:xr(d,h,F,X,b,null)}}$&&xr(d,h,"srcSet",b.srcSet,b,null),T&&xr(d,h,"src",b.src,b,null);return;case"input":Fn("invalid",d);var re=F=X=$=null,ge=null,Ne=null;for(T in b)if(b.hasOwnProperty(T)){var Ze=b[T];if(Ze!=null)switch(T){case"name":$=Ze;break;case"type":X=Ze;break;case"checked":ge=Ze;break;case"defaultChecked":Ne=Ze;break;case"value":F=Ze;break;case"defaultValue":re=Ze;break;case"children":case"dangerouslySetInnerHTML":if(Ze!=null)throw Error(r(137,h));break;default:xr(d,h,T,Ze,b,null)}}QH(d,F,re,ge,Ne,X,$,!1),oC(d);return;case"select":Fn("invalid",d),T=X=F=null;for($ in b)if(b.hasOwnProperty($)&&(re=b[$],re!=null))switch($){case"value":F=re;break;case"defaultValue":X=re;break;case"multiple":T=re;default:xr(d,h,$,re,b,null)}h=F,b=X,d.multiple=!!T,h!=null?om(d,!!T,h,!1):b!=null&&om(d,!!T,b,!0);return;case"textarea":Fn("invalid",d),F=$=T=null;for(X in b)if(b.hasOwnProperty(X)&&(re=b[X],re!=null))switch(X){case"value":T=re;break;case"defaultValue":$=re;break;case"children":F=re;break;case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(91));break;default:xr(d,h,X,re,b,null)}JH(d,T,$,F),oC(d);return;case"option":for(ge in b)if(b.hasOwnProperty(ge)&&(T=b[ge],T!=null))switch(ge){case"selected":d.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:xr(d,h,ge,T,b,null)}return;case"dialog":Fn("beforetoggle",d),Fn("toggle",d),Fn("cancel",d),Fn("close",d);break;case"iframe":case"object":Fn("load",d);break;case"video":case"audio":for(T=0;T<_b.length;T++)Fn(_b[T],d);break;case"image":Fn("error",d),Fn("load",d);break;case"details":Fn("toggle",d);break;case"embed":case"source":case"link":Fn("error",d),Fn("load",d);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ne in b)if(b.hasOwnProperty(Ne)&&(T=b[Ne],T!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,h));default:xr(d,h,Ne,T,b,null)}return;default:if(cA(h)){for(Ze in b)b.hasOwnProperty(Ze)&&(T=b[Ze],T!==void 0&&WM(d,h,Ze,T,b,void 0));return}}for(re in b)b.hasOwnProperty(re)&&(T=b[re],T!=null&&xr(d,h,re,T,b,null))}function Hge(d,h,b,T){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var $=null,F=null,X=null,re=null,ge=null,Ne=null,Ze=null;for(ze in b){var ot=b[ze];if(b.hasOwnProperty(ze)&&ot!=null)switch(ze){case"checked":break;case"value":break;case"defaultValue":ge=ot;default:T.hasOwnProperty(ze)||xr(d,h,ze,null,T,ot)}}for(var Fe in T){var ze=T[Fe];if(ot=b[Fe],T.hasOwnProperty(Fe)&&(ze!=null||ot!=null))switch(Fe){case"type":F=ze;break;case"name":$=ze;break;case"checked":Ne=ze;break;case"defaultChecked":Ze=ze;break;case"value":X=ze;break;case"defaultValue":re=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(r(137,h));break;default:ze!==ot&&xr(d,h,Fe,ze,T,ot)}}sA(d,X,re,ge,Ne,Ze,F,$);return;case"select":ze=X=re=Fe=null;for(F in b)if(ge=b[F],b.hasOwnProperty(F)&&ge!=null)switch(F){case"value":break;case"multiple":ze=ge;default:T.hasOwnProperty(F)||xr(d,h,F,null,T,ge)}for($ in T)if(F=T[$],ge=b[$],T.hasOwnProperty($)&&(F!=null||ge!=null))switch($){case"value":Fe=F;break;case"defaultValue":re=F;break;case"multiple":X=F;default:F!==ge&&xr(d,h,$,F,T,ge)}h=re,b=X,T=ze,Fe!=null?om(d,!!b,Fe,!1):!!T!=!!b&&(h!=null?om(d,!!b,h,!0):om(d,!!b,b?[]:"",!1));return;case"textarea":ze=Fe=null;for(re in b)if($=b[re],b.hasOwnProperty(re)&&$!=null&&!T.hasOwnProperty(re))switch(re){case"value":break;case"children":break;default:xr(d,h,re,null,T,$)}for(X in T)if($=T[X],F=b[X],T.hasOwnProperty(X)&&($!=null||F!=null))switch(X){case"value":Fe=$;break;case"defaultValue":ze=$;break;case"children":break;case"dangerouslySetInnerHTML":if($!=null)throw Error(r(91));break;default:$!==F&&xr(d,h,X,$,T,F)}XH(d,Fe,ze);return;case"option":for(var fn in b)if(Fe=b[fn],b.hasOwnProperty(fn)&&Fe!=null&&!T.hasOwnProperty(fn))switch(fn){case"selected":d.selected=!1;break;default:xr(d,h,fn,null,T,Fe)}for(ge in T)if(Fe=T[ge],ze=b[ge],T.hasOwnProperty(ge)&&Fe!==ze&&(Fe!=null||ze!=null))switch(ge){case"selected":d.selected=Fe&&typeof Fe!="function"&&typeof Fe!="symbol";break;default:xr(d,h,ge,Fe,T,ze)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var nn in b)Fe=b[nn],b.hasOwnProperty(nn)&&Fe!=null&&!T.hasOwnProperty(nn)&&xr(d,h,nn,null,T,Fe);for(Ne in T)if(Fe=T[Ne],ze=b[Ne],T.hasOwnProperty(Ne)&&Fe!==ze&&(Fe!=null||ze!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":if(Fe!=null)throw Error(r(137,h));break;default:xr(d,h,Ne,Fe,T,ze)}return;default:if(cA(h)){for(var Sr in b)Fe=b[Sr],b.hasOwnProperty(Sr)&&Fe!==void 0&&!T.hasOwnProperty(Sr)&&WM(d,h,Sr,void 0,T,Fe);for(Ze in T)Fe=T[Ze],ze=b[Ze],!T.hasOwnProperty(Ze)||Fe===ze||Fe===void 0&&ze===void 0||WM(d,h,Ze,Fe,T,ze);return}}for(var Ae in b)Fe=b[Ae],b.hasOwnProperty(Ae)&&Fe!=null&&!T.hasOwnProperty(Ae)&&xr(d,h,Ae,null,T,Fe);for(ot in T)Fe=T[ot],ze=b[ot],!T.hasOwnProperty(ot)||Fe===ze||Fe==null&&ze==null||xr(d,h,ot,Fe,T,ze)}var KM=null,YM=null;function ZC(d){return d.nodeType===9?d:d.ownerDocument}function Z4(d){switch(d){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function e3(d,h){if(d===0)switch(h){case"svg":return 1;case"math":return 2;default:return 0}return d===1&&h==="foreignObject"?0:d}function QM(d,h){return d==="textarea"||d==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.children=="bigint"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var XM=null;function Uge(){var d=window.event;return d&&d.type==="popstate"?d===XM?!1:(XM=d,!0):(XM=null,!1)}var t3=typeof setTimeout=="function"?setTimeout:void 0,Gge=typeof clearTimeout=="function"?clearTimeout:void 0,n3=typeof Promise=="function"?Promise:void 0,qge=typeof queueMicrotask=="function"?queueMicrotask:typeof n3<"u"?function(d){return n3.resolve(null).then(d).catch(Wge)}:t3;function Wge(d){setTimeout(function(){throw d})}function Md(d){return d==="head"}function r3(d,h){var b=h,T=0,$=0;do{var F=b.nextSibling;if(d.removeChild(b),F&&F.nodeType===8)if(b=F.data,b==="/$"){if(0<T&&8>T){b=T;var X=d.ownerDocument;if(b&1&&Nb(X.documentElement),b&2&&Nb(X.body),b&4)for(b=X.head,Nb(b),X=b.firstChild;X;){var re=X.nextSibling,ge=X.nodeName;X[Pi]||ge==="SCRIPT"||ge==="STYLE"||ge==="LINK"&&X.rel.toLowerCase()==="stylesheet"||b.removeChild(X),X=re}}if($===0){d.removeChild(F),Ub(h);return}$--}else b==="$"||b==="$?"||b==="$!"?$++:T=b.charCodeAt(0)-48;else T=0;b=F}while(b);Ub(h)}function JM(d){var h=d.firstChild;for(h&&h.nodeType===10&&(h=h.nextSibling);h;){var b=h;switch(h=h.nextSibling,b.nodeName){case"HTML":case"HEAD":case"BODY":JM(b),vo(b);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(b.rel.toLowerCase()==="stylesheet")continue}d.removeChild(b)}}function Kge(d,h,b,T){for(;d.nodeType===1;){var $=b;if(d.nodeName.toLowerCase()!==h.toLowerCase()){if(!T&&(d.nodeName!=="INPUT"||d.type!=="hidden"))break}else if(T){if(!d[Pi])switch(h){case"meta":if(!d.hasAttribute("itemprop"))break;return d;case"link":if(F=d.getAttribute("rel"),F==="stylesheet"&&d.hasAttribute("data-precedence"))break;if(F!==$.rel||d.getAttribute("href")!==($.href==null||$.href===""?null:$.href)||d.getAttribute("crossorigin")!==($.crossOrigin==null?null:$.crossOrigin)||d.getAttribute("title")!==($.title==null?null:$.title))break;return d;case"style":if(d.hasAttribute("data-precedence"))break;return d;case"script":if(F=d.getAttribute("src"),(F!==($.src==null?null:$.src)||d.getAttribute("type")!==($.type==null?null:$.type)||d.getAttribute("crossorigin")!==($.crossOrigin==null?null:$.crossOrigin))&&F&&d.hasAttribute("async")&&!d.hasAttribute("itemprop"))break;return d;default:return d}}else if(h==="input"&&d.type==="hidden"){var F=$.name==null?null:""+$.name;if($.type==="hidden"&&d.getAttribute("name")===F)return d}else return d;if(d=gl(d.nextSibling),d===null)break}return null}function Yge(d,h,b){if(h==="")return null;for(;d.nodeType!==3;)if((d.nodeType!==1||d.nodeName!=="INPUT"||d.type!=="hidden")&&!b||(d=gl(d.nextSibling),d===null))return null;return d}function ZM(d){return d.data==="$!"||d.data==="$?"&&d.ownerDocument.readyState==="complete"}function Qge(d,h){var b=d.ownerDocument;if(d.data!=="$?"||b.readyState==="complete")h();else{var T=function(){h(),b.removeEventListener("DOMContentLoaded",T)};b.addEventListener("DOMContentLoaded",T),d._reactRetry=T}}function gl(d){for(;d!=null;d=d.nextSibling){var h=d.nodeType;if(h===1||h===3)break;if(h===8){if(h=d.data,h==="$"||h==="$!"||h==="$?"||h==="F!"||h==="F")break;if(h==="/$")return null}}return d}var eR=null;function o3(d){d=d.previousSibling;for(var h=0;d;){if(d.nodeType===8){var b=d.data;if(b==="$"||b==="$!"||b==="$?"){if(h===0)return d;h--}else b==="/$"&&h++}d=d.previousSibling}return null}function i3(d,h,b){switch(h=ZC(b),d){case"html":if(d=h.documentElement,!d)throw Error(r(452));return d;case"head":if(d=h.head,!d)throw Error(r(453));return d;case"body":if(d=h.body,!d)throw Error(r(454));return d;default:throw Error(r(451))}}function Nb(d){for(var h=d.attributes;h.length;)d.removeAttributeNode(h[0]);vo(d)}var Cs=new Map,a3=new Set;function e1(d){return typeof d.getRootNode=="function"?d.getRootNode():d.nodeType===9?d:d.ownerDocument}var mu=V.d;V.d={f:Xge,r:Jge,D:Zge,C:eye,L:tye,m:nye,X:oye,S:rye,M:iye};function Xge(){var d=mu.f(),h=GC();return d||h}function Jge(d){var h=zi(d);h!==null&&h.tag===5&&h.type==="form"?OU(h):mu.r(d)}var _m=typeof document>"u"?null:document;function s3(d,h,b){var T=_m;if(T&&typeof h=="string"&&h){var $=gs(h);$='link[rel="'+d+'"][href="'+$+'"]',typeof b=="string"&&($+='[crossorigin="'+b+'"]'),a3.has($)||(a3.add($),d={rel:d,crossOrigin:b,href:h},T.querySelector($)===null&&(h=T.createElement("link"),gi(h,"link",d),He(h),T.head.appendChild(h)))}}function Zge(d){mu.D(d),s3("dns-prefetch",d,null)}function eye(d,h){mu.C(d,h),s3("preconnect",d,h)}function tye(d,h,b){mu.L(d,h,b);var T=_m;if(T&&d&&h){var $='link[rel="preload"][as="'+gs(h)+'"]';h==="image"&&b&&b.imageSrcSet?($+='[imagesrcset="'+gs(b.imageSrcSet)+'"]',typeof b.imageSizes=="string"&&($+='[imagesizes="'+gs(b.imageSizes)+'"]')):$+='[href="'+gs(d)+'"]';var F=$;switch(h){case"style":F=$m(d);break;case"script":F=Nm(d)}Cs.has(F)||(d=u({rel:"preload",href:h==="image"&&b&&b.imageSrcSet?void 0:d,as:h},b),Cs.set(F,d),T.querySelector($)!==null||h==="style"&&T.querySelector(Lb(F))||h==="script"&&T.querySelector(Fb(F))||(h=T.createElement("link"),gi(h,"link",d),He(h),T.head.appendChild(h)))}}function nye(d,h){mu.m(d,h);var b=_m;if(b&&d){var T=h&&typeof h.as=="string"?h.as:"script",$='link[rel="modulepreload"][as="'+gs(T)+'"][href="'+gs(d)+'"]',F=$;switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":F=Nm(d)}if(!Cs.has(F)&&(d=u({rel:"modulepreload",href:d},h),Cs.set(F,d),b.querySelector($)===null)){switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(b.querySelector(Fb(F)))return}T=b.createElement("link"),gi(T,"link",d),He(T),b.head.appendChild(T)}}}function rye(d,h,b){mu.S(d,h,b);var T=_m;if(T&&d){var $=pl(T).hoistableStyles,F=$m(d);h=h||"default";var X=$.get(F);if(!X){var re={loading:0,preload:null};if(X=T.querySelector(Lb(F)))re.loading=5;else{d=u({rel:"stylesheet",href:d,"data-precedence":h},b),(b=Cs.get(F))&&tR(d,b);var ge=X=T.createElement("link");He(ge),gi(ge,"link",d),ge._p=new Promise(function(Ne,Ze){ge.onload=Ne,ge.onerror=Ze}),ge.addEventListener("load",function(){re.loading|=1}),ge.addEventListener("error",function(){re.loading|=2}),re.loading|=4,t1(X,h,T)}X={type:"stylesheet",instance:X,count:1,state:re},$.set(F,X)}}}function oye(d,h){mu.X(d,h);var b=_m;if(b&&d){var T=pl(b).hoistableScripts,$=Nm(d),F=T.get($);F||(F=b.querySelector(Fb($)),F||(d=u({src:d,async:!0},h),(h=Cs.get($))&&nR(d,h),F=b.createElement("script"),He(F),gi(F,"link",d),b.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},T.set($,F))}}function iye(d,h){mu.M(d,h);var b=_m;if(b&&d){var T=pl(b).hoistableScripts,$=Nm(d),F=T.get($);F||(F=b.querySelector(Fb($)),F||(d=u({src:d,async:!0,type:"module"},h),(h=Cs.get($))&&nR(d,h),F=b.createElement("script"),He(F),gi(F,"link",d),b.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},T.set($,F))}}function l3(d,h,b,T){var $=($=ce.current)?e1($):null;if(!$)throw Error(r(446));switch(d){case"meta":case"title":return null;case"style":return typeof b.precedence=="string"&&typeof b.href=="string"?(h=$m(b.href),b=pl($).hoistableStyles,T=b.get(h),T||(T={type:"style",instance:null,count:0,state:null},b.set(h,T)),T):{type:"void",instance:null,count:0,state:null};case"link":if(b.rel==="stylesheet"&&typeof b.href=="string"&&typeof b.precedence=="string"){d=$m(b.href);var F=pl($).hoistableStyles,X=F.get(d);if(X||($=$.ownerDocument||$,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},F.set(d,X),(F=$.querySelector(Lb(d)))&&!F._p&&(X.instance=F,X.state.loading=5),Cs.has(d)||(b={rel:"preload",as:"style",href:b.href,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy},Cs.set(d,b),F||aye($,d,b,X.state))),h&&T===null)throw Error(r(528,""));return X}if(h&&T!==null)throw Error(r(529,""));return null;case"script":return h=b.async,b=b.src,typeof b=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Nm(b),b=pl($).hoistableScripts,T=b.get(h),T||(T={type:"script",instance:null,count:0,state:null},b.set(h,T)),T):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,d))}}function $m(d){return'href="'+gs(d)+'"'}function Lb(d){return'link[rel="stylesheet"]['+d+"]"}function c3(d){return u({},d,{"data-precedence":d.precedence,precedence:null})}function aye(d,h,b,T){d.querySelector('link[rel="preload"][as="style"]['+h+"]")?T.loading=1:(h=d.createElement("link"),T.preload=h,h.addEventListener("load",function(){return T.loading|=1}),h.addEventListener("error",function(){return T.loading|=2}),gi(h,"link",b),He(h),d.head.appendChild(h))}function Nm(d){return'[src="'+gs(d)+'"]'}function Fb(d){return"script[async]"+d}function u3(d,h,b){if(h.count++,h.instance===null)switch(h.type){case"style":var T=d.querySelector('style[data-href~="'+gs(b.href)+'"]');if(T)return h.instance=T,He(T),T;var $=u({},b,{"data-href":b.href,"data-precedence":b.precedence,href:null,precedence:null});return T=(d.ownerDocument||d).createElement("style"),He(T),gi(T,"style",$),t1(T,b.precedence,d),h.instance=T;case"stylesheet":$=$m(b.href);var F=d.querySelector(Lb($));if(F)return h.state.loading|=4,h.instance=F,He(F),F;T=c3(b),($=Cs.get($))&&tR(T,$),F=(d.ownerDocument||d).createElement("link"),He(F);var X=F;return X._p=new Promise(function(re,ge){X.onload=re,X.onerror=ge}),gi(F,"link",T),h.state.loading|=4,t1(F,b.precedence,d),h.instance=F;case"script":return F=Nm(b.src),($=d.querySelector(Fb(F)))?(h.instance=$,He($),$):(T=b,($=Cs.get(F))&&(T=u({},b),nR(T,$)),d=d.ownerDocument||d,$=d.createElement("script"),He($),gi($,"link",T),d.head.appendChild($),h.instance=$);case"void":return null;default:throw Error(r(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(T=h.instance,h.state.loading|=4,t1(T,b.precedence,d));return h.instance}function t1(d,h,b){for(var T=b.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),$=T.length?T[T.length-1]:null,F=$,X=0;X<T.length;X++){var re=T[X];if(re.dataset.precedence===h)F=re;else if(F!==$)break}F?F.parentNode.insertBefore(d,F.nextSibling):(h=b.nodeType===9?b.head:b,h.insertBefore(d,h.firstChild))}function tR(d,h){d.crossOrigin==null&&(d.crossOrigin=h.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=h.referrerPolicy),d.title==null&&(d.title=h.title)}function nR(d,h){d.crossOrigin==null&&(d.crossOrigin=h.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=h.referrerPolicy),d.integrity==null&&(d.integrity=h.integrity)}var n1=null;function d3(d,h,b){if(n1===null){var T=new Map,$=n1=new Map;$.set(b,T)}else $=n1,T=$.get(b),T||(T=new Map,$.set(b,T));if(T.has(d))return T;for(T.set(d,null),b=b.getElementsByTagName(d),$=0;$<b.length;$++){var F=b[$];if(!(F[Pi]||F[Ht]||d==="link"&&F.getAttribute("rel")==="stylesheet")&&F.namespaceURI!=="http://www.w3.org/2000/svg"){var X=F.getAttribute(h)||"";X=d+X;var re=T.get(X);re?re.push(F):T.set(X,[F])}}return T}function f3(d,h,b){d=d.ownerDocument||d,d.head.insertBefore(b,h==="title"?d.querySelector("head > title"):null)}function sye(d,h,b){if(b===1||h.itemProp!=null)return!1;switch(d){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return d=h.disabled,typeof h.precedence=="string"&&d==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function p3(d){return!(d.type==="stylesheet"&&(d.state.loading&3)===0)}var jb=null;function lye(){}function cye(d,h,b){if(jb===null)throw Error(r(475));var T=jb;if(h.type==="stylesheet"&&(typeof b.media!="string"||matchMedia(b.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var $=$m(b.href),F=d.querySelector(Lb($));if(F){d=F._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(T.count++,T=r1.bind(T),d.then(T,T)),h.state.loading|=4,h.instance=F,He(F);return}F=d.ownerDocument||d,b=c3(b),($=Cs.get($))&&tR(b,$),F=F.createElement("link"),He(F);var X=F;X._p=new Promise(function(re,ge){X.onload=re,X.onerror=ge}),gi(F,"link",b),h.instance=F}T.stylesheets===null&&(T.stylesheets=new Map),T.stylesheets.set(h,d),(d=h.state.preload)&&(h.state.loading&3)===0&&(T.count++,h=r1.bind(T),d.addEventListener("load",h),d.addEventListener("error",h))}}function uye(){if(jb===null)throw Error(r(475));var d=jb;return d.stylesheets&&d.count===0&&rR(d,d.stylesheets),0<d.count?function(h){var b=setTimeout(function(){if(d.stylesheets&&rR(d,d.stylesheets),d.unsuspend){var T=d.unsuspend;d.unsuspend=null,T()}},6e4);return d.unsuspend=h,function(){d.unsuspend=null,clearTimeout(b)}}:null}function r1(){if(this.count--,this.count===0){if(this.stylesheets)rR(this,this.stylesheets);else if(this.unsuspend){var d=this.unsuspend;this.unsuspend=null,d()}}}var o1=null;function rR(d,h){d.stylesheets=null,d.unsuspend!==null&&(d.count++,o1=new Map,h.forEach(dye,d),o1=null,r1.call(d))}function dye(d,h){if(!(h.state.loading&4)){var b=o1.get(d);if(b)var T=b.get(null);else{b=new Map,o1.set(d,b);for(var $=d.querySelectorAll("link[data-precedence],style[data-precedence]"),F=0;F<$.length;F++){var X=$[F];(X.nodeName==="LINK"||X.getAttribute("media")!=="not all")&&(b.set(X.dataset.precedence,X),T=X)}T&&b.set(null,T)}$=h.instance,X=$.getAttribute("data-precedence"),F=b.get(X)||T,F===T&&b.set(null,$),b.set(X,$),this.count++,T=r1.bind(this),$.addEventListener("load",T),$.addEventListener("error",T),F?F.parentNode.insertBefore($,F.nextSibling):(d=d.nodeType===9?d.head:d,d.insertBefore($,d.firstChild)),h.state.loading|=4}}var Bb={$$typeof:E,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function fye(d,h,b,T,$,F,X,re){this.tag=1,this.containerInfo=d,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nr(0),this.hiddenUpdates=nr(null),this.identifierPrefix=T,this.onUncaughtError=$,this.onCaughtError=F,this.onRecoverableError=X,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function h3(d,h,b,T,$,F,X,re,ge,Ne,Ze,ot){return d=new fye(d,h,b,X,re,ge,Ne,ot),h=1,F===!0&&(h|=24),F=_a(3,null,null,h),d.current=F,F.stateNode=d,h=FA(),h.refCount++,d.pooledCache=h,h.refCount++,F.memoizedState={element:T,isDehydrated:b,cache:h},VA(F),d}function m3(d){return d?(d=pm,d):pm}function g3(d,h,b,T,$,F){$=m3($),T.context===null?T.context=$:T.pendingContext=$,T=yd(h),T.payload={element:b},F=F===void 0?null:F,F!==null&&(T.callback=F),b=vd(d,T,h),b!==null&&(ja(b,d,h),gb(b,d,h))}function y3(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var b=d.retryLane;d.retryLane=b!==0&&b<h?b:h}}function oR(d,h){y3(d,h),(d=d.alternate)&&y3(d,h)}function v3(d){if(d.tag===13){var h=fm(d,67108864);h!==null&&ja(h,d,67108864),oR(d,67108864)}}var i1=!0;function pye(d,h,b,T){var $=L.T;L.T=null;var F=V.p;try{V.p=2,iR(d,h,b,T)}finally{V.p=F,L.T=$}}function hye(d,h,b,T){var $=L.T;L.T=null;var F=V.p;try{V.p=8,iR(d,h,b,T)}finally{V.p=F,L.T=$}}function iR(d,h,b,T){if(i1){var $=aR(T);if($===null)qM(d,h,T,a1,b),x3(d,T);else if(gye($,d,h,b,T))T.stopPropagation();else if(x3(d,T),h&4&&-1<mye.indexOf(d)){for(;$!==null;){var F=zi($);if(F!==null)switch(F.tag){case 3:if(F=F.stateNode,F.current.memoizedState.isDehydrated){var X=lt(F.pendingLanes);if(X!==0){var re=F;for(re.pendingLanes|=2,re.entangledLanes|=2;X;){var ge=1<<31-Be(X);re.entanglements[1]|=ge,X&=~ge}cc(F),(mr&6)===0&&(HC=Re()+500,kb(0))}}break;case 13:re=fm(F,2),re!==null&&ja(re,F,2),GC(),oR(F,2)}if(F=aR(T),F===null&&qM(d,h,T,a1,b),F===$)break;$=F}$!==null&&T.stopPropagation()}else qM(d,h,T,null,b)}}function aR(d){return d=dA(d),sR(d)}var a1=null;function sR(d){if(a1=null,d=Fr(d),d!==null){var h=i(d);if(h===null)d=null;else{var b=h.tag;if(b===13){if(d=a(h),d!==null)return d;d=null}else if(b===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;d=null}else h!==d&&(d=null)}}return a1=d,null}function b3(d){switch(d){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(he()){case Pe:return 2;case ve:return 8;case Ie:case te:return 32;case Te:return 268435456;default:return 32}default:return 32}}var lR=!1,Rd=null,Dd=null,kd=null,zb=new Map,Vb=new Map,_d=[],mye="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function x3(d,h){switch(d){case"focusin":case"focusout":Rd=null;break;case"dragenter":case"dragleave":Dd=null;break;case"mouseover":case"mouseout":kd=null;break;case"pointerover":case"pointerout":zb.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vb.delete(h.pointerId)}}function Hb(d,h,b,T,$,F){return d===null||d.nativeEvent!==F?(d={blockedOn:h,domEventName:b,eventSystemFlags:T,nativeEvent:F,targetContainers:[$]},h!==null&&(h=zi(h),h!==null&&v3(h)),d):(d.eventSystemFlags|=T,h=d.targetContainers,$!==null&&h.indexOf($)===-1&&h.push($),d)}function gye(d,h,b,T,$){switch(h){case"focusin":return Rd=Hb(Rd,d,h,b,T,$),!0;case"dragenter":return Dd=Hb(Dd,d,h,b,T,$),!0;case"mouseover":return kd=Hb(kd,d,h,b,T,$),!0;case"pointerover":var F=$.pointerId;return zb.set(F,Hb(zb.get(F)||null,d,h,b,T,$)),!0;case"gotpointercapture":return F=$.pointerId,Vb.set(F,Hb(Vb.get(F)||null,d,h,b,T,$)),!0}return!1}function S3(d){var h=Fr(d.target);if(h!==null){var b=i(h);if(b!==null){if(h=b.tag,h===13){if(h=a(b),h!==null){d.blockedOn=h,gt(d.priority,function(){if(b.tag===13){var T=Fa();T=Ii(T);var $=fm(b,T);$!==null&&ja($,b,T),oR(b,T)}});return}}else if(h===3&&b.stateNode.current.memoizedState.isDehydrated){d.blockedOn=b.tag===3?b.stateNode.containerInfo:null;return}}}d.blockedOn=null}function s1(d){if(d.blockedOn!==null)return!1;for(var h=d.targetContainers;0<h.length;){var b=aR(d.nativeEvent);if(b===null){b=d.nativeEvent;var T=new b.constructor(b.type,b);uA=T,b.target.dispatchEvent(T),uA=null}else return h=zi(b),h!==null&&v3(h),d.blockedOn=b,!1;h.shift()}return!0}function w3(d,h,b){s1(d)&&b.delete(h)}function yye(){lR=!1,Rd!==null&&s1(Rd)&&(Rd=null),Dd!==null&&s1(Dd)&&(Dd=null),kd!==null&&s1(kd)&&(kd=null),zb.forEach(w3),Vb.forEach(w3)}function l1(d,h){d.blockedOn===h&&(d.blockedOn=null,lR||(lR=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,yye)))}var c1=null;function C3(d){c1!==d&&(c1=d,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){c1===d&&(c1=null);for(var h=0;h<d.length;h+=3){var b=d[h],T=d[h+1],$=d[h+2];if(typeof T!="function"){if(sR(T||b)===null)continue;break}var F=zi(b);F!==null&&(d.splice(h,3),h-=3,sM(F,{pending:!0,data:$,method:b.method,action:T},T,$))}}))}function Ub(d){function h(ge){return l1(ge,d)}Rd!==null&&l1(Rd,d),Dd!==null&&l1(Dd,d),kd!==null&&l1(kd,d),zb.forEach(h),Vb.forEach(h);for(var b=0;b<_d.length;b++){var T=_d[b];T.blockedOn===d&&(T.blockedOn=null)}for(;0<_d.length&&(b=_d[0],b.blockedOn===null);)S3(b),b.blockedOn===null&&_d.shift();if(b=(d.ownerDocument||d).$$reactFormReplay,b!=null)for(T=0;T<b.length;T+=3){var $=b[T],F=b[T+1],X=$[Jt]||null;if(typeof F=="function")X||C3(b);else if(X){var re=null;if(F&&F.hasAttribute("formAction")){if($=F,X=F[Jt]||null)re=X.formAction;else if(sR($)!==null)continue}else re=X.action;typeof re=="function"?b[T+1]=re:(b.splice(T,3),T-=3),C3(b)}}}function cR(d){this._internalRoot=d}u1.prototype.render=cR.prototype.render=function(d){var h=this._internalRoot;if(h===null)throw Error(r(409));var b=h.current,T=Fa();g3(b,T,d,h,null,null)},u1.prototype.unmount=cR.prototype.unmount=function(){var d=this._internalRoot;if(d!==null){this._internalRoot=null;var h=d.containerInfo;g3(d.current,2,null,d,null,null),GC(),h[Vn]=null}};function u1(d){this._internalRoot=d}u1.prototype.unstable_scheduleHydration=function(d){if(d){var h=un();d={blockedOn:null,target:d,priority:h};for(var b=0;b<_d.length&&h!==0&&h<_d[b].priority;b++);_d.splice(b,0,d),b===0&&S3(d)}};var E3=t.version;if(E3!=="19.1.0")throw Error(r(527,E3,"19.1.0"));V.findDOMNode=function(d){var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(r(188)):(d=Object.keys(d).join(","),Error(r(268,d)));return d=l(h),d=d!==null?c(d):null,d=d===null?null:d.stateNode,d};var vye={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var d1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!d1.isDisabled&&d1.supportsFiber)try{We=d1.inject(vye),rt=d1}catch{}}return b0.createRoot=function(d,h){if(!o(d))throw Error(r(299));var b=!1,T="",$=BU,F=zU,X=VU,re=null;return h!=null&&(h.unstable_strictMode===!0&&(b=!0),h.identifierPrefix!==void 0&&(T=h.identifierPrefix),h.onUncaughtError!==void 0&&($=h.onUncaughtError),h.onCaughtError!==void 0&&(F=h.onCaughtError),h.onRecoverableError!==void 0&&(X=h.onRecoverableError),h.unstable_transitionCallbacks!==void 0&&(re=h.unstable_transitionCallbacks)),h=h3(d,1,!1,null,null,b,T,$,F,X,re,null),d[Vn]=h.current,GM(d),new cR(h)},b0.hydrateRoot=function(d,h,b){if(!o(d))throw Error(r(299));var T=!1,$="",F=BU,X=zU,re=VU,ge=null,Ne=null;return b!=null&&(b.unstable_strictMode===!0&&(T=!0),b.identifierPrefix!==void 0&&($=b.identifierPrefix),b.onUncaughtError!==void 0&&(F=b.onUncaughtError),b.onCaughtError!==void 0&&(X=b.onCaughtError),b.onRecoverableError!==void 0&&(re=b.onRecoverableError),b.unstable_transitionCallbacks!==void 0&&(ge=b.unstable_transitionCallbacks),b.formState!==void 0&&(Ne=b.formState)),h=h3(d,1,!0,h,b??null,T,$,F,X,re,ge,Ne),h.context=m3(null),b=h.current,T=Fa(),T=Ii(T),$=yd(T),$.callback=null,vd(b,$,T),b=T,h.current.lanes=b,Bn(h,b),cc(h),d[Vn]=h.current,GM(d),new u1(h)},b0.version="19.1.0",b0}var aJ;function Kct(){if(aJ)return d$.exports;aJ=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),d$.exports=Wct(),d$.exports}var tm=Kct();const Yct=()=>Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:4},children:S(Tde,{})}),S(me,{size:{xs:12,sm:4},children:S(que,{})}),S(me,{size:{xs:12,sm:4},children:S(Pde,{})})]}),zw=x.createContext({}),Ade=()=>{const{data:e,isLoading:t}=kP(),{selectedCategories:n,setSelectedCategories:r}=x.useContext(zw),[o]=je(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?S(Er,{}):S(ai,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return S(Co,{disablePadding:!0,children:Q(Bl,{role:void 0,onClick:i(a),dense:!0,children:[S(rl,{children:S(Wo,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),S(Wr,{id:s,primary:a.translatedName})]})},a.id)})})},Qct=()=>{const[e]=je();return Q(Jj,{children:[S(eB,{expandIcon:S(ku,{}),children:e("category")}),S(Zj,{children:S(Ade,{})})]})},Xct=()=>{const[e]=je();return S("div",{"data-testid":"categories",children:Q(go,{children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),S(Ade,{})]})})},Mde=()=>{const{data:e,isLoading:t}=_P(),{selectedEquipment:n,setSelectedEquipment:r}=x.useContext(zw),[o]=je(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?S(Er,{}):S(ai,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return S(Co,{disablePadding:!0,children:Q(Bl,{role:void 0,onClick:i(a),dense:!0,children:[S(rl,{children:S(Wo,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),S(Wr,{id:s,primary:a.translatedName})]})},a.id)})})},Jct=()=>{const[e]=je();return Q(Jj,{children:[S(eB,{expandIcon:S(ku,{}),children:e("exercises.equipment")}),S(Zj,{children:S(Mde,{})})]})},Zct=()=>{const[e]=je();return S("div",{"data-testid":"equipment",children:Q(go,{sx:{mt:2},children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),S(Mde,{})]})})},eut=ae(({className:e,...t})=>S(qo,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${eo.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),Xl=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${jDe}${i})`).join(", ");return S("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})},Rde=()=>{const{data:e,isLoading:t}=_v(),{selectedMuscles:n,setSelectedMuscles:r}=x.useContext(zw),[o]=je(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?S(Er,{}):S(ai,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return S(Co,{disablePadding:!0,secondaryAction:S(eut,{title:S(Xl,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:S(pn,{edge:"end","aria-label":"comments",children:S(ode,{})})}),children:Q(Bl,{role:void 0,onClick:i(a),dense:!0,children:[S(rl,{children:S(Wo,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),S(Wr,{id:s,primary:a.name,secondary:a.nameEn!==""?a.translatedName:""})]})},a.id)})})},tut=()=>{const[e]=je();return Q(Jj,{children:[S(eB,{expandIcon:S(ku,{}),children:e("exercises.muscles")}),S(Zj,{children:S(Rde,{})})]})},nut=()=>{const[e]=je();return S("div",{"data-testid":"muscles",children:Q(go,{sx:{mt:2},children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),S(Rde,{})]})})};function Ky({callback:e,loadExercise:t}){const[n,r]=x.useState(null),[o,i]=x.useState(""),[a,s]=x.useState(!0),[l,c]=x.useState([]),[u,f]=je();t=t===void 0?!1:t;const p=x.useMemo(()=>nue(m=>x2e(m,f.language,a).then(g=>c(g)),200),[f.language,a]);return x.useEffect(()=>{if(o===""){c(n?[n]:[]);return}return p(o),()=>{}},[n,o,p]),Q(Tt,{children:[S($c,{id:"exercise-name-autocomplete",getOptionLabel:m=>m.value,"data-testid":"autocomplete",filterOptions:m=>m,options:l,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:n,noOptionsText:u("noResults"),isOptionEqualToValue:(m,g)=>m.value===g.value,onChange:async(m,g)=>{c(g?[g,...l]:l),r(g),t&&g!==null&&(g.exercise=await hv(g.data.base_id)),e(g)},onInputChange:(m,g)=>{i(g)},renderInput:m=>S(dn,{...m,label:u("exercises.searchExerciseName"),fullWidth:!0,slotProps:{input:{...m.InputProps,startAdornment:Q(Tt,{children:[S(So,{position:"start",children:S(vV,{})}),m.InputProps.startAdornment]})}}}),renderOption:(m,g,y)=>Sx("li",{...m,key:`exercise-${y.index}-${g.data.id}`,"data-testid":`autocompleter-result-${g.data.base_id}`},Q(Co,{disablePadding:!0,component:"div",children:[S(rl,{children:g.data.image?S(Yl,{alt:"",src:`${CB}${g.data.image}`,variant:"rounded"}):S(ed,{fontSize:"large"})}),S(Wr,{primary:g.value,slotProps:{primary:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:g.data.category})]}))}),f.language!==dy&&S(Mx,{children:S(os,{control:S(Wo,{checked:a,onChange:(m,g)=>s(g)}),label:u("alsoSearchEnglish")})})]})}const rut=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return S(Xt,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:S(ed,{sx:{fontSize:80,color:n}})})},Dde=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new OB(Sh,"en","English")),[r,o]=je();return S(ho,{sx:{width:"100%"},children:Q(IEe,{href:on(Yt.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?S(Nc,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):S(Nc,{children:S(rut,{})}),Q(ji,{children:[S(qo,{title:n.name,placement:"top",arrow:!0,children:S(at,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),S(nl,{label:e.category.translatedName,sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>S(at,{display:"inline",mr:1,children:i.translatedName},i.id)),e.equipment.length===0&&S(at,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},out=({exercises:e})=>{const t=Qc(),[n,r]=je();let o;return t.isSuccess&&(o=qu(r.language,t.data)),S(me,{container:!0,spacing:1,children:e.map(i=>S(me,{sx:{display:"flex"},size:{xs:6,md:4},children:S(Dde,{exercise:i,language:o})},i.id))})},iut=()=>S(me,{container:!0,spacing:1,children:[...Array(21)].map((e,t)=>S(me,{sx:{display:"flex"},size:4,children:Q(ho,{children:[S(Nc,{children:S(mE,{variant:"rectangular",width:250,height:150})}),S(ji,{children:Q(Xt,{sx:{pt:.5},children:[S(mE,{width:"60%"}),S(mE,{})]})})]})},t))}),aut=({children:e})=>{const[t]=je(),[n,r]=x.useState(!1),o=i=>()=>{r(i)};return Q(Tt,{children:[S(ct,{onClick:o(!0),children:S(Bst,{})}),Q(rOe,{open:n,onClose:o(!1),anchor:"right",children:[Q(Ft,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[S(at,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),S(ct,{onClick:o(!1),children:S(cw,{})})]}),S(Bi,{}),e]})]})},sut=()=>{const[e,t]=je();return Q(Xt,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[S(at,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),S(at,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),S(Do,{to:on(Yt.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},lut=()=>{const e=sde(),[t,n]=je(),r=sd(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=x.useContext(zw),s=If("(max-width:600px)"),[l,c]=J.useState(1),u=(v,w)=>{c(w),window.scrollTo({top:0,behavior:"smooth"})},f=x.useMemo(()=>{let v=e.data||[];return o.length>0&&(v=v.filter(w=>o.some(C=>w.category.id===C.id))),i.length>0&&(v=v.filter(w=>w.equipment.some(C=>i.some(E=>E.id===C.id)))),a.length>0&&(v=v.filter(w=>w.muscles.some(C=>a.some(E=>E.id===C.id)))),v},[e.data,o,i,a]),p=21,m=Math.ceil(f.length/p),g=f.slice((l-1)*p,l*p),y=v=>{v&&r(on(Yt.EXERCISE_DETAIL,n.language,{id:v.data.base_id}))};return S(Gu,{maxWidth:"lg",children:Q(me,{container:!0,spacing:2,mt:2,children:[S(me,{size:{xs:10,sm:6},children:S(at,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?Q(Tt,{children:[S(me,{size:{xs:2,sm:6},children:S(ct,{variant:"contained",onClick:()=>r(on(Yt.EXERCISE_CONTRIBUTE,n.language)),children:S(Eo,{})})}),S(me,{flexGrow:1,size:{sm:6},children:S(Ky,{callback:y})}),S(me,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:Q(aut,{children:[S(Qct,{}),S(Jct,{}),S(tut,{})]})})]}):Q(Tt,{children:[S(me,{size:{xs:12,sm:3},children:S(Ky,{callback:y})}),S(me,{size:{xs:12,sm:3},children:S(ct,{variant:"contained",startIcon:S(Eo,{}),onClick:()=>r(on(Yt.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&S(me,{size:{xs:12,sm:3},children:Q(me,{container:!0,spacing:1,children:[S(me,{size:{xs:6,sm:12},children:S(Xct,{})}),S(me,{size:{xs:6,sm:12},children:S(Zct,{})}),S(me,{size:12,children:S(nut,{})})]})}),Q(me,{size:{xs:12,sm:9},children:[e.isLoading?S(iut,{}):Q(Tt,{children:[S(out,{exercises:g}),S(Ft,{spacing:2,alignItems:"center",sx:{mt:2},children:S(bPe,{count:m,color:"primary",page:l,onChange:u})})]}),S(sut,{})]})]})})},sJ=()=>{const[e,t]=x.useState([]),[n,r]=x.useState([]),[o,i]=J.useState([]);return S(zw.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:S(lut,{})})};function kde(e){const{t}=je();return Q(ct,{size:"small",component:"a",href:e.href,children:[S(_st,{fontSize:"inherit"}),e.backToTitle??t("goBack")]})}const ds=e=>{const t=S(kde,{href:e.backToUrl,backToTitle:e.backToTitle});return Q(Gu,{maxWidth:"lg",children:[Q(me,{container:!0,spacing:2,children:[S(me,{sx:{mb:2},size:8,children:Q(Ft,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[Q(Ft,{alignItems:"start",children:[S(at,{variant:"h3",children:e.title}),e.subTitle&&S(at,{variant:"h6",children:e.subTitle}),e.backToUrl&&t]}),e.optionsMenu]})}),S(me,{size:{xs:12,sm:8},children:e.mainContent}),S(me,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]})},Vw=e=>{const t=S(kde,{href:e.backToUrl,backToTitle:e.backToTitle});return S(Gu,{maxWidth:e.maxWidth,children:Q(me,{container:!0,spacing:2,children:[S(me,{sx:{mb:2},size:12,children:Q(Ft,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[Q(Ft,{alignItems:"start",children:[S(at,{variant:"h3",children:e.title}),e.backToUrl&&t]}),e.optionsMenu]})}),S(me,{size:12,children:e.children})]})})};function _de(e){return yr({queryKey:[pv,JSON.stringify(e||{})],queryFn:()=>wNe(e)})}const cut=()=>{const e=Mt();return Dt({mutationFn:t=>ENe(t),onSuccess:()=>e.invalidateQueries({queryKey:[pv]})})},uut=e=>{const t=Mt();return Dt({mutationFn:n=>TNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[fv,e]}),t.invalidateQueries({queryKey:[pv]})}})},dut=e=>{const t=Mt();return Dt({mutationFn:n=>ONe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[fv,e]}),t.invalidateQueries({queryKey:[pv]})}})};function $de(e){return yr({queryKey:[fv,e],queryFn:()=>CNe(e)})}const fut=()=>{const e=Mt();return Dt({mutationFn:t=>ANe(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[fv]}),e.invalidateQueries({queryKey:[pv]})}})},Nde=()=>{const e=Mt();return Dt({mutationFn:t=>PNe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[fv]}),e.invalidateQueries({queryKey:[pv]})}})},put=()=>{const e=Mt();return Dt({mutationFn:t=>INe(t),onSuccess:()=>e.invalidateQueries({queryKey:[fv]})})},Lde=x.createContext(void 0);function tn(){const e=x.useContext(Lde);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
+`));return e}const Fde=x.createContext(void 0),yt=()=>{const e=x.useContext(Fde);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},jde=parseInt(x.version,10),Vt=e=>{if(jde>=19){const t=n=>e(n,n.ref??null);return t.displayName=e.displayName??e.name,t}return x.forwardRef(e)};var SO=Symbol("NOT_FOUND");function hut(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mut(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function gut(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var lJ=e=>Array.isArray(e)?e:[e];function yut(e){const t=Array.isArray(e[0])?e[0]:e;return gut(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function vut(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function but(e){let t;return{get(n){return t&&e(t.key,n)?t.value:SO},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function xut(e,t){let n=[];function r(s){const l=n.findIndex(c=>t(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return SO}function o(s,l){r(s)===SO&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var Sut=(e,t)=>e===t;function wut(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function Bde(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Sut,maxSize:o=1,resultEqualityCheck:i}=n,a=wut(r);let s=0;const l=o<=1?but(a):xut(o,a);function c(){let u=l.get(arguments);if(u===SO){if(u=e.apply(null,arguments),s++,i){const p=l.getEntries().find(m=>i(m.value,u));p&&(u=p.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var Cut=class{constructor(t){this.value=t}deref(){return this.value}},Eut=typeof WeakRef<"u"?WeakRef:Cut,Tut=0,cJ=1;function eE(){return{s:Tut,v:void 0,o:null,p:null}}function zde(e,t={}){let n=eE();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var f;let s=n;const{length:l}=arguments;for(let p=0,m=l;p<m;p++){const g=arguments[p];if(typeof g=="function"||typeof g=="object"&&g!==null){let y=s.o;y===null&&(s.o=y=new WeakMap);const v=y.get(g);v===void 0?(s=eE(),y.set(g,s)):s=v}else{let y=s.p;y===null&&(s.p=y=new Map);const v=y.get(g);v===void 0?(s=eE(),y.set(g,s)):s=v}}const c=s;let u;if(s.s===cJ)u=s.v;else if(u=e.apply(null,arguments),i++,r){const p=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;p!=null&&r(p,u)&&(u=p,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new Eut(u):u}return c.s=cJ,c.v=u,u}return a.clearCache=()=>{n=eE(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Vde(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),hut(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:p=[],argsMemoize:m=zde,argsMemoizeOptions:g=[]}=u,y=lJ(p),v=lJ(g),w=yut(o),C=f(function(){return i++,c.apply(null,arguments)},...y),E=m(function(){a++;const O=vut(w,arguments);return s=C.apply(null,O),s},...v);return Object.assign(E,{resultFunc:c,memoizedResultFunc:C,dependencies:w,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var Out=Vde(zde),Iut=Object.assign((e,t=Out)=>{mut(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>Iut});const Put=Object.is;function Hde(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!Put(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}var h$={exports:{}},m$={};/**
* @license React
* use-sync-external-store-shim.production.js
*
@@ -382,7 +382,7 @@ Error generating stack: `+b.message+`
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var cJ;function Put(){if(cJ)return h$;cJ=1;var e=GS();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(f,h){var m=h(),g=r({inst:{value:m,getSnapshot:h}}),y=g[0].inst,v=g[1];return i(function(){y.value=m,y.getSnapshot=h,l(y)&&v({inst:y})},[f,m,h]),o(function(){return l(y)&&v({inst:y}),f(function(){l(y)&&v({inst:y})})},[f]),a(m),m}function l(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!n(f,m)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return h$.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,h$}var uJ;function Aut(){return uJ||(uJ=1,p$.exports=Put()),p$.exports}var Hde=Aut();const Mut=Object.is,zV=Vde,Rut=(e,t)=>e===t?!0:e.length===t.length&&e.every((n,r)=>n===t[r]),Ude=(e,t)=>{let n=Object.is;return t instanceof Array?n=Rut:t instanceof Object&&(n=zV),n(e,t)},Dut=()=>({state:null,equals:null,selector:null,args:void 0}),dJ=[],kut=()=>null,Ge=(e,t,n=void 0,r=Mut)=>{const o=Xl(Dut),i=o.current.selector!==null,[a,s]=x.useState(i?null:t(e,n));o.current.state=a,o.current.equals=r,o.current.selector=t;const l=o.current.args;if(o.current.args=n,i&&!Ude(l,n)){const f=o.current.selector(e,o.current.args);o.current.equals(o.current.state,f)||(o.current.state=f,s(f))}const c=x.useCallback(()=>(o.current.subscription||(o.current.subscription=e.current.store.subscribe(()=>{const f=o.current.selector(e,o.current.args);o.current.equals(o.current.state,f)||(o.current.state=f,s(f))})),null),dJ),u=x.useCallback(()=>()=>{o.current.subscription&&(o.current.subscription(),o.current.subscription=void 0)},dJ);return Hde.useSyncExternalStore(u,c,kut),a};class _ut{constructor(t){this.value=t}deref(){return this.value}}const $ut=()=>typeof WeakRef>"u"?_ut:WeakRef,Gde=$ut(),Nut=0,fJ=1;function eE(){return{s:Nut,v:void 0,o:null,p:null}}function Lut(e){return e instanceof Gde?e.deref():e}function Fut(e,t={}){let n=eE();const{resultEqualityCheck:r}=t;let o,i=0;function a(){let s=n;const{length:l}=arguments;for(let f=0,h=l;f<h;f+=1){let m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){"current"in m&&"instanceId"in m.current&&(m=m.current.state);let g=s.o;g===null&&(g=new WeakMap,s.o=g);const y=g.get(m);y===void 0?(s=eE(),g.set(m,s)):s=y}else{let g=s.p;g===null&&(g=new Map,s.p=g);const y=g.get(m);y===void 0?(s=eE(),g.set(m,s)):s=y}}const c=s;let u;if(s.s===fJ)u=s.v;else if(u=e.apply(null,arguments),i+=1,r){const f=Lut(o);f!=null&&r(f,u)&&(u=f,i!==0&&(i-=1)),o=typeof u=="object"&&u!==null||typeof u=="function"?new Gde(u):u}return c.s=fJ,c.v=u,u}return a.clearCache=()=>{n=eE(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}const pJ=zde({memoize:jde,memoizeOptions:{maxSize:1,equalityCheck:Object.is},argsMemoize:Fut}),hJ=new WeakMap,Pt=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=e(l,c),f=t(l,c),h=n(l,c),m=r(l,c),g=o(l,c);return i(u,f,h,m,g,c)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=e(l,c),f=t(l,c),h=n(l,c),m=r(l,c);return o(u,f,h,m,c)};else if(e&&t&&n&&r)s=(l,c)=>{const u=e(l,c),f=t(l,c),h=n(l,c);return r(u,f,h,c)};else if(e&&t&&n)s=(l,c)=>{const u=e(l,c),f=t(l,c);return n(u,f,c)};else if(e&&t)s=(l,c)=>{const u=e(l,c);return t(u,c)};else throw new Error("Missing arguments");return s},Qr=e=>(t,n)=>e(t.current.state,n),Yn=(...e)=>(n,r)=>{const o=n.current.instanceId,i=hJ.get(o),a=i??new Map,s=a.get(e);if(a&&s){if(!Ude(s.selectorArgs,r)){const u=r!==void 0?[...e.slice(0,e.length-1),()=>r,e[e.length-1]]:e,f=pJ(...u);return f.selectorArgs=r,a.set(e,f),f(n,r)}return s(n,r)}const l=r!==void 0?[...e.slice(0,e.length-1),()=>r,e[e.length-1]]:e,c=pJ(...l);return c.selectorArgs=r,i||hJ.set(o,a),a.set(e,c),c(n,r)},dr=Qr(e=>e.dimensions),NP=Pt(dr,e=>e.columnsTotalWidth),VV=Pt(dr,e=>e.rowHeight),jut=Pt(dr,e=>e.contentSize.height),But=Pt(dr,e=>e.hasScrollX),zut=Pt(dr,e=>e.hasScrollY),qde=Pt(dr,e=>e.columnsTotalWidth<e.viewportOuterSize.width),Vut=Pt(dr,e=>e.headerHeight),Hut=Pt(dr,e=>e.groupHeaderHeight);Pt(dr,e=>e.headerFilterHeight);const Uut=Pt(dr,e=>e.hasScrollX?e.scrollbarSize:0),Wde=Pt(dr,e=>e.hasScrollY?e.scrollbarSize:0),Gut=Pt(dr,Uut,(e,t)=>{const n=e.viewportOuterSize.height-e.minimumSize.height>0;return!(t===0&&!n)});function ad(e){return x.memo(e,Vde)}const qut={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:({from:e,to:t,count:n,estimated:r})=>{if(!r)return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`;const o=r&&r>t?`around ${r}`:`more than ${t}`;return`${e}–${t} of ${n!==-1?n:o}`},paginationItemAriaLabel:e=>e==="first"?"Go to first page":e==="last"?"Go to last page":e==="next"?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search fields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,n)=>t==="is any of"?`${e} is any of: ${n}`:`${e} ${t} ${n}`,promptChangeFilterDescription:(e,t,n)=>t==="is any of"?`Filter where ${e} is any of: ${n}`:`Filter where ${e} ${t} ${n}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:""}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`};function Cn(e){return qe("MuiDataGrid",e)}const ee=Ke("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"]);let Vl=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}({});const mJ=1e3;class Wut{constructor(t=mJ){this.timeouts=new Map,this.cleanupTimeout=mJ,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class Kut{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class HV{static create(){return new HV}}const tE={current:Qut()};let gJ=0;function At(e,t,n,r){const o=x.useState(HV.create)[0],i=x.useRef(null),a=x.useRef(null);a.current=n;const s=x.useRef(null);if(!i.current&&a.current){const l=(c,u,f)=>{var h;u.defaultMuiPrevented||(h=a.current)==null||h.call(a,c,u,f)};i.current=e.current.subscribeEvent(t,l,r),gJ+=1,s.current={cleanupToken:gJ},tE.current.register(o,()=>{var c;(c=i.current)==null||c.call(i),i.current=null,s.current=null},s.current)}else!a.current&&i.current&&(i.current(),i.current=null,s.current&&(tE.current.unregister(s.current),s.current=null));x.useEffect(()=>{if(!i.current&&a.current){const l=(c,u,f)=>{var h;u.defaultMuiPrevented||(h=a.current)==null||h.call(a,c,u,f)};i.current=e.current.subscribeEvent(t,l,r)}return s.current&&tE.current&&(tE.current.unregister(s.current),s.current=null),()=>{var l;(l=i.current)==null||l.call(i),i.current=null}},[e,t,r])}const Yut={isFirst:!0};function sr(e,t,n){At(e,t,n,Yut)}function Qut(){return typeof FinalizationRegistry<"u"?new Kut:new Wut}const Xut=.7,Jut=1.3,Zut={compact:Xut,comfortable:Jut,standard:1},Eg=Qr(e=>e.density),Fv=Pt(Eg,e=>Zut[e]);function sd(e){throw new Error("Failed assertion: should not be rendered")}const Kde={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=Kde.values;return`@media (min-width:${typeof t[e]=="number"?t[e]:e}px)`}},Yde={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},edt=Qde(Yde),Ct=z({breakpoints:Kde,spacing:tdt,transition:ndt,keys:Yde},edt);function tdt(e,t,n,r){return e===void 0?xl(1):t===void 0?xl(e):n===void 0?xl(e)+" "+xl(t):r===void 0?xl(e)+" "+xl(t)+" "+xl(n):xl(e)+" "+xl(t)+" "+xl(n)+" "+xl(r)}function xl(e){return e===0?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}function ndt(e,t){const{duration:n=Ct.transitions.duration.base,easing:r=Ct.transitions.easing.easeInOut,delay:o=0}=t??{};return e.map(i=>`${i} ${n} ${r} ${o}ms`).join(", ")}function Qde(e){if(typeof e=="string")return`var(${e})`;const t={};for(const n in e)Object.hasOwn(e,n)&&(t[n]=Qde(e[n]));return t}const rdt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],odt=e=>{const{classes:t}=e;return Me({root:["editInputCell"]},Cn,t)},idt=ae(sd,{name:"MuiDataGrid",slot:"EditInputCell"})({font:Ct.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),adt=Vt((e,t)=>{const n=yt(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u,slotProps:f}=e,h=$e(e,rdt),m=tn(),g=x.useRef(null),[y,v]=x.useState(o),w=odt(n),C=x.useCallback(async I=>{const O=I.target.value,P=m.current.getColumn(i);let R=O;P.valueParser&&(R=P.valueParser(O,m.current.getRow(r),P,m)),v(R),m.current.setEditCellValue({id:r,field:i,value:R,debounceMs:l,unstable_skipValueParser:!0},I),u&&await u(I,O)},[m,l,i,r,u]),E=m.current.unstable_getEditCellMeta(r,i);return x.useEffect(()=>{(E==null?void 0:E.changeReason)!=="debouncedSetEditCellValue"&&v(o)},[E,o]),In(()=>{s&&g.current.focus()},[s]),k.jsx(idt,z({as:n.slots.baseInput,inputRef:g,className:w.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:y??"",onChange:C,endAdornment:c?k.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},h,f==null?void 0:f.root,{ref:t}))}),sdt=e=>k.jsx(adt,z({},e)),rc=Qr(e=>e.rows),Hw=Pt(rc,e=>e.totalRowCount),ldt=Pt(rc,e=>e.loading),cdt=Pt(rc,e=>e.totalTopLevelRowCount),Us=Pt(rc,e=>e.dataRowIdToModelLookup);Pt(Us,(e,t)=>e[t]);const Si=Pt(rc,e=>e.tree),Cc=Pt(Si,(e,t)=>e[t]),udt=Pt(rc,e=>e.groupsToFetch),ddt=Pt(rc,e=>e.groupingName),yJ=Pt(rc,e=>e.treeDepths),jv=Yn(rc,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:(t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]??0)+1}),Gp=Pt(rc,e=>e.dataRowIds),fdt=Yn(Gp,Us,(e,t)=>e.reduce((n,r)=>(t[r]&&n.push(t[r]),n),[])),pdt=Pt(rc,e=>e==null?void 0:e.additionalRowGroups),Bv=Yn(pdt,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),Xde=Pt(Bv,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),Jde=(e,t)=>t&&e.length>1?[e[0]]:e,vJ=(e,t)=>n=>z({},n,{sorting:z({},n.sorting,{sortModel:Jde(e,t)})}),hdt=e=>e==="desc",mdt=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=hdt(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:Cc(t,i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},gdt=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),ydt=(e,t)=>{const n=e.map(r=>mdt(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>gdt(n,o,i)).map(o=>o.node.id)},bJ=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},UV=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,vdt=new Intl.Collator,bdt=(e,t)=>{const n=UV(e,t);return n!==null?n:typeof e=="string"?vdt.compare(e.toString(),t.toString()):e-t},Zde=(e,t)=>{const n=UV(e,t);return n!==null?n:Number(e)-Number(t)},efe=(e,t)=>{const n=UV(e,t);return n!==null?n:e>t?1:e<t?-1:0},xdt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function js(e){var O,P,R;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,tabIndex:a,disabled:s,slotProps:l,clearButton:c,headerFilterMenu:u}=e,f=$e(e,xdt),h=l==null?void 0:l.root,m=ko(),[g,y]=x.useState(m$(t.value)),[v,w]=x.useState(!1),C=bn(),E=yt(),I=x.useCallback(D=>{const M=m$(D.target.value);y(M),w(!0),m.start(E.filterDebounceMs,()=>{const A=z({},t,{value:r==="number"&&!Number.isNaN(Number(M))?Number(M):M,fromInput:C});n(A),w(!1)})},[m,E.filterDebounceMs,t,r,C,n]);return x.useEffect(()=>{(t.fromInput!==C||t.value==null)&&y(m$(t.value))},[C,t]),k.jsxs(x.Fragment,{children:[k.jsx(E.slots.baseTextField,z({id:C,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:g??"",onChange:I,type:r||"text",disabled:s,slotProps:z({},h==null?void 0:h.slotProps,{input:z({endAdornment:v?k.jsx(E.slots.loadIcon,{fontSize:"small",color:"action"}):null},(O=h==null?void 0:h.slotProps)==null?void 0:O.input),htmlInput:z({tabIndex:a},(P=h==null?void 0:h.slotProps)==null?void 0:P.htmlInput)}),inputRef:i},(R=E.slotProps)==null?void 0:R.baseTextField,f,h)),u,c]})}function m$(e){if(!(e==null||e===""))return String(e)}function Sdt(e){return typeof e=="number"&&!Number.isNaN(e)}function wdt(e){return typeof e=="function"}function GV(e){return typeof e=="object"&&e!==null}function Cdt(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function SO(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Za=(e,t,n)=>Math.max(t,Math.min(n,e));function xJ(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function Edt(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function Tdt(e){const t=Edt(e);return(n,r)=>n+(r-n)*t()}function tfe(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const Xd=(e,t)=>n=>{e&&t(n)};function nfe(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a}=e,s=bn(),[l,c]=x.useState([]),[u,f]=x.useState(t.value||[]),h=yt();x.useEffect(()=>{const v=t.value??[];f(v.map(String))},[t.value]);const m=x.useCallback((v,w)=>{f(w.map(String)),n(z({},t,{value:[...w.map(C=>r==="number"?Number(C):C)]}))},[n,t,r]),g=x.useCallback((v,w)=>{c(w===""?[]:[w])},[c]),y=h.slots.baseAutocomplete;return k.jsx(y,z({multiple:!0,freeSolo:!0,options:l,id:s,value:u,onChange:m,onInputChange:g,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:r||"text",inputRef:i}}},a==null?void 0:a.root))}var zc=function(e){return e.Cell="cell",e.Row="row",e}(zc||{}),Qn=function(e){return e.Edit="edit",e.View="view",e}(Qn||{}),zn=function(e){return e.Edit="edit",e.View="view",e}(zn||{}),Zi=function(e){return e.And="and",e.Or="or",e}(Zi||{});class Odt{constructor(t){this.data=void 0,this.data=t.ids}has(t){return this.data.has(t)}select(t){this.data.add(t)}unselect(t){this.data.delete(t)}}class Idt{constructor(t){this.data=void 0,this.data=t.ids}has(t){return!this.data.has(t)}select(t){this.data.delete(t)}unselect(t){this.data.add(t)}}const Jd=e=>e.type==="include"?new Odt(e):new Idt(e);var xu=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(xu||{}),Cl=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Cl||{}),Vd=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Vd||{}),ks=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(ks||{});function rfe(e){return e.field!==void 0}const ofe={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},AS=()=>({items:[],logicOperator:Zi.And,quickFilterValues:[],quickFilterLogicOperator:Zi.And});function ife(e){return{current:e.current.getPublicApi()}}let qd=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const wO={left:[],right:[]},Pdt=Qr(e=>e.isRtl),Hl=Qr(e=>e.columns),Rc=Pt(Hl,e=>e.orderedFields),ld=Pt(Hl,e=>e.lookup),Ul=Yn(Rc,ld,(e,t)=>e.map(n=>t[n])),Nl=Pt(Hl,e=>e.columnVisibilityModel),Adt=Pt(Hl,e=>e.initialColumnVisibilityModel),Yr=Yn(Ul,Nl,(e,t)=>e.filter(n=>t[n.field]!==!1)),zv=Yn(Yr,e=>e.map(t=>t.field)),Mdt=Qr(e=>e.pinnedColumns),Vv=Yn(Hl,Mdt,zv,Pdt,(e,t,n,r)=>{const o=Rdt(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function Rdt(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return wO;const r=(c,u)=>Array.isArray(c)?c.filter(f=>u.includes(f)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Yf=Yn(Yr,e=>{const t=[];let n=0;for(let r=0;r<e.length;r+=1)t.push(n),n+=e[r].computedWidth;return t}),afe=Yn(Ul,e=>e.filter(t=>t.filterable)),Ddt=Yn(Ul,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),kdt=Yn(Ul,e=>e.some(t=>t.colSpan!==void 0));let x0;function _dt(){if(x0!==void 0)return x0;try{x0=new Function("return true")()}catch{x0=!1}return x0}const tj=(e,t)=>{const n=z({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=ld(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},qV=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?z({},e,{items:o.map(s=>tj(s,n))}):e.items!==o?z({},e,{items:o}):e},SJ=(e,t,n)=>r=>z({},r,{filterModel:qV(e,t,n)}),MS=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,sfe=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const f=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(h=>f(h,void 0,n,t)):f(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=MS(r));const i=z({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(f=>f.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=ife(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:f=>{let h=t.current.getRowValue(f,n);return o&&(h=MS(h)),c(h,f,n,l)}}};let wJ=1;const $dt=(e,t,n)=>{const{items:r}=e,o=r.map(s=>sfe(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!_dt())return(s,l)=>{const c={};for(let u=0;u<o.length;u+=1){const f=o[u];(!l||l(f.item.field))&&(c[f.item.id]=f.fn(s))}return c};const i=new Function("appliers","row","shouldApplyFilter",`"use strict";
+ */var uJ;function Aut(){if(uJ)return m$;uJ=1;var e=GS();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var m=p(),g=r({inst:{value:m,getSnapshot:p}}),y=g[0].inst,v=g[1];return i(function(){y.value=m,y.getSnapshot=p,l(y)&&v({inst:y})},[f,m,p]),o(function(){return l(y)&&v({inst:y}),f(function(){l(y)&&v({inst:y})})},[f]),a(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!n(f,m)}catch{return!0}}function c(f,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return m$.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,m$}var dJ;function Mut(){return dJ||(dJ=1,h$.exports=Aut()),h$.exports}var Ude=Mut();const Rut=Object.is,VV=Hde,Dut=(e,t)=>e===t?!0:e.length===t.length&&e.every((n,r)=>n===t[r]),Gde=(e,t)=>{let n=Object.is;return t instanceof Array?n=Dut:t instanceof Object&&(n=VV),n(e,t)},kut=()=>({state:null,equals:null,selector:null,args:void 0}),fJ=[],_ut=()=>null,Ge=(e,t,n=void 0,r=Rut)=>{const o=Jl(kut),i=o.current.selector!==null,[a,s]=x.useState(i?null:t(e,n));o.current.state=a,o.current.equals=r,o.current.selector=t;const l=o.current.args;if(o.current.args=n,i&&!Gde(l,n)){const f=o.current.selector(e,o.current.args);o.current.equals(o.current.state,f)||(o.current.state=f,s(f))}const c=x.useCallback(()=>(o.current.subscription||(o.current.subscription=e.current.store.subscribe(()=>{const f=o.current.selector(e,o.current.args);o.current.equals(o.current.state,f)||(o.current.state=f,s(f))})),null),fJ),u=x.useCallback(()=>()=>{o.current.subscription&&(o.current.subscription(),o.current.subscription=void 0)},fJ);return Ude.useSyncExternalStore(u,c,_ut),a};class $ut{constructor(t){this.value=t}deref(){return this.value}}const Nut=()=>typeof WeakRef>"u"?$ut:WeakRef,qde=Nut(),Lut=0,pJ=1;function tE(){return{s:Lut,v:void 0,o:null,p:null}}function Fut(e){return e instanceof qde?e.deref():e}function jut(e,t={}){let n=tE();const{resultEqualityCheck:r}=t;let o,i=0;function a(){let s=n;const{length:l}=arguments;for(let f=0,p=l;f<p;f+=1){let m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){"current"in m&&"instanceId"in m.current&&(m=m.current.state);let g=s.o;g===null&&(g=new WeakMap,s.o=g);const y=g.get(m);y===void 0?(s=tE(),g.set(m,s)):s=y}else{let g=s.p;g===null&&(g=new Map,s.p=g);const y=g.get(m);y===void 0?(s=tE(),g.set(m,s)):s=y}}const c=s;let u;if(s.s===pJ)u=s.v;else if(u=e.apply(null,arguments),i+=1,r){const f=Fut(o);f!=null&&r(f,u)&&(u=f,i!==0&&(i-=1)),o=typeof u=="object"&&u!==null||typeof u=="function"?new qde(u):u}return c.s=pJ,c.v=u,u}return a.clearCache=()=>{n=tE(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}const hJ=Vde({memoize:Bde,memoizeOptions:{maxSize:1,equalityCheck:Object.is},argsMemoize:jut}),mJ=new WeakMap,Pt=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=e(l,c),f=t(l,c),p=n(l,c),m=r(l,c),g=o(l,c);return i(u,f,p,m,g,c)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=e(l,c),f=t(l,c),p=n(l,c),m=r(l,c);return o(u,f,p,m,c)};else if(e&&t&&n&&r)s=(l,c)=>{const u=e(l,c),f=t(l,c),p=n(l,c);return r(u,f,p,c)};else if(e&&t&&n)s=(l,c)=>{const u=e(l,c),f=t(l,c);return n(u,f,c)};else if(e&&t)s=(l,c)=>{const u=e(l,c);return t(u,c)};else throw new Error("Missing arguments");return s},Qr=e=>(t,n)=>e(t.current.state,n),Yn=(...e)=>(n,r)=>{const o=n.current.instanceId,i=mJ.get(o),a=i??new Map,s=a.get(e);if(a&&s){if(!Gde(s.selectorArgs,r)){const u=r!==void 0?[...e.slice(0,e.length-1),()=>r,e[e.length-1]]:e,f=hJ(...u);return f.selectorArgs=r,a.set(e,f),f(n,r)}return s(n,r)}const l=r!==void 0?[...e.slice(0,e.length-1),()=>r,e[e.length-1]]:e,c=hJ(...l);return c.selectorArgs=r,i||mJ.set(o,a),a.set(e,c),c(n,r)},fr=Qr(e=>e.dimensions),LP=Pt(fr,e=>e.columnsTotalWidth),HV=Pt(fr,e=>e.rowHeight),But=Pt(fr,e=>e.contentSize.height),zut=Pt(fr,e=>e.hasScrollX),Vut=Pt(fr,e=>e.hasScrollY),Wde=Pt(fr,e=>e.columnsTotalWidth<e.viewportOuterSize.width),Hut=Pt(fr,e=>e.headerHeight),Uut=Pt(fr,e=>e.groupHeaderHeight);Pt(fr,e=>e.headerFilterHeight);const Gut=Pt(fr,e=>e.hasScrollX?e.scrollbarSize:0),Kde=Pt(fr,e=>e.hasScrollY?e.scrollbarSize:0),qut=Pt(fr,Gut,(e,t)=>{const n=e.viewportOuterSize.height-e.minimumSize.height>0;return!(t===0&&!n)});function ld(e){return x.memo(e,Hde)}const Wut={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:({from:e,to:t,count:n,estimated:r})=>{if(!r)return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`;const o=r&&r>t?`around ${r}`:`more than ${t}`;return`${e}–${t} of ${n!==-1?n:o}`},paginationItemAriaLabel:e=>e==="first"?"Go to first page":e==="last"?"Go to last page":e==="next"?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search fields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,n)=>t==="is any of"?`${e} is any of: ${n}`:`${e} ${t} ${n}`,promptChangeFilterDescription:(e,t,n)=>t==="is any of"?`Filter where ${e} is any of: ${n}`:`Filter where ${e} ${t} ${n}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:""}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`};function Cn(e){return qe("MuiDataGrid",e)}const ee=Ke("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"]);let Ul=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}({});const gJ=1e3;class Kut{constructor(t=gJ){this.timeouts=new Map,this.cleanupTimeout=gJ,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class Yut{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class UV{static create(){return new UV}}const nE={current:Xut()};let yJ=0;function At(e,t,n,r){const o=x.useState(UV.create)[0],i=x.useRef(null),a=x.useRef(null);a.current=n;const s=x.useRef(null);if(!i.current&&a.current){const l=(c,u,f)=>{var p;u.defaultMuiPrevented||(p=a.current)==null||p.call(a,c,u,f)};i.current=e.current.subscribeEvent(t,l,r),yJ+=1,s.current={cleanupToken:yJ},nE.current.register(o,()=>{var c;(c=i.current)==null||c.call(i),i.current=null,s.current=null},s.current)}else!a.current&&i.current&&(i.current(),i.current=null,s.current&&(nE.current.unregister(s.current),s.current=null));x.useEffect(()=>{if(!i.current&&a.current){const l=(c,u,f)=>{var p;u.defaultMuiPrevented||(p=a.current)==null||p.call(a,c,u,f)};i.current=e.current.subscribeEvent(t,l,r)}return s.current&&nE.current&&(nE.current.unregister(s.current),s.current=null),()=>{var l;(l=i.current)==null||l.call(i),i.current=null}},[e,t,r])}const Qut={isFirst:!0};function sr(e,t,n){At(e,t,n,Qut)}function Xut(){return typeof FinalizationRegistry<"u"?new Yut:new Kut}const Jut=.7,Zut=1.3,edt={compact:Jut,comfortable:Zut,standard:1},Tg=Qr(e=>e.density),Fv=Pt(Tg,e=>edt[e]);function cd(e){throw new Error("Failed assertion: should not be rendered")}const Yde={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=Yde.values;return`@media (min-width:${typeof t[e]=="number"?t[e]:e}px)`}},Qde={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},tdt=Xde(Qde),Ct=z({breakpoints:Yde,spacing:ndt,transition:rdt,keys:Qde},tdt);function ndt(e,t,n,r){return e===void 0?wl(1):t===void 0?wl(e):n===void 0?wl(e)+" "+wl(t):r===void 0?wl(e)+" "+wl(t)+" "+wl(n):wl(e)+" "+wl(t)+" "+wl(n)+" "+wl(r)}function wl(e){return e===0?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}function rdt(e,t){const{duration:n=Ct.transitions.duration.base,easing:r=Ct.transitions.easing.easeInOut,delay:o=0}=t??{};return e.map(i=>`${i} ${n} ${r} ${o}ms`).join(", ")}function Xde(e){if(typeof e=="string")return`var(${e})`;const t={};for(const n in e)Object.hasOwn(e,n)&&(t[n]=Xde(e[n]));return t}const odt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],idt=e=>{const{classes:t}=e;return Me({root:["editInputCell"]},Cn,t)},adt=ae(cd,{name:"MuiDataGrid",slot:"EditInputCell"})({font:Ct.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),sdt=Vt((e,t)=>{const n=yt(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u,slotProps:f}=e,p=$e(e,odt),m=tn(),g=x.useRef(null),[y,v]=x.useState(o),w=idt(n),C=x.useCallback(async I=>{const O=I.target.value,P=m.current.getColumn(i);let R=O;P.valueParser&&(R=P.valueParser(O,m.current.getRow(r),P,m)),v(R),m.current.setEditCellValue({id:r,field:i,value:R,debounceMs:l,unstable_skipValueParser:!0},I),u&&await u(I,O)},[m,l,i,r,u]),E=m.current.unstable_getEditCellMeta(r,i);return x.useEffect(()=>{(E==null?void 0:E.changeReason)!=="debouncedSetEditCellValue"&&v(o)},[E,o]),In(()=>{s&&g.current.focus()},[s]),k.jsx(adt,z({as:n.slots.baseInput,inputRef:g,className:w.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:y??"",onChange:C,endAdornment:c?k.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},p,f==null?void 0:f.root,{ref:t}))}),ldt=e=>k.jsx(sdt,z({},e)),oc=Qr(e=>e.rows),Hw=Pt(oc,e=>e.totalRowCount),cdt=Pt(oc,e=>e.loading),udt=Pt(oc,e=>e.totalTopLevelRowCount),Us=Pt(oc,e=>e.dataRowIdToModelLookup);Pt(Us,(e,t)=>e[t]);const wi=Pt(oc,e=>e.tree),Ec=Pt(wi,(e,t)=>e[t]),ddt=Pt(oc,e=>e.groupsToFetch),fdt=Pt(oc,e=>e.groupingName),vJ=Pt(oc,e=>e.treeDepths),jv=Yn(oc,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:(t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]??0)+1}),Wp=Pt(oc,e=>e.dataRowIds),pdt=Yn(Wp,Us,(e,t)=>e.reduce((n,r)=>(t[r]&&n.push(t[r]),n),[])),hdt=Pt(oc,e=>e==null?void 0:e.additionalRowGroups),Bv=Yn(hdt,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),Jde=Pt(Bv,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),Zde=(e,t)=>t&&e.length>1?[e[0]]:e,bJ=(e,t)=>n=>z({},n,{sorting:z({},n.sorting,{sortModel:Zde(e,t)})}),mdt=e=>e==="desc",gdt=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=mdt(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:Ec(t,i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},ydt=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),vdt=(e,t)=>{const n=e.map(r=>gdt(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>ydt(n,o,i)).map(o=>o.node.id)},xJ=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},GV=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,bdt=new Intl.Collator,xdt=(e,t)=>{const n=GV(e,t);return n!==null?n:typeof e=="string"?bdt.compare(e.toString(),t.toString()):e-t},efe=(e,t)=>{const n=GV(e,t);return n!==null?n:Number(e)-Number(t)},tfe=(e,t)=>{const n=GV(e,t);return n!==null?n:e>t?1:e<t?-1:0},Sdt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function js(e){var O,P,R;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,tabIndex:a,disabled:s,slotProps:l,clearButton:c,headerFilterMenu:u}=e,f=$e(e,Sdt),p=l==null?void 0:l.root,m=_o(),[g,y]=x.useState(g$(t.value)),[v,w]=x.useState(!1),C=bn(),E=yt(),I=x.useCallback(D=>{const M=g$(D.target.value);y(M),w(!0),m.start(E.filterDebounceMs,()=>{const A=z({},t,{value:r==="number"&&!Number.isNaN(Number(M))?Number(M):M,fromInput:C});n(A),w(!1)})},[m,E.filterDebounceMs,t,r,C,n]);return x.useEffect(()=>{(t.fromInput!==C||t.value==null)&&y(g$(t.value))},[C,t]),k.jsxs(x.Fragment,{children:[k.jsx(E.slots.baseTextField,z({id:C,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:g??"",onChange:I,type:r||"text",disabled:s,slotProps:z({},p==null?void 0:p.slotProps,{input:z({endAdornment:v?k.jsx(E.slots.loadIcon,{fontSize:"small",color:"action"}):null},(O=p==null?void 0:p.slotProps)==null?void 0:O.input),htmlInput:z({tabIndex:a},(P=p==null?void 0:p.slotProps)==null?void 0:P.htmlInput)}),inputRef:i},(R=E.slotProps)==null?void 0:R.baseTextField,f,p)),u,c]})}function g$(e){if(!(e==null||e===""))return String(e)}function wdt(e){return typeof e=="number"&&!Number.isNaN(e)}function Cdt(e){return typeof e=="function"}function qV(e){return typeof e=="object"&&e!==null}function Edt(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function wO(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Za=(e,t,n)=>Math.max(t,Math.min(n,e));function SJ(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function Tdt(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function Odt(e){const t=Tdt(e);return(n,r)=>n+(r-n)*t()}function nfe(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const Zd=(e,t)=>n=>{e&&t(n)};function rfe(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a}=e,s=bn(),[l,c]=x.useState([]),[u,f]=x.useState(t.value||[]),p=yt();x.useEffect(()=>{const v=t.value??[];f(v.map(String))},[t.value]);const m=x.useCallback((v,w)=>{f(w.map(String)),n(z({},t,{value:[...w.map(C=>r==="number"?Number(C):C)]}))},[n,t,r]),g=x.useCallback((v,w)=>{c(w===""?[]:[w])},[c]),y=p.slots.baseAutocomplete;return k.jsx(y,z({multiple:!0,freeSolo:!0,options:l,id:s,value:u,onChange:m,onInputChange:g,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:r||"text",inputRef:i}}},a==null?void 0:a.root))}var Vc=function(e){return e.Cell="cell",e.Row="row",e}(Vc||{}),Qn=function(e){return e.Edit="edit",e.View="view",e}(Qn||{}),zn=function(e){return e.Edit="edit",e.View="view",e}(zn||{}),Zi=function(e){return e.And="and",e.Or="or",e}(Zi||{});class Idt{constructor(t){this.data=void 0,this.data=t.ids}has(t){return this.data.has(t)}select(t){this.data.add(t)}unselect(t){this.data.delete(t)}}class Pdt{constructor(t){this.data=void 0,this.data=t.ids}has(t){return!this.data.has(t)}select(t){this.data.delete(t)}unselect(t){this.data.add(t)}}const ef=e=>e.type==="include"?new Idt(e):new Pdt(e);var Su=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Su||{}),Tl=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Tl||{}),Ud=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Ud||{}),ks=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(ks||{});function ofe(e){return e.field!==void 0}const ife={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},AS=()=>({items:[],logicOperator:Zi.And,quickFilterValues:[],quickFilterLogicOperator:Zi.And});function afe(e){return{current:e.current.getPublicApi()}}let Kd=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const CO={left:[],right:[]},Adt=Qr(e=>e.isRtl),Gl=Qr(e=>e.columns),Dc=Pt(Gl,e=>e.orderedFields),ud=Pt(Gl,e=>e.lookup),ql=Yn(Dc,ud,(e,t)=>e.map(n=>t[n])),Fl=Pt(Gl,e=>e.columnVisibilityModel),Mdt=Pt(Gl,e=>e.initialColumnVisibilityModel),Yr=Yn(ql,Fl,(e,t)=>e.filter(n=>t[n.field]!==!1)),zv=Yn(Yr,e=>e.map(t=>t.field)),Rdt=Qr(e=>e.pinnedColumns),Vv=Yn(Gl,Rdt,zv,Adt,(e,t,n,r)=>{const o=Ddt(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function Ddt(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return CO;const r=(c,u)=>Array.isArray(c)?c.filter(f=>u.includes(f)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Xf=Yn(Yr,e=>{const t=[];let n=0;for(let r=0;r<e.length;r+=1)t.push(n),n+=e[r].computedWidth;return t}),sfe=Yn(ql,e=>e.filter(t=>t.filterable)),kdt=Yn(ql,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),_dt=Yn(ql,e=>e.some(t=>t.colSpan!==void 0));let x0;function $dt(){if(x0!==void 0)return x0;try{x0=new Function("return true")()}catch{x0=!1}return x0}const nj=(e,t)=>{const n=z({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=ud(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},WV=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?z({},e,{items:o.map(s=>nj(s,n))}):e.items!==o?z({},e,{items:o}):e},wJ=(e,t,n)=>r=>z({},r,{filterModel:WV(e,t,n)}),MS=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,lfe=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const f=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(p=>f(p,void 0,n,t)):f(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=MS(r));const i=z({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(f=>f.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=afe(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:f=>{let p=t.current.getRowValue(f,n);return o&&(p=MS(p)),c(p,f,n,l)}}};let CJ=1;const Ndt=(e,t,n)=>{const{items:r}=e,o=r.map(s=>lfe(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!$dt())return(s,l)=>{const c={};for(let u=0;u<o.length;u+=1){const f=o[u];(!l||l(f.item.field))&&(c[f.item.id]=f.fn(s))}return c};const i=new Function("appliers","row","shouldApplyFilter",`"use strict";
${o.map((s,l)=>`const shouldApply${l} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(s.item.field)});`).join(`
`)}
@@ -391,12 +391,12 @@ ${o.map((s,l)=>` ${JSON.stringify(String(s.item.id))}: !shouldApply${l} ? false
`)}
};
-return result$$;`.replaceAll("$$",String(wJ)));return wJ+=1,(s,l)=>i(o,s,l)},lfe=e=>e.quickFilterExcludeHiddenColumns??!0,Ndt=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=lfe(e)?zv(t):Rc(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=ife(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(f=>{const h=i?MS(f):f;return{fn:u(h,c,a)}})})}),function(c,u){const f={};e:for(let h=0;h<n.length;h+=1){const m=n[h];for(let g=0;g<o.length;g+=1){const{column:y,appliers:v}=o[g],{field:w}=y;if(u&&!u(w))continue;const C=v[h];let E=t.current.getRowValue(c,y);if(C.fn===null)continue;if(i&&(E=MS(E)),C.fn(E,c,y,a)){f[m]=!0;continue e}}f[m]=!1}return f}},Ldt=(e,t,n)=>{const r=$dt(e,t,n),o=Ndt(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},CJ=e=>e!=null,Fdt=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>sfe(r,t)!==null)),e.cleanedFilterItems),jdt=(e,t,n,r,o)=>{const i=Fdt(o,r,n.items),a=e.filter(CJ),s=t.filter(CJ);if(a.length>0){const l=u=>a.some(f=>f[u.id]);if((n.logicOperator??AS().logicOperator)===Zi.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(f=>f[u]);if((n.quickFilterLogicOperator??AS().quickFilterLogicOperator)===Zi.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},Bdt=e=>{if(!e)return null;const t=new RegExp(SO(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=MS(a)),a!=null?t.test(a.toString()):!1}},EJ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(SO(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},TJ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},OJ=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},zdt=(e=!1)=>[{value:"contains",getApplyFilterFn:EJ(e,!1),InputComponent:js},{value:"doesNotContain",getApplyFilterFn:EJ(e,!0),InputComponent:js},{value:"equals",getApplyFilterFn:TJ(e,!1),InputComponent:js},{value:"doesNotEqual",getApplyFilterFn:TJ(e,!0),InputComponent:js},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${SO(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:js},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${SO(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:js},{value:"isEmpty",getApplyFilterFn:OJ(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:OJ(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:nfe}],Gl={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:bdt,type:"string",align:"left",filterOperators:zdt(),renderEditCell:sdt,getApplyQuickFilterFn:Bdt},cfe=x.createContext(void 0),LP=()=>{const e=x.useContext(cfe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
-`));return e},Vdt="MuiDataGridVariables",WV=x.createContext({className:"unset",tag:k.jsx("style",{href:"/unset"})});function ufe(){return x.useContext(WV).className}function Hdt(){return x.useContext(WV)}function Udt(e){const n=LP().hooks.useCSSVariables(),r=x.useMemo(()=>{const o=`${Vdt}-${n.id}`,i=`.${o}{${Gdt(n.variables)}}`,a=k.jsx("style",{href:`/${o}`,children:i});return{className:o,tag:a}},[n]);return k.jsx(WV.Provider,{value:r,children:e.children})}function Gdt(e){let t="";for(const n in e)Object.hasOwn(e,n)&&(t+=`${n}:${e[n]};`);return t}const qdt=["open","target","onClose","children","position","className","onExited"],Wdt=e=>{const{classes:t}=e;return Me({root:["menu"]},Cn,t)},Kdt=ae(sd,{name:"MuiDataGrid",slot:"Menu"})({zIndex:Ct.zIndex.menu,[`& .${ee.menuList}`]:{outline:0}});function FP(e){var y;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=$e(e,qdt),c=tn(),u=yt(),f=Wdt(u),h=ufe(),m=x.useRef(null);In(()=>{var v,w;t?m.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((w=(v=m.current)==null?void 0:v.focus)==null||w.call(v),m.current=null)},[t]),x.useEffect(()=>{const v=t?"menuOpen":"menuClose";c.current.publishEvent(v,{target:n})},[c,t,n]);const g=v=>{v.target&&(n===v.target||n!=null&&n.contains(v.target))||r(v)};return k.jsx(Kdt,z({as:u.slots.basePopper,className:fe(f.root,a,h),ownerState:u,open:t,target:n,transition:!0,placement:i,onClickAway:g,onExited:s,clickAwayMouseEvent:"onMouseDown"},l,(y=u.slotProps)==null?void 0:y.basePopper,{children:o}))}const Ydt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],Qdt=e=>typeof e.getActions=="function";function Xdt(e){var L;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=$e(e,Ydt),[l,c]=x.useState(-1),[u,f]=x.useState(!1),h=tn(),m=x.useRef(null),g=x.useRef(null),y=x.useRef(!1),v=x.useRef({}),w=vr(),C=bn(),E=bn(),I=yt();if(!Qdt(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const O=t.getActions(h.current.getRowParams(n)),P=O.filter(V=>!V.props.showInMenu),R=O.filter(V=>V.props.showInMenu),D=P.length+(R.length?1:0);x.useLayoutEffect(()=>{r||Object.entries(v.current).forEach(([V,W])=>{W==null||W.stop({},()=>{delete v.current[V]})})},[r]),x.useEffect(()=>{if(l<0||!m.current||l>=m.current.children.length)return;m.current.children[l].focus({preventScroll:!0})},[l]),x.useEffect(()=>{r||(c(-1),y.current=!1)},[r]),x.useImperativeHandle(a,()=>({focus(){if(!y.current){const V=O.findIndex(W=>!W.props.disabled);c(V)}}}),[O]),x.useEffect(()=>{l>=D&&c(D-1)},[l,D]);const M=()=>{f(!0),c(D-1),y.current=!0},A=()=>{f(!1)},_=V=>{V.stopPropagation(),V.preventDefault(),u?A():M()},N=V=>W=>{v.current[V]=W},B=(V,W)=>K=>{c(V),y.current=!0,W&&W(K)},H=V=>{if(D<=1)return;const W=(G,q)=>{var ie;if(G<0||G>O.length)return G;const Z=(q==="left"?-1:1)*(w?-1:1);return(ie=O[G+Z])!=null&&ie.props.disabled?W(G+Z,q):G+Z};let K=l;V.key==="ArrowRight"?K=W(l,"right"):V.key==="ArrowLeft"&&(K=W(l,"left")),!(K<0||K>=D)&&K!==l&&(V.preventDefault(),V.stopPropagation(),c(K))},j=V=>{V.key==="Tab"&&V.preventDefault(),["Tab","Escape"].includes(V.key)&&A()};return k.jsxs("div",z({role:"menu",ref:m,tabIndex:-1,className:ee.actionsCell,onKeyDown:H},s,{children:[P.map((V,W)=>x.cloneElement(V,{key:W,touchRippleRef:N(W),onClick:B(W,V.props.onClick),tabIndex:l===W?o:-1})),R.length>0&&E&&k.jsx(I.slots.baseIconButton,z({ref:g,id:E,"aria-label":h.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?C:void 0,role:"menuitem",size:"small",onClick:_,touchRippleRef:N(E),tabIndex:l===P.length?o:-1},(L=I.slotProps)==null?void 0:L.baseIconButton,{children:k.jsx(I.slots.moreActionsIcon,{fontSize:"small"})})),R.length>0&&k.jsx(FP,{open:u,target:g.current,position:i,onClose:A,children:k.jsx(I.slots.baseMenuList,{id:C,className:ee.menuList,onKeyDown:j,"aria-labelledby":E,autoFocusItem:!0,children:R.map((V,W)=>x.cloneElement(V,{key:W,closeMenu:A}))})})]}))}const Jdt=e=>k.jsx(Xdt,z({},e)),jP="actions",Zdt=z({},Gl,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:Jdt,getApplyQuickFilterFn:()=>null}),ii="auto-generated-group-node-root",Ky=Symbol("mui.id_autogenerated"),eft=()=>({type:"group",id:ii,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function tft(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(`
-`))}const BP=(e,t,n)=>{const r=t?t(e):e.id;return tft(r,e,n),r},nft=(e,t,n)=>{const r=t.field;if(!t||!t.valueGetter)return e[r];const o=e[t.field];return t.valueGetter(o,e,t,n)},ME=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={};for(let a=0;a<e.length;a+=1){const s=e[a],l=BP(s,t);i[l]=s,o.rows.push(l)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,updates:o,dataRowIdToModelLookup:i}},dfe=({tree:e,rowCountProp:t=0})=>{const n=e[ii];return Math.max(t,n.children.length+(n.footerId==null?0:1))},ffe=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:f=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),h=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},z({},h,{totalRowCount:Math.max(t,h.dataRowIds.length),totalTopLevelRowCount:dfe({tree:h.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:f})},Yy=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,KV=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i<r.children.length;i+=1){const a=r.children[i];(!n||!Yy(e[a]))&&o.push(a);const s=KV(e,a,n);for(let l=0;l<s.length;l+=1)o.push(s[l])}return!n&&r.footerId!=null&&o.push(r.footerId),o},IJ=({previousCache:e,getRowId:t,updates:n,groupKeys:r})=>{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(c=>{const u=BP(c,t,"A row was provided without id when calling updateRows():");o.has(u)?o.set(u,z({},o.get(u),c)):o.set(u,c)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:z({},e.updates.idToActionLookup),groupKeys:r},a=z({},e.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};o.forEach((c,u)=>{const f=i.idToActionLookup[u];if(c._action==="delete"){if(f==="remove"||!a[u])return;f!=null&&(s[f][u]=!0),i.actions.remove.push(u),delete a[u];return}const h=a[u];if(h){f==="remove"?(s.remove[u]=!0,i.actions.modify.push(u)):f==null&&i.actions.modify.push(u),a[u]=z({},h,c);return}f==="remove"?(s.remove[u]=!0,i.actions.insert.push(u)):f==null&&i.actions.insert.push(u),a[u]=c});const l=Object.keys(s);for(let c=0;c<l.length;c+=1){const u=l[c],f=s[u];Object.keys(f).length>0&&(i.actions[u]=i.actions[u].filter(h=>!f[h]))}return{dataRowIdToModelLookup:a,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},pfe="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function PJ(e,t,n){const r=[];return t.forEach(o=>{const i=BP(o,n,"A row was provided without id when calling updateRows():"),a=Cc(e,i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=z({},l,o))}else r.push(o)}),r}const hfe=(e,t,n)=>typeof e=="number"&&e>0?e:t,rft="__tree_data_group__",mfe="__row_group_by_columns_group__",zP="__detail_panel_toggle__";let On=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const oft=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],ift=e=>{const{classes:t}=e;return Me({root:["booleanCell"]},Cn,t)};function aft(e){const{value:t,rowNode:n}=e,r=$e(e,oft),o=tn(),i=yt(),a={classes:i.classes},s=ift(a),c=Ge(o,jv)>0&&n.type==="group"&&i.treeData===!1,u=x.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:k.jsx(u,z({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const sft=x.memo(aft),lft=e=>e.field!==mfe&&Yy(e.rowNode)?"":k.jsx(sft,z({},e)),cft=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],uft=e=>{const{classes:t}=e;return Me({root:["editBooleanCell"]},Cn,t)};function dft(e){var w;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=$e(e,cft),l=tn(),c=x.useRef(null),u=bn(),[f,h]=x.useState(n),m=yt(),g={classes:m.classes},y=uft(g),v=x.useCallback(async C=>{const E=C.target.checked;a&&await a(C,E),h(E),await l.current.setEditCellValue({id:t,field:r,value:E},C)},[l,r,t,a]);return x.useEffect(()=>{h(n)},[n]),In(()=>{i&&c.current.focus()},[i]),k.jsx("label",z({htmlFor:u,className:fe(y.root,o)},s,{children:k.jsx(m.slots.baseCheckbox,z({id:u,inputRef:c,checked:!!f,onChange:v,size:"small"},(w=m.slotProps)==null?void 0:w.baseCheckbox))}))}const fft=e=>k.jsx(dft,z({},e)),pft=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function hft(e){var O,P;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,headerFilterMenu:i,clearButton:a,tabIndex:s,slotProps:l}=e,c=$e(e,pft),[u,f]=x.useState(RE(t.value)),h=yt(),m=bn(),g=bn(),y=((O=h.slotProps)==null?void 0:O.baseSelect)||{},v=y.native??!1,w=((P=h.slotProps)==null?void 0:P.baseSelectOption)||{},C=x.useCallback(R=>{const D=RE(R.target.value);f(D),n(z({},t,{value:D}))},[n,t]);x.useEffect(()=>{f(RE(t.value))},[t.value]);const E=(l==null?void 0:l.root.label)??r.current.getLocaleText("filterPanelInputLabel"),I=l==null?void 0:l.root.slotProps;return k.jsxs(x.Fragment,{children:[k.jsxs(h.slots.baseSelect,z({fullWidth:!0,labelId:m,id:g,label:E,value:u===void 0?"":String(u),onChange:C,native:v,slotProps:{htmlInput:z({ref:o,tabIndex:s},I==null?void 0:I.htmlInput)}},y,c,l==null?void 0:l.root,{children:[k.jsx(h.slots.baseSelectOption,z({},w,{native:v,value:"",children:r.current.getLocaleText("filterValueAny")})),k.jsx(h.slots.baseSelectOption,z({},w,{native:v,value:"true",children:r.current.getLocaleText("filterValueTrue")})),k.jsx(h.slots.baseSelectOption,z({},w,{native:v,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]})),i,a]})}function RE(e){if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1}const mft=()=>[{value:"is",getApplyFilterFn:e=>{const t=RE(e.value);return t===void 0?null:n=>!!n===t},InputComponent:hft}],gft=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),yft=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},gfe=z({},Gl,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:lft,renderEditCell:fft,sortComparator:Zde,valueFormatter:gft,filterOperators:mft(),getApplyQuickFilterFn:()=>null,aggregable:!1,pastedValueParser:e=>yft(e)});function VP(e){for(const t in e)return!1;return!0}const yfe=Qr(e=>e.sorting),Hv=Pt(yfe,e=>e.sortedRows),YV=Yn(Hv,Us,Si,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];if(i)r.push({id:o,model:i});else{const a=n[o];a&&Yy(a)&&r.push({id:o,model:{[Ky]:o}})}return r},[])),Ns=Pt(yfe,e=>e.sortModel),vft=Yn(Ns,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{}));Yn(Hv,e=>e.reduce((t,n,r)=>(t[n]=r,t),Object.create(null)));const HP=Qr(e=>e.filter),jo=Pt(HP,e=>e.filterModel),vfe=Pt(jo,e=>e.quickFilterValues),bft=Qr(e=>e.visibleRowsLookup),Uv=Pt(HP,e=>e.filteredRowsLookup);Pt(HP,e=>e.filteredChildrenCountLookup);Pt(HP,e=>e.filteredDescendantCountLookup);const Qf=Yn(bft,YV,(e,t)=>VP(e)?t:t.filter(n=>e[n.id]!==!1)),Hg=Yn(Qf,e=>e.map(t=>t.id)),bfe=Yn(Uv,YV,(e,t)=>VP(e)?t:t.filter(n=>e[n.id]!==!1)),xfe=Yn(bfe,e=>e.map(t=>t.id));Yn(Hg,Si,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const Sfe=Yn(Qf,Si,jv,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),QV=Pt(Qf,e=>e.length),XV=Pt(Sfe,e=>e.length),wfe=Pt(bfe,e=>e.length);Pt(wfe,XV,(e,t)=>e-t);const JV=Yn(jo,ld,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),xft=Yn(JV,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),Al=Qr(e=>e.rowSelection),Uw=Yn(Al,Jd),UP=Pt(Al,wfe,(e,t)=>e.type==="include"?e.ids.size:t-e.ids.size),Cfe=Yn(Al,Us,Gp,(e,t,n)=>{const r=new Map;if(e.type==="include")for(const o of e.ids)r.set(o,t[o]);else for(let o=0;o<n.length;o+=1){const i=n[o];e.ids.has(i)||r.set(i,t[i])}return r});function Efe(e,t){var l;const n=Si(e),r=Hv(e),o=Uv(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;c<r.length&&((l=n[r[c]])==null?void 0:l.depth)>i.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function Sft(e,t){return Pt(Si,Hv,Uv,Uw,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i.has(e)};if(i.has(e))return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(f=>f===e)+1;for(let f=c;f<r.length&&((u=n[r[f]])==null?void 0:u.depth)>a.depth;f+=1){const h=r[f];o[h]!==!1&&(s+=1,i.has(h)&&(l+=1))}return{isIndeterminate:l>0&&(l<s||!i.has(e)),isChecked:t?l>0:i.has(e)}})}function ZV(e){return e.signature===Vl.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const wft=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==ii;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},Cft=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a]!==!1)},S0=(e,t,n,r,o,i,a=Uw(e))=>{const s=Uv(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&Efe(e,n).forEach(f=>{i(f),l.add(f)})}if(o){const c=f=>{if(!a.has(f)&&!l.has(f))return!1;const h=t[f];return h?h.type!=="group"?!0:h.children.every(c):!1},u=f=>{const h=Cft(t,s,f);if(h.length===0||h.every(c)){const m=t[f],g=m==null?void 0:m.parent;g!=null&&g!==ii&&e.current.isRowSelectable(g)&&(i(g),l.add(g),u(g))}};u(n)}}},AJ=(e,t,n,r,o,i)=>{const a=Uw(e);if(!(!o&&!r)&&(o&&wft(t,n).forEach(l=>{a.has(l)&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&Efe(e,n).forEach(c=>{i(c)})}},Eft=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],Tft=e=>{const{classes:t}=e;return Me({root:["checkboxInput"]},Cn,t)},Oft=Vt(function(t,n){var E,I;const{field:r,id:o,rowNode:i,tabIndex:a}=t,s=$e(t,Eft),l=tn(),c=yt(),u={classes:c.classes},f=Tft(u),h=O=>{const P={value:O.target.checked,id:o};l.current.publishEvent("rowSelectionCheckboxChange",P,O)};x.useLayoutEffect(()=>{if(a===0){const O=l.current.getCellElement(o,r);O&&(O.tabIndex=-1)}},[l,a,o,r]);const m=x.useCallback(O=>{O.key===" "&&O.stopPropagation()},[]),g=l.current.isRowSelectable(o),y=Sft(o,((E=c.rowSelectionPropagation)==null?void 0:E.parents)??!1),{isIndeterminate:v,isChecked:w}=Ge(l,y,void 0,zV);if(i.type==="footer"||i.type==="pinnedRow")return null;const C=l.current.getLocaleText(w&&!v?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return k.jsx(c.slots.baseCheckbox,z({tabIndex:a,checked:w&&!v,onChange:h,className:f.root,slotProps:{htmlInput:{"aria-label":C,name:"select_row"}},onKeyDown:m,indeterminate:v,disabled:!g},(I=c.slotProps)==null?void 0:I.baseCheckbox,s,{ref:n}))}),Ift=Oft,GP=Qr(e=>e.focus),va=Pt(GP,e=>e.cell),Pft=Pt(GP,e=>e.columnHeader);Pt(GP,e=>e.columnHeaderFilter);const CO=Pt(GP,e=>e.columnGroupHeader),qP=Qr(e=>e.tabIndex),eH=Pt(qP,e=>e.cell),Tfe=Pt(qP,e=>e.columnHeader);Pt(qP,e=>e.columnHeaderFilter);const Aft=Pt(qP,e=>e.columnGroupHeader),Mft=100,Rft=e=>e?0:100,Ofe=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,Ife=e=>({page:0,pageSize:e?0:100}),Dft=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),Pfe=(e,t)=>{if(t===Vl.DataGrid&&e>Mft)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
-`))},kft=-1,Gw=Qr(e=>e.pagination),Afe=Pt(Gw,e=>e.enabled&&e.paginationMode==="client"),ri=Pt(Gw,e=>e.paginationModel),Tg=Pt(Gw,e=>e.rowCount),H0=Pt(Gw,e=>e.meta),_ft=Pt(ri,e=>e.page),Mfe=Pt(ri,e=>e.pageSize),Rfe=Pt(ri,Tg,(e,t)=>Ofe(t,e.pageSize,e.page)),tH=Yn(Afe,ri,Si,jv,Qf,Sfe,(e,t,n,r,o,i)=>{var g;if(!e)return null;const a=i.length,s=Math.min(t.pageSize*t.page,a-1),l=t.pageSize===kft?a-1:Math.min(s+t.pageSize-1,a-1);if(s===-1||l===-1)return null;if(r<2)return{firstRowIndex:s,lastRowIndex:l};const c=i[s],u=l-s+1,f=o.findIndex(y=>y.id===c.id);let h=f,m=0;for(;h<o.length&&m<=u;){const y=o[h],v=(g=n[y.id])==null?void 0:g.depth;v===void 0?h+=1:((m<u||v>0)&&(h+=1),v===0&&(m+=1))}return{firstRowIndex:f,lastRowIndex:h-1}}),$ft=Yn(Qf,tH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Dfe=Yn(Hg,tH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),qw=Yn(Afe,tH,$ft,Qf,(e,t,n,r)=>e?{rows:n,range:t,rowIdToIndexMap:n.reduce((o,i,a)=>(o.set(i.id,a),o),new Map)}:{rows:r,range:r.length===0?null:{firstRowIndex:0,lastRowIndex:r.length-1},rowIdToIndexMap:r.reduce((o,i,a)=>(o.set(i.id,a),o),new Map)}),Nft=["field","colDef"],Lft=e=>{const{classes:t}=e;return Me({root:["checkboxInput"]},Cn,t)},Fft=Vt(function(t,n){var R;const r=$e(t,Nft),[,o]=x.useState(!1),i=tn(),a=yt(),s={classes:a.classes},l=Lft(s),c=Ge(i,Tfe),u=Ge(i,Al),f=Ge(i,Hg),h=Ge(i,Dfe),m=x.useMemo(()=>{const D=a.isRowSelectable;if(typeof D!="function"||u.type==="exclude")return u;const M={type:"include",ids:new Set};for(const A of u.ids)a.keepNonExistentRowsSelected&&M.ids.add(A),i.current.getRow(A)&&D(i.current.getRowParams(A))&&M.ids.add(A);return M},[i,a.isRowSelectable,a.keepNonExistentRowsSelected,u]),g=x.useMemo(()=>{const D=!a.pagination||!a.checkboxSelectionVisibleOnly||a.paginationMode==="server"?f:h,M=new Set;for(let A=0;A<D.length;A+=1){const _=D[A];i.current.isRowSelectable(_)&&M.add(_)}return M},[i,a.pagination,a.paginationMode,a.checkboxSelectionVisibleOnly,h,f]),y=x.useMemo(()=>{const D=Jd(m);let M=0;for(const A of g)D.has(A)&&(M+=1);return M},[m,g]),v=x.useMemo(()=>{if(m.ids.size===0)return!1;const D=Jd(m);for(const M of g)if(!D.has(M))return!0;return!1},[m,g]),w=y>0,C=D=>{const M={value:D.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",M)},E=c!==null&&c.field===t.field?0:-1;x.useLayoutEffect(()=>{const D=i.current.getColumnHeaderElement(t.field);E===0&&D&&(D.tabIndex=-1)},[E,i,t.field]);const I=x.useCallback(D=>{D.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!w})},[i,w]),O=x.useCallback(()=>{o(D=>!D)},[]);x.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",O),[i,O]);const P=i.current.getLocaleText(w&&!v?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return k.jsx(a.slots.baseCheckbox,z({indeterminate:v,checked:w&&!v,onChange:C,className:l.root,slotProps:{htmlInput:{"aria-label":P,name:"select_all_rows"}},tabIndex:E,onKeyDown:I,disabled:!ZV(a)},(R=a.slotProps)==null?void 0:R.baseCheckbox,r,{ref:n}))}),Ww=Qr((e,t)=>Ky in t?t[Ky]:e.props.getRowId?e.props.getRowId(t):t.id),wu="__check__",Gv=z({},gfe,{type:"custom",field:wu,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,n,r)=>{const o=Ww(r,t);return r.current.isRowSelected(o)},renderHeader:e=>k.jsx(Fft,z({},e)),renderCell:e=>k.jsx(Ift,z({},e))}),jft=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function MJ(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function ng(e){var O;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a,headerFilterMenu:s,clearButton:l,tabIndex:c,disabled:u}=e,f=$e(e,jft),h=a==null?void 0:a.root.slotProps,m=ko(),[g,y]=x.useState(()=>MJ(t.value,r)),[v,w]=x.useState(!1),C=bn(),E=yt(),I=x.useCallback(P=>{m.clear();const R=P.target.value;y(R),w(!0),m.start(E.filterDebounceMs,()=>{const D=new Date(R);n(z({},t,{value:Number.isNaN(D.getTime())?void 0:D})),w(!1)})},[n,t,E.filterDebounceMs,m]);return x.useEffect(()=>{const P=MJ(t.value,r);y(P)},[t.value,r]),k.jsxs(x.Fragment,{children:[k.jsx(E.slots.baseTextField,z({fullWidth:!0,id:C,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:g,onChange:I,type:r||"text",disabled:u,inputRef:i,slotProps:z({},h,{input:z({endAdornment:v?k.jsx(E.slots.loadIcon,{fontSize:"small",color:"action"}):null},h==null?void 0:h.input),htmlInput:z({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:c},h==null?void 0:h.htmlInput)})},(O=E.slotProps)==null?void 0:O.baseTextField,f,a==null?void 0:a.root)),s,l]})}function rg(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const kfe=e=>[{value:"is",getApplyFilterFn:t=>rg(t,(n,r)=>n===r,e),InputComponent:ng,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>rg(t,(n,r)=>n!==r,e),InputComponent:ng,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>rg(t,(n,r)=>n>r,e),InputComponent:ng,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>rg(t,(n,r)=>n>=r,e),InputComponent:ng,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>rg(t,(n,r)=>n<r,e,!e),InputComponent:ng,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:t=>rg(t,(n,r)=>n<=r,e),InputComponent:ng,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],Bft=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],zft=ae(sd)({fontSize:"inherit"}),Vft=e=>{const{classes:t}=e;return Me({root:["editInputCell"]},Cn,t)};function Hft(e){var I,O;const{id:t,value:n,field:r,colDef:o,hasFocus:i,onValueChange:a,slotProps:s}=e,l=$e(e,Bft),c=o.type==="dateTime",u=tn(),f=x.useRef(null),h=x.useMemo(()=>{let P;n==null?P=null:n instanceof Date?P=n:P=new Date((n??"").toString());let R;return P==null||Number.isNaN(P.getTime())?R="":R=new Date(P.getTime()-P.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:P,formatted:R}},[n,c]),[m,g]=x.useState(h),y=yt(),v={classes:y.classes},w=Vft(v),C=x.useCallback(P=>{if(P==="")return null;const[R,D]=P.split("T"),[M,A,_]=R.split("-"),N=new Date;if(N.setFullYear(Number(M),Number(A)-1,Number(_)),N.setHours(0,0,0,0),D){const[B,H]=D.split(":");N.setHours(Number(B),Number(H),0,0)}return N},[]),E=x.useCallback(async P=>{const R=P.target.value,D=C(R);a&&await a(P,D),g({parsed:D,formatted:R}),u.current.setEditCellValue({id:t,field:r,value:D},P)},[u,r,t,a,C]);return x.useEffect(()=>{g(P=>{var R,D;return h.parsed!==P.parsed&&((R=h.parsed)==null?void 0:R.getTime())!==((D=P.parsed)==null?void 0:D.getTime())?h:P})},[h]),In(()=>{i&&f.current.focus()},[i]),k.jsx(zft,z({as:y.slots.baseInput,inputRef:f,fullWidth:!0,className:w.root,type:c?"datetime-local":"date",value:m.formatted,onChange:E},l,s==null?void 0:s.root,{slotProps:{htmlInput:z({max:c?"9999-12-31T23:59":"9999-12-31"},(O=(I=s==null?void 0:s.root)==null?void 0:I.slotProps)==null?void 0:O.htmlInput)}}))}const _fe=e=>k.jsx(Hft,z({},e));function $fe({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(`
-`))}const Uft=(e,t,n,r)=>{if(!e)return"";const o=Ww(r,t);return $fe({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},Gft=(e,t,n,r)=>{if(!e)return"";const o=Ww(r,t);return $fe({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},qft=z({},Gl,{type:"date",sortComparator:efe,valueFormatter:Uft,filterOperators:kfe(),renderEditCell:_fe,pastedValueParser:e=>new Date(e)}),Wft=z({},Gl,{type:"dateTime",sortComparator:efe,valueFormatter:Gft,filterOperators:kfe(!0),renderEditCell:_fe,pastedValueParser:e=>new Date(e)}),Wd=e=>e==null?null:Number(e),Kft=e=>e==null||Number.isNaN(e)||e===""?null:t=>Wd(t)===Wd(e),Yft=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Wd(t)===e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Wd(t)!==e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Wd(t)>e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Wd(t)>=e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Wd(t)<e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Wd(t)<=e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:nfe,InputComponentProps:{type:"number"}}],Qft=z({},Gl,{type:"number",align:"right",headerAlign:"right",sortComparator:Zde,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>Sdt(e)?e.toLocaleString():e||"",filterOperators:Yft(),getApplyQuickFilterFn:Kft});function Qy(e){return(e==null?void 0:e.type)==="singleSelect"}function Mh(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(z({field:e.field},t)):e.valueOptions}function EO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const Xft=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function Jft(e){return!!e.key}function Zft(e){var A,_;const t=yt(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===zc.Cell,slotProps:f}=e,h=$e(e,Xft),m=tn(),g=x.useRef(null),y=x.useRef(null),[v,w]=x.useState(u),E=(((A=t.slotProps)==null?void 0:A.baseSelect)||{}).native??!1;if(In(()=>{var N;s&&((N=y.current)==null||N.focus())},[s]),!Qy(a))return null;const I=Mh(a,{id:n,row:i});if(!I)return null;const O=a.getOptionValue,P=a.getOptionLabel,R=async N=>{if(!Qy(a)||!I)return;w(!1);const B=N.target,H=EO(B.value,I,O);c&&await c(N,H),await m.current.setEditCellValue({id:n,field:o,value:H},N)},D=(N,B)=>{if(t.editMode===zc.Row){w(!1);return}if(B==="backdropClick"||N.key==="Escape"){const H=m.current.getCellParams(n,o);m.current.publishEvent("cellEditStop",z({},H,{reason:N.key==="Escape"?Cl.escapeKeyDown:Cl.cellFocusOut}))}},M=N=>{Jft(N)&&N.key==="Enter"||w(!0)};return!I||!a?null:k.jsx(t.slots.baseSelect,z({ref:g,value:r,onChange:R,open:v,onOpen:M,onClose:D,error:l,native:E,fullWidth:!0,slotProps:{htmlInput:{ref:y}}},h,f==null?void 0:f.root,(_=t.slotProps)==null?void 0:_.baseSelect,{children:I.map(N=>{var H;const B=O(N);return x.createElement(t.slots.baseSelectOption,z({},((H=t.slotProps)==null?void 0:H.baseSelectOption)||{},{native:E,key:B,value:B}),P(N))})}))}const ept=e=>k.jsx(Zft,z({},e)),tpt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],npt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...Mh(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),x.createElement(t,z({},i,{native:o,key:l,value:l}),c)});function RJ(e){var P,R,D,M,A;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,tabIndex:a,clearButton:s,headerFilterMenu:l,slotProps:c}=e,u=$e(e,tpt),f=t.value??"",h=bn(),m=bn(),g=yt(),y=((R=(P=g.slotProps)==null?void 0:P.baseSelect)==null?void 0:R.native)??!1;let v=null;if(t.field){const _=o.current.getColumn(t.field);Qy(_)&&(v=_)}const w=v==null?void 0:v.getOptionValue,C=v==null?void 0:v.getOptionLabel,E=x.useMemo(()=>Mh(v),[v]),I=x.useCallback(_=>{let N=_.target.value;N=EO(N,E,w),n(z({},t,{value:N}))},[E,w,n,t]);if(!Qy(v))return null;const O=(c==null?void 0:c.root.label)??o.current.getLocaleText("filterPanelInputLabel");return k.jsxs(x.Fragment,{children:[k.jsx(g.slots.baseSelect,z({fullWidth:!0,id:h,label:O,labelId:m,value:f,onChange:I,slotProps:{htmlInput:z({tabIndex:a,ref:i,type:r||"text",placeholder:(c==null?void 0:c.root.placeholder)??o.current.getLocaleText("filterPanelInputPlaceholder")},(D=c==null?void 0:c.root.slotProps)==null?void 0:D.htmlInput)},native:y},(M=g.slotProps)==null?void 0:M.baseSelect,u,c==null?void 0:c.root,{children:npt({column:v,OptionComponent:g.slots.baseSelectOption,getOptionLabel:C,getOptionValue:w,isSelectNative:y,baseSelectOptionProps:(A=g.slotProps)==null?void 0:A.baseSelectOption})})),l,s]})}const rpt=["item","applyValue","type","apiRef","focusElementRef","slotProps"];function opt(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a}=e,s=$e(e,rpt),l=bn(),c=yt();let u=null;if(t.field){const C=o.current.getColumn(t.field);Qy(C)&&(u=C)}const f=u==null?void 0:u.getOptionValue,h=u==null?void 0:u.getOptionLabel,m=x.useCallback((C,E)=>f(C)===f(E),[f]),g=x.useMemo(()=>Mh(u)||[],[u]),y=x.useMemo(()=>Array.isArray(t.value)?t.value.reduce((C,E)=>{const I=g.find(O=>f(O)===E);return I!=null&&C.push(I),C},[]):[],[f,t.value,g]),v=x.useCallback((C,E)=>{n(z({},t,{value:E.map(f)}))},[n,t,f]),w=c.slots.baseAutocomplete;return k.jsx(w,z({multiple:!0,options:g,isOptionEqualToValue:m,id:l,value:y,onChange:v,getOptionLabel:h,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:r||"text",inputRef:i}}},s,a==null?void 0:a.root))}const og=e=>e==null||!GV(e)?e:e.value,ipt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>og(t)===og(e.value),InputComponent:RJ},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>og(t)!==og(e.value),InputComponent:RJ},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(og);return n=>t.includes(og(n))},InputComponent:opt}],apt=e=>typeof e[0]=="object",spt=e=>GV(e)?e.value:e,lpt=e=>GV(e)?e.label:String(e),cpt=z({},Gl,{type:"singleSelect",getOptionLabel:lpt,getOptionValue:spt,valueFormatter(e,t,n,r){const o=Ww(r,t);if(!Qy(n))return"";const i=Mh(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!apt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:ept,filterOperators:ipt(),pastedValueParser:(e,t,n)=>{const r=n,o=Mh(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),upt="string",dpt=()=>({string:Gl,number:Qft,date:qft,dateTime:Wft,boolean:gfe,singleSelect:cpt,[jP]:Zdt,custom:Gl}),nH=Qr(e=>e.headerFiltering),fpt=Pt(nH,e=>(e==null?void 0:e.enabled)??!1),ppt=Pt(nH,e=>e.editing),hpt=Pt(nH,e=>e.menuOpen),WP=Qr(e=>e.columnGrouping),Nfe=Yn(WP,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),Lfe=Yn(WP,e=>(e==null?void 0:e.lookup)??{}),mpt=Yn(WP,e=>(e==null?void 0:e.headerStructure)??[]),Kw=Pt(WP,e=>(e==null?void 0:e.maxDepth)??0),Ffe=["maxWidth","minWidth","width","flex"],g$=dpt();function gpt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;u<n.length;u+=1){const f=n[u];if(o.all[f.field]&&o.all[f.field].frozen===!0)continue;let m=s/l*f.flex;m<f.minWidth?(c+=f.minWidth-m,m=f.minWidth,a.min[f.field]=!0):m>f.maxWidth&&(c+=f.maxWidth-m,m=f.maxWidth,a.max[f.field]=!0),o.all[f.field]={frozen:!1,computedWidth:m,flex:f.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const nj=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,f=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,f=!0):u=Za(c.width||Gl.width,c.minWidth||Gl.minWidth,c.maxWidth||Gl.maxWidth),o+=u),c.computedWidth!==u&&(c=z({},c,{computedWidth:u})),f&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=gpt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return z({},e,{lookup:n})},ypt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u<n.length;u+=1){const f=n[u];e.lookup[f]&&(i[f]=!0,a.push(f))}const s=a.length===0?e.orderedFields:[...a,...e.orderedFields.filter(u=>!i[u])],l=z({},e.lookup);for(let u=0;u<o.length;u+=1){const f=o[u],h=z({},l[f],{hasBeenResized:!0});Object.entries(r[f]).forEach(([m,g])=>{h[m]=g===-1?1/0:g}),l[f]=h}return z({},e,{orderedFields:s,lookup:l})};function y$(e){let t=g$[upt];return e&&g$[e]&&(t=g$[e]),t}const dg=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=Nl(e),keepOnlyColumnsToUpsert:o=!1,updateInitialVisibilityModel:i=!1})=>{var f,h;const a=!e.current.state.columns;let s;if(a)s={orderedFields:[],lookup:{},columnVisibilityModel:r,initialColumnVisibilityModel:r};else{const m=Hl(e);s={orderedFields:o?[]:[...m.orderedFields],lookup:z({},m.lookup),columnVisibilityModel:r,initialColumnVisibilityModel:i?r:m.initialColumnVisibilityModel}}let l={};o&&!a&&(l=Object.keys(s.lookup).reduce((m,g)=>z({},m,{[g]:!1}),{})),t.forEach(m=>{const{field:g}=m;l[g]=!0;let y=s.lookup[g];y==null?(y=z({},y$(m.type),{field:g,hasBeenResized:!1}),s.orderedFields.push(g)):o&&s.orderedFields.push(g),y&&y.type!==m.type&&(y=z({},y$(m.type),{field:g}));let v=y.hasBeenResized;Ffe.forEach(w=>{m[w]!==void 0&&(v=!0,m[w]===-1&&(m[w]=1/0))}),s.lookup[g]=ch(y,z({},y$(m.type),m,{hasBeenResized:v}))}),o&&!a&&Object.keys(s.lookup).forEach(m=>{l[m]||delete s.lookup[m]});const c=e.current.unstable_applyPipeProcessors("hydrateColumns",s),u=ypt(c,n);return nj(u,((h=(f=e.current).getRootDimensions)==null?void 0:h.call(f))??void 0)};function vpt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a<r;a+=1)if(o[a]){const l=o[a].id,c=t.current.unstable_getCellColSpanInfo(l,e);c&&c.spannedByColSpan&&(i=c.leftVisibleCellIndex)}return i}function rH(e,t){if(t.listView)return 0;const n=Fv(e),r=Kw(e),o=fpt(e),i=Math.floor(t.columnHeaderHeight*n),a=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*n),s=o?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*n):0;return i+a*r+s}const DJ=1,bpt=1.5,xpt=e=>{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return Me(r,Cn,n)},Spt=Nn("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${ee["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${ee["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${ee["scrollArea--left"]}`]:{left:0},[`&.${ee["scrollArea--right"]}`]:{right:0}})),wpt=Pt(dr,(e,t)=>t==="left"?e.leftPinnedWidth:t==="right"?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0);function Cpt(e){const t=tn(),[n,r]=x.useState(!1);return At(t,"columnHeaderDragStart",()=>r(!0)),At(t,"columnHeaderDragEnd",()=>r(!1)),n?k.jsx(Ept,z({},e)):null}function Ept(e){const{scrollDirection:t,scrollPosition:n}=e,r=x.useRef(null),o=tn(),i=ko(),a=Ge(o,Fv),s=Ge(o,NP),l=Ge(o,wpt,t),c=()=>{const I=dr(o);if(t==="left")return n.current.left>0;if(t==="right"){const O=s-I.viewportInnerSize.width;return n.current.left<O}return!1},[u,f]=x.useState(c),h=yt(),m=z({},h,{scrollDirection:t}),g=xpt(m),y=rH(o,h),v=Math.floor(h.columnHeaderHeight*a),w={height:v,top:y-v};t==="left"?w.left=l:t==="right"&&(w.right=l);const C=()=>{f(c)},E=Je(I=>{let O;if(I.preventDefault(),t==="left")O=I.clientX-r.current.getBoundingClientRect().right;else if(t==="right")O=Math.max(1,I.clientX-r.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");O=(O-DJ)*bpt+DJ,i.start(0,()=>{o.current.scroll({left:n.current.left+O,top:n.current.top})})});return At(o,"scrollPositionChange",C),u?k.jsx(Spt,{ref:r,className:fe(g.root),ownerState:m,onDragOver:E,style:w}):null}const kJ=ad(Cpt),jfe=x.createContext(void 0);function fs(){const e=x.useContext(jfe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
-`));return e}const Tpt=()=>{},Opt=(e,t)=>{const n=x.useRef(!1);In(()=>n.current||!e?Tpt:(n.current=!0,t()),[n.current||e])};function yn(e,t,n){const r=x.useRef(!0);In(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function Qo(e,t){const n=x.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const Bfe=(e,t,n,r,o)=>{const i=Qo(e,"useNativeEventListener");sr(e,"rootMount",()=>{const a=t();if(!(!a||!n))return i.debug(`Binding native ${n} event`),a.addEventListener(n,r,o),()=>{i.debug(`Clearing native ${n} event`),a.removeEventListener(n,r,o)}})},Yw=e=>{const t=x.useRef(!0);t.current&&(t.current=!1,e())},bf=(e,t)=>qw(e),oH=(e,t)=>Ge(e,qw),Ipt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",Ppt=Ipt.includes("firefox"),Qw=Qr(e=>e.rowsMeta),KP=Qr(e=>e.virtualization);Pt(KP,e=>e.enabled);const zfe=Pt(KP,e=>e.enabledForColumns),Apt=Pt(KP,e=>e.enabledForRows),Xw=Pt(KP,e=>e.renderContext),Mpt=Yn(e=>e.current.state.virtualization.renderContext.firstColumnIndex,e=>e.current.state.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),rj={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},Rpt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return z({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:rj}})};function Dpt(e,t){const n=i=>{e.current.setState(a=>z({},a,{virtualization:z({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};yn(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>z({},a,{virtualization:z({},a.virtualization,{enabledForColumns:i})}))}},"public"),x.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const iH=Qr(e=>e.rowSpanning),Vfe=Pt(iH,e=>e.hiddenCells),kpt=Pt(iH,e=>e.spannedCells),_pt=Pt(iH,e=>e.hiddenCellOriginMap),Xy=Qr(e=>e.listViewColumn),$pt=Pt(va,Xw,qw,Yr,(e,t,n,r)=>{if(!e)return!1;const o=n.rowIdToIndexMap.get(e.id),i=r.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex(s=>s.field===e.field);return!(o!==void 0&&i!==-1&&o>=t.firstRowIndex&&o<=t.lastRowIndex)}),Hfe=Yn($pt,Yr,qw,va,(e,t,n,r)=>{if(!e)return null;const o=n.rowIdToIndexMap.get(r.id);if(o===void 0)return null;const i=t.findIndex(a=>a.field===r.field);return i===-1?null:z({},r,{rowIndex:o,columnIndex:i})});function Og(e,t){return Math.round(e*10**t)/10**t}const TO=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent),v$=50;var wo=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(wo||{});const _J={top:0,left:0},Npt=Object.freeze(new Map),Lpt=(e,t,n,r,o)=>({direction:wo.NONE,buffer:Gfe(e,wo.NONE,t,n,r,o)}),Fpt=()=>{var oe;const e=fs(),t=yt(),{listView:n}=t,r=Ge(e,()=>n?[Xy(e)]:Yr(e)),o=Ge(e,Apt)&&!TO,i=Ge(e,zfe)&&!TO,a=Ge(e,Bv),s=Vv(e),l=n?wO:s,c=a.bottom.length>0,[u,f]=x.useState(Npt),h=vr(),m=Ge(e,Uw),g=oH(e),y=e.current.mainElementRef,v=e.current.virtualScrollerRef,w=e.current.virtualScrollbarVerticalRef,C=e.current.virtualScrollbarHorizontalRef,E=Ge(e,kdt),I=x.useRef(!1),O=Ge(e,VV),P=Ge(e,jut),R=Ge(e,NP),D=Ge(e,jpt),M=Ge(e,Wde),A=Ge(e,qde),_=x.useRef(null),N=x.useCallback(ue=>{if(y.current=ue,!ue)return;const pe=ue.getBoundingClientRect();let Ee={width:Og(pe.width,1),height:Og(pe.height,1)};if((!_.current||Ee.width!==_.current.width&&Ee.height!==_.current.height)&&(_.current=Ee,e.current.publishEvent("resize",Ee)),typeof ResizeObserver>"u")return;const xe=new ResizeObserver(Re=>{const he=Re[0];if(!he)return;const Pe={width:Og(he.contentRect.width,1),height:Og(he.contentRect.height,1)};Pe.width===Ee.width&&Pe.height===Ee.height||(e.current.publishEvent("resize",Pe),Ee=Pe)});if(xe.observe(ue),Fde>=19)return()=>{y.current=null,xe.disconnect()}},[e,y]),B=x.useRef(((oe=t.initialState)==null?void 0:oe.scroll)??_J),H=x.useRef(!1),j=x.useRef(_J),L=x.useRef(rj),V=Ge(e,Xw),W=Ge(e,Hfe),K=ko(),G=x.useRef(void 0),q=Xl(()=>Lpt(h,t.rowBufferPx,t.columnBufferPx,O*15,v$*6)).current,Y=x.useCallback(ue=>{if(Vpt(ue,e.current.state.virtualization.renderContext))return;const pe=ue.firstRowIndex!==L.current.firstRowIndex||ue.lastRowIndex!==L.current.lastRowIndex;e.current.setState(xe=>z({},xe,{virtualization:z({},xe.virtualization,{renderContext:ue})})),dr(e).isReady&&pe&&(L.current=ue,e.current.publishEvent("renderedRowsIntervalChange",ue)),j.current=B.current},[e]),Z=Je(()=>{const ue=v.current;if(!ue)return;const pe=dr(e),Ee=Math.ceil(pe.minimumSize.height-pe.viewportOuterSize.height),xe=Math.ceil(pe.minimumSize.width-pe.viewportInnerSize.width),Re={top:Za(ue.scrollTop,0,Ee),left:h?Za(ue.scrollLeft,-xe,0):Za(ue.scrollLeft,0,xe)},he=Re.left-B.current.left,Pe=Re.top-B.current.top,ve=he!==0||Pe!==0;B.current=Re;const Ie=ve?Hpt(he,Pe):wo.NONE,te=Math.abs(B.current.top-j.current.top),Te=Math.abs(B.current.left-j.current.left),De=te>=O||Te>=v$,Ve=q.direction!==Ie;if(!(De||Ve))return V;if(Ve)switch(Ie){case wo.NONE:case wo.LEFT:case wo.RIGHT:G.current=void 0;break;default:G.current=V;break}q.direction=Ie,q.buffer=Gfe(h,Ie,t.rowBufferPx,t.columnBufferPx,O*15,v$*6);const rt=$J(e,t,o,i),ut=NJ(rt,B.current,q);return ew.flushSync(()=>{Y(ut)}),K.start(1e3,Z),ut}),ie=()=>{if(!dr(e).isReady&&(o||i))return;const ue=$J(e,t,o,i),pe=NJ(ue,B.current,q);G.current=void 0,Y(pe)},se=Je(()=>{if(H.current){H.current=!1;return}const ue=Z();e.current.publishEvent("scrollPositionChange",{top:B.current.top,left:B.current.left,renderContext:ue})}),ce=Je(ue=>{e.current.publishEvent("virtualScrollerWheel",{},ue)}),ye=Je(ue=>{e.current.publishEvent("virtualScrollerTouchMove",{},ue)}),Se=(ue={})=>{var rt;if(!ue.rows&&!g.range)return[];const pe=Si(e);let Ee=V;ue.renderContext&&(Ee=ue.renderContext,Ee.firstColumnIndex=V.firstColumnIndex,Ee.lastColumnIndex=V.lastColumnIndex);const xe=!c&&ue.position===void 0||c&&ue.position==="bottom",Re=ue.position!==void 0;let he;switch(ue.position){case"top":he=0;break;case"bottom":he=a.top.length+g.rows.length;break;case void 0:he=a.top.length;break}const Pe=ue.rows??g.rows,ve=Ee.firstRowIndex,Ie=Math.min(Ee.lastRowIndex,Pe.length),te=ue.rows?xJ(0,ue.rows.length):xJ(ve,Ie);let Te=-1;!Re&&W&&(W.rowIndex<ve&&(te.unshift(W.rowIndex),Te=W.rowIndex),W.rowIndex>Ie&&(te.push(W.rowIndex),Te=W.rowIndex));const De=[],Ve=(rt=t.slotProps)==null?void 0:rt.row,We=Yf(e);return te.forEach(ut=>{var oo,Oi,Kt;const{id:Be,model:et}=Pe[ut];if(!pe[Be])return;const Le=(((oo=g==null?void 0:g.range)==null?void 0:oo.firstRowIndex)||0)+he+ut;if(E){const un=l.left.length,gt=r.length-l.right.length;e.current.calculateColSpan({rowId:Be,minFirstColumn:un,maxLastColumn:gt,columns:r}),l.left.length>0&&e.current.calculateColSpan({rowId:Be,minFirstColumn:0,maxLastColumn:l.left.length,columns:r}),l.right.length>0&&e.current.calculateColSpan({rowId:Be,minFirstColumn:r.length-l.right.length,maxLastColumn:r.length,columns:r})}const It=e.current.rowHasAutoHeight(Be)?"auto":e.current.unstable_getRowHeight(Be),Lt=m.has(Be)&&e.current.isRowSelectable(Be);let nt=!1;ue.position===void 0&&(nt=ut===0);let lt=!1;const vt=ut===Pe.length-1;if(xe)if(Re)lt=vt;else{const un=g.rows.length-1;ut===un&&(lt=!0)}let bt=Ee;G.current&&ut>=G.current.firstRowIndex&&ut<G.current.lastRowIndex&&(bt=G.current);const vn=ut===Te,kn=(W==null?void 0:W.rowIndex)===Le,Rr=Ufe(We,bt,l.left.length),nr=vt&&ue.position==="top",Bn=bt.firstColumnIndex,yo=bt.lastColumnIndex;if(De.push(k.jsx(t.slots.row,z({row:et,rowId:Be,index:Le,selected:Lt,offsetLeft:Rr,columnsTotalWidth:R,rowHeight:It,pinnedColumns:l,visibleColumns:r,firstColumnIndex:Bn,lastColumnIndex:yo,focusedColumnIndex:kn?W.columnIndex:void 0,isFirstVisible:nt,isLastVisible:lt,isNotVisible:vn,showBottomBorder:nr,scrollbarWidth:M,gridHasFiller:A},Ve),Be)),vn)return;const To=u.get(Be);To&&De.push(To),ue.position===void 0&&vt&&De.push((Kt=(Oi=e.current).getInfiniteLoadingTriggerElement)==null?void 0:Kt.call(Oi,{lastRowId:Be}))}),De},ne=x.useMemo(()=>({overflowX:!D||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[D,t.autoHeight,n]),le=x.useMemo(()=>{const ue={width:D?R:"auto",flexBasis:P,flexShrink:0};return ue.flexBasis===0&&(ue.flexBasis=pfe),ue},[R,P,D]),de=x.useCallback(ue=>{ue&&e.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:R,contentHeight:P})},[e,R,P]);return In(()=>{var ue,pe;I.current&&((pe=(ue=e.current).updateRenderContext)==null||pe.call(ue))},[e,i,o]),In(()=>{n&&(v.current.scrollLeft=0)},[n,v]),Opt(V!==rj,()=>{var ue;if(e.current.publishEvent("scrollPositionChange",{top:B.current.top,left:B.current.left,renderContext:V}),I.current=!0,(ue=t.initialState)!=null&&ue.scroll&&v.current){const pe=v.current,{top:Ee,left:xe}=t.initialState.scroll,Re={top:!(Ee>0),left:!(xe>0)};if(!Re.left&&R&&(pe.scrollLeft=xe,H.current=!0,Re.left=!0),!Re.top&&P&&(pe.scrollTop=Ee,H.current=!0,Re.top=!0),!Re.top||!Re.left){const he=e.current.subscribeEvent("virtualScrollerContentSizeChange",Pe=>{!Re.left&&Pe.columnsTotalWidth&&(pe.scrollLeft=xe,H.current=!0,Re.left=!0),!Re.top&&Pe.contentHeight&&(pe.scrollTop=Ee,H.current=!0,Re.top=!0),Re.left&&Re.top&&he()});return he}}}),e.current.register("private",{updateRenderContext:ie}),sr(e,"sortedRowsSet",ie),sr(e,"paginationModelChange",ie),sr(e,"columnsChange",ie),{renderContext:V,setPanels:f,getRows:Se,getContainerProps:()=>({ref:N}),getScrollerProps:()=>({ref:v,onScroll:se,onWheel:ce,onTouchMove:ye,style:ne,role:"presentation",tabIndex:Ppt?-1:void 0}),getContentProps:()=>({style:le,role:"presentation",ref:de}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:w,scrollPosition:B}),getScrollbarHorizontalProps:()=>({ref:C,scrollPosition:B}),getScrollAreaProps:()=>({scrollPosition:B})}};function jpt(e){return e.current.state.dimensions.viewportOuterSize.width>0&&e.current.state.dimensions.columnsTotalWidth>e.current.state.dimensions.viewportOuterSize.width}function $J(e,t,n,r){const o=dr(e),i=bf(e),a=t.listView?[Xy(e)]:Yr(e),s=_pt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:Qw(e),columnPositions:Yf(e),rows:i.rows,range:i.range,pinnedColumns:Vv(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function NJ(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(LJ(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const f=Math.min(...Object.values(c));l=Math.min(l,f)}const u=e.autoHeight?l+e.rows.length:LJ(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.listView)return z({},r,{lastColumnIndex:1});if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[f,h]=oj({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let m=f;m<h&&!u;m+=1){const g=e.rows[m];u=e.apiRef.current.rowHasAutoHeight(g.id)}(!u||e.virtualizeColumnsWithAutoRowHeight)&&(l=Rf(a,e.columnPositions,{atStart:!0,lastPosition:e.columnsTotalWidth}),c=Rf(a+e.viewportInnerWidth,e.columnPositions)),r.firstColumnIndex=l,r.lastColumnIndex=c}return Bpt(e,r,n)}function LJ(e,t,n){var a,s;const r=e.apiRef.current.getLastMeasuredRowIndex();let o=r===1/0;(a=e.range)!=null&&a.lastRowIndex&&!o&&(o=r>=e.range.lastRowIndex);const i=Za(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?Rf(t,e.rowsMeta.positions,n):zpt(t,e.rowsMeta.positions,i,n)}function Bpt(e,t,n){const[r,o]=oj({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=oj({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=vpt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function Rf(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l<a}else s=e<=a;return s?Rf(e,t,n,r,i):Rf(e,t,n,i+1,o)}function zpt(e,t,n,r=void 0){let o=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=o,o*=2;return Rf(e,t,r,Math.floor(n/2),Math.min(n,t.length))}function oj({firstIndex:e,lastIndex:t,bufferBefore:n,bufferAfter:r,minFirstIndex:o,maxLastIndex:i,positions:a,lastSize:s}){const l=a[e]-n,c=a[t]+r,u=Rf(l,a,{atStart:!0,lastPosition:a[a.length-1]+s}),f=Rf(c,a);return[Za(u,o,i),Za(f,o,i)]}function Vpt(e,t){return e===t?!0:e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}function Ufe(e,t,n){const r=(e[t.firstColumnIndex]??0)-(e[n]??0);return Math.abs(r)}function Hpt(e,t){return e===0&&t===0?wo.NONE:Math.abs(t)>=Math.abs(e)?t>0?wo.DOWN:wo.UP:e>0?wo.RIGHT:wo.LEFT}function Gfe(e,t,n,r,o,i){if(e)switch(t){case wo.LEFT:t=wo.RIGHT;break;case wo.RIGHT:t=wo.LEFT;break}switch(t){case wo.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case wo.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case wo.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case wo.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case wo.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const Upt=Nn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant"&&e!=="right"})(({overlayType:e,loadingOverlayVariant:t,right:n})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${n}px`,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),Gpt=Nn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant"})({}),qpt=e=>{const{classes:t}=e;return Me({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Cn,t)};function Wpt(e){const t=tn(),n=yt(),r=Ge(t,dr);let o=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);o===0&&(o=pfe);const i=qpt(z({},e,{classes:n.classes}));return k.jsx(Upt,z({className:fe(i.root)},e,{right:r.columnsTotalWidth-r.viewportOuterSize.width,children:k.jsx(Gpt,z({className:fe(i.inner),style:{height:o,width:r.viewportOuterSize.width}},e))}))}const aH=Qr(e=>e.pivoting),Rh=Pt(aH,e=>e==null?void 0:e.active),Kpt=new Map,qfe=Pt(aH,e=>(e==null?void 0:e.initialColumns)||Kpt);Pt(aH,e=>e==null?void 0:e.panelOpen);const Ypt=()=>{var w,C;const e=tn(),t=yt(),n=Ge(e,Hw),r=Ge(e,QV),o=Ge(e,Xde),i=Ge(e,Yr),a=n===0&&o===0,s=Ge(e,ldt),l=Ge(e,Rh),c=!s&&a,u=!s&&n>0&&r===0,f=!s&&i.length===0,h=c&&l;let m=null,g=null;c&&(m="noRowsOverlay"),f&&(m="noColumnsOverlay"),h&&(m="emptyPivotOverlay"),u&&(m="noResultsOverlay"),s&&(m="loadingOverlay",g=((C=(w=t.slotProps)==null?void 0:w.loadingOverlay)==null?void 0:C[a?"noRowsVariant":"variant"])??(a?"skeleton":"linear-progress"));const y={overlayType:m,loadingOverlayVariant:g};return{getOverlay:()=>{var O,P;if(!m)return null;const E=(O=t.slots)==null?void 0:O[m],I=(P=t.slotProps)==null?void 0:P[m];return k.jsx(Wpt,z({},y,{children:k.jsx(E,z({},I))}))},overlaysProps:y}},DE=Qr(e=>e.columnMenu);function Qpt(){var v;const e=fs(),t=yt(),n=Ge(e,Yr),r=Ge(e,xft),o=Ge(e,vft),i=Ge(e,Tfe),a=Ge(e,()=>eH(e)===null),s=Ge(e,Aft),l=Ge(e,Pft),c=Ge(e,CO),u=Ge(e,Kw),f=Ge(e,DE),h=Ge(e,Nl),m=Ge(e,mpt),g=!(s===null&&i===null&&a),y=e.current.columnHeadersContainerRef;return k.jsx(t.slots.columnHeaders,z({ref:y,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:f,columnVisibility:h,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g},(v=t.slotProps)==null?void 0:v.columnHeaders))}const Xpt=ad(Qpt),Jpt=Nn("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),Zpt=Nn("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:n,loadingOverlayVariant:r,overlayType:o}=e,i=r==="skeleton"||o==="noColumnsOverlay";return[t.main,n.hasPinnedRight&&t["main--hasPinnedRight"],i&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),eht=Vt((e,t)=>{var a;const{ownerState:n}=e,r=yt(),i=LP().hooks.useGridAriaAttributes();return k.jsxs(Zpt,z({ownerState:n,className:e.className,tabIndex:-1},i,(a=r.slotProps)==null?void 0:a.main,{ref:t,children:[k.jsx(Jpt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),tht=()=>Me({root:["topContainer"]},Cn,{}),nht=Nn("div")({position:"sticky",zIndex:40,top:0});function rht(e){const t=tht();return k.jsx(nht,z({},e,{className:fe(t.root,ee["container--top"]),role:"presentation"}))}const oht=(e,t)=>{const{classes:n}=e;return Me({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},Cn,n)},iht=Nn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScrollerContent,n.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),aht=Vt(function(t,n){var s;const r=yt(),o=!r.autoHeight&&((s=t.style)==null?void 0:s.minHeight)==="auto",i=oht(r,o),a={classes:r.classes,overflowedContent:o};return k.jsx(iht,z({},t,{ownerState:a,className:fe(i.root,t.className),ref:n}))}),sht=Nn("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Wfe=Nn("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:Ct.cell.background.pinned}),lht=Nn(Wfe)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),cht=Nn(Wfe)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),uht=Nn("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function dht({rowsLength:e}){const t=tn(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Ge(t,dr),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:k.jsxs(sht,{className:ee.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&k.jsx(lht,{className:ee["filler--pinnedLeft"],style:{width:s}}),k.jsx(uht,{}),l>0&&k.jsx(cht,{className:ee["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const fht=ad(dht),pht=["className"],hht=e=>{const{classes:t}=e;return Me({root:["virtualScrollerRenderZone"]},Cn,t)},mht=Nn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),ght=Vt(function(t,n){const{className:r}=t,o=$e(t,pht),i=tn(),a=yt(),s=hht(a),l=Ge(i,()=>{const c=Xw(i);return Qw(i).positions[c.firstRowIndex]??0});return k.jsx(mht,z({className:fe(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o,{ref:n}))}),yht={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},Bo=Qr(e=>e.editRows),Kfe=Pt(Bo,(e,{rowId:t,editMode:n})=>n===zc.Row&&!!e[t]),vht=Pt(Bo,(e,{rowId:t,field:n})=>{var r;return((r=e[t])==null?void 0:r[n])??null}),Dh=Qr(e=>e.preferencePanel),bht=Pt(Dh,(e,t)=>!!(e.open&&e.labelId===t));var oa=function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e}(oa||{});function xht(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}class Sht{constructor({ttl:t=3e5,getKey:n=xht}){this.cache=void 0,this.ttl=void 0,this.getKey=void 0,this.cache={},this.ttl=t,this.getKey=n}set(t,n){const r=this.getKey(t),o=Date.now()+this.ttl;this.cache[r]={value:n,expiry:o}}get(t){const n=this.getKey(t),r=this.cache[n];if(r){if(Date.now()>r.expiry){delete this.cache[n];return}return r.value}}clear(){this.cache={}}}class wht extends Error{constructor(t){super(t.message),this.params=void 0,this.cause=void 0,this.name="GridGetRowsError",this.params=t.params,this.cause=t.cause}}class Cht extends Error{constructor(t){super(t.message),this.params=void 0,this.cause=void 0,this.name="GridUpdateRowError",this.params=t.params,this.cause=t.cause}}const Eht=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return Me(r,Cn,n)},Yfe=Nn("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),Tht=Nn(Yfe)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),Oht=Nn(Yfe)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),FJ=Vt(function(t,n){const r=fs(),o=yt(),i=x.useRef(!1),a=x.useRef(0),s=x.useRef(null),l=x.useRef(null),c=Eht(o,t.position),u=Ge(r,dr),f=t.position==="vertical"?"height":"width",h=t.position==="vertical"?"scrollTop":"scrollLeft",m=t.position==="vertical"?"top":"left",g=t.position==="vertical"?u.hasScrollX:u.hasScrollY,y=u.minimumSize[f]+(g?u.scrollbarSize:0),w=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(y/u.viewportOuterSize[f]),C=Je(()=>{const O=s.current,P=t.scrollPosition.current;if(!O||P[m]===a.current)return;if(a.current=P[m],i.current){i.current=!1;return}i.current=!0;const R=P[m]/y;O[h]=R*w}),E=Je(()=>{const O=r.current.virtualScrollerRef.current,P=s.current;if(!P)return;if(i.current){i.current=!1;return}i.current=!0;const R=P[h]/w;O[h]=R*y});Nj(()=>{const O=r.current.virtualScrollerRef.current,P=s.current,R={passive:!0};return O.addEventListener("scroll",C,R),P.addEventListener("scroll",E,R),()=>{O.removeEventListener("scroll",C,R),P.removeEventListener("scroll",E,R)}}),x.useEffect(()=>{l.current.style.setProperty(f,`${w}px`)},[w,f]);const I=t.position==="vertical"?Tht:Oht;return k.jsx(I,{ref:en(n,s),className:c.root,style:t.position==="vertical"&&o.listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:O=>{O.target.blur()},children:k.jsx("div",{ref:l,className:c.content})})}),Iht=e=>{const{classes:t,hasScrollX:n,hasPinnedRight:r,loadingOverlayVariant:o,overlayType:i}=e;return Me({root:["main",r&&"main--hasPinnedRight",(o==="skeleton"||i==="noColumnsOverlay")&&"main--hiddenContent"],scroller:["virtualScroller",n&&"virtualScroller--hasScrollX"]},Cn,t)},Pht=Nn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScroller,n.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),Aht=e=>e.current.state.dimensions.rightPinnedWidth>0;function Mht(e){const t=tn(),n=yt(),r=Ge(t,zut),o=Ge(t,But),i=Ge(t,Aht),a=Ge(t,Gut),{getOverlay:s,overlaysProps:l}=Ypt(),c=z({classes:n.classes,hasScrollX:o,hasPinnedRight:i},l),u=Iht(c),f=Fpt(),{getContainerProps:h,getScrollerProps:m,getContentProps:g,getRenderZoneProps:y,getScrollbarVerticalProps:v,getScrollbarHorizontalProps:w,getRows:C,getScrollAreaProps:E}=f,I=C();return k.jsxs(eht,z({className:u.root},h(),{ownerState:c,children:[k.jsx(kJ,z({scrollDirection:"left"},E())),k.jsx(kJ,z({scrollDirection:"right"},E())),k.jsxs(Pht,z({className:u.scroller},m(),{ownerState:c,children:[k.jsxs(rht,{children:[!n.listView&&k.jsx(Xpt,{}),k.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:f})]}),s(),k.jsx(aht,z({},g(),{children:k.jsxs(ght,z({},y(),{children:[I,k.jsx(n.slots.detailPanels,{virtualScroller:f})]}))})),a&&k.jsx(fht,{rowsLength:I.length}),k.jsx(n.slots.bottomContainer,{children:k.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:f})})]})),o&&!n.listView&&k.jsx(FJ,z({position:"horizontal"},w())),r&&k.jsx(FJ,z({position:"vertical"},v())),e.children]}))}function Rht(){var t;const e=yt();return e.hideFooter?null:k.jsx(e.slots.footer,z({},(t=e.slotProps)==null?void 0:t.footer))}let b$;function Dht(){return b$===void 0&&document.createElement("div").focus({get preventScroll(){return b$=!0,!1}}),b$}function kht({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=z({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}const _ht=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},$ht=e=>e===mfe||_ht(e)!==null,Qfe=(e,t)=>{if(e)if(t){if(e===On.LEFT)return"right";if(e===On.RIGHT)return"left"}else{if(e===On.LEFT)return"left";if(e===On.RIGHT)return"right"}};function YP(e,t,n,r){const o=Qfe(n,t);return!o||r===void 0||(e[o]=r),e}const Nht=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],Lht=["changeReason","unstable_updateValueOnRender"];On.LEFT+"",qd.LEFT,On.RIGHT+"",qd.RIGHT,On.NONE+"",On.VIRTUAL+"";const Fht=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${Oe(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===On.LEFT&&"cell--pinnedLeft",o===On.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return Me(c,Cn,l)},jht=Vt(function(t,n){var Le,It,Lt;const{column:r,row:o,rowId:i,rowNode:a,align:s,colIndex:l,width:c,className:u,style:f,colSpan:h,disableDragEvents:m,isNotVisible:g,pinnedOffset:y,pinnedPosition:v,showRightBorder:w,showLeftBorder:C,onClick:E,onDoubleClick:I,onMouseDown:O,onMouseUp:P,onMouseOver:R,onKeyDown:D,onKeyUp:M,onDragEnter:A,onDragOver:_}=t,N=$e(t,Nht),B=fs(),H=yt(),j=vr(),L=r.field,V=Ge(B,vht,{rowId:i,field:L}),K=LP().hooks.useCellAggregationResult(i,L),G=V?Qn.Edit:Qn.View,q=B.current.getCellParamsForRow(i,L,o,{colDef:r,cellMode:G,rowNode:a,tabIndex:Ge(B,()=>{const nt=eH(B);return nt&&nt.field===L&&nt.id===i?0:-1}),hasFocus:Ge(B,()=>{const nt=va(B);return(nt==null?void 0:nt.id)===i&&nt.field===L})});q.api=B.current,K&&(q.value=K.value,q.formattedValue=r.valueFormatter?r.valueFormatter(q.value,o,r,B):q.value);const Y=Ge(B,()=>B.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:i,field:L})),Z=Ge(B,Vfe),ie=Ge(B,kpt),{hasFocus:se,isEditable:ce=!1,value:ye}=q,Se=r.type==="actions"&&((Le=r.getActions)==null?void 0:Le.call(r,B.current.getRowParams(i)).some(nt=>!nt.props.disabled)),ne=(G==="view"||!ce)&&!Se?q.tabIndex:-1,{classes:le,getCellClassName:de}=H,ue=[Ge(B,()=>B.current.unstable_applyPipeProcessors("cellClassName",[],{id:i,field:L}).filter(Boolean).join(" "))];r.cellClassName&&ue.push(typeof r.cellClassName=="function"?r.cellClassName(q):r.cellClassName),r.display==="flex"&&ue.push(ee["cell--flex"]),de&&ue.push(de(q));const pe=q.formattedValue??ye,Ee=x.useRef(null),xe=en(n,Ee),Re=x.useRef(null),he=H.cellSelection??!1,Pe={align:s,showLeftBorder:C,showRightBorder:w,isEditable:ce,classes:H.classes,pinnedPosition:v,isSelected:Y,isSelectionMode:he},ve=Fht(Pe),Ie=x.useCallback(nt=>lt=>{const vt=B.current.getCellParams(i,L||"");B.current.publishEvent(nt,vt,lt),P&&P(lt)},[B,L,P,i]),te=x.useCallback(nt=>lt=>{const vt=B.current.getCellParams(i,L||"");B.current.publishEvent(nt,vt,lt),O&&O(lt)},[B,L,O,i]),Te=x.useCallback((nt,lt)=>vt=>{if(!B.current.getRow(i))return;const bt=B.current.getCellParams(i,L||"");B.current.publishEvent(nt,bt,vt),lt&&lt(vt)},[B,L,i]),De=((It=Z[i])==null?void 0:It[L])??!1,Ve=((Lt=ie[i])==null?void 0:Lt[L])??1,We=x.useMemo(()=>{if(g)return{padding:0,opacity:0,width:0,height:0,border:0};const nt=YP(z({"--width":`${c}px`},f),j,v,y),lt=v===On.LEFT,vt=v===On.RIGHT;return Ve>1&&(nt.height=`calc(var(--height) * ${Ve})`,nt.zIndex=10,(lt||vt)&&(nt.zIndex=40)),nt},[c,g,f,y,v,j,Ve]);if(x.useEffect(()=>{if(!se||G===Qn.Edit)return;const nt=Mr(B.current.rootElementRef.current);if(Ee.current&&!Ee.current.contains(nt.activeElement)){const lt=Ee.current.querySelector('[tabindex="0"]'),vt=Re.current||lt||Ee.current;if(Dht())vt.focus({preventScroll:!0});else{const bt=B.current.getScrollPosition();vt.focus(),B.current.scroll(bt)}}},[se,G,B]),De)return k.jsx("div",{"data-colindex":l,role:"presentation",style:z({width:"var(--width)"},We)});let rt=N.onFocus,ut,Be;if(V===null&&r.renderCell&&(ut=r.renderCell(q)),V!==null&&r.renderEditCell){const nt=B.current.getRowWithUpdatedValues(i,r.field),lt=$e(V,Lht),vt=r.valueFormatter?r.valueFormatter(V.value,nt,r,B):q.formattedValue,bt=z({},q,{row:nt,formattedValue:vt},lt);ut=r.renderEditCell(bt),ue.push(ee["cell--editing"]),ue.push(le==null?void 0:le["cell--editing"])}if(ut===void 0){const nt=pe==null?void 0:pe.toString();ut=nt,Be=nt}x.isValidElement(ut)&&Se&&(ut=x.cloneElement(ut,{focusElementRef:Re}));const et=m?null:{onDragEnter:Te("cellDragEnter",A),onDragOver:Te("cellDragOver",_)};return k.jsx("div",z({className:fe(ve.root,ue,u),role:"gridcell","data-field":L,"data-colindex":l,"aria-colindex":l+1,"aria-colspan":h,"aria-rowspan":Ve,style:We,title:Be,tabIndex:ne,onClick:Te("cellClick",E),onDoubleClick:Te("cellDoubleClick",I),onMouseOver:Te("cellMouseOver",R),onMouseDown:te("cellMouseDown"),onMouseUp:Ie("cellMouseUp"),onKeyDown:Te("cellKeyDown",D),onKeyUp:Te("cellKeyUp",M)},et,N,{onFocus:rt,ref:xe,children:ut}))}),Bht=ad(jht),zht=["label","icon","showInMenu","onClick"],Vht=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],mf=Vt((e,t)=>{var u;const n=yt();if(!e.showInMenu){const{label:f,icon:h,onClick:m}=e,g=$e(e,zht),y=v=>{m==null||m(v)};return k.jsx(n.slots.baseIconButton,z({size:"small",role:"menuitem","aria-label":f},g,{onClick:y},(u=n.slotProps)==null?void 0:u.baseIconButton,{ref:t,children:x.cloneElement(h,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=$e(e,Vht),c=f=>{i==null||i(f),a&&(s==null||s())};return k.jsx(n.slots.baseMenuItem,z({ref:t},l,{onClick:c,iconStart:o,children:r}))}),Hht=["field","type","align","width","height","empty","style","className"],jJ="1.3em",Uht="1.2em",BJ=[40,80],Ght={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},qht=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?Oe(t):"Left"}`,r&&"cellEmpty"]};return Me(o,Cn,n)},Wht=Tdt(12345);function Kht(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=$e(e,Hht),u=yt(),f={classes:u.classes,align:r,empty:a},h=qht(f),m=x.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:jJ,height:jJ};const[y,v]=n?Ght[n]??BJ:BJ;return{variant:"text",width:`${Math.round(Wht(y,v))}%`,height:Uht}},[n]);return k.jsx("div",z({"data-field":t,className:fe(h.root,l),style:z({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&k.jsx(u.slots.baseSkeleton,z({},m))}))}const Yht=ad(Kht),Qht=10,nE=-5,ig=1,zJ={width:3,rx:1.5,x:10.5},Xht="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",Jht=e=>e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||e.current.state.dimensions.scrollbarSize===0),Zht=ae("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${ee.autoHeight}`]:t.autoHeight},{[`&.${ee.autosizing}`]:t.autosizing},{[`&.${ee["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${ee["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${ee["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${ee["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${ee["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${ee.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${ee.actionsCell}`]:t.actionsCell},{[`& .${ee.booleanCell}`]:t.booleanCell},{[`& .${ee.cell}`]:t.cell},{[`& .${ee["cell--editable"]}`]:t["cell--editable"]},{[`& .${ee["cell--editing"]}`]:t["cell--editing"]},{[`& .${ee["cell--flex"]}`]:t["cell--flex"]},{[`& .${ee["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${ee["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${ee["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${ee["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${ee["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${ee["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${ee["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${ee["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${ee["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${ee["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${ee["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${ee["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${ee.cellCheckbox}`]:t.cellCheckbox},{[`& .${ee.cellEmpty}`]:t.cellEmpty},{[`& .${ee.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${ee.cellSkeleton}`]:t.cellSkeleton},{[`& .${ee.checkboxInput}`]:t.checkboxInput},{[`& .${ee.columnHeader}`]:t.columnHeader},{[`& .${ee["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${ee["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${ee["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${ee["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${ee["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${ee["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${ee["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${ee["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${ee["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${ee["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${ee["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${ee["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${ee["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${ee["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${ee["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${ee["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${ee["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${ee["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${ee.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${ee.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${ee.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${ee.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${ee.columnSeparator}`]:t.columnSeparator},{[`& .${ee["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${ee["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${ee["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${ee["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${ee["container--bottom"]}`]:t["container--bottom"]},{[`& .${ee["container--top"]}`]:t["container--top"]},{[`& .${ee.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${ee["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${ee.editBooleanCell}`]:t.editBooleanCell},{[`& .${ee.filterIcon}`]:t.filterIcon},{[`& .${ee["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${ee["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${ee["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${ee.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${ee.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${ee.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${ee.headerFilterRow}`]:t.headerFilterRow},{[`& .${ee.iconSeparator}`]:t.iconSeparator},{[`& .${ee.menuIcon}`]:t.menuIcon},{[`& .${ee.menuIconButton}`]:t.menuIconButton},{[`& .${ee.menuList}`]:t.menuList},{[`& .${ee.menuOpen}`]:t.menuOpen},{[`& .${ee.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${ee.pinnedRows}`]:t.pinnedRows},{[`& .${ee["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${ee["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${ee.row}`]:t.row},{[`& .${ee["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${ee["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${ee["row--dragging"]}`]:t["row--dragging"]},{[`& .${ee["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${ee["row--editable"]}`]:t["row--editable"]},{[`& .${ee["row--editing"]}`]:t["row--editing"]},{[`& .${ee["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${ee["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${ee.rowReorderCell}`]:t.rowReorderCell},{[`& .${ee["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${ee.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${ee.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${ee.rowSkeleton}`]:t.rowSkeleton},{[`& .${ee.scrollbar}`]:t.scrollbar},{[`& .${ee["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${ee["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${ee.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${ee["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${ee["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${ee["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${ee["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${ee.sortIcon}`]:t.sortIcon},{[`& .${ee.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${ee.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${ee.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${ee.withBorderColor}`]:t.withBorderColor}]})(()=>{const e=fs(),t=Ge(e,Jht),n=Ct.colors.background.base,r=Ct.header.background.base,o=Ct.cell.background.pinned,i=emt(Ct.colors.interactive.hover),a=Ct.colors.interactive.hoverOpacity,s=Ct.colors.interactive.selected,l=Ct.colors.interactive.selectedOpacity,c=s,u=`calc(${l} + ${a})`,f=Fd(n,i,a),h=Fd(n,s,l),m=Fd(n,c,u),g=Fd(o,i,a),y=Fd(o,s,l),v=Fd(o,c,u),w=R=>({[`& .${ee["cell--pinnedLeft"]}, & .${ee["cell--pinnedRight"]}`]:{backgroundColor:R,"&.Mui-selected":{backgroundColor:Fd(R,h,l),"&:hover":{backgroundColor:Fd(R,m,u)}}}}),C=w(g),E=w(y),I=w(v),O={backgroundColor:h,"&:hover":{backgroundColor:m,"@media (hover: none)":{backgroundColor:h}}};return{"--unstable_DataGrid-radius":Ct.radius.base,"--unstable_DataGrid-headWeight":Ct.typography.fontWeight.medium,"--DataGrid-rowBorderColor":Ct.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:Ct.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:Ct.colors.background.base,color:Ct.colors.foreground.base,font:Ct.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${ee.main} > *:first-child${Xht}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${ee.autoHeight}`]:{height:"auto"},[`&.${ee.autosizing}`]:{[`& .${ee.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${ee.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${ee.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${ee.groupingCriteriaCell}`]:{width:"unset"},[`& .${ee.treeDataGroupingCell}`]:{width:"unset"}},[`&.${ee.withSidePanel}`]:{flexDirection:"row"},[`& .${ee.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${ee.columnHeader}, & .${ee.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${ee.columnHeader}:focus-within, & .${ee.cell}:focus-within`]:{outline:`solid ${Xfe(Ct.colors.interactive.focus,.5)} ${ig}px`,outlineOffset:ig*-1},[`& .${ee.columnHeader}:focus, & .${ee.cell}:focus`]:{outline:`solid ${Ct.colors.interactive.focus} ${ig}px`,outlineOffset:ig*-1},[`& .${ee.columnHeader}:focus,
+return result$$;`.replaceAll("$$",String(CJ)));return CJ+=1,(s,l)=>i(o,s,l)},cfe=e=>e.quickFilterExcludeHiddenColumns??!0,Ldt=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=cfe(e)?zv(t):Dc(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=afe(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(f=>{const p=i?MS(f):f;return{fn:u(p,c,a)}})})}),function(c,u){const f={};e:for(let p=0;p<n.length;p+=1){const m=n[p];for(let g=0;g<o.length;g+=1){const{column:y,appliers:v}=o[g],{field:w}=y;if(u&&!u(w))continue;const C=v[p];let E=t.current.getRowValue(c,y);if(C.fn===null)continue;if(i&&(E=MS(E)),C.fn(E,c,y,a)){f[m]=!0;continue e}}f[m]=!1}return f}},Fdt=(e,t,n)=>{const r=Ndt(e,t,n),o=Ldt(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},EJ=e=>e!=null,jdt=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>lfe(r,t)!==null)),e.cleanedFilterItems),Bdt=(e,t,n,r,o)=>{const i=jdt(o,r,n.items),a=e.filter(EJ),s=t.filter(EJ);if(a.length>0){const l=u=>a.some(f=>f[u.id]);if((n.logicOperator??AS().logicOperator)===Zi.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(f=>f[u]);if((n.quickFilterLogicOperator??AS().quickFilterLogicOperator)===Zi.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},zdt=e=>{if(!e)return null;const t=new RegExp(wO(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=MS(a)),a!=null?t.test(a.toString()):!1}},TJ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(wO(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},OJ=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},IJ=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},Vdt=(e=!1)=>[{value:"contains",getApplyFilterFn:TJ(e,!1),InputComponent:js},{value:"doesNotContain",getApplyFilterFn:TJ(e,!0),InputComponent:js},{value:"equals",getApplyFilterFn:OJ(e,!1),InputComponent:js},{value:"doesNotEqual",getApplyFilterFn:OJ(e,!0),InputComponent:js},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${wO(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:js},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${wO(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:js},{value:"isEmpty",getApplyFilterFn:IJ(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:IJ(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:rfe}],Wl={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:xdt,type:"string",align:"left",filterOperators:Vdt(),renderEditCell:ldt,getApplyQuickFilterFn:zdt},ufe=x.createContext(void 0),FP=()=>{const e=x.useContext(ufe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
+`));return e},Hdt="MuiDataGridVariables",KV=x.createContext({className:"unset",tag:k.jsx("style",{href:"/unset"})});function dfe(){return x.useContext(KV).className}function Udt(){return x.useContext(KV)}function Gdt(e){const n=FP().hooks.useCSSVariables(),r=x.useMemo(()=>{const o=`${Hdt}-${n.id}`,i=`.${o}{${qdt(n.variables)}}`,a=k.jsx("style",{href:`/${o}`,children:i});return{className:o,tag:a}},[n]);return k.jsx(KV.Provider,{value:r,children:e.children})}function qdt(e){let t="";for(const n in e)Object.hasOwn(e,n)&&(t+=`${n}:${e[n]};`);return t}const Wdt=["open","target","onClose","children","position","className","onExited"],Kdt=e=>{const{classes:t}=e;return Me({root:["menu"]},Cn,t)},Ydt=ae(cd,{name:"MuiDataGrid",slot:"Menu"})({zIndex:Ct.zIndex.menu,[`& .${ee.menuList}`]:{outline:0}});function jP(e){var y;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=$e(e,Wdt),c=tn(),u=yt(),f=Kdt(u),p=dfe(),m=x.useRef(null);In(()=>{var v,w;t?m.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((w=(v=m.current)==null?void 0:v.focus)==null||w.call(v),m.current=null)},[t]),x.useEffect(()=>{const v=t?"menuOpen":"menuClose";c.current.publishEvent(v,{target:n})},[c,t,n]);const g=v=>{v.target&&(n===v.target||n!=null&&n.contains(v.target))||r(v)};return k.jsx(Ydt,z({as:u.slots.basePopper,className:fe(f.root,a,p),ownerState:u,open:t,target:n,transition:!0,placement:i,onClickAway:g,onExited:s,clickAwayMouseEvent:"onMouseDown"},l,(y=u.slotProps)==null?void 0:y.basePopper,{children:o}))}const Qdt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],Xdt=e=>typeof e.getActions=="function";function Jdt(e){var L;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=$e(e,Qdt),[l,c]=x.useState(-1),[u,f]=x.useState(!1),p=tn(),m=x.useRef(null),g=x.useRef(null),y=x.useRef(!1),v=x.useRef({}),w=vr(),C=bn(),E=bn(),I=yt();if(!Xdt(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const O=t.getActions(p.current.getRowParams(n)),P=O.filter(V=>!V.props.showInMenu),R=O.filter(V=>V.props.showInMenu),D=P.length+(R.length?1:0);x.useLayoutEffect(()=>{r||Object.entries(v.current).forEach(([V,W])=>{W==null||W.stop({},()=>{delete v.current[V]})})},[r]),x.useEffect(()=>{if(l<0||!m.current||l>=m.current.children.length)return;m.current.children[l].focus({preventScroll:!0})},[l]),x.useEffect(()=>{r||(c(-1),y.current=!1)},[r]),x.useImperativeHandle(a,()=>({focus(){if(!y.current){const V=O.findIndex(W=>!W.props.disabled);c(V)}}}),[O]),x.useEffect(()=>{l>=D&&c(D-1)},[l,D]);const M=()=>{f(!0),c(D-1),y.current=!0},A=()=>{f(!1)},_=V=>{V.stopPropagation(),V.preventDefault(),u?A():M()},N=V=>W=>{v.current[V]=W},B=(V,W)=>K=>{c(V),y.current=!0,W&&W(K)},H=V=>{if(D<=1)return;const W=(G,q)=>{var ie;if(G<0||G>O.length)return G;const Z=(q==="left"?-1:1)*(w?-1:1);return(ie=O[G+Z])!=null&&ie.props.disabled?W(G+Z,q):G+Z};let K=l;V.key==="ArrowRight"?K=W(l,"right"):V.key==="ArrowLeft"&&(K=W(l,"left")),!(K<0||K>=D)&&K!==l&&(V.preventDefault(),V.stopPropagation(),c(K))},j=V=>{V.key==="Tab"&&V.preventDefault(),["Tab","Escape"].includes(V.key)&&A()};return k.jsxs("div",z({role:"menu",ref:m,tabIndex:-1,className:ee.actionsCell,onKeyDown:H},s,{children:[P.map((V,W)=>x.cloneElement(V,{key:W,touchRippleRef:N(W),onClick:B(W,V.props.onClick),tabIndex:l===W?o:-1})),R.length>0&&E&&k.jsx(I.slots.baseIconButton,z({ref:g,id:E,"aria-label":p.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?C:void 0,role:"menuitem",size:"small",onClick:_,touchRippleRef:N(E),tabIndex:l===P.length?o:-1},(L=I.slotProps)==null?void 0:L.baseIconButton,{children:k.jsx(I.slots.moreActionsIcon,{fontSize:"small"})})),R.length>0&&k.jsx(jP,{open:u,target:g.current,position:i,onClose:A,children:k.jsx(I.slots.baseMenuList,{id:C,className:ee.menuList,onKeyDown:j,"aria-labelledby":E,autoFocusItem:!0,children:R.map((V,W)=>x.cloneElement(V,{key:W,closeMenu:A}))})})]}))}const Zdt=e=>k.jsx(Jdt,z({},e)),BP="actions",eft=z({},Wl,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:Zdt,getApplyQuickFilterFn:()=>null}),ii="auto-generated-group-node-root",Yy=Symbol("mui.id_autogenerated"),tft=()=>({type:"group",id:ii,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function nft(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(`
+`))}const zP=(e,t,n)=>{const r=t?t(e):e.id;return nft(r,e,n),r},rft=(e,t,n)=>{const r=t.field;if(!t||!t.valueGetter)return e[r];const o=e[t.field];return t.valueGetter(o,e,t,n)},RE=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={};for(let a=0;a<e.length;a+=1){const s=e[a],l=zP(s,t);i[l]=s,o.rows.push(l)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,updates:o,dataRowIdToModelLookup:i}},ffe=({tree:e,rowCountProp:t=0})=>{const n=e[ii];return Math.max(t,n.children.length+(n.footerId==null?0:1))},pfe=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:f=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),p=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},z({},p,{totalRowCount:Math.max(t,p.dataRowIds.length),totalTopLevelRowCount:ffe({tree:p.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:f})},Qy=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,YV=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i<r.children.length;i+=1){const a=r.children[i];(!n||!Qy(e[a]))&&o.push(a);const s=YV(e,a,n);for(let l=0;l<s.length;l+=1)o.push(s[l])}return!n&&r.footerId!=null&&o.push(r.footerId),o},PJ=({previousCache:e,getRowId:t,updates:n,groupKeys:r})=>{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(c=>{const u=zP(c,t,"A row was provided without id when calling updateRows():");o.has(u)?o.set(u,z({},o.get(u),c)):o.set(u,c)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:z({},e.updates.idToActionLookup),groupKeys:r},a=z({},e.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};o.forEach((c,u)=>{const f=i.idToActionLookup[u];if(c._action==="delete"){if(f==="remove"||!a[u])return;f!=null&&(s[f][u]=!0),i.actions.remove.push(u),delete a[u];return}const p=a[u];if(p){f==="remove"?(s.remove[u]=!0,i.actions.modify.push(u)):f==null&&i.actions.modify.push(u),a[u]=z({},p,c);return}f==="remove"?(s.remove[u]=!0,i.actions.insert.push(u)):f==null&&i.actions.insert.push(u),a[u]=c});const l=Object.keys(s);for(let c=0;c<l.length;c+=1){const u=l[c],f=s[u];Object.keys(f).length>0&&(i.actions[u]=i.actions[u].filter(p=>!f[p]))}return{dataRowIdToModelLookup:a,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},hfe="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function AJ(e,t,n){const r=[];return t.forEach(o=>{const i=zP(o,n,"A row was provided without id when calling updateRows():"),a=Ec(e,i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=z({},l,o))}else r.push(o)}),r}const mfe=(e,t,n)=>typeof e=="number"&&e>0?e:t,oft="__tree_data_group__",gfe="__row_group_by_columns_group__",VP="__detail_panel_toggle__";let On=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const ift=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],aft=e=>{const{classes:t}=e;return Me({root:["booleanCell"]},Cn,t)};function sft(e){const{value:t,rowNode:n}=e,r=$e(e,ift),o=tn(),i=yt(),a={classes:i.classes},s=aft(a),c=Ge(o,jv)>0&&n.type==="group"&&i.treeData===!1,u=x.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:k.jsx(u,z({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const lft=x.memo(sft),cft=e=>e.field!==gfe&&Qy(e.rowNode)?"":k.jsx(lft,z({},e)),uft=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],dft=e=>{const{classes:t}=e;return Me({root:["editBooleanCell"]},Cn,t)};function fft(e){var w;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=$e(e,uft),l=tn(),c=x.useRef(null),u=bn(),[f,p]=x.useState(n),m=yt(),g={classes:m.classes},y=dft(g),v=x.useCallback(async C=>{const E=C.target.checked;a&&await a(C,E),p(E),await l.current.setEditCellValue({id:t,field:r,value:E},C)},[l,r,t,a]);return x.useEffect(()=>{p(n)},[n]),In(()=>{i&&c.current.focus()},[i]),k.jsx("label",z({htmlFor:u,className:fe(y.root,o)},s,{children:k.jsx(m.slots.baseCheckbox,z({id:u,inputRef:c,checked:!!f,onChange:v,size:"small"},(w=m.slotProps)==null?void 0:w.baseCheckbox))}))}const pft=e=>k.jsx(fft,z({},e)),hft=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function mft(e){var O,P;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,headerFilterMenu:i,clearButton:a,tabIndex:s,slotProps:l}=e,c=$e(e,hft),[u,f]=x.useState(DE(t.value)),p=yt(),m=bn(),g=bn(),y=((O=p.slotProps)==null?void 0:O.baseSelect)||{},v=y.native??!1,w=((P=p.slotProps)==null?void 0:P.baseSelectOption)||{},C=x.useCallback(R=>{const D=DE(R.target.value);f(D),n(z({},t,{value:D}))},[n,t]);x.useEffect(()=>{f(DE(t.value))},[t.value]);const E=(l==null?void 0:l.root.label)??r.current.getLocaleText("filterPanelInputLabel"),I=l==null?void 0:l.root.slotProps;return k.jsxs(x.Fragment,{children:[k.jsxs(p.slots.baseSelect,z({fullWidth:!0,labelId:m,id:g,label:E,value:u===void 0?"":String(u),onChange:C,native:v,slotProps:{htmlInput:z({ref:o,tabIndex:s},I==null?void 0:I.htmlInput)}},y,c,l==null?void 0:l.root,{children:[k.jsx(p.slots.baseSelectOption,z({},w,{native:v,value:"",children:r.current.getLocaleText("filterValueAny")})),k.jsx(p.slots.baseSelectOption,z({},w,{native:v,value:"true",children:r.current.getLocaleText("filterValueTrue")})),k.jsx(p.slots.baseSelectOption,z({},w,{native:v,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]})),i,a]})}function DE(e){if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1}const gft=()=>[{value:"is",getApplyFilterFn:e=>{const t=DE(e.value);return t===void 0?null:n=>!!n===t},InputComponent:mft}],yft=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),vft=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},yfe=z({},Wl,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:cft,renderEditCell:pft,sortComparator:efe,valueFormatter:yft,filterOperators:gft(),getApplyQuickFilterFn:()=>null,aggregable:!1,pastedValueParser:e=>vft(e)});function HP(e){for(const t in e)return!1;return!0}const vfe=Qr(e=>e.sorting),Hv=Pt(vfe,e=>e.sortedRows),QV=Yn(Hv,Us,wi,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];if(i)r.push({id:o,model:i});else{const a=n[o];a&&Qy(a)&&r.push({id:o,model:{[Yy]:o}})}return r},[])),Ns=Pt(vfe,e=>e.sortModel),bft=Yn(Ns,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{}));Yn(Hv,e=>e.reduce((t,n,r)=>(t[n]=r,t),Object.create(null)));const UP=Qr(e=>e.filter),Bo=Pt(UP,e=>e.filterModel),bfe=Pt(Bo,e=>e.quickFilterValues),xft=Qr(e=>e.visibleRowsLookup),Uv=Pt(UP,e=>e.filteredRowsLookup);Pt(UP,e=>e.filteredChildrenCountLookup);Pt(UP,e=>e.filteredDescendantCountLookup);const Jf=Yn(xft,QV,(e,t)=>HP(e)?t:t.filter(n=>e[n.id]!==!1)),Ug=Yn(Jf,e=>e.map(t=>t.id)),xfe=Yn(Uv,QV,(e,t)=>HP(e)?t:t.filter(n=>e[n.id]!==!1)),Sfe=Yn(xfe,e=>e.map(t=>t.id));Yn(Ug,wi,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const wfe=Yn(Jf,wi,jv,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),XV=Pt(Jf,e=>e.length),JV=Pt(wfe,e=>e.length),Cfe=Pt(xfe,e=>e.length);Pt(Cfe,JV,(e,t)=>e-t);const ZV=Yn(Bo,ud,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),Sft=Yn(ZV,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),Rl=Qr(e=>e.rowSelection),Uw=Yn(Rl,ef),GP=Pt(Rl,Cfe,(e,t)=>e.type==="include"?e.ids.size:t-e.ids.size),Efe=Yn(Rl,Us,Wp,(e,t,n)=>{const r=new Map;if(e.type==="include")for(const o of e.ids)r.set(o,t[o]);else for(let o=0;o<n.length;o+=1){const i=n[o];e.ids.has(i)||r.set(i,t[i])}return r});function Tfe(e,t){var l;const n=wi(e),r=Hv(e),o=Uv(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;c<r.length&&((l=n[r[c]])==null?void 0:l.depth)>i.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function wft(e,t){return Pt(wi,Hv,Uv,Uw,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i.has(e)};if(i.has(e))return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(f=>f===e)+1;for(let f=c;f<r.length&&((u=n[r[f]])==null?void 0:u.depth)>a.depth;f+=1){const p=r[f];o[p]!==!1&&(s+=1,i.has(p)&&(l+=1))}return{isIndeterminate:l>0&&(l<s||!i.has(e)),isChecked:t?l>0:i.has(e)}})}function eH(e){return e.signature===Ul.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const Cft=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==ii;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},Eft=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a]!==!1)},S0=(e,t,n,r,o,i,a=Uw(e))=>{const s=Uv(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&Tfe(e,n).forEach(f=>{i(f),l.add(f)})}if(o){const c=f=>{if(!a.has(f)&&!l.has(f))return!1;const p=t[f];return p?p.type!=="group"?!0:p.children.every(c):!1},u=f=>{const p=Eft(t,s,f);if(p.length===0||p.every(c)){const m=t[f],g=m==null?void 0:m.parent;g!=null&&g!==ii&&e.current.isRowSelectable(g)&&(i(g),l.add(g),u(g))}};u(n)}}},MJ=(e,t,n,r,o,i)=>{const a=Uw(e);if(!(!o&&!r)&&(o&&Cft(t,n).forEach(l=>{a.has(l)&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&Tfe(e,n).forEach(c=>{i(c)})}},Tft=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],Oft=e=>{const{classes:t}=e;return Me({root:["checkboxInput"]},Cn,t)},Ift=Vt(function(t,n){var E,I;const{field:r,id:o,rowNode:i,tabIndex:a}=t,s=$e(t,Tft),l=tn(),c=yt(),u={classes:c.classes},f=Oft(u),p=O=>{const P={value:O.target.checked,id:o};l.current.publishEvent("rowSelectionCheckboxChange",P,O)};x.useLayoutEffect(()=>{if(a===0){const O=l.current.getCellElement(o,r);O&&(O.tabIndex=-1)}},[l,a,o,r]);const m=x.useCallback(O=>{O.key===" "&&O.stopPropagation()},[]),g=l.current.isRowSelectable(o),y=wft(o,((E=c.rowSelectionPropagation)==null?void 0:E.parents)??!1),{isIndeterminate:v,isChecked:w}=Ge(l,y,void 0,VV);if(i.type==="footer"||i.type==="pinnedRow")return null;const C=l.current.getLocaleText(w&&!v?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return k.jsx(c.slots.baseCheckbox,z({tabIndex:a,checked:w&&!v,onChange:p,className:f.root,slotProps:{htmlInput:{"aria-label":C,name:"select_row"}},onKeyDown:m,indeterminate:v,disabled:!g},(I=c.slotProps)==null?void 0:I.baseCheckbox,s,{ref:n}))}),Pft=Ift,qP=Qr(e=>e.focus),va=Pt(qP,e=>e.cell),Aft=Pt(qP,e=>e.columnHeader);Pt(qP,e=>e.columnHeaderFilter);const EO=Pt(qP,e=>e.columnGroupHeader),WP=Qr(e=>e.tabIndex),tH=Pt(WP,e=>e.cell),Ofe=Pt(WP,e=>e.columnHeader);Pt(WP,e=>e.columnHeaderFilter);const Mft=Pt(WP,e=>e.columnGroupHeader),Rft=100,Dft=e=>e?0:100,Ife=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,Pfe=e=>({page:0,pageSize:e?0:100}),kft=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),Afe=(e,t)=>{if(t===Ul.DataGrid&&e>Rft)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
+`))},_ft=-1,Gw=Qr(e=>e.pagination),Mfe=Pt(Gw,e=>e.enabled&&e.paginationMode==="client"),ri=Pt(Gw,e=>e.paginationModel),Og=Pt(Gw,e=>e.rowCount),H0=Pt(Gw,e=>e.meta),$ft=Pt(ri,e=>e.page),Rfe=Pt(ri,e=>e.pageSize),Dfe=Pt(ri,Og,(e,t)=>Ife(t,e.pageSize,e.page)),nH=Yn(Mfe,ri,wi,jv,Jf,wfe,(e,t,n,r,o,i)=>{var g;if(!e)return null;const a=i.length,s=Math.min(t.pageSize*t.page,a-1),l=t.pageSize===_ft?a-1:Math.min(s+t.pageSize-1,a-1);if(s===-1||l===-1)return null;if(r<2)return{firstRowIndex:s,lastRowIndex:l};const c=i[s],u=l-s+1,f=o.findIndex(y=>y.id===c.id);let p=f,m=0;for(;p<o.length&&m<=u;){const y=o[p],v=(g=n[y.id])==null?void 0:g.depth;v===void 0?p+=1:((m<u||v>0)&&(p+=1),v===0&&(m+=1))}return{firstRowIndex:f,lastRowIndex:p-1}}),Nft=Yn(Jf,nH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),kfe=Yn(Ug,nH,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),qw=Yn(Mfe,nH,Nft,Jf,(e,t,n,r)=>e?{rows:n,range:t,rowIdToIndexMap:n.reduce((o,i,a)=>(o.set(i.id,a),o),new Map)}:{rows:r,range:r.length===0?null:{firstRowIndex:0,lastRowIndex:r.length-1},rowIdToIndexMap:r.reduce((o,i,a)=>(o.set(i.id,a),o),new Map)}),Lft=["field","colDef"],Fft=e=>{const{classes:t}=e;return Me({root:["checkboxInput"]},Cn,t)},jft=Vt(function(t,n){var R;const r=$e(t,Lft),[,o]=x.useState(!1),i=tn(),a=yt(),s={classes:a.classes},l=Fft(s),c=Ge(i,Ofe),u=Ge(i,Rl),f=Ge(i,Ug),p=Ge(i,kfe),m=x.useMemo(()=>{const D=a.isRowSelectable;if(typeof D!="function"||u.type==="exclude")return u;const M={type:"include",ids:new Set};for(const A of u.ids)a.keepNonExistentRowsSelected&&M.ids.add(A),i.current.getRow(A)&&D(i.current.getRowParams(A))&&M.ids.add(A);return M},[i,a.isRowSelectable,a.keepNonExistentRowsSelected,u]),g=x.useMemo(()=>{const D=!a.pagination||!a.checkboxSelectionVisibleOnly||a.paginationMode==="server"?f:p,M=new Set;for(let A=0;A<D.length;A+=1){const _=D[A];i.current.isRowSelectable(_)&&M.add(_)}return M},[i,a.pagination,a.paginationMode,a.checkboxSelectionVisibleOnly,p,f]),y=x.useMemo(()=>{const D=ef(m);let M=0;for(const A of g)D.has(A)&&(M+=1);return M},[m,g]),v=x.useMemo(()=>{if(m.ids.size===0)return!1;const D=ef(m);for(const M of g)if(!D.has(M))return!0;return!1},[m,g]),w=y>0,C=D=>{const M={value:D.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",M)},E=c!==null&&c.field===t.field?0:-1;x.useLayoutEffect(()=>{const D=i.current.getColumnHeaderElement(t.field);E===0&&D&&(D.tabIndex=-1)},[E,i,t.field]);const I=x.useCallback(D=>{D.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!w})},[i,w]),O=x.useCallback(()=>{o(D=>!D)},[]);x.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",O),[i,O]);const P=i.current.getLocaleText(w&&!v?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return k.jsx(a.slots.baseCheckbox,z({indeterminate:v,checked:w&&!v,onChange:C,className:l.root,slotProps:{htmlInput:{"aria-label":P,name:"select_all_rows"}},tabIndex:E,onKeyDown:I,disabled:!eH(a)},(R=a.slotProps)==null?void 0:R.baseCheckbox,r,{ref:n}))}),Ww=Qr((e,t)=>Yy in t?t[Yy]:e.props.getRowId?e.props.getRowId(t):t.id),Cu="__check__",Gv=z({},yfe,{type:"custom",field:Cu,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,n,r)=>{const o=Ww(r,t);return r.current.isRowSelected(o)},renderHeader:e=>k.jsx(jft,z({},e)),renderCell:e=>k.jsx(Pft,z({},e))}),Bft=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function RJ(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function rg(e){var O;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a,headerFilterMenu:s,clearButton:l,tabIndex:c,disabled:u}=e,f=$e(e,Bft),p=a==null?void 0:a.root.slotProps,m=_o(),[g,y]=x.useState(()=>RJ(t.value,r)),[v,w]=x.useState(!1),C=bn(),E=yt(),I=x.useCallback(P=>{m.clear();const R=P.target.value;y(R),w(!0),m.start(E.filterDebounceMs,()=>{const D=new Date(R);n(z({},t,{value:Number.isNaN(D.getTime())?void 0:D})),w(!1)})},[n,t,E.filterDebounceMs,m]);return x.useEffect(()=>{const P=RJ(t.value,r);y(P)},[t.value,r]),k.jsxs(x.Fragment,{children:[k.jsx(E.slots.baseTextField,z({fullWidth:!0,id:C,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:g,onChange:I,type:r||"text",disabled:u,inputRef:i,slotProps:z({},p,{input:z({endAdornment:v?k.jsx(E.slots.loadIcon,{fontSize:"small",color:"action"}):null},p==null?void 0:p.input),htmlInput:z({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:c},p==null?void 0:p.htmlInput)})},(O=E.slotProps)==null?void 0:O.baseTextField,f,a==null?void 0:a.root)),s,l]})}function og(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const _fe=e=>[{value:"is",getApplyFilterFn:t=>og(t,(n,r)=>n===r,e),InputComponent:rg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>og(t,(n,r)=>n!==r,e),InputComponent:rg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>og(t,(n,r)=>n>r,e),InputComponent:rg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>og(t,(n,r)=>n>=r,e),InputComponent:rg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>og(t,(n,r)=>n<r,e,!e),InputComponent:rg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:t=>og(t,(n,r)=>n<=r,e),InputComponent:rg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],zft=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],Vft=ae(cd)({fontSize:"inherit"}),Hft=e=>{const{classes:t}=e;return Me({root:["editInputCell"]},Cn,t)};function Uft(e){var I,O;const{id:t,value:n,field:r,colDef:o,hasFocus:i,onValueChange:a,slotProps:s}=e,l=$e(e,zft),c=o.type==="dateTime",u=tn(),f=x.useRef(null),p=x.useMemo(()=>{let P;n==null?P=null:n instanceof Date?P=n:P=new Date((n??"").toString());let R;return P==null||Number.isNaN(P.getTime())?R="":R=new Date(P.getTime()-P.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:P,formatted:R}},[n,c]),[m,g]=x.useState(p),y=yt(),v={classes:y.classes},w=Hft(v),C=x.useCallback(P=>{if(P==="")return null;const[R,D]=P.split("T"),[M,A,_]=R.split("-"),N=new Date;if(N.setFullYear(Number(M),Number(A)-1,Number(_)),N.setHours(0,0,0,0),D){const[B,H]=D.split(":");N.setHours(Number(B),Number(H),0,0)}return N},[]),E=x.useCallback(async P=>{const R=P.target.value,D=C(R);a&&await a(P,D),g({parsed:D,formatted:R}),u.current.setEditCellValue({id:t,field:r,value:D},P)},[u,r,t,a,C]);return x.useEffect(()=>{g(P=>{var R,D;return p.parsed!==P.parsed&&((R=p.parsed)==null?void 0:R.getTime())!==((D=P.parsed)==null?void 0:D.getTime())?p:P})},[p]),In(()=>{i&&f.current.focus()},[i]),k.jsx(Vft,z({as:y.slots.baseInput,inputRef:f,fullWidth:!0,className:w.root,type:c?"datetime-local":"date",value:m.formatted,onChange:E},l,s==null?void 0:s.root,{slotProps:{htmlInput:z({max:c?"9999-12-31T23:59":"9999-12-31"},(O=(I=s==null?void 0:s.root)==null?void 0:I.slotProps)==null?void 0:O.htmlInput)}}))}const $fe=e=>k.jsx(Uft,z({},e));function Nfe({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(`
+`))}const Gft=(e,t,n,r)=>{if(!e)return"";const o=Ww(r,t);return Nfe({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},qft=(e,t,n,r)=>{if(!e)return"";const o=Ww(r,t);return Nfe({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},Wft=z({},Wl,{type:"date",sortComparator:tfe,valueFormatter:Gft,filterOperators:_fe(),renderEditCell:$fe,pastedValueParser:e=>new Date(e)}),Kft=z({},Wl,{type:"dateTime",sortComparator:tfe,valueFormatter:qft,filterOperators:_fe(!0),renderEditCell:$fe,pastedValueParser:e=>new Date(e)}),Yd=e=>e==null?null:Number(e),Yft=e=>e==null||Number.isNaN(e)||e===""?null:t=>Yd(t)===Yd(e),Qft=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Yd(t)===e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Yd(t)!==e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Yd(t)>e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Yd(t)>=e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Yd(t)<e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Yd(t)<=e.value,InputComponent:js,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:rfe,InputComponentProps:{type:"number"}}],Xft=z({},Wl,{type:"number",align:"right",headerAlign:"right",sortComparator:efe,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>wdt(e)?e.toLocaleString():e||"",filterOperators:Qft(),getApplyQuickFilterFn:Yft});function Xy(e){return(e==null?void 0:e.type)==="singleSelect"}function Dh(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(z({field:e.field},t)):e.valueOptions}function TO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const Jft=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function Zft(e){return!!e.key}function ept(e){var A,_;const t=yt(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===Vc.Cell,slotProps:f}=e,p=$e(e,Jft),m=tn(),g=x.useRef(null),y=x.useRef(null),[v,w]=x.useState(u),E=(((A=t.slotProps)==null?void 0:A.baseSelect)||{}).native??!1;if(In(()=>{var N;s&&((N=y.current)==null||N.focus())},[s]),!Xy(a))return null;const I=Dh(a,{id:n,row:i});if(!I)return null;const O=a.getOptionValue,P=a.getOptionLabel,R=async N=>{if(!Xy(a)||!I)return;w(!1);const B=N.target,H=TO(B.value,I,O);c&&await c(N,H),await m.current.setEditCellValue({id:n,field:o,value:H},N)},D=(N,B)=>{if(t.editMode===Vc.Row){w(!1);return}if(B==="backdropClick"||N.key==="Escape"){const H=m.current.getCellParams(n,o);m.current.publishEvent("cellEditStop",z({},H,{reason:N.key==="Escape"?Tl.escapeKeyDown:Tl.cellFocusOut}))}},M=N=>{Zft(N)&&N.key==="Enter"||w(!0)};return!I||!a?null:k.jsx(t.slots.baseSelect,z({ref:g,value:r,onChange:R,open:v,onOpen:M,onClose:D,error:l,native:E,fullWidth:!0,slotProps:{htmlInput:{ref:y}}},p,f==null?void 0:f.root,(_=t.slotProps)==null?void 0:_.baseSelect,{children:I.map(N=>{var H;const B=O(N);return x.createElement(t.slots.baseSelectOption,z({},((H=t.slotProps)==null?void 0:H.baseSelectOption)||{},{native:E,key:B,value:B}),P(N))})}))}const tpt=e=>k.jsx(ept,z({},e)),npt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],rpt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...Dh(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),x.createElement(t,z({},i,{native:o,key:l,value:l}),c)});function DJ(e){var P,R,D,M,A;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,tabIndex:a,clearButton:s,headerFilterMenu:l,slotProps:c}=e,u=$e(e,npt),f=t.value??"",p=bn(),m=bn(),g=yt(),y=((R=(P=g.slotProps)==null?void 0:P.baseSelect)==null?void 0:R.native)??!1;let v=null;if(t.field){const _=o.current.getColumn(t.field);Xy(_)&&(v=_)}const w=v==null?void 0:v.getOptionValue,C=v==null?void 0:v.getOptionLabel,E=x.useMemo(()=>Dh(v),[v]),I=x.useCallback(_=>{let N=_.target.value;N=TO(N,E,w),n(z({},t,{value:N}))},[E,w,n,t]);if(!Xy(v))return null;const O=(c==null?void 0:c.root.label)??o.current.getLocaleText("filterPanelInputLabel");return k.jsxs(x.Fragment,{children:[k.jsx(g.slots.baseSelect,z({fullWidth:!0,id:p,label:O,labelId:m,value:f,onChange:I,slotProps:{htmlInput:z({tabIndex:a,ref:i,type:r||"text",placeholder:(c==null?void 0:c.root.placeholder)??o.current.getLocaleText("filterPanelInputPlaceholder")},(D=c==null?void 0:c.root.slotProps)==null?void 0:D.htmlInput)},native:y},(M=g.slotProps)==null?void 0:M.baseSelect,u,c==null?void 0:c.root,{children:rpt({column:v,OptionComponent:g.slots.baseSelectOption,getOptionLabel:C,getOptionValue:w,isSelectNative:y,baseSelectOptionProps:(A=g.slotProps)==null?void 0:A.baseSelectOption})})),l,s]})}const opt=["item","applyValue","type","apiRef","focusElementRef","slotProps"];function ipt(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a}=e,s=$e(e,opt),l=bn(),c=yt();let u=null;if(t.field){const C=o.current.getColumn(t.field);Xy(C)&&(u=C)}const f=u==null?void 0:u.getOptionValue,p=u==null?void 0:u.getOptionLabel,m=x.useCallback((C,E)=>f(C)===f(E),[f]),g=x.useMemo(()=>Dh(u)||[],[u]),y=x.useMemo(()=>Array.isArray(t.value)?t.value.reduce((C,E)=>{const I=g.find(O=>f(O)===E);return I!=null&&C.push(I),C},[]):[],[f,t.value,g]),v=x.useCallback((C,E)=>{n(z({},t,{value:E.map(f)}))},[n,t,f]),w=c.slots.baseAutocomplete;return k.jsx(w,z({multiple:!0,options:g,isOptionEqualToValue:m,id:l,value:y,onChange:v,getOptionLabel:p,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:r||"text",inputRef:i}}},s,a==null?void 0:a.root))}const ig=e=>e==null||!qV(e)?e:e.value,apt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>ig(t)===ig(e.value),InputComponent:DJ},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>ig(t)!==ig(e.value),InputComponent:DJ},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(ig);return n=>t.includes(ig(n))},InputComponent:ipt}],spt=e=>typeof e[0]=="object",lpt=e=>qV(e)?e.value:e,cpt=e=>qV(e)?e.label:String(e),upt=z({},Wl,{type:"singleSelect",getOptionLabel:cpt,getOptionValue:lpt,valueFormatter(e,t,n,r){const o=Ww(r,t);if(!Xy(n))return"";const i=Dh(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!spt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:tpt,filterOperators:apt(),pastedValueParser:(e,t,n)=>{const r=n,o=Dh(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),dpt="string",fpt=()=>({string:Wl,number:Xft,date:Wft,dateTime:Kft,boolean:yfe,singleSelect:upt,[BP]:eft,custom:Wl}),rH=Qr(e=>e.headerFiltering),ppt=Pt(rH,e=>(e==null?void 0:e.enabled)??!1),hpt=Pt(rH,e=>e.editing),mpt=Pt(rH,e=>e.menuOpen),KP=Qr(e=>e.columnGrouping),Lfe=Yn(KP,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),Ffe=Yn(KP,e=>(e==null?void 0:e.lookup)??{}),gpt=Yn(KP,e=>(e==null?void 0:e.headerStructure)??[]),Kw=Pt(KP,e=>(e==null?void 0:e.maxDepth)??0),jfe=["maxWidth","minWidth","width","flex"],y$=fpt();function ypt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;u<n.length;u+=1){const f=n[u];if(o.all[f.field]&&o.all[f.field].frozen===!0)continue;let m=s/l*f.flex;m<f.minWidth?(c+=f.minWidth-m,m=f.minWidth,a.min[f.field]=!0):m>f.maxWidth&&(c+=f.maxWidth-m,m=f.maxWidth,a.max[f.field]=!0),o.all[f.field]={frozen:!1,computedWidth:m,flex:f.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const rj=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,f=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,f=!0):u=Za(c.width||Wl.width,c.minWidth||Wl.minWidth,c.maxWidth||Wl.maxWidth),o+=u),c.computedWidth!==u&&(c=z({},c,{computedWidth:u})),f&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=ypt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return z({},e,{lookup:n})},vpt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u<n.length;u+=1){const f=n[u];e.lookup[f]&&(i[f]=!0,a.push(f))}const s=a.length===0?e.orderedFields:[...a,...e.orderedFields.filter(u=>!i[u])],l=z({},e.lookup);for(let u=0;u<o.length;u+=1){const f=o[u],p=z({},l[f],{hasBeenResized:!0});Object.entries(r[f]).forEach(([m,g])=>{p[m]=g===-1?1/0:g}),l[f]=p}return z({},e,{orderedFields:s,lookup:l})};function v$(e){let t=y$[dpt];return e&&y$[e]&&(t=y$[e]),t}const fg=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=Fl(e),keepOnlyColumnsToUpsert:o=!1,updateInitialVisibilityModel:i=!1})=>{var f,p;const a=!e.current.state.columns;let s;if(a)s={orderedFields:[],lookup:{},columnVisibilityModel:r,initialColumnVisibilityModel:r};else{const m=Gl(e);s={orderedFields:o?[]:[...m.orderedFields],lookup:z({},m.lookup),columnVisibilityModel:r,initialColumnVisibilityModel:i?r:m.initialColumnVisibilityModel}}let l={};o&&!a&&(l=Object.keys(s.lookup).reduce((m,g)=>z({},m,{[g]:!1}),{})),t.forEach(m=>{const{field:g}=m;l[g]=!0;let y=s.lookup[g];y==null?(y=z({},v$(m.type),{field:g,hasBeenResized:!1}),s.orderedFields.push(g)):o&&s.orderedFields.push(g),y&&y.type!==m.type&&(y=z({},v$(m.type),{field:g}));let v=y.hasBeenResized;jfe.forEach(w=>{m[w]!==void 0&&(v=!0,m[w]===-1&&(m[w]=1/0))}),s.lookup[g]=dh(y,z({},v$(m.type),m,{hasBeenResized:v}))}),o&&!a&&Object.keys(s.lookup).forEach(m=>{l[m]||delete s.lookup[m]});const c=e.current.unstable_applyPipeProcessors("hydrateColumns",s),u=vpt(c,n);return rj(u,((p=(f=e.current).getRootDimensions)==null?void 0:p.call(f))??void 0)};function bpt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a<r;a+=1)if(o[a]){const l=o[a].id,c=t.current.unstable_getCellColSpanInfo(l,e);c&&c.spannedByColSpan&&(i=c.leftVisibleCellIndex)}return i}function oH(e,t){if(t.listView)return 0;const n=Fv(e),r=Kw(e),o=ppt(e),i=Math.floor(t.columnHeaderHeight*n),a=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*n),s=o?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*n):0;return i+a*r+s}const kJ=1,xpt=1.5,Spt=e=>{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return Me(r,Cn,n)},wpt=Nn("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${ee["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${ee["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${ee["scrollArea--left"]}`]:{left:0},[`&.${ee["scrollArea--right"]}`]:{right:0}})),Cpt=Pt(fr,(e,t)=>t==="left"?e.leftPinnedWidth:t==="right"?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0);function Ept(e){const t=tn(),[n,r]=x.useState(!1);return At(t,"columnHeaderDragStart",()=>r(!0)),At(t,"columnHeaderDragEnd",()=>r(!1)),n?k.jsx(Tpt,z({},e)):null}function Tpt(e){const{scrollDirection:t,scrollPosition:n}=e,r=x.useRef(null),o=tn(),i=_o(),a=Ge(o,Fv),s=Ge(o,LP),l=Ge(o,Cpt,t),c=()=>{const I=fr(o);if(t==="left")return n.current.left>0;if(t==="right"){const O=s-I.viewportInnerSize.width;return n.current.left<O}return!1},[u,f]=x.useState(c),p=yt(),m=z({},p,{scrollDirection:t}),g=Spt(m),y=oH(o,p),v=Math.floor(p.columnHeaderHeight*a),w={height:v,top:y-v};t==="left"?w.left=l:t==="right"&&(w.right=l);const C=()=>{f(c)},E=Je(I=>{let O;if(I.preventDefault(),t==="left")O=I.clientX-r.current.getBoundingClientRect().right;else if(t==="right")O=Math.max(1,I.clientX-r.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");O=(O-kJ)*xpt+kJ,i.start(0,()=>{o.current.scroll({left:n.current.left+O,top:n.current.top})})});return At(o,"scrollPositionChange",C),u?k.jsx(wpt,{ref:r,className:fe(g.root),ownerState:m,onDragOver:E,style:w}):null}const _J=ld(Ept),Bfe=x.createContext(void 0);function fs(){const e=x.useContext(Bfe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(`
+`));return e}const Opt=()=>{},Ipt=(e,t)=>{const n=x.useRef(!1);In(()=>n.current||!e?Opt:(n.current=!0,t()),[n.current||e])};function yn(e,t,n){const r=x.useRef(!0);In(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function Qo(e,t){const n=x.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const zfe=(e,t,n,r,o)=>{const i=Qo(e,"useNativeEventListener");sr(e,"rootMount",()=>{const a=t();if(!(!a||!n))return i.debug(`Binding native ${n} event`),a.addEventListener(n,r,o),()=>{i.debug(`Clearing native ${n} event`),a.removeEventListener(n,r,o)}})},Yw=e=>{const t=x.useRef(!0);t.current&&(t.current=!1,e())},Sf=(e,t)=>qw(e),iH=(e,t)=>Ge(e,qw),Ppt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",Apt=Ppt.includes("firefox"),Qw=Qr(e=>e.rowsMeta),YP=Qr(e=>e.virtualization);Pt(YP,e=>e.enabled);const Vfe=Pt(YP,e=>e.enabledForColumns),Mpt=Pt(YP,e=>e.enabledForRows),Xw=Pt(YP,e=>e.renderContext),Rpt=Yn(e=>e.current.state.virtualization.renderContext.firstColumnIndex,e=>e.current.state.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),oj={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},Dpt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return z({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:oj}})};function kpt(e,t){const n=i=>{e.current.setState(a=>z({},a,{virtualization:z({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};yn(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>z({},a,{virtualization:z({},a.virtualization,{enabledForColumns:i})}))}},"public"),x.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const aH=Qr(e=>e.rowSpanning),Hfe=Pt(aH,e=>e.hiddenCells),_pt=Pt(aH,e=>e.spannedCells),$pt=Pt(aH,e=>e.hiddenCellOriginMap),Jy=Qr(e=>e.listViewColumn),Npt=Pt(va,Xw,qw,Yr,(e,t,n,r)=>{if(!e)return!1;const o=n.rowIdToIndexMap.get(e.id),i=r.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex(s=>s.field===e.field);return!(o!==void 0&&i!==-1&&o>=t.firstRowIndex&&o<=t.lastRowIndex)}),Ufe=Yn(Npt,Yr,qw,va,(e,t,n,r)=>{if(!e)return null;const o=n.rowIdToIndexMap.get(r.id);if(o===void 0)return null;const i=t.findIndex(a=>a.field===r.field);return i===-1?null:z({},r,{rowIndex:o,columnIndex:i})});function Ig(e,t){return Math.round(e*10**t)/10**t}const OO=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent),b$=50;var wo=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(wo||{});const $J={top:0,left:0},Lpt=Object.freeze(new Map),Fpt=(e,t,n,r,o)=>({direction:wo.NONE,buffer:qfe(e,wo.NONE,t,n,r,o)}),jpt=()=>{var oe;const e=fs(),t=yt(),{listView:n}=t,r=Ge(e,()=>n?[Jy(e)]:Yr(e)),o=Ge(e,Mpt)&&!OO,i=Ge(e,Vfe)&&!OO,a=Ge(e,Bv),s=Vv(e),l=n?CO:s,c=a.bottom.length>0,[u,f]=x.useState(Lpt),p=vr(),m=Ge(e,Uw),g=iH(e),y=e.current.mainElementRef,v=e.current.virtualScrollerRef,w=e.current.virtualScrollbarVerticalRef,C=e.current.virtualScrollbarHorizontalRef,E=Ge(e,_dt),I=x.useRef(!1),O=Ge(e,HV),P=Ge(e,But),R=Ge(e,LP),D=Ge(e,Bpt),M=Ge(e,Kde),A=Ge(e,Wde),_=x.useRef(null),N=x.useCallback(ue=>{if(y.current=ue,!ue)return;const pe=ue.getBoundingClientRect();let Ee={width:Ig(pe.width,1),height:Ig(pe.height,1)};if((!_.current||Ee.width!==_.current.width&&Ee.height!==_.current.height)&&(_.current=Ee,e.current.publishEvent("resize",Ee)),typeof ResizeObserver>"u")return;const xe=new ResizeObserver(Re=>{const he=Re[0];if(!he)return;const Pe={width:Ig(he.contentRect.width,1),height:Ig(he.contentRect.height,1)};Pe.width===Ee.width&&Pe.height===Ee.height||(e.current.publishEvent("resize",Pe),Ee=Pe)});if(xe.observe(ue),jde>=19)return()=>{y.current=null,xe.disconnect()}},[e,y]),B=x.useRef(((oe=t.initialState)==null?void 0:oe.scroll)??$J),H=x.useRef(!1),j=x.useRef($J),L=x.useRef(oj),V=Ge(e,Xw),W=Ge(e,Ufe),K=_o(),G=x.useRef(void 0),q=Jl(()=>Fpt(p,t.rowBufferPx,t.columnBufferPx,O*15,b$*6)).current,Y=x.useCallback(ue=>{if(Hpt(ue,e.current.state.virtualization.renderContext))return;const pe=ue.firstRowIndex!==L.current.firstRowIndex||ue.lastRowIndex!==L.current.lastRowIndex;e.current.setState(xe=>z({},xe,{virtualization:z({},xe.virtualization,{renderContext:ue})})),fr(e).isReady&&pe&&(L.current=ue,e.current.publishEvent("renderedRowsIntervalChange",ue)),j.current=B.current},[e]),Z=Je(()=>{const ue=v.current;if(!ue)return;const pe=fr(e),Ee=Math.ceil(pe.minimumSize.height-pe.viewportOuterSize.height),xe=Math.ceil(pe.minimumSize.width-pe.viewportInnerSize.width),Re={top:Za(ue.scrollTop,0,Ee),left:p?Za(ue.scrollLeft,-xe,0):Za(ue.scrollLeft,0,xe)},he=Re.left-B.current.left,Pe=Re.top-B.current.top,ve=he!==0||Pe!==0;B.current=Re;const Ie=ve?Upt(he,Pe):wo.NONE,te=Math.abs(B.current.top-j.current.top),Te=Math.abs(B.current.left-j.current.left),De=te>=O||Te>=b$,Ve=q.direction!==Ie;if(!(De||Ve))return V;if(Ve)switch(Ie){case wo.NONE:case wo.LEFT:case wo.RIGHT:G.current=void 0;break;default:G.current=V;break}q.direction=Ie,q.buffer=qfe(p,Ie,t.rowBufferPx,t.columnBufferPx,O*15,b$*6);const rt=NJ(e,t,o,i),ut=LJ(rt,B.current,q);return ew.flushSync(()=>{Y(ut)}),K.start(1e3,Z),ut}),ie=()=>{if(!fr(e).isReady&&(o||i))return;const ue=NJ(e,t,o,i),pe=LJ(ue,B.current,q);G.current=void 0,Y(pe)},se=Je(()=>{if(H.current){H.current=!1;return}const ue=Z();e.current.publishEvent("scrollPositionChange",{top:B.current.top,left:B.current.left,renderContext:ue})}),ce=Je(ue=>{e.current.publishEvent("virtualScrollerWheel",{},ue)}),ye=Je(ue=>{e.current.publishEvent("virtualScrollerTouchMove",{},ue)}),Se=(ue={})=>{var rt;if(!ue.rows&&!g.range)return[];const pe=wi(e);let Ee=V;ue.renderContext&&(Ee=ue.renderContext,Ee.firstColumnIndex=V.firstColumnIndex,Ee.lastColumnIndex=V.lastColumnIndex);const xe=!c&&ue.position===void 0||c&&ue.position==="bottom",Re=ue.position!==void 0;let he;switch(ue.position){case"top":he=0;break;case"bottom":he=a.top.length+g.rows.length;break;case void 0:he=a.top.length;break}const Pe=ue.rows??g.rows,ve=Ee.firstRowIndex,Ie=Math.min(Ee.lastRowIndex,Pe.length),te=ue.rows?SJ(0,ue.rows.length):SJ(ve,Ie);let Te=-1;!Re&&W&&(W.rowIndex<ve&&(te.unshift(W.rowIndex),Te=W.rowIndex),W.rowIndex>Ie&&(te.push(W.rowIndex),Te=W.rowIndex));const De=[],Ve=(rt=t.slotProps)==null?void 0:rt.row,We=Xf(e);return te.forEach(ut=>{var oo,Ii,Kt;const{id:Be,model:et}=Pe[ut];if(!pe[Be])return;const Le=(((oo=g==null?void 0:g.range)==null?void 0:oo.firstRowIndex)||0)+he+ut;if(E){const un=l.left.length,gt=r.length-l.right.length;e.current.calculateColSpan({rowId:Be,minFirstColumn:un,maxLastColumn:gt,columns:r}),l.left.length>0&&e.current.calculateColSpan({rowId:Be,minFirstColumn:0,maxLastColumn:l.left.length,columns:r}),l.right.length>0&&e.current.calculateColSpan({rowId:Be,minFirstColumn:r.length-l.right.length,maxLastColumn:r.length,columns:r})}const It=e.current.rowHasAutoHeight(Be)?"auto":e.current.unstable_getRowHeight(Be),Lt=m.has(Be)&&e.current.isRowSelectable(Be);let nt=!1;ue.position===void 0&&(nt=ut===0);let lt=!1;const vt=ut===Pe.length-1;if(xe)if(Re)lt=vt;else{const un=g.rows.length-1;ut===un&&(lt=!0)}let bt=Ee;G.current&&ut>=G.current.firstRowIndex&&ut<G.current.lastRowIndex&&(bt=G.current);const vn=ut===Te,kn=(W==null?void 0:W.rowIndex)===Le,Rr=Gfe(We,bt,l.left.length),nr=vt&&ue.position==="top",Bn=bt.firstColumnIndex,yo=bt.lastColumnIndex;if(De.push(k.jsx(t.slots.row,z({row:et,rowId:Be,index:Le,selected:Lt,offsetLeft:Rr,columnsTotalWidth:R,rowHeight:It,pinnedColumns:l,visibleColumns:r,firstColumnIndex:Bn,lastColumnIndex:yo,focusedColumnIndex:kn?W.columnIndex:void 0,isFirstVisible:nt,isLastVisible:lt,isNotVisible:vn,showBottomBorder:nr,scrollbarWidth:M,gridHasFiller:A},Ve),Be)),vn)return;const Oo=u.get(Be);Oo&&De.push(Oo),ue.position===void 0&&vt&&De.push((Kt=(Ii=e.current).getInfiniteLoadingTriggerElement)==null?void 0:Kt.call(Ii,{lastRowId:Be}))}),De},ne=x.useMemo(()=>({overflowX:!D||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[D,t.autoHeight,n]),le=x.useMemo(()=>{const ue={width:D?R:"auto",flexBasis:P,flexShrink:0};return ue.flexBasis===0&&(ue.flexBasis=hfe),ue},[R,P,D]),de=x.useCallback(ue=>{ue&&e.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:R,contentHeight:P})},[e,R,P]);return In(()=>{var ue,pe;I.current&&((pe=(ue=e.current).updateRenderContext)==null||pe.call(ue))},[e,i,o]),In(()=>{n&&(v.current.scrollLeft=0)},[n,v]),Ipt(V!==oj,()=>{var ue;if(e.current.publishEvent("scrollPositionChange",{top:B.current.top,left:B.current.left,renderContext:V}),I.current=!0,(ue=t.initialState)!=null&&ue.scroll&&v.current){const pe=v.current,{top:Ee,left:xe}=t.initialState.scroll,Re={top:!(Ee>0),left:!(xe>0)};if(!Re.left&&R&&(pe.scrollLeft=xe,H.current=!0,Re.left=!0),!Re.top&&P&&(pe.scrollTop=Ee,H.current=!0,Re.top=!0),!Re.top||!Re.left){const he=e.current.subscribeEvent("virtualScrollerContentSizeChange",Pe=>{!Re.left&&Pe.columnsTotalWidth&&(pe.scrollLeft=xe,H.current=!0,Re.left=!0),!Re.top&&Pe.contentHeight&&(pe.scrollTop=Ee,H.current=!0,Re.top=!0),Re.left&&Re.top&&he()});return he}}}),e.current.register("private",{updateRenderContext:ie}),sr(e,"sortedRowsSet",ie),sr(e,"paginationModelChange",ie),sr(e,"columnsChange",ie),{renderContext:V,setPanels:f,getRows:Se,getContainerProps:()=>({ref:N}),getScrollerProps:()=>({ref:v,onScroll:se,onWheel:ce,onTouchMove:ye,style:ne,role:"presentation",tabIndex:Apt?-1:void 0}),getContentProps:()=>({style:le,role:"presentation",ref:de}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:w,scrollPosition:B}),getScrollbarHorizontalProps:()=>({ref:C,scrollPosition:B}),getScrollAreaProps:()=>({scrollPosition:B})}};function Bpt(e){return e.current.state.dimensions.viewportOuterSize.width>0&&e.current.state.dimensions.columnsTotalWidth>e.current.state.dimensions.viewportOuterSize.width}function NJ(e,t,n,r){const o=fr(e),i=Sf(e),a=t.listView?[Jy(e)]:Yr(e),s=$pt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:Qw(e),columnPositions:Xf(e),rows:i.rows,range:i.range,pinnedColumns:Vv(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function LJ(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(FJ(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const f=Math.min(...Object.values(c));l=Math.min(l,f)}const u=e.autoHeight?l+e.rows.length:FJ(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.listView)return z({},r,{lastColumnIndex:1});if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[f,p]=ij({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let m=f;m<p&&!u;m+=1){const g=e.rows[m];u=e.apiRef.current.rowHasAutoHeight(g.id)}(!u||e.virtualizeColumnsWithAutoRowHeight)&&(l=kf(a,e.columnPositions,{atStart:!0,lastPosition:e.columnsTotalWidth}),c=kf(a+e.viewportInnerWidth,e.columnPositions)),r.firstColumnIndex=l,r.lastColumnIndex=c}return zpt(e,r,n)}function FJ(e,t,n){var a,s;const r=e.apiRef.current.getLastMeasuredRowIndex();let o=r===1/0;(a=e.range)!=null&&a.lastRowIndex&&!o&&(o=r>=e.range.lastRowIndex);const i=Za(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?kf(t,e.rowsMeta.positions,n):Vpt(t,e.rowsMeta.positions,i,n)}function zpt(e,t,n){const[r,o]=ij({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=ij({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=bpt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function kf(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l<a}else s=e<=a;return s?kf(e,t,n,r,i):kf(e,t,n,i+1,o)}function Vpt(e,t,n,r=void 0){let o=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=o,o*=2;return kf(e,t,r,Math.floor(n/2),Math.min(n,t.length))}function ij({firstIndex:e,lastIndex:t,bufferBefore:n,bufferAfter:r,minFirstIndex:o,maxLastIndex:i,positions:a,lastSize:s}){const l=a[e]-n,c=a[t]+r,u=kf(l,a,{atStart:!0,lastPosition:a[a.length-1]+s}),f=kf(c,a);return[Za(u,o,i),Za(f,o,i)]}function Hpt(e,t){return e===t?!0:e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}function Gfe(e,t,n){const r=(e[t.firstColumnIndex]??0)-(e[n]??0);return Math.abs(r)}function Upt(e,t){return e===0&&t===0?wo.NONE:Math.abs(t)>=Math.abs(e)?t>0?wo.DOWN:wo.UP:e>0?wo.RIGHT:wo.LEFT}function qfe(e,t,n,r,o,i){if(e)switch(t){case wo.LEFT:t=wo.RIGHT;break;case wo.RIGHT:t=wo.LEFT;break}switch(t){case wo.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case wo.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case wo.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case wo.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case wo.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const Gpt=Nn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant"&&e!=="right"})(({overlayType:e,loadingOverlayVariant:t,right:n})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${n}px`,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),qpt=Nn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant"})({}),Wpt=e=>{const{classes:t}=e;return Me({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Cn,t)};function Kpt(e){const t=tn(),n=yt(),r=Ge(t,fr);let o=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);o===0&&(o=hfe);const i=Wpt(z({},e,{classes:n.classes}));return k.jsx(Gpt,z({className:fe(i.root)},e,{right:r.columnsTotalWidth-r.viewportOuterSize.width,children:k.jsx(qpt,z({className:fe(i.inner),style:{height:o,width:r.viewportOuterSize.width}},e))}))}const sH=Qr(e=>e.pivoting),kh=Pt(sH,e=>e==null?void 0:e.active),Ypt=new Map,Wfe=Pt(sH,e=>(e==null?void 0:e.initialColumns)||Ypt);Pt(sH,e=>e==null?void 0:e.panelOpen);const Qpt=()=>{var w,C;const e=tn(),t=yt(),n=Ge(e,Hw),r=Ge(e,XV),o=Ge(e,Jde),i=Ge(e,Yr),a=n===0&&o===0,s=Ge(e,cdt),l=Ge(e,kh),c=!s&&a,u=!s&&n>0&&r===0,f=!s&&i.length===0,p=c&&l;let m=null,g=null;c&&(m="noRowsOverlay"),f&&(m="noColumnsOverlay"),p&&(m="emptyPivotOverlay"),u&&(m="noResultsOverlay"),s&&(m="loadingOverlay",g=((C=(w=t.slotProps)==null?void 0:w.loadingOverlay)==null?void 0:C[a?"noRowsVariant":"variant"])??(a?"skeleton":"linear-progress"));const y={overlayType:m,loadingOverlayVariant:g};return{getOverlay:()=>{var O,P;if(!m)return null;const E=(O=t.slots)==null?void 0:O[m],I=(P=t.slotProps)==null?void 0:P[m];return k.jsx(Kpt,z({},y,{children:k.jsx(E,z({},I))}))},overlaysProps:y}},kE=Qr(e=>e.columnMenu);function Xpt(){var v;const e=fs(),t=yt(),n=Ge(e,Yr),r=Ge(e,Sft),o=Ge(e,bft),i=Ge(e,Ofe),a=Ge(e,()=>tH(e)===null),s=Ge(e,Mft),l=Ge(e,Aft),c=Ge(e,EO),u=Ge(e,Kw),f=Ge(e,kE),p=Ge(e,Fl),m=Ge(e,gpt),g=!(s===null&&i===null&&a),y=e.current.columnHeadersContainerRef;return k.jsx(t.slots.columnHeaders,z({ref:y,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:f,columnVisibility:p,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g},(v=t.slotProps)==null?void 0:v.columnHeaders))}const Jpt=ld(Xpt),Zpt=Nn("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),eht=Nn("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:n,loadingOverlayVariant:r,overlayType:o}=e,i=r==="skeleton"||o==="noColumnsOverlay";return[t.main,n.hasPinnedRight&&t["main--hasPinnedRight"],i&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),tht=Vt((e,t)=>{var a;const{ownerState:n}=e,r=yt(),i=FP().hooks.useGridAriaAttributes();return k.jsxs(eht,z({ownerState:n,className:e.className,tabIndex:-1},i,(a=r.slotProps)==null?void 0:a.main,{ref:t,children:[k.jsx(Zpt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),nht=()=>Me({root:["topContainer"]},Cn,{}),rht=Nn("div")({position:"sticky",zIndex:40,top:0});function oht(e){const t=nht();return k.jsx(rht,z({},e,{className:fe(t.root,ee["container--top"]),role:"presentation"}))}const iht=(e,t)=>{const{classes:n}=e;return Me({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},Cn,n)},aht=Nn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScrollerContent,n.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),sht=Vt(function(t,n){var s;const r=yt(),o=!r.autoHeight&&((s=t.style)==null?void 0:s.minHeight)==="auto",i=iht(r,o),a={classes:r.classes,overflowedContent:o};return k.jsx(aht,z({},t,{ownerState:a,className:fe(i.root,t.className),ref:n}))}),lht=Nn("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Kfe=Nn("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:Ct.cell.background.pinned}),cht=Nn(Kfe)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),uht=Nn(Kfe)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),dht=Nn("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function fht({rowsLength:e}){const t=tn(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Ge(t,fr),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:k.jsxs(lht,{className:ee.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&k.jsx(cht,{className:ee["filler--pinnedLeft"],style:{width:s}}),k.jsx(dht,{}),l>0&&k.jsx(uht,{className:ee["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const pht=ld(fht),hht=["className"],mht=e=>{const{classes:t}=e;return Me({root:["virtualScrollerRenderZone"]},Cn,t)},ght=Nn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),yht=Vt(function(t,n){const{className:r}=t,o=$e(t,hht),i=tn(),a=yt(),s=mht(a),l=Ge(i,()=>{const c=Xw(i);return Qw(i).positions[c.firstRowIndex]??0});return k.jsx(ght,z({className:fe(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o,{ref:n}))}),vht={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},zo=Qr(e=>e.editRows),Yfe=Pt(zo,(e,{rowId:t,editMode:n})=>n===Vc.Row&&!!e[t]),bht=Pt(zo,(e,{rowId:t,field:n})=>{var r;return((r=e[t])==null?void 0:r[n])??null}),_h=Qr(e=>e.preferencePanel),xht=Pt(_h,(e,t)=>!!(e.open&&e.labelId===t));var oa=function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e}(oa||{});function Sht(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}class wht{constructor({ttl:t=3e5,getKey:n=Sht}){this.cache=void 0,this.ttl=void 0,this.getKey=void 0,this.cache={},this.ttl=t,this.getKey=n}set(t,n){const r=this.getKey(t),o=Date.now()+this.ttl;this.cache[r]={value:n,expiry:o}}get(t){const n=this.getKey(t),r=this.cache[n];if(r){if(Date.now()>r.expiry){delete this.cache[n];return}return r.value}}clear(){this.cache={}}}class Cht extends Error{constructor(t){super(t.message),this.params=void 0,this.cause=void 0,this.name="GridGetRowsError",this.params=t.params,this.cause=t.cause}}class Eht extends Error{constructor(t){super(t.message),this.params=void 0,this.cause=void 0,this.name="GridUpdateRowError",this.params=t.params,this.cause=t.cause}}const Tht=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return Me(r,Cn,n)},Qfe=Nn("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),Oht=Nn(Qfe)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),Iht=Nn(Qfe)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),jJ=Vt(function(t,n){const r=fs(),o=yt(),i=x.useRef(!1),a=x.useRef(0),s=x.useRef(null),l=x.useRef(null),c=Tht(o,t.position),u=Ge(r,fr),f=t.position==="vertical"?"height":"width",p=t.position==="vertical"?"scrollTop":"scrollLeft",m=t.position==="vertical"?"top":"left",g=t.position==="vertical"?u.hasScrollX:u.hasScrollY,y=u.minimumSize[f]+(g?u.scrollbarSize:0),w=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(y/u.viewportOuterSize[f]),C=Je(()=>{const O=s.current,P=t.scrollPosition.current;if(!O||P[m]===a.current)return;if(a.current=P[m],i.current){i.current=!1;return}i.current=!0;const R=P[m]/y;O[p]=R*w}),E=Je(()=>{const O=r.current.virtualScrollerRef.current,P=s.current;if(!P)return;if(i.current){i.current=!1;return}i.current=!0;const R=P[p]/w;O[p]=R*y});Lj(()=>{const O=r.current.virtualScrollerRef.current,P=s.current,R={passive:!0};return O.addEventListener("scroll",C,R),P.addEventListener("scroll",E,R),()=>{O.removeEventListener("scroll",C,R),P.removeEventListener("scroll",E,R)}}),x.useEffect(()=>{l.current.style.setProperty(f,`${w}px`)},[w,f]);const I=t.position==="vertical"?Oht:Iht;return k.jsx(I,{ref:en(n,s),className:c.root,style:t.position==="vertical"&&o.listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:O=>{O.target.blur()},children:k.jsx("div",{ref:l,className:c.content})})}),Pht=e=>{const{classes:t,hasScrollX:n,hasPinnedRight:r,loadingOverlayVariant:o,overlayType:i}=e;return Me({root:["main",r&&"main--hasPinnedRight",(o==="skeleton"||i==="noColumnsOverlay")&&"main--hiddenContent"],scroller:["virtualScroller",n&&"virtualScroller--hasScrollX"]},Cn,t)},Aht=Nn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScroller,n.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),Mht=e=>e.current.state.dimensions.rightPinnedWidth>0;function Rht(e){const t=tn(),n=yt(),r=Ge(t,Vut),o=Ge(t,zut),i=Ge(t,Mht),a=Ge(t,qut),{getOverlay:s,overlaysProps:l}=Qpt(),c=z({classes:n.classes,hasScrollX:o,hasPinnedRight:i},l),u=Pht(c),f=jpt(),{getContainerProps:p,getScrollerProps:m,getContentProps:g,getRenderZoneProps:y,getScrollbarVerticalProps:v,getScrollbarHorizontalProps:w,getRows:C,getScrollAreaProps:E}=f,I=C();return k.jsxs(tht,z({className:u.root},p(),{ownerState:c,children:[k.jsx(_J,z({scrollDirection:"left"},E())),k.jsx(_J,z({scrollDirection:"right"},E())),k.jsxs(Aht,z({className:u.scroller},m(),{ownerState:c,children:[k.jsxs(oht,{children:[!n.listView&&k.jsx(Jpt,{}),k.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:f})]}),s(),k.jsx(sht,z({},g(),{children:k.jsxs(yht,z({},y(),{children:[I,k.jsx(n.slots.detailPanels,{virtualScroller:f})]}))})),a&&k.jsx(pht,{rowsLength:I.length}),k.jsx(n.slots.bottomContainer,{children:k.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:f})})]})),o&&!n.listView&&k.jsx(jJ,z({position:"horizontal"},w())),r&&k.jsx(jJ,z({position:"vertical"},v())),e.children]}))}function Dht(){var t;const e=yt();return e.hideFooter?null:k.jsx(e.slots.footer,z({},(t=e.slotProps)==null?void 0:t.footer))}let x$;function kht(){return x$===void 0&&document.createElement("div").focus({get preventScroll(){return x$=!0,!1}}),x$}function _ht({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=z({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}const $ht=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},Nht=e=>e===gfe||$ht(e)!==null,Xfe=(e,t)=>{if(e)if(t){if(e===On.LEFT)return"right";if(e===On.RIGHT)return"left"}else{if(e===On.LEFT)return"left";if(e===On.RIGHT)return"right"}};function QP(e,t,n,r){const o=Xfe(n,t);return!o||r===void 0||(e[o]=r),e}const Lht=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],Fht=["changeReason","unstable_updateValueOnRender"];On.LEFT+"",Kd.LEFT,On.RIGHT+"",Kd.RIGHT,On.NONE+"",On.VIRTUAL+"";const jht=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${Oe(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===On.LEFT&&"cell--pinnedLeft",o===On.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return Me(c,Cn,l)},Bht=Vt(function(t,n){var Le,It,Lt;const{column:r,row:o,rowId:i,rowNode:a,align:s,colIndex:l,width:c,className:u,style:f,colSpan:p,disableDragEvents:m,isNotVisible:g,pinnedOffset:y,pinnedPosition:v,showRightBorder:w,showLeftBorder:C,onClick:E,onDoubleClick:I,onMouseDown:O,onMouseUp:P,onMouseOver:R,onKeyDown:D,onKeyUp:M,onDragEnter:A,onDragOver:_}=t,N=$e(t,Lht),B=fs(),H=yt(),j=vr(),L=r.field,V=Ge(B,bht,{rowId:i,field:L}),K=FP().hooks.useCellAggregationResult(i,L),G=V?Qn.Edit:Qn.View,q=B.current.getCellParamsForRow(i,L,o,{colDef:r,cellMode:G,rowNode:a,tabIndex:Ge(B,()=>{const nt=tH(B);return nt&&nt.field===L&&nt.id===i?0:-1}),hasFocus:Ge(B,()=>{const nt=va(B);return(nt==null?void 0:nt.id)===i&&nt.field===L})});q.api=B.current,K&&(q.value=K.value,q.formattedValue=r.valueFormatter?r.valueFormatter(q.value,o,r,B):q.value);const Y=Ge(B,()=>B.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:i,field:L})),Z=Ge(B,Hfe),ie=Ge(B,_pt),{hasFocus:se,isEditable:ce=!1,value:ye}=q,Se=r.type==="actions"&&((Le=r.getActions)==null?void 0:Le.call(r,B.current.getRowParams(i)).some(nt=>!nt.props.disabled)),ne=(G==="view"||!ce)&&!Se?q.tabIndex:-1,{classes:le,getCellClassName:de}=H,ue=[Ge(B,()=>B.current.unstable_applyPipeProcessors("cellClassName",[],{id:i,field:L}).filter(Boolean).join(" "))];r.cellClassName&&ue.push(typeof r.cellClassName=="function"?r.cellClassName(q):r.cellClassName),r.display==="flex"&&ue.push(ee["cell--flex"]),de&&ue.push(de(q));const pe=q.formattedValue??ye,Ee=x.useRef(null),xe=en(n,Ee),Re=x.useRef(null),he=H.cellSelection??!1,Pe={align:s,showLeftBorder:C,showRightBorder:w,isEditable:ce,classes:H.classes,pinnedPosition:v,isSelected:Y,isSelectionMode:he},ve=jht(Pe),Ie=x.useCallback(nt=>lt=>{const vt=B.current.getCellParams(i,L||"");B.current.publishEvent(nt,vt,lt),P&&P(lt)},[B,L,P,i]),te=x.useCallback(nt=>lt=>{const vt=B.current.getCellParams(i,L||"");B.current.publishEvent(nt,vt,lt),O&&O(lt)},[B,L,O,i]),Te=x.useCallback((nt,lt)=>vt=>{if(!B.current.getRow(i))return;const bt=B.current.getCellParams(i,L||"");B.current.publishEvent(nt,bt,vt),lt&&lt(vt)},[B,L,i]),De=((It=Z[i])==null?void 0:It[L])??!1,Ve=((Lt=ie[i])==null?void 0:Lt[L])??1,We=x.useMemo(()=>{if(g)return{padding:0,opacity:0,width:0,height:0,border:0};const nt=QP(z({"--width":`${c}px`},f),j,v,y),lt=v===On.LEFT,vt=v===On.RIGHT;return Ve>1&&(nt.height=`calc(var(--height) * ${Ve})`,nt.zIndex=10,(lt||vt)&&(nt.zIndex=40)),nt},[c,g,f,y,v,j,Ve]);if(x.useEffect(()=>{if(!se||G===Qn.Edit)return;const nt=Mr(B.current.rootElementRef.current);if(Ee.current&&!Ee.current.contains(nt.activeElement)){const lt=Ee.current.querySelector('[tabindex="0"]'),vt=Re.current||lt||Ee.current;if(kht())vt.focus({preventScroll:!0});else{const bt=B.current.getScrollPosition();vt.focus(),B.current.scroll(bt)}}},[se,G,B]),De)return k.jsx("div",{"data-colindex":l,role:"presentation",style:z({width:"var(--width)"},We)});let rt=N.onFocus,ut,Be;if(V===null&&r.renderCell&&(ut=r.renderCell(q)),V!==null&&r.renderEditCell){const nt=B.current.getRowWithUpdatedValues(i,r.field),lt=$e(V,Fht),vt=r.valueFormatter?r.valueFormatter(V.value,nt,r,B):q.formattedValue,bt=z({},q,{row:nt,formattedValue:vt},lt);ut=r.renderEditCell(bt),ue.push(ee["cell--editing"]),ue.push(le==null?void 0:le["cell--editing"])}if(ut===void 0){const nt=pe==null?void 0:pe.toString();ut=nt,Be=nt}x.isValidElement(ut)&&Se&&(ut=x.cloneElement(ut,{focusElementRef:Re}));const et=m?null:{onDragEnter:Te("cellDragEnter",A),onDragOver:Te("cellDragOver",_)};return k.jsx("div",z({className:fe(ve.root,ue,u),role:"gridcell","data-field":L,"data-colindex":l,"aria-colindex":l+1,"aria-colspan":p,"aria-rowspan":Ve,style:We,title:Be,tabIndex:ne,onClick:Te("cellClick",E),onDoubleClick:Te("cellDoubleClick",I),onMouseOver:Te("cellMouseOver",R),onMouseDown:te("cellMouseDown"),onMouseUp:Ie("cellMouseUp"),onKeyDown:Te("cellKeyDown",D),onKeyUp:Te("cellKeyUp",M)},et,N,{onFocus:rt,ref:xe,children:ut}))}),zht=ld(Bht),Vht=["label","icon","showInMenu","onClick"],Hht=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],yf=Vt((e,t)=>{var u;const n=yt();if(!e.showInMenu){const{label:f,icon:p,onClick:m}=e,g=$e(e,Vht),y=v=>{m==null||m(v)};return k.jsx(n.slots.baseIconButton,z({size:"small",role:"menuitem","aria-label":f},g,{onClick:y},(u=n.slotProps)==null?void 0:u.baseIconButton,{ref:t,children:x.cloneElement(p,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=$e(e,Hht),c=f=>{i==null||i(f),a&&(s==null||s())};return k.jsx(n.slots.baseMenuItem,z({ref:t},l,{onClick:c,iconStart:o,children:r}))}),Uht=["field","type","align","width","height","empty","style","className"],BJ="1.3em",Ght="1.2em",zJ=[40,80],qht={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},Wht=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?Oe(t):"Left"}`,r&&"cellEmpty"]};return Me(o,Cn,n)},Kht=Odt(12345);function Yht(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=$e(e,Uht),u=yt(),f={classes:u.classes,align:r,empty:a},p=Wht(f),m=x.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:BJ,height:BJ};const[y,v]=n?qht[n]??zJ:zJ;return{variant:"text",width:`${Math.round(Kht(y,v))}%`,height:Ght}},[n]);return k.jsx("div",z({"data-field":t,className:fe(p.root,l),style:z({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&k.jsx(u.slots.baseSkeleton,z({},m))}))}const Qht=ld(Yht),Xht=10,rE=-5,ag=1,VJ={width:3,rx:1.5,x:10.5},Jht="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",Zht=e=>e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||e.current.state.dimensions.scrollbarSize===0),emt=ae("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${ee.autoHeight}`]:t.autoHeight},{[`&.${ee.autosizing}`]:t.autosizing},{[`&.${ee["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${ee["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${ee["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${ee["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${ee["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${ee.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${ee.actionsCell}`]:t.actionsCell},{[`& .${ee.booleanCell}`]:t.booleanCell},{[`& .${ee.cell}`]:t.cell},{[`& .${ee["cell--editable"]}`]:t["cell--editable"]},{[`& .${ee["cell--editing"]}`]:t["cell--editing"]},{[`& .${ee["cell--flex"]}`]:t["cell--flex"]},{[`& .${ee["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${ee["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${ee["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${ee["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${ee["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${ee["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${ee["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${ee["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${ee["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${ee["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${ee["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${ee["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${ee.cellCheckbox}`]:t.cellCheckbox},{[`& .${ee.cellEmpty}`]:t.cellEmpty},{[`& .${ee.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${ee.cellSkeleton}`]:t.cellSkeleton},{[`& .${ee.checkboxInput}`]:t.checkboxInput},{[`& .${ee.columnHeader}`]:t.columnHeader},{[`& .${ee["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${ee["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${ee["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${ee["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${ee["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${ee["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${ee["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${ee["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${ee["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${ee["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${ee["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${ee["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${ee["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${ee["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${ee["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${ee["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${ee["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${ee["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${ee.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${ee.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${ee.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${ee.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${ee.columnSeparator}`]:t.columnSeparator},{[`& .${ee["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${ee["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${ee["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${ee["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${ee["container--bottom"]}`]:t["container--bottom"]},{[`& .${ee["container--top"]}`]:t["container--top"]},{[`& .${ee.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${ee["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${ee.editBooleanCell}`]:t.editBooleanCell},{[`& .${ee.filterIcon}`]:t.filterIcon},{[`& .${ee["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${ee["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${ee["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${ee.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${ee.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${ee.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${ee.headerFilterRow}`]:t.headerFilterRow},{[`& .${ee.iconSeparator}`]:t.iconSeparator},{[`& .${ee.menuIcon}`]:t.menuIcon},{[`& .${ee.menuIconButton}`]:t.menuIconButton},{[`& .${ee.menuList}`]:t.menuList},{[`& .${ee.menuOpen}`]:t.menuOpen},{[`& .${ee.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${ee.pinnedRows}`]:t.pinnedRows},{[`& .${ee["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${ee["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${ee.row}`]:t.row},{[`& .${ee["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${ee["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${ee["row--dragging"]}`]:t["row--dragging"]},{[`& .${ee["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${ee["row--editable"]}`]:t["row--editable"]},{[`& .${ee["row--editing"]}`]:t["row--editing"]},{[`& .${ee["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${ee["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${ee.rowReorderCell}`]:t.rowReorderCell},{[`& .${ee["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${ee.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${ee.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${ee.rowSkeleton}`]:t.rowSkeleton},{[`& .${ee.scrollbar}`]:t.scrollbar},{[`& .${ee["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${ee["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${ee.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${ee["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${ee["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${ee["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${ee["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${ee.sortIcon}`]:t.sortIcon},{[`& .${ee.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${ee.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${ee.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${ee.withBorderColor}`]:t.withBorderColor}]})(()=>{const e=fs(),t=Ge(e,Zht),n=Ct.colors.background.base,r=Ct.header.background.base,o=Ct.cell.background.pinned,i=tmt(Ct.colors.interactive.hover),a=Ct.colors.interactive.hoverOpacity,s=Ct.colors.interactive.selected,l=Ct.colors.interactive.selectedOpacity,c=s,u=`calc(${l} + ${a})`,f=Bd(n,i,a),p=Bd(n,s,l),m=Bd(n,c,u),g=Bd(o,i,a),y=Bd(o,s,l),v=Bd(o,c,u),w=R=>({[`& .${ee["cell--pinnedLeft"]}, & .${ee["cell--pinnedRight"]}`]:{backgroundColor:R,"&.Mui-selected":{backgroundColor:Bd(R,p,l),"&:hover":{backgroundColor:Bd(R,m,u)}}}}),C=w(g),E=w(y),I=w(v),O={backgroundColor:p,"&:hover":{backgroundColor:m,"@media (hover: none)":{backgroundColor:p}}};return{"--unstable_DataGrid-radius":Ct.radius.base,"--unstable_DataGrid-headWeight":Ct.typography.fontWeight.medium,"--DataGrid-rowBorderColor":Ct.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:Ct.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:Ct.colors.background.base,color:Ct.colors.foreground.base,font:Ct.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${ee.main} > *:first-child${Jht}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${ee.autoHeight}`]:{height:"auto"},[`&.${ee.autosizing}`]:{[`& .${ee.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${ee.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${ee.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${ee.groupingCriteriaCell}`]:{width:"unset"},[`& .${ee.treeDataGroupingCell}`]:{width:"unset"}},[`&.${ee.withSidePanel}`]:{flexDirection:"row"},[`& .${ee.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${ee.columnHeader}, & .${ee.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${ee.columnHeader}:focus-within, & .${ee.cell}:focus-within`]:{outline:`solid ${Jfe(Ct.colors.interactive.focus,.5)} ${ag}px`,outlineOffset:ag*-1},[`& .${ee.columnHeader}:focus, & .${ee.cell}:focus`]:{outline:`solid ${Ct.colors.interactive.focus} ${ag}px`,outlineOffset:ag*-1},[`& .${ee.columnHeader}:focus,
& .${ee["columnHeader--withLeftBorder"]},
& .${ee["columnHeader--withRightBorder"]},
& .${ee["columnHeader--siblingFocused"]},
@@ -405,16 +405,16 @@ return result$$;`.replaceAll("$$",String(wJ)));return wJ+=1,(s,l)=>i(o,s,l)},lfe
`]:{[`& .${ee.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${ee["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${ee["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${ee["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${ee["root--noToolbar"]} [aria-rowindex="1"] .${ee["columnHeader--last"]}`]:{borderTopRightRadius:t?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${ee.columnHeaderCheckbox}, & .${ee.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${ee.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:r},[`& .${ee["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${ee["virtualScroller--hasScrollX"]} .${ee["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${ee["pivotPanelField--sorted"]} .${ee.iconButtonContainer},
& .${ee["columnHeader--sorted"]} .${ee.iconButtonContainer},
& .${ee["columnHeader--filtered"]} .${ee.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ee.pivotPanelField}:not(.${ee["pivotPanelField--sorted"]}) .${ee.sortButton},
- & .${ee.columnHeader}:not(.${ee["columnHeader--sorted"]}) .${ee.sortButton}`]:{opacity:0,transition:Ct.transition(["opacity"],{duration:Ct.transitions.duration.short})},[`& .${ee.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:Ct.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${ee.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${ee["columnHeader--filledGroup"]} .${ee.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${ee.sortIcon}, & .${ee.filterIcon}`]:{fontSize:"inherit"},[`& .${ee["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${ee["columnHeader--alignCenter"]} .${ee.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${ee["columnHeader--alignRight"]} .${ee.columnHeaderDraggableContainer}, & .${ee["columnHeader--alignRight"]} .${ee.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${ee["columnHeader--alignCenter"]} .${ee.menuIcon}`]:{marginLeft:"auto"},[`& .${ee["columnHeader--alignRight"]} .${ee.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${ee["columnHeader--moving"]}`]:{backgroundColor:f},[`& .${ee["columnHeader--pinnedLeft"]}, & .${ee["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:Ct.header.background.base},[`& .${ee.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:Qht,color:Ct.colors.border.base},[`& .${ee.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:r},"@media (hover: hover)":{[`& .${ee.columnHeader}:hover`]:{[`& .${ee.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${ee.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${ee.columnHeader}:not(.${ee["columnHeader--sorted"]}):hover .${ee.sortButton},
+ & .${ee.columnHeader}:not(.${ee["columnHeader--sorted"]}) .${ee.sortButton}`]:{opacity:0,transition:Ct.transition(["opacity"],{duration:Ct.transitions.duration.short})},[`& .${ee.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:Ct.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${ee.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${ee["columnHeader--filledGroup"]} .${ee.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${ee.sortIcon}, & .${ee.filterIcon}`]:{fontSize:"inherit"},[`& .${ee["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${ee["columnHeader--alignCenter"]} .${ee.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${ee["columnHeader--alignRight"]} .${ee.columnHeaderDraggableContainer}, & .${ee["columnHeader--alignRight"]} .${ee.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${ee["columnHeader--alignCenter"]} .${ee.menuIcon}`]:{marginLeft:"auto"},[`& .${ee["columnHeader--alignRight"]} .${ee.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${ee["columnHeader--moving"]}`]:{backgroundColor:f},[`& .${ee["columnHeader--pinnedLeft"]}, & .${ee["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:Ct.header.background.base},[`& .${ee.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:Xht,color:Ct.colors.border.base},[`& .${ee.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:r},"@media (hover: hover)":{[`& .${ee.columnHeader}:hover`]:{[`& .${ee.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${ee.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${ee.columnHeader}:not(.${ee["columnHeader--sorted"]}):hover .${ee.sortButton},
& .${ee.pivotPanelField}:not(.${ee["pivotPanelField--sorted"]}):hover .${ee.sortButton},
& .${ee.pivotPanelField}:not(.${ee["pivotPanelField--sorted"]}) .${ee.sortButton}:focus-visible`]:{opacity:.5}},"@media (hover: none)":{[`& .${ee.columnHeader} .${ee.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${ee.columnHeader}:focus,
- & .${ee["columnHeader--siblingFocused"]}`]:{[`.${ee["columnSeparator--resizable"]}`]:{color:Ct.colors.foreground.accent}},[`& .${ee.pivotPanelField}:not(.${ee["pivotPanelField--sorted"]}) .${ee.sortButton}`]:{opacity:.5}},[`& .${ee["columnSeparator--sideLeft"]}`]:{left:nE},[`& .${ee["columnSeparator--sideRight"]}`]:{right:nE},[`& .${ee["columnHeader--withRightBorder"]} .${ee["columnSeparator--sideLeft"]}`]:{left:nE-.5},[`& .${ee["columnHeader--withRightBorder"]} .${ee["columnSeparator--sideRight"]}`]:{right:nE-.5},[`& .${ee["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${ee["columnSeparator--resizing"]}`]:{color:Ct.colors.foreground.accent},"@media (hover: none)":{[`& .${ee.iconSeparator} rect`]:zJ},"@media (hover: hover)":{"&:hover":{color:Ct.colors.foreground.accent,[`& .${ee.iconSeparator} rect`]:zJ}},"& svg":{pointerEvents:"none"}},[`& .${ee.iconSeparator}`]:{color:"inherit",transition:Ct.transition(["color","width"],{duration:Ct.transitions.duration.short})},[`& .${ee.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${ee.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${ee.headerFilterRow}`]:{[`& .${ee.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${ee["row--borderBottom"]} .${ee.columnHeader},
+ & .${ee["columnHeader--siblingFocused"]}`]:{[`.${ee["columnSeparator--resizable"]}`]:{color:Ct.colors.foreground.accent}},[`& .${ee.pivotPanelField}:not(.${ee["pivotPanelField--sorted"]}) .${ee.sortButton}`]:{opacity:.5}},[`& .${ee["columnSeparator--sideLeft"]}`]:{left:rE},[`& .${ee["columnSeparator--sideRight"]}`]:{right:rE},[`& .${ee["columnHeader--withRightBorder"]} .${ee["columnSeparator--sideLeft"]}`]:{left:rE-.5},[`& .${ee["columnHeader--withRightBorder"]} .${ee["columnSeparator--sideRight"]}`]:{right:rE-.5},[`& .${ee["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${ee["columnSeparator--resizing"]}`]:{color:Ct.colors.foreground.accent},"@media (hover: none)":{[`& .${ee.iconSeparator} rect`]:VJ},"@media (hover: hover)":{"&:hover":{color:Ct.colors.foreground.accent,[`& .${ee.iconSeparator} rect`]:VJ}},"& svg":{pointerEvents:"none"}},[`& .${ee.iconSeparator}`]:{color:"inherit",transition:Ct.transition(["color","width"],{duration:Ct.transitions.duration.short})},[`& .${ee.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${ee.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${ee.headerFilterRow}`]:{[`& .${ee.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${ee["row--borderBottom"]} .${ee.columnHeader},
& .${ee["row--borderBottom"]} .${ee.filler},
- & .${ee["row--borderBottom"]} .${ee.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ee["row--borderBottom"]} .${ee.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${ee.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${ee["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:f,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ee.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":O},[`& .${ee["container--top"]}, & .${ee["container--bottom"]}`]:{"[role=row]":{background:Ct.colors.background.base}},[`& .${ee.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":O},[`& .${ee["virtualScrollerContent--overflowed"]} .${ee["row--lastVisible"]} .${ee.cell}`]:{borderTopColor:"transparent"},[`& .${ee.pinnedRows} .${ee.row}, .${ee.aggregationRowOverlayWrapper} .${ee.row}`]:{backgroundColor:o,"&:hover":{backgroundColor:g}},[`& .${ee["pinnedRows--top"]} :first-of-type`]:{[`& .${ee.cell}, .${ee.scrollbarFiller}`]:{borderTop:"none"}},[`&.${ee["root--disableUserSelection"]} .${ee.cell}`]:{userSelect:"none"},[`& .${ee["row--dynamicHeight"]} > .${ee.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${ee.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${ee.cell}.${ee["cell--selectionMode"]}`]:{cursor:"default"},[`& .${ee.cell}.${ee["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:Ct.shadows.base,backgroundColor:Ct.colors.background.overlay,"&:focus-within":{outline:`${ig}px solid ${Ct.colors.interactive.focus}`,outlineOffset:ig*-1}},[`& .${ee["row--editing"]}`]:{boxShadow:Ct.shadows.base},[`& .${ee["row--editing"]} .${ee.cell}`]:{boxShadow:"none",backgroundColor:Ct.colors.background.overlay},[`& .${ee.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${ee.booleanCell}[data-value="true"]`]:{color:Ct.colors.foreground.muted},[`& .${ee.booleanCell}[data-value="false"]`]:{color:Ct.colors.foreground.disabled},[`& .${ee.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:Ct.spacing(1)},[`& .${ee.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:Ct.colors.interactive.disabledOpacity},[`& .${ee["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${ee.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${ee.withBorderColor}`]:{borderColor:Ct.colors.border.base},[`& .${ee["cell--withLeftBorder"]}, & .${ee["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${ee["cell--withRightBorder"]}, & .${ee["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ee["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${ee["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${ee["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${ee["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${ee["cell--pinnedLeft"]}, & .${ee["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:Ct.cell.background.pinned,"&.Mui-selected":{backgroundColor:y}},[`& .${ee.row}`]:{"&:hover":C,"&.Mui-selected":E,"&.Mui-selected:hover":I},[`& .${ee.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${ee.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${ee.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${ee.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${ee["columnHeader--dragging"]}, & .${ee["row--dragging"]}`]:{background:Ct.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:Ct.colors.interactive.disabledOpacity},[`& .${ee["row--dragging"]}`]:{background:Ct.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:Ct.colors.interactive.disabledOpacity,[`& .${ee.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${ee.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ee.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:Ct.spacing(2)},[`& .${ee.treeDataGroupingCellLoadingContainer}, .${ee.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${ee.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ee.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:Ct.spacing(2)},[`.${ee.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${ee["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ee["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ee["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:Ct.cell.background.pinned,position:"sticky",right:0}},[`& .${ee.filler}`]:{flex:"1 0 auto"},[`& .${ee["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ee["main--hiddenContent"]}`]:{[`& .${ee.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${ee["scrollbar--vertical"]}, & .${ee.pinnedRows}, & .${ee.virtualScroller} > .${ee.filler}`]:{display:"none"}}}});function Xfe(e,t){return`rgba(from ${e} r g b / ${t})`}function emt(e){return Xfe(e,1)}function Fd(e,t,n){return`color-mix(in srgb,${e}, ${t} calc(${n} * 100%))`}const tmt=()=>()=>{},nmt=()=>!1,rmt=()=>!0,omt=()=>Hde.useSyncExternalStore(tmt,nmt,rmt),Jfe=x.createContext(void 0);function sH(){const e=x.useContext(Jfe);if(e===void 0)throw new Error("MUI X: Missing context.");return e}function imt({children:e}){const t=x.useRef(null),n=x.useRef(null),r=x.useRef(null),o=x.useMemo(()=>({columnsPanelTriggerRef:t,filterPanelTriggerRef:n,aiAssistantPanelTriggerRef:r}),[]);return k.jsx(Jfe.Provider,{value:o,children:e})}function amt(){var c;const e=tn(),t=Ge(e,Ul),n=yt(),r=Ge(e,Dh),{columnsPanelTriggerRef:o,filterPanelTriggerRef:i,aiAssistantPanelTriggerRef:a}=sH(),s=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??oa.filters);let l=null;switch(r.openedPanelValue){case oa.filters:l=i.current;break;case oa.columns:l=o.current;break;case oa.aiAssistant:l=a.current;break}return k.jsx(n.slots.panel,z({id:r.panelId,open:t.length>0&&r.open,"aria-labelledby":r.labelId,target:l,onClose:()=>e.current.hidePreferences()},(c=n.slotProps)==null?void 0:c.panel,{children:s}))}function smt(){var t;const e=yt();return k.jsxs(x.Fragment,{children:[k.jsx(amt,{}),e.showToolbar&&k.jsx(e.slots.toolbar,z({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const lmt=["className","children","sidePanel"],cmt=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${Oe(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return Me(i,Cn,r)},umt=Vt(function(t,n){const r=yt(),{className:o,children:i,sidePanel:a}=t,s=$e(t,lmt),l=fs(),c=Ge(l,Eg),u=l.current.rootElementRef,f=x.useCallback(w=>{w!==null&&l.current.publishEvent("rootMount",w)},[l]),h=en(u,n,f),m=r,g=cmt(m,c),y=Hdt();return omt()?null:k.jsxs(Zht,z({className:fe(g.root,o,y.className,a&&ee.withSidePanel),ownerState:m},s,{ref:h,children:[k.jsxs("div",{className:ee.mainContent,role:"presentation",children:[k.jsx(smt,{}),k.jsx(Mht,{children:i}),k.jsx(Rht,{})]}),a,y.tag]}))}),dmt=ad(umt),fmt=["className"],pmt=e=>{const{classes:t}=e;return Me({root:["footerContainer","withBorderColor"]},Cn,t)},hmt=Nn("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),mmt=Vt(function(t,n){const{className:r}=t,o=$e(t,fmt),i=yt(),a=pmt(i);return k.jsx(hmt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))}),gmt=["className"],ymt=e=>{const{classes:t}=e;return Me({root:["overlay"]},Cn,t)},vmt=Nn("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:Ct.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:Ct.colors.background.backdrop}),QP=Vt(function(t,n){const{className:r}=t,o=$e(t,gmt),i=yt(),a=ymt(i);return k.jsx(vmt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))});function Jc(e,t,n,r={}){return typeof t=="function"?t(n,r):t?(t.props.className&&(n.className=fe(t.props.className,n.className)),(t.props.style||n.style)&&(n.style=z({},n.style,t.props.style)),(t.props.sx||n.sx)&&(n.sx=bmt(n.sx,t.props.sx)),x.cloneElement(t,n)):x.createElement(e,n)}function bmt(e,t){return!e||!t?e||t:(Array.isArray(e)?e:[e]).concat(Array.isArray(t)?t:[t])}const Zfe=x.createContext(void 0);function xmt(){const e=x.useContext(Zfe);if(e===void 0)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return e}const Smt=["render","className"],wmt=e=>{const{classes:t}=e;return Me({root:["toolbar"]},Cn,t)},Cmt=Nn("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:Ct.spacing(.25),padding:Ct.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${Ct.colors.border.base}`}),Emt=Vt(function(t,n){const{render:r,className:o}=t,i=$e(t,Smt),a=yt(),s=wmt(a),[l,c]=x.useState(null),[u,f]=x.useState([]),h=x.useCallback((I,O)=>{f(P=>[...P,{id:I,ref:O}])},[]),m=x.useCallback(I=>{f(O=>O.filter(P=>P.id!==I)),l===I&&c(null)},[l]),g=x.useCallback((I,O,P=!0)=>{var M,A;let R=I;const D=u.length;for(let _=0;_<D;_+=1){if(R+=O,R>=D){if(!P)return-1;R=0}else if(R<0){if(!P)return-1;R=D-1}if(!((M=u[R].ref.current)!=null&&M.disabled)&&((A=u[R].ref.current)==null?void 0:A.ariaDisabled)!=="true")return R}return-1},[u]),y=x.useCallback(I=>{var R;if(!l)return;const O=u.findIndex(D=>D.id===l);let P=-1;if(I.key==="ArrowRight"?(I.preventDefault(),P=g(O,1)):I.key==="ArrowLeft"?(I.preventDefault(),P=g(O,-1)):I.key==="Home"?(I.preventDefault(),P=g(-1,1,!1)):I.key==="End"&&(I.preventDefault(),P=g(u.length,-1,!1)),P>=0&&P<u.length){const D=u[P];c(D.id),(R=D.ref.current)==null||R.focus()}},[u,l,g]),v=x.useCallback(I=>{l!==I&&c(I)},[l]),w=x.useCallback(I=>{var R;const O=u.findIndex(D=>D.id===I),P=g(O,1);if(P>=0&&P<u.length){const D=u[P];c(D.id),(R=D.ref.current)==null||R.focus()}},[u,g]),C=x.useMemo(()=>({focusableItemId:l,registerItem:h,unregisterItem:m,onItemKeyDown:y,onItemFocus:v,onItemDisabled:w}),[l,h,m,y,v,w]),E=Jc(Cmt,r,z({role:"toolbar","aria-orientation":"horizontal","aria-label":a.label||void 0,className:fe(s.root,o)},i,{ref:n}));return x.useEffect(()=>{u.length>0&&c(u[0].id)},[u]),k.jsx(Zfe.Provider,{value:C,children:E})}),Tmt=["render","onKeyDown","onFocus","disabled","aria-disabled"],kE=Vt(function(t,n){var D;const{render:r,onKeyDown:o,onFocus:i,disabled:a,"aria-disabled":s}=t,l=$e(t,Tmt),c=bn(),u=yt(),f=x.useRef(null),h=en(f,n),{focusableItemId:m,registerItem:g,unregisterItem:y,onItemKeyDown:v,onItemFocus:w,onItemDisabled:C}=xmt(),E=M=>{v(M),o==null||o(M)},I=M=>{w(c),i==null||i(M)};x.useEffect(()=>(g(c,f),()=>y(c)),[]);const O=x.useRef(a);x.useEffect(()=>{O.current!==a&&a===!0&&C(c,a),O.current=a},[a,c,C]);const P=x.useRef(s);x.useEffect(()=>{P.current!==s&&s===!0&&C(c,!0),P.current=s},[s,c,C]);const R=Jc(u.slots.baseIconButton,r,z({},(D=u.slotProps)==null?void 0:D.baseIconButton,{tabIndex:m===c?0:-1},l,{disabled:a,"aria-disabled":s,onKeyDown:E,onFocus:I,ref:h}));return k.jsx(x.Fragment,{children:R})}),Omt=e=>{const{classes:t,open:n}=e;return Me({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},Cn,t)},Imt=x.memo(e=>{var h,m;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=tn(),s=yt(),l=z({},e,{classes:s.classes}),c=Omt(l),u=x.useCallback(g=>{g.preventDefault(),g.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]),f=t.headerName??t.field;return k.jsx("div",{className:c.root,children:k.jsx(s.slots.baseTooltip,z({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(h=s.slotProps)==null?void 0:h.baseTooltip,{children:k.jsx(s.slots.baseIconButton,z({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuAriaLabel")(f),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(m=s.slotProps)==null?void 0:m.baseIconButton,{children:k.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function Pmt({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=tn(),c=l.current.getColumn(o),u=Je(f=>{f&&(f.stopPropagation(),a!=null&&a.contains(f.target))||l.current.hideColumnMenu()});return!a||!c?null:k.jsx(FP,{position:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:k.jsx(n,z({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}function Amt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function OO(e,t){return e.closest(`.${t}`)}function cd(e){return e.replace(/["\\]/g,"\\$&")}function Mmt(e,t){return e.querySelector(`[role="columnheader"][data-field="${cd(t)}"]`)}function epe(e){return`.${ee.row}[data-id="${cd(String(e))}"]`}function Rmt(e,t){return e.querySelector(epe(t))}function Dmt(e,{id:t,field:n}){const r=epe(t),o=`.${ee.cell}[data-field="${cd(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function Jw(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function kmt(e){return e.getAttribute("data-field")}function _mt(e,t){return e.querySelector(`[data-field="${cd(t)}"]`)}function $mt(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function Nmt(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${cd(t)}-|"]`)??[])}function Lmt(e,t){var a;if(!OO(e,ee.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(rpe(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const f=s.querySelector(`[data-colindex="${c}"]`);f&&i.push(f)}),i):[]}function VJ(e,t){return e.rootElementRef.current.querySelector(`.${ee[t]}`)}const tpe=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return rpe(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${ee[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=qv(s);l!==null&&r(l)&&o.push(s)})}),o};function Fmt(e,t,n){const r=qv(t);return tpe({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?o<r:o>r})}function jmt(e,t,n){const r=qv(t);return tpe({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o<r})}const npe=({api:e,colIndex:t,position:n,filterFn:r})=>{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${ee[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=qv(a);s!==null&&r(s,a)&&o.push(a)}),o};function Bmt(e,t,n){const r=qv(t);return npe({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?o<r:o>r})}function zmt(e,t,n){const r=qv(t);return npe({api:e,position:n?"left":"right",colIndex:r,filterFn:(o,i)=>i.classList.contains(ee["columnHeader--last"])?!1:n?o>r:o<r})}function Vmt(e,t){return e.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${cd(t)}"][role="columnheader"]`)}function Hmt(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${cd(t)}"][role="gridcell"]`))}function rpe(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${ee.row}`)}function qv(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const Umt=["className","aria-label"],Gmt=e=>{const{classes:t}=e;return Me({root:["columnHeaderTitle"]},Cn,t)},qmt=Nn("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),Wmt=Vt(function(t,n){const{className:r}=t,o=$e(t,Umt),i=yt(),a=Gmt(i);return k.jsx(qmt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))});function Kmt(e){var l;const{label:t,description:n}=e,r=yt(),o=x.useRef(null),[i,a]=x.useState(""),s=x.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=Amt(o.current);a(c?t:"")}},[n,t]);return k.jsx(r.slots.baseTooltip,z({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:k.jsx(Wmt,{onMouseOver:s,ref:o,children:t})}))}const Ymt=["resizable","resizing","height","side"];var lH=function(e){return e.Left="left",e.Right="right",e}(lH||{});const Qmt=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${Oe(o)}`],icon:["iconSeparator"]};return Me(i,Cn,r)};function Xmt(e){const{height:t,side:n=lH.Right}=e,r=$e(e,Ymt),o=yt(),i=z({},e,{side:n,classes:o.classes}),a=Qmt(i),s=x.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return k.jsx("div",z({className:a.root,style:{minHeight:t}},r,{onClick:s,children:k.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const Jmt=x.memo(Xmt),Zmt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],ope=Vt(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:f,headerComponent:h,description:m,width:g,columnMenuIconButton:y=null,columnMenu:v=null,columnTitleIconButtons:w=null,headerClassName:C,label:E,resizable:I,draggableContainerProps:O,columnHeaderSeparatorProps:P,style:R}=t,D=$e(t,Zmt),M=fs(),A=yt(),_=x.useRef(null),N=en(_,n);let B="none";return s!=null&&(B=s==="asc"?"ascending":"descending"),x.useLayoutEffect(()=>{var j;const H=M.current.state.columnMenu;if(l&&!H.open){const V=_.current.querySelector('[tabindex="0"]')||_.current;V==null||V.focus(),(j=M.current.columnHeadersContainerRef)!=null&&j.current&&(M.current.columnHeadersContainerRef.current.scrollLeft=0)}},[M,l]),k.jsxs("div",z({className:fe(r.root,C),style:z({},R,{width:g}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":B},D,{ref:N,children:[k.jsxs("div",z({className:r.draggableContainer,draggable:f,role:"presentation"},O,{children:[k.jsxs("div",{className:r.titleContainer,role:"presentation",children:[k.jsx("div",{className:r.titleContainerContent,children:h!==void 0?h:k.jsx(Kmt,{label:E,description:m,columnWidth:g})}),w]}),y]})),k.jsx(Jmt,z({resizable:!A.disableColumnResize&&!!I,resizing:a,height:i,side:u},P)),v]}))}),egt=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,f=o!=null,h=s!=null&&s>0,m=t.type==="number",g={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",f&&"columnHeader--sorted",h&&"columnHeader--filtered",m&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l===On.LEFT&&"columnHeader--pinnedLeft",l===On.RIGHT&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Me(g,Cn,n)};function tgt(e){var Se,ne,le;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:f,disableReorder:h,separatorSide:m,showLeftBorder:g,showRightBorder:y,pinnedPosition:v,pinnedOffset:w}=e,C=fs(),E=yt(),I=vr(),O=x.useRef(null),P=bn(),R=bn(),D=x.useRef(null),[M,A]=x.useState(n),_=x.useMemo(()=>!E.disableColumnReorder&&!h&&!t.disableReorder,[E.disableColumnReorder,h,t.disableReorder]);let N;t.renderHeader&&(N=t.renderHeader(C.current.getColumnHeaderParams(t.field)));const B=z({},e,{classes:E.classes,showRightBorder:y,showLeftBorder:g}),H=egt(B),j=x.useCallback(de=>oe=>{Jw(oe)||C.current.publishEvent(de,C.current.getColumnHeaderParams(t.field),oe)},[C,t.field]),L=x.useMemo(()=>({onClick:j("columnHeaderClick"),onContextMenu:j("columnHeaderContextMenu"),onDoubleClick:j("columnHeaderDoubleClick"),onMouseOver:j("columnHeaderOver"),onMouseOut:j("columnHeaderOut"),onMouseEnter:j("columnHeaderEnter"),onMouseLeave:j("columnHeaderLeave"),onKeyDown:j("columnHeaderKeyDown"),onFocus:j("columnHeaderFocus"),onBlur:j("columnHeaderBlur")}),[j]),V=x.useMemo(()=>_?{onDragStart:j("columnHeaderDragStart"),onDragEnter:j("columnHeaderDragEnter"),onDragOver:j("columnHeaderDragOver"),onDragEnd:j("columnHeaderDragEnd")}:{},[_,j]),W=x.useMemo(()=>({onMouseDown:j("columnSeparatorMouseDown"),onDoubleClick:j("columnSeparatorDoubleClick")}),[j]);x.useEffect(()=>{M||A(n)},[M,n]);const K=x.useCallback(()=>{A(!1)},[]),G=!E.disableColumnMenu&&!t.disableColumnMenu&&k.jsx(Imt,{colDef:t,columnMenuId:P,columnMenuButtonId:R,open:M,iconButtonRef:D}),q=k.jsx(Pmt,{columnMenuId:P,columnMenuButtonId:R,field:t.field,open:n,target:D.current,ContentComponent:E.slots.columnMenu,contentComponentProps:(Se=E.slotProps)==null?void 0:Se.columnMenu,onExited:K}),Y=t.sortingOrder??E.sortingOrder,Z=(t.sortable||s!=null)&&!t.hideSortIcons&&!E.disableColumnSorting,ie=k.jsxs(x.Fragment,{children:[!E.disableColumnFilter&&k.jsx(E.slots.columnHeaderFilterIconButton,z({field:t.field,counter:c},(ne=E.slotProps)==null?void 0:ne.columnHeaderFilterIconButton)),Z&&k.jsx(E.slots.columnHeaderSortIcon,z({field:t.field,direction:s,index:l,sortingOrder:Y,disabled:!t.sortable},(le=E.slotProps)==null?void 0:le.columnHeaderSortIcon))]});x.useLayoutEffect(()=>{var oe;const de=C.current.state.columnMenu;if(u&&!de.open){const pe=O.current.querySelector('[tabindex="0"]')||O.current;pe==null||pe.focus(),(oe=C.current.columnHeadersContainerRef)!=null&&oe.current&&(C.current.columnHeadersContainerRef.current.scrollLeft=0)}},[C,u]);const se=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,ce=t.headerName??t.field,ye=x.useMemo(()=>YP(z({},e.style),I,v,w),[v,w,e.style,I]);return k.jsx(ope,z({ref:O,classes:H,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:f,separatorSide:m,isDraggable:_,headerComponent:N,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:G,columnTitleIconButtons:ie,headerClassName:fe(se,a&&ee["columnHeader--last"]),label:ce,resizable:!E.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:q,draggableContainerProps:V,columnHeaderSeparatorProps:W,style:ye},L))}const ngt=ad(tgt),rgt=["className"],ogt=e=>{const{classes:t}=e;return Me({root:["iconButtonContainer"]},Cn,t)},igt=Nn("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})(()=>({display:"flex",visibility:"hidden",width:0})),ipe=Vt(function(t,n){const{className:r}=t,o=$e(t,rgt),i=yt(),a=ogt(i);return k.jsx(igt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))}),agt=["sortingOrder"],sgt=x.memo(function(t){const{sortingOrder:n}=t,r=$e(t,agt),o=yt(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?k.jsx(a,z({},r)):null}),lgt=["direction","index","sortingOrder","disabled","className"],cgt=e=>{const{classes:t}=e;return Me({root:["sortButton"],icon:["sortIcon"]},Cn,t)},ugt=Nn(sd,{name:"MuiDataGrid",slot:"SortButton"})({transition:Ct.transition(["opacity"],{duration:Ct.transitions.duration.short,easing:Ct.transitions.easing.easeInOut})});function dgt(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=sgt,i.sortingOrder=r),o?k.jsx(o,z({fontSize:"small",className:n},i)):null}function fgt(e){var m;const{direction:t,index:n,sortingOrder:r,disabled:o,className:i}=e,a=$e(e,lgt),s=tn(),l=yt(),c=z({},e,{classes:l.classes}),u=cgt(c),f=dgt(l.slots,t,u.icon,r);if(!f)return null;const h=k.jsx(ugt,z({as:l.slots.baseIconButton,ownerState:c,"aria-label":s.current.getLocaleText("columnHeaderSortIconLabel"),title:s.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o,className:fe(u.root,i)},(m=l.slotProps)==null?void 0:m.baseIconButton,a,{children:f}));return k.jsxs(x.Fragment,{children:[n!=null&&k.jsx(l.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:h}),n==null&&h]})}function pgt(e){return k.jsx(ipe,{children:k.jsx(fgt,z({},e,{tabIndex:-1}))})}const hgt=x.memo(pgt),mgt=e=>{const{classes:t}=e;return Me({icon:["filterIcon"]},Cn,t)};function ggt(e){return e.counter?k.jsx(ygt,z({},e)):null}function ygt(e){var m,g;const{counter:t,field:n,onClick:r}=e,o=tn(),i=yt(),a=z({},e,{classes:i.classes}),s=mgt(a),l=bn(),c=Ge(o,bht,l),u=bn(),f=x.useCallback(y=>{y.preventDefault(),y.stopPropagation();const{open:v,openedPanelValue:w}=Dh(o);v&&w===oa.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,l),r&&r(o.current.getColumnHeaderParams(n),y)},[o,n,r,u,l]);if(!t)return null;const h=k.jsx(i.slots.baseIconButton,z({id:l,onClick:f,"aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?u:void 0},(m=i.slotProps)==null?void 0:m.baseIconButton,{children:k.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return k.jsx(i.slots.baseTooltip,z({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(g=i.slotProps)==null?void 0:g.baseTooltip,{children:k.jsxs(ipe,{children:[t>1&&k.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:h}),t===1&&h]})}))}const Tr=Ot,HJ=Tr(k.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),UJ=Tr(k.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),GJ=Tr(k.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),qJ=Tr(k.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),vgt=Tr(k.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),WJ=Tr(k.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"})),bgt=Tr(k.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));Tr(k.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}));Tr(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}));const xgt=Tr(k.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"})),Sgt=Tr(k.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"})),wgt=Tr(k.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"})),Cgt=Tr(k.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"})),Egt=Tr(k.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"})),Tgt=Tr(k.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),KJ=Tr(k.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),YJ=Tr(k.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})),Ogt=Tr(k.jsx("path",{d:"M19 13H5v-2h14v2z"})),Igt=Tr(k.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})),QJ=Tr(k.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),XJ=Tr(k.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Pgt=Tr(k.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Agt=Tr(k.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})),Mgt=Tr(k.jsx("g",{children:k.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})})),JJ=Tr(k.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}));Tr(k.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}));const Rgt=Tr(k.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"})),Dgt=Tr(k.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}));function ape(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const IO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",kgt=e=>!!e.key,spe=e=>e==="Tab"||e==="Escape";function lpe(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function _gt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const $gt=["hideMenu","colDef","id","labelledby","className","children","open"],Ngt=ae(sd)(()=>({minWidth:248})),Lgt=Vt(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=$e(t,$gt),u=yt(),f=x.useCallback(h=>{h.key==="Tab"&&h.preventDefault(),spe(h.key)&&r(h)},[r]);return k.jsx(Ngt,z({as:u.slots.baseMenuList,id:o,className:fe(ee.menuList,a),"aria-labelledby":i,onKeyDown:f,autoFocus:l},c,{ref:n,children:s}))}),Fgt=["displayOrder"],jgt=e=>{const t=fs(),n=yt(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=x.useMemo(()=>z({},r,i),[r,i]),f=x.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const g=z({},a);return Object.entries(o).forEach(([y,v])=>{g[y]=z({},v,a[y]||{})}),g},[o,a]),h=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),m=x.useMemo(()=>{const g=Object.keys(r);return Object.keys(i).filter(y=>!g.includes(y))},[i,r]);return x.useMemo(()=>{const v=Array.from(new Set([...h,...m])).filter(w=>u[w]!=null).sort((w,C)=>{const E=f[w],I=f[C],O=Number.isFinite(E==null?void 0:E.displayOrder)?E.displayOrder:100,P=Number.isFinite(I==null?void 0:I.displayOrder)?I.displayOrder:100;return O-P});return v.reduce((w,C,E)=>{let I={colDef:l,onClick:s};const O=f[C];if(O){const P=$e(O,Fgt);I=z({},I,P)}return c&&E!==v.length-1?[...w,[u[C],I],[n.slots.baseDivider,{}]]:[...w,[u[C],I]]},[])},[c,l,h,s,u,f,m,n.slots.baseDivider])};function Bgt(e){const{colDef:t,onClick:n}=e,r=tn(),o=yt(),s=Yr(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=x.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:k.jsx(o.slots.baseMenuItem,{onClick:l,disabled:s,iconStart:k.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuHideColumn")})}function zgt(e){const{onClick:t}=e,n=tn(),r=yt(),o=x.useCallback(i=>{t(i),n.current.showPreferences(oa.columns)},[n,t]);return r.disableColumnSelector?null:k.jsx(r.slots.baseMenuItem,{onClick:o,iconStart:k.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuManageColumns")})}function Vgt(e){return k.jsxs(x.Fragment,{children:[k.jsx(Bgt,z({},e)),k.jsx(zgt,z({},e))]})}function Hgt(e){const{colDef:t,onClick:n}=e,r=tn(),o=yt(),i=x.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:k.jsx(o.slots.baseMenuItem,{onClick:i,iconStart:k.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuFilter")})}function Ugt(e){const{colDef:t,onClick:n}=e,r=tn(),o=Ge(r,Ns),i=yt(),a=x.useMemo(()=>{if(!t)return null;const u=o.find(f=>f.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=x.useCallback(u=>{n(u);const f=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,f===a?null:f)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const f=r.current.getLocaleText(u);return typeof f=="function"?f(t):f};return k.jsxs(x.Fragment,{children:[s.includes("asc")&&a!=="asc"?k.jsx(i.slots.baseMenuItem,{onClick:l,"data-value":"asc",iconStart:k.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:c("columnMenuSortAsc")}):null,s.includes("desc")&&a!=="desc"?k.jsx(i.slots.baseMenuItem,{onClick:l,"data-value":"desc",iconStart:k.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:c("columnMenuSortDesc")}):null,s.includes(null)&&a!=null?k.jsx(i.slots.baseMenuItem,{onClick:l,iconStart:i.slots.columnMenuUnsortIcon?k.jsx(i.slots.columnMenuUnsortIcon,{fontSize:"small"}):k.jsx("span",{}),children:r.current.getLocaleText("columnMenuUnsort")}):null]})}const Ggt=["defaultSlots","defaultSlotProps","slots","slotProps"],qgt={columnMenuSortItem:Ugt,columnMenuFilterItem:Hgt,columnMenuColumnsItem:Vgt},Wgt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},Kgt=Vt(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=$e(t,Ggt),l=jgt(z({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return k.jsx(Lgt,z({},s,{ref:n,children:l.map(([c,u],f)=>k.jsx(c,z({},u),f))}))}),Ygt=Vt(function(t,n){return k.jsx(Kgt,z({},t,{ref:n,defaultSlots:qgt,defaultSlotProps:Wgt}))}),Qgt=["className"],Xgt=e=>{const{classes:t}=e;return Me({root:["panelWrapper"]},Cn,t)},Jgt=ae("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),cpe=Vt(function(t,n){const{className:r}=t,o=$e(t,Qgt),i=yt(),a=Xgt(i);return k.jsx(Jgt,z({tabIndex:-1,className:fe(a.root,r),ownerState:i},o,{ref:n}))});function Zgt(e){var n;const t=yt();return k.jsx(cpe,z({},e,{children:k.jsx(t.slots.columnsManagement,z({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const eyt=["children","className","classes","onClose"],tyt=Ke("MuiDataGrid",["panel","paper"]),nyt=ae(sd,{name:"MuiDataGrid",slot:"panel"})({zIndex:Ct.zIndex.panel}),ryt=ae("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:Ct.colors.background.overlay,borderRadius:Ct.radius.base,boxShadow:Ct.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${Ct.spacing(2)})`,overflow:"auto"}),oyt=Vt((e,t)=>{var C;const{children:n,className:r,onClose:o}=e,i=$e(e,eyt),a=tn(),s=yt(),l=tyt,[c,u]=x.useState(!1),f=ufe(),h=Je(()=>u(!0)),m=Je(()=>u(!1)),g=Je(()=>{o==null||o()}),y=Je(E=>{E.key==="Escape"&&(o==null||o())}),[v,w]=x.useState(null);return x.useEffect(()=>{var I,O;const E=(O=(I=a.current.rootElementRef)==null?void 0:I.current)==null?void 0:O.querySelector('[data-id="gridPanelAnchor"]');E&&w(E)},[a]),v?k.jsx(nyt,z({as:s.slots.basePopper,ownerState:s,placement:"bottom-end",className:fe(l.panel,r,f),flip:!0,onDidShow:h,onDidHide:m,onClickAway:g,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},i,(C=s.slotProps)==null?void 0:C.basePopper,{target:e.target??v,ref:t,children:k.jsx(ryt,{className:l.paper,ownerState:s,onKeyDown:y,children:c&&n})})):null}),iyt=["className"],ayt=e=>{const{classes:t}=e;return Me({root:["panelContent"]},Cn,t)},syt=Nn("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:Ct.spacing(2.5,1.5,2,1),gap:Ct.spacing(2.5)});function lyt(e){const{className:t}=e,n=$e(e,iyt),r=yt(),o=ayt(r);return k.jsx(syt,z({className:fe(o.root,t),ownerState:r},n))}const cyt=["className"],uyt=e=>{const{classes:t}=e;return Me({root:["panelFooter"]},Cn,t)},dyt=ae("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:Ct.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${Ct.colors.border.base}`});function fyt(e){const{className:t}=e,n=$e(e,cyt),r=yt(),o=uyt(r);return k.jsx(dyt,z({className:fe(o.root,t),ownerState:r},n))}const pyt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],hyt=["InputComponentProps"],myt=e=>{const{classes:t}=e;return Me({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Cn,t)},gyt=ae("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:Ct.spacing(1.5)}),yyt=ae("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),vyt=ae("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),byt=ae("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),xyt=ae("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),Syt=ae("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),wyt=e=>{switch(e){case Zi.And:return"filterPanelOperatorAnd";case Zi.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},w0=e=>e.headerName||e.field,ZJ=new Intl.Collator,eZ=Vt(function(t,n){var Ee,xe,Re,he,Pe,ve,Ie;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:f=[Zi.And,Zi.Or],columnsSort:h,filterColumns:m,deleteIconProps:g={},logicOperatorInputProps:y={},operatorInputProps:v={},columnInputProps:w={},valueInputProps:C={},readOnly:E}=t,I=$e(t,pyt),O=tn(),P=Ge(O,ld),R=Ge(O,afe),D=Ge(O,jo),M=bn(),A=bn(),_=bn(),N=bn(),B=yt(),H=myt(B),j=x.useRef(null),L=x.useRef(null),V=D.logicOperator??Zi.And,W=o&&f.length>0,G=(((Ee=B.slotProps)==null?void 0:Ee.baseSelect)||{}).native??!1,q=((xe=B.slotProps)==null?void 0:xe.baseSelectOption)||{},{InputComponentProps:Y}=C,Z=$e(C,hyt),ie=Ge(O,Rh),se=Ge(O,qfe),{filteredColumns:ce,selectedField:ye}=x.useMemo(()=>{let te=r.field;const Te=P[r.field].filterable===!1?P[r.field]:null;if(Te)return{filteredColumns:[Te],selectedField:te};if(ie)return{filteredColumns:R.filter(Ve=>se.get(Ve.field)!==void 0),selectedField:te};if(m===void 0||typeof m!="function")return{filteredColumns:R,selectedField:te};const De=m({field:r.field,columns:R,currentFilters:(D==null?void 0:D.items)||[]});return{filteredColumns:R.filter(Ve=>{const We=De.includes(Ve.field);return Ve.field===r.field&&!We&&(te=void 0),We}),selectedField:te}},[r.field,P,ie,m,R,D==null?void 0:D.items,se]),Se=x.useMemo(()=>{switch(h){case"asc":return ce.sort((te,Te)=>ZJ.compare(w0(te),w0(Te)));case"desc":return ce.sort((te,Te)=>-ZJ.compare(w0(te),w0(Te)));default:return ce}},[ce,h]),ne=r.field?O.current.getColumn(r.field):null,le=x.useMemo(()=>{var te;return!r.operator||!ne?null:(te=ne.filterOperators)==null?void 0:te.find(Te=>Te.value===r.operator)},[r,ne]),de=x.useCallback(te=>{const Te=te.target.value,De=O.current.getColumn(Te);if(De.field===ne.field)return;const Ve=De.filterOperators.find(ut=>ut.value===r.operator)||De.filterOperators[0];let rt=!Ve.InputComponent||Ve.InputComponent!==(le==null?void 0:le.InputComponent)||De.type!==ne.type?void 0:r.value;if(De.type==="singleSelect"&&rt!==void 0){const ut=De,Be=Mh(ut);Array.isArray(rt)?rt=rt.filter(et=>EO(et,Be,ut==null?void 0:ut.getOptionValue)!==void 0):EO(r.value,Be,ut==null?void 0:ut.getOptionValue)===void 0&&(rt=void 0)}a(z({},r,{field:Te,operator:Ve.value,value:rt}))},[O,a,r,ne,le]),oe=x.useCallback(te=>{const Te=te.target.value,De=ne==null?void 0:ne.filterOperators.find(We=>We.value===Te),Ve=!(De!=null&&De.InputComponent)||(De==null?void 0:De.InputComponent)!==(le==null?void 0:le.InputComponent);a(z({},r,{operator:Te,value:Ve?void 0:r.value}))},[a,r,ne,le]),ue=x.useCallback(te=>{const Te=te.target.value===Zi.And.toString()?Zi.And:Zi.Or;c(Te)},[c]),pe=()=>{i(r)};return x.useImperativeHandle(u,()=>({focus:()=>{var te;le!=null&&le.InputComponent?(te=j==null?void 0:j.current)==null||te.focus():L.current.focus()}}),[le]),k.jsxs(gyt,z({className:H.root,"data-id":r.id,ownerState:B},I,{ref:n,children:[k.jsx(yyt,z({},g,{className:fe(H.deleteIcon,g.className),ownerState:B,children:k.jsx(B.slots.baseIconButton,z({"aria-label":O.current.getLocaleText("filterPanelDeleteIconLabel"),title:O.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:pe,size:"small",disabled:E},(Re=B.slotProps)==null?void 0:Re.baseIconButton,{children:k.jsx(B.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),k.jsx(vyt,z({as:B.slots.baseSelect,sx:[W?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},y.sx],className:fe(H.logicOperatorInput,y.className),ownerState:B},y,{size:"small",slotProps:{htmlInput:{"aria-label":O.current.getLocaleText("filterPanelLogicOperator")}},value:V??"",onChange:ue,disabled:!!l||f.length===1,native:G},(he=B.slotProps)==null?void 0:he.baseSelect,{children:f.map(te=>x.createElement(B.slots.baseSelectOption,z({},q,{native:G,key:te.toString(),value:te.toString()}),O.current.getLocaleText(wyt(te))))})),k.jsx(byt,z({as:B.slots.baseSelect},w,{className:fe(H.columnInput,w.className),ownerState:B,size:"small",labelId:A,id:M,label:O.current.getLocaleText("filterPanelColumns"),value:ye??"",onChange:de,native:G,disabled:E},(Pe=B.slotProps)==null?void 0:Pe.baseSelect,{children:Se.map(te=>x.createElement(B.slots.baseSelectOption,z({},q,{native:G,key:te.field,value:te.field}),w0(te)))})),k.jsx(xyt,z({as:B.slots.baseSelect,size:"small"},v,{className:fe(H.operatorInput,v.className),ownerState:B,labelId:N,label:O.current.getLocaleText("filterPanelOperator"),id:_,value:r.operator,onChange:oe,native:G,inputRef:L,disabled:E},(ve=B.slotProps)==null?void 0:ve.baseSelect,{children:(Ie=ne==null?void 0:ne.filterOperators)==null?void 0:Ie.map(te=>x.createElement(B.slots.baseSelectOption,z({},q,{native:G,key:te.value,value:te.value}),te.label||O.current.getLocaleText(`filterOperator${Oe(te.value)}`)))})),k.jsx(Syt,z({},Z,{className:fe(H.valueInput,Z.className),ownerState:B,children:le!=null&&le.InputComponent?k.jsx(le.InputComponent,z({apiRef:O,item:r,applyValue:a,focusElementRef:j,disabled:E,slotProps:{root:{size:"small"}}},le.InputComponentProps,Y),r.field):null}))]}))}),Cyt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],tZ=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),Eyt=Vt(function(t,n){var N,B;const r=tn(),o=yt(),i=Ge(r,jo),a=Ge(r,afe),s=Ge(r,Ddt),l=x.useRef(null),c=x.useRef(null),{logicOperators:u=[Zi.And,Zi.Or],columnsSort:f,filterFormProps:h,getColumnForNewFilter:m,disableAddFilterButton:g=!1,disableRemoveAllButton:y=!1}=t,v=$e(t,Cyt),w=r.current.upsertFilterItem,C=x.useCallback(H=>{r.current.setFilterLogicOperator(H)},[r]),E=x.useCallback(()=>{let H;if(m&&typeof m=="function"){const j=m({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(j===null)return null;H=a.find(({field:L})=>L===j)}else H=a.find(j=>{var L;return(L=j.filterOperators)==null?void 0:L.length});return H?tZ(H):null},[i==null?void 0:i.items,a,m]),I=x.useCallback(()=>{if(m===void 0||typeof m!="function")return E();const H=i.items.length?i.items:[E()].filter(Boolean),j=m({currentFilters:H,columns:a});if(j===null)return null;const L=a.find(({field:V})=>V===j);return L?tZ(L):null},[i.items,a,m,E]),O=x.useMemo(()=>i.items.length?i.items:(c.current||(c.current=E()),c.current?[c.current]:[]),[i.items,E]),P=O.length>1,{readOnlyFilters:R,validFilters:D}=x.useMemo(()=>O.reduce((H,j)=>(s[j.field]?H.validFilters.push(j):H.readOnlyFilters.push(j),H),{readOnlyFilters:[],validFilters:[]}),[O,s]),M=x.useCallback(()=>{const H=I();H&&r.current.upsertFilterItems([...O,H])},[r,I,O]),A=x.useCallback(H=>{const j=D.length===1;r.current.deleteFilterItem(H),j&&r.current.hideFilterPanel()},[r,D.length]),_=x.useCallback(()=>D.length===1&&D[0].value===void 0?(r.current.deleteFilterItem(D[0]),r.current.hideFilterPanel()):r.current.setFilterModel(z({},i,{items:R}),"removeAllFilterItems"),[r,R,i,D]);return x.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&C(u[0])},[u,C,i.logicOperator]),x.useEffect(()=>{D.length>0&&l.current.focus()},[D.length]),k.jsxs(cpe,z({},v,{ref:n,children:[k.jsxs(lyt,{children:[R.map((H,j)=>k.jsx(eZ,z({item:H,applyFilterChanges:w,deleteFilter:A,hasMultipleFilters:P,showMultiFilterOperators:j>0,disableMultiFilterOperator:j!==1,applyMultiFilterOperatorChanges:C,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:f},h),H.id==null?j:H.id)),D.map((H,j)=>k.jsx(eZ,z({item:H,applyFilterChanges:w,deleteFilter:A,hasMultipleFilters:P,showMultiFilterOperators:R.length+j>0,disableMultiFilterOperator:R.length+j!==1,applyMultiFilterOperatorChanges:C,focusElementRef:j===D.length-1?l:null,logicOperators:u,columnsSort:f},h),H.id==null?j+R.length:H.id))]}),!o.disableMultipleColumnsFiltering&&!(g&&y)?k.jsxs(fyt,{children:[g?k.jsx("span",{}):k.jsx(o.slots.baseButton,z({onClick:M,startIcon:k.jsx(o.slots.filterPanelAddIcon,{})},(N=o.slotProps)==null?void 0:N.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!y&&D.length>0?k.jsx(o.slots.baseButton,z({onClick:_,startIcon:k.jsx(o.slots.filterPanelRemoveAllIcon,{})},(B=o.slotProps)==null?void 0:B.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),Tyt=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},Oyt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,Iyt=["children"],Pyt=il({from:{opacity:0},to:{opacity:1}}),Ayt=il({"from, to":{"--scrollable":'" "'}}),Myt=Nn("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})`
+ & .${ee["row--borderBottom"]} .${ee.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ee["row--borderBottom"]} .${ee.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${ee.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${ee["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:f,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ee.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":O},[`& .${ee["container--top"]}, & .${ee["container--bottom"]}`]:{"[role=row]":{background:Ct.colors.background.base}},[`& .${ee.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":O},[`& .${ee["virtualScrollerContent--overflowed"]} .${ee["row--lastVisible"]} .${ee.cell}`]:{borderTopColor:"transparent"},[`& .${ee.pinnedRows} .${ee.row}, .${ee.aggregationRowOverlayWrapper} .${ee.row}`]:{backgroundColor:o,"&:hover":{backgroundColor:g}},[`& .${ee["pinnedRows--top"]} :first-of-type`]:{[`& .${ee.cell}, .${ee.scrollbarFiller}`]:{borderTop:"none"}},[`&.${ee["root--disableUserSelection"]} .${ee.cell}`]:{userSelect:"none"},[`& .${ee["row--dynamicHeight"]} > .${ee.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${ee.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${ee.cell}.${ee["cell--selectionMode"]}`]:{cursor:"default"},[`& .${ee.cell}.${ee["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:Ct.shadows.base,backgroundColor:Ct.colors.background.overlay,"&:focus-within":{outline:`${ag}px solid ${Ct.colors.interactive.focus}`,outlineOffset:ag*-1}},[`& .${ee["row--editing"]}`]:{boxShadow:Ct.shadows.base},[`& .${ee["row--editing"]} .${ee.cell}`]:{boxShadow:"none",backgroundColor:Ct.colors.background.overlay},[`& .${ee.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${ee.booleanCell}[data-value="true"]`]:{color:Ct.colors.foreground.muted},[`& .${ee.booleanCell}[data-value="false"]`]:{color:Ct.colors.foreground.disabled},[`& .${ee.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:Ct.spacing(1)},[`& .${ee.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:Ct.colors.interactive.disabledOpacity},[`& .${ee["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${ee.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${ee.withBorderColor}`]:{borderColor:Ct.colors.border.base},[`& .${ee["cell--withLeftBorder"]}, & .${ee["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${ee["cell--withRightBorder"]}, & .${ee["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ee["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${ee["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${ee["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${ee["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${ee["cell--pinnedLeft"]}, & .${ee["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:Ct.cell.background.pinned,"&.Mui-selected":{backgroundColor:y}},[`& .${ee.row}`]:{"&:hover":C,"&.Mui-selected":E,"&.Mui-selected:hover":I},[`& .${ee.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${ee.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${ee.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${ee.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${ee["columnHeader--dragging"]}, & .${ee["row--dragging"]}`]:{background:Ct.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:Ct.colors.interactive.disabledOpacity},[`& .${ee["row--dragging"]}`]:{background:Ct.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:Ct.colors.interactive.disabledOpacity,[`& .${ee.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${ee.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ee.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:Ct.spacing(2)},[`& .${ee.treeDataGroupingCellLoadingContainer}, .${ee.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${ee.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ee.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:Ct.spacing(2)},[`.${ee.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${ee["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ee["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ee["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:Ct.cell.background.pinned,position:"sticky",right:0}},[`& .${ee.filler}`]:{flex:"1 0 auto"},[`& .${ee["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ee["main--hiddenContent"]}`]:{[`& .${ee.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${ee["scrollbar--vertical"]}, & .${ee.pinnedRows}, & .${ee.virtualScroller} > .${ee.filler}`]:{display:"none"}}}});function Jfe(e,t){return`rgba(from ${e} r g b / ${t})`}function tmt(e){return Jfe(e,1)}function Bd(e,t,n){return`color-mix(in srgb,${e}, ${t} calc(${n} * 100%))`}const nmt=()=>()=>{},rmt=()=>!1,omt=()=>!0,imt=()=>Ude.useSyncExternalStore(nmt,rmt,omt),Zfe=x.createContext(void 0);function lH(){const e=x.useContext(Zfe);if(e===void 0)throw new Error("MUI X: Missing context.");return e}function amt({children:e}){const t=x.useRef(null),n=x.useRef(null),r=x.useRef(null),o=x.useMemo(()=>({columnsPanelTriggerRef:t,filterPanelTriggerRef:n,aiAssistantPanelTriggerRef:r}),[]);return k.jsx(Zfe.Provider,{value:o,children:e})}function smt(){var c;const e=tn(),t=Ge(e,ql),n=yt(),r=Ge(e,_h),{columnsPanelTriggerRef:o,filterPanelTriggerRef:i,aiAssistantPanelTriggerRef:a}=lH(),s=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??oa.filters);let l=null;switch(r.openedPanelValue){case oa.filters:l=i.current;break;case oa.columns:l=o.current;break;case oa.aiAssistant:l=a.current;break}return k.jsx(n.slots.panel,z({id:r.panelId,open:t.length>0&&r.open,"aria-labelledby":r.labelId,target:l,onClose:()=>e.current.hidePreferences()},(c=n.slotProps)==null?void 0:c.panel,{children:s}))}function lmt(){var t;const e=yt();return k.jsxs(x.Fragment,{children:[k.jsx(smt,{}),e.showToolbar&&k.jsx(e.slots.toolbar,z({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const cmt=["className","children","sidePanel"],umt=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${Oe(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return Me(i,Cn,r)},dmt=Vt(function(t,n){const r=yt(),{className:o,children:i,sidePanel:a}=t,s=$e(t,cmt),l=fs(),c=Ge(l,Tg),u=l.current.rootElementRef,f=x.useCallback(w=>{w!==null&&l.current.publishEvent("rootMount",w)},[l]),p=en(u,n,f),m=r,g=umt(m,c),y=Udt();return imt()?null:k.jsxs(emt,z({className:fe(g.root,o,y.className,a&&ee.withSidePanel),ownerState:m},s,{ref:p,children:[k.jsxs("div",{className:ee.mainContent,role:"presentation",children:[k.jsx(lmt,{}),k.jsx(Rht,{children:i}),k.jsx(Dht,{})]}),a,y.tag]}))}),fmt=ld(dmt),pmt=["className"],hmt=e=>{const{classes:t}=e;return Me({root:["footerContainer","withBorderColor"]},Cn,t)},mmt=Nn("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),gmt=Vt(function(t,n){const{className:r}=t,o=$e(t,pmt),i=yt(),a=hmt(i);return k.jsx(mmt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))}),ymt=["className"],vmt=e=>{const{classes:t}=e;return Me({root:["overlay"]},Cn,t)},bmt=Nn("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:Ct.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:Ct.colors.background.backdrop}),XP=Vt(function(t,n){const{className:r}=t,o=$e(t,ymt),i=yt(),a=vmt(i);return k.jsx(bmt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))});function Zc(e,t,n,r={}){return typeof t=="function"?t(n,r):t?(t.props.className&&(n.className=fe(t.props.className,n.className)),(t.props.style||n.style)&&(n.style=z({},n.style,t.props.style)),(t.props.sx||n.sx)&&(n.sx=xmt(n.sx,t.props.sx)),x.cloneElement(t,n)):x.createElement(e,n)}function xmt(e,t){return!e||!t?e||t:(Array.isArray(e)?e:[e]).concat(Array.isArray(t)?t:[t])}const epe=x.createContext(void 0);function Smt(){const e=x.useContext(epe);if(e===void 0)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return e}const wmt=["render","className"],Cmt=e=>{const{classes:t}=e;return Me({root:["toolbar"]},Cn,t)},Emt=Nn("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:Ct.spacing(.25),padding:Ct.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${Ct.colors.border.base}`}),Tmt=Vt(function(t,n){const{render:r,className:o}=t,i=$e(t,wmt),a=yt(),s=Cmt(a),[l,c]=x.useState(null),[u,f]=x.useState([]),p=x.useCallback((I,O)=>{f(P=>[...P,{id:I,ref:O}])},[]),m=x.useCallback(I=>{f(O=>O.filter(P=>P.id!==I)),l===I&&c(null)},[l]),g=x.useCallback((I,O,P=!0)=>{var M,A;let R=I;const D=u.length;for(let _=0;_<D;_+=1){if(R+=O,R>=D){if(!P)return-1;R=0}else if(R<0){if(!P)return-1;R=D-1}if(!((M=u[R].ref.current)!=null&&M.disabled)&&((A=u[R].ref.current)==null?void 0:A.ariaDisabled)!=="true")return R}return-1},[u]),y=x.useCallback(I=>{var R;if(!l)return;const O=u.findIndex(D=>D.id===l);let P=-1;if(I.key==="ArrowRight"?(I.preventDefault(),P=g(O,1)):I.key==="ArrowLeft"?(I.preventDefault(),P=g(O,-1)):I.key==="Home"?(I.preventDefault(),P=g(-1,1,!1)):I.key==="End"&&(I.preventDefault(),P=g(u.length,-1,!1)),P>=0&&P<u.length){const D=u[P];c(D.id),(R=D.ref.current)==null||R.focus()}},[u,l,g]),v=x.useCallback(I=>{l!==I&&c(I)},[l]),w=x.useCallback(I=>{var R;const O=u.findIndex(D=>D.id===I),P=g(O,1);if(P>=0&&P<u.length){const D=u[P];c(D.id),(R=D.ref.current)==null||R.focus()}},[u,g]),C=x.useMemo(()=>({focusableItemId:l,registerItem:p,unregisterItem:m,onItemKeyDown:y,onItemFocus:v,onItemDisabled:w}),[l,p,m,y,v,w]),E=Zc(Emt,r,z({role:"toolbar","aria-orientation":"horizontal","aria-label":a.label||void 0,className:fe(s.root,o)},i,{ref:n}));return x.useEffect(()=>{u.length>0&&c(u[0].id)},[u]),k.jsx(epe.Provider,{value:C,children:E})}),Omt=["render","onKeyDown","onFocus","disabled","aria-disabled"],_E=Vt(function(t,n){var D;const{render:r,onKeyDown:o,onFocus:i,disabled:a,"aria-disabled":s}=t,l=$e(t,Omt),c=bn(),u=yt(),f=x.useRef(null),p=en(f,n),{focusableItemId:m,registerItem:g,unregisterItem:y,onItemKeyDown:v,onItemFocus:w,onItemDisabled:C}=Smt(),E=M=>{v(M),o==null||o(M)},I=M=>{w(c),i==null||i(M)};x.useEffect(()=>(g(c,f),()=>y(c)),[]);const O=x.useRef(a);x.useEffect(()=>{O.current!==a&&a===!0&&C(c,a),O.current=a},[a,c,C]);const P=x.useRef(s);x.useEffect(()=>{P.current!==s&&s===!0&&C(c,!0),P.current=s},[s,c,C]);const R=Zc(u.slots.baseIconButton,r,z({},(D=u.slotProps)==null?void 0:D.baseIconButton,{tabIndex:m===c?0:-1},l,{disabled:a,"aria-disabled":s,onKeyDown:E,onFocus:I,ref:p}));return k.jsx(x.Fragment,{children:R})}),Imt=e=>{const{classes:t,open:n}=e;return Me({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},Cn,t)},Pmt=x.memo(e=>{var p,m;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=tn(),s=yt(),l=z({},e,{classes:s.classes}),c=Imt(l),u=x.useCallback(g=>{g.preventDefault(),g.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]),f=t.headerName??t.field;return k.jsx("div",{className:c.root,children:k.jsx(s.slots.baseTooltip,z({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(p=s.slotProps)==null?void 0:p.baseTooltip,{children:k.jsx(s.slots.baseIconButton,z({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuAriaLabel")(f),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(m=s.slotProps)==null?void 0:m.baseIconButton,{children:k.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function Amt({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=tn(),c=l.current.getColumn(o),u=Je(f=>{f&&(f.stopPropagation(),a!=null&&a.contains(f.target))||l.current.hideColumnMenu()});return!a||!c?null:k.jsx(jP,{position:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:k.jsx(n,z({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}function Mmt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function IO(e,t){return e.closest(`.${t}`)}function dd(e){return e.replace(/["\\]/g,"\\$&")}function Rmt(e,t){return e.querySelector(`[role="columnheader"][data-field="${dd(t)}"]`)}function tpe(e){return`.${ee.row}[data-id="${dd(String(e))}"]`}function Dmt(e,t){return e.querySelector(tpe(t))}function kmt(e,{id:t,field:n}){const r=tpe(t),o=`.${ee.cell}[data-field="${dd(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function Jw(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function _mt(e){return e.getAttribute("data-field")}function $mt(e,t){return e.querySelector(`[data-field="${dd(t)}"]`)}function Nmt(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function Lmt(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${dd(t)}-|"]`)??[])}function Fmt(e,t){var a;if(!IO(e,ee.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(ope(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const f=s.querySelector(`[data-colindex="${c}"]`);f&&i.push(f)}),i):[]}function HJ(e,t){return e.rootElementRef.current.querySelector(`.${ee[t]}`)}const npe=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return ope(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${ee[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=qv(s);l!==null&&r(l)&&o.push(s)})}),o};function jmt(e,t,n){const r=qv(t);return npe({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?o<r:o>r})}function Bmt(e,t,n){const r=qv(t);return npe({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o<r})}const rpe=({api:e,colIndex:t,position:n,filterFn:r})=>{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${ee[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=qv(a);s!==null&&r(s,a)&&o.push(a)}),o};function zmt(e,t,n){const r=qv(t);return rpe({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?o<r:o>r})}function Vmt(e,t,n){const r=qv(t);return rpe({api:e,position:n?"left":"right",colIndex:r,filterFn:(o,i)=>i.classList.contains(ee["columnHeader--last"])?!1:n?o>r:o<r})}function Hmt(e,t){return e.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${dd(t)}"][role="columnheader"]`)}function Umt(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${dd(t)}"][role="gridcell"]`))}function ope(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${ee.row}`)}function qv(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const Gmt=["className","aria-label"],qmt=e=>{const{classes:t}=e;return Me({root:["columnHeaderTitle"]},Cn,t)},Wmt=Nn("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),Kmt=Vt(function(t,n){const{className:r}=t,o=$e(t,Gmt),i=yt(),a=qmt(i);return k.jsx(Wmt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))});function Ymt(e){var l;const{label:t,description:n}=e,r=yt(),o=x.useRef(null),[i,a]=x.useState(""),s=x.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=Mmt(o.current);a(c?t:"")}},[n,t]);return k.jsx(r.slots.baseTooltip,z({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:k.jsx(Kmt,{onMouseOver:s,ref:o,children:t})}))}const Qmt=["resizable","resizing","height","side"];var cH=function(e){return e.Left="left",e.Right="right",e}(cH||{});const Xmt=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${Oe(o)}`],icon:["iconSeparator"]};return Me(i,Cn,r)};function Jmt(e){const{height:t,side:n=cH.Right}=e,r=$e(e,Qmt),o=yt(),i=z({},e,{side:n,classes:o.classes}),a=Xmt(i),s=x.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return k.jsx("div",z({className:a.root,style:{minHeight:t}},r,{onClick:s,children:k.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const Zmt=x.memo(Jmt),egt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],ipe=Vt(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:f,headerComponent:p,description:m,width:g,columnMenuIconButton:y=null,columnMenu:v=null,columnTitleIconButtons:w=null,headerClassName:C,label:E,resizable:I,draggableContainerProps:O,columnHeaderSeparatorProps:P,style:R}=t,D=$e(t,egt),M=fs(),A=yt(),_=x.useRef(null),N=en(_,n);let B="none";return s!=null&&(B=s==="asc"?"ascending":"descending"),x.useLayoutEffect(()=>{var j;const H=M.current.state.columnMenu;if(l&&!H.open){const V=_.current.querySelector('[tabindex="0"]')||_.current;V==null||V.focus(),(j=M.current.columnHeadersContainerRef)!=null&&j.current&&(M.current.columnHeadersContainerRef.current.scrollLeft=0)}},[M,l]),k.jsxs("div",z({className:fe(r.root,C),style:z({},R,{width:g}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":B},D,{ref:N,children:[k.jsxs("div",z({className:r.draggableContainer,draggable:f,role:"presentation"},O,{children:[k.jsxs("div",{className:r.titleContainer,role:"presentation",children:[k.jsx("div",{className:r.titleContainerContent,children:p!==void 0?p:k.jsx(Ymt,{label:E,description:m,columnWidth:g})}),w]}),y]})),k.jsx(Zmt,z({resizable:!A.disableColumnResize&&!!I,resizing:a,height:i,side:u},P)),v]}))}),tgt=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,f=o!=null,p=s!=null&&s>0,m=t.type==="number",g={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",f&&"columnHeader--sorted",p&&"columnHeader--filtered",m&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l===On.LEFT&&"columnHeader--pinnedLeft",l===On.RIGHT&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Me(g,Cn,n)};function ngt(e){var Se,ne,le;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:f,disableReorder:p,separatorSide:m,showLeftBorder:g,showRightBorder:y,pinnedPosition:v,pinnedOffset:w}=e,C=fs(),E=yt(),I=vr(),O=x.useRef(null),P=bn(),R=bn(),D=x.useRef(null),[M,A]=x.useState(n),_=x.useMemo(()=>!E.disableColumnReorder&&!p&&!t.disableReorder,[E.disableColumnReorder,p,t.disableReorder]);let N;t.renderHeader&&(N=t.renderHeader(C.current.getColumnHeaderParams(t.field)));const B=z({},e,{classes:E.classes,showRightBorder:y,showLeftBorder:g}),H=tgt(B),j=x.useCallback(de=>oe=>{Jw(oe)||C.current.publishEvent(de,C.current.getColumnHeaderParams(t.field),oe)},[C,t.field]),L=x.useMemo(()=>({onClick:j("columnHeaderClick"),onContextMenu:j("columnHeaderContextMenu"),onDoubleClick:j("columnHeaderDoubleClick"),onMouseOver:j("columnHeaderOver"),onMouseOut:j("columnHeaderOut"),onMouseEnter:j("columnHeaderEnter"),onMouseLeave:j("columnHeaderLeave"),onKeyDown:j("columnHeaderKeyDown"),onFocus:j("columnHeaderFocus"),onBlur:j("columnHeaderBlur")}),[j]),V=x.useMemo(()=>_?{onDragStart:j("columnHeaderDragStart"),onDragEnter:j("columnHeaderDragEnter"),onDragOver:j("columnHeaderDragOver"),onDragEnd:j("columnHeaderDragEnd")}:{},[_,j]),W=x.useMemo(()=>({onMouseDown:j("columnSeparatorMouseDown"),onDoubleClick:j("columnSeparatorDoubleClick")}),[j]);x.useEffect(()=>{M||A(n)},[M,n]);const K=x.useCallback(()=>{A(!1)},[]),G=!E.disableColumnMenu&&!t.disableColumnMenu&&k.jsx(Pmt,{colDef:t,columnMenuId:P,columnMenuButtonId:R,open:M,iconButtonRef:D}),q=k.jsx(Amt,{columnMenuId:P,columnMenuButtonId:R,field:t.field,open:n,target:D.current,ContentComponent:E.slots.columnMenu,contentComponentProps:(Se=E.slotProps)==null?void 0:Se.columnMenu,onExited:K}),Y=t.sortingOrder??E.sortingOrder,Z=(t.sortable||s!=null)&&!t.hideSortIcons&&!E.disableColumnSorting,ie=k.jsxs(x.Fragment,{children:[!E.disableColumnFilter&&k.jsx(E.slots.columnHeaderFilterIconButton,z({field:t.field,counter:c},(ne=E.slotProps)==null?void 0:ne.columnHeaderFilterIconButton)),Z&&k.jsx(E.slots.columnHeaderSortIcon,z({field:t.field,direction:s,index:l,sortingOrder:Y,disabled:!t.sortable},(le=E.slotProps)==null?void 0:le.columnHeaderSortIcon))]});x.useLayoutEffect(()=>{var oe;const de=C.current.state.columnMenu;if(u&&!de.open){const pe=O.current.querySelector('[tabindex="0"]')||O.current;pe==null||pe.focus(),(oe=C.current.columnHeadersContainerRef)!=null&&oe.current&&(C.current.columnHeadersContainerRef.current.scrollLeft=0)}},[C,u]);const se=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,ce=t.headerName??t.field,ye=x.useMemo(()=>QP(z({},e.style),I,v,w),[v,w,e.style,I]);return k.jsx(ipe,z({ref:O,classes:H,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:f,separatorSide:m,isDraggable:_,headerComponent:N,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:G,columnTitleIconButtons:ie,headerClassName:fe(se,a&&ee["columnHeader--last"]),label:ce,resizable:!E.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:q,draggableContainerProps:V,columnHeaderSeparatorProps:W,style:ye},L))}const rgt=ld(ngt),ogt=["className"],igt=e=>{const{classes:t}=e;return Me({root:["iconButtonContainer"]},Cn,t)},agt=Nn("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})(()=>({display:"flex",visibility:"hidden",width:0})),ape=Vt(function(t,n){const{className:r}=t,o=$e(t,ogt),i=yt(),a=igt(i);return k.jsx(agt,z({className:fe(a.root,r),ownerState:i},o,{ref:n}))}),sgt=["sortingOrder"],lgt=x.memo(function(t){const{sortingOrder:n}=t,r=$e(t,sgt),o=yt(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?k.jsx(a,z({},r)):null}),cgt=["direction","index","sortingOrder","disabled","className"],ugt=e=>{const{classes:t}=e;return Me({root:["sortButton"],icon:["sortIcon"]},Cn,t)},dgt=Nn(cd,{name:"MuiDataGrid",slot:"SortButton"})({transition:Ct.transition(["opacity"],{duration:Ct.transitions.duration.short,easing:Ct.transitions.easing.easeInOut})});function fgt(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=lgt,i.sortingOrder=r),o?k.jsx(o,z({fontSize:"small",className:n},i)):null}function pgt(e){var m;const{direction:t,index:n,sortingOrder:r,disabled:o,className:i}=e,a=$e(e,cgt),s=tn(),l=yt(),c=z({},e,{classes:l.classes}),u=ugt(c),f=fgt(l.slots,t,u.icon,r);if(!f)return null;const p=k.jsx(dgt,z({as:l.slots.baseIconButton,ownerState:c,"aria-label":s.current.getLocaleText("columnHeaderSortIconLabel"),title:s.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o,className:fe(u.root,i)},(m=l.slotProps)==null?void 0:m.baseIconButton,a,{children:f}));return k.jsxs(x.Fragment,{children:[n!=null&&k.jsx(l.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:p}),n==null&&p]})}function hgt(e){return k.jsx(ape,{children:k.jsx(pgt,z({},e,{tabIndex:-1}))})}const mgt=x.memo(hgt),ggt=e=>{const{classes:t}=e;return Me({icon:["filterIcon"]},Cn,t)};function ygt(e){return e.counter?k.jsx(vgt,z({},e)):null}function vgt(e){var m,g;const{counter:t,field:n,onClick:r}=e,o=tn(),i=yt(),a=z({},e,{classes:i.classes}),s=ggt(a),l=bn(),c=Ge(o,xht,l),u=bn(),f=x.useCallback(y=>{y.preventDefault(),y.stopPropagation();const{open:v,openedPanelValue:w}=_h(o);v&&w===oa.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,l),r&&r(o.current.getColumnHeaderParams(n),y)},[o,n,r,u,l]);if(!t)return null;const p=k.jsx(i.slots.baseIconButton,z({id:l,onClick:f,"aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?u:void 0},(m=i.slotProps)==null?void 0:m.baseIconButton,{children:k.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return k.jsx(i.slots.baseTooltip,z({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(g=i.slotProps)==null?void 0:g.baseTooltip,{children:k.jsxs(ape,{children:[t>1&&k.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:p}),t===1&&p]})}))}const Tr=Ot,UJ=Tr(k.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),GJ=Tr(k.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),qJ=Tr(k.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),WJ=Tr(k.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),bgt=Tr(k.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),KJ=Tr(k.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"})),xgt=Tr(k.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));Tr(k.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}));Tr(k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}));const Sgt=Tr(k.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"})),wgt=Tr(k.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"})),Cgt=Tr(k.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"})),Egt=Tr(k.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"})),Tgt=Tr(k.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"})),Ogt=Tr(k.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),YJ=Tr(k.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),QJ=Tr(k.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})),Igt=Tr(k.jsx("path",{d:"M19 13H5v-2h14v2z"})),Pgt=Tr(k.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})),XJ=Tr(k.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),JJ=Tr(k.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Agt=Tr(k.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Mgt=Tr(k.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})),Rgt=Tr(k.jsx("g",{children:k.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})})),ZJ=Tr(k.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}));Tr(k.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}));const Dgt=Tr(k.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"})),kgt=Tr(k.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}));function spe(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const PO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",_gt=e=>!!e.key,lpe=e=>e==="Tab"||e==="Escape";function cpe(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function $gt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const Ngt=["hideMenu","colDef","id","labelledby","className","children","open"],Lgt=ae(cd)(()=>({minWidth:248})),Fgt=Vt(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=$e(t,Ngt),u=yt(),f=x.useCallback(p=>{p.key==="Tab"&&p.preventDefault(),lpe(p.key)&&r(p)},[r]);return k.jsx(Lgt,z({as:u.slots.baseMenuList,id:o,className:fe(ee.menuList,a),"aria-labelledby":i,onKeyDown:f,autoFocus:l},c,{ref:n,children:s}))}),jgt=["displayOrder"],Bgt=e=>{const t=fs(),n=yt(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=x.useMemo(()=>z({},r,i),[r,i]),f=x.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const g=z({},a);return Object.entries(o).forEach(([y,v])=>{g[y]=z({},v,a[y]||{})}),g},[o,a]),p=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),m=x.useMemo(()=>{const g=Object.keys(r);return Object.keys(i).filter(y=>!g.includes(y))},[i,r]);return x.useMemo(()=>{const v=Array.from(new Set([...p,...m])).filter(w=>u[w]!=null).sort((w,C)=>{const E=f[w],I=f[C],O=Number.isFinite(E==null?void 0:E.displayOrder)?E.displayOrder:100,P=Number.isFinite(I==null?void 0:I.displayOrder)?I.displayOrder:100;return O-P});return v.reduce((w,C,E)=>{let I={colDef:l,onClick:s};const O=f[C];if(O){const P=$e(O,jgt);I=z({},I,P)}return c&&E!==v.length-1?[...w,[u[C],I],[n.slots.baseDivider,{}]]:[...w,[u[C],I]]},[])},[c,l,p,s,u,f,m,n.slots.baseDivider])};function zgt(e){const{colDef:t,onClick:n}=e,r=tn(),o=yt(),s=Yr(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=x.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:k.jsx(o.slots.baseMenuItem,{onClick:l,disabled:s,iconStart:k.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuHideColumn")})}function Vgt(e){const{onClick:t}=e,n=tn(),r=yt(),o=x.useCallback(i=>{t(i),n.current.showPreferences(oa.columns)},[n,t]);return r.disableColumnSelector?null:k.jsx(r.slots.baseMenuItem,{onClick:o,iconStart:k.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuManageColumns")})}function Hgt(e){return k.jsxs(x.Fragment,{children:[k.jsx(zgt,z({},e)),k.jsx(Vgt,z({},e))]})}function Ugt(e){const{colDef:t,onClick:n}=e,r=tn(),o=yt(),i=x.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:k.jsx(o.slots.baseMenuItem,{onClick:i,iconStart:k.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuFilter")})}function Ggt(e){const{colDef:t,onClick:n}=e,r=tn(),o=Ge(r,Ns),i=yt(),a=x.useMemo(()=>{if(!t)return null;const u=o.find(f=>f.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=x.useCallback(u=>{n(u);const f=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,f===a?null:f)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const f=r.current.getLocaleText(u);return typeof f=="function"?f(t):f};return k.jsxs(x.Fragment,{children:[s.includes("asc")&&a!=="asc"?k.jsx(i.slots.baseMenuItem,{onClick:l,"data-value":"asc",iconStart:k.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:c("columnMenuSortAsc")}):null,s.includes("desc")&&a!=="desc"?k.jsx(i.slots.baseMenuItem,{onClick:l,"data-value":"desc",iconStart:k.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:c("columnMenuSortDesc")}):null,s.includes(null)&&a!=null?k.jsx(i.slots.baseMenuItem,{onClick:l,iconStart:i.slots.columnMenuUnsortIcon?k.jsx(i.slots.columnMenuUnsortIcon,{fontSize:"small"}):k.jsx("span",{}),children:r.current.getLocaleText("columnMenuUnsort")}):null]})}const qgt=["defaultSlots","defaultSlotProps","slots","slotProps"],Wgt={columnMenuSortItem:Ggt,columnMenuFilterItem:Ugt,columnMenuColumnsItem:Hgt},Kgt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},Ygt=Vt(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=$e(t,qgt),l=Bgt(z({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return k.jsx(Fgt,z({},s,{ref:n,children:l.map(([c,u],f)=>k.jsx(c,z({},u),f))}))}),Qgt=Vt(function(t,n){return k.jsx(Ygt,z({},t,{ref:n,defaultSlots:Wgt,defaultSlotProps:Kgt}))}),Xgt=["className"],Jgt=e=>{const{classes:t}=e;return Me({root:["panelWrapper"]},Cn,t)},Zgt=ae("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),upe=Vt(function(t,n){const{className:r}=t,o=$e(t,Xgt),i=yt(),a=Jgt(i);return k.jsx(Zgt,z({tabIndex:-1,className:fe(a.root,r),ownerState:i},o,{ref:n}))});function eyt(e){var n;const t=yt();return k.jsx(upe,z({},e,{children:k.jsx(t.slots.columnsManagement,z({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const tyt=["children","className","classes","onClose"],nyt=Ke("MuiDataGrid",["panel","paper"]),ryt=ae(cd,{name:"MuiDataGrid",slot:"panel"})({zIndex:Ct.zIndex.panel}),oyt=ae("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:Ct.colors.background.overlay,borderRadius:Ct.radius.base,boxShadow:Ct.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${Ct.spacing(2)})`,overflow:"auto"}),iyt=Vt((e,t)=>{var C;const{children:n,className:r,onClose:o}=e,i=$e(e,tyt),a=tn(),s=yt(),l=nyt,[c,u]=x.useState(!1),f=dfe(),p=Je(()=>u(!0)),m=Je(()=>u(!1)),g=Je(()=>{o==null||o()}),y=Je(E=>{E.key==="Escape"&&(o==null||o())}),[v,w]=x.useState(null);return x.useEffect(()=>{var I,O;const E=(O=(I=a.current.rootElementRef)==null?void 0:I.current)==null?void 0:O.querySelector('[data-id="gridPanelAnchor"]');E&&w(E)},[a]),v?k.jsx(ryt,z({as:s.slots.basePopper,ownerState:s,placement:"bottom-end",className:fe(l.panel,r,f),flip:!0,onDidShow:p,onDidHide:m,onClickAway:g,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},i,(C=s.slotProps)==null?void 0:C.basePopper,{target:e.target??v,ref:t,children:k.jsx(oyt,{className:l.paper,ownerState:s,onKeyDown:y,children:c&&n})})):null}),ayt=["className"],syt=e=>{const{classes:t}=e;return Me({root:["panelContent"]},Cn,t)},lyt=Nn("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:Ct.spacing(2.5,1.5,2,1),gap:Ct.spacing(2.5)});function cyt(e){const{className:t}=e,n=$e(e,ayt),r=yt(),o=syt(r);return k.jsx(lyt,z({className:fe(o.root,t),ownerState:r},n))}const uyt=["className"],dyt=e=>{const{classes:t}=e;return Me({root:["panelFooter"]},Cn,t)},fyt=ae("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:Ct.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${Ct.colors.border.base}`});function pyt(e){const{className:t}=e,n=$e(e,uyt),r=yt(),o=dyt(r);return k.jsx(fyt,z({className:fe(o.root,t),ownerState:r},n))}const hyt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],myt=["InputComponentProps"],gyt=e=>{const{classes:t}=e;return Me({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Cn,t)},yyt=ae("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:Ct.spacing(1.5)}),vyt=ae("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),byt=ae("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),xyt=ae("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),Syt=ae("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),wyt=ae("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),Cyt=e=>{switch(e){case Zi.And:return"filterPanelOperatorAnd";case Zi.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},w0=e=>e.headerName||e.field,eZ=new Intl.Collator,tZ=Vt(function(t,n){var Ee,xe,Re,he,Pe,ve,Ie;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:f=[Zi.And,Zi.Or],columnsSort:p,filterColumns:m,deleteIconProps:g={},logicOperatorInputProps:y={},operatorInputProps:v={},columnInputProps:w={},valueInputProps:C={},readOnly:E}=t,I=$e(t,hyt),O=tn(),P=Ge(O,ud),R=Ge(O,sfe),D=Ge(O,Bo),M=bn(),A=bn(),_=bn(),N=bn(),B=yt(),H=gyt(B),j=x.useRef(null),L=x.useRef(null),V=D.logicOperator??Zi.And,W=o&&f.length>0,G=(((Ee=B.slotProps)==null?void 0:Ee.baseSelect)||{}).native??!1,q=((xe=B.slotProps)==null?void 0:xe.baseSelectOption)||{},{InputComponentProps:Y}=C,Z=$e(C,myt),ie=Ge(O,kh),se=Ge(O,Wfe),{filteredColumns:ce,selectedField:ye}=x.useMemo(()=>{let te=r.field;const Te=P[r.field].filterable===!1?P[r.field]:null;if(Te)return{filteredColumns:[Te],selectedField:te};if(ie)return{filteredColumns:R.filter(Ve=>se.get(Ve.field)!==void 0),selectedField:te};if(m===void 0||typeof m!="function")return{filteredColumns:R,selectedField:te};const De=m({field:r.field,columns:R,currentFilters:(D==null?void 0:D.items)||[]});return{filteredColumns:R.filter(Ve=>{const We=De.includes(Ve.field);return Ve.field===r.field&&!We&&(te=void 0),We}),selectedField:te}},[r.field,P,ie,m,R,D==null?void 0:D.items,se]),Se=x.useMemo(()=>{switch(p){case"asc":return ce.sort((te,Te)=>eZ.compare(w0(te),w0(Te)));case"desc":return ce.sort((te,Te)=>-eZ.compare(w0(te),w0(Te)));default:return ce}},[ce,p]),ne=r.field?O.current.getColumn(r.field):null,le=x.useMemo(()=>{var te;return!r.operator||!ne?null:(te=ne.filterOperators)==null?void 0:te.find(Te=>Te.value===r.operator)},[r,ne]),de=x.useCallback(te=>{const Te=te.target.value,De=O.current.getColumn(Te);if(De.field===ne.field)return;const Ve=De.filterOperators.find(ut=>ut.value===r.operator)||De.filterOperators[0];let rt=!Ve.InputComponent||Ve.InputComponent!==(le==null?void 0:le.InputComponent)||De.type!==ne.type?void 0:r.value;if(De.type==="singleSelect"&&rt!==void 0){const ut=De,Be=Dh(ut);Array.isArray(rt)?rt=rt.filter(et=>TO(et,Be,ut==null?void 0:ut.getOptionValue)!==void 0):TO(r.value,Be,ut==null?void 0:ut.getOptionValue)===void 0&&(rt=void 0)}a(z({},r,{field:Te,operator:Ve.value,value:rt}))},[O,a,r,ne,le]),oe=x.useCallback(te=>{const Te=te.target.value,De=ne==null?void 0:ne.filterOperators.find(We=>We.value===Te),Ve=!(De!=null&&De.InputComponent)||(De==null?void 0:De.InputComponent)!==(le==null?void 0:le.InputComponent);a(z({},r,{operator:Te,value:Ve?void 0:r.value}))},[a,r,ne,le]),ue=x.useCallback(te=>{const Te=te.target.value===Zi.And.toString()?Zi.And:Zi.Or;c(Te)},[c]),pe=()=>{i(r)};return x.useImperativeHandle(u,()=>({focus:()=>{var te;le!=null&&le.InputComponent?(te=j==null?void 0:j.current)==null||te.focus():L.current.focus()}}),[le]),k.jsxs(yyt,z({className:H.root,"data-id":r.id,ownerState:B},I,{ref:n,children:[k.jsx(vyt,z({},g,{className:fe(H.deleteIcon,g.className),ownerState:B,children:k.jsx(B.slots.baseIconButton,z({"aria-label":O.current.getLocaleText("filterPanelDeleteIconLabel"),title:O.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:pe,size:"small",disabled:E},(Re=B.slotProps)==null?void 0:Re.baseIconButton,{children:k.jsx(B.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),k.jsx(byt,z({as:B.slots.baseSelect,sx:[W?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},y.sx],className:fe(H.logicOperatorInput,y.className),ownerState:B},y,{size:"small",slotProps:{htmlInput:{"aria-label":O.current.getLocaleText("filterPanelLogicOperator")}},value:V??"",onChange:ue,disabled:!!l||f.length===1,native:G},(he=B.slotProps)==null?void 0:he.baseSelect,{children:f.map(te=>x.createElement(B.slots.baseSelectOption,z({},q,{native:G,key:te.toString(),value:te.toString()}),O.current.getLocaleText(Cyt(te))))})),k.jsx(xyt,z({as:B.slots.baseSelect},w,{className:fe(H.columnInput,w.className),ownerState:B,size:"small",labelId:A,id:M,label:O.current.getLocaleText("filterPanelColumns"),value:ye??"",onChange:de,native:G,disabled:E},(Pe=B.slotProps)==null?void 0:Pe.baseSelect,{children:Se.map(te=>x.createElement(B.slots.baseSelectOption,z({},q,{native:G,key:te.field,value:te.field}),w0(te)))})),k.jsx(Syt,z({as:B.slots.baseSelect,size:"small"},v,{className:fe(H.operatorInput,v.className),ownerState:B,labelId:N,label:O.current.getLocaleText("filterPanelOperator"),id:_,value:r.operator,onChange:oe,native:G,inputRef:L,disabled:E},(ve=B.slotProps)==null?void 0:ve.baseSelect,{children:(Ie=ne==null?void 0:ne.filterOperators)==null?void 0:Ie.map(te=>x.createElement(B.slots.baseSelectOption,z({},q,{native:G,key:te.value,value:te.value}),te.label||O.current.getLocaleText(`filterOperator${Oe(te.value)}`)))})),k.jsx(wyt,z({},Z,{className:fe(H.valueInput,Z.className),ownerState:B,children:le!=null&&le.InputComponent?k.jsx(le.InputComponent,z({apiRef:O,item:r,applyValue:a,focusElementRef:j,disabled:E,slotProps:{root:{size:"small"}}},le.InputComponentProps,Y),r.field):null}))]}))}),Eyt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],nZ=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),Tyt=Vt(function(t,n){var N,B;const r=tn(),o=yt(),i=Ge(r,Bo),a=Ge(r,sfe),s=Ge(r,kdt),l=x.useRef(null),c=x.useRef(null),{logicOperators:u=[Zi.And,Zi.Or],columnsSort:f,filterFormProps:p,getColumnForNewFilter:m,disableAddFilterButton:g=!1,disableRemoveAllButton:y=!1}=t,v=$e(t,Eyt),w=r.current.upsertFilterItem,C=x.useCallback(H=>{r.current.setFilterLogicOperator(H)},[r]),E=x.useCallback(()=>{let H;if(m&&typeof m=="function"){const j=m({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(j===null)return null;H=a.find(({field:L})=>L===j)}else H=a.find(j=>{var L;return(L=j.filterOperators)==null?void 0:L.length});return H?nZ(H):null},[i==null?void 0:i.items,a,m]),I=x.useCallback(()=>{if(m===void 0||typeof m!="function")return E();const H=i.items.length?i.items:[E()].filter(Boolean),j=m({currentFilters:H,columns:a});if(j===null)return null;const L=a.find(({field:V})=>V===j);return L?nZ(L):null},[i.items,a,m,E]),O=x.useMemo(()=>i.items.length?i.items:(c.current||(c.current=E()),c.current?[c.current]:[]),[i.items,E]),P=O.length>1,{readOnlyFilters:R,validFilters:D}=x.useMemo(()=>O.reduce((H,j)=>(s[j.field]?H.validFilters.push(j):H.readOnlyFilters.push(j),H),{readOnlyFilters:[],validFilters:[]}),[O,s]),M=x.useCallback(()=>{const H=I();H&&r.current.upsertFilterItems([...O,H])},[r,I,O]),A=x.useCallback(H=>{const j=D.length===1;r.current.deleteFilterItem(H),j&&r.current.hideFilterPanel()},[r,D.length]),_=x.useCallback(()=>D.length===1&&D[0].value===void 0?(r.current.deleteFilterItem(D[0]),r.current.hideFilterPanel()):r.current.setFilterModel(z({},i,{items:R}),"removeAllFilterItems"),[r,R,i,D]);return x.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&C(u[0])},[u,C,i.logicOperator]),x.useEffect(()=>{D.length>0&&l.current.focus()},[D.length]),k.jsxs(upe,z({},v,{ref:n,children:[k.jsxs(cyt,{children:[R.map((H,j)=>k.jsx(tZ,z({item:H,applyFilterChanges:w,deleteFilter:A,hasMultipleFilters:P,showMultiFilterOperators:j>0,disableMultiFilterOperator:j!==1,applyMultiFilterOperatorChanges:C,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:f},p),H.id==null?j:H.id)),D.map((H,j)=>k.jsx(tZ,z({item:H,applyFilterChanges:w,deleteFilter:A,hasMultipleFilters:P,showMultiFilterOperators:R.length+j>0,disableMultiFilterOperator:R.length+j!==1,applyMultiFilterOperatorChanges:C,focusElementRef:j===D.length-1?l:null,logicOperators:u,columnsSort:f},p),H.id==null?j+R.length:H.id))]}),!o.disableMultipleColumnsFiltering&&!(g&&y)?k.jsxs(pyt,{children:[g?k.jsx("span",{}):k.jsx(o.slots.baseButton,z({onClick:M,startIcon:k.jsx(o.slots.filterPanelAddIcon,{})},(N=o.slotProps)==null?void 0:N.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!y&&D.length>0?k.jsx(o.slots.baseButton,z({onClick:_,startIcon:k.jsx(o.slots.filterPanelRemoveAllIcon,{})},(B=o.slotProps)==null?void 0:B.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),Oyt=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},Iyt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,Pyt=["children"],Ayt=sl({from:{opacity:0},to:{opacity:1}}),Myt=sl({"from, to":{"--scrollable":'" "'}}),Ryt=Nn("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})`
flex: 1;
display: flex;
flex-direction: column;
- animation: ${Ayt};
+ animation: ${Myt};
animation-timeline: --scroll-timeline;
animation-fill-mode: none;
box-sizing: border-box;
@@ -431,7 +431,7 @@ return result$$;`.replaceAll("$$",String(wJ)));return wJ+=1,(s,l)=>i(o,s,l)},lfe
left: 0;
width: 100%;
height: 4px;
- animation: ${Pyt} linear both;
+ animation: ${Ayt} linear both;
animation-timeline: --scroll-timeline;
// Custom property toggle trick:
@@ -454,21 +454,21 @@ return result$$;`.replaceAll("$$",String(wJ)));return wJ+=1,(s,l)=>i(o,s,l)},lfe
animation-direction: reverse;
animation-range: calc(100% - 4px) 100%;
}
-`,Ryt=Vt(function(t,n){const{children:r}=t,o=$e(t,Iyt);return k.jsx(Myt,z({},o,{ref:n,children:r}))}),Dyt=e=>{const{classes:t}=e;return Me({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},Cn,t)},nZ=new Intl.Collator;function kyt(e){var W,K,G,q;const t=tn(),n=x.useRef(null),r=Ge(t,Adt),o=Ge(t,Nl),i=yt(),[a,s]=x.useState(""),l=Dyt(i),c=Ge(t,Ul),u=Ge(t,Rh),f=Ge(t,qfe),h=x.useMemo(()=>u?Array.from(f.values()):c,[u,f,c]),{sort:m,searchPredicate:g=Oyt,autoFocusSearchField:y=!0,disableShowHideToggle:v=!1,disableResetButton:w=!1,toggleAllMode:C="all",getTogglableColumns:E,searchInputProps:I}=e,O=x.useMemo(()=>Tyt(o,r),[o,r]),P=x.useMemo(()=>{switch(m){case"asc":return[...h].sort((Y,Z)=>nZ.compare(Y.headerName||Y.field,Z.headerName||Z.field));case"desc":return[...h].sort((Y,Z)=>-nZ.compare(Y.headerName||Y.field,Z.headerName||Z.field));default:return h}},[h,m]),R=Y=>{const{name:Z}=Y.target;t.current.setColumnVisibility(Z,o[Z]===!1)},D=x.useMemo(()=>{const Y=E?E(P):null,Z=Y?P.filter(({field:ie})=>Y.includes(ie)):P;return a?Z.filter(ie=>g(ie,a.toLowerCase())):Z},[P,a,g,E]),M=x.useCallback(Y=>{const Z=Nl(t),ie=z({},Z),se=E?E(h):null;return(C==="filteredOnly"?D:h).forEach(ce=>{ce.hideable&&(se==null||se.includes(ce.field))&&(Y?delete ie[ce.field]:ie[ce.field]=!1)}),t.current.setColumnVisibilityModel(ie)},[t,h,E,C,D]),A=x.useCallback(Y=>{s(Y.target.value)},[]),_=x.useMemo(()=>D.filter(Y=>Y.hideable),[D]),N=x.useMemo(()=>_.every(Y=>o[Y.field]==null||o[Y.field]!==!1),[o,_]),B=x.useMemo(()=>_.every(Y=>o[Y.field]===!1),[o,_]),H=x.useRef(null);x.useEffect(()=>{var Y;y?(Y=n.current)==null||Y.focus():H.current&&typeof H.current.focus=="function"&&H.current.focus()},[y]);let j=!1;const L=Y=>j===!1&&Y.hideable!==!1?(j=!0,!0):!1,V=x.useCallback(()=>{var Y;s(""),(Y=n.current)==null||Y.focus()},[]);return k.jsxs(x.Fragment,{children:[k.jsx(Nyt,{className:l.header,ownerState:i,children:k.jsx(Lyt,z({as:i.slots.baseTextField,ownerState:i,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:l.searchInput,value:a,onChange:A,size:"small",type:"search",slotProps:{input:{startAdornment:k.jsx(i.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:k.jsx(i.slots.baseIconButton,z({size:"small","aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),style:a?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:V,edge:"end"},(W=i.slotProps)==null?void 0:W.baseIconButton,{children:k.jsx(i.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},(K=i.slotProps)==null?void 0:K.baseTextField,I))}),k.jsx($yt,{ownerState:i,children:k.jsxs(_yt,{className:l.root,ownerState:i,children:[D.map(Y=>{var Z;return k.jsx(i.slots.baseCheckbox,z({className:l.row,disabled:Y.hideable===!1||u,checked:o[Y.field]!==!1,onClick:R,name:Y.field,inputRef:L(Y)?H:void 0,label:Y.headerName||Y.field,density:"compact",fullWidth:!0},(Z=i.slotProps)==null?void 0:Z.baseCheckbox),Y.field)}),D.length===0&&k.jsx(jyt,{ownerState:i,children:t.current.getLocaleText("columnsManagementNoColumns")})]})}),!v||!w?k.jsxs(Fyt,{ownerState:i,className:l.footer,children:[v?k.jsx("span",{}):k.jsx(i.slots.baseCheckbox,z({disabled:_.length===0||u,checked:N,indeterminate:!N&&!B,onClick:()=>M(!N),name:t.current.getLocaleText("columnsManagementShowHideAllText"),label:t.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},(G=i.slotProps)==null?void 0:G.baseCheckbox)),w?null:k.jsx(i.slots.baseButton,z({onClick:()=>t.current.setColumnVisibilityModel(r),disabled:O||u},(q=i.slotProps)==null?void 0:q.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const _yt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:Ct.spacing(.5,1.5)}),$yt=ae(Ryt,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),Nyt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:Ct.spacing(1.5,2),borderBottom:`1px solid ${Ct.colors.border.base}`}),Lyt=ae(sd,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${bi.input}::-webkit-search-decoration,
- & .${bi.input}::-webkit-search-cancel-button,
- & .${bi.input}::-webkit-search-results-button,
- & .${bi.input}::-webkit-search-results-decoration`]:{display:"none"}}),Fyt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:Ct.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${Ct.colors.border.base}`}),jyt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:Ct.spacing(1,0),alignSelf:"center",font:Ct.typography.font.body}),Byt=Vt(function(t,n){var C,E;const{children:r,slotProps:o={}}=t,i=o.button||{},a=o.tooltip||{},s=tn(),l=yt(),c=bn(),u=bn(),[f,h]=x.useState(!1),m=x.useRef(null),g=en(n,m),y=I=>{var O;h(P=>!P),(O=i.onClick)==null||O.call(i,I)},v=()=>h(!1),w=I=>{I.key==="Tab"&&I.preventDefault(),spe(I.key)&&v()};return r==null?null:k.jsxs(x.Fragment,{children:[k.jsx(l.slots.baseTooltip,z({title:s.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},(C=l.slotProps)==null?void 0:C.baseTooltip,a,{children:k.jsx(l.slots.baseButton,z({size:"small",startIcon:k.jsx(l.slots.exportIcon,{}),"aria-expanded":f,"aria-label":s.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":f?u:void 0,id:c},(E=l.slotProps)==null?void 0:E.baseButton,i,{onClick:y,ref:g,children:s.current.getLocaleText("toolbarExport")}))})),k.jsx(FP,{open:f,target:m.current,onClose:v,position:"bottom-end",children:k.jsx(l.slots.baseMenuList,{id:u,className:ee.menuList,"aria-labelledby":c,onKeyDown:w,autoFocusItem:f,children:x.Children.map(r,I=>x.isValidElement(I)?x.cloneElement(I,{hideMenu:v}):I)})})]})}),zyt=["hideMenu","options"],Vyt=["hideMenu","options"],Hyt=["csvOptions","printOptions","excelOptions"];function Uyt(e){const t=tn(),n=yt(),{hideMenu:r,options:o}=e,i=$e(e,zyt);return k.jsx(n.slots.baseMenuItem,z({onClick:()=>{t.current.exportDataAsCsv(o),r==null||r()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function Gyt(e){const t=tn(),n=yt(),{hideMenu:r,options:o}=e,i=$e(e,Vyt);return k.jsx(n.slots.baseMenuItem,z({onClick:()=>{t.current.exportDataAsPrint(o),r==null||r()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}Vt(function(t,n){const r=t,{csvOptions:o={},printOptions:i={},excelOptions:a}=r,s=$e(r,Hyt),c=tn().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:a,csvOptions:o,printOptions:i}).sort((u,f)=>u.componentName>f.componentName?1:-1);return c.length===0?null:k.jsx(Byt,z({},s,{ref:n,children:c.map((u,f)=>x.cloneElement(u.component,{key:f}))}))});function Js(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(!Js(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;for(let i=0;i<o.length;i+=1){const a=o[i];if(!Js(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let o=0;o<r;o+=1)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(let o=0;o<r;o+=1){const i=n[o];if(!Js(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}const upe=x.createContext(void 0);function cH(){const e=x.useContext(upe);if(e===void 0)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return e}const qyt=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],Wyt=e=>e.split(" ").filter(t=>t!==""),Kyt=e=>e.join(" ");function Yyt(e){const t=yt(),{render:n,className:r,parser:o=Wyt,formatter:i=Kyt,debounceMs:a=t.filterDebounceMs,defaultExpanded:s,expanded:l,onExpandedChange:c}=e,u=$e(e,qyt),f=tn(),h=x.useRef(null),m=x.useRef(null),g=Ge(f,vfe),[y,v]=x.useState(i(g??[])),[w,C]=x.useState(s??y.length>0),E=l??w,I=x.useMemo(()=>({value:y,expanded:E}),[y,E]),O=typeof r=="function"?r(I):r,P=x.useRef(null),R=bn(),D=x.useCallback(V=>{c&&c(V),l===void 0&&C(V)},[c,l]),M=x.useRef(g);x.useEffect(()=>{Js(M.current,g)||(M.current=g,v(V=>Js(o(V),g)?V:i(g??[])))},[g,i,o]);const A=x.useRef(!0),_=x.useRef(E);x.useEffect(()=>{var V;if(A.current){A.current=!1;return}_.current!==E&&(E?requestAnimationFrame(()=>{var W;(W=h.current)==null||W.focus({preventScroll:!0})}):(V=m.current)==null||V.focus({preventScroll:!0}),_.current=E)},[E]);const N=x.useMemo(()=>$h(V=>{const W=o(V);M.current=W,f.current.setQuickFilterValues(W)},a),[f,a,o]);x.useEffect(()=>N.clear,[N]);const B=x.useCallback(V=>{const W=V.target.value;v(W),N(W)},[N]),H=x.useCallback(()=>{var V;v(""),f.current.setQuickFilterValues([]),(V=h.current)==null||V.focus()},[f,h]),j=x.useMemo(()=>({controlRef:h,triggerRef:m,state:I,controlId:R,clearValue:H,onValueChange:B,onExpandedChange:D}),[R,I,B,H,D]);In(()=>{var V;P.current&&m.current&&P.current.style.setProperty("--trigger-width",`${(V=m.current)==null?void 0:V.offsetWidth}px`)},[]);const L=Jc("div",n,z({className:O},u,{ref:P}),I);return k.jsx(upe.Provider,{value:j,children:L})}const Qyt=["render","className","slotProps","onKeyDown","onChange"],Xyt=Vt(function(t,n){var P;const{render:r,className:o,slotProps:i,onKeyDown:a,onChange:s}=t,l=$e(t,Qyt),c=yt(),{state:u,controlId:f,controlRef:h,onValueChange:m,onExpandedChange:g,clearValue:y}=cH(),v=typeof o=="function"?o(u):o,w=en(h,n),C=R=>{R.key==="Escape"&&(u.value===""?g(!1):y()),a==null||a(R)},E=R=>{var D,M;u.value===""&&g(!1),(M=(D=i==null?void 0:i.htmlInput)==null?void 0:D.onBlur)==null||M.call(D,R)},I=R=>{u.expanded||g(!0),m(R),s==null||s(R)},O=Jc(c.slots.baseTextField,r,z({},(P=c.slotProps)==null?void 0:P.baseTextField,{slotProps:z({htmlInput:z({role:"searchbox",id:f,tabIndex:u.expanded?void 0:-1},i==null?void 0:i.htmlInput,{onBlur:E})},i),value:u.value,className:v},l,{onChange:I,onKeyDown:C,ref:w}),u);return k.jsx(x.Fragment,{children:O})}),Jyt=["render","className","onClick"],Zyt=Vt(function(t,n){var m;const{render:r,className:o,onClick:i}=t,a=$e(t,Jyt),s=yt(),{state:l,clearValue:c}=cH(),u=typeof o=="function"?o(l):o,f=g=>{c(),i==null||i(g)},h=Jc(s.slots.baseIconButton,r,z({},(m=s.slotProps)==null?void 0:m.baseIconButton,{className:u,tabIndex:-1},a,{onClick:f,ref:n}),l);return k.jsx(x.Fragment,{children:h})}),evt=["render","className","onClick"],tvt=Vt(function(t,n){var v;const{render:r,className:o,onClick:i}=t,a=$e(t,evt),s=yt(),{state:l,controlId:c,onExpandedChange:u,triggerRef:f}=cH(),h=typeof o=="function"?o(l):o,m=en(f,n),g=w=>{u(!l.expanded),i==null||i(w)},y=Jc(s.slots.baseButton,r,z({},(v=s.slotProps)==null?void 0:v.baseButton,{className:h,"aria-controls":c,"aria-expanded":l.expanded},a,{onClick:g,ref:m}),l);return k.jsx(x.Fragment,{children:y})}),nvt=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],rvt=["ref","slotProps"],ovt=e=>{const{classes:t}=e;return Me({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},Cn,t)},ivt=Nn("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),avt=Nn(kE,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})(({ownerState:e})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:e.expanded?0:1,pointerEvents:e.expanded?"none":"auto",transition:Ct.transition(["opacity"])})),svt=Nn(e=>{throw new Error("Failed assertion: should not be rendered")},{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})(({ownerState:e})=>({gridArea:"1 / 1",overflowX:"clip",width:e.expanded?260:"var(--trigger-width)",opacity:e.expanded?1:0,transition:Ct.transition(["width","opacity"])}));function lvt(e){const t=tn(),n=yt(),r={classes:n.classes,expanded:!1},o=ovt(r),{quickFilterParser:i,quickFilterFormatter:a,debounceMs:s,className:l,slotProps:c}=e,u=$e(e,nvt);return k.jsx(Yyt,{parser:i,formatter:a,debounceMs:s,render:(f,h)=>{const m=z({},r,{expanded:h.expanded});return k.jsxs(ivt,z({},f,{className:fe(o.root,l),children:[k.jsx(tvt,{render:g=>k.jsx(n.slots.baseTooltip,{title:t.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:k.jsx(avt,z({className:o.trigger},g,{ownerState:m,color:"default","aria-disabled":h.expanded,children:k.jsx(n.slots.quickFilterIcon,{fontSize:"small"})}))})}),k.jsx(Xyt,{render:g=>{var C;let{ref:y,slotProps:v}=g,w=$e(g,rvt);return k.jsx(svt,z({as:n.slots.baseTextField,className:o.control,ownerState:m,inputRef:y,"aria-label":t.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:t.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:z({input:z({startAdornment:k.jsx(n.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:w.value?k.jsx(Zyt,{render:k.jsx(n.slots.baseIconButton,{size:"small",edge:"end","aria-label":t.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:k.jsx(n.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},v==null?void 0:v.input)},v)},(C=n.slotProps)==null?void 0:C.baseTextField,w,c==null?void 0:c.root,u))}})]}))}})}const cvt=["render","className","onClick","onPointerUp"],uvt=Vt(function(t,n){var R;const{render:r,className:o,onClick:i,onPointerUp:a}=t,s=$e(t,cvt),l=yt(),c=bn(),u=bn(),f=tn(),h=Ge(f,Dh),m=h.open&&h.openedPanelValue===oa.filters,y=Ge(f,JV).length,v={open:m,filterCount:y},w=typeof o=="function"?o(v):o,{filterPanelTriggerRef:C}=sH(),E=en(n,C),I=D=>{m?f.current.hidePreferences():f.current.showPreferences(oa.filters,u,c),i==null||i(D)},O=D=>{m&&D.stopPropagation(),a==null||a(D)},P=Jc(l.slots.baseButton,r,z({},(R=l.slotProps)==null?void 0:R.baseButton,{id:c,"aria-haspopup":"true","aria-expanded":m?"true":void 0,"aria-controls":m?u:void 0,onClick:I,onPointerUp:O,className:w},s,{ref:E}),v);return k.jsx(x.Fragment,{children:P})}),dvt=["render","className","onClick","onPointerUp"],fvt=Vt(function(t,n){var O;const{render:r,className:o,onClick:i,onPointerUp:a}=t,s=$e(t,dvt),l=yt(),c=bn(),u=bn(),f=tn(),h=Ge(f,Dh),m=h.open&&h.openedPanelValue===oa.columns,g={open:m},y=typeof o=="function"?o(g):o,{columnsPanelTriggerRef:v}=sH(),w=en(n,v),C=P=>{m?f.current.hidePreferences():f.current.showPreferences(oa.columns,u,c),i==null||i(P)},E=P=>{m&&P.stopPropagation(),a==null||a(P)},I=Jc(l.slots.baseButton,r,z({},(O=l.slotProps)==null?void 0:O.baseButton,{id:c,"aria-haspopup":"true","aria-expanded":m?"true":void 0,"aria-controls":m?u:void 0,className:y},s,{onPointerUp:E,onClick:C,ref:w}),g);return k.jsx(x.Fragment,{children:I})}),pvt=["render","options","onClick"],hvt=Vt(function(t,n){var f;const{render:r,options:o,onClick:i}=t,a=$e(t,pvt),s=yt(),l=tn(),c=h=>{l.current.exportDataAsCsv(o),i==null||i(h)},u=Jc(s.slots.baseButton,r,z({},(f=s.slotProps)==null?void 0:f.baseButton,{onClick:c},a,{ref:n}));return k.jsx(x.Fragment,{children:u})}),mvt=["render","options","onClick"],gvt=Vt(function(t,n){var f;const{render:r,options:o,onClick:i}=t,a=$e(t,mvt),s=yt(),l=tn(),c=h=>{l.current.exportDataAsPrint(o),i==null||i(h)},u=Jc(s.slots.baseButton,r,z({},(f=s.slotProps)==null?void 0:f.baseButton,{onClick:c},a,{ref:n}));return k.jsx(x.Fragment,{children:u})}),yvt=["className"],vvt=["className"],dpe=e=>{const{classes:t}=e;return Me({divider:["toolbarDivider"],label:["toolbarLabel"]},Cn,t)},bvt=Nn(sd,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:Ct.spacing(0,.5)}),xvt=Nn("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:Ct.typography.font.large,fontWeight:Ct.typography.fontWeight.medium,margin:Ct.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function rZ(e){const t=$e(e,yvt),n=yt(),r=dpe(n);return k.jsx(bvt,z({as:n.slots.baseDivider,orientation:"vertical",className:r.divider},t))}function Svt(e){const t=$e(e,vvt),n=yt(),r=dpe(n);return k.jsx(xvt,z({className:r.label},t))}function wvt(e){var v,w,C;const{showQuickFilter:t=!0,quickFilterProps:n,csvOptions:r,printOptions:o,additionalItems:i,additionalExportMenuItems:a}=e,s=tn(),l=yt(),[c,u]=x.useState(!1),f=x.useRef(null),h=bn(),m=bn(),g=!(r!=null&&r.disableToolbarButton)||!(o!=null&&o.disableToolbarButton)||a,y=()=>u(!1);return k.jsxs(Emt,{children:[l.label&&k.jsx(Svt,{children:l.label}),!l.disableColumnSelector&&k.jsx(l.slots.baseTooltip,{title:s.current.getLocaleText("toolbarColumns"),children:k.jsx(fvt,{render:k.jsx(kE,{}),children:k.jsx(l.slots.columnSelectorIcon,{fontSize:"small"})})}),!l.disableColumnFilter&&k.jsx(l.slots.baseTooltip,{title:s.current.getLocaleText("toolbarFilters"),children:k.jsx(uvt,{render:(E,I)=>k.jsx(kE,z({},E,{color:I.filterCount>0?"primary":"default",children:k.jsx(l.slots.baseBadge,{badgeContent:I.filterCount,color:"primary",variant:"dot",children:k.jsx(l.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),i,g&&(!l.disableColumnFilter||!l.disableColumnSelector)&&k.jsx(rZ,{}),g&&k.jsxs(x.Fragment,{children:[k.jsx(l.slots.baseTooltip,{title:s.current.getLocaleText("toolbarExport"),children:k.jsx(kE,{ref:f,id:m,"aria-controls":h,"aria-haspopup":"true","aria-expanded":c?"true":void 0,onClick:()=>u(!c),children:k.jsx(l.slots.exportIcon,{fontSize:"small"})})}),k.jsx(FP,{target:f.current,open:c,onClose:y,position:"bottom-end",children:k.jsxs(l.slots.baseMenuList,z({id:h,"aria-labelledby":m,autoFocusItem:!0},(v=l.slotProps)==null?void 0:v.baseMenuList,{children:[!(o!=null&&o.disableToolbarButton)&&k.jsx(gvt,{render:k.jsx(l.slots.baseMenuItem,z({},(w=l.slotProps)==null?void 0:w.baseMenuItem)),options:o,onClick:y,children:s.current.getLocaleText("toolbarExportPrint")}),!(r!=null&&r.disableToolbarButton)&&k.jsx(hvt,{render:k.jsx(l.slots.baseMenuItem,z({},(C=l.slotProps)==null?void 0:C.baseMenuItem)),options:r,onClick:y,children:s.current.getLocaleText("toolbarExportCSV")}),a==null?void 0:a(y)]}))})]}),t&&k.jsxs(x.Fragment,{children:[k.jsx(rZ,{}),k.jsx(lvt,z({},n))]})]})}const Cvt=["className","selectedRowCount"],Evt=e=>{const{classes:t}=e;return Me({root:["selectedRowCount"]},Cn,t)},Tvt=Nn("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:Ct.spacing(0,2),visibility:"hidden",width:0,height:0,[Ct.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),Ovt=Vt(function(t,n){const{className:r,selectedRowCount:o}=t,i=$e(t,Cvt),a=tn(),s=yt(),l=Evt(s),c=a.current.getLocaleText("footerRowSelected")(o);return k.jsx(Tvt,z({className:fe(l.root,r),ownerState:s},i,{ref:n,children:c}))}),Ivt=Vt(function(t,n){var f;const r=tn(),o=yt(),i=Ge(r,cdt),a=Ge(r,UP),s=Ge(r,XV),l=!o.hideFooterSelectedRowCount&&a>0?k.jsx(Ovt,{selectedRowCount:a}):k.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?k.jsx(o.slots.footerRowCount,z({},(f=o.slotProps)==null?void 0:f.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&k.jsx(o.slots.pagination,{});return k.jsxs(mmt,z({},t,{ref:n,children:[l,c,u]}))}),px=(e,t,n,r,o,i)=>{let a;switch(e){case On.LEFT:a=r[n];break;case On.RIGHT:a=o-r[n]-t+i;break;default:a=void 0;break}return a},PO=(e,t,n,r,o)=>{const i=t===n-1;return e===On.LEFT&&i?!0:r?e===On.LEFT?!0:e===On.RIGHT?!i:!i||o:!1},AO=(e,t)=>e===On.RIGHT&&t===0,C0={root:ee.scrollbarFiller,header:ee["scrollbarFiller--header"],borderTop:ee["scrollbarFiller--borderTop"],borderBottom:ee["scrollbarFiller--borderBottom"],pinnedRight:ee["scrollbarFiller--pinnedRight"]};function uH({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return k.jsx("div",{role:"presentation",className:fe(C0.root,e&&C0.header,t&&C0.borderTop,n&&C0.borderBottom,r&&C0.pinnedRight)})}const Pvt=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],Avt=Nn("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),Mvt=e=>{const{classes:t}=e;return Me({root:["skeletonLoadingOverlay"]},Cn,t)},oZ=e=>parseInt(e.getAttribute("data-colindex"),10),Rvt=Vt(function(t,n){const r=yt(),{slots:o}=r,i=vr(),a=Mvt({classes:r.classes}),s=x.useRef(null),l=en(s,n),c=tn(),u=Ge(c,dr),f=Ge(c,NP),h=Ge(c,Yf),m=x.useMemo(()=>h.filter(D=>D<=f).length,[f,h]),{skeletonRowsCount:g,visibleColumns:y,showFirstRowBorder:v}=t,w=$e(t,Pvt),C=Ge(c,Yr),E=x.useMemo(()=>C.slice(0,m),[C,m]),I=Ge(c,Vv),O=x.useCallback(D=>{if(I.left.findIndex(M=>M.field===D)!==-1)return On.LEFT;if(I.right.findIndex(M=>M.field===D)!==-1)return On.RIGHT},[I.left,I.right]),P=x.useMemo(()=>{const D=[];for(let M=0;M<g;M+=1){const A=[];for(let _=0;_<E.length;_+=1){const N=E[_],B=O(N.field),H=B===On.LEFT,j=B===On.RIGHT,L=Qfe(B,i),V=L?I[L].length:E.length-I.left.length-I.right.length,W=L?I[L].findIndex(oe=>oe.field===N.field):_-I.left.length,K=u.hasScrollY?u.scrollbarSize:0,G=YP({},i,B,px(B,N.computedWidth,_,h,u.columnsTotalWidth,K)),q=u.columnsTotalWidth<u.viewportOuterSize.width,Y=PO(B,W,V,r.showCellVerticalBorder,q),Z=AO(B,W),ie=_===E.length-1,se=j&&W===0,ce=se&&q,ye=ie&&!se&&q,Se=u.viewportOuterSize.width-u.columnsTotalWidth,ne=Math.max(0,Se),le=k.jsx(o.skeletonCell,{width:ne,empty:!0},`skeleton-filler-column-${M}`),de=ie&&K!==0;ce&&A.push(le),A.push(k.jsx(o.skeletonCell,{field:N.field,type:N.type,align:N.align,width:"var(--width)",height:u.rowHeight,"data-colindex":_,empty:y&&!y.has(N.field),className:fe(H&&ee["cell--pinnedLeft"],j&&ee["cell--pinnedRight"],Y&&ee["cell--withRightBorder"],Z&&ee["cell--withLeftBorder"]),style:z({"--width":`${N.computedWidth}px`},G)},`skeleton-column-${M}-${N.field}`)),ye&&A.push(le),de&&A.push(k.jsx(uH,{pinnedRight:I.right.length>0},`skeleton-scrollbar-filler-${M}`))}D.push(k.jsx("div",{className:fe(ee.row,ee.rowSkeleton,M===0&&!v&&ee["row--firstVisible"]),children:A},`skeleton-row-${M}`))}return D},[g,E,O,i,I,u.hasScrollY,u.scrollbarSize,u.columnsTotalWidth,u.viewportOuterSize.width,u.rowHeight,h,r.showCellVerticalBorder,o,y,v]);return At(c,"columnResize",D=>{var W,K,G;const{colDef:M,width:A}=D,_=(W=s.current)==null?void 0:W.querySelectorAll(`[data-field="${cd(M.field)}"]`);if(!_)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const N=E.findIndex(q=>q.field===M.field),B=O(M.field),H=B===On.LEFT,j=B===On.RIGHT,L=getComputedStyle(_[0]).getPropertyValue("--width"),V=parseInt(L,10)-A;if(_&&_.forEach(q=>{q.style.setProperty("--width",`${A}px`)}),H){const q=(K=s.current)==null?void 0:K.querySelectorAll(`.${ee["cell--pinnedLeft"]}`);q==null||q.forEach(Y=>{oZ(Y)>N&&(Y.style.left=`${parseInt(getComputedStyle(Y).left,10)-V}px`)})}if(j){const q=(G=s.current)==null?void 0:G.querySelectorAll(`.${ee["cell--pinnedRight"]}`);q==null||q.forEach(Y=>{oZ(Y)<N&&(Y.style.right=`${parseInt(getComputedStyle(Y).right,10)+V}px`)})}}),k.jsx(Avt,z({className:a.root},w,{ref:l,children:P}))}),Dvt=Vt(function(t,n){const r=tn(),o=Ge(r,dr),i=(o==null?void 0:o.viewportInnerSize.height)??0,a=Math.ceil(i/o.rowHeight);return k.jsx(Rvt,z({},t,{skeletonRowsCount:a,ref:n}))}),kvt=["variant","noRowsVariant","style"],_vt={"circular-progress":{component:e=>e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>Dvt,style:{display:"block"}}},$vt=Vt(function(t,n){const{variant:r="linear-progress",noRowsVariant:o="skeleton",style:i}=t,a=$e(t,kvt),s=tn(),l=yt(),c=Ge(s,Hw),u=_vt[c===0?o:r],f=u.component(l);return k.jsx(QP,z({style:z({},u.style,i)},a,{ref:n,children:k.jsx(f,{})}))}),Nvt=Vt(function(t,n){const o=tn().current.getLocaleText("noRowsLabel");return k.jsx(QP,z({},t,{ref:n,children:o}))}),Lvt=Vt(function(t,n){var l;const r=yt(),o=tn(),i=Ge(o,Rc),a=()=>{o.current.showPreferences(oa.columns)},s=!r.disableColumnSelector&&i.length>0;return k.jsxs(QP,z({},t,{ref:n,children:[o.current.getLocaleText("noColumnsOverlayLabel"),s&&k.jsx(r.slots.baseButton,z({size:"small"},(l=r.slotProps)==null?void 0:l.baseButton,{onClick:a,children:o.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))}),Fvt=ae(sd)({maxHeight:"calc(100% + 1px)",flexGrow:1});function jvt(){const e=tn(),t=yt(),n=Ge(e,ri),r=Ge(e,Tg),o=Ge(e,Rfe),{paginationMode:i,loading:a}=t,s=r===-1&&i==="server"&&a,l=x.useMemo(()=>Math.max(0,o-1),[o]),c=x.useMemo(()=>r===-1||n.page<=l?n.page:l,[l,n.page,r]),u=x.useCallback(g=>{e.current.setPageSize(g)},[e]),f=x.useCallback((g,y)=>{e.current.setPage(y)},[e]),m=(g=>{for(let y=0;y<t.pageSizeOptions.length;y+=1){const v=t.pageSizeOptions[y];if(typeof v=="number"){if(v===g)return!0}else if(v.value===g)return!0}return!1})(n.pageSize)?t.pageSizeOptions:[];return k.jsx(Fvt,{as:t.slots.basePagination,count:r,page:c,rowsPerPageOptions:m,rowsPerPage:n.pageSize,onPageChange:f,onRowsPerPageChange:u,disabled:s})}const Bvt=["className","rowCount","visibleRowCount"],zvt=e=>{const{classes:t}=e;return Me({root:["rowCount"]},Cn,t)},Vvt=Nn("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:Ct.spacing(0,2)}),Hvt=Vt(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=$e(t,Bvt),s=tn(),l=yt(),c=zvt(l);if(o===0)return null;const u=i<o?s.current.getLocaleText("footerTotalVisibleRows")(i,o):o.toLocaleString();return k.jsxs(Vvt,z({className:fe(c.root,r),ownerState:l},a,{ref:n,children:[s.current.getLocaleText("footerTotalRows")," ",u]}))});function Uvt(e,t){return Me(t,Cn,e)}const Gvt=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],qvt=Pt(Bo,(e,t)=>t?!!VP(e):!1),Wvt=Vt(function(t,n){var ut;const{selected:r,rowId:o,row:i,index:a,style:s,rowHeight:l,className:c,visibleColumns:u,pinnedColumns:f,offsetLeft:h,columnsTotalWidth:m,firstColumnIndex:g,lastColumnIndex:y,focusedColumnIndex:v,isFirstVisible:w,isLastVisible:C,isNotVisible:E,showBottomBorder:I,scrollbarWidth:O,gridHasFiller:P,onClick:R,onDoubleClick:D,onMouseEnter:M,onMouseLeave:A,onMouseOut:_,onMouseOver:N}=t,B=$e(t,Gvt),H=fs(),j=LP(),L=x.useRef(null),V=yt(),W=oH(H),K=Ge(H,Ns),G=Ge(H,jv),q=Ge(H,Yf),Y=V.rowReordering,Z=Ge(H,qvt,Y),ie=en(L,n),se=Cc(H,o),ce=Ge(H,Kfe,{rowId:o,editMode:V.editMode}),ye=V.editMode===zc.Row,Se=v!==void 0,ne=Se&&v>=f.left.length&&v<g,le=Se&&v<u.length-f.right.length&&v>=y,de=Uvt(V.classes,{root:["row",r&&"selected",ye&&"row--editable",ce&&"row--editing",w&&"row--firstVisible",C&&"row--lastVisible",I&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),oe=j.hooks.useGridRowAriaAttributes();x.useLayoutEffect(()=>{if(W.range){const Be=H.current.getRowIndexRelativeToVisibleRows(o);Be!==void 0&&H.current.unstable_setLastMeasuredRowIndex(Be)}if(L.current&&l==="auto")return H.current.observeRowHeight(L.current,o)},[H,W.range,l,o]);const ue=x.useCallback((Be,et)=>Le=>{Jw(Le)||H.current.getRow(o)&&(H.current.publishEvent(Be,H.current.getRowParams(o),Le),et&&et(Le))},[H,o]),pe=x.useCallback(Be=>{const et=OO(Be.target,ee.cell),Le=et==null?void 0:et.getAttribute("data-field");if(Le){if(Le===Gv.field||Le===zP||Le==="__reorder__"||H.current.getCellMode(o,Le)===Qn.Edit)return;const It=H.current.getColumn(Le);if((It==null?void 0:It.type)===jP)return}ue("rowClick",R)(Be)},[H,R,ue,o]),{slots:Ee,slotProps:xe,disableColumnReorder:Re}=V,he=Ge(H,()=>z({},H.current.getRowHeightEntry(o)),void 0,zV),Pe=x.useMemo(()=>{if(E)return{opacity:0,width:0,height:0};const Be=z({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(he.spacingTop){const et=V.rowSpacingType==="border"?"borderTopWidth":"marginTop";Be[et]=he.spacingTop}if(he.spacingBottom){const et=V.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let Le=Be[et];typeof Le!="number"&&(Le=parseInt(Le||"0",10)),Le+=he.spacingBottom,Be[et]=Le}return Be},[E,l,s,he,V.rowSpacingType]),ve=H.current.unstable_applyPipeProcessors("rowClassName",[],o),Ie=oe(se,a);if(typeof V.getRowClassName=="function"){const Be=a-(((ut=W.range)==null?void 0:ut.firstRowIndex)||0),et=z({},H.current.getRowParams(o),{isFirstVisible:Be===0,isLastVisible:Be===W.rows.length-1,indexRelativeToCurrentPage:Be});ve.push(V.getRowClassName(et))}const te=(Be,et,Le,It,Lt=On.NONE)=>{const nt=H.current.unstable_getCellColSpanInfo(o,Le);if(nt!=null&&nt.spannedByColSpan)return null;const lt=(nt==null?void 0:nt.cellProps.width)??Be.computedWidth,vt=(nt==null?void 0:nt.cellProps.colSpan)??1,bt=px(Lt,Be.computedWidth,Le,q,m,O);if(se.type==="skeletonRow")return k.jsx(Ee.skeletonCell,{type:Be.type,width:lt,height:l,field:Be.field,align:Be.align},Be.field);const vn=Be.field==="__reorder__",kn=!(Re||Be.disableReorder),Rr=Z&&!K.length&&G<=1,nr=!(kn||vn&&Rr),Bn=Lt===On.VIRTUAL,yo=AO(Lt,et),To=PO(Lt,et,It,V.showCellVerticalBorder,P);return k.jsx(Ee.cell,z({column:Be,width:lt,rowId:o,align:Be.align||"left",colIndex:Le,colSpan:vt,disableDragEvents:nr,isNotVisible:Bn,pinnedOffset:bt,pinnedPosition:Lt,showLeftBorder:yo,showRightBorder:To,row:i,rowNode:se},xe==null?void 0:xe.cell),Be.field)},Te=f.left.map((Be,et)=>te(Be,et,et,f.left.length,On.LEFT)),De=f.right.map((Be,et)=>{const Le=u.length-f.right.length+et;return te(Be,et,Le,f.right.length,On.RIGHT)}),Ve=u.length-f.left.length-f.right.length,We=[];ne&&We.push(te(u[v],v-f.left.length,v,Ve,On.VIRTUAL));for(let Be=g;Be<y;Be+=1){const et=u[Be],Le=Be-f.left.length;et&&We.push(te(et,Le,Be,Ve))}le&&We.push(te(u[v],v-f.left.length,v,Ve,On.VIRTUAL));const rt=i?{onClick:pe,onDoubleClick:ue("rowDoubleClick",D),onMouseEnter:ue("rowMouseEnter",M),onMouseLeave:ue("rowMouseLeave",A),onMouseOut:ue("rowMouseOut",_),onMouseOver:ue("rowMouseOver",N)}:null;return k.jsxs("div",z({"data-id":o,"data-rowindex":a,role:"row",className:fe(...ve,de.root,c),style:Pe},Ie,rt,B,{ref:ie,children:[Te,k.jsx("div",{role:"presentation",className:ee.cellOffsetLeft,style:{width:h}}),We,k.jsx("div",{role:"presentation",className:fe(ee.cell,ee.cellEmpty)}),De,O!==0&&k.jsx(uH,{pinnedRight:f.right.length>0,borderTop:!w})]}))}),Kvt=ad(Wvt),Yvt=()=>{const e=fs(),t=yt(),n=Ge(e,Yr),r=Ge(e,QV),o=Ge(e,Kw),i=Ge(e,Xde),a=t["aria-label"],s=t["aria-labelledby"];return{role:"grid","aria-label":!a&&!s&&t.label?t.label:a,"aria-labelledby":s,"aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":ZV(t)}},Qvt=()=>{const e=fs(),t=Ge(e,Kw);return x.useCallback((n,r)=>{const o={},i=r+t+2;return o["aria-rowindex"]=i,e.current.isRowSelectable(n.id)&&(o["aria-selected"]=e.current.isRowSelected(n.id)),o},[e,t])};function Xvt({privateApiRef:e,configuration:t,props:n,children:r}){const o=x.useRef(e.current.getPublicApi());return k.jsx(cfe.Provider,{value:t,children:k.jsx(Lde.Provider,{value:n,children:k.jsx(jfe.Provider,{value:e,children:k.jsx(Nde.Provider,{value:o,children:k.jsx(imt,{children:k.jsx(Udt,{children:r})})})})})})}const Jvt=e=>{const t=x.useRef(null),n=x.useRef(null),r=x.useRef(null),o=x.useRef(null),i=x.useRef(null),a=x.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},Zvt=e=>{const t=vr();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=x.useRef(!0);x.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>z({},r,{isRtl:t}))},[e,t])},ebt=Cdt()&&window.localStorage.getItem("DEBUG")!=null,U0=()=>{},tbt={debug:U0,info:U0,warn:U0,error:U0},iZ=["debug","info","warn","error"];function aZ(e,t,n=console){const r=iZ.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return iZ.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=U0,i),{})}const nbt=(e,t)=>{const n=x.useCallback(r=>ebt?aZ(r,"debug",t.logger):t.logLevel?aZ(r,t.logLevel.toString(),t.logger):tbt,[t.logLevel,t.logger]);yn(e,{getLogger:n},"private")},rbt=(e,t)=>{const n=x.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})};function RS(e){"@babel/helpers - typeof";return RS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RS(e)}function obt(e,t){if(RS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(RS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function DS(e){var t=obt(e,"string");return RS(t)=="symbol"?t:t+""}const ibt=e=>{const t=x.useRef({}),n=x.useRef(!1),r=x.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(f=>{f()}),n.current=!1)},[]),o=x.useCallback((u,f,h)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const m=t.current[u];return m.processors.get(f)!==h&&(m.processors.set(f,h),m.processorsAsArray=Array.from(t.current[u].processors.values()),r(m)),()=>{t.current[u].processors.delete(f),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=x.useCallback((u,f,h)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[f]=h,()=>{const m=t.current[u].appliers,g=$e(m,[f].map(DS));t.current[u].appliers=g}),[]),a=x.useCallback(u=>{r(t.current[u])},[r]),s=x.useCallback((...u)=>{const[f,h,m]=u;if(!t.current[f])return h;const g=t.current[f].processorsAsArray;let y=h;for(let v=0;v<g.length;v+=1)y=g[v](y,m);return y},[]),l={registerPipeProcessor:o,registerPipeApplier:i,requestPipeProcessorsApplication:a},c={unstable_applyPipeProcessors:s};yn(e,l,"private"),yn(e,c,"public")},Hr=(e,t,n,r=!0)=>{const o=x.useRef(null),i=x.useRef(`mui-${Math.round(Math.random()*1e9)}`),a=x.useCallback(()=>{o.current=e.current.registerPipeProcessor(t,i.current,n)},[e,n,t]);Yw(()=>{r&&a()});const s=x.useRef(!0);x.useEffect(()=>(s.current?s.current=!1:r&&a(),()=>{o.current&&(o.current(),o.current=null)}),[a,r])},dH=(e,t,n)=>{const r=x.useRef(null),o=x.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=x.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);Yw(()=>{i()});const a=x.useRef(!0);x.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])};let Zd=function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e}({});const kS=(e,t,n,r)=>{const o=x.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);Yw(()=>{o()});const i=x.useRef(!0);x.useEffect(()=>{i.current?i.current=!1:o()},[o])},kh="none",sZ={dataSourceRowsUpdate:Zd.DataSource,rowTreeCreation:Zd.RowTree,filtering:Zd.RowTree,sorting:Zd.RowTree,visibleRowsLookupCreation:Zd.RowTree},abt=e=>{const t=x.useRef(new Map),n=x.useRef({}),r=x.useCallback((l,c,u)=>{const f=()=>{const g=n.current[c],y=$e(g,[l].map(DS));n.current[c]=y};n.current[c]||(n.current[c]={});const h=n.current[c],m=h[l];return h[l]=u,!m||m===u||l===e.current.getActiveStrategy(sZ[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),f},[e]),o=x.useCallback((l,c)=>{const u=e.current.getActiveStrategy(sZ[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const f=n.current[l];if(!f||!f[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const h=f[u];return h(c)},[e]),i=x.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,f])=>f.group!==l?!1:f.isAvailable());return(u==null?void 0:u[0])??kh},[]),a=x.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);yn(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},sbt=e=>{const t=x.useRef({}),n=x.useCallback(s=>{t.current[s.stateId]=s},[]),r=x.useCallback((s,l)=>{let c;if(wdt(s)?c=s(e.current.state):c=s,e.current.state===c)return!1;const u={current:{state:c}};let f=!1;const h=[];if(Object.keys(t.current).forEach(m=>{const g=t.current[m],y=g.stateSelector(e),v=g.stateSelector(u);v!==y&&(h.push({stateId:g.stateId,hasPropChanged:v!==g.propModel}),g.propModel!==void 0&&v!==g.propModel&&(f=!0))}),h.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${h[0].stateId}, therefore, you're not allowed to update ${h.map(m=>m.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=c,e.current.publishEvent("stateChange",c),e.current.store.update(c)),h.length===1){const{stateId:m,hasPropChanged:g}=h[0],y=t.current[m],v=y.stateSelector(u);y.propOnChange&&g&&y.propOnChange(v,{reason:l,api:e.current}),f||e.current.publishEvent(y.changeEvent,v,{reason:l})}return!f},[e]),o=x.useCallback((s,l,c)=>e.current.setState(u=>z({},u,{[s]:l(u[s])}),c),[e]),i={setState:r},a={updateControlState:o,registerControlState:n};yn(e,i,"public"),yn(e,a,"private")},lbt=(e,t)=>z({},e,{props:{getRowId:t.getRowId}}),cbt=(e,t)=>{x.useEffect(()=>{e.current.setState(n=>z({},n,{props:{getRowId:t.getRowId}}))},[e,t.getRowId])},ubt=(e,t)=>{Jvt(e),cbt(e,t),Zvt(e),nbt(e,t),sbt(e),ibt(e),abt(e),rbt(e,t),e.current.register("private",{rootProps:t})},Lo=(e,t,n)=>{const r=x.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function ij(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,`
-`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const fpe=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return ij(o,n)};class aj{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const dbt=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new aj({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(fpe(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function fbt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((f,h)=>`${f}${dbt({id:h,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r
-`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(f=>f.field!==Gv.field),l=[];if(r.includeColumnGroupsHeaders){const f=i.current.getAllGroupDetails();let h=0;const m=s.reduce((g,y)=>{const v=i.current.getColumnGroupPath(y.field);return g[y.field]=v,h=Math.max(h,v.length),g},{});for(let g=0;g<h;g+=1){const y=new aj({csvOptions:r,sanitizeCellValue:ij});l.push(y),s.forEach(v=>{const w=(m[v.field]||[])[g],C=f[w];y.addValue(C?C.headerName||C.groupId:"")})}}const c=new aj({csvOptions:r,sanitizeCellValue:ij});return s.forEach(f=>{c.addValue(f.headerName||f.field)}),l.push(c),`${`${l.map(f=>f.getRowString()).join(`\r
+`,Dyt=Vt(function(t,n){const{children:r}=t,o=$e(t,Pyt);return k.jsx(Ryt,z({},o,{ref:n,children:r}))}),kyt=e=>{const{classes:t}=e;return Me({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},Cn,t)},rZ=new Intl.Collator;function _yt(e){var W,K,G,q;const t=tn(),n=x.useRef(null),r=Ge(t,Mdt),o=Ge(t,Fl),i=yt(),[a,s]=x.useState(""),l=kyt(i),c=Ge(t,ql),u=Ge(t,kh),f=Ge(t,Wfe),p=x.useMemo(()=>u?Array.from(f.values()):c,[u,f,c]),{sort:m,searchPredicate:g=Iyt,autoFocusSearchField:y=!0,disableShowHideToggle:v=!1,disableResetButton:w=!1,toggleAllMode:C="all",getTogglableColumns:E,searchInputProps:I}=e,O=x.useMemo(()=>Oyt(o,r),[o,r]),P=x.useMemo(()=>{switch(m){case"asc":return[...p].sort((Y,Z)=>rZ.compare(Y.headerName||Y.field,Z.headerName||Z.field));case"desc":return[...p].sort((Y,Z)=>-rZ.compare(Y.headerName||Y.field,Z.headerName||Z.field));default:return p}},[p,m]),R=Y=>{const{name:Z}=Y.target;t.current.setColumnVisibility(Z,o[Z]===!1)},D=x.useMemo(()=>{const Y=E?E(P):null,Z=Y?P.filter(({field:ie})=>Y.includes(ie)):P;return a?Z.filter(ie=>g(ie,a.toLowerCase())):Z},[P,a,g,E]),M=x.useCallback(Y=>{const Z=Fl(t),ie=z({},Z),se=E?E(p):null;return(C==="filteredOnly"?D:p).forEach(ce=>{ce.hideable&&(se==null||se.includes(ce.field))&&(Y?delete ie[ce.field]:ie[ce.field]=!1)}),t.current.setColumnVisibilityModel(ie)},[t,p,E,C,D]),A=x.useCallback(Y=>{s(Y.target.value)},[]),_=x.useMemo(()=>D.filter(Y=>Y.hideable),[D]),N=x.useMemo(()=>_.every(Y=>o[Y.field]==null||o[Y.field]!==!1),[o,_]),B=x.useMemo(()=>_.every(Y=>o[Y.field]===!1),[o,_]),H=x.useRef(null);x.useEffect(()=>{var Y;y?(Y=n.current)==null||Y.focus():H.current&&typeof H.current.focus=="function"&&H.current.focus()},[y]);let j=!1;const L=Y=>j===!1&&Y.hideable!==!1?(j=!0,!0):!1,V=x.useCallback(()=>{var Y;s(""),(Y=n.current)==null||Y.focus()},[]);return k.jsxs(x.Fragment,{children:[k.jsx(Lyt,{className:l.header,ownerState:i,children:k.jsx(Fyt,z({as:i.slots.baseTextField,ownerState:i,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:l.searchInput,value:a,onChange:A,size:"small",type:"search",slotProps:{input:{startAdornment:k.jsx(i.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:k.jsx(i.slots.baseIconButton,z({size:"small","aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),style:a?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:V,edge:"end"},(W=i.slotProps)==null?void 0:W.baseIconButton,{children:k.jsx(i.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},(K=i.slotProps)==null?void 0:K.baseTextField,I))}),k.jsx(Nyt,{ownerState:i,children:k.jsxs($yt,{className:l.root,ownerState:i,children:[D.map(Y=>{var Z;return k.jsx(i.slots.baseCheckbox,z({className:l.row,disabled:Y.hideable===!1||u,checked:o[Y.field]!==!1,onClick:R,name:Y.field,inputRef:L(Y)?H:void 0,label:Y.headerName||Y.field,density:"compact",fullWidth:!0},(Z=i.slotProps)==null?void 0:Z.baseCheckbox),Y.field)}),D.length===0&&k.jsx(Byt,{ownerState:i,children:t.current.getLocaleText("columnsManagementNoColumns")})]})}),!v||!w?k.jsxs(jyt,{ownerState:i,className:l.footer,children:[v?k.jsx("span",{}):k.jsx(i.slots.baseCheckbox,z({disabled:_.length===0||u,checked:N,indeterminate:!N&&!B,onClick:()=>M(!N),name:t.current.getLocaleText("columnsManagementShowHideAllText"),label:t.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},(G=i.slotProps)==null?void 0:G.baseCheckbox)),w?null:k.jsx(i.slots.baseButton,z({onClick:()=>t.current.setColumnVisibilityModel(r),disabled:O||u},(q=i.slotProps)==null?void 0:q.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const $yt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:Ct.spacing(.5,1.5)}),Nyt=ae(Dyt,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),Lyt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:Ct.spacing(1.5,2),borderBottom:`1px solid ${Ct.colors.border.base}`}),Fyt=ae(cd,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${xi.input}::-webkit-search-decoration,
+ & .${xi.input}::-webkit-search-cancel-button,
+ & .${xi.input}::-webkit-search-results-button,
+ & .${xi.input}::-webkit-search-results-decoration`]:{display:"none"}}),jyt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:Ct.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${Ct.colors.border.base}`}),Byt=ae("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:Ct.spacing(1,0),alignSelf:"center",font:Ct.typography.font.body}),zyt=Vt(function(t,n){var C,E;const{children:r,slotProps:o={}}=t,i=o.button||{},a=o.tooltip||{},s=tn(),l=yt(),c=bn(),u=bn(),[f,p]=x.useState(!1),m=x.useRef(null),g=en(n,m),y=I=>{var O;p(P=>!P),(O=i.onClick)==null||O.call(i,I)},v=()=>p(!1),w=I=>{I.key==="Tab"&&I.preventDefault(),lpe(I.key)&&v()};return r==null?null:k.jsxs(x.Fragment,{children:[k.jsx(l.slots.baseTooltip,z({title:s.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},(C=l.slotProps)==null?void 0:C.baseTooltip,a,{children:k.jsx(l.slots.baseButton,z({size:"small",startIcon:k.jsx(l.slots.exportIcon,{}),"aria-expanded":f,"aria-label":s.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":f?u:void 0,id:c},(E=l.slotProps)==null?void 0:E.baseButton,i,{onClick:y,ref:g,children:s.current.getLocaleText("toolbarExport")}))})),k.jsx(jP,{open:f,target:m.current,onClose:v,position:"bottom-end",children:k.jsx(l.slots.baseMenuList,{id:u,className:ee.menuList,"aria-labelledby":c,onKeyDown:w,autoFocusItem:f,children:x.Children.map(r,I=>x.isValidElement(I)?x.cloneElement(I,{hideMenu:v}):I)})})]})}),Vyt=["hideMenu","options"],Hyt=["hideMenu","options"],Uyt=["csvOptions","printOptions","excelOptions"];function Gyt(e){const t=tn(),n=yt(),{hideMenu:r,options:o}=e,i=$e(e,Vyt);return k.jsx(n.slots.baseMenuItem,z({onClick:()=>{t.current.exportDataAsCsv(o),r==null||r()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function qyt(e){const t=tn(),n=yt(),{hideMenu:r,options:o}=e,i=$e(e,Hyt);return k.jsx(n.slots.baseMenuItem,z({onClick:()=>{t.current.exportDataAsPrint(o),r==null||r()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}Vt(function(t,n){const r=t,{csvOptions:o={},printOptions:i={},excelOptions:a}=r,s=$e(r,Uyt),c=tn().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:a,csvOptions:o,printOptions:i}).sort((u,f)=>u.componentName>f.componentName?1:-1);return c.length===0?null:k.jsx(zyt,z({},s,{ref:n,children:c.map((u,f)=>x.cloneElement(u.component,{key:f}))}))});function Js(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(!Js(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;for(let i=0;i<o.length;i+=1){const a=o[i];if(!Js(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let o=0;o<r;o+=1)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(let o=0;o<r;o+=1){const i=n[o];if(!Js(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}const dpe=x.createContext(void 0);function uH(){const e=x.useContext(dpe);if(e===void 0)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return e}const Wyt=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],Kyt=e=>e.split(" ").filter(t=>t!==""),Yyt=e=>e.join(" ");function Qyt(e){const t=yt(),{render:n,className:r,parser:o=Kyt,formatter:i=Yyt,debounceMs:a=t.filterDebounceMs,defaultExpanded:s,expanded:l,onExpandedChange:c}=e,u=$e(e,Wyt),f=tn(),p=x.useRef(null),m=x.useRef(null),g=Ge(f,bfe),[y,v]=x.useState(i(g??[])),[w,C]=x.useState(s??y.length>0),E=l??w,I=x.useMemo(()=>({value:y,expanded:E}),[y,E]),O=typeof r=="function"?r(I):r,P=x.useRef(null),R=bn(),D=x.useCallback(V=>{c&&c(V),l===void 0&&C(V)},[c,l]),M=x.useRef(g);x.useEffect(()=>{Js(M.current,g)||(M.current=g,v(V=>Js(o(V),g)?V:i(g??[])))},[g,i,o]);const A=x.useRef(!0),_=x.useRef(E);x.useEffect(()=>{var V;if(A.current){A.current=!1;return}_.current!==E&&(E?requestAnimationFrame(()=>{var W;(W=p.current)==null||W.focus({preventScroll:!0})}):(V=m.current)==null||V.focus({preventScroll:!0}),_.current=E)},[E]);const N=x.useMemo(()=>Lh(V=>{const W=o(V);M.current=W,f.current.setQuickFilterValues(W)},a),[f,a,o]);x.useEffect(()=>N.clear,[N]);const B=x.useCallback(V=>{const W=V.target.value;v(W),N(W)},[N]),H=x.useCallback(()=>{var V;v(""),f.current.setQuickFilterValues([]),(V=p.current)==null||V.focus()},[f,p]),j=x.useMemo(()=>({controlRef:p,triggerRef:m,state:I,controlId:R,clearValue:H,onValueChange:B,onExpandedChange:D}),[R,I,B,H,D]);In(()=>{var V;P.current&&m.current&&P.current.style.setProperty("--trigger-width",`${(V=m.current)==null?void 0:V.offsetWidth}px`)},[]);const L=Zc("div",n,z({className:O},u,{ref:P}),I);return k.jsx(dpe.Provider,{value:j,children:L})}const Xyt=["render","className","slotProps","onKeyDown","onChange"],Jyt=Vt(function(t,n){var P;const{render:r,className:o,slotProps:i,onKeyDown:a,onChange:s}=t,l=$e(t,Xyt),c=yt(),{state:u,controlId:f,controlRef:p,onValueChange:m,onExpandedChange:g,clearValue:y}=uH(),v=typeof o=="function"?o(u):o,w=en(p,n),C=R=>{R.key==="Escape"&&(u.value===""?g(!1):y()),a==null||a(R)},E=R=>{var D,M;u.value===""&&g(!1),(M=(D=i==null?void 0:i.htmlInput)==null?void 0:D.onBlur)==null||M.call(D,R)},I=R=>{u.expanded||g(!0),m(R),s==null||s(R)},O=Zc(c.slots.baseTextField,r,z({},(P=c.slotProps)==null?void 0:P.baseTextField,{slotProps:z({htmlInput:z({role:"searchbox",id:f,tabIndex:u.expanded?void 0:-1},i==null?void 0:i.htmlInput,{onBlur:E})},i),value:u.value,className:v},l,{onChange:I,onKeyDown:C,ref:w}),u);return k.jsx(x.Fragment,{children:O})}),Zyt=["render","className","onClick"],evt=Vt(function(t,n){var m;const{render:r,className:o,onClick:i}=t,a=$e(t,Zyt),s=yt(),{state:l,clearValue:c}=uH(),u=typeof o=="function"?o(l):o,f=g=>{c(),i==null||i(g)},p=Zc(s.slots.baseIconButton,r,z({},(m=s.slotProps)==null?void 0:m.baseIconButton,{className:u,tabIndex:-1},a,{onClick:f,ref:n}),l);return k.jsx(x.Fragment,{children:p})}),tvt=["render","className","onClick"],nvt=Vt(function(t,n){var v;const{render:r,className:o,onClick:i}=t,a=$e(t,tvt),s=yt(),{state:l,controlId:c,onExpandedChange:u,triggerRef:f}=uH(),p=typeof o=="function"?o(l):o,m=en(f,n),g=w=>{u(!l.expanded),i==null||i(w)},y=Zc(s.slots.baseButton,r,z({},(v=s.slotProps)==null?void 0:v.baseButton,{className:p,"aria-controls":c,"aria-expanded":l.expanded},a,{onClick:g,ref:m}),l);return k.jsx(x.Fragment,{children:y})}),rvt=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],ovt=["ref","slotProps"],ivt=e=>{const{classes:t}=e;return Me({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},Cn,t)},avt=Nn("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),svt=Nn(_E,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})(({ownerState:e})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:e.expanded?0:1,pointerEvents:e.expanded?"none":"auto",transition:Ct.transition(["opacity"])})),lvt=Nn(e=>{throw new Error("Failed assertion: should not be rendered")},{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})(({ownerState:e})=>({gridArea:"1 / 1",overflowX:"clip",width:e.expanded?260:"var(--trigger-width)",opacity:e.expanded?1:0,transition:Ct.transition(["width","opacity"])}));function cvt(e){const t=tn(),n=yt(),r={classes:n.classes,expanded:!1},o=ivt(r),{quickFilterParser:i,quickFilterFormatter:a,debounceMs:s,className:l,slotProps:c}=e,u=$e(e,rvt);return k.jsx(Qyt,{parser:i,formatter:a,debounceMs:s,render:(f,p)=>{const m=z({},r,{expanded:p.expanded});return k.jsxs(avt,z({},f,{className:fe(o.root,l),children:[k.jsx(nvt,{render:g=>k.jsx(n.slots.baseTooltip,{title:t.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:k.jsx(svt,z({className:o.trigger},g,{ownerState:m,color:"default","aria-disabled":p.expanded,children:k.jsx(n.slots.quickFilterIcon,{fontSize:"small"})}))})}),k.jsx(Jyt,{render:g=>{var C;let{ref:y,slotProps:v}=g,w=$e(g,ovt);return k.jsx(lvt,z({as:n.slots.baseTextField,className:o.control,ownerState:m,inputRef:y,"aria-label":t.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:t.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:z({input:z({startAdornment:k.jsx(n.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:w.value?k.jsx(evt,{render:k.jsx(n.slots.baseIconButton,{size:"small",edge:"end","aria-label":t.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:k.jsx(n.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},v==null?void 0:v.input)},v)},(C=n.slotProps)==null?void 0:C.baseTextField,w,c==null?void 0:c.root,u))}})]}))}})}const uvt=["render","className","onClick","onPointerUp"],dvt=Vt(function(t,n){var R;const{render:r,className:o,onClick:i,onPointerUp:a}=t,s=$e(t,uvt),l=yt(),c=bn(),u=bn(),f=tn(),p=Ge(f,_h),m=p.open&&p.openedPanelValue===oa.filters,y=Ge(f,ZV).length,v={open:m,filterCount:y},w=typeof o=="function"?o(v):o,{filterPanelTriggerRef:C}=lH(),E=en(n,C),I=D=>{m?f.current.hidePreferences():f.current.showPreferences(oa.filters,u,c),i==null||i(D)},O=D=>{m&&D.stopPropagation(),a==null||a(D)},P=Zc(l.slots.baseButton,r,z({},(R=l.slotProps)==null?void 0:R.baseButton,{id:c,"aria-haspopup":"true","aria-expanded":m?"true":void 0,"aria-controls":m?u:void 0,onClick:I,onPointerUp:O,className:w},s,{ref:E}),v);return k.jsx(x.Fragment,{children:P})}),fvt=["render","className","onClick","onPointerUp"],pvt=Vt(function(t,n){var O;const{render:r,className:o,onClick:i,onPointerUp:a}=t,s=$e(t,fvt),l=yt(),c=bn(),u=bn(),f=tn(),p=Ge(f,_h),m=p.open&&p.openedPanelValue===oa.columns,g={open:m},y=typeof o=="function"?o(g):o,{columnsPanelTriggerRef:v}=lH(),w=en(n,v),C=P=>{m?f.current.hidePreferences():f.current.showPreferences(oa.columns,u,c),i==null||i(P)},E=P=>{m&&P.stopPropagation(),a==null||a(P)},I=Zc(l.slots.baseButton,r,z({},(O=l.slotProps)==null?void 0:O.baseButton,{id:c,"aria-haspopup":"true","aria-expanded":m?"true":void 0,"aria-controls":m?u:void 0,className:y},s,{onPointerUp:E,onClick:C,ref:w}),g);return k.jsx(x.Fragment,{children:I})}),hvt=["render","options","onClick"],mvt=Vt(function(t,n){var f;const{render:r,options:o,onClick:i}=t,a=$e(t,hvt),s=yt(),l=tn(),c=p=>{l.current.exportDataAsCsv(o),i==null||i(p)},u=Zc(s.slots.baseButton,r,z({},(f=s.slotProps)==null?void 0:f.baseButton,{onClick:c},a,{ref:n}));return k.jsx(x.Fragment,{children:u})}),gvt=["render","options","onClick"],yvt=Vt(function(t,n){var f;const{render:r,options:o,onClick:i}=t,a=$e(t,gvt),s=yt(),l=tn(),c=p=>{l.current.exportDataAsPrint(o),i==null||i(p)},u=Zc(s.slots.baseButton,r,z({},(f=s.slotProps)==null?void 0:f.baseButton,{onClick:c},a,{ref:n}));return k.jsx(x.Fragment,{children:u})}),vvt=["className"],bvt=["className"],fpe=e=>{const{classes:t}=e;return Me({divider:["toolbarDivider"],label:["toolbarLabel"]},Cn,t)},xvt=Nn(cd,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:Ct.spacing(0,.5)}),Svt=Nn("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:Ct.typography.font.large,fontWeight:Ct.typography.fontWeight.medium,margin:Ct.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function oZ(e){const t=$e(e,vvt),n=yt(),r=fpe(n);return k.jsx(xvt,z({as:n.slots.baseDivider,orientation:"vertical",className:r.divider},t))}function wvt(e){const t=$e(e,bvt),n=yt(),r=fpe(n);return k.jsx(Svt,z({className:r.label},t))}function Cvt(e){var v,w,C;const{showQuickFilter:t=!0,quickFilterProps:n,csvOptions:r,printOptions:o,additionalItems:i,additionalExportMenuItems:a}=e,s=tn(),l=yt(),[c,u]=x.useState(!1),f=x.useRef(null),p=bn(),m=bn(),g=!(r!=null&&r.disableToolbarButton)||!(o!=null&&o.disableToolbarButton)||a,y=()=>u(!1);return k.jsxs(Tmt,{children:[l.label&&k.jsx(wvt,{children:l.label}),!l.disableColumnSelector&&k.jsx(l.slots.baseTooltip,{title:s.current.getLocaleText("toolbarColumns"),children:k.jsx(pvt,{render:k.jsx(_E,{}),children:k.jsx(l.slots.columnSelectorIcon,{fontSize:"small"})})}),!l.disableColumnFilter&&k.jsx(l.slots.baseTooltip,{title:s.current.getLocaleText("toolbarFilters"),children:k.jsx(dvt,{render:(E,I)=>k.jsx(_E,z({},E,{color:I.filterCount>0?"primary":"default",children:k.jsx(l.slots.baseBadge,{badgeContent:I.filterCount,color:"primary",variant:"dot",children:k.jsx(l.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),i,g&&(!l.disableColumnFilter||!l.disableColumnSelector)&&k.jsx(oZ,{}),g&&k.jsxs(x.Fragment,{children:[k.jsx(l.slots.baseTooltip,{title:s.current.getLocaleText("toolbarExport"),children:k.jsx(_E,{ref:f,id:m,"aria-controls":p,"aria-haspopup":"true","aria-expanded":c?"true":void 0,onClick:()=>u(!c),children:k.jsx(l.slots.exportIcon,{fontSize:"small"})})}),k.jsx(jP,{target:f.current,open:c,onClose:y,position:"bottom-end",children:k.jsxs(l.slots.baseMenuList,z({id:p,"aria-labelledby":m,autoFocusItem:!0},(v=l.slotProps)==null?void 0:v.baseMenuList,{children:[!(o!=null&&o.disableToolbarButton)&&k.jsx(yvt,{render:k.jsx(l.slots.baseMenuItem,z({},(w=l.slotProps)==null?void 0:w.baseMenuItem)),options:o,onClick:y,children:s.current.getLocaleText("toolbarExportPrint")}),!(r!=null&&r.disableToolbarButton)&&k.jsx(mvt,{render:k.jsx(l.slots.baseMenuItem,z({},(C=l.slotProps)==null?void 0:C.baseMenuItem)),options:r,onClick:y,children:s.current.getLocaleText("toolbarExportCSV")}),a==null?void 0:a(y)]}))})]}),t&&k.jsxs(x.Fragment,{children:[k.jsx(oZ,{}),k.jsx(cvt,z({},n))]})]})}const Evt=["className","selectedRowCount"],Tvt=e=>{const{classes:t}=e;return Me({root:["selectedRowCount"]},Cn,t)},Ovt=Nn("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:Ct.spacing(0,2),visibility:"hidden",width:0,height:0,[Ct.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),Ivt=Vt(function(t,n){const{className:r,selectedRowCount:o}=t,i=$e(t,Evt),a=tn(),s=yt(),l=Tvt(s),c=a.current.getLocaleText("footerRowSelected")(o);return k.jsx(Ovt,z({className:fe(l.root,r),ownerState:s},i,{ref:n,children:c}))}),Pvt=Vt(function(t,n){var f;const r=tn(),o=yt(),i=Ge(r,udt),a=Ge(r,GP),s=Ge(r,JV),l=!o.hideFooterSelectedRowCount&&a>0?k.jsx(Ivt,{selectedRowCount:a}):k.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?k.jsx(o.slots.footerRowCount,z({},(f=o.slotProps)==null?void 0:f.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&k.jsx(o.slots.pagination,{});return k.jsxs(gmt,z({},t,{ref:n,children:[l,c,u]}))}),px=(e,t,n,r,o,i)=>{let a;switch(e){case On.LEFT:a=r[n];break;case On.RIGHT:a=o-r[n]-t+i;break;default:a=void 0;break}return a},AO=(e,t,n,r,o)=>{const i=t===n-1;return e===On.LEFT&&i?!0:r?e===On.LEFT?!0:e===On.RIGHT?!i:!i||o:!1},MO=(e,t)=>e===On.RIGHT&&t===0,C0={root:ee.scrollbarFiller,header:ee["scrollbarFiller--header"],borderTop:ee["scrollbarFiller--borderTop"],borderBottom:ee["scrollbarFiller--borderBottom"],pinnedRight:ee["scrollbarFiller--pinnedRight"]};function dH({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return k.jsx("div",{role:"presentation",className:fe(C0.root,e&&C0.header,t&&C0.borderTop,n&&C0.borderBottom,r&&C0.pinnedRight)})}const Avt=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],Mvt=Nn("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),Rvt=e=>{const{classes:t}=e;return Me({root:["skeletonLoadingOverlay"]},Cn,t)},iZ=e=>parseInt(e.getAttribute("data-colindex"),10),Dvt=Vt(function(t,n){const r=yt(),{slots:o}=r,i=vr(),a=Rvt({classes:r.classes}),s=x.useRef(null),l=en(s,n),c=tn(),u=Ge(c,fr),f=Ge(c,LP),p=Ge(c,Xf),m=x.useMemo(()=>p.filter(D=>D<=f).length,[f,p]),{skeletonRowsCount:g,visibleColumns:y,showFirstRowBorder:v}=t,w=$e(t,Avt),C=Ge(c,Yr),E=x.useMemo(()=>C.slice(0,m),[C,m]),I=Ge(c,Vv),O=x.useCallback(D=>{if(I.left.findIndex(M=>M.field===D)!==-1)return On.LEFT;if(I.right.findIndex(M=>M.field===D)!==-1)return On.RIGHT},[I.left,I.right]),P=x.useMemo(()=>{const D=[];for(let M=0;M<g;M+=1){const A=[];for(let _=0;_<E.length;_+=1){const N=E[_],B=O(N.field),H=B===On.LEFT,j=B===On.RIGHT,L=Xfe(B,i),V=L?I[L].length:E.length-I.left.length-I.right.length,W=L?I[L].findIndex(oe=>oe.field===N.field):_-I.left.length,K=u.hasScrollY?u.scrollbarSize:0,G=QP({},i,B,px(B,N.computedWidth,_,p,u.columnsTotalWidth,K)),q=u.columnsTotalWidth<u.viewportOuterSize.width,Y=AO(B,W,V,r.showCellVerticalBorder,q),Z=MO(B,W),ie=_===E.length-1,se=j&&W===0,ce=se&&q,ye=ie&&!se&&q,Se=u.viewportOuterSize.width-u.columnsTotalWidth,ne=Math.max(0,Se),le=k.jsx(o.skeletonCell,{width:ne,empty:!0},`skeleton-filler-column-${M}`),de=ie&&K!==0;ce&&A.push(le),A.push(k.jsx(o.skeletonCell,{field:N.field,type:N.type,align:N.align,width:"var(--width)",height:u.rowHeight,"data-colindex":_,empty:y&&!y.has(N.field),className:fe(H&&ee["cell--pinnedLeft"],j&&ee["cell--pinnedRight"],Y&&ee["cell--withRightBorder"],Z&&ee["cell--withLeftBorder"]),style:z({"--width":`${N.computedWidth}px`},G)},`skeleton-column-${M}-${N.field}`)),ye&&A.push(le),de&&A.push(k.jsx(dH,{pinnedRight:I.right.length>0},`skeleton-scrollbar-filler-${M}`))}D.push(k.jsx("div",{className:fe(ee.row,ee.rowSkeleton,M===0&&!v&&ee["row--firstVisible"]),children:A},`skeleton-row-${M}`))}return D},[g,E,O,i,I,u.hasScrollY,u.scrollbarSize,u.columnsTotalWidth,u.viewportOuterSize.width,u.rowHeight,p,r.showCellVerticalBorder,o,y,v]);return At(c,"columnResize",D=>{var W,K,G;const{colDef:M,width:A}=D,_=(W=s.current)==null?void 0:W.querySelectorAll(`[data-field="${dd(M.field)}"]`);if(!_)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const N=E.findIndex(q=>q.field===M.field),B=O(M.field),H=B===On.LEFT,j=B===On.RIGHT,L=getComputedStyle(_[0]).getPropertyValue("--width"),V=parseInt(L,10)-A;if(_&&_.forEach(q=>{q.style.setProperty("--width",`${A}px`)}),H){const q=(K=s.current)==null?void 0:K.querySelectorAll(`.${ee["cell--pinnedLeft"]}`);q==null||q.forEach(Y=>{iZ(Y)>N&&(Y.style.left=`${parseInt(getComputedStyle(Y).left,10)-V}px`)})}if(j){const q=(G=s.current)==null?void 0:G.querySelectorAll(`.${ee["cell--pinnedRight"]}`);q==null||q.forEach(Y=>{iZ(Y)<N&&(Y.style.right=`${parseInt(getComputedStyle(Y).right,10)+V}px`)})}}),k.jsx(Mvt,z({className:a.root},w,{ref:l,children:P}))}),kvt=Vt(function(t,n){const r=tn(),o=Ge(r,fr),i=(o==null?void 0:o.viewportInnerSize.height)??0,a=Math.ceil(i/o.rowHeight);return k.jsx(Dvt,z({},t,{skeletonRowsCount:a,ref:n}))}),_vt=["variant","noRowsVariant","style"],$vt={"circular-progress":{component:e=>e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>kvt,style:{display:"block"}}},Nvt=Vt(function(t,n){const{variant:r="linear-progress",noRowsVariant:o="skeleton",style:i}=t,a=$e(t,_vt),s=tn(),l=yt(),c=Ge(s,Hw),u=$vt[c===0?o:r],f=u.component(l);return k.jsx(XP,z({style:z({},u.style,i)},a,{ref:n,children:k.jsx(f,{})}))}),Lvt=Vt(function(t,n){const o=tn().current.getLocaleText("noRowsLabel");return k.jsx(XP,z({},t,{ref:n,children:o}))}),Fvt=Vt(function(t,n){var l;const r=yt(),o=tn(),i=Ge(o,Dc),a=()=>{o.current.showPreferences(oa.columns)},s=!r.disableColumnSelector&&i.length>0;return k.jsxs(XP,z({},t,{ref:n,children:[o.current.getLocaleText("noColumnsOverlayLabel"),s&&k.jsx(r.slots.baseButton,z({size:"small"},(l=r.slotProps)==null?void 0:l.baseButton,{onClick:a,children:o.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))}),jvt=ae(cd)({maxHeight:"calc(100% + 1px)",flexGrow:1});function Bvt(){const e=tn(),t=yt(),n=Ge(e,ri),r=Ge(e,Og),o=Ge(e,Dfe),{paginationMode:i,loading:a}=t,s=r===-1&&i==="server"&&a,l=x.useMemo(()=>Math.max(0,o-1),[o]),c=x.useMemo(()=>r===-1||n.page<=l?n.page:l,[l,n.page,r]),u=x.useCallback(g=>{e.current.setPageSize(g)},[e]),f=x.useCallback((g,y)=>{e.current.setPage(y)},[e]),m=(g=>{for(let y=0;y<t.pageSizeOptions.length;y+=1){const v=t.pageSizeOptions[y];if(typeof v=="number"){if(v===g)return!0}else if(v.value===g)return!0}return!1})(n.pageSize)?t.pageSizeOptions:[];return k.jsx(jvt,{as:t.slots.basePagination,count:r,page:c,rowsPerPageOptions:m,rowsPerPage:n.pageSize,onPageChange:f,onRowsPerPageChange:u,disabled:s})}const zvt=["className","rowCount","visibleRowCount"],Vvt=e=>{const{classes:t}=e;return Me({root:["rowCount"]},Cn,t)},Hvt=Nn("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:Ct.spacing(0,2)}),Uvt=Vt(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=$e(t,zvt),s=tn(),l=yt(),c=Vvt(l);if(o===0)return null;const u=i<o?s.current.getLocaleText("footerTotalVisibleRows")(i,o):o.toLocaleString();return k.jsxs(Hvt,z({className:fe(c.root,r),ownerState:l},a,{ref:n,children:[s.current.getLocaleText("footerTotalRows")," ",u]}))});function Gvt(e,t){return Me(t,Cn,e)}const qvt=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],Wvt=Pt(zo,(e,t)=>t?!!HP(e):!1),Kvt=Vt(function(t,n){var ut;const{selected:r,rowId:o,row:i,index:a,style:s,rowHeight:l,className:c,visibleColumns:u,pinnedColumns:f,offsetLeft:p,columnsTotalWidth:m,firstColumnIndex:g,lastColumnIndex:y,focusedColumnIndex:v,isFirstVisible:w,isLastVisible:C,isNotVisible:E,showBottomBorder:I,scrollbarWidth:O,gridHasFiller:P,onClick:R,onDoubleClick:D,onMouseEnter:M,onMouseLeave:A,onMouseOut:_,onMouseOver:N}=t,B=$e(t,qvt),H=fs(),j=FP(),L=x.useRef(null),V=yt(),W=iH(H),K=Ge(H,Ns),G=Ge(H,jv),q=Ge(H,Xf),Y=V.rowReordering,Z=Ge(H,Wvt,Y),ie=en(L,n),se=Ec(H,o),ce=Ge(H,Yfe,{rowId:o,editMode:V.editMode}),ye=V.editMode===Vc.Row,Se=v!==void 0,ne=Se&&v>=f.left.length&&v<g,le=Se&&v<u.length-f.right.length&&v>=y,de=Gvt(V.classes,{root:["row",r&&"selected",ye&&"row--editable",ce&&"row--editing",w&&"row--firstVisible",C&&"row--lastVisible",I&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),oe=j.hooks.useGridRowAriaAttributes();x.useLayoutEffect(()=>{if(W.range){const Be=H.current.getRowIndexRelativeToVisibleRows(o);Be!==void 0&&H.current.unstable_setLastMeasuredRowIndex(Be)}if(L.current&&l==="auto")return H.current.observeRowHeight(L.current,o)},[H,W.range,l,o]);const ue=x.useCallback((Be,et)=>Le=>{Jw(Le)||H.current.getRow(o)&&(H.current.publishEvent(Be,H.current.getRowParams(o),Le),et&&et(Le))},[H,o]),pe=x.useCallback(Be=>{const et=IO(Be.target,ee.cell),Le=et==null?void 0:et.getAttribute("data-field");if(Le){if(Le===Gv.field||Le===VP||Le==="__reorder__"||H.current.getCellMode(o,Le)===Qn.Edit)return;const It=H.current.getColumn(Le);if((It==null?void 0:It.type)===BP)return}ue("rowClick",R)(Be)},[H,R,ue,o]),{slots:Ee,slotProps:xe,disableColumnReorder:Re}=V,he=Ge(H,()=>z({},H.current.getRowHeightEntry(o)),void 0,VV),Pe=x.useMemo(()=>{if(E)return{opacity:0,width:0,height:0};const Be=z({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(he.spacingTop){const et=V.rowSpacingType==="border"?"borderTopWidth":"marginTop";Be[et]=he.spacingTop}if(he.spacingBottom){const et=V.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let Le=Be[et];typeof Le!="number"&&(Le=parseInt(Le||"0",10)),Le+=he.spacingBottom,Be[et]=Le}return Be},[E,l,s,he,V.rowSpacingType]),ve=H.current.unstable_applyPipeProcessors("rowClassName",[],o),Ie=oe(se,a);if(typeof V.getRowClassName=="function"){const Be=a-(((ut=W.range)==null?void 0:ut.firstRowIndex)||0),et=z({},H.current.getRowParams(o),{isFirstVisible:Be===0,isLastVisible:Be===W.rows.length-1,indexRelativeToCurrentPage:Be});ve.push(V.getRowClassName(et))}const te=(Be,et,Le,It,Lt=On.NONE)=>{const nt=H.current.unstable_getCellColSpanInfo(o,Le);if(nt!=null&&nt.spannedByColSpan)return null;const lt=(nt==null?void 0:nt.cellProps.width)??Be.computedWidth,vt=(nt==null?void 0:nt.cellProps.colSpan)??1,bt=px(Lt,Be.computedWidth,Le,q,m,O);if(se.type==="skeletonRow")return k.jsx(Ee.skeletonCell,{type:Be.type,width:lt,height:l,field:Be.field,align:Be.align},Be.field);const vn=Be.field==="__reorder__",kn=!(Re||Be.disableReorder),Rr=Z&&!K.length&&G<=1,nr=!(kn||vn&&Rr),Bn=Lt===On.VIRTUAL,yo=MO(Lt,et),Oo=AO(Lt,et,It,V.showCellVerticalBorder,P);return k.jsx(Ee.cell,z({column:Be,width:lt,rowId:o,align:Be.align||"left",colIndex:Le,colSpan:vt,disableDragEvents:nr,isNotVisible:Bn,pinnedOffset:bt,pinnedPosition:Lt,showLeftBorder:yo,showRightBorder:Oo,row:i,rowNode:se},xe==null?void 0:xe.cell),Be.field)},Te=f.left.map((Be,et)=>te(Be,et,et,f.left.length,On.LEFT)),De=f.right.map((Be,et)=>{const Le=u.length-f.right.length+et;return te(Be,et,Le,f.right.length,On.RIGHT)}),Ve=u.length-f.left.length-f.right.length,We=[];ne&&We.push(te(u[v],v-f.left.length,v,Ve,On.VIRTUAL));for(let Be=g;Be<y;Be+=1){const et=u[Be],Le=Be-f.left.length;et&&We.push(te(et,Le,Be,Ve))}le&&We.push(te(u[v],v-f.left.length,v,Ve,On.VIRTUAL));const rt=i?{onClick:pe,onDoubleClick:ue("rowDoubleClick",D),onMouseEnter:ue("rowMouseEnter",M),onMouseLeave:ue("rowMouseLeave",A),onMouseOut:ue("rowMouseOut",_),onMouseOver:ue("rowMouseOver",N)}:null;return k.jsxs("div",z({"data-id":o,"data-rowindex":a,role:"row",className:fe(...ve,de.root,c),style:Pe},Ie,rt,B,{ref:ie,children:[Te,k.jsx("div",{role:"presentation",className:ee.cellOffsetLeft,style:{width:p}}),We,k.jsx("div",{role:"presentation",className:fe(ee.cell,ee.cellEmpty)}),De,O!==0&&k.jsx(dH,{pinnedRight:f.right.length>0,borderTop:!w})]}))}),Yvt=ld(Kvt),Qvt=()=>{const e=fs(),t=yt(),n=Ge(e,Yr),r=Ge(e,XV),o=Ge(e,Kw),i=Ge(e,Jde),a=t["aria-label"],s=t["aria-labelledby"];return{role:"grid","aria-label":!a&&!s&&t.label?t.label:a,"aria-labelledby":s,"aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":eH(t)}},Xvt=()=>{const e=fs(),t=Ge(e,Kw);return x.useCallback((n,r)=>{const o={},i=r+t+2;return o["aria-rowindex"]=i,e.current.isRowSelectable(n.id)&&(o["aria-selected"]=e.current.isRowSelected(n.id)),o},[e,t])};function Jvt({privateApiRef:e,configuration:t,props:n,children:r}){const o=x.useRef(e.current.getPublicApi());return k.jsx(ufe.Provider,{value:t,children:k.jsx(Fde.Provider,{value:n,children:k.jsx(Bfe.Provider,{value:e,children:k.jsx(Lde.Provider,{value:o,children:k.jsx(amt,{children:k.jsx(Gdt,{children:r})})})})})})}const Zvt=e=>{const t=x.useRef(null),n=x.useRef(null),r=x.useRef(null),o=x.useRef(null),i=x.useRef(null),a=x.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},ebt=e=>{const t=vr();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=x.useRef(!0);x.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>z({},r,{isRtl:t}))},[e,t])},tbt=Edt()&&window.localStorage.getItem("DEBUG")!=null,U0=()=>{},nbt={debug:U0,info:U0,warn:U0,error:U0},aZ=["debug","info","warn","error"];function sZ(e,t,n=console){const r=aZ.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return aZ.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=U0,i),{})}const rbt=(e,t)=>{const n=x.useCallback(r=>tbt?sZ(r,"debug",t.logger):t.logLevel?sZ(r,t.logLevel.toString(),t.logger):nbt,[t.logLevel,t.logger]);yn(e,{getLogger:n},"private")},obt=(e,t)=>{const n=x.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})};function RS(e){"@babel/helpers - typeof";return RS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RS(e)}function ibt(e,t){if(RS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(RS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function DS(e){var t=ibt(e,"string");return RS(t)=="symbol"?t:t+""}const abt=e=>{const t=x.useRef({}),n=x.useRef(!1),r=x.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(f=>{f()}),n.current=!1)},[]),o=x.useCallback((u,f,p)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const m=t.current[u];return m.processors.get(f)!==p&&(m.processors.set(f,p),m.processorsAsArray=Array.from(t.current[u].processors.values()),r(m)),()=>{t.current[u].processors.delete(f),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=x.useCallback((u,f,p)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[f]=p,()=>{const m=t.current[u].appliers,g=$e(m,[f].map(DS));t.current[u].appliers=g}),[]),a=x.useCallback(u=>{r(t.current[u])},[r]),s=x.useCallback((...u)=>{const[f,p,m]=u;if(!t.current[f])return p;const g=t.current[f].processorsAsArray;let y=p;for(let v=0;v<g.length;v+=1)y=g[v](y,m);return y},[]),l={registerPipeProcessor:o,registerPipeApplier:i,requestPipeProcessorsApplication:a},c={unstable_applyPipeProcessors:s};yn(e,l,"private"),yn(e,c,"public")},Hr=(e,t,n,r=!0)=>{const o=x.useRef(null),i=x.useRef(`mui-${Math.round(Math.random()*1e9)}`),a=x.useCallback(()=>{o.current=e.current.registerPipeProcessor(t,i.current,n)},[e,n,t]);Yw(()=>{r&&a()});const s=x.useRef(!0);x.useEffect(()=>(s.current?s.current=!1:r&&a(),()=>{o.current&&(o.current(),o.current=null)}),[a,r])},fH=(e,t,n)=>{const r=x.useRef(null),o=x.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=x.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);Yw(()=>{i()});const a=x.useRef(!0);x.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])};let tf=function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e}({});const kS=(e,t,n,r)=>{const o=x.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);Yw(()=>{o()});const i=x.useRef(!0);x.useEffect(()=>{i.current?i.current=!1:o()},[o])},$h="none",lZ={dataSourceRowsUpdate:tf.DataSource,rowTreeCreation:tf.RowTree,filtering:tf.RowTree,sorting:tf.RowTree,visibleRowsLookupCreation:tf.RowTree},sbt=e=>{const t=x.useRef(new Map),n=x.useRef({}),r=x.useCallback((l,c,u)=>{const f=()=>{const g=n.current[c],y=$e(g,[l].map(DS));n.current[c]=y};n.current[c]||(n.current[c]={});const p=n.current[c],m=p[l];return p[l]=u,!m||m===u||l===e.current.getActiveStrategy(lZ[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),f},[e]),o=x.useCallback((l,c)=>{const u=e.current.getActiveStrategy(lZ[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const f=n.current[l];if(!f||!f[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const p=f[u];return p(c)},[e]),i=x.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,f])=>f.group!==l?!1:f.isAvailable());return(u==null?void 0:u[0])??$h},[]),a=x.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);yn(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},lbt=e=>{const t=x.useRef({}),n=x.useCallback(s=>{t.current[s.stateId]=s},[]),r=x.useCallback((s,l)=>{let c;if(Cdt(s)?c=s(e.current.state):c=s,e.current.state===c)return!1;const u={current:{state:c}};let f=!1;const p=[];if(Object.keys(t.current).forEach(m=>{const g=t.current[m],y=g.stateSelector(e),v=g.stateSelector(u);v!==y&&(p.push({stateId:g.stateId,hasPropChanged:v!==g.propModel}),g.propModel!==void 0&&v!==g.propModel&&(f=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(m=>m.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=c,e.current.publishEvent("stateChange",c),e.current.store.update(c)),p.length===1){const{stateId:m,hasPropChanged:g}=p[0],y=t.current[m],v=y.stateSelector(u);y.propOnChange&&g&&y.propOnChange(v,{reason:l,api:e.current}),f||e.current.publishEvent(y.changeEvent,v,{reason:l})}return!f},[e]),o=x.useCallback((s,l,c)=>e.current.setState(u=>z({},u,{[s]:l(u[s])}),c),[e]),i={setState:r},a={updateControlState:o,registerControlState:n};yn(e,i,"public"),yn(e,a,"private")},cbt=(e,t)=>z({},e,{props:{getRowId:t.getRowId}}),ubt=(e,t)=>{x.useEffect(()=>{e.current.setState(n=>z({},n,{props:{getRowId:t.getRowId}}))},[e,t.getRowId])},dbt=(e,t)=>{Zvt(e),ubt(e,t),ebt(e),rbt(e,t),lbt(e),abt(e),sbt(e),obt(e,t),e.current.register("private",{rootProps:t})},Fo=(e,t,n)=>{const r=x.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function aj(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,`
+`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const ppe=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return aj(o,n)};class sj{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const fbt=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new sj({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(ppe(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function pbt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((f,p)=>`${f}${fbt({id:p,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r
+`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(f=>f.field!==Gv.field),l=[];if(r.includeColumnGroupsHeaders){const f=i.current.getAllGroupDetails();let p=0;const m=s.reduce((g,y)=>{const v=i.current.getColumnGroupPath(y.field);return g[y.field]=v,p=Math.max(p,v.length),g},{});for(let g=0;g<p;g+=1){const y=new sj({csvOptions:r,sanitizeCellValue:aj});l.push(y),s.forEach(v=>{const w=(m[v.field]||[])[g],C=f[w];y.addValue(C?C.headerName||C.groupId:"")})}}const c=new sj({csvOptions:r,sanitizeCellValue:aj});return s.forEach(f=>{c.addValue(f.headerName||f.field)}),l.push(c),`${`${l.map(f=>f.getRowString()).join(`\r
`)}\r
-`}${a}`.trim()}function lZ(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function pbt(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{lZ(e)}):lZ(e)}function hbt(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const mbt=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=x.useCallback(a=>{if(!_gt(a)||hbt(a.target))return;let s="";if(UP(e)>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=va(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=fpe(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(pbt(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);Bfe(e,()=>e.current.rootElementRef.current,"keydown",i),sr(e,"clipboardCopy",t.onClipboardCopy)},gbt=e=>z({},e,{columnMenu:{open:!1}}),ybt=e=>{const t=Qo(e,"useGridColumnMenu"),n=x.useCallback(a=>{const s=DE(e),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),z({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences())},[e,t]),r=x.useCallback(()=>{const a=DE(e);if(a.field){const c=ld(e),u=Nl(e),f=Rc(e);let h=a.field;if(c[h]||(h=f[0]),u[h]===!1){const m=f.filter(y=>y===h?!0:u[y]!==!1),g=m.indexOf(h);h=m[g+1]||m[g-1]}e.current.setColumnHeaderFocus(h)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&e.current.setState(c=>(t.debug("Hiding Column Menu"),z({},c,{columnMenu:s})))},[e,t]),o=x.useCallback(a=>{t.debug("Toggle Column Menu");const s=DE(e);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);yn(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),At(e,"columnResizeStart",r),At(e,"virtualScrollerWheel",e.current.hideColumnMenu),At(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},vbt=(e,t,n)=>{var o,i,a;const r=dg({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return z({},e,{columns:r,pinnedColumns:e.pinnedColumns??wO})};function bbt(e,t){var A,_;const n=Qo(e,"useGridColumns"),r=x.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Nl,changeEvent:"columnVisibilityModelChange"});const o=x.useCallback(N=>{n.debug("Updating columns state."),e.current.setState(cZ(N)),e.current.publishEvent("columnsChange",N.orderedFields)},[n,e]),i=x.useCallback(N=>ld(e)[N],[e]),a=x.useCallback(()=>Ul(e),[e]),s=x.useCallback(()=>Yr(e),[e]),l=x.useCallback((N,B=!0)=>(B?Yr(e):Ul(e)).findIndex(j=>j.field===N),[e]),c=x.useCallback(N=>{const B=l(N);return Yf(e)[B]},[e,l]),u=x.useCallback(N=>{var H,j;Nl(e)!==N&&(e.current.setState(L=>z({},L,{columns:dg({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:N,keepOnlyColumnsToUpsert:!1})})),(j=(H=e.current).updateRenderContext)==null||j.call(H))},[e]),f=x.useCallback(N=>{if(Rh(e)){e.current.updateNonPivotColumns(N);return}const B=dg({apiRef:e,columnsToUpsert:N,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});o(B)},[e,o]),h=x.useCallback((N,B)=>{const H=Nl(e),j=H[N]??!0;if(B!==j){const L=z({},H,{[N]:B});e.current.setColumnVisibilityModel(L)}},[e]),m=x.useCallback(N=>Rc(e).findIndex(H=>H===N),[e]),g=x.useCallback((N,B)=>{const H=Rc(e),j=m(N);if(j===B)return;n.debug(`Moving column ${N} to index ${B}`);const L=[...H],V=L.splice(j,1)[0];L.splice(B,0,V),o(z({},Hl(e),{orderedFields:L}));const W={column:e.current.getColumn(N),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(N),oldIndex:j};e.current.publishEvent("columnIndexChange",W)},[e,n,o,m]),y=x.useCallback((N,B)=>{n.debug(`Updating column ${N} width to ${B}`);const H=Hl(e),j=H.lookup[N],L=z({},j,{width:B,hasBeenResized:!0});o(nj(z({},H,{lookup:z({},H.lookup,{[N]:L})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(N),colDef:L,width:B})},[e,n,o]),v={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:m,updateColumns:f,setColumnVisibilityModel:u,setColumnVisibility:h,setColumnWidth:y},w={setColumnIndex:g};yn(e,v,"public"),yn(e,w,t.signature===Vl.DataGrid?"private":"public");const C=x.useCallback((N,B)=>{var K,G;const H={},j=Nl(e);(!B.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((G=(K=t.initialState)==null?void 0:K.columns)==null?void 0:G.columnVisibilityModel)??{}).length>0||Object.keys(j).length>0)&&(H.columnVisibilityModel=j),H.orderedFields=Rc(e);const V=Ul(e),W={};return V.forEach(q=>{if(q.hasBeenResized){const Y={};Ffe.forEach(Z=>{let ie=q[Z];ie===1/0&&(ie=-1),Y[Z]=ie}),W[q.field]=Y}}),Object.keys(W).length>0&&(H.dimensions=W),z({},N,{columns:H})},[e,t.columnVisibilityModel,(A=t.initialState)==null?void 0:A.columns]),E=x.useCallback((N,B)=>{var V;const H=(V=B.stateToRestore.columns)==null?void 0:V.columnVisibilityModel,j=B.stateToRestore.columns;if(H==null&&j==null)return N;const L=dg({apiRef:e,columnsToUpsert:[],initialState:j,columnVisibilityModel:H,keepOnlyColumnsToUpsert:!1});return e.current.setState(cZ(L)),j!=null&&e.current.publishEvent("columnsChange",L.orderedFields),N},[e]),I=x.useCallback((N,B)=>{var H;if(B===oa.columns){const j=t.slots.columnsPanel;return k.jsx(j,z({},(H=t.slotProps)==null?void 0:H.columnsPanel))}return N},[t.slots.columnsPanel,(_=t.slotProps)==null?void 0:_.columnsPanel]),O=x.useCallback(N=>{const B=Rh(e);return t.disableColumnSelector||B?N:[...N,"columnMenuColumnsItem"]},[t.disableColumnSelector,e]);Hr(e,"columnMenu",O),Hr(e,"exportState",C),Hr(e,"restoreState",E),Hr(e,"preferencePanel",I);const P=x.useRef(null);At(e,"viewportInnerSizeChange",N=>{if(P.current!==N.width){if(P.current=N.width,!Yr(e).some(H=>H.flex&&H.flex>0))return;o(nj(Hl(e),e.current.getRootDimensions()))}});const D=x.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const N=dg({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[e,n,o]);dH(e,"hydrateColumns",D);const M=x.useRef(!0);x.useEffect(()=>{if(M.current){M.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const N=dg({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0});r.current=t.columns,o(N)},[n,e,o,t.columns]),x.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function cZ(e){return t=>z({},t,{columns:e})}const xbt=(e,t)=>{var n;return z({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},Sbt=(e,t)=>{var s;const n=Qo(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Eg,changeEvent:"densityChange"});const o={setDensity:Je(l=>{Eg(e)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>z({},u,{density:l})))})};yn(e,o,"public");const i=x.useCallback((l,c)=>{var h;const u=Eg(e);return!c.exportOnlyDirtyModels||t.density!=null||((h=t.initialState)==null?void 0:h.density)!=null?z({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=x.useCallback((l,c)=>{var f;const u=(f=c.stateToRestore)!=null&&f.density?c.stateToRestore.density:Eg(e);return e.current.setState(h=>z({},h,{density:u})),l},[e]);Hr(e,"exportState",i),Hr(e,"restoreState",a),x.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function wbt(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const ppe=({apiRef:e,options:t})=>{const n=Ul(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:Yr(e)).filter(o=>!o.disableExport)},hpe=({apiRef:e})=>{var l,c;const t=xfe(e),n=Si(e),r=UP(e),o=t.filter(u=>n[u].type!=="footer"),i=Bv(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];if(o.unshift(...a),o.push(...s),r>0){const u=Cfe(e);return o.filter(f=>u.has(f))}return o},Cbt=(e,t)=>{const n=Qo(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=x.useCallback((c={})=>{n.debug("Get data as CSV");const u=ppe({apiRef:e,options:c}),h=(c.getRowsToExport??hpe)({apiRef:e});return fbt({columns:u,rowIds:h,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=x.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),f=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});wbt(f,"csv",c==null?void 0:c.fileName)},[n,i]);yn(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=x.useCallback((c,u)=>{var f;return(f=u.csvOptions)!=null&&f.disableToolbarButton?c:[...c,{component:k.jsx(Uyt,{options:u.csvOptions}),componentName:"csvExport"}]},[]);Hr(e,"exportMenu",l)};function Ebt(e,t){const n=[],r=t.querySelectorAll("style, link[rel='stylesheet']");for(let o=0;o<r.length;o+=1){const i=r[o];if(i.tagName==="STYLE"){const a=e.createElement(i.tagName),s=i.sheet;if(s){let l="";for(let c=0;c<s.cssRules.length;c+=1)typeof s.cssRules[c].cssText=="string"&&(l+=`${s.cssRules[c].cssText}\r
-`);a.appendChild(e.createTextNode(l)),e.head.appendChild(a)}}else if(i.getAttribute("href")){const a=e.createElement(i.tagName);for(let s=0;s<i.attributes.length;s+=1){const l=i.attributes[s];l&&a.setAttribute(l.nodeName,l.nodeValue||"")}n.push(new Promise(s=>{a.addEventListener("load",()=>s())})),e.head.appendChild(a)}}return n}const _E=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=Ofe(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=i===-1?0:Dft(r.page,s);return l!==r.page&&(r=z({},r,{page:l})),Pfe(r.pageSize,t),r},Tbt=(e,t)=>{var C,E;const n=Qo(e,"useGridPaginationModel"),r=Ge(e,Fv),o=x.useRef(jo(e)),i=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:ri,changeEvent:"paginationModelChange"});const a=x.useCallback(I=>{const O=ri(e);I!==O.page&&(n.debug(`Setting page to ${I}`),e.current.setPaginationModel({page:I,pageSize:O.pageSize}))},[e,n]),s=x.useCallback(I=>{const O=ri(e);I!==O.pageSize&&(n.debug(`Setting page size to ${I}`),e.current.setPaginationModel({pageSize:I,page:O.page}))},[e,n]),l=x.useCallback(I=>{const O=ri(e);I!==O&&(n.debug("Setting 'paginationModel' to",I),e.current.setState(P=>z({},P,{pagination:z({},P.pagination,{paginationModel:_E(P.pagination,t.signature,I)})}),"setPaginationModel"))},[e,n,t.signature]);yn(e,{setPage:a,setPageSize:s,setPaginationModel:l},"public");const u=x.useCallback((I,O)=>{var D,M;const P=ri(e);return!O.exportOnlyDirtyModels||t.paginationModel!=null||((M=(D=t.initialState)==null?void 0:D.pagination)==null?void 0:M.paginationModel)!=null||P.page!==0&&P.pageSize!==Rft(t.autoPageSize)?z({},I,{pagination:z({},I.pagination,{paginationModel:P})}):I},[e,t.paginationModel,(E=(C=t.initialState)==null?void 0:C.pagination)==null?void 0:E.paginationModel,t.autoPageSize]),f=x.useCallback((I,O)=>{var R,D;const P=(R=O.stateToRestore.pagination)!=null&&R.paginationModel?z({},Ife(t.autoPageSize),(D=O.stateToRestore.pagination)==null?void 0:D.paginationModel):ri(e);return e.current.setState(M=>z({},M,{pagination:z({},M.pagination,{paginationModel:_E(M.pagination,t.signature,P)})}),"stateRestorePreProcessing"),I},[e,t.autoPageSize,t.signature]);Hr(e,"exportState",u),Hr(e,"restoreState",f);const h=()=>{var O;const I=ri(e);(O=e.current.virtualScrollerRef)!=null&&O.current&&e.current.scrollToIndexes({rowIndex:I.page*I.pageSize})},m=x.useCallback(()=>{if(!t.autoPageSize)return;const I=e.current.getRootDimensions(),O=Math.floor(I.viewportInnerSize.height/i);e.current.setPageSize(O)},[e,t.autoPageSize,i]),g=x.useCallback(I=>{if(I==null)return;const O=ri(e);if(O.page===0)return;const P=Rfe(e);O.page>P-1&&e.current.setPage(Math.max(0,P-1))},[e]),y=x.useCallback(()=>{ri(e).page!==0&&e.current.setPage(0),e.current.getScrollPosition().top!==0&&e.current.scroll({top:0})},[e]),v=x.useCallback(I=>{const O=z({},I,{items:JV(e)});Js(O,o.current)||(o.current=O,y())},[e,y]);At(e,"viewportInnerSizeChange",m),At(e,"paginationModelChange",h),At(e,"rowCountChange",g),At(e,"sortModelChange",y),At(e,"filterModelChange",v);const w=x.useRef(!0);x.useEffect(()=>{if(w.current){w.current=!1;return}t.pagination&&e.current.setState(I=>z({},I,{pagination:z({},I.pagination,{paginationModel:_E(I.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.signature,t.pagination]),x.useEffect(()=>{e.current.setState(I=>{const O=t.pagination===!0;return I.pagination.paginationMode===t.paginationMode||I.pagination.enabled===O?I:z({},I,{pagination:z({},I.pagination,{paginationMode:t.paginationMode,enabled:t.pagination===!0})})})},[e,t.paginationMode,t.pagination]),x.useEffect(m,[m])};function Obt(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function Ibt(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const Pbt=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=Qo(e,"useGridPrintExport"),o=x.useRef(null),i=x.useRef(null),a=x.useRef({}),s=x.useRef([]),l=x.useRef(null);x.useEffect(()=>{o.current=Mr(e.current.rootElementRef.current)},[e,n]);const c=x.useCallback((v,w,C)=>new Promise(E=>{const I=ppe({apiRef:e,options:{fields:v,allColumns:w}}).map(R=>R.field),O=Ul(e),P={};O.forEach(R=>{P[R.field]=I.includes(R.field)}),C&&(P[Gv.field]=!0),e.current.setColumnVisibilityModel(P),E()}),[e]),u=x.useCallback(v=>{const C=v({apiRef:e}).reduce((E,I)=>{const O=e.current.getRow(I);return O[Ky]||E.push(O),E},[]);e.current.setRows(C)},[e]),f=x.useCallback((v,w)=>{var j,L,V;const C=z({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},w),E=v.contentDocument;if(!E)return;const I=Qw(e),O=e.current.rootElementRef.current,P=O.cloneNode(!0),R=P.querySelector(`.${ee.main}`);R.style.overflow="visible",P.style.contain="size";let D=((j=O.querySelector(`.${ee.toolbarContainer}`))==null?void 0:j.offsetHeight)||0,M=((L=O.querySelector(`.${ee.footerContainer}`))==null?void 0:L.offsetHeight)||0;const A=P.querySelector(`.${ee.footerContainer}`);C.hideToolbar&&((V=P.querySelector(`.${ee.toolbarContainer}`))==null||V.remove(),D=0),C.hideFooter&&A&&(A.remove(),M=0);const _=I.currentPageTotalHeight+rH(e,t)+D+M;P.style.height=`${_}px`,P.style.boxSizing="content-box",!C.hideFooter&&A&&(A.style.position="absolute",A.style.width="100%",A.style.top=`${_-M}px`);const N=document.createElement("div");N.appendChild(P),E.body.style.marginTop="0px",E.body.innerHTML=N.innerHTML;const B=typeof C.pageStyle=="function"?C.pageStyle():C.pageStyle;if(typeof B=="string"){const W=E.createElement("style");W.appendChild(E.createTextNode(B)),E.head.appendChild(W)}C.bodyClassName&&E.body.classList.add(...C.bodyClassName.split(" "));let H=[];if(C.copyStyles){const W=O.getRootNode(),K=W.constructor.name==="ShadowRoot"?W:o.current;H=Ebt(E,K)}Promise.all(H).then(()=>{v.contentWindow.print()})},[e,o,t]),h=x.useCallback(v=>{var w,C;o.current.body.removeChild(v),e.current.restoreState(i.current||{}),(C=(w=i.current)==null?void 0:w.columns)!=null&&C.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(E=>z({},E,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),g={exportDataAsPrint:x.useCallback(async v=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=Nl(e),s.current=e.current.getSortedRows().filter(C=>!C[Ky]),t.pagination){const E={page:0,pageSize:QV(e)};e.current.setState(I=>z({},I,{pagination:z({},I.pagination,{paginationModel:_E(I.pagination,"DataGridPro",E)})}))}l.current=e.current.state.virtualization,e.current.setState(C=>z({},C,{virtualization:z({},C.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(v==null?void 0:v.fields,v==null?void 0:v.allColumns,v==null?void 0:v.includeCheckboxes),u((v==null?void 0:v.getRowsToExport)??hpe),await Obt();const w=Ibt(v==null?void 0:v.fileName);w.onload=()=>{f(w,v),w.contentWindow.matchMedia("print").addEventListener("change",E=>{E.matches===!1&&h(w)})},o.current.body.appendChild(w)},[t,r,e,f,h,c,u])};yn(e,g,"public");const y=x.useCallback((v,w)=>{var C;return(C=w.printOptions)!=null&&C.disableToolbarButton?v:[...v,{component:k.jsx(Gyt,{options:w.printOptions}),componentName:"printExport"}]},[]);Hr(e,"exportMenu",y)},Abt=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??AS();return z({},e,{filter:z({filterModel:qV(r,t.disableMultipleColumnsFiltering,n)},ofe),visibleRowsLookup:{}})},Mbt=e=>e.filteredRowsLookup;function uZ(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function Rbt(){return jde(Object.values)}const Dbt=(e,t)=>{var D,M,A;const n=Qo(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:jo,changeEvent:"filterModelChange"});const r=x.useCallback(()=>{e.current.setState(_=>{const N=jo(e),B=e.current.getFilterState(N),H=z({},_,{filter:z({},_.filter,B)}),j=uZ(e,H);return z({},H,{visibleRowsLookup:j})}),e.current.publishEvent("filteredRowsSet")},[e]),o=x.useCallback((_,N)=>N==null||N.filterable===!1||t.disableColumnFilter?_:[..._,"columnMenuFilterItem"],[t.disableColumnFilter]),i=x.useCallback(_=>{const N=jo(e),B=[...N.items],H=B.findIndex(j=>j.id===_.id);H===-1?B.push(_):B[H]=_,e.current.setFilterModel(z({},N,{items:B}),"upsertFilterItem")},[e]),a=x.useCallback(_=>{const N=jo(e),B=[...N.items];_.forEach(H=>{const j=B.findIndex(L=>L.id===H.id);j===-1?B.push(H):B[j]=H}),e.current.setFilterModel(z({},N,{items:B}),"upsertFilterItems")},[e]),s=x.useCallback(_=>{const N=jo(e),B=N.items.filter(H=>H.id!==_.id);B.length!==N.items.length&&e.current.setFilterModel(z({},N,{items:B}),"deleteFilterItem")},[e]),l=x.useCallback((_,N,B)=>{if(n.debug("Displaying filter panel"),_){const H=jo(e),j=H.items.filter(K=>{var Z;if(K.value!==void 0)return!(Array.isArray(K.value)&&K.value.length===0);const q=(Z=e.current.getColumn(K.field).filterOperators)==null?void 0:Z.find(ie=>ie.value===K.operator);return!(typeof(q==null?void 0:q.requiresFilterValue)>"u"?!0:q==null?void 0:q.requiresFilterValue)});let L;const V=j.find(K=>K.field===_),W=e.current.getColumn(_);V?L=j:t.disableMultipleColumnsFiltering?L=[tj({field:_,operator:W.filterOperators[0].value},e)]:L=[...j,tj({field:_,operator:W.filterOperators[0].value},e)],e.current.setFilterModel(z({},H,{items:L}))}e.current.showPreferences(oa.filters,N,B)},[e,n,t.disableMultipleColumnsFiltering]),c=x.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),u=x.useCallback(_=>{const N=jo(e);N.logicOperator!==_&&e.current.setFilterModel(z({},N,{logicOperator:_}),"changeLogicOperator")},[e]),f=x.useCallback(_=>{const N=jo(e);Js(N.quickFilterValues,_)||e.current.setFilterModel(z({},N,{quickFilterValues:[..._]}))},[e]),h=x.useCallback((_,N)=>{jo(e)!==_&&(n.debug("Setting filter model"),e.current.updateControlState("filter",SJ(_,t.disableMultipleColumnsFiltering,e),N),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),m=x.useCallback(_=>{const N=qV(_,t.disableMultipleColumnsFiltering,e),B=t.filterMode==="client"?Ldt(N,e,t.disableEval):null,H=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:B,filterModel:N??AS()});return z({},H,{filterModel:N})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),g={setFilterLogicOperator:u,unstable_applyFilters:r,deleteFilterItem:s,upsertFilterItem:i,upsertFilterItems:a,setFilterModel:h,showFilterPanel:l,hideFilterPanel:c,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m};yn(e,g,"public");const y=x.useCallback((_,N)=>{var j,L;const B=jo(e);return B.items.forEach(V=>{delete V.fromInput}),!N.exportOnlyDirtyModels||t.filterModel!=null||((L=(j=t.initialState)==null?void 0:j.filter)==null?void 0:L.filterModel)!=null||!Js(B,AS())?z({},_,{filter:{filterModel:B}}):_},[e,t.filterModel,(M=(D=t.initialState)==null?void 0:D.filter)==null?void 0:M.filterModel]),v=x.useCallback((_,N)=>{var H;const B=(H=N.stateToRestore.filter)==null?void 0:H.filterModel;return B==null?_:(e.current.updateControlState("filter",SJ(B,t.disableMultipleColumnsFiltering,e),"restoreState"),z({},_,{callbacks:[..._.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),w=x.useCallback((_,N)=>{var B;if(N===oa.filters){const H=t.slots.filterPanel;return k.jsx(H,z({},(B=t.slotProps)==null?void 0:B.filterPanel))}return _},[t.slots.filterPanel,(A=t.slotProps)==null?void 0:A.filterPanel]),{getRowId:C}=t,E=Xl(Rbt),I=x.useCallback(_=>{var G;if(t.filterMode!=="client"||!_.isRowMatchingFilters||!_.filterModel.items.length&&!((G=_.filterModel.quickFilterValues)!=null&&G.length))return ofe;const N=Us(e),B={},{isRowMatchingFilters:H}=_,j={},L={passingFilterItems:null,passingQuickFilterValues:null},V=E.current(e.current.state.rows.dataRowIdToModelLookup);for(let q=0;q<V.length;q+=1){const Y=V[q],Z=C?C(Y):Y.id;H(Y,void 0,L);const ie=jdt([L.passingFilterItems],[L.passingQuickFilterValues],_.filterModel,e,j);ie||(B[Z]=ie)}const W="auto-generated-group-footer-root";return N[W]&&(B[W]=!0),{filteredRowsLookup:B,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}},[e,t.filterMode,C,E]);Hr(e,"columnMenu",o),Hr(e,"exportState",y),Hr(e,"restoreState",v),Hr(e,"preferencePanel",w),kS(e,kh,"filtering",I),kS(e,kh,"visibleRowsLookupCreation",Mbt);const O=x.useCallback(()=>{n.debug("onColUpdated - GridColumns changed, applying filters");const _=jo(e),N=ld(e),B=_.items.filter(H=>H.field&&N[H.field]);B.length<_.items.length&&e.current.setFilterModel(z({},_,{items:B}))},[e,n]),P=x.useCallback(_=>{_==="filtering"&&e.current.unstable_applyFilters()},[e]),R=x.useCallback(()=>{e.current.setState(_=>z({},_,{visibleRowsLookup:uZ(e,_)}))},[e]);At(e,"rowsSet",r),At(e,"columnsChange",O),At(e,"activeStrategyProcessorChange",P),At(e,"rowExpansionChange",R),At(e,"columnVisibilityModelChange",()=>{const _=jo(e);_.quickFilterValues&&lfe(_)&&e.current.unstable_applyFilters()}),Yw(()=>{e.current.unstable_applyFilters()}),In(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},kbt=e=>z({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),_bt=(e,t)=>{const n=Qo(e,"useGridFocus"),r=x.useRef(null),o=e.current.rootElementRef.current!==null,i=x.useCallback((D,M)=>{D&&e.current.getRow(D.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(D.id,D.field),M)},[e]),a=x.useCallback((D,M)=>{const A=va(e);(A==null?void 0:A.id)===D&&(A==null?void 0:A.field)===M||(e.current.setState(_=>(n.debug(`Focusing on cell with id=${D} and field=${M}`),z({},_,{tabIndex:{cell:{id:D,field:M},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:D,field:M},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.getRow(D)&&(A&&i(A,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(D,M))))},[e,n,i]),s=x.useCallback((D,M={})=>{const A=va(e);i(A,M),e.current.setState(_=>(n.debug(`Focusing on column header with colIndex=${D}`),z({},_,{tabIndex:{columnHeader:{field:D},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:D},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[e,n,i]),l=x.useCallback((D,M={})=>{const A=va(e);i(A,M),e.current.setState(_=>(n.debug(`Focusing on column header filter with colIndex=${D}`),z({},_,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:D},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:D},cell:null,columnGroupHeader:null}})))},[e,n,i]),c=x.useCallback((D,M,A={})=>{const _=va(e);_&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(_.id,_.field),A),e.current.setState(N=>z({},N,{tabIndex:{columnGroupHeader:{field:D,depth:M},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:D,depth:M},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[e]),u=x.useCallback(()=>CO(e),[e]),f=x.useCallback((D,M,A)=>{let _=e.current.getColumnIndex(M);const N=Yr(e),B=bf(e,{pagination:t.pagination,paginationMode:t.paginationMode}),H=Bv(e),j=[].concat(H.top||[],B.rows,H.bottom||[]);let L=j.findIndex(G=>G.id===D);A==="right"?_+=1:A==="left"?_-=1:L+=1,_>=N.length?(L+=1,L<j.length&&(_=0)):_<0&&(L-=1,L>=0&&(_=N.length-1)),L=Za(L,0,j.length-1);const V=j[L];if(!V)return;const W=e.current.unstable_getCellColSpanInfo(V.id,_);W&&W.spannedByColSpan&&(A==="left"||A==="below"?_=W.leftVisibleCellIndex:A==="right"&&(_=W.rightVisibleCellIndex)),_=Za(_,0,N.length-1);const K=N[_];e.current.setCellFocus(V.id,K.field)},[e,t.pagination,t.paginationMode]),h=x.useCallback(({id:D,field:M})=>{e.current.setCellFocus(D,M)},[e]),m=x.useCallback((D,M)=>{M.key==="Enter"||M.key==="Tab"||M.key==="Shift"||IO(M.key)||e.current.setCellFocus(D.id,D.field)},[e]),g=x.useCallback(({field:D},M)=>{M.target===M.currentTarget&&e.current.setColumnHeaderFocus(D,M)},[e]),y=x.useCallback(({fields:D,depth:M},A)=>{if(A.target!==A.currentTarget)return;const _=CO(e);_!==null&&_.depth===M&&D.includes(_.field)||e.current.setColumnGroupHeaderFocus(D[0],M,A)},[e]),v=x.useCallback((D,M)=>{var A,_;(_=(A=M.relatedTarget)==null?void 0:A.getAttribute("class"))!=null&&_.includes(ee.columnHeader)||(n.debug("Clearing focus"),e.current.setState(N=>z({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),w=x.useCallback(D=>{r.current=D},[]),C=x.useCallback(D=>{const M=r.current;r.current=null;const A=va(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:D,cell:M}))return;if(!A){M&&e.current.setCellFocus(M.id,M.field);return}if((M==null?void 0:M.id)===A.id&&(M==null?void 0:M.field)===A.field)return;const N=e.current.getCellElement(A.id,A.field);N!=null&&N.contains(D.target)||(M?e.current.setCellFocus(M.id,M.field):(e.current.setState(B=>z({},B,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),i(A,D)))},[e,i]),E=x.useCallback(D=>{if(D.cellMode==="view")return;const M=va(e);((M==null?void 0:M.id)!==D.id||(M==null?void 0:M.field)!==D.field)&&e.current.setCellFocus(D.id,D.field)},[e]),I=x.useCallback(()=>{const D=va(e);if(D&&!e.current.getRow(D.id)){const M=D.id;let A=null;if(typeof M<"u"){const _=e.current.getRowElement(M),N=_!=null&&_.dataset.rowindex?Number(_==null?void 0:_.dataset.rowindex):0,B=bf(e,{pagination:t.pagination,paginationMode:t.paginationMode}),H=B.rows[Za(N,0,B.rows.length-1)];A=(H==null?void 0:H.id)??null}e.current.setState(_=>z({},_,{focus:{cell:A===null?null:{id:A,field:D.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),O=Je(()=>{const D=va(e);if(!D)return;const M=bf(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(M.rows.find(N=>N.id===D.id))return;const _=Yr(e);e.current.setState(N=>z({},N,{tabIndex:{cell:{id:M.rows[0].id,field:_[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),P={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},R={moveFocusToRelativeCell:f,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};yn(e,P,"public"),yn(e,R,"private"),x.useEffect(()=>{const D=Mr(e.current.rootElementRef.current);return D.addEventListener("mouseup",C),()=>{D.removeEventListener("mouseup",C)}},[e,o,C]),At(e,"columnHeaderBlur",v),At(e,"cellDoubleClick",h),At(e,"cellMouseDown",w),At(e,"cellKeyDown",m),At(e,"cellModeChange",E),At(e,"columnHeaderFocus",g),At(e,"columnGroupHeaderFocus",y),At(e,"rowsSet",I),At(e,"paginationModelChange",O)},x$=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e<n)return e+1}else if(!r&&e>t)return e-1;return null},S$=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e<n)return e+1;return null};function $bt(e,t,n,r){var s,l;const o=Vfe(e);if(!((s=o[t])!=null&&s[n]))return t;const i=xfe(e);let a=i.indexOf(t)+(r==="down"?1:-1);for(;a>=0&&a<i.length;){const c=i[a];if(!((l=o[c])!=null&&l[n]))return c;a+=r==="down"?1:-1}return t}const Nbt=Yn(qw,Bv,(e,t)=>(t.top||[]).concat(e.rows,t.bottom||[])),Lbt=(e,t)=>{const n=Qo(e,"useGridKeyboardNavigation"),r=vr(),o=t.listView,i=x.useCallback(()=>Nbt(e),[e]),a=t.signature!=="DataGrid"&&t.headerFilters,s=x.useCallback((w,C,E="left",I="up")=>{const O=Qf(e),P=e.current.unstable_getCellColSpanInfo(C,w);P&&P.spannedByColSpan&&(E==="left"?w=P.leftVisibleCellIndex:E==="right"&&(w=P.rightVisibleCellIndex));const R=o?Xy(e).field:zv(e)[w],D=$bt(e,C,R,I),M=O.findIndex(A=>A.id===D);n.debug(`Navigating to cell row ${M}, col ${w}`),e.current.scrollToIndexes({colIndex:w,rowIndex:M}),e.current.setCellFocus(D,R)},[e,n,o]),l=x.useCallback((w,C)=>{n.debug(`Navigating to header col ${w}`),e.current.scrollToIndexes({colIndex:w});const E=e.current.getVisibleColumns()[w].field;e.current.setColumnHeaderFocus(E,C)},[e,n]),c=x.useCallback((w,C)=>{n.debug(`Navigating to header filter col ${w}`),e.current.scrollToIndexes({colIndex:w});const E=e.current.getVisibleColumns()[w].field;e.current.setColumnHeaderFilterFocus(E,C)},[e,n]),u=x.useCallback((w,C,E)=>{n.debug(`Navigating to header col ${w}`),e.current.scrollToIndexes({colIndex:w});const{field:I}=e.current.getVisibleColumns()[w];e.current.setColumnGroupHeaderFocus(I,C,E)},[e,n]),f=x.useCallback(w=>{var C;return(C=i()[w])==null?void 0:C.id},[i]),h=x.useCallback((w,C)=>{const E=C.currentTarget.querySelector(`.${ee.columnHeaderTitleContainerContent}`);if(!!E&&E.contains(C.target)&&w.field!==Gv.field)return;const O=i(),P=e.current.getViewportPageSize(),R=w.field?e.current.getColumnIndex(w.field):0,D=O.length>0?0:null,M=O.length-1,A=0,_=Yr(e).length-1,N=Kw(e);let B=!0;switch(C.key){case"ArrowDown":{a?c(R,C):D!==null&&s(R,f(D));break}case"ArrowRight":{const H=S$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});H!==null&&l(H,C);break}case"ArrowLeft":{const H=x$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});H!==null&&l(H,C);break}case"ArrowUp":{N>0&&u(R,N-1,C);break}case"PageDown":{D!==null&&M!==null&&s(R,f(Math.min(D+P,M)));break}case"Home":{l(A,C);break}case"End":{l(_,C);break}case"Enter":{(C.ctrlKey||C.metaKey)&&e.current.toggleColumnMenu(w.field);break}case" ":break;default:B=!1}B&&C.preventDefault()},[e,i,a,c,s,f,r,l,u]),m=x.useCallback((w,C)=>{const E=ppt(e)===w.field,I=hpt(e)===w.field;if(E||I||!IO(C.key))return;const O=i(),P=e.current.getViewportPageSize(),R=w.field?e.current.getColumnIndex(w.field):0,D=0,M=O.length-1,A=0,_=Yr(e).length-1;let N=!0;switch(C.key){case"ArrowDown":{const B=f(D);B!=null&&s(R,B);break}case"ArrowRight":{const B=S$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});B!==null&&c(B,C);break}case"ArrowLeft":{const B=x$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});B!==null?c(B,C):e.current.setColumnHeaderFilterFocus(w.field,C);break}case"ArrowUp":{l(R,C);break}case"PageDown":{M!==null&&s(R,f(Math.min(D+P,M)));break}case"Home":{c(A,C);break}case"End":{c(_,C);break}case" ":break;default:N=!1}N&&C.preventDefault()},[e,i,c,r,l,s,f]),g=x.useCallback((w,C)=>{const E=CO(e);if(E===null)return;const{field:I,depth:O}=E,{fields:P,depth:R,maxDepth:D}=w,M=i(),A=e.current.getViewportPageSize(),_=e.current.getColumnIndex(I),N=I?e.current.getColumnIndex(I):0,B=0,H=M.length-1,j=0,L=Yr(e).length-1;let V=!0;switch(C.key){case"ArrowDown":{R===D-1?l(_,C):u(_,O+1,C);break}case"ArrowUp":{R>0&&u(_,O-1,C);break}case"ArrowRight":{const W=P.length-P.indexOf(I)-1;_+W+1<=L&&u(_+W+1,O,C);break}case"ArrowLeft":{const W=P.indexOf(I);_-W-1>=j&&u(_-W-1,O,C);break}case"PageDown":{H!==null&&s(N,f(Math.min(B+A,H)));break}case"Home":{u(j,O,C);break}case"End":{u(L,O,C);break}case" ":break;default:V=!1}V&&C.preventDefault()},[e,i,l,u,s,f]),y=x.useCallback((w,C)=>{if(Jw(C))return;const E=e.current.getCellParams(w.id,w.field);if(E.cellMode===Qn.Edit||!IO(C.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:C,cell:E}))return;const O=i();if(O.length===0)return;const P=e.current.getViewportPageSize(),R=o?()=>0:e.current.getColumnIndex,D=w.field?R(w.field):0,M=O.findIndex(L=>L.id===w.id),A=0,_=O.length-1,N=0,H=(o?[Xy(e)]:Yr(e)).length-1;let j=!0;switch(C.key){case"ArrowDown":{M<_&&s(D,f(M+1),r?"right":"left","down");break}case"ArrowUp":{M>A?s(D,f(M-1)):a?c(D,C):l(D,C);break}case"ArrowRight":{const L=S$({currentColIndex:D,firstColIndex:N,lastColIndex:H,isRtl:r});L!==null&&s(L,f(M),r?"left":"right");break}case"ArrowLeft":{const L=x$({currentColIndex:D,firstColIndex:N,lastColIndex:H,isRtl:r});L!==null&&s(L,f(M),r?"right":"left");break}case"Tab":{C.shiftKey&&D>N?s(D-1,f(M),"left"):!C.shiftKey&&D<H&&s(D+1,f(M),"right");break}case" ":{if(w.field===zP)break;const V=w.colDef;if(V&&(V.field===rft||$ht(V.field)))break;!C.shiftKey&&M<_&&s(D,f(Math.min(M+P,_)));break}case"PageDown":{M<_&&s(D,f(Math.min(M+P,_)));break}case"PageUp":{const L=Math.max(M-P,A);L!==M&&L>=A?s(D,f(L)):l(D,C);break}case"Home":{C.ctrlKey||C.metaKey||C.shiftKey?s(N,f(A)):s(N,f(M));break}case"End":{C.ctrlKey||C.metaKey||C.shiftKey?s(H,f(_)):s(H,f(M));break}default:j=!1}j&&C.preventDefault()},[e,i,r,s,f,a,c,l,o]),v=x.useCallback((w,{event:C})=>C.key===" "?!1:w,[]);Hr(e,"canStartEditing",v),At(e,"columnHeaderKeyDown",h),At(e,"headerFilterKeyDown",m),At(e,"columnGroupHeaderKeyDown",g),At(e,"cellKeyDown",y)},Fbt=(e,t)=>{var g,y;const n=Qo(e,"useGridRowCount"),r=Ge(e,XV),o=Ge(e,Tg),i=Ge(e,H0),a=Ge(e,ri),s=Xl(()=>ri(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Tg,changeEvent:"rowCountChange"});const c={setRowCount:x.useCallback(v=>{o!==v&&(n.debug("Setting 'rowCount' to",v),e.current.setState(w=>z({},w,{pagination:z({},w.pagination,{rowCount:v})})))},[e,n,o])};yn(e,c,"public");const u=x.useCallback((v,w)=>{var I,O;const C=Tg(e);return!w.exportOnlyDirtyModels||t.rowCount!=null||((O=(I=t.initialState)==null?void 0:I.pagination)==null?void 0:O.rowCount)!=null?z({},v,{pagination:z({},v.pagination,{rowCount:C})}):v},[e,t.rowCount,(y=(g=t.initialState)==null?void 0:g.pagination)==null?void 0:y.rowCount]),f=x.useCallback((v,w)=>{var E;const C=(E=w.stateToRestore.pagination)!=null&&E.rowCount?w.stateToRestore.pagination.rowCount:Tg(e);return e.current.setState(I=>z({},I,{pagination:z({},I.pagination,{rowCount:C})})),v},[e]);Hr(e,"exportState",u),Hr(e,"restoreState",f);const h=x.useCallback(v=>{t.paginationMode==="client"||!s.current||v.pageSize!==s.current&&(s.current=v.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);At(e,"paginationModelChange",h),x.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const m=i.hasNextPage===!1;x.useEffect(()=>{m&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,m,o,a])},jbt=(e,t)=>{var l,c;const n=Qo(e,"useGridPaginationMeta"),r=Ge(e,H0);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:H0,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:x.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(f=>z({},f,{pagination:z({},f.pagination,{meta:u})})))},[e,n,r])};yn(e,i,"public");const a=x.useCallback((u,f)=>{var g,y;const h=H0(e);return!f.exportOnlyDirtyModels||t.paginationMeta!=null||((y=(g=t.initialState)==null?void 0:g.pagination)==null?void 0:y.meta)!=null?z({},u,{pagination:z({},u.pagination,{meta:h})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=x.useCallback((u,f)=>{var m;const h=(m=f.stateToRestore.pagination)!=null&&m.meta?f.stateToRestore.pagination.meta:H0(e);return e.current.setState(g=>z({},g,{pagination:z({},g.pagination,{meta:h})})),u},[e]);Hr(e,"exportState",a),Hr(e,"restoreState",s),x.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},Bbt=(e,t)=>{var i,a,s,l,c,u,f;const n=z({},Ife(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));Pfe(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount)??(t.paginationMode==="client"?(c=e.rows)==null?void 0:c.totalRowCount:void 0),o=t.paginationMeta??((f=(u=t.initialState)==null?void 0:u.pagination)==null?void 0:f.meta)??{};return z({},e,{pagination:z({},e.pagination,{paginationModel:n,rowCount:r,meta:o,enabled:t.pagination===!0,paginationMode:t.paginationMode})})},zbt=(e,t)=>{jbt(e,t),Tbt(e,t),Fbt(e,t)},Vbt=(e,t)=>{var n;return z({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},Hbt=(e,t)=>{var s;const n=Qo(e,"useGridPreferencesPanel"),r=x.useCallback(()=>{e.current.setState(l=>{if(!l.preferencePanel.open)return l;n.debug("Hiding Preferences Panel");const c=Dh(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:c.openedPanelValue}),z({},l,{preferencePanel:{open:!1}})})},[e,n]),o=x.useCallback((l,c,u)=>{n.debug("Opening Preferences Panel"),e.current.setState(f=>z({},f,{preferencePanel:z({},f.preferencePanel,{open:!0,openedPanelValue:l,panelId:c,labelId:u})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:l})},[n,e]);yn(e,{showPreferences:o,hidePreferences:r},"public");const i=x.useCallback((l,c)=>{var h;const u=Dh(e);return!c.exportOnlyDirtyModels||((h=t.initialState)==null?void 0:h.preferencePanel)!=null||u.open?z({},l,{preferencePanel:u}):l},[e,(s=t.initialState)==null?void 0:s.preferencePanel]),a=x.useCallback((l,c)=>{const u=c.stateToRestore.preferencePanel;return u!=null&&e.current.setState(f=>z({},f,{preferencePanel:u})),l},[e]);Hr(e,"exportState",i),Hr(e,"restoreState",a)},sj=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},Ubt=["id","field"],Gbt=["id","field"],qbt=(e,t)=>{const[n,r]=x.useState({}),o=x.useRef(n),i=x.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=j=>(...L)=>{t.editMode===zc.Cell&&j(...L)},f=x.useCallback((j,L)=>{const V=e.current.getCellParams(j,L);if(!e.current.isCellEditable(V))throw new Error(`MUI X: The cell with id=${j} and field=${L} is not editable.`)},[e]),h=x.useCallback((j,L,V)=>{if(e.current.getCellMode(j,L)!==V)throw new Error(`MUI X: The cell with id=${j} and field=${L} is not in ${V} mode.`)},[e]),m=x.useCallback((j,L)=>{if(!j.isEditable||j.cellMode===Qn.Edit)return;const V=z({},j,{reason:xu.cellDoubleClick});e.current.publishEvent("cellEditStart",V,L)},[e]),g=x.useCallback((j,L)=>{if(j.cellMode===Qn.View||e.current.getCellMode(j.id,j.field)===Qn.View)return;const V=z({},j,{reason:Cl.cellFocusOut});e.current.publishEvent("cellEditStop",V,L)},[e]),y=x.useCallback((j,L)=>{if(j.cellMode===Qn.Edit){if(L.which===229)return;let V;if(L.key==="Escape"?V=Cl.escapeKeyDown:L.key==="Enter"?V=Cl.enterKeyDown:L.key==="Tab"&&(V=L.shiftKey?Cl.shiftTabKeyDown:Cl.tabKeyDown,L.preventDefault()),V){const W=z({},j,{reason:V});e.current.publishEvent("cellEditStop",W,L)}}else if(j.isEditable){let V;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:L,cellParams:j,editMode:"cell"}))return;if(ape(L)?V=xu.printableKeyDown:lpe(L)?V=xu.pasteKeyDown:L.key==="Enter"?V=xu.enterKeyDown:(L.key==="Backspace"||L.key==="Delete")&&(V=xu.deleteKeyDown),V){const K=z({},j,{reason:V,key:L.key});e.current.publishEvent("cellEditStart",K,L)}}},[e]),v=x.useCallback(j=>{const{id:L,field:V,reason:W}=j,K={id:L,field:V};(W===xu.printableKeyDown||W===xu.deleteKeyDown||W===xu.pasteKeyDown)&&(K.deleteValue=!0),e.current.startCellEditMode(K)},[e]),w=x.useCallback(j=>{const{id:L,field:V,reason:W}=j;e.current.runPendingEditCellValueMutation(L,V);let K;W===Cl.enterKeyDown?K="below":W===Cl.tabKeyDown?K="right":W===Cl.shiftTabKeyDown&&(K="left");const G=W==="escapeKeyDown";e.current.stopCellEditMode({id:L,field:V,ignoreModifications:G,cellToFocusAfter:K})},[e]),C=j=>async(...L)=>{var V;if(j){const{id:W,field:K}=L[0];((V=e.current.state.editRows[W][K])==null?void 0:V.error)||j(...L)}};At(e,"cellDoubleClick",u(m)),At(e,"cellFocusOut",u(g)),At(e,"cellKeyDown",u(y)),At(e,"cellEditStart",u(v)),At(e,"cellEditStop",u(w)),sr(e,"cellEditStart",t.onCellEditStart),sr(e,"cellEditStop",C(t.onCellEditStop));const E=x.useCallback((j,L)=>{const V=Bo(e);return V[j]&&V[j][L]?Qn.Edit:Qn.View},[e]),I=Je(j=>{const L=j!==t.cellModesModel;c&&L&&c(j,{api:e.current}),!(t.cellModesModel&&L)&&(r(j),o.current=j,e.current.publishEvent("cellModesModelChange",j))}),O=x.useCallback((j,L,V)=>{const W=z({},o.current);if(V!==null)W[j]=z({},W[j],{[L]:z({},V)});else{const K=W[j],G=$e(K,[L].map(DS));W[j]=G,Object.keys(W[j]).length===0&&delete W[j]}I(W)},[I]),P=x.useCallback((j,L,V)=>{e.current.setState(W=>{const K=z({},W.editRows);return V!==null?K[j]=z({},K[j],{[L]:z({},V)}):(delete K[j][L],Object.keys(K[j]).length===0&&delete K[j]),z({},W,{editRows:K})})},[e]),R=x.useCallback(j=>{const{id:L,field:V}=j,W=$e(j,Ubt);f(L,V),h(L,V,Qn.View),O(L,V,z({mode:Qn.Edit},W))},[f,h,O]),D=Je(async j=>{const{id:L,field:V,deleteValue:W,initialValue:K}=j,G=e.current.getCellValue(L,V);let q=G;W?q=sj(e.current.getColumn(V)):K&&(q=K);const Y=e.current.getColumn(V),Z=!!Y.preProcessEditCellProps&&W;let ie={value:q,error:!1,isProcessingProps:Z};if(P(L,V,ie),e.current.setCellFocus(L,V),Z&&(ie=await Promise.resolve(Y.preProcessEditCellProps({id:L,row:e.current.getRow(L),props:ie,hasChanged:q!==G})),e.current.getCellMode(L,V)===Qn.Edit)){const se=Bo(e);P(L,V,z({},ie,{value:se[L][V].value,isProcessingProps:!1}))}}),M=x.useCallback(j=>{const{id:L,field:V}=j,W=$e(j,Gbt);h(L,V,Qn.Edit),O(L,V,z({mode:Qn.View},W))},[h,O]),A=Je(async j=>{var ce;const{id:L,field:V,ignoreModifications:W,cellToFocusAfter:K="none"}=j;h(L,V,Qn.Edit),e.current.runPendingEditCellValueMutation(L,V);const G=()=>{P(L,V,null),O(L,V,null),K!=="none"&&e.current.moveFocusToRelativeCell(L,V,K)};if(W){G();return}const q=Bo(e),{error:Y,isProcessingProps:Z}=q[L][V],ie=e.current.getRow(L);if(Y||Z){i.current[L][V].mode=Qn.Edit,O(L,V,{mode:Qn.Edit});return}const se=e.current.getRowWithUpdatedValuesFromCellEditing(L,V);if((ce=t.dataSource)!=null&&ce.updateRow){if(ie[V]===se[V]){G();return}const ye=()=>{i.current[L][V].mode=Qn.Edit,O(L,V,{mode:Qn.Edit})},Se={rowId:L,updatedRow:se,previousRow:ie};try{await e.current.dataSource.editRow(Se),G()}catch{ye()}}else if(a){const ye=Se=>{i.current[L][V].mode=Qn.Edit,O(L,V,{mode:Qn.Edit}),s&&s(Se)};try{Promise.resolve(a(se,ie,{rowId:L})).then(Se=>{e.current.updateRows([Se]),G()}).catch(ye)}catch(Se){ye(Se)}}else e.current.updateRows([se]),G()}),_=x.useCallback(async j=>{var ce,ye;const{id:L,field:V,value:W,debounceMs:K,unstable_skipValueParser:G}=j;f(L,V),h(L,V,Qn.Edit);const q=e.current.getColumn(V),Y=e.current.getRow(L);let Z=W;q.valueParser&&!G&&(Z=q.valueParser(W,Y,q,e));let ie=Bo(e),se=z({},ie[L][V],{value:Z,changeReason:K?"debouncedSetEditCellValue":"setEditCellValue"});if(q.preProcessEditCellProps){const Se=W!==ie[L][V].value;se=z({},se,{isProcessingProps:!0}),P(L,V,se),se=await Promise.resolve(q.preProcessEditCellProps({id:L,row:Y,props:se,hasChanged:Se}))}return e.current.getCellMode(L,V)===Qn.View?!1:(ie=Bo(e),se=z({},se,{isProcessingProps:!1}),se.value=q.preProcessEditCellProps?ie[L][V].value:Z,P(L,V,se),ie=Bo(e),!((ye=(ce=ie[L])==null?void 0:ce[V])!=null&&ye.error))},[e,f,h,P]),N=x.useCallback((j,L)=>{const V=e.current.getColumn(L),W=Bo(e),K=e.current.getRow(j);if(!W[j]||!W[j][L])return e.current.getRow(j);const{value:G}=W[j][L];return V.valueSetter?V.valueSetter(G,K,V,e):z({},K,{[L]:G})},[e]),B={getCellMode:E,startCellEditMode:R,stopCellEditMode:M},H={setCellEditingEditCellValue:_,getRowWithUpdatedValuesFromCellEditing:N};yn(e,B,"public"),yn(e,H,"private"),x.useEffect(()=>{l&&I(l)},[l,I]),In(()=>{const j=Us(e),L=i.current;i.current=tfe(n),Object.entries(n).forEach(([V,W])=>{Object.entries(W).forEach(([K,G])=>{var Z,ie;const q=((ie=(Z=L[V])==null?void 0:Z[K])==null?void 0:ie.mode)||Qn.View,Y=j[V]?e.current.getRowId(j[V]):V;G.mode===Qn.Edit&&q===Qn.View?D(z({id:Y,field:K},G)):G.mode===Qn.View&&q===Qn.Edit&&A(z({id:Y,field:K},G))})})},[e,n,D,A])},Wbt=["id"],Kbt=["id"],Ybt=(e,t)=>{const[n,r]=x.useState({}),o=x.useRef(n),i=x.useRef({}),a=x.useRef({}),s=x.useRef(void 0),l=x.useRef(null),{processRowUpdate:c,onProcessRowUpdateError:u,rowModesModel:f,onRowModesModelChange:h}=t,m=G=>(...q)=>{t.editMode===zc.Row&&G(...q)},g=x.useCallback((G,q)=>{const Y=e.current.getCellParams(G,q);if(!e.current.isCellEditable(Y))throw new Error(`MUI X: The cell with id=${G} and field=${q} is not editable.`)},[e]),y=x.useCallback((G,q)=>{if(e.current.getRowMode(G)!==q)throw new Error(`MUI X: The row with id=${G} is not in ${q} mode.`)},[e]),v=x.useCallback(G=>{const q=Bo(e);return Object.values(q[G]).some(Y=>Y.error)},[e]),w=x.useCallback((G,q)=>{if(!G.isEditable||e.current.getRowMode(G.id)===zn.Edit)return;const Y=e.current.getRowParams(G.id),Z=z({},Y,{field:G.field,reason:Vd.cellDoubleClick});e.current.publishEvent("rowEditStart",Z,q)},[e]),C=x.useCallback(G=>{l.current=G},[]),E=x.useCallback((G,q)=>{G.isEditable&&e.current.getRowMode(G.id)!==zn.View&&(l.current=null,s.current=setTimeout(()=>{var Y;if(((Y=l.current)==null?void 0:Y.id)!==G.id){if(!e.current.getRow(G.id)||e.current.getRowMode(G.id)===zn.View||v(G.id))return;const Z=e.current.getRowParams(G.id),ie=z({},Z,{field:G.field,reason:ks.rowFocusOut});e.current.publishEvent("rowEditStop",ie,q)}}))},[e,v]);x.useEffect(()=>()=>{clearTimeout(s.current)},[]);const I=x.useCallback((G,q)=>{if(G.cellMode===zn.Edit){if(q.which===229)return;let Y;if(q.key==="Escape")Y=ks.escapeKeyDown;else if(q.key==="Enter")Y=ks.enterKeyDown;else if(q.key==="Tab"){const Z=zv(e).filter(ie=>e.current.getColumn(ie).type===jP?!0:e.current.isCellEditable(e.current.getCellParams(G.id,ie)));if(q.shiftKey?G.field===Z[0]&&(Y=ks.shiftTabKeyDown):G.field===Z[Z.length-1]&&(Y=ks.tabKeyDown),q.preventDefault(),!Y){const ie=Z.findIndex(ce=>ce===G.field),se=Z[q.shiftKey?ie-1:ie+1];e.current.setCellFocus(G.id,se)}}if(Y){if(Y!==ks.escapeKeyDown&&v(G.id))return;const Z=z({},e.current.getRowParams(G.id),{reason:Y,field:G.field});e.current.publishEvent("rowEditStop",Z,q)}}else if(G.isEditable){let Y;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:q,cellParams:G,editMode:"row"}))return;if(ape(q)||lpe(q)?Y=Vd.printableKeyDown:q.key==="Enter"?Y=Vd.enterKeyDown:(q.key==="Backspace"||q.key==="Delete")&&(Y=Vd.deleteKeyDown),Y){const ie=e.current.getRowParams(G.id),se=z({},ie,{field:G.field,reason:Y});e.current.publishEvent("rowEditStart",se,q)}}},[e,v]),O=x.useCallback(G=>{const{id:q,field:Y,reason:Z}=G,ie={id:q,fieldToFocus:Y};(Z===Vd.printableKeyDown||Z===Vd.deleteKeyDown)&&(ie.deleteValue=!!Y),e.current.startRowEditMode(ie)},[e]),P=x.useCallback(G=>{const{id:q,reason:Y,field:Z}=G;e.current.runPendingEditCellValueMutation(q);let ie;Y===ks.enterKeyDown?ie="below":Y===ks.tabKeyDown?ie="right":Y===ks.shiftTabKeyDown&&(ie="left");const se=Y==="escapeKeyDown";e.current.stopRowEditMode({id:q,ignoreModifications:se,field:Z,cellToFocusAfter:ie})},[e]);At(e,"cellDoubleClick",m(w)),At(e,"cellFocusIn",m(C)),At(e,"cellFocusOut",m(E)),At(e,"cellKeyDown",m(I)),At(e,"rowEditStart",m(O)),At(e,"rowEditStop",m(P)),sr(e,"rowEditStart",t.onRowEditStart),sr(e,"rowEditStop",t.onRowEditStop);const R=x.useCallback(G=>Kfe(e,{rowId:G,editMode:t.editMode})?zn.Edit:zn.View,[e,t.editMode]),D=Je(G=>{const q=G!==t.rowModesModel;h&&q&&h(G,{api:e.current}),!(t.rowModesModel&&q)&&(r(G),o.current=G,e.current.publishEvent("rowModesModelChange",G))}),M=x.useCallback((G,q)=>{const Y=z({},o.current);q!==null?Y[G]=z({},q):delete Y[G],D(Y)},[D]),A=x.useCallback((G,q)=>{e.current.setState(Y=>{const Z=z({},Y.editRows);return q!==null?Z[G]=q:delete Z[G],z({},Y,{editRows:Z})})},[e]),_=x.useCallback((G,q,Y)=>{e.current.setState(Z=>{const ie=z({},Z.editRows);return Y!==null?ie[G]=z({},ie[G],{[q]:z({},Y)}):(delete ie[G][q],Object.keys(ie[G]).length===0&&delete ie[G]),z({},Z,{editRows:ie})})},[e]),N=x.useCallback(G=>{const{id:q}=G,Y=$e(G,Wbt);y(q,zn.View),M(q,z({mode:zn.Edit},Y))},[y,M]),B=Je(G=>{const{id:q,fieldToFocus:Y,deleteValue:Z,initialValue:ie}=G,se=e.current.getRow(q),ce=Rc(e),ye=ce.reduce((Se,ne)=>{if(!e.current.getCellParams(q,ne).isEditable)return Se;const de=e.current.getColumn(ne);let oe=e.current.getCellValue(q,ne);return Y===ne&&(Z||ie)&&(Z?oe=sj(de):ie&&(oe=ie)),Se[ne]={value:oe,error:!1,isProcessingProps:!!de.preProcessEditCellProps&&Z},Se},{});a.current[q]=se,A(q,ye),Y&&e.current.setCellFocus(q,Y),ce.filter(Se=>!!e.current.getColumn(Se).preProcessEditCellProps&&Z).forEach(Se=>{const ne=e.current.getColumn(Se),le=e.current.getCellValue(q,Se),de=Z?sj(ne):ie??le;Promise.resolve(ne.preProcessEditCellProps({id:q,row:se,props:ye[Se],hasChanged:de!==le})).then(oe=>{if(e.current.getRowMode(q)===zn.Edit){const ue=Bo(e);_(q,Se,z({},oe,{value:ue[q][Se].value,isProcessingProps:!1}))}})})}),H=x.useCallback(G=>{const{id:q}=G,Y=$e(G,Kbt);y(q,zn.Edit),M(q,z({mode:zn.View},Y))},[y,M]),j=Je(async G=>{var le;const{id:q,ignoreModifications:Y,field:Z,cellToFocusAfter:ie="none"}=G;e.current.runPendingEditCellValueMutation(q);const se=()=>{ie!=="none"&&Z&&e.current.moveFocusToRelativeCell(q,Z,ie),A(q,null),M(q,null),delete a.current[q]};if(Y){se();return}const ce=Bo(e),ye=a.current[q];if(Object.values(ce[q]).some(de=>de.isProcessingProps)){i.current[q].mode=zn.Edit;return}if(v(q)){i.current[q].mode=zn.Edit,M(q,{mode:zn.Edit});return}const ne=e.current.getRowWithUpdatedValuesFromRowEditing(q);if((le=t.dataSource)!=null&&le.updateRow){if(Js(ye,ne)){se();return}const de=()=>{i.current[q].mode=zn.Edit,M(q,{mode:zn.Edit})},oe={rowId:q,updatedRow:ne,previousRow:ye};try{await e.current.dataSource.editRow(oe),se()}catch{de()}}else if(c){const de=oe=>{i.current[q]&&(i.current[q].mode=zn.Edit,M(q,{mode:zn.Edit})),u&&u(oe)};try{Promise.resolve(c(ne,ye,{rowId:q})).then(oe=>{e.current.updateRows([oe]),se()}).catch(de)}catch(oe){de(oe)}}else e.current.updateRows([ne]),se()}),L=x.useCallback(G=>{const{id:q,field:Y,value:Z,debounceMs:ie,unstable_skipValueParser:se}=G;g(q,Y);const ce=e.current.getColumn(Y),ye=e.current.getRow(q);let Se=Z;ce.valueParser&&!se&&(Se=ce.valueParser(Z,ye,ce,e));let ne=Bo(e),le=z({},ne[q][Y],{value:Se,changeReason:ie?"debouncedSetEditCellValue":"setEditCellValue"});return ce.preProcessEditCellProps||_(q,Y,le),new Promise(de=>{const oe=[];if(ce.preProcessEditCellProps){const ue=le.value!==ne[q][Y].value;le=z({},le,{isProcessingProps:!0}),_(q,Y,le);const pe=ne[q],Ee=$e(pe,[Y].map(DS)),xe=Promise.resolve(ce.preProcessEditCellProps({id:q,row:ye,props:le,hasChanged:ue,otherFieldsProps:Ee})).then(Re=>{if(e.current.getRowMode(q)===zn.View){de(!1);return}ne=Bo(e),Re=z({},Re,{isProcessingProps:!1}),Re.value=ce.preProcessEditCellProps?ne[q][Y].value:Se,_(q,Y,Re)});oe.push(xe)}Object.entries(ne[q]).forEach(([ue,pe])=>{if(ue===Y)return;const Ee=e.current.getColumn(ue);if(!Ee.preProcessEditCellProps)return;pe=z({},pe,{isProcessingProps:!0}),_(q,ue,pe),ne=Bo(e);const xe=ne[q],Re=$e(xe,[ue].map(DS)),he=Promise.resolve(Ee.preProcessEditCellProps({id:q,row:ye,props:pe,hasChanged:!1,otherFieldsProps:Re})).then(Pe=>{if(e.current.getRowMode(q)===zn.View){de(!1);return}Pe=z({},Pe,{isProcessingProps:!1}),_(q,ue,Pe)});oe.push(he)}),Promise.all(oe).then(()=>{e.current.getRowMode(q)===zn.Edit?(ne=Bo(e),de(!ne[q][Y].error)):de(!1)})})},[e,g,_]),V=x.useCallback(G=>{const q=Bo(e),Y=e.current.getRow(G);if(!q[G])return e.current.getRow(G);let Z=z({},a.current[G],Y);return Object.entries(q[G]).forEach(([ie,se])=>{const ce=e.current.getColumn(ie);ce!=null&&ce.valueSetter?Z=ce.valueSetter(se.value,Z,ce,e):Z[ie]=se.value}),Z},[e]),W={getRowMode:R,startRowEditMode:N,stopRowEditMode:H},K={setRowEditingEditCellValue:L,getRowWithUpdatedValuesFromRowEditing:V};yn(e,W,"public"),yn(e,K,"private"),x.useEffect(()=>{f&&D(f)},[f,D]),In(()=>{const G=Us(e),q=i.current;i.current=tfe(n);const Y=new Set([...Object.keys(n),...Object.keys(q)]);Array.from(Y).forEach(Z=>{var ye;const ie=n[Z]??{mode:zn.View},se=((ye=q[Z])==null?void 0:ye.mode)||zn.View,ce=G[Z]?e.current.getRowId(G[Z]):Z;ie.mode===zn.Edit&&se===zn.View?B(z({id:ce},ie)):ie.mode===zn.View&&se===zn.Edit&&j(z({id:ce},ie))})},[e,n,B,j])},Qbt=e=>z({},e,{editRows:{}}),Xbt=(e,t)=>{qbt(e,t),Ybt(e,t);const n=x.useRef({}),{isCellEditable:r}=t,o=x.useCallback(h=>Yy(h.rowNode)||!h.colDef.editable||!h.colDef.renderEditCell?!1:r?r(h):!0,[r]),i=(h,m,g,y)=>{if(!g){y();return}if(n.current[h]||(n.current[h]={}),n.current[h][m]){const[C]=n.current[h][m];clearTimeout(C)}const v=()=>{const[C]=n.current[h][m];clearTimeout(C),y(),delete n.current[h][m]},w=setTimeout(()=>{y(),delete n.current[h][m]},g);n.current[h][m]=[w,v]};x.useEffect(()=>{const h=n.current;return()=>{Object.entries(h).forEach(([m,g])=>{Object.keys(g).forEach(y=>{const[v]=h[m][y];clearTimeout(v),delete h[m][y]})})}},[]);const a=x.useCallback((h,m)=>{if(n.current[h]){if(!m)Object.keys(n.current[h]).forEach(g=>{const[,y]=n.current[h][g];y()});else if(n.current[h][m]){const[,g]=n.current[h][m];g()}}},[]),s=x.useCallback(h=>{const{id:m,field:g,debounceMs:y}=h;return new Promise(v=>{i(m,g,y,async()=>{const w=t.editMode===zc.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(m,g)===Qn.Edit){const C=await w(h);v(C)}})})},[e,t.editMode]),l=x.useCallback((h,m)=>t.editMode===zc.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(h,m):e.current.getRowWithUpdatedValuesFromRowEditing(h),[e,t.editMode]),c=x.useCallback((h,m)=>{var y;return((y=Bo(e)[h])==null?void 0:y[m])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},f={runPendingEditCellValueMutation:a};yn(e,u,"public"),yn(e,f,"private")},Jbt=(e,t,n)=>{const r=!!t.dataSource;return n.current.caches.rows=ME({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),z({},e,{rows:ffe({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},Zbt=(e,t)=>{const n=Qo(e,"useGridRows"),r=x.useRef(Date.now()),o=x.useRef(t.rowCount),i=ko(),a=x.useCallback(j=>{const L=Us(e)[j];if(L)return L;const V=Cc(e,j);return V&&Yy(V)?{[Ky]:j}:null},[e]),s=x.useCallback(j=>Ww(e,j),[e]),l=x.useCallback(({cache:j,throttle:L})=>{const V=()=>{r.current=Date.now(),e.current.setState(K=>z({},K,{rows:ffe({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:Si(e),previousTreeDepths:yJ(e),previousGroupsToFetch:udt(e)})})),e.current.publishEvent("rowsSet")};if(i.clear(),e.current.caches.rows=j,!L){V();return}const W=t.throttleRowsMs-(Date.now()-r.current);if(W>0){i.start(W,V);return}V()},[t.throttleRowsMs,t.rowCount,t.loading,e,i]),c=x.useCallback(j=>{if(n.debug(`Updating all rows, new length ${j.length}`),Rh(e)){e.current.updateNonPivotRows(j,!1);return}const L=ME({rows:j,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),V=e.current.caches.rows;L.rowsBeforePartialUpdates=V.rowsBeforePartialUpdates,l({cache:L,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,l,e]),u=x.useCallback(j=>{if(t.signature===Vl.DataGrid&&j.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
-`));if(Rh(e)){e.current.updateNonPivotRows(j);return}const L=PJ(e,j,t.getRowId),V=IJ({updates:L,getRowId:t.getRowId,previousCache:e.current.caches.rows});l({cache:V,throttle:!0})},[t.signature,t.getRowId,l,e]),f=x.useCallback((j,L)=>{const V=PJ(e,j,t.getRowId),W=IJ({updates:V,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:L??[]});l({cache:W,throttle:!1})},[t.getRowId,l,e]),h=x.useCallback(j=>{n.debug(`Setting loading to ${j}`),e.current.setState(L=>z({},L,{rows:z({},L.rows,{loading:j})})),e.current.caches.rows.loadingPropBeforePartialUpdates=j},[e,n]),m=x.useCallback(()=>{const j=Gp(e),L=Us(e);return new Map(j.map(V=>[V,L[V]??{}]))},[e]),g=x.useCallback(()=>Hw(e),[e]),y=x.useCallback(()=>Gp(e),[e]),v=x.useCallback(j=>{const{rowIdToIndexMap:L}=bf(e);return L.get(j)},[e]),w=x.useCallback((j,L)=>{const V=Cc(e,j);if(!V)throw new Error(`MUI X: No row with id #${j} found.`);if(V.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const W=z({},V,{childrenExpanded:L});e.current.setState(K=>z({},K,{rows:z({},K.rows,{tree:z({},K.rows.tree,{[j]:W})})})),e.current.publishEvent("rowExpansionChange",W)},[e]),C=x.useCallback(j=>Cc(e,j)??null,[e]),E=x.useCallback(({skipAutoGeneratedRows:j=!0,groupId:L,applySorting:V,applyFiltering:W})=>{const K=Si(e);let G;if(V){const q=K[L];if(!q)return[];const Y=Hv(e);G=[];const Z=Y.findIndex(ie=>ie===L)+1;for(let ie=Z;ie<Y.length&&K[Y[ie]].depth>q.depth;ie+=1){const se=Y[ie];(!j||!Yy(K[se]))&&G.push(se)}}else G=KV(K,L,j);if(W){const q=Uv(e);G=VP(q)?G:G.filter(Y=>q[Y]!==!1)}return G},[e]),I=x.useCallback((j,L)=>{const V=Cc(e,j);if(!V)throw new Error(`MUI X: No row with id #${j} found.`);if(V.parent!==ii)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(V.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(W=>{const K=Si(e)[ii],G=K.children,q=G.findIndex(Z=>Z===j);if(q===-1||q===L)return W;n.debug(`Moving row ${j} to index ${L}`);const Y=[...G];return Y.splice(L,0,Y.splice(q,1)[0]),z({},W,{rows:z({},W.rows,{tree:z({},W.rows.tree,{[ii]:z({},K,{children:Y})})})})}),e.current.publishEvent("rowsSet")},[e,n]),O=x.useCallback((j,L)=>{if(t.signature===Vl.DataGrid&&L.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
-`));if(L.length===0)return;if(jv(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const W=z({},Si(e)),K=z({},Us(e)),G=W[ii],q=[...G.children],Y=new Set;for(let ie=0;ie<L.length;ie+=1){const se=L[ie],ce=BP(se,t.getRowId,"A row was provided without id when calling replaceRows()."),[ye]=q.splice(j+ie,1,ce);Y.has(ye)||(delete K[ye],delete W[ye]);const Se={id:ce,depth:0,parent:ii,type:"leaf",groupingKey:null};K[ce]=se,W[ce]=Se,Y.add(ce)}W[ii]=z({},G,{children:q});const Z=q.filter(ie=>{var se;return((se=W[ie])==null?void 0:se.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=K,e.current.setState(ie=>z({},ie,{rows:z({},ie.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,q.length),dataRowIdToModelLookup:K,dataRowIds:Z,tree:W})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId,t.loading,t.rowCount]),P={getRow:a,setLoading:h,getRowId:s,getRowModels:m,getRowsCount:g,getAllRowIds:y,setRows:c,updateRows:u,getRowNode:C,getRowIndexRelativeToVisibleRows:v,unstable_replaceRows:O},R={setRowIndex:I,setRowChildrenExpansion:w,getRowGroupChildren:E},D={updateNestedRows:f},M=x.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let j;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?j=z({},e.current.caches.rows,{updates:{type:"full",rows:Gp(e)}}):j=ME({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),l({cache:j,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,l]),A=Xl(()=>t.dataSource),_=x.useCallback(j=>{if(t.dataSource&&t.dataSource!==A.current){A.current=t.dataSource;return}j==="rowTreeCreation"&&M()},[M,A,t.dataSource]),N=x.useCallback(()=>{e.current.getActiveStrategy(Zd.RowTree)!==ddt(e)&&M()},[e,M]);At(e,"activeStrategyProcessorChange",_),At(e,"strategyAvailabilityChange",N);const B=x.useCallback(()=>{e.current.setState(j=>{const L=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:Si(e),treeDepths:yJ(e),dataRowIds:Gp(e),dataRowIdToModelLookup:Us(e)});return z({},j,{rows:z({},j.rows,L,{totalTopLevelRowCount:dfe({tree:L.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet")},[e,t.rowCount]);dH(e,"hydrateRows",B),yn(e,P,"public"),yn(e,R,t.signature===Vl.DataGrid?"private":"public"),yn(e,D,"private");const H=x.useRef(!0);x.useEffect(()=>{if(H.current){H.current=!1;return}let j=!1;t.rowCount!==o.current&&(j=!0,o.current=t.rowCount);const L=t.dataSource?fdt(e):t.rows,V=e.current.caches.rows.rowsBeforePartialUpdates===L,W=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,K=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;V&&(W||(e.current.setState(G=>z({},G,{rows:z({},G.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),K||(e.current.setState(G=>z({},G,{rows:z({},G.rows,{totalRowCount:Math.max(t.rowCount||0,G.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,G.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!j)||(n.debug(`Updating all rows, new length ${L==null?void 0:L.length}`),l({cache:ME({rows:L,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,n,l,e])},e0t=e=>{const t={[ii]:z({},eft(),{children:e})};for(let n=0;n<e.length;n+=1){const r=e[n];t[r]={id:r,depth:0,parent:ii,type:"leaf",groupingKey:null}}return{groupingName:kh,tree:t,treeDepths:{0:e.length},dataRowIds:e}},t0t=({previousTree:e,actions:t})=>{const n=z({},e),r={};for(let a=0;a<t.remove.length;a+=1){const s=t.remove[a];r[s]=!0,delete n[s]}for(let a=0;a<t.insert.length;a+=1){const s=t.insert[a];n[s]={id:s,depth:0,parent:ii,type:"leaf",groupingKey:null}}const o=n[ii];let i=[...o.children,...t.insert];return Object.values(r).length&&(i=i.filter(a=>!r[a])),n[ii]=z({},o,{children:i}),{groupingName:kh,tree:n,treeDepths:{0:i.length},dataRowIds:i}},n0t=e=>e.updates.type==="full"?e0t(e.updates.rows):t0t({previousTree:e.previousTree,actions:e.updates.actions}),r0t=e=>{kS(e,kh,"rowTreeCreation",n0t)};class w$ extends Error{}function o0t(e,t){var g;const n=x.useCallback(y=>({field:y,colDef:e.current.getColumn(y)}),[e]),r=x.useCallback(y=>{const v=e.current.getRow(y);if(!v)throw new w$(`No row with id #${y} found`);return{id:y,columns:e.current.getAllColumns(),row:v}},[e]),o=x.useCallback((y,v,w,{cellMode:C,colDef:E,hasFocus:I,rowNode:O,tabIndex:P})=>{const R=w[v],D=E!=null&&E.valueGetter?E.valueGetter(R,w,E,e):R,M={id:y,field:v,row:w,rowNode:O,colDef:E,cellMode:C,hasFocus:I,tabIndex:P,value:D,formattedValue:D,isEditable:!1,api:e.current};return E&&E.valueFormatter&&(M.formattedValue=E.valueFormatter(D,w,E,e)),M.isEditable=E&&e.current.isCellEditable(M),M},[e]),i=x.useCallback((y,v)=>{var P;const w=e.current.getRow(y),C=Cc(e,y);if(!w||!C)throw new w$(`No row with id #${y} found`);const E=va(e),I=eH(e),O=e.current.getCellMode(y,v);return e.current.getCellParamsForRow(y,v,w,{colDef:t.listView&&((P=t.listViewColumn)==null?void 0:P.field)===v?Xy(e):e.current.getColumn(v),rowNode:C,hasFocus:E!==null&&E.field===v&&E.id===y,tabIndex:I&&I.field===v&&I.id===y?0:-1,cellMode:O})},[e,t.listView,(g=t.listViewColumn)==null?void 0:g.field]),a=x.useCallback((y,v)=>{const w=e.current.getColumn(v),C=e.current.getRow(y);if(!C)throw new w$(`No row with id #${y} found`);return!w||!w.valueGetter?C[v]:w.valueGetter(C[w.field],C,w,e)},[e]),s=x.useCallback((y,v)=>nft(y,v,e),[e]),l=x.useCallback((y,v)=>{const w=s(y,v);return!v||!v.valueFormatter?w:v.valueFormatter(w,y,v,e)},[e,s]),c=x.useCallback(y=>e.current.rootElementRef.current?Mmt(e.current.rootElementRef.current,y):null,[e]),u=x.useCallback(y=>e.current.rootElementRef.current?Rmt(e.current.rootElementRef.current,y):null,[e]),f=x.useCallback((y,v)=>e.current.rootElementRef.current?Dmt(e.current.rootElementRef.current,{id:y,field:v}):null,[e]),h={getCellValue:a,getCellParams:i,getCellElement:f,getRowValue:s,getRowFormattedValue:l,getRowParams:r,getRowElement:u,getColumnHeaderParams:n,getColumnHeaderElement:c},m={getCellParamsForRow:o};yn(e,h,"public"),yn(e,m,"private")}const hx={type:"include",ids:new Set},i0t=(e,t)=>z({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??hx:hx}),a0t=(e,t)=>{var G,q,Y,Z,ie,se,ce,ye,Se;const n=Qo(e,"useGridSelection"),r=x.useCallback(ne=>(...le)=>{t.rowSelection&&ne(...le)},[t.rowSelection]),o=t.signature!==Vl.DataGrid&&(((G=t.rowSelectionPropagation)==null?void 0:G.parents)||((q=t.rowSelectionPropagation)==null?void 0:q.descendants)),i=x.useMemo(()=>t.rowSelectionModel,[t.rowSelectionModel]),a=x.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:Al,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=ZV(t),f=Ge(e,Si),h=Ge(e,jv)>1,m=x.useCallback(ne=>{let le=ne;const de=a.current??ne,oe=e.current.isRowSelected(ne);if(oe){const ue=Hg(e),pe=ue.findIndex(xe=>xe===de),Ee=ue.findIndex(xe=>xe===le);if(pe===Ee)return;pe>Ee?le=ue[Ee+1]:le=ue[Ee-1]}a.current=ne,e.current.selectRowRange({startId:de,endId:le},!oe)},[e]),g=Je(()=>t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?Dfe(e):Hg(e)),y=x.useCallback(ne=>{if(t.signature===Vl.DataGrid&&!u&&(ne.type!=="include"||ne.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(`
-`));Al(e)!==ne&&(n.debug("Setting selection model"),e.current.setState(de=>z({},de,{rowSelection:t.rowSelection?ne:hx})))},[e,n,t.rowSelection,t.signature,u]),v=x.useCallback(ne=>Uw(e).has(ne),[e]),w=x.useCallback(ne=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(ne)))return!1;const le=Cc(e,ne);return!((le==null?void 0:le.type)==="footer"||(le==null?void 0:le.type)==="pinnedRow")},[e,t.rowSelection,c]),C=x.useCallback(()=>Cfe(e),[e]),E=x.useCallback((ne,le=!0,de=!1)=>{var oe,ue,pe,Ee,xe,Re;if(e.current.isRowSelectable(ne))if(a.current=ne,de){n.debug(`Setting selection for row ${ne}`);const he={type:"include",ids:new Set},Pe=ve=>{he.ids.add(ve)};le&&(Pe(ne),o&&S0(e,f,ne,((oe=t.rowSelectionPropagation)==null?void 0:oe.descendants)??!1,((ue=t.rowSelectionPropagation)==null?void 0:ue.parents)??!1,Pe)),e.current.setRowSelectionModel(he)}else{n.debug(`Toggling selection for row ${ne}`);const he=Al(e),Pe={type:he.type,ids:new Set(he.ids)},ve=Jd(Pe);ve.unselect(ne);const Ie=De=>{ve.select(De)},te=De=>{ve.unselect(De)};le?(Ie(ne),o&&S0(e,f,ne,((pe=t.rowSelectionPropagation)==null?void 0:pe.descendants)??!1,((Ee=t.rowSelectionPropagation)==null?void 0:Ee.parents)??!1,Ie)):o&&AJ(e,f,ne,((xe=t.rowSelectionPropagation)==null?void 0:xe.descendants)??!1,((Re=t.rowSelectionPropagation)==null?void 0:Re.parents)??!1,te),(Pe.type==="include"&&Pe.ids.size<2||u)&&e.current.setRowSelectionModel(Pe)}},[e,n,o,f,(Y=t.rowSelectionPropagation)==null?void 0:Y.descendants,(Z=t.rowSelectionPropagation)==null?void 0:Z.parents,u]),I=x.useCallback((ne,le=!0,de=!1)=>{var xe,Re,he,Pe,ve,Ie;if(n.debug("Setting selection for several rows"),t.rowSelection===!1)return;const oe=new Set;for(let te=0;te<ne.length;te+=1){const Te=ne[te];e.current.isRowSelectable(Te)&&oe.add(Te)}const ue=Al(e);let pe;if(de){if(pe={type:"include",ids:oe},le){const te=Jd(pe);if(o){const Te=De=>{te.select(De)};for(const De of oe)S0(e,f,De,((xe=t.rowSelectionPropagation)==null?void 0:xe.descendants)??!1,((Re=t.rowSelectionPropagation)==null?void 0:Re.parents)??!1,Te)}}else pe.ids=new Set;if(ue.type===pe.type&&pe.ids.size===ue.ids.size&&Array.from(pe.ids).every(te=>ue.ids.has(te)))return}else{pe={type:ue.type,ids:new Set(ue.ids)};const te=Jd(pe),Te=Ve=>{te.select(Ve)},De=Ve=>{te.unselect(Ve)};for(const Ve of oe)le?(te.select(Ve),o&&S0(e,f,Ve,((he=t.rowSelectionPropagation)==null?void 0:he.descendants)??!1,((Pe=t.rowSelectionPropagation)==null?void 0:Pe.parents)??!1,Te)):(De(Ve),o&&AJ(e,f,Ve,((ve=t.rowSelectionPropagation)==null?void 0:ve.descendants)??!1,((Ie=t.rowSelectionPropagation)==null?void 0:Ie.parents)??!1,De))}(pe.type==="include"&&pe.ids.size<2||u)&&e.current.setRowSelectionModel(pe)},[n,o,u,e,f,(ie=t.rowSelectionPropagation)==null?void 0:ie.descendants,(se=t.rowSelectionPropagation)==null?void 0:se.parents,t.rowSelection]),O=x.useCallback(ne=>{var ue,pe;if(!h||!o||ne.ids.size===0&&ne.type==="include")return ne;const le={type:ne.type,ids:new Set(ne.ids)},de=Jd(le),oe=Ee=>{de.select(Ee)};for(const Ee of ne.ids)S0(e,f,Ee,((ue=t.rowSelectionPropagation)==null?void 0:ue.descendants)??!1,((pe=t.rowSelectionPropagation)==null?void 0:pe.parents)??!1,oe,de);return le},[e,f,(ce=t.rowSelectionPropagation)==null?void 0:ce.descendants,(ye=t.rowSelectionPropagation)==null?void 0:ye.parents,h,o]),P=x.useCallback(({startId:ne,endId:le},de=!0,oe=!1)=>{if(!e.current.getRow(ne)||!e.current.getRow(le))return;n.debug(`Expanding selection from row ${ne} to row ${le}`);const ue=Hg(e),pe=ue.indexOf(ne),Ee=ue.indexOf(le),[xe,Re]=pe>Ee?[Ee,pe]:[pe,Ee],he=ue.slice(xe,Re+1);e.current.selectRows(he,de,oe)},[e,n]),R={selectRow:E,setRowSelectionModel:y,getSelectedRows:C,isRowSelected:v,isRowSelectable:w},D={selectRows:I,selectRowRange:P,getPropagatedRowSelectionModel:O};yn(e,R,"public"),yn(e,D,t.signature===Vl.DataGrid?"private":"public");const M=x.useRef(!0),A=x.useCallback((ne=!1)=>{var he,Pe;if(M.current)return;const le=Al(e),de=Us(e),oe=Uv(e),ue=ve=>t.filterMode==="server"?!de[ve]:!de[ve]||oe[ve]===!1,pe={type:le.type,ids:new Set(le.ids)},Ee=Jd(pe);let xe=!1;for(const ve of le.ids){if(ue(ve)){if(t.keepNonExistentRowsSelected)continue;Ee.unselect(ve),xe=!0;continue}if(!((he=t.rowSelectionPropagation)!=null&&he.parents))continue;const Ie=f[ve];if((Ie==null?void 0:Ie.type)==="group"){if(Ie.isAutoGenerated){Ee.unselect(ve),xe=!0;continue}Ie.children.every(Te=>oe[Te]===!1)||(Ee.unselect(ve),xe=!0)}}const Re=h&&((Pe=t.rowSelectionPropagation)==null?void 0:Pe.parents)&&(pe.ids.size>0||pe.type==="exclude");if(xe||Re&&!ne)if(Re)if(pe.type==="exclude"){const ve=g(),Ie=[];for(let te=0;te<ve.length;te+=1){const Te=ve[te];(t.keepNonExistentRowsSelected||!ue(Te))&&Ee.has(Te)&&Ie.push(Te)}e.current.selectRows(Ie,!0,!0)}else e.current.selectRows(Array.from(pe.ids),!0,!0);else e.current.setRowSelectionModel(pe)},[e,h,(Se=t.rowSelectionPropagation)==null?void 0:Se.parents,t.keepNonExistentRowsSelected,t.filterMode,f,g]),_=x.useCallback((ne,le)=>{const de=le.metaKey||le.ctrlKey,oe=!s&&!de&&!kgt(le),ue=!u||oe,pe=e.current.isRowSelected(ne),Re=UP(e)>1&&ue||!pe;e.current.selectRow(ne,Re,ue)},[e,u,s]),N=x.useCallback((ne,le)=>{var ue;if(l)return;const de=(ue=le.target.closest(`.${ee.cell}`))==null?void 0:ue.getAttribute("data-field");if(de===Gv.field||de===zP)return;if(de){const pe=e.current.getColumn(de);if((pe==null?void 0:pe.type)===jP)return}Cc(e,ne.id).type!=="pinnedRow"&&(le.shiftKey&&u?m(ne.id):_(ne.id,le))},[l,u,e,m,_]),B=x.useCallback((ne,le)=>{var de;u&&le.shiftKey&&((de=window.getSelection())==null||de.removeAllRanges())},[u]),H=x.useCallback((ne,le)=>{u&&le.nativeEvent.shiftKey?m(ne.id):e.current.selectRow(ne.id,ne.value,!u)},[e,m,u]),j=x.useCallback(ne=>{const le=jo(e),de=vfe(e),oe=le.items.length>0||((de==null?void 0:de.length)||0)>0;!t.isRowSelectable&&!t.checkboxSelectionVisibleOnly&&o&&!oe?e.current.setRowSelectionModel({type:ne?"exclude":"include",ids:new Set}):e.current.selectRows(g(),ne)},[e,o,g,t.checkboxSelectionVisibleOnly,t.isRowSelectable]),L=x.useCallback(ne=>{j(ne.value)},[j]),V=x.useCallback((ne,le)=>{if(e.current.getCellMode(ne.id,ne.field)!==Qn.Edit&&!Jw(le)){if(IO(le.key)&&le.shiftKey){const de=va(e);if(de&&de.id!==ne.id){le.preventDefault();const oe=e.current.isRowSelected(de.id);if(!u){e.current.selectRow(de.id,!oe,!0);return}const ue=e.current.getRowIndexRelativeToVisibleRows(de.id),pe=e.current.getRowIndexRelativeToVisibleRows(ne.id);let Ee,xe;ue>pe?oe?(Ee=pe,xe=ue-1):(Ee=pe,xe=ue):oe?(Ee=ue+1,xe=pe):(Ee=ue,xe=pe);const Re=bf(e),he=[];for(let Pe=Ee;Pe<=xe;Pe+=1)he.push(Re.rows[Pe].id);e.current.selectRows(he,!oe);return}}if(le.key===" "&&le.shiftKey){le.preventDefault(),_(ne.id,le);return}String.fromCharCode(le.keyCode)==="A"&&(le.ctrlKey||le.metaKey)&&(le.preventDefault(),j(!0))}},[e,u,_,j]),W=Je(()=>{if(!t.rowSelection){e.current.setRowSelectionModel(hx);return}if(i===void 0)return;if(!o||!h||i.type==="include"&&i.ids.size===0){e.current.setRowSelectionModel(i);return}const ne=e.current.getPropagatedRowSelectionModel(i);if(ne.type!==i.type||ne.ids.size!==i.ids.size||!Array.from(i.ids).every(le=>ne.ids.has(le))){e.current.setRowSelectionModel(ne);return}e.current.setRowSelectionModel(i)});At(e,"sortedRowsSet",r(()=>A(!0))),At(e,"filteredRowsSet",r(()=>A())),At(e,"rowClick",r(N)),At(e,"rowSelectionCheckboxChange",r(H)),At(e,"headerSelectionCheckboxChange",L),At(e,"cellMouseDown",r(B)),At(e,"cellKeyDown",r(V)),x.useEffect(()=>{W()},[e,i,t.rowSelection,W]);const K=i!=null;x.useEffect(()=>{if(K||!t.rowSelection||typeof w!="function")return;const ne=Al(e);if(ne.type!=="include")return;const le=new Set;for(const de of ne.ids)w(de)&&le.add(de);le.size<ne.ids.size&&e.current.setRowSelectionModel({type:ne.type,ids:le})},[e,w,K,t.rowSelection]),x.useEffect(()=>{if(!t.rowSelection||K)return;const ne=Al(e);!u&&(ne.type==="include"&&ne.ids.size>1||ne.type==="exclude")&&e.current.setRowSelectionModel(hx)},[e,u,s,K,t.rowSelection]),x.useEffect(()=>{r(A)},[A,r]),x.useEffect(()=>{M.current&&(M.current=!1)},[])},s0t=e=>{const{classes:t}=e;return x.useMemo(()=>Me({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},Cn,t),[t])},l0t=(e,t)=>{const n={classes:t.classes},r=s0t(n),o=x.useCallback(i=>{const a=z({},Gv,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[wu]!=null;return s&&!l?(i.lookup[wu]=a,i.orderedFields=[wu,...i.orderedFields]):!s&&l?(delete i.lookup[wu],i.orderedFields=i.orderedFields.filter(c=>c!==wu)):s&&l&&(i.lookup[wu]=z({},a,i.lookup[wu])),i},[e,r,t.checkboxSelection]);Hr(e,"hydrateColumns",o)},c0t=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return z({},e,{sorting:{sortModel:Jde(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},u0t=(e,t)=>{var O,P;const n=Qo(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Ns,changeEvent:"sortModelChange"});const r=x.useCallback((R,D)=>{const M=Ns(e),A=M.findIndex(N=>N.field===R);let _=[...M];return A>-1?(D==null?void 0:D.sort)==null?_.splice(A,1):_.splice(A,1,D):_=[...M,D],_},[e]),o=x.useCallback((R,D)=>{const A=Ns(e).find(_=>_.field===R.field);if(A){const _=D===void 0?bJ(R.sortingOrder??t.sortingOrder,A.sort):D;return _===void 0?void 0:z({},A,{sort:_})}return{field:R.field,sort:D===void 0?bJ(R.sortingOrder??t.sortingOrder):D}},[e,t.sortingOrder]),i=x.useCallback((R,D)=>D==null||D.sortable===!1||t.disableColumnSorting?R:(D.sortingOrder||t.sortingOrder).some(A=>!!A)?[...R,"columnMenuSortItem"]:R,[t.sortingOrder,t.disableColumnSorting]),a=x.useCallback(()=>{e.current.setState(R=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),z({},R,{sorting:z({},R.sorting,{sortedRows:KV(Si(e),ii,!1)})});const D=Ns(e),M=ydt(D,e),A=e.current.applyStrategyProcessor("sorting",{sortRowList:M});return z({},R,{sorting:z({},R.sorting,{sortedRows:A})})}),e.current.publishEvent("sortedRowsSet")},[e,n,t.sortingMode]),s=x.useCallback(R=>{Ns(e)!==R&&(n.debug("Setting sort model"),e.current.setState(vJ(R,t.disableMultipleColumnsSorting)),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=x.useCallback((R,D,M)=>{const A=e.current.getColumn(R),_=o(A,D);let N;!M||t.disableMultipleColumnsSorting?N=(_==null?void 0:_.sort)==null?[]:[_]:N=r(A.field,_),e.current.setSortModel(N)},[e,r,o,t.disableMultipleColumnsSorting]),c=x.useCallback(()=>Ns(e),[e]),u=x.useCallback(()=>YV(e).map(D=>D.model),[e]),f=x.useCallback(()=>Hv(e),[e]),h=x.useCallback(R=>e.current.getSortedRowIds()[R],[e]);yn(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:f,getRowIdFromRowIndex:h,setSortModel:s,sortColumn:l,applySorting:a},"public");const g=x.useCallback((R,D)=>{var _,N;const M=Ns(e);return!D.exportOnlyDirtyModels||t.sortModel!=null||((N=(_=t.initialState)==null?void 0:_.sorting)==null?void 0:N.sortModel)!=null||M.length>0?z({},R,{sorting:{sortModel:M}}):R},[e,t.sortModel,(P=(O=t.initialState)==null?void 0:O.sorting)==null?void 0:P.sortModel]),y=x.useCallback((R,D)=>{var A;const M=(A=D.stateToRestore.sorting)==null?void 0:A.sortModel;return M==null?R:(e.current.setState(vJ(M,t.disableMultipleColumnsSorting)),z({},R,{callbacks:[...R.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=x.useCallback(R=>{const D=Si(e),M=D[ii],A=R.sortRowList?R.sortRowList(M.children.map(_=>D[_])):[...M.children];return M.footerId!=null&&A.push(M.footerId),A},[e]);Hr(e,"exportState",g),Hr(e,"restoreState",y),kS(e,kh,"sorting",v);const w=x.useCallback(({field:R,colDef:D},M)=>{if(!D.sortable||t.disableColumnSorting)return;const A=M.shiftKey||M.metaKey||M.ctrlKey;l(R,void 0,A)},[l,t.disableColumnSorting]),C=x.useCallback(({field:R,colDef:D},M)=>{!D.sortable||t.disableColumnSorting||M.key==="Enter"&&!M.ctrlKey&&!M.metaKey&&l(R,void 0,M.shiftKey)},[l,t.disableColumnSorting]),E=x.useCallback(()=>{const R=Ns(e),D=ld(e);if(R.length>0){const M=R.filter(A=>D[A.field]);M.length<R.length&&e.current.setSortModel(M)}},[e]),I=x.useCallback(R=>{R==="sorting"&&e.current.applySorting()},[e]);Hr(e,"columnMenu",i),At(e,"columnHeaderClick",w),At(e,"columnHeaderKeyDown",C),At(e,"rowsSet",e.current.applySorting),At(e,"columnsChange",E),At(e,"activeStrategyProcessorChange",I),Yw(()=>{e.current.applySorting()}),In(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function dZ(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o<n)return o}const d0t=(e,t)=>{const n=vr(),r=Qo(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Ge(e,Qf),s=x.useCallback(f=>{var w;const h=dr(e),m=Hw(e),g=t.listView?[Xy(e)]:Yr(e);if(!(f.rowIndex==null)&&m===0||g.length===0)return!1;r.debug(`Scrolling to cell at row ${f.rowIndex}, col: ${f.colIndex} `);let v={};if(f.colIndex!==void 0){const C=Yf(e);let E;if(typeof f.rowIndex<"u"){const I=(w=a[f.rowIndex])==null?void 0:w.id,O=e.current.unstable_getCellColSpanInfo(I,f.colIndex);O&&!O.spannedByColSpan&&(E=O.cellProps.width)}typeof E>"u"&&(E=g[f.colIndex].computedWidth),v.left=dZ({containerSize:h.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:E,elementOffset:C[f.colIndex]})}if(f.rowIndex!==void 0){const C=Qw(e),E=_ft(e),I=Mfe(e),O=t.pagination?f.rowIndex-E*I:f.rowIndex,P=C.positions[O+1]?C.positions[O+1]-C.positions[O]:C.currentPageTotalHeight-C.positions[O];v.top=dZ({containerSize:h.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:P,elementOffset:C.positions[O]})}return v=e.current.unstable_applyPipeProcessors("scrollToIndexes",v,f),typeof v.left!==void 0||typeof v.top!==void 0?(e.current.scroll(v),!0):!1},[r,e,i,t.pagination,a,t.listView]),l=x.useCallback(f=>{if(i.current&&f.left!==void 0&&o.current){const h=n?-1:1;o.current.scrollLeft=f.left,i.current.scrollLeft=h*f.left,r.debug(`Scrolling left: ${f.left}`)}i.current&&f.top!==void 0&&(i.current.scrollTop=f.top,r.debug(`Scrolling top: ${f.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=x.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);yn(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function f0t(e,t){sr(e,"columnHeaderClick",t.onColumnHeaderClick),sr(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),sr(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),sr(e,"columnHeaderOver",t.onColumnHeaderOver),sr(e,"columnHeaderOut",t.onColumnHeaderOut),sr(e,"columnHeaderEnter",t.onColumnHeaderEnter),sr(e,"columnHeaderLeave",t.onColumnHeaderLeave),sr(e,"cellClick",t.onCellClick),sr(e,"cellDoubleClick",t.onCellDoubleClick),sr(e,"cellKeyDown",t.onCellKeyDown),sr(e,"preferencePanelClose",t.onPreferencePanelClose),sr(e,"preferencePanelOpen",t.onPreferencePanelOpen),sr(e,"menuOpen",t.onMenuOpen),sr(e,"menuClose",t.onMenuClose),sr(e,"rowDoubleClick",t.onRowDoubleClick),sr(e,"rowClick",t.onRowClick),sr(e,"stateChange",t.onStateChange)}function p0t(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const lj={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:zc.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1},fg={width:0,height:0},h0t={isReady:!1,root:fg,viewportOuterSize:fg,viewportInnerSize:fg,contentSize:fg,minimumSize:fg,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},m0t=(e,t,n)=>{const r=h0t,o=Fv(n);return z({},e,{dimensions:z({},r,gpe(t,n,o,Vv(n)))})},mpe=Pt(Yr,Yf,(e,t)=>{const n=e.length;return n===0?0:Og(t[n-1]+e[n-1].computedWidth,1)});function g0t(e,t){const n=Qo(e,"useResizeContainer"),r=x.useRef(!1),o=x.useRef(fg),i=Ge(e,Vv),a=Ge(e,Fv),s=Ge(e,mpe),l=x.useRef(!0),{rowHeight:c,headerHeight:u,groupHeaderHeight:f,headerFilterHeight:h,headersTotalHeight:m,leftPinnedWidth:g,rightPinnedWidth:y}=gpe(t,e,a,i),v=x.useCallback(()=>dr(e),[e]),w=x.useCallback(A=>{e.current.setState(_=>z({},_,{dimensions:A})),e.current.rootElementRef.current&&fZ(e.current.rootElementRef.current,dr(e))},[e]),C=x.useCallback(()=>{const A=dr(e);if(!A.isReady)return 0;const _=bf(e);if(t.getRowHeight){const B=Xw(e),H=B.lastRowIndex-B.firstRowIndex;return Math.min(H-1,_.rows.length)}const N=Math.floor(A.viewportInnerSize.height/c);return Math.min(N,_.rows.length)},[e,t.getRowHeight,c]),E=x.useCallback(()=>{var Z,ie;if(l.current)return;const A=y0t(e.current.mainElementRef.current,t.scrollbarSize),_=Qw(e),N=m+_.pinnedTopRowsTotalHeight,B=_.pinnedBottomRowsTotalHeight,H={width:s,height:Og(_.currentPageTotalHeight,1)};let j,L,V=!1,W=!1;if(t.autoHeight)W=!1,V=Math.round(s)>Math.round(o.current.width),j={width:o.current.width,height:N+B+H.height},L={width:Math.max(0,j.width-(W?A:0)),height:Math.max(0,j.height-(V?A:0))};else{j={width:o.current.width,height:o.current.height},L={width:Math.max(0,j.width),height:Math.max(0,j.height-N-B)};const se=H,ce=L,ye=se.width>ce.width,Se=se.height>ce.height;(ye||Se)&&(W=Se,V=se.width+(W?A:0)>ce.width,V&&(W=se.height+A>ce.height)),W&&(L.width-=A),V&&(L.height-=A)}const K=Math.max(j.width,s+(W?A:0)),G={width:s,height:N+H.height+B},q={isReady:!0,root:o.current,viewportOuterSize:j,viewportInnerSize:L,contentSize:H,minimumSize:G,hasScrollX:V,hasScrollY:W,scrollbarSize:A,headerHeight:u,groupHeaderHeight:f,headerFilterHeight:h,rowWidth:K,rowHeight:c,columnsTotalWidth:s,leftPinnedWidth:g,rightPinnedWidth:y,headersTotalHeight:m,topContainerHeight:N,bottomContainerHeight:B},Y=e.current.state.dimensions;Js(Y,q)||(w(q),v0t(q.viewportInnerSize,Y.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",q.viewportInnerSize),(ie=(Z=e.current).updateRenderContext)==null||ie.call(Z))},[e,w,t.scrollbarSize,t.autoHeight,c,u,f,h,s,m,g,y]),I=Je(E),O=x.useMemo(()=>t.resizeThrottleMs>0?p0t(()=>{I(),e.current.publishEvent("debouncedResize",o.current)},t.resizeThrottleMs):void 0,[e,t.resizeThrottleMs,I]);x.useEffect(()=>O==null?void 0:O.clear,[O]);const P={getRootDimensions:v},R={updateDimensions:E,getViewportPageSize:C};In(E,[E]),yn(e,P,"public"),yn(e,R,"private");const D=x.useCallback(A=>{fZ(A,dr(e))},[e]),M=x.useCallback(A=>{if(o.current=A,A.height===0&&!r.current&&!t.autoHeight&&!TO&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
-`)),r.current=!0),A.width===0&&!r.current&&!TO&&(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
-`)),r.current=!0),l.current||!O){l.current=!1,E();return}O()},[E,t.autoHeight,O,n]);sr(e,"rootMount",D),sr(e,"resize",M),sr(e,"debouncedResize",t.onResize)}function fZ(e,t){const n=(r,o)=>e.style.setProperty(r,o);n("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),n("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),n("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),n("--DataGrid-rowWidth",`${t.rowWidth}px`),n("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),n("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),n("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),n("--DataGrid-headerHeight",`${t.headerHeight}px`),n("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),n("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),n("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),n("--height",`${t.rowHeight}px`)}function gpe(e,t,n,r){const o=hfe(e.rowHeight,lj.rowHeight);return{rowHeight:Math.floor(o*n),headerHeight:Math.floor(e.columnHeaderHeight*n),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n),columnsTotalWidth:mpe(t),headersTotalHeight:rH(t,e),leftPinnedWidth:r.left.reduce((i,a)=>i+a.computedWidth,0),rightPinnedWidth:r.right.reduce((i,a)=>i+a.computedWidth,0)}}const pZ=new WeakMap;function y0t(e,t){if(t!==void 0)return t;if(e===null)return 0;const n=pZ.get(e);if(n!==void 0)return n;const o=Mr(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),pZ.set(e,i),i}function v0t(e,t){return e.width===t.width&&e.height===t.height}const b0t=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},x0t=(e,t,n)=>{n.current.caches.rowsMeta={heights:new Map};const r=VV(n),o=Hw(n),i=Gw(n),a=Math.min(i.enabled?i.paginationModel.pageSize:o,o);return z({},e,{rowsMeta:{currentPageTotalHeight:a*r,positions:Array.from({length:a},(s,l)=>l*r),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})},S0t=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=x.useRef(-1),s=x.useRef(!1),l=x.useRef(!1),c=Ge(e,Fv),u=oH(e),f=Ge(e,Bv),h=Ge(e,VV),m=A=>{let _=i.get(A);return _===void 0&&(_={content:h,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(A,_)),_},g=x.useCallback(A=>{const _=dr(e).rowHeight,N=e.current.getRowHeightEntry(A.id);if(!n)N.content=_,N.needsFirstMeasurement=!1;else{const B=n(z({},A,{densityFactor:c}));if(B==="auto"){if(N.needsFirstMeasurement){const H=o?o(z({},A,{densityFactor:c})):_;N.content=H??_}s.current=!0,N.autoHeight=!0}else N.content=hfe(B,_),N.needsFirstMeasurement=!1,N.autoHeight=!1}if(r){const B=e.current.getRowIndexRelativeToVisibleRows(A.id),H=r(z({},A,{isFirstVisible:B===0,isLastVisible:B===u.rows.length-1,indexRelativeToCurrentPage:B}));N.spacingTop=H.top??0,N.spacingBottom=H.bottom??0}else N.spacingTop=0,N.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",N,A),N},[e,u.rows,n,o,h,r,c]),y=x.useCallback(()=>{s.current=!1;const A=f.top.reduce((L,V)=>{const W=g(V);return L+W.content+W.spacingTop+W.spacingBottom+W.detail},0),_=f.bottom.reduce((L,V)=>{const W=g(V);return L+W.content+W.spacingTop+W.spacingBottom+W.detail},0),N=[],B=u.rows.reduce((L,V)=>{N.push(L);const W=g(V),K=W.content+W.spacingTop+W.spacingBottom+W.detail;return L+K},0);s.current||(a.current=1/0);const H=A!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||_!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||B!==e.current.state.rowsMeta.currentPageTotalHeight,j={currentPageTotalHeight:B,positions:N,pinnedTopRowsTotalHeight:A,pinnedBottomRowsTotalHeight:_};e.current.setState(L=>z({},L,{rowsMeta:j})),H&&e.current.updateDimensions(),l.current=!0},[e,f,u.rows,g]),v=A=>{var _;return((_=i.get(A))==null?void 0:_.content)??h},w=(A,_)=>{const N=e.current.getRowHeightEntry(A),B=N.content!==_;N.needsFirstMeasurement=!1,N.content=_,l.current&&(l.current=!B)},C=A=>{var _;return((_=i.get(A))==null?void 0:_.autoHeight)??!1},E=()=>a.current,I=A=>{s.current&&A>a.current&&(a.current=A)},O=()=>{i.clear(),y()},P=Xl(()=>new b0t(A=>{var _;for(let N=0;N<A.length;N+=1){const B=A[N],H=B.borderBoxSize&&B.borderBoxSize.length>0?B.borderBoxSize[0].blockSize:B.contentRect.height,j=B.target.__mui_id;if(((_=Hfe(e))==null?void 0:_.id)===j&&H===0)return;e.current.unstable_storeRowHeightMeasurement(j,H)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,R=(A,_)=>(A.__mui_id=_,P.observe(A),()=>P.unobserve(A));dH(e,"rowHeight",y),In(()=>{y()},[y]);const D={unstable_getRowHeight:v,unstable_setLastMeasuredRowIndex:I,unstable_storeRowHeightMeasurement:w,resetRowHeights:O},M={hydrateRowsMeta:y,observeRowHeight:R,rowHasAutoHeight:C,getRowHeightEntry:m,getLastMeasuredRowIndex:E};yn(e,D,"public"),yn(e,M,"private")},w0t=e=>{const t=x.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=x.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()})},[e]);yn(e,{exportState:t,restoreState:n},"public")},C0t=e=>{const t=x.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=x.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let f=l;f<c;f+=1){const h=E0t({apiRef:e,lookup:t.current,columnIndex:f,rowId:s,minFirstColumnIndex:l,maxLastColumnIndex:c,columns:u});h.colSpan>1&&(f+=h.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};yn(e,i,"public"),yn(e,a,"private"),At(e,"columnOrderChange",r)};function E0t(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),f=t.current.getRowValue(u,c),h=typeof c.colSpan=="function"?c.colSpan(f,u,c,t):c.colSpan;if(!h||h===1)return C$(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let m=c.computedWidth;for(let g=1;g<h;g+=1){const y=r+g;if(y>=i&&y<a){const v=s[y];m+=v.computedWidth,C$(n,o,r+g,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(r+h,l-1),leftVisibleCellIndex:r})}C$(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:h,width:m}})}return{colSpan:h}}function C$(e,t,n,r){e[t]||(e[t]={}),e[t][n]=r}const ype=(e,t,n)=>{if(rfe(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(`
-`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{ype(i,[...t,r],n)})},cj=e=>{if(!e)return{};const t={};return e.forEach(n=>{ype(n,[],t)}),t},uj=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>Js(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l<i;l+=1){const c=e.reduce((u,f)=>{const h=r(f)[l]??null;if(u.length===0)return[{columnFields:[f],groupId:h}];const m=u[u.length-1],g=m.columnFields[m.columnFields.length-1];return m.groupId!==h||!a(g,f,l)||s(g,f)?[...u,{columnFields:[f],groupId:h}]:[...u.slice(0,u.length-1),{columnFields:[...m.columnFields,f],groupId:h}]},[]);o.push(c)}return o},T0t=["groupId","children"],fH=e=>{let t={};return e.forEach(n=>{if(rfe(n))return;const{groupId:r,children:o}=n,i=$e(n,T0t);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=z({},i,{groupId:r}),s=fH(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=z({},t,s,{[r]:a})}),z({},t)},O0t=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=Rc(n),o=zv(n),i=fH(t.columnGroupingModel??[]),a=cj(t.columnGroupingModel??[]),s=uj(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return z({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},I0t=(e,t)=>{const n=x.useCallback(s=>Nfe(e)[s]??[],[e]),r=x.useCallback(()=>Lfe(e),[e]);yn(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=x.useCallback(()=>{const s=cj(t.columnGroupingModel??[]);e.current.setState(l=>{var h;const c=((h=l.columns)==null?void 0:h.orderedFields)??[],u=l.pinnedColumns??{},f=uj(c,s,u);return z({},l,{columnGrouping:z({},l.columnGrouping,{headerStructure:f})})})},[e,t.columnGroupingModel]),a=x.useCallback(s=>{var y,v;const l=((v=(y=e.current).getPinnedColumns)==null?void 0:v.call(y))??{},c=Rc(e),u=zv(e),f=fH(s??[]),h=cj(s??[]),m=uj(c,h,l),g=u.length===0?0:Math.max(...u.map(w=>{var C;return((C=h[w])==null?void 0:C.length)??0}));e.current.setState(w=>z({},w,{columnGrouping:{lookup:f,unwrappedGroupingModel:h,headerStructure:m,maxDepth:g}}))},[e]);At(e,"columnIndexChange",i),At(e,"columnsChange",()=>{a(t.columnGroupingModel)}),At(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),x.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function P0t(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function hZ(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;n<e.changedTouches.length;n+=1){const r=e.changedTouches[n];if(r.identifier===t)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function mZ(e,t,n,r){let o=e;return r==="Right"?o+=t-n.left:o+=n.right-t,o}function A0t(e,t,n){return n==="Left"?e-t.left:t.right-e}function M0t(e){return e==="Right"?"Left":"Right"}function R0t(e,t){const n=e.classList.contains(ee["columnSeparator--sideRight"])?"Right":"Left";return t?M0t(n):n}function gZ(e){e.preventDefault(),e.stopImmediatePropagation()}function D0t(e){const t=x.useRef(void 0),n=()=>zfe(e),r=Ge(e,n);return x.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=P0t()}return t.current}}function k0t(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s<o+a)}function _0t(e,t,n){const r={},o=e.current.rootElementRef.current;return o.classList.add(ee.autosizing),n.forEach(i=>{const s=Hmt(e.current,i.field).map(g=>g.getBoundingClientRect().width??0),l=t.includeOutliers?s:k0t(s,t.outliersFactor);if(t.includeHeaders){const g=Vmt(e.current,i.field);if(g){const y=g.querySelector(`.${ee.columnHeaderTitle}`),v=g.querySelector(`.${ee.columnHeaderTitleContainerContent}`),w=g.querySelector(`.${ee.iconButtonContainer}`),C=g.querySelector(`.${ee.menuIcon}`),E=y??v,I=window.getComputedStyle(g,null),O=parseInt(I.paddingLeft,10)+parseInt(I.paddingRight,10),R=E.scrollWidth+1+O+((w==null?void 0:w.clientWidth)??0)+((C==null?void 0:C.clientWidth)??0);l.push(R)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,f=c?i.minWidth:0,h=u?i.maxWidth:1/0,m=l.length===0?0:Math.max(...l);r[i.field]=Za(m,f,h)}),o.classList.remove(ee.autosizing),r}const $0t=e=>z({},e,{columnResize:{resizingColumnField:""}});function N0t(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const L0t=(e,t)=>{const n=vr(),r=Qo(e,"useGridColumnResize"),o=Xl(N0t).current,i=x.useRef(null),a=x.useRef(null),s=ko(),l=x.useRef(void 0),c=M=>{var j,L;r.debug(`Updating width to ${M} for col ${o.colDef.field}`);const A=o.columnHeaderElement.offsetWidth,_=M-A,N=M-o.initialColWidth;if(N>0){const V=o.initialTotalWidth+N;(L=(j=e.current.rootElementRef)==null?void 0:j.current)==null||L.style.setProperty("--DataGrid-rowWidth",`${V}px`)}o.colDef.computedWidth=M,o.colDef.width=M,o.colDef.flex=0,o.columnHeaderElement.style.width=`${M}px`;const B=o.headerFilterElement;B&&(B.style.width=`${M}px`),o.groupHeaderElements.forEach(V=>{const W=V;let K;W.getAttribute("aria-colspan")==="1"?K=`${M}px`:K=`${W.offsetWidth+_}px`,W.style.width=K}),o.cellElements.forEach(V=>{const W=V;let K;W.getAttribute("aria-colspan")==="1"?K=`${M}px`:K=`${W.offsetWidth+_}px`,W.style.setProperty("--width",K)});const H=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);H===qd.LEFT&&(ag(o.fillerLeft,"width",_),o.leftPinnedCellsAfter.forEach(V=>{ag(V,"left",_)}),o.leftPinnedHeadersAfter.forEach(V=>{ag(V,"left",_)})),H===qd.RIGHT&&(ag(o.fillerRight,"width",_),o.rightPinnedCellsBefore.forEach(V=>{ag(V,"right",_)}),o.rightPinnedHeadersBefore.forEach(V=>{ag(V,"right",_)}))},u=M=>{if(w(),o.previousMouseClickEvent){const A=o.previousMouseClickEvent,_=A.timeStamp,N=A.clientX,B=A.clientY;if(M.timeStamp-_<300&&M.clientX===N&&M.clientY===B){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,M);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const A=Hl(e);o.groupHeaderElements.forEach(_=>{const N=$mt(_),B=_,j=`${N.reduce((L,V)=>A.columnVisibilityModel[V]!==!1?L+A.lookup[V].computedWidth:L,0)}px`;B.style.width=j})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,M)})},f=(M,A,_)=>{var j;const N=e.current.rootElementRef.current;o.initialColWidth=M.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=M,o.columnHeaderElement=_mt(e.current.columnHeadersContainerRef.current,M.field);const B=N.querySelector(`.${ee.headerFilterRow} [data-field="${cd(M.field)}"]`);B&&(o.headerFilterElement=B),o.groupHeaderElements=Nmt((j=e.current.columnHeadersContainerRef)==null?void 0:j.current,M.field),o.cellElements=Lmt(o.columnHeaderElement,e.current),o.fillerLeft=VJ(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=VJ(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const H=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=H!==qd.LEFT?[]:Fmt(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=H!==qd.RIGHT?[]:jmt(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=H!==qd.LEFT?[]:Bmt(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=H!==qd.RIGHT?[]:zmt(e.current,o.columnHeaderElement,n),a.current=R0t(A,n),i.current=A0t(_,o.columnHeaderElement.getBoundingClientRect(),a.current)},h=Je(u),m=Je(M=>{if(M.buttons===0){h(M);return}let A=mZ(i.current,M.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);A=Za(A,o.colDef.minWidth,o.colDef.maxWidth),c(A);const _={element:o.columnHeaderElement,colDef:o.colDef,width:A};e.current.publishEvent("columnResize",_,M)}),g=Je(M=>{hZ(M,l.current)&&u(M)}),y=Je(M=>{const A=hZ(M,l.current);if(!A)return;if(M.type==="mousemove"&&M.buttons===0){g(M);return}let _=mZ(i.current,A.x,o.columnHeaderElement.getBoundingClientRect(),a.current);_=Za(_,o.colDef.minWidth,o.colDef.maxWidth),c(_);const N={element:o.columnHeaderElement,colDef:o.colDef,width:_};e.current.publishEvent("columnResize",N,M)}),v=Je(M=>{const A=OO(M.target,ee["columnSeparator--resizable"]);if(!A)return;const _=M.changedTouches[0];_!=null&&(l.current=_.identifier);const N=OO(M.target,ee.columnHeader),B=kmt(N),H=e.current.getColumn(B);r.debug(`Start Resize on col ${H.field}`),e.current.publishEvent("columnResizeStart",{field:B},M),f(H,A,_.clientX);const j=Mr(M.currentTarget);j.addEventListener("touchmove",y),j.addEventListener("touchend",g)}),w=x.useCallback(()=>{const M=Mr(e.current.rootElementRef.current);M.body.style.removeProperty("cursor"),M.removeEventListener("mousemove",m),M.removeEventListener("mouseup",h),M.removeEventListener("touchmove",y),M.removeEventListener("touchend",g),setTimeout(()=>{M.removeEventListener("click",gZ,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,m,h,y,g]),C=x.useCallback(({field:M})=>{e.current.setState(A=>z({},A,{columnResize:z({},A.columnResize,{resizingColumnField:M})}))},[e]),E=x.useCallback(()=>{e.current.setState(M=>z({},M,{columnResize:z({},M.columnResize,{resizingColumnField:""})}))},[e]),I=Je(({colDef:M},A)=>{if(A.button!==0||!A.currentTarget.classList.contains(ee["columnSeparator--resizable"]))return;A.preventDefault(),r.debug(`Start Resize on col ${M.field}`),e.current.publishEvent("columnResizeStart",{field:M.field},A),f(M,A.currentTarget,A.clientX);const _=Mr(e.current.rootElementRef.current);_.body.style.cursor="col-resize",o.previousMouseClickEvent=A.nativeEvent,_.addEventListener("mousemove",m),_.addEventListener("mouseup",h),_.addEventListener("click",gZ,!0)}),O=Je((M,A)=>{if(t.disableAutosize||A.button!==0)return;const _=e.current.state.columns.lookup[M.field];_.resizable!==!1&&e.current.autosizeColumns(z({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[_.field]}))}),P=D0t(e),R=x.useRef(!1),D=x.useCallback(async M=>{var H;if(!((H=e.current.rootElementRef)==null?void 0:H.current)||R.current)return;R.current=!0;const _=Hl(e),N=z({},yht,M,{columns:(M==null?void 0:M.columns)??_.orderedFields});N.columns=N.columns.filter(j=>_.columnVisibilityModel[j]!==!1);const B=N.columns.map(j=>e.current.state.columns.lookup[j]);try{!t.disableVirtualization&&N.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await P());const j=_0t(e,N,B),L=B.map(V=>z({},V,{width:j[V.field],computedWidth:j[V.field],flex:0}));if(N.expand){const W=_.orderedFields.map(Y=>_.lookup[Y]).filter(Y=>_.columnVisibilityModel[Y.field]!==!1).reduce((Y,Z)=>Y+(j[Z.field]??Z.computedWidth??Z.width),0),q=e.current.getRootDimensions().viewportInnerSize.width-W;if(q>0){const Y=q/(L.length||1);L.forEach(Z=>{Z.width+=Y,Z.computedWidth+=Y})}}e.current.updateColumns(L),L.forEach((V,W)=>{if(V.width!==B[W].width){const K=V.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(V.field),colDef:V,width:K})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),R.current=!1}},[e,P,t.disableVirtualization]);x.useEffect(()=>w,[w]),Nj(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),Bfe(e,()=>{var M;return(M=e.current.columnHeadersContainerRef)==null?void 0:M.current},"touchstart",v,{passive:!0}),yn(e,{autosizeColumns:D},"public"),At(e,"columnResizeStop",E),At(e,"columnResizeStart",C),At(e,"columnSeparatorMouseDown",I),At(e,"columnSeparatorDoubleClick",O),sr(e,"columnResize",t.onColumnResize),sr(e,"columnWidthChange",t.onColumnWidthChange)};function ag(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function F0t(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex<t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?{firstRowIndex:e.firstRowIndex,lastRowIndex:t.firstRowIndex-1}:e}function yZ(e){return e.firstRowIndex!==0||e.lastRowIndex!==0}const E$=(e,t,n)=>{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},Ig={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},MO={firstRowIndex:0,lastRowIndex:0},j0t=new Set([wu,"__reorder__",zP]),vZ=20,vpe=(e,t,n,r,o,i,a)=>{const s=i?{}:z({},e.current.state.rowSpanning.spannedCells),l=i?{}:z({},e.current.state.rowSpanning.hiddenCells),c=i?{}:z({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=MO),t.forEach(u=>{var f;if(!j0t.has(u.field)){for(let h=o.firstRowIndex;h<o.lastRowIndex;h+=1){const m=n[h];if((f=l[m.id])!=null&&f[u.field])continue;const g=E$(m.model,u,e);if(g==null)continue;let y=m.id,v=h,w=0;const C=[];if(h===o.firstRowIndex){let I=h-1,O=n[I];for(;I>=r.firstRowIndex&&O&&E$(O.model,u,e)===g;){const P=n[I+1];l[P.id]?l[P.id][u.field]=!0:l[P.id]={[u.field]:!0},C.push(h),w+=1,y=O.id,v=I,I-=1,O=n[I]}}C.forEach(I=>{c[I]?c[I][u.field]=v:c[I]={[u.field]:v}});let E=h+1;for(;E<=r.lastRowIndex&&n[E]&&E$(n[E].model,u,e)===g;){const I=n[E];l[I.id]?l[I.id][u.field]=!0:l[I.id]={[u.field]:!0},c[E]?c[E][u.field]=v:c[E]={[u.field]:v},E+=1,w+=1}w>0&&(s[y]?s[y][u.field]=w+1:s[y]={[u.field]:w+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},bpe=(e,t)=>{const n=Gp(t).length;if(e.pagination){const r=Mfe(t);let o=vZ;return r>0&&(o=r-1),{firstRowIndex:0,lastRowIndex:Math.min(o,n)}}return{firstRowIndex:0,lastRowIndex:Math.min(vZ,n)}},B0t=(e,t,n)=>{var g;if(!t.rowSpanning)return z({},e,{rowSpanning:Ig});const r=e.rows.dataRowIds||[],o=e.columns.orderedFields||[],i=e.rows.dataRowIdToModelLookup,a=e.columns.lookup,s=!!e.filter.filterModel.items.length||!!((g=e.filter.filterModel.quickFilterValues)!=null&&g.length);if(!r.length||!o.length||!i||!a||s)return z({},e,{rowSpanning:Ig});const l=bpe(t,n),c=r.map(y=>({id:y,model:i[y]})),u=o.map(y=>a[y]),{spannedCells:f,hiddenCells:h,hiddenCellOriginMap:m}=vpe(n,u,c,l,l,!0,MO);return z({},e,{rowSpanning:{spannedCells:f,hiddenCells:h,hiddenCellOriginMap:m}})},z0t=(e,t)=>{const n=Xl(()=>e.current.state.rowSpanning!==Ig?bpe(t,e):MO),r=x.useCallback((i,a=!1)=>{const{range:s,rows:l}=bf(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(s===null||!yZ(i))return;a&&(n.current=MO);const c=F0t({firstRowIndex:i.firstRowIndex,lastRowIndex:Math.min(i.lastRowIndex,s.lastRowIndex+1)},n.current);if(c===null)return;const u=Yr(e),{spannedCells:f,hiddenCells:h,hiddenCellOriginMap:m,processedRange:g}=vpe(e,u,l,s,c,a,n.current);n.current=g;const y=Object.keys(f).length,v=Object.keys(h).length,w=Object.keys(e.current.state.rowSpanning.spannedCells).length,C=Object.keys(e.current.state.rowSpanning.hiddenCells).length;!(a||y!==w||v!==C)||y===0&&w===0||e.current.setState(O=>z({},O,{rowSpanning:{spannedCells:f,hiddenCells:h,hiddenCellOriginMap:m}}))},[e,n,t.pagination,t.paginationMode]),o=x.useCallback(()=>{const i=Xw(e);yZ(i)&&r(i,!0)},[e,r]);At(e,"renderedRowsIntervalChange",Xd(t.rowSpanning,r)),At(e,"sortedRowsSet",Xd(t.rowSpanning,o)),At(e,"paginationModelChange",Xd(t.rowSpanning,o)),At(e,"filteredRowsSet",Xd(t.rowSpanning,o)),At(e,"columnsChange",Xd(t.rowSpanning,o)),x.useEffect(()=>{t.rowSpanning?e.current.state.rowSpanning===Ig&&o():e.current.state.rowSpanning!==Ig&&e.current.setState(i=>z({},i,{rowSpanning:Ig}))},[e,o,t.rowSpanning])},V0t=(e,t,n)=>z({},e,{listViewColumn:t.listViewColumn?z({},t.listViewColumn,{computedWidth:dj(n)}):void 0});function H0t(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?z({},i,{listViewColumn:z({},i.listViewColumn,{computedWidth:dj(e)})}):i)},r=x.useRef(null);At(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),At(e,"columnVisibilityModelChange",n),In(()=>{const i=t.listViewColumn;i&&e.current.setState(a=>z({},a,{listViewColumn:z({},i,{computedWidth:dj(e)})}))},[e,t.listViewColumn]),x.useEffect(()=>{t.listView&&t.listViewColumn},[t.listView,t.listViewColumn])}function dj(e){return dr(e).viewportInnerSize.width}const U0t=Pt(jo,Ns,ri,(e,t,n)=>({groupKeys:[],paginationModel:n,sortModel:t,filterModel:e,start:n.page*n.pageSize,end:n.page*n.pageSize+n.pageSize-1}));let T$=function(e){return e.Default="set-new-rows",e.LazyLoading="replace-row-range",e}({});class fj{constructor(t){this.chunkSize=void 0,this.getCacheKeys=n=>{if(this.chunkSize<1||typeof n.start!="number")return[n];const r=[];for(let o=n.start;o<n.end;o+=this.chunkSize){const i=Math.min(o+this.chunkSize-1,n.end);r.push(z({},n,{start:o,end:i}))}return r},this.splitResponse=(n,r)=>{const o=this.getCacheKeys(n),i=new Map;return o.forEach(a=>{var c,u,f,h;const s=a.end===n.end,l=z({},r,{pageInfo:z({},r.pageInfo,{hasNextPage:((c=r.pageInfo)==null?void 0:c.hasNextPage)!==void 0&&!s?!0:(u=r.pageInfo)==null?void 0:u.hasNextPage,nextCursor:((f=r.pageInfo)==null?void 0:f.nextCursor)!==void 0&&!s?r.rows[a.end+1].id:(h=r.pageInfo)==null?void 0:h.nextCursor}),rows:typeof a.start!="number"||typeof n.start!="number"?r.rows:r.rows.slice(a.start-n.start,a.end-n.start+1)});i.set(a,l)}),i},this.chunkSize=t}}fj.mergeResponses=e=>e.length===1?e[0]:e.reduce((t,n)=>({rows:[...t.rows,...n.rows],rowCount:n.rowCount,pageInfo:n.pageInfo}),{rows:[],rowCount:0,pageInfo:{}});const G0t={clear:()=>{},get:()=>{},set:()=>{}};function bZ(e,t={}){return e===null?G0t:e??new Sht(t)}const q0t=(e,t,n={})=>{var O,P;const r=x.useCallback(()=>{e.current.setStrategyAvailability(Zd.DataSource,T$.Default,t.dataSource?()=>!0:()=>!1)},[e,t.dataSource]),[o,i]=x.useState(!1),a=Ge(e,ri),s=x.useRef(0),l=t.onDataSourceError,c=Xl(()=>{const R=t.pageSizeOptions.map(M=>typeof M=="number"?M:M.value).sort((M,A)=>M-A),D=Math.min(a.pageSize,R[0]);return new fj(D)}).current,[u,f]=x.useState(()=>bZ(t.dataSourceCache,n.cacheOptions)),h=x.useCallback(async(R,D)=>{var H,j,L;const M=(H=t.dataSource)==null?void 0:H.getRows;if(!M)return;if(R&&R!==ii&&t.signature!=="DataGrid"){(j=n.fetchRowChildren)==null||j.call(n,[R]);return}(L=n.clearDataSourceState)==null||L.call(n);const A=z({},U0t(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),D),N=c.getCacheKeys(A).map(V=>u.get(V));if(N.every(V=>V!==void 0)){e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:fj.mergeResponses(N),fetchParams:A});return}(o||e.current.getRowsCount()===0)&&e.current.setLoading(!0);const B=s.current+1;s.current=B;try{const V=await M(A);c.splitResponse(A,V).forEach((K,G)=>u.set(G,K)),s.current===B&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:V,fetchParams:A})}catch(V){s.current===B&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:V,fetchParams:A}),typeof l=="function"&&l(new wht({message:V==null?void 0:V.message,params:A,cause:V})))}finally{o&&s.current===B&&e.current.setLoading(!1)}},[c,u,e,o,(O=t.dataSource)==null?void 0:O.getRows,l,n,t.signature]),m=x.useCallback(()=>{i(e.current.getActiveStrategy(Zd.DataSource)===T$.Default)},[e]),g=x.useCallback(R=>{if("error"in R){e.current.setRows([]);return}const{response:D}=R;D.rowCount!==void 0&&e.current.setRowCount(D.rowCount),e.current.setRows(D.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:R.fetchParams,response:D},!0)},[e]),y=(P=t.dataSource)==null?void 0:P.updateRow,v=n.handleEditRow,w=x.useCallback(async R=>{if(y)try{const D=await y(R);return typeof v=="function"?(v(R,D),D):(e.current.updateNestedRows([D],[]),D&&!Js(D,R.previousRow)&&e.current.dataSource.cache.clear(),D)}catch(D){throw typeof l=="function"&&l(new Cht({message:D==null?void 0:D.message,params:R,cause:D})),D}},[e,y,l,v]),C={dataSource:{fetchRows:h,cache:u,editRow:w}},E=x.useMemo(()=>$h(h,0),[h]),I=x.useRef(!0);return x.useEffect(()=>{if(I.current){I.current=!1;return}if(t.dataSourceCache===void 0)return;const R=bZ(t.dataSourceCache,n.cacheOptions);f(D=>D!==R?R:D)},[t.dataSourceCache,n.cacheOptions]),x.useEffect(()=>{t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows())},[e,t.dataSource]),{api:{public:C},debouncedFetchRows:E,strategyProcessor:{strategyName:T$.Default,group:"dataSourceRowsUpdate",processor:g},setStrategyAvailability:r,cacheChunkManager:c,cache:u,events:{strategyAvailabilityChange:m,sortModelChange:Xd(o,()=>E()),filterModelChange:Xd(o,()=>E()),paginationModelChange:Xd(o,()=>E())}}},W0t=(e,t)=>{const{api:n,strategyProcessor:r,events:o,setStrategyAvailability:i}=q0t(e,t);yn(e,n.public,"public"),kS(e,r.strategyName,r.group,r.processor),Object.entries(o).forEach(([a,s])=>{At(e,a,s)}),x.useEffect(()=>{i()},[i])},K0t=(e,t)=>{ubt(e,t),l0t(e,t),r0t(e),Lo(lbt,e,t),Lo(i0t,e,t),Lo(vbt,e,t),Lo(Jbt,e,t),Lo(Bbt,e,t),Lo(Qbt,e,t),Lo(kbt,e,t),Lo(c0t,e,t),Lo(Vbt,e,t),Lo(Abt,e,t),Lo(B0t,e,t),Lo(xbt,e,t),Lo($0t,e,t),Lo(gbt,e,t),Lo(O0t,e,t),Lo(Rpt,e,t),Lo(m0t,e,t),Lo(x0t,e,t),Lo(V0t,e,t),Lbt(e,t),a0t(e,t),bbt(e,t),Zbt(e,t),z0t(e,t),o0t(e,t),C0t(e),I0t(e,t),Xbt(e,t),_bt(e,t),Hbt(e,t),Dbt(e,t),u0t(e,t),Sbt(e,t),L0t(e,t),zbt(e,t),S0t(e,t),d0t(e,t),ybt(e),Cbt(e,t),Pbt(e,t),mbt(e,t),g0t(e,t),f0t(e,t),w0t(e),Dpt(e,t),H0t(e,t),W0t(e,t)},Y0t=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e,c={root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===On.LEFT&&"columnHeader--pinnedLeft",l===On.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Me(c,Cn,t)};function Q0t(e){var W;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:f,pinnedOffset:h}=e,m=yt(),g=vr(),y=x.useRef(null),v=tn(),w=Ge(v,Lfe),C=t?w[t]:{},{headerName:E=t??"",description:I="",headerAlign:O=void 0}=C;let P;const R=t&&((W=w[t])==null?void 0:W.renderHeaderGroup),D=x.useMemo(()=>({groupId:t,headerName:E,description:I,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,E,I,r,o,i,s,u]);t&&R&&(P=R(D));const M=z({},e,{classes:m.classes,headerAlign:O,depth:r,isDragging:!1}),A=E??t,_=bn(),N=t===null?`empty-group-cell-${_}`:t,B=Y0t(M);x.useLayoutEffect(()=>{if(l){const G=y.current.querySelector('[tabindex="0"]')||y.current;G==null||G.focus()}},[v,l]);const H=x.useCallback(K=>G=>{Jw(G)||v.current.publishEvent(K,D,G)},[v,D]),j=x.useMemo(()=>({onKeyDown:H("columnGroupHeaderKeyDown"),onFocus:H("columnGroupHeaderFocus"),onBlur:H("columnGroupHeaderBlur")}),[H]),L=typeof C.headerClassName=="function"?C.headerClassName(D):C.headerClassName,V=x.useMemo(()=>YP(z({},e.style),g,f,h),[f,h,e.style,g]);return k.jsx(ope,z({ref:y,classes:B,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:P,headerClassName:L,description:I,elementId:N,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:A,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:V},j))}const xZ=ae("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),X0t=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:h}=e,[m,g]=x.useState(""),[y,v]=x.useState(""),w=fs(),C=yt(),E=Ge(w,Nfe),I=Ge(w,Yf),O=Ge(w,Mpt),P=Ge(w,Vv),R=Ge(w,ld),D=Ufe(I,O,P.left.length),M=Ge(w,NP),A=Ge(w,qde),_=Ge(w,Vut),N=Ge(w,Hut),B=Ge(w,Wde),H=x.useCallback(ce=>v(ce.field),[]),j=x.useCallback(()=>v(""),[]),L=x.useCallback(ce=>g(ce.field),[]),V=x.useCallback(()=>g(""),[]),W=x.useMemo(()=>P.left.length?{firstColumnIndex:0,lastColumnIndex:P.left.length}:null,[P.left.length]),K=x.useMemo(()=>P.right.length?{firstColumnIndex:t.length-P.right.length,lastColumnIndex:t.length}:null,[P.right.length,t.length]);At(w,"columnResizeStart",H),At(w,"columnResizeStop",j),At(w,"columnHeaderDragStart",L),At(w,"columnHeaderDragEnd",V);const G=ce=>{const{renderContext:ye=O}=ce||{},Se=ye.firstColumnIndex,ne=ye.lastColumnIndex;return{renderedColumns:t.slice(Se,ne),firstColumnToRender:Se,lastColumnToRender:ne}},q=(ce,ye,Se,ne=!1)=>{const le=(ce==null?void 0:ce.position)===On.RIGHT,de=(ce==null?void 0:ce.position)===void 0,oe=P.right.length>0&&le||P.right.length===0&&de,ue=D-Se;return k.jsxs(x.Fragment,{children:[de&&k.jsx("div",{role:"presentation",style:{width:ue}}),ye,de&&k.jsx("div",{role:"presentation",className:fe(ee.filler,ne&&ee["filler--borderBottom"])}),oe&&k.jsx(uH,{header:!0,pinnedRight:le,borderBottom:ne,borderTop:!1})]})},Y=(ce,ye={})=>{const{renderedColumns:Se,firstColumnToRender:ne}=G(ce),le=[];for(let de=0;de<Se.length;de+=1){const oe=Se[de],ue=ne+de,pe=ue===0,Ee=o!==null&&o.field===oe.field||pe&&!h?0:-1,xe=a!==null&&a.field===oe.field,Re=c.open&&c.field===oe.field,he=ce==null?void 0:ce.position,Pe=px(he,oe.computedWidth,ue,I,M,B),ve=he===On.RIGHT?Se[de-1]:Se[de+1],Ie=ve?a!==null&&a.field===ve.field:!1,te=ue+1===I.length-P.right.length,Te=de,De=Se.length,Ve=AO(he,Te),We=PO(he,Te,De,C.showColumnVerticalBorder,A);le.push(k.jsx(ngt,z({},n[oe.field],{columnMenuOpen:Re,filterItemsCounter:r[oe.field]&&r[oe.field].length,headerHeight:_,isDragging:oe.field===m,colDef:oe,colIndex:ue,isResizing:y===oe.field,isLast:ue===I.length-1,hasFocus:xe,tabIndex:Ee,pinnedPosition:he,pinnedOffset:Pe,isLastUnpinned:te,isSiblingFocused:Ie,showLeftBorder:Ve,showRightBorder:We},ye),oe.field))}return q(ce,le,0)},Z=()=>k.jsxs(xZ,{role:"row","aria-rowindex":l+1,ownerState:C,className:ee["row--borderBottom"],style:{height:_},children:[W&&Y({position:On.LEFT,renderContext:W},{disableReorder:!0}),Y({renderContext:O}),K&&Y({position:On.RIGHT,renderContext:K},{disableReorder:!0,separatorSide:lH.Left})]}),ie=({depth:ce,params:ye})=>{var De,Ve;const Se=G(ye);if(Se.renderedColumns.length===0)return null;const{firstColumnToRender:ne,lastColumnToRender:le}=Se,de=f[ce],oe=t[ne].field,ue=((De=E[oe])==null?void 0:De[ce])??null,pe=de.findIndex(({groupId:We,columnFields:rt})=>We===ue&&rt.includes(oe)),Ee=t[le-1].field,xe=((Ve=E[Ee])==null?void 0:Ve[ce])??null,Re=de.findIndex(({groupId:We,columnFields:rt})=>We===xe&&rt.includes(Ee)),he=de.slice(pe,Re+1).map(We=>z({},We,{columnFields:We.columnFields.filter(rt=>u[rt]!==!1)})).filter(We=>We.columnFields.length>0),Pe=he[0].columnFields.indexOf(oe),Ie=he[0].columnFields.slice(0,Pe).reduce((We,rt)=>{const ut=R[rt];return We+(ut.computedWidth??0)},0);let te=ne;const Te=he.map(({groupId:We,columnFields:rt},ut)=>{const Be=s!==null&&s.depth===ce&&rt.includes(s.field),et=i!==null&&i.depth===ce&&rt.includes(i.field)?0:-1,Le={width:rt.reduce((lt,vt)=>lt+R[vt].computedWidth,0),fields:rt,colIndex:te},It=ye.position,Lt=px(It,Le.width,te,I,M,B);te+=rt.length;let nt=ut;return It===On.LEFT&&(nt=te-1),k.jsx(Q0t,{groupId:We,width:Le.width,fields:Le.fields,colIndex:Le.colIndex,depth:ce,isLastColumn:ut===he.length-1,maxDepth:l,height:N,hasFocus:Be,tabIndex:et,pinnedPosition:It,pinnedOffset:Lt,showLeftBorder:AO(It,nt),showRightBorder:PO(It,nt,he.length,C.showColumnVerticalBorder,A)},ut)});return q(ye,Te,Ie)};return{renderContext:O,leftRenderContext:W,rightRenderContext:K,pinnedColumns:P,visibleColumns:t,columnPositions:I,getFillers:q,getColumnHeadersRow:Z,getColumnsToRender:G,getColumnGroupHeadersRows:()=>{if(l===0)return null;const ce=[];for(let ye=0;ye<l;ye+=1)ce.push(k.jsxs(xZ,{role:"row","aria-rowindex":ye+1,ownerState:C,style:{height:N},children:[W&&ie({depth:ye,params:{position:On.LEFT,renderContext:W,maxLastColumn:W.lastColumnIndex}}),ie({depth:ye,params:{renderContext:O}}),K&&ie({depth:ye,params:{position:On.RIGHT,renderContext:K,maxLastColumn:K.lastColumnIndex}})]},ye));return ce},getPinnedCellOffset:px,isDragging:!!m,getInnerProps:()=>({role:"rowgroup"})}},J0t=["className"],Z0t=e=>{const{classes:t}=e;return Me({root:["columnHeaders"]},Cn,t)},ext=Nn("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),txt=Vt(function(t,n){const{className:r}=t,o=$e(t,J0t),i=yt(),a=Z0t(i);return k.jsx(ext,z({className:fe(a.root,r),ownerState:i},o,{role:"presentation",ref:n}))}),nxt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],rxt=Vt(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:f,columnVisibility:h,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g}=t,y=$e(t,nxt),{getInnerProps:v,getColumnHeadersRow:w,getColumnGroupHeadersRows:C}=X0t({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:f,columnVisibility:h,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g});return k.jsxs(txt,z({},y,v(),{ref:n,children:[C(),w()]}))}),oxt=ad(rxt);function ixt(e){return null}function axt(e){return null}const sxt=Vt(function(t,n){const o=tn().current.getLocaleText("noResultsOverlayLabel");return k.jsx(QP,z({},t,{ref:n,children:o}))}),lxt=new TextEncoder;let $E=2*1024,mx=new ArrayBuffer($E),O$=new Uint8Array(mx),Cp=new Int32Array(mx);const cxt=uxt;function uxt(e){const t=e.length*2;t>$E&&($E=t+(4-t%4),mx=new ArrayBuffer($E),O$=new Uint8Array(mx),Cp=new Int32Array(mx));const n=lxt.encodeInto(e,O$).written,r=0,o=n|0;let i=0,a=(r+o|0)+374761393|0;if(o<16)for(;(i+3|0)<o;i=i+4|0)a=Math.imul(Sl(a+Math.imul(Cp[i]|0,3266489917)|0,17)|0,668265263);else{let s=r+606290984|0,l=r+2246822519|0,c=r,u=r-2654435761|0;for(;(i+15|0)<o;i=i+16|0)s=Math.imul(Sl(s+Math.imul(Cp[i+0|0]|0,2246822519)|0,13)|0,2654435761),l=Math.imul(Sl(l+Math.imul(Cp[i+4|0]|0,2246822519)|0,13)|0,2654435761),c=Math.imul(Sl(c+Math.imul(Cp[i+8|0]|0,2246822519)|0,13)|0,2654435761),u=Math.imul(Sl(u+Math.imul(Cp[i+12|0]|0,2246822519)|0,13)|0,2654435761);for(a=(((Sl(s,1)|0+Sl(l,7)|0)+Sl(c,12)|0)+Sl(u,18)|0)+o|0;(i+3|0)<o;i=i+4|0)a=Math.imul(Sl(a+Math.imul(Cp[i]|0,3266489917)|0,17)|0,668265263)}for(;i<o;i=i+1|0)a=Math.imul(Sl(a+Math.imul(O$[i]|0,374761393)|0,11)|0,2654435761);return a=Math.imul(a^a>>>15,2246822519),a=Math.imul(a^a>>>13,3266489917),((a^a>>>16)>>>0).toString()}function Sl(e,t){return e<<t|e>>>32-t}function dxt(e){const t=new WeakSet;return JSON.stringify(e,(n,r)=>{if(r!==null&&typeof r=="object"){if(t.has(r))return null;t.add(r)}return r})}function fxt(){const e=Lr();return x.useMemo(()=>{const t=cxt(dxt(e)),n=pxt(e);return{id:t,variables:n}},[e])}function pxt(e){var g,y,v,w,C,E;const t=mxt(e),n=e.palette.DataGrid,r=(n==null?void 0:n.bg)??(e.vars||e).palette.background.default,o=(n==null?void 0:n.headerBg)??r,i=(n==null?void 0:n.pinnedBg)??r,a=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:Nt(e.palette.background.default,e.palette.action.disabledOpacity),s=e.palette.mode==="dark"?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper,l=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,c=hxt(e),u=((y=(g=e.vars)==null?void 0:g.font)==null?void 0:y.body2)??I$(e.typography.body2),f=((w=(v=e.vars)==null?void 0:v.font)==null?void 0:w.caption)??I$(e.typography.caption),h=((E=(C=e.vars)==null?void 0:C.font)==null?void 0:E.body1)??I$(e.typography.body1),m=Ct.keys;return{[m.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[m.colors.border.base]:t,[m.colors.background.base]:r,[m.colors.background.overlay]:s,[m.colors.background.backdrop]:a,[m.colors.foreground.base]:(e.vars||e).palette.text.primary,[m.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[m.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[m.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[m.colors.foreground.error]:(e.vars||e).palette.error.dark,[m.colors.interactive.hover]:(e.vars||e).palette.action.hover,[m.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[m.colors.interactive.focus]:SZ((e.vars||e).palette.primary.main),[m.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[m.colors.interactive.disabled]:SZ((e.vars||e).palette.action.disabled),[m.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[m.colors.interactive.selected]:l,[m.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[m.header.background.base]:o,[m.cell.background.pinned]:i,[m.radius.base]:c,[m.typography.fontFamily.base]:e.typography.fontFamily,[m.typography.fontWeight.light]:e.typography.fontWeightLight,[m.typography.fontWeight.regular]:e.typography.fontWeightRegular,[m.typography.fontWeight.medium]:e.typography.fontWeightMedium,[m.typography.fontWeight.bold]:e.typography.fontWeightBold,[m.typography.font.body]:u,[m.typography.font.small]:f,[m.typography.font.large]:h,[m.transitions.easing.easeIn]:e.transitions.easing.easeIn,[m.transitions.easing.easeOut]:e.transitions.easing.easeOut,[m.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[m.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[m.transitions.duration.base]:`${e.transitions.duration.short}ms`,[m.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[m.shadows.base]:(e.vars||e).shadows[2],[m.shadows.overlay]:(e.vars||e).shadows[8],[m.zIndex.panel]:(e.vars||e).zIndex.modal,[m.zIndex.menu]:(e.vars||e).zIndex.modal}}function hxt(e){return e.vars?e.vars.shape.borderRadius:typeof e.shape.borderRadius=="number"?`${e.shape.borderRadius}px`:e.shape.borderRadius}function mxt(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?Vu(Nt(e.palette.divider,1),.88):zu(Nt(e.palette.divider,1),.68)}function gxt(e,t){return`rgba(from ${e} r g b / ${t})`}function SZ(e){return gxt(e,1)}function I$(e){return`${e.fontWeight} ${e.fontSize} / ${e.lineHeight} ${e.fontFamily}`}const yxt=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],vxt=["onRowsPerPageChange","material","disabled"],bxt=["material"],xxt=["autoFocus","label","fullWidth","slotProps","className","material"],Sxt=["material"],wxt=["material"],Cxt=["material"],Ext=["material"],Txt=["material"],Oxt=["material"],Ixt=["material"],Pxt=["material"],Axt=["material","label","className"],Mxt=["material"],Rxt=["inert","iconStart","iconEnd","children","material"],Dxt=["slotProps","material"],kxt=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],_xt=["key"],$xt=["inputProps","InputProps","InputLabelProps"],Nxt=["slotProps","material"],Lxt=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],Fxt=["native"],wZ=ae(So)(({theme:e})=>({[`&.${TN.positionEnd} .${bN.sizeSmall}`]:{marginRight:e.spacing(-.75)}})),xpe=ae(os,{shouldForwardProp:e=>e!=="fullWidth"})(({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:"hidden",[`& .${hg.label}`]:{fontSize:e.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),CZ=ae(nTe,{shouldForwardProp:e=>e!=="density"})(({theme:e})=>({variants:[{props:{density:"compact"},style:{padding:e.spacing(.5)}}]})),jxt=ae(Wr)({[`& .${Np.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),Bxt=Vt(function(t,n){const{id:r,label:o,labelId:i,material:a,disabled:s,slotProps:l,onChange:c,onKeyDown:u,onOpen:f,onClose:h,size:m,style:g,fullWidth:y}=t,v=$e(t,yxt),w={PaperProps:{onKeyDown:u}};return h&&(w.onClose=h),k.jsxs(Fh,{size:m,fullWidth:y,style:g,disabled:s,ref:n,children:[k.jsx(jh,{id:i,htmlFor:r,shrink:!0,variant:"outlined",children:o}),k.jsx(Lf,z({id:r,labelId:i,label:o,displayEmpty:!0,onChange:c},v,{variant:"outlined",notched:!0,inputProps:l==null?void 0:l.htmlInput,onOpen:f,MenuProps:w,size:m},a))]})}),zxt=ae(Lne)(({theme:e})=>({[`& .${th.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${th.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),Vxt=Vt(function(t,n){const{onRowsPerPageChange:r,material:o,disabled:i}=t,a=$e(t,vxt),s=x.useMemo(()=>{if(i)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}},[i]),l=tn(),c=yt(),{estimatedRowCount:u}=c;return k.jsx(zxt,z({component:"div",onRowsPerPageChange:Je(f=>{r==null||r(Number(f.target.value))}),labelRowsPerPage:l.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:f=>l.current.getLocaleText("paginationDisplayedRows")(z({},f,{estimated:u})),getItemAriaLabel:l.current.getLocaleText("paginationItemAriaLabel")},s,a,o,{ref:n}))}),Hxt=Vt(function(t,n){const{material:r}=t,o=$e(t,bxt);return k.jsx(iEe,z({},o,r,{ref:n}))}),Uxt=Vt(function(t,n){const{autoFocus:r,label:o,fullWidth:i,slotProps:a,className:s,material:l}=t,c=$e(t,xxt),u=x.useRef(null),f=en(u,n),h=x.useRef(null);return x.useEffect(()=>{var m;if(r){const g=(m=u.current)==null?void 0:m.querySelector("input");g==null||g.focus({preventScroll:!0})}else r===!1&&h.current&&h.current.stop({})},[r]),o?k.jsx(xpe,{className:s,control:k.jsx(CZ,z({},c,l,{inputProps:a==null?void 0:a.htmlInput,ref:f,touchRippleRef:h})),label:o,fullWidth:i}):k.jsx(CZ,z({},c,l,{className:fe(s,l==null?void 0:l.className),inputProps:a==null?void 0:a.htmlInput,ref:f,touchRippleRef:h}))}),Gxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Sxt);return k.jsx(nw,z({},o,r,{ref:n}))}),qxt=Vt(function(t,n){const{material:r}=t,o=$e(t,wxt);return k.jsx(ji,z({},o,r,{ref:n}))}),Wxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Cxt);return k.jsx(Cne,z({},o,r,{ref:n}))}),Kxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Ext);return k.jsx(ct,z({},o,r,{ref:n}))}),Yxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Txt);return k.jsx(Wl,z({},o,r,{ref:n}))}),Qxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Oxt);return k.jsx(pn,z({},o,r,{ref:n}))}),Xxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Ixt);return k.jsx(Go,z({},o,r,{ref:n}))}),Jxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Pxt);return k.jsx(hE,z({},o,r,{ref:n}))}),Zxt=Vt(function(t,n){const{material:r,label:o,className:i}=t,a=$e(t,Axt);return o?k.jsx(xpe,{className:i,control:k.jsx(qo,z({},a,r,{ref:n})),label:o}):k.jsx(qo,z({},a,r,{className:i,ref:n}))}),eSt=Vt(function(t,n){const{material:r}=t,o=$e(t,Mxt);return k.jsx(uI,z({},o,r,{ref:n}))});function tSt(e){const{inert:t,iconStart:n,iconEnd:r,children:o,material:i}=e,a=$e(e,Rxt);return t&&(a.disableRipple=!0),x.createElement(Jt,z({},a,i),[n&&k.jsx(nl,{children:n},"1"),k.jsx(jxt,{children:o},"2"),r&&k.jsx(nl,{children:r},"3")])}function nSt(e){const{slotProps:t,material:n}=e,r=$e(e,Dxt);return k.jsx(dn,z({variant:"outlined"},r,n,{inputProps:t==null?void 0:t.htmlInput,InputProps:pH(t==null?void 0:t.input),InputLabelProps:z({shrink:!0},t==null?void 0:t.inputLabel)}))}function rSt(e){const t=yt(),{id:n,multiple:r,freeSolo:o,options:i,getOptionLabel:a,isOptionEqualToValue:s,value:l,onChange:c,label:u,placeholder:f,slotProps:h,material:m}=e,g=$e(e,kxt);return k.jsx(_c,z({id:n,multiple:r,freeSolo:o,options:i,getOptionLabel:a,isOptionEqualToValue:s,value:l,onChange:c,renderTags:(y,v)=>y.map((w,C)=>{const E=v({index:C}),{key:I}=E,O=$e(E,_xt);return k.jsx(Wl,z({variant:"outlined",size:"small",label:typeof w=="string"?w:a==null?void 0:a(w)},O),I)}),renderInput:y=>{var I;const{inputProps:v,InputProps:w,InputLabelProps:C}=y,E=$e(y,$xt);return k.jsx(dn,z({},E,{label:u,placeholder:f,inputProps:v,InputProps:pH(w,!1),InputLabelProps:z({shrink:!0},C)},h==null?void 0:h.textField,(I=t.slotProps)==null?void 0:I.baseTextField))}},g,m))}function oSt(e){return k.jsx(iw,z({},pH(e)))}function pH(e,t=!0){if(!e)return;const{slotProps:n,material:r}=e,i=$e(e,Nxt);t&&(i.startAdornment&&(i.startAdornment=k.jsx(wZ,{position:"start",children:i.startAdornment})),i.endAdornment&&(i.endAdornment=k.jsx(wZ,{position:"end",children:i.endAdornment})));for(const a in r)Object.hasOwn(r,a)&&(i[a]=r[a]);return n!=null&&n.htmlInput&&(i.inputProps?i.inputProps=z({},i.inputProps,n==null?void 0:n.htmlInput):i.inputProps=n==null?void 0:n.htmlInput),i}const iSt={"bottom-start":"top left","bottom-end":"top right"};function aSt(e){const{open:t,children:n,className:r,flip:o,onExited:i,onDidShow:a,onDidHide:s,id:l,target:c,transition:u,placement:f,material:h}=e,m=$e(e,Lxt),g=x.useMemo(()=>{const v=[{name:"preventOverflow",options:{padding:8}}];return o&&v.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(a||s)&&v.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{a==null||a()},effect:()=>()=>{s==null||s()}}),v},[o,a,s]);let y;if(!u)y=EZ(e,n);else{const v=w=>C=>{w&&w(),i&&i(C)};y=w=>{var C;return EZ(e,k.jsx(mh,z({},w.TransitionProps,{style:{transformOrigin:iSt[w.placement]},onExited:v((C=w.TransitionProps)==null?void 0:C.onExited),children:k.jsx(go,{children:n})})))}}return k.jsx(sv,z({id:l,className:r,open:t,anchorEl:c,transition:u,placement:f,modifiers:g},m,h,{children:y}))}function EZ(e,t){return lSt(e,sSt(e,t))}function sSt(e,t){return e.onClickAway===void 0?t:k.jsx(gne,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}function lSt(e,t){return e.focusTrap===void 0?t:k.jsx(lB,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:k.jsx("div",{tabIndex:-1,children:t})})}function cSt(e){let{native:t}=e,n=$e(e,Fxt);return t?k.jsx("option",z({},n)):k.jsx(Jt,z({},n))}const uSt={booleanCellTrueIcon:XJ,booleanCellFalseIcon:KJ,columnMenuIcon:Tgt,openFilterButtonIcon:vgt,filterPanelDeleteIcon:KJ,columnFilteredIcon:WJ,columnSelectorIcon:xgt,columnSortedAscendingIcon:HJ,columnSortedDescendingIcon:UJ,columnResizeIcon:Sgt,densityCompactIcon:wgt,densityStandardIcon:Cgt,densityComfortableIcon:Egt,exportIcon:Dgt,moreActionsIcon:Pgt,treeDataCollapseIcon:qJ,treeDataExpandIcon:GJ,groupingCriteriaCollapseIcon:qJ,groupingCriteriaExpandIcon:GJ,detailPanelExpandIcon:YJ,detailPanelCollapseIcon:Ogt,rowReorderIcon:QJ,quickFilterIcon:bgt,quickFilterClearIcon:JJ,columnMenuHideIcon:Agt,columnMenuSortAscendingIcon:HJ,columnMenuSortDescendingIcon:UJ,columnMenuUnsortIcon:null,columnMenuFilterIcon:WJ,columnMenuManageColumnsIcon:Mgt,columnMenuClearIcon:JJ,loadIcon:Igt,filterPanelAddIcon:YJ,filterPanelRemoveAllIcon:Rgt,columnReorderIcon:QJ,menuItemCheckIcon:XJ},dSt={baseAutocomplete:rSt,baseBadge:Hxt,baseCheckbox:Uxt,baseChip:Yxt,baseCircularProgress:Gxt,baseDivider:qxt,baseInput:oSt,baseLinearProgress:Wxt,baseMenuList:eSt,baseMenuItem:tSt,baseTextField:nSt,baseButton:Kxt,baseIconButton:Qxt,baseTooltip:Xxt,basePagination:Vxt,basePopper:aSt,baseSelect:Bxt,baseSelectOption:cSt,baseSkeleton:Jxt,baseSwitch:Zxt},fSt=z({},dSt,uSt),pSt=()=>Me({root:["bottomContainer"]},Cn,{}),hSt=Nn("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function mSt(e){const t=pSt();return k.jsx(hSt,z({},e,{className:fe(t.root,ee["container--bottom"]),role:"presentation"}))}const gSt=z({},fSt,{cell:Bht,skeletonCell:Yht,columnHeaderFilterIconButton:ggt,columnHeaderSortIcon:hgt,columnMenu:Ygt,columnHeaders:oxt,detailPanels:ixt,bottomContainer:mSt,footer:Ivt,footerRowCount:Hvt,toolbar:wvt,pinnedRows:axt,loadingOverlay:$vt,noResultsOverlay:sxt,noRowsOverlay:Nvt,noColumnsOverlay:Lvt,pagination:jvt,filterPanel:Eyt,columnsPanel:Zgt,columnsManagement:kyt,panel:oyt,row:Kvt}),ySt={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",listView:!1},vSt=e=>z({},ySt,e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}),bSt=gSt,xSt=e=>{const t=Lr(),n=x.useMemo(()=>_j({props:e,theme:t,name:"MuiDataGrid"}),[t,e]),r=x.useMemo(()=>z({},qut,n.localeText),[n.localeText]),o=x.useMemo(()=>kht({defaultSlots:bSt,slots:n.slots}),[n.slots]),i=x.useMemo(()=>Object.keys(lj).reduce((a,s)=>(a[s]=n[s]??lj[s],a),{}),[n]);return x.useMemo(()=>z({},n,i,{localeText:r,slots:o},vSt(n)),[n,r,o,i])};class SSt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a<i.length;a+=1){const s=i[a];r.regular.has(s)&&s.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}class hH{static create(t){return new hH(t)}constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const Spe=Symbol("mui.api_private"),wSt=e=>e.isPropagationStopped!==void 0;let TZ=0;function CSt(e){var o;const t=(o=e.current)==null?void 0:o[Spe];if(t)return t;const n={},r={state:n,store:hH.create(n),instanceId:{id:TZ}};return TZ+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,f=u[s];(f==null?void 0:f.spying)===!0?f.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new SSt}),r}function ESt(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[Spe]:e.current}}function TSt(e,t){var a;const n=x.useRef(null),r=x.useRef(null);r.current||(r.current=CSt(n)),n.current||(n.current=ESt(r));const o=x.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,wSt(u)&&u.isPropagationStopped())return;const f=t.signature===Vl.DataGridPro||t.signature===Vl.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,f)},[r,t.signature]),i=x.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return yn(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),x.useImperativeHandle(e,()=>n.current,[n]),x.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const OSt={hooks:{useCSSVariables:fxt,useGridAriaAttributes:Yvt,useGridRowAriaAttributes:Qvt,useCellAggregationResult:()=>null}},wpe=Vt(function(t,n){var i;const r=xSt(t),o=TSt(r.apiRef,r);return K0t(o,r),k.jsx(Xvt,{privateApiRef:o,configuration:OSt,props:r,children:k.jsx(dmt,z({className:r.className,style:r.style,sx:r.sx},(i=r.slotProps)==null?void 0:i.root,{ref:n}))})}),Cpe=x.memo(wpe);wpe.propTypes={apiRef:U.shape({current:U.object}),"aria-label":U.string,"aria-labelledby":U.string,autoHeight:U.bool,autoPageSize:U.bool,autosizeOnMount:U.bool,autosizeOptions:U.shape({columns:U.arrayOf(U.string),disableColumnVirtualization:U.bool,expand:U.bool,includeHeaders:U.bool,includeOutliers:U.bool,outliersFactor:U.number}),cellModesModel:U.object,checkboxSelection:U.bool,classes:U.object,className:U.string,clipboardCopyCellDelimiter:U.string,columnBufferPx:U.number,columnGroupHeaderHeight:U.number,columnGroupingModel:U.arrayOf(U.object),columnHeaderHeight:U.number,columns:U.arrayOf(U.object).isRequired,columnVisibilityModel:U.object,dataSource:U.shape({getRows:U.func.isRequired,updateRow:U.func}),dataSourceCache:U.shape({clear:U.func.isRequired,get:U.func.isRequired,set:U.func.isRequired}),density:U.oneOf(["comfortable","compact","standard"]),disableAutosize:U.bool,disableColumnFilter:U.bool,disableColumnMenu:U.bool,disableColumnResize:U.bool,disableColumnSelector:U.bool,disableColumnSorting:U.bool,disableDensitySelector:U.bool,disableEval:U.bool,disableMultipleRowSelection:U.bool,disableRowSelectionOnClick:U.bool,disableVirtualization:U.bool,editMode:U.oneOf(["cell","row"]),estimatedRowCount:U.number,experimentalFeatures:U.shape({warnIfFocusStateIsNotSynced:U.bool}),filterDebounceMs:U.number,filterMode:U.oneOf(["client","server"]),filterModel:U.shape({items:U.arrayOf(U.shape({field:U.string.isRequired,id:U.oneOfType([U.number,U.string]),operator:U.string.isRequired,value:U.any})).isRequired,logicOperator:U.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:U.bool,quickFilterLogicOperator:U.oneOf(["and","or"]),quickFilterValues:U.array}),getCellClassName:U.func,getDetailPanelContent:U.func,getEstimatedRowHeight:U.func,getRowClassName:U.func,getRowHeight:U.func,getRowId:U.func,getRowSpacing:U.func,hideFooter:U.bool,hideFooterPagination:U.bool,hideFooterSelectedRowCount:U.bool,ignoreDiacritics:U.bool,ignoreValueFormatterDuringExport:U.oneOfType([U.shape({clipboardExport:U.bool,csvExport:U.bool}),U.bool]),initialState:U.object,isCellEditable:U.func,isRowSelectable:U.func,keepNonExistentRowsSelected:U.bool,label:U.string,loading:U.bool,localeText:U.object,logger:U.shape({debug:U.func.isRequired,error:U.func.isRequired,info:U.func.isRequired,warn:U.func.isRequired}),logLevel:U.oneOf(["debug","error","info","warn",!1]),nonce:U.string,onCellClick:U.func,onCellDoubleClick:U.func,onCellEditStart:U.func,onCellEditStop:U.func,onCellKeyDown:U.func,onCellModesModelChange:U.func,onClipboardCopy:U.func,onColumnHeaderClick:U.func,onColumnHeaderContextMenu:U.func,onColumnHeaderDoubleClick:U.func,onColumnHeaderEnter:U.func,onColumnHeaderLeave:U.func,onColumnHeaderOut:U.func,onColumnHeaderOver:U.func,onColumnOrderChange:U.func,onColumnResize:U.func,onColumnVisibilityModelChange:U.func,onColumnWidthChange:U.func,onDataSourceError:U.func,onDensityChange:U.func,onFilterModelChange:U.func,onMenuClose:U.func,onMenuOpen:U.func,onPaginationMetaChange:U.func,onPaginationModelChange:U.func,onPreferencePanelClose:U.func,onPreferencePanelOpen:U.func,onProcessRowUpdateError:U.func,onResize:U.func,onRowClick:U.func,onRowCountChange:U.func,onRowDoubleClick:U.func,onRowEditStart:U.func,onRowEditStop:U.func,onRowModesModelChange:U.func,onRowSelectionModelChange:U.func,onSortModelChange:U.func,onStateChange:U.func,pageSizeOptions:U.arrayOf(U.oneOfType([U.number,U.shape({label:U.string.isRequired,value:U.number.isRequired})]).isRequired),pagination:U.oneOf([!0]),paginationMeta:U.shape({hasNextPage:U.bool}),paginationMode:U.oneOf(["client","server"]),paginationModel:U.shape({page:U.number.isRequired,pageSize:U.number.isRequired}),processRowUpdate:U.func,resizeThrottleMs:U.number,rowBufferPx:U.number,rowCount:U.number,rowHeight:U.number,rowModesModel:U.object,rows:U.arrayOf(U.object),rowSelection:U.bool,rowSelectionModel:U.shape({ids:U.instanceOf(Set).isRequired,type:U.oneOf(["exclude","include"]).isRequired}),rowSpacingType:U.oneOf(["border","margin"]),rowSpanning:U.bool,scrollbarSize:U.number,showCellVerticalBorder:U.bool,showColumnVerticalBorder:U.bool,showToolbar:U.bool,slotProps:U.object,slots:U.object,sortingMode:U.oneOf(["client","server"]),sortingOrder:U.arrayOf(U.oneOf(["asc","desc"])),sortModel:U.arrayOf(U.shape({field:U.string.isRequired,sort:U.oneOf(["asc","desc"])})),style:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),virtualizeColumnsWithAutoRowHeight:U.bool};const ISt=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),PSt=e=>{const[t]=je(),n=ISt(e.category.entries),r=$de(),o=fut(),[i,a]=x.useState(n),[s,l]=x.useState({}),c=(C,E)=>{C.reason===ks.rowFocusOut&&(E.defaultMuiPrevented=!0)},u=C=>()=>{l({...s,[C]:{mode:zn.Edit}})},f=C=>()=>{l({...s,[C]:{mode:zn.View}})},h=C=>async()=>{console.log("deleting entry",C),o.mutate(parseInt(C.toString())),a(i.filter(E=>E.id!==C))},m=C=>()=>{l({...s,[C]:{mode:zn.View,ignoreModifications:!0}});const E=i.find(I=>I.id===C);(E==null?void 0:E.id)===null&&a(i.filter(I=>I.id!==C))},g=async C=>{r.mutate({id:C.id,categoryId:C.category,date:C.date,value:C.value,notes:C.notes});const E={...C,isNew:!1};return a(i.map(I=>I.id===C.id?E:I)),E},y=C=>{console.log(C)},v=C=>{l(C)},w=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:C=>C==null?"":C+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:C=>C==null?"":xt.fromJSDate(C).toLocaleString(xt.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:C})=>{var I;return((I=s[C])==null?void 0:I.mode)===zn.Edit?[S(mf,{icon:S(ide,{}),label:"Save",sx:{color:"primary.main"},onClick:f(C)}),S(mf,{icon:S(cw,{}),label:"Cancel",className:"textPrimary",onClick:m(C),color:"inherit"})]:[S(mf,{icon:S(DV,{}),label:"Edit",className:"textPrimary",onClick:u(C),color:"inherit"}),S(mf,{icon:S(OS,{}),label:"Delete",onClick:h(C),color:"inherit"})]}}];return S(Zt,{sx:{width:"100%"},children:S(Cpe,{editMode:"row",rows:n,columns:w,initialState:{pagination:{paginationModel:{pageSize:YN.pageSize}}},pageSizeOptions:YN.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:v,onRowEditStop:c,processRowUpdate:g,onProcessRowUpdateError:y})})},XP=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=je();return S(lv,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(ho,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",borderWidth:0,boxShadow:24,p:2},children:[S(Jl,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:S(cw,{onClick:i})}),S(Fi,{children:S(at,{variant:"body1",children:r})}),Q(ll,{children:[S(ct,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),S(ct,{color:"primary",onClick:i,children:a("close")})]})]})})},Epe=({category:e,closeFn:t})=>{const[n]=je(),r=lut(),o=cut(e==null?void 0:e.id),i=Wo({name:Ho().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:Ho().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return S(Ti,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>S(fi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),S(dn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},ASt=e=>{const t=uut(e.category.id),n=id(),[r]=je(),[o,i]=J.useState(null),[a,s]=J.useState(!1),[l,c]=J.useState(!1),u=!!o,f=I=>{i(I.currentTarget)},h=()=>{m(),v()},m=()=>{i(null)},g=()=>{C(),i(null)},y=()=>{t.mutate(e.category.id),n(cn(Qt.MEASUREMENT_OVERVIEW))},v=()=>s(!0),w=()=>s(!1),C=()=>c(!0),E=()=>c(!1);return Q("div",{children:[S(ct,{onClick:f,children:S(kV,{})}),Q(ss,{anchorEl:o,open:u,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Jt,{onClick:h,children:r("edit")}),S(Jt,{onClick:g,children:r("delete")})]}),S(Bi,{title:r("edit"),isOpen:a,closeFn:w,children:S(Epe,{category:e.category,closeFn:w})}),S(XP,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:E,deleteFn:y})]})};to.defaultZone=f2e;const Tpe=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=je(),i=dut(),a=$de(),s=_de(n),[l,c]=J.useState(e?xt.fromJSDate(e.date):xt.now()),u=Wo({value:Do().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:Xs().required(r("forms.fieldRequired")),notes:Ho().max(500,r("forms.maxLength",{value:"500"}))});return S(Ti,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async f=>{e?a.mutate({...f,id:e.id}):i.mutate({...f,categoryId:n}),t&&t()},children:f=>S(fi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:f.touched.value&&!!f.errors.value,helperText:f.touched.value&&f.errors.value,...f.getFieldProps("value")}),s.isLoading?S(Er,{}):S(Ys,{dateAdapter:zl,adapterLocale:o.language,children:S(Ih,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:h=>{h&&f.setFieldValue("date",h.toJSDate()),c(h)},shouldDisableDate:h=>e&&Zn(e.date)===Zn(h.toJSDate())?!1:h?s.data.entries.some(m=>Zn(m.date)===Zn(h.toJSDate())):!1})}),S(dn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:f.touched.notes&&!!f.errors.notes,helperText:f.touched.notes&&f.errors.notes,...f.getFieldProps("notes")}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},MSt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Ko,{})}),S(Bi,{title:e("add"),isOpen:t,closeFn:o,children:S(Epe,{closeFn:o})})]})},RSt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1),i=Ma(),a=parseInt(i.categoryId);return Q(Tt,{children:[S(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:S(Ko,{})}),S(Bi,{title:e("add"),isOpen:t,closeFn:o,children:S(Tpe,{closeFn:o,categoryId:a})})]})},rE=['"Open Sans Bold"',"sans-serif"].join(","),DSt=['"Open Sans Light"',"sans-serif"].join(","),Ope={spacing:8,typography:{h3:{fontFamily:rE},h4:{fontFamily:rE},h5:{fontFamily:rE},h6:{fontFamily:rE},fontFamily:DSt},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},tm=ZS(Ope),kSt=e=>ZS({...Ope,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),Ipe=e=>{const{i18n:t}=je(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return S(Zt,{alignItems:"center",display:"flex",flexDirection:"column",children:S(nd,{width:"90%",height:200,children:Q(qz,{data:r,children:[S(qh,{type:"monotone",dataKey:"value",stroke:tm.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),S(Uf,{stroke:"#ccc",strokeDasharray:"5 5"}),S(ls,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),S(cs,{domain:["auto","auto"],unit:e.category.unit})]})})})},_St=()=>{const e=Ma(),t=parseInt(e.categoryId??"");if(Number.isNaN(t))return S("p",{children:"Please pass an integer as the category id."});const n=_de(t);return n.isLoading?S(Er,{}):S(ds,{title:n.data.name,optionsMenu:S(ASt,{category:n.data}),mainContent:Q(Ft,{spacing:2,children:[S(Ipe,{category:n.data}),S(PSt,{category:n.data})]}),fab:S(RSt,{})})},$St=e=>{const[t,n]=je(),[r,o]=J.useState(!1),i=()=>o(!0),a=()=>o(!1);return Q(Tt,{children:[Q(ho,{children:[S(Jl,{title:e.category.name,subheader:e.category.unit}),S(Fi,{children:S(Ipe,{category:e.category})}),Q(ll,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[S(ct,{size:"small",children:S(Ro,{to:cn(Qt.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),S(pn,{onClick:i,children:S(Ko,{})})]})]}),S(Bi,{title:t("add"),isOpen:r,closeFn:a,children:S(Tpe,{closeFn:a,categoryId:e.category.id})})]})},OZ=()=>{const e=kde(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("measurements.measurements"),mainContent:Q(Ft,{spacing:2,children:[e.data.length===0&&S(Bh,{}),e.data.map(n=>S($St,{category:n},n.id))]}),fab:S(MSt,{})})};function Ra(){return yr({queryKey:[st.QUERY_PROFILE],queryFn:VLe})}const NSt=()=>{const e=Mt();return Dt({mutationFn:t=>HLe(t),onSuccess:async()=>{await e.invalidateQueries({queryKey:[st.QUERY_PROFILE]})}})},NE=[{range:"obese",color:"#FF5733",min:30,max:100},{range:"overweight",color:"#FFC107",min:25,max:30},{range:"normal",color:"#90EE90",min:18.5,max:25},{range:"underweight",color:"#FFC300",min:0,max:18.5}],oE=e=>{const t=NE.find(n=>n.range===e);return t?t.color:"gray"},LSt=()=>{const[e]=je(),t=Bw(),n=Ra(),[r,o]=x.useState(),[i,a]=x.useState();x.useEffect(()=>{var u;if(t.data&&t.data.length>0){const f=t.data[0],h=(u=n.data)!=null&&u.useMetric?f.weight:f.weight*.453592;a(h)}},[t.data,n.data]),x.useEffect(()=>{var u;(u=n.data)!=null&&u.height&&o(n.data.height)},[n.data]);const l=(()=>{if(r&&i){const u=r/100;return i/(u*u)}return null})();if(t.isLoading||n.isLoading)return S(Er,{});const c=[];for(let u=140;u<=220;u+=10){const f=u/100,h={height:u};let m=0;NE.forEach((g,y)=>{const v=g.max>100?100:g.max;let w=v*f*f-m;w=Math.min(w,150-m),y===0?h[g.range]=w:h[g.range]=h[NE[y-1].range]+w,m=Math.min(v*f*f,150)}),c.push(h)}return S(ds,{title:e("bmi.calculator"),mainContent:S(Tt,{children:Q(Ft,{spacing:2,children:[Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:6},children:S(dn,{label:e("height"),fullWidth:!0,slotProps:{input:{endAdornment:S(at,{children:e("cm")})}},type:"number",value:r??"",onChange:u=>o(parseFloat(u.target.value))})}),S(me,{size:{xs:12,sm:6},children:S(dn,{label:e("weight"),slotProps:{input:{endAdornment:S(at,{children:e("server.kg")})}},fullWidth:!0,type:"number",value:i??"",onChange:u=>a(parseFloat(u.target.value))})})]}),l!==null&&S(at,{variant:"h6",children:e("bmi.result",{value:l.toFixed(1)})}),S(nd,{width:"100%",height:400,children:Q(pYe,{data:c,children:[S(ls,{dataKey:"height",type:"number",domain:[140,220],unit:"cm"}),S(cs,{domain:[40,150],tickFormatter:u=>Math.round(u).toString(),unit:"kg"}),S(Uf,{strokeDasharray:"3 3"}),S(ba,{formatter:(u,f)=>[Math.round(u),e("bmi."+f)]}),NE.map(u=>S(Gf,{type:"monotone",dataKey:u.range,stroke:"black",fill:u.color,fillOpacity:.8},u.range)),l!==null&&S(Ow,{x:r,y:i,r:8,fill:"black",stroke:"none"})]})}),Q(Ft,{direction:"row",justifyContent:"center",children:[S(Zt,{height:20,width:20,sx:{backgroundColor:oE("obese")}}),e("bmi.obese"),S(Zt,{height:20,width:20,sx:{backgroundColor:oE("overweight"),marginLeft:2}}),e("bmi.overweight"),S(Zt,{height:20,width:20,sx:{backgroundColor:oE("normal"),marginLeft:2}}),e("bmi.normal"),S(Zt,{height:20,width:20,sx:{backgroundColor:oE("underweight"),marginLeft:2}}),e("bmi.underweight")]})]})})})},FSt=e=>{var r,o,i,a;const[t,n]=je();return Q(ln,{children:[S(ke,{sx:{paddingX:1},children:S(Kl,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:S(Ju,{})})}),Q(ke,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:_i(e.item.nutritionalValues.energy,n.language),kj:_i(e.item.nutritionalValues.energyKj,n.language)})}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.item.nutritionalValues.protein,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.item.nutritionalValues.carbohydrates,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},pj=e=>{const[t,n]=je();return S(Fc,{children:Q(Nc,{children:[S(Ff,{children:Q(ln,{children:[S(ke,{}),S(ke,{}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),Q(Lc,{children:[e.items.map(r=>S(FSt,{item:r},r.id)),e.showSum&&Q(ln,{children:[S(ke,{sx:{paddingX:1},children:" "}),S(ke,{sx:{paddingX:1},children:t("total")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:_i(e.values.energy,n.language),kj:_i(e.values.energyKj,n.language)})}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.values.protein,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.values.carbohydrates,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.values.fat,n.language)})]})]})]})})},jSt=e=>{const[t,n]=je();return S(Fc,{children:Q(Nc,{size:"small",children:[S(Ff,{children:Q(ln,{children:[S(ke,{children:t("nutrition.macronutrient")}),S(ke,{align:"right",children:t("nutrition.planned")}),S(ke,{align:"right",children:t("nutrition.logged")}),S(ke,{align:"right",children:t("nutrition.difference")})]})}),Q(Lc,{children:[Q(ln,{children:[S(ke,{children:t("nutrition.energy")}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:_i(e.planned.energy,n.language),kj:_i(e.planned.energyKj,n.language)})}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:_i(e.logged.energy,n.language),kj:_i(e.logged.energyKj,n.language)})}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:_i(e.logged.energy-e.planned.energy,n.language),kj:_i(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),Q(ln,{children:[S(ke,{children:t("nutrition.protein")}),S(ke,{align:"right",children:$n(e.planned.protein,n.language)}),S(ke,{align:"right",children:$n(e.logged.protein,n.language)}),S(ke,{align:"right",children:$n(e.logged.protein-e.planned.protein,n.language)})]}),Q(ln,{children:[S(ke,{children:t("nutrition.carbohydrates")}),S(ke,{align:"right",children:$n(e.planned.carbohydrates,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydrates,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),Q(ln,{children:[S(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),S(ke,{align:"right",children:$n(e.planned.carbohydratesSugar,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydratesSugar,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),Q(ln,{children:[S(ke,{children:t("nutrition.fat")}),S(ke,{align:"right",children:$n(e.planned.fat,n.language)}),S(ke,{align:"right",children:$n(e.logged.fat,n.language)}),S(ke,{align:"right",children:$n(e.logged.fat-e.planned.fat,n.language)})]}),Q(ln,{children:[S(ke,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),S(ke,{align:"right",children:$n(e.planned.fatSaturated,n.language)}),S(ke,{align:"right",children:$n(e.logged.fatSaturated,n.language)}),S(ke,{align:"right",children:$n(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),Q(ln,{children:[S(ke,{children:t("nutrition.others")}),S(ke,{}),S(ke,{}),S(ke,{})]}),Q(ln,{children:[S(ke,{children:t("nutrition.fibres")}),S(ke,{align:"right",children:$n(e.planned.fiber,n.language)}),S(ke,{align:"right",children:$n(e.logged.fiber,n.language)}),S(ke,{align:"right",children:$n(e.logged.fiber-e.planned.fiber,n.language)})]}),Q(ln,{children:[S(ke,{children:t("nutrition.sodium")}),S(ke,{align:"right",children:$n(e.planned.sodium,n.language)}),S(ke,{align:"right",children:$n(e.logged.sodium,n.language)}),S(ke,{align:"right",children:$n(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},IZ=()=>{const[e]=je(),t=Ma(),n=parseInt(t.planId);if(Number.isNaN(n))return S("p",{children:"Please pass an integer as the nutritional plan id."});const r=new Date(t.date),o=JLe(n,t.date);return o.isLoading?S(Er,{}):S(ds,{title:e("nutrition.nutritionalDiary"),mainContent:S(Tt,{children:Q(Ft,{spacing:2,children:[S(at,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),S(jSt,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),S(pj,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*Zw(e){let t;e<=3?t=d2e:e<=5?t=u2e:t=c2e;for(const n of t)yield n}const BSt=e=>{const[t,n]=je(),r=Zw(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return S(nd,{width:"100%",height:300,children:Q(Nle,{children:[S(Gc,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:f,payload:h})=>{const m=u+(f-u)*.4,g=s+m*Math.cos(-c*i),y=l+m*Math.sin(-c*i);return S("text",{x:g,y,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:$n(h.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>S(Ev,{fill:r.next().value},`cell-${l}`))}),S(Oc,{})]})})},zSt=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=je(),a=Zw(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return S(nd,{width:"100%",height:300,children:Q($le,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[S(Uf,{strokeDasharray:"3 4"}),S(ls,{dataKey:"name"}),S(cs,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),S(ba,{formatter:l=>_i(l,i.language)}),S(Oc,{}),e&&S(Ac,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),S(Ac,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),S(Ac,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},VSt=e=>{const[t,n]=je();return S(Fc,{children:Q(Nc,{size:"small",children:[S(Ff,{children:Q(ln,{children:[S(ke,{children:t("date")}),S(ke,{align:"right",children:t("nutrition.logged")}),S(ke,{align:"right",children:t("nutrition.difference")})]})}),S(Lc,{children:Array.from(e.logged).map(([r])=>{var o,i;return Q(ln,{children:[S(ke,{children:S(Ro,{to:cn(Qt.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcal",{value:_i((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),S(ke,{align:"right",children:_i(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},HSt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Ko,{})}),S(Bi,{title:e("add"),isOpen:t,closeFn:o,children:S(RV,{closeFn:o})})]})},USt=e=>{const[t]=je(),[n,r]=J.useState(!1),o=()=>r(!0),i=()=>r(!1);return Q("div",{children:[S(Lh,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:S(lw,{})}),S(Bi,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:S(MV,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},Ppe=({meal:e,planId:t,closeFn:n})=>{const[r,o]=je(),i=iFe(t),a=sFe(t),s=Wo({name:Ho().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:Xs().required()});return S(Ti,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:Dx(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>S(fi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),S(Ys,{dateAdapter:zl,adapterLocale:o.language,children:S(HF,{label:r("timeOfDay"),value:l.values.time!==null?xt.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),Q(Ft,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&S(ct,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),S(ct,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},GSt=e=>{const[t]=je(),n=Zw(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return S(nd,{width:"100%",height:150,children:Q($le,{data:r,layout:"vertical",margin:{left:60},children:[S(Uf,{strokeDasharray:"3 4"}),S(ls,{type:"number",unit:"%"}),S(cs,{type:"category",dataKey:"name"}),S(Ac,{dataKey:"value",unit:"%",fill:n.next().value})]})})},Ape=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=je(),i=lFe(e),a=cFe(e),s=uFe(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=Wo({amount:Do().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:Do().required(o("forms.fieldRequired"))});return S(Ti,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const f={...u,meal:n,weight_unit:null};t?a.mutate({...f,id:t.id}):i.mutate(f),r&&r()},children:u=>{var f;return S(fi,{children:Q(Ft,{spacing:2,children:[S(vV,{callback:h=>u.setFieldValue("ingredient",h?h.data.id:null),initialIngredient:t?(f=t.ingredient)==null?void 0:f.name:null}),S(dn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:S(So,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),Q(Ft,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&S(ct,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&S(ct,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),S(ct,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},qSt=e=>{const t=oie(e.planId),n=aFe(e.planId),[r]=je(),[o,i]=J.useState(!1),[a,s]=x.useState(null),[l,c]=x.useState(!1),[u,f]=x.useState(!1),h=!!a,m=D=>{s(D.currentTarget)},g=()=>{y(),C()},y=()=>{s(null)},v=()=>{I(),s(null)},w=()=>{n.mutate(e.meal.id)},C=()=>c(!0),E=()=>c(!1),I=()=>f(!0),O=()=>f(!1),P=(D,M)=>{M!=="clickaway"&&i(!1)},R=()=>{const D=e.meal.items.map(M=>({plan:e.planId,meal:e.meal.id,mealItem:M.id,ingredient:M.ingredientId,weight_unit:M.weightUnitId,datetime:new Date().toISOString(),amount:M.amount}));t.mutate(D),i(!0)};return Q(Tt,{children:[!e.onlyLogging&&S(Go,{title:r("nutrition.logThisMeal"),children:S(pn,{"aria-label":"settings",onClick:R,children:S(lw,{})})}),S(pn,{"aria-label":"settings",onClick:m,children:S(ode,{})}),S(pn,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?S(nde,{}):S(rde,{})}),Q(ss,{anchorEl:a,open:h,onClose:y,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Jt,{onClick:g,children:r("edit")}),S(Jt,{onClick:v,children:r("delete")})]}),S(Bi,{title:r("edit"),isOpen:l,closeFn:E,children:S(Ppe,{meal:e.meal,closeFn:E,planId:e.planId})}),S(XP,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:O,deleteFn:w}),S(dI,{open:o,autoHideDuration:EI,onClose:P,children:S(Ci,{onClose:P,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},WSt=e=>{var o,i,a,s;const[t,n]=x.useState(!1),r=()=>n(!t);return Q(Tt,{children:[Q(Co,{children:[S(fB,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:S(Kl,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:S(Ju,{})})}),S(Wr,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),S(aa,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:S(Co,{children:S(Wr,{children:S(Ape,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},PZ=e=>{const t=Lr(),n=e.meal.id!==bE,[r]=je(),[o,i]=x.useState(!1),a=()=>i(!o),[s,l]=x.useState(!1),c=()=>{l(!s),f(!1)},[u,f]=x.useState(!1),h=()=>{f(!u),l(!1)};return Q(ho,{children:[S(Jl,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==bE&&S(qSt,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),Q(Fi,{sx:{paddingY:0},children:[Q(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&S(pj,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),S(at,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&S(GSt,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),S(pj,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&S(ai,{children:e.meal.items.map(m=>S(WSt,{mealItem:m,planId:e.planId,mealId:e.meal.id},m.id))})]}),Q(ll,{children:[!e.onlyLogging&&S(Go,{title:r("nutrition.addMealItem"),children:S(pn,{onClick:c,children:S(Ko,{})})}),S(Go,{title:r("nutrition.addNutritionalDiary"),children:S(pn,{onClick:h,children:S(lw,{})})})]}),S(aa,{in:s,timeout:"auto",unmountOnExit:!0,children:Q(Fi,{sx:{paddingY:0},children:[S("p",{children:S("b",{children:r("nutrition.addMealItem")})}),S(Ape,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),S(aa,{in:u,timeout:"auto",unmountOnExit:!0,children:Q(Fi,{sx:{paddingY:0},children:[S("p",{children:S("b",{children:r("nutrition.addNutritionalDiary")})}),S(MV,{closeFn:h,planId:e.planId,mealId:e.meal.id!==bE?e.meal.id:null})]})})]})},AZ=e=>{const[t,n]=je();return S(Fc,{children:Q(Nc,{size:"small",children:[S(Ff,{children:Q(ln,{children:[S(ke,{children:t("nutrition.macronutrient")}),S(ke,{align:"right",children:t("total")}),S(ke,{align:"right",children:t("nutrition.percentEnergy")})]})}),Q(Lc,{children:[Q(ln,{children:[S(ke,{children:t("nutrition.energy")}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:_i(e.values.energy,n.language),kj:_i(e.values.energyKj,n.language)})}),S(ke,{align:"right"})]}),Q(ln,{children:[S(ke,{children:t("nutrition.protein")}),S(ke,{align:"right",children:$n(e.values.protein,n.language)}),S(ke,{align:"right",children:JR(e.values.percent.protein,n.language)})]}),Q(ln,{children:[S(ke,{children:t("nutrition.carbohydrates")}),S(ke,{align:"right",children:$n(e.values.carbohydrates,n.language)}),S(ke,{align:"right",children:JR(e.values.percent.carbohydrates,n.language)})]}),Q(ln,{children:[S(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),S(ke,{align:"right",children:$n(e.values.carbohydratesSugar,n.language)}),S(ke,{align:"right"})]}),Q(ln,{children:[S(ke,{children:t("nutrition.fat")}),S(ke,{align:"right",children:$n(e.values.fat,n.language)}),S(ke,{align:"right",children:JR(e.values.percent.fat,n.language)})]}),Q(ln,{children:[S(ke,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),S(ke,{align:"right",children:$n(e.values.fatSaturated,n.language)}),S(ke,{align:"right"})]}),Q(ln,{children:[S(ke,{children:t("nutrition.others")}),S(ke,{children:" "}),S(ke,{align:"right"})]}),Q(ln,{children:[S(ke,{children:t("nutrition.fibres")}),S(ke,{align:"right",children:$n(e.values.fiber,n.language)}),S(ke,{align:"right"})]}),Q(ln,{children:[S(ke,{children:t("nutrition.sodium")}),S(ke,{align:"right",children:$n(e.values.sodium,n.language)}),S(ke,{align:"right"})]})]})]})})},KSt=e=>{const t=eFe(e.plan.id),n=id(),[r,o]=je(),[i,a]=J.useState(null),[s,l]=J.useState(!1),[c,u]=J.useState(!1),f=!!i,h=R=>{a(R.currentTarget)},m=()=>{g(),E()},g=()=>{a(null)},y=()=>{O(),a(null)},v=()=>{t.mutate(e.plan.id),n(cn(Qt.NUTRITION_OVERVIEW))},w=()=>window.location.href=cn(Qt.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),C=()=>window.location.href=cn(Qt.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),E=()=>l(!0),I=()=>l(!1),O=()=>u(!0),P=()=>u(!1);return Q(Tt,{children:[S(ct,{onClick:h,children:S(kV,{})}),Q(ss,{anchorEl:i,open:f,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Jt,{onClick:m,children:r("edit")}),S(Jt,{onClick:w,children:r("downloadAsPdf")}),S(Jt,{onClick:C,children:r("nutrition.copyPlan")}),S(Jt,{onClick:y,children:r("delete")})]}),S(Bi,{title:r("edit"),isOpen:s,closeFn:I,children:S(RV,{plan:e.plan,closeFn:I})}),S(XP,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:P,deleteFn:v})]})},YSt=e=>{const[t]=je(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return S(Tt,{children:Q(Ft,{direction:"column",spacing:1,children:[S(at,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),S(Lg,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),S(Lg,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),S(Lg,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},QSt=()=>{const[e]=je(),t=Ma(),n=parseInt(t.planId??"");if(Number.isNaN(n))return S("p",{children:"Please pass an integer as the nutritional plan id."});const r=XLe(n),[o,i]=x.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?S(Er,{}):S(ds,{title:s.description,optionsMenu:S(KSt,{plan:s}),mainContent:S(Tt,{children:Q(Ft,{spacing:2,children:[s.meals.map(l=>S(PZ,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),S(PZ,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&Q(Tt,{children:[S(Go,{title:e("nutrition.addMeal"),children:S(pn,{onClick:a,children:S(Ko,{})})}),Q(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:[S("p",{children:S("b",{children:e("nutrition.addMeal")})}),S(Ppe,{planId:s.id,closeFn:a})]})]}),S(AZ,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&S(BSt,{data:s.plannedNutritionalValues}),S(at,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),S(zSt,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),S(AZ,{values:s.loggedNutritionalValuesToday}),S(VSt,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:S(YSt,{plan:s}),fab:S(USt,{plan:s})})},XSt=()=>{var n;const e=YLe(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("nutrition.plans"),mainContent:Q(Ft,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&S(Bh,{}),S(ZSt,{plans:e.data})]}),fab:S(HSt,{})})},JSt=e=>{const[t,n]=je(),r=cn(Qt.NUTRITION_DETAIL,n.language,{id:e.plan.id});return Q(Tt,{children:[S(Co,{sx:{p:0},children:Q(Fl,{component:"a",href:r,children:[S(Wr,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.end?`${e.plan.start.toLocaleDateString()} – ${e.plan.end.toLocaleDateString()}`:`${e.plan.start.toLocaleDateString()}`}),S(ede,{})]})}),S(ji,{component:"li"})]})},ZSt=e=>S(go,{children:S(ai,{sx:{py:0},children:e.plans.map(t=>S(JSt,{plan:t},t.id))},"abc")});function Xu(e){const[t,n]=us(e.fieldName),r=e.fullwidth??!0;return S(dn,{fullWidth:r,id:e.fieldName,label:e.title,variant:"standard",error:n.touched&&!!n.error,helperText:n.touched&&n.error,...t,...e.fieldProps})}const ewt=e=>{const{t}=je(),n=Nw(e.routineId),r=[{value:"normal",label:t("routines.set.normalSet")},{value:"dropset",label:t("routines.set.dropSet")},{value:"myo",label:t("routines.set.myo")},{value:"partial",label:t("routines.set.partial")},{value:"forced",label:t("routines.set.forced")},{value:"tut",label:t("routines.set.tut")},{value:"iso",label:t("routines.set.iso")},{value:"jump",label:t("routines.set.jump")}],o=i=>{n.mutate({id:e.slotEntry.id,type:i})};return S(Tt,{children:S(dn,{fullWidth:!0,select:!0,label:t("routines.set.type"),variant:"standard",value:e.slotEntry.type,disabled:n.isPending,onChange:i=>o(i.target.value),children:r.map(i=>S(Jt,{value:i.value,children:i.label},i.value))})})},twt=e=>{var a;const{t}=je(),n=Nw(e.routineId),r=hst();if(r.isLoading)return S(gh,{});const o=(a=r.data)==null?void 0:a.map(s=>({value:s.id,label:s.name})),i=s=>{n.mutate({id:e.slotEntry.id,repetition_unit:parseInt(s)})};return S(Tt,{children:S(dn,{fullWidth:!0,select:!0,label:t("unit"),variant:"standard",value:e.slotEntry.repetitionUnitId,disabled:n.isPending,onChange:s=>i(s.target.value),children:o.map(s=>S(Jt,{value:s.value,children:s.label},s.value))})})},nwt=e=>{var s;const{t}=je(),n=Nw(e.routineId),r=pst(),o=Ra();if(r.isLoading||o.isLoading)return S(gh,{});const i=(s=r.data)==null?void 0:s.map(l=>({value:l.id,label:l.name})),a=l=>{n.mutate({id:e.slotEntry.id,weight_unit:parseInt(l)})};return S(Tt,{children:S(dn,{fullWidth:!0,select:!0,label:t("unit"),variant:"standard",value:e.slotEntry.weightUnitId,disabled:n.isPending,onChange:l=>a(l.target.value),children:i.map(l=>S(Jt,{value:l.value,children:l.label},l.value))})})};function rwt(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const RO=e=>{const{t}=je(),n=Nw(e.routineId),r=NSt(),[o,i]=x.useState(e.initialValue===null?"":e.initialValue),a=x.useCallback(rwt(l=>{let c=parseFloat(l);Number.isNaN(c)&&(c=null);const u=e.rounding==="weight"?{weight_rounding:c}:{reps_rounding:c};e.editProfile?r.mutate(u):n.mutate({id:e.entryId,...u})},$re),[]),s=l=>{i(l),a(l)};return S(dn,{fullWidth:!0,label:e.rounding==="weight"?t("weight"):t("routines.reps"),variant:"standard",value:o,disabled:n.isPending||r.isPending,onChange:l=>s(l.target.value)})},mH=({routine:e,closeFn:t})=>{const[n,r]=je(),o=Mat(),i=Kue(e==null?void 0:e.id),a=id(),[s,l]=x.useState(e?xt.fromJSDate(e.start):xt.now()),[c,u]=x.useState(e?xt.fromJSDate(e.end):xt.now().plus({weeks:F$e})),f=c.diff(s,["weeks","days"]),h=Math.floor(f.weeks),m=Math.floor(f.days),g=Wo({name:Ho().required().max(Hq,n("forms.maxLength",{chars:Hq})).min(Vq,n("forms.minLength",{chars:Vq})),description:Ho().max(Uq,n("forms.maxLength",{chars:Uq})),start:Xs().required(),end:Xs().required().min(AP("start"),n("forms.endBeforeStart")).test("hasMinimumDuration",n("routines.minLengthRoutine",{number:Gq}),function(y){const v=this.parent.start;if(v&&y){const w=xt.fromJSDate(v);return xt.fromJSDate(y).diff(w,"weeks").weeks>=Gq}return!0}).test("hasMaximumDuration",n("routines.maxLengthRoutine",{number:qq}),function(y){const v=this.parent.start;if(v&&y){const w=xt.fromJSDate(v);return xt.fromJSDate(y).diff(w,"weeks").weeks<=qq}return!0}),fitInWeek:Lu()});return S(Ti,{initialValues:{name:e?e.name:"",description:e?e.description:"",start:s,end:c,fitInWeek:e?e.fitInWeek:!0},validationSchema:g,onSubmit:async y=>{var v,w,C,E;if(e)i.mutate({...y,fit_in_week:y.fitInWeek,start:(v=y.start)==null?void 0:v.toISODate(),end:(w=y.end)==null?void 0:w.toISODate(),id:e.id});else{const I=await o.mutateAsync({...y,fit_in_week:y.fitInWeek,start:(C=y.start)==null?void 0:C.toISODate(),end:(E=y.end)==null?void 0:E.toISODate()});a(cn(Qt.ROUTINE_EDIT,r.language,{id:I.id})),t&&t()}},children:y=>S(fi,{children:Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:5},children:S(Xu,{fieldName:"name",title:n("name")})}),S(me,{size:{xs:6,sm:3},children:S(Ys,{dateAdapter:zl,adapterLocale:r.language,children:S(Ih,{defaultValue:xt.now(),label:n("start"),value:s,onChange:v=>{v&&(y.setFieldValue("start",v),l(v))},slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.start&&!!y.errors.start,helperText:y.touched.start&&y.errors.start?String(y.errors.start):""}}})})}),S(me,{size:{xs:6,sm:3},children:S(Ys,{dateAdapter:zl,adapterLocale:r.language,children:S(Ih,{defaultValue:xt.now(),label:n("end"),value:c,onChange:v=>{v&&(y.setFieldValue("end",v),u(v))},slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.end&&!!y.errors.end,helperText:y.touched.end&&y.errors.end?String(y.errors.end):""}}})})}),S(me,{size:{xs:12,sm:1},sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:m===0?n("durationWeeks",{number:h}):n("durationWeeksDays",{nrWeeks:h,nrDays:m})}),S(me,{size:12,children:S(Xu,{fieldName:"description",title:n("description"),fieldProps:{multiline:!0,rows:4}})}),Q(me,{size:12,children:[S(os,{control:S(qo,{checked:y.values.fitInWeek,...y.getFieldProps("fitInWeek")}),label:n("routines.fitDaysInWeek")}),S(Go,{title:n("routines.fitDaysInWeekHelpText"),children:S(pn,{size:"small",children:S(IS,{fontSize:"inherit"})})})]}),S(me,{size:12,children:S(ct,{disabled:y.isSubmitting,color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("save")})})]})})})},owt=e=>{const t=Ra(),{t:n}=je(),[r,o]=J.useState(null),i=!!r,a=l=>{o(l.currentTarget)},s=()=>{o(null)};return Q(Ft,{direction:"row",children:[S(ct,{variant:"text",id:"basic-button","aria-controls":i?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":i?"true":void 0,onClick:a,children:n("routines.defaultRounding")}),Q(ss,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Jt,{children:S(RO,{routineId:e.routineId,rounding:"weight",editProfile:!0,initialValue:t.data.weightRounding})}),S(Jt,{children:S(RO,{routineId:e.routineId,rounding:"reps",editProfile:!0,initialValue:t.data.repetitionsRounding})})]}),S(Go,{title:n("routines.roundingHelp"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]})},iwt=()=>S(me,{container:!0,children:S(me,{size:6,offset:3,children:S(mH,{})})}),awt=e=>{const{t}=je(),n=Kue(e.routine.id),[r,o]=x.useState(e.routine.isTemplate),[i,a]=x.useState(e.routine.isPublic),s=u=>{const f=u&&i;o(u),a(f),c(u,f)},l=u=>{const f=u&&r;a(f),c(r,f)},c=(u,f)=>{n.mutate({id:e.routine.id,is_template:u,is_public:f})};return Q(me,{container:!0,spacing:2,children:[S(me,{size:12,children:Q(Ft,{children:[S(os,{disabled:n.isPending,control:S(qo,{checked:r,onChange:async()=>s(!r)}),label:t("routines.template")}),S(at,{variant:"caption",children:t("routines.templatesHelpText")})]})}),S(me,{size:12,children:Q(Ft,{children:[S(os,{disabled:n.isPending||!r,control:S(qo,{checked:i,onChange:async()=>l(!i)}),label:t("routines.publicTemplate")}),S(at,{variant:"caption",children:t("routines.publicTemplateHelpText")})]})})]})},swt=e=>{const t=id(),n=Rat(e.routine.id),[r,o]=je(),[i,a]=x.useState(null),[s,l]=x.useState(0),c=!!i,u=w=>{a(w.currentTarget)},f=()=>{l(1),y()},h=()=>{l(2),y()},m=async()=>{await n.mutateAsync(),t(cn(Qt.ROUTINE_OVERVIEW,o.language))},g=()=>{l(0)},y=()=>{a(null)},v=()=>window.location.href=cn(Qt.ROUTINE_EDIT,o.language,{id:e.routine.id});return Q("div",{children:[S(ct,{onClick:u,children:S(kV,{})}),Q(ss,{anchorEl:i,open:c,onClose:y,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Jt,{disabled:e.routine.isTemplate,onClick:v,children:r("edit")}),S(Jt,{component:Ro,to:cn(Qt.ROUTINE_DETAIL_TABLE,o.language,{id:e.routine.id}),children:"Table view"}),S(Jt,{component:Ro,to:cn(Qt.ROUTINE_LOGS_OVERVIEW,o.language,{id:e.routine.id}),children:r("routines.logsOverview")}),S(Jt,{component:Ro,to:cn(Qt.ROUTINE_STATS_OVERVIEW,o.language,{id:e.routine.id}),children:r("routines.statsOverview")}),S(Jt,{component:"a",href:cn(Qt.ROUTINE_COPY,o.language,{id:e.routine.id}),children:r("routines.duplicate")}),S(Jt,{onClick:h,children:r("routines.markAsTemplate")}),S(Jt,{component:"a",href:cn(Qt.ROUTINE_PDF_TABLE,o.language,{id:e.routine.id}),download:`Routine-${e.routine.id}-table.pdf`,children:r("routines.downloadPdfTable")}),S(Jt,{component:"a",href:cn(Qt.ROUTINE_PDF_LOGS,o.language,{id:e.routine.id}),download:`Routine-${e.routine.id}-logs.pdf`,children:r("routines.downloadPdfLogs")}),S(Jt,{component:"a",href:cn(Qt.ROUTINE_ICAL,o.language,{id:e.routine.id}),download:`Routine-${e.routine.id}-calendar.ics`,children:r("routines.downloadIcal")}),S(ji,{}),S(Jt,{onClick:f,children:r("delete")})]}),Q(Ix,{open:s===1,onClose:g,children:[S(ZE,{id:"alert-dialog-title",children:r("delete")}),S(Ax,{children:S(r6,{id:"alert-dialog-description",children:r("deleteConfirmation",{name:e.routine.name})})}),Q(Px,{children:[S(ct,{onClick:g,children:r("cancel")}),S(ct,{onClick:m,color:"error",autoFocus:!0,children:r("delete")})]})]}),Q(Ix,{open:s===2,onClose:g,children:[S(ZE,{children:r("routines.markAsTemplate")}),S(Ax,{children:S(r6,{children:S(awt,{routine:e.routine})})}),S(Px,{children:S(ct,{onClick:g,children:r("close")})})]})]})},lwt=()=>{const{t:e}=je(),t=Ma(),n=parseInt(t.routineId??"");if(Number.isNaN(n))return S("p",{children:"Please pass an integer as the routine id."});const r=Kc(n),o=r.data,i=`${o==null?void 0:o.start.toLocaleDateString()} - ${o==null?void 0:o.end.toLocaleDateString()} (${o==null?void 0:o.durationText})`,a=o!=null&&o.isTemplate?S(Wl,{color:"info",size:"small",label:e("routines.template")}):null;return S(RP,{query:r,child:r.isSuccess&&S(ds,{title:Q(Tt,{children:[o.name," ",a]}),subTitle:i,optionsMenu:S(swt,{routine:r.data}),mainContent:Q(Ft,{spacing:2,children:[o.description!==""&&S(at,{variant:"body2",sx:{whiteSpace:"pre-line"},children:o==null?void 0:o.description}),o.dayDataCurrentIteration.filter(s=>s.day!==null).map((s,l)=>S(BV,{routineId:n,dayData:s},l))]}),sideBar:Q(Ft,{children:[S(Zt,{height:40}),Q(me,{container:!0,children:[S(me,{size:6,children:S(Ql,{primaryMuscles:o.mainMuscles.filter(s=>s.isFront),secondaryMuscles:o.secondaryMuscles.filter(s=>s.isFront),isFront:!0})}),S(me,{size:6,children:S(Ql,{primaryMuscles:o.mainMuscles.filter(s=>!s.isFront),secondaryMuscles:o.secondaryMuscles.filter(s=>!s.isFront),isFront:!1})})]})]})})})},P$="RoutineDetailsTable",Tu={stickyColumn:`${P$}-stickyColumn`,stickyHeader:`${P$}-stickyHeader`,whiteBg:`${P$}-whiteBg`},cwt=ae(Uu)({[`& .${Tu.stickyColumn}`]:{position:"sticky",left:0,zIndex:1},[`& .${Tu.stickyHeader}`]:{position:"sticky",top:0,zIndex:2,background:"white"},[`& .${Tu.whiteBg}`]:{backgroundColor:"white"}}),uwt=()=>{const{t:e,i18n:t}=je(),n=Ma(),r=n.routineId?parseInt(n.routineId):0,o=Kc(r),i=Wue(r),[a,s]=J.useState(!1);return S(RP,{query:o,child:o.isSuccess&&S(Vw,{title:o.data.name,backToUrl:cn(Qt.ROUTINE_DETAIL,t.language,{id:r}),maxWidth:!1,children:Q(Ft,{children:[S(os,{control:S(qo,{checked:a,onChange:(l,c)=>s(c)}),label:e("routines.alsoShowLogs")}),S(Mpe,{routine:o.data,showLogs:a,logData:i.data})]})})})};function dwt(e,t,n){return e==null?null:t!=null&&n!==null&&n!==void 0?e<t?"lower":e>n?"higher":"match":t!=null?e<t?"lower":e>t?"higher":"match":null}const Mpe=e=>{const{t,i18n:n}=je(),r=Lr(),o=Yc(),i=e.showLogs??!1,a=e.logData??[];let s;o.isSuccess&&(s=Gu(n.language,o.data));const l={};for(const v of a)for(const w of v.logs)w.iteration!==null&&(l[w.iteration]||(l[w.iteration]=[]),l[w.iteration].push(w));const c=Object.keys(e.routine.groupedDayDataByIteration).map(v=>parseInt(v));function u(){return S(ln,{children:c.map(v=>{const w=v===1?S(ke,{className:Tu.stickyColumn}):null;return Q(J.Fragment,{children:[w,S(ke,{align:"center",children:t("routines.sets")}),S(ke,{align:"center",sx:{minWidth:40},children:t("routines.reps")}),S(ke,{align:"center",sx:{minWidth:40},children:t("weight")}),S(ke,{align:"center",sx:{minWidth:60},children:t("routines.restTime")}),S(ke,{align:"center",sx:{minWidth:40},children:t("routines.rir")})]},`header-${v}`)})})}function f(){return S(ln,{children:c.map(v=>{const w=v===1?S(ke,{className:Tu.stickyColumn}):null;return Q(J.Fragment,{children:[w,S(ke,{colSpan:5,children:S(at,{variant:"h6",children:t("routines.weekNr",{number:v})})})]},`header-iteration-${v}`)})})}function h(v,w){var I;const C={borderBottomWidth:i?0:null,minWidth:40};function E(O,P,R){return Q(Tt,{children:[O===null||P===null?"-/-":P,O!==null&&R!==null&&Q(Tt,{children:[" - ",R]})]})}return Q(ln,{children:[S(ke,{className:Tu.stickyColumn,sx:{minWidth:150,backgroundColor:"white",borderBottomWidth:i?0:null},children:(I=v.exercise)==null?void 0:I.getTranslation(s).name}),c.map(O=>{const P=e.routine.getSetConfigData(w.id,O,v.id);return Q(J.Fragment,{children:[S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.nrOfSets,P==null?void 0:P.maxNrOfSets)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.repetitions,P==null?void 0:P.maxRepetitions)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.weight,P==null?void 0:P.maxWeight)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.restTime,P==null?void 0:P.maxRestTime)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.rir,P==null?void 0:P.maxRir)})]},O)})]})}function m(v,w,C,E){const I=dwt(v,w,C);v===105&&console.log(v,w,C,E,I);const O=17;return E=E??!0,I===null?null:I==="lower"?S(Zst,{sx:{fontSize:O},color:E?"error":"success"}):I==="higher"?S(qst,{sx:{fontSize:O},color:E?"success":"error"}):S(Bst,{sx:{fontSize:O},color:"success"})}function g(v,w){return Q(ln,{children:[S(ke,{sx:{verticalAlign:"top",backgroundColor:"white"},className:Tu.stickyColumn,children:S("small",{children:t("nutrition.logged")})}),c.map(C=>{const E=e.routine.getSetConfigData(w.id,C,v.id),O=(l[C]??[]).filter(P=>P.slotEntryId===v.id);return Q(J.Fragment,{children:[S(ke,{align:"center",sx:{verticalAlign:"top"}}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.repetitions??"-/-",m(P.repetitions,E==null?void 0:E.repetitions,E==null?void 0:E.maxRepetitions)]})},R))}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.weight??"-/-",m(P.weight,E==null?void 0:E.weight,E==null?void 0:E.maxWeight)]})},R))}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.restTime??"-/-",m(P.restTime,E==null?void 0:E.restTime,E==null?void 0:E.maxRestTime)]})},R))}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.rir??"-/-",m(P.rir,E==null?void 0:E.rir,E==null?void 0:E.maxRir,!1)]})},R))})]},C)})]})}function y(){return S(Tt,{children:e.routine.days.map(v=>Q(J.Fragment,{children:[Q(ln,{children:[S(ke,{sx:{backgroundColor:r.palette.action.hover},className:Tu.stickyColumn,children:S("b",{children:v.getDisplayName()})}),S(ke,{sx:{backgroundColor:r.palette.action.hover},colSpan:5*c.length})]}),v.slots.map((w,C)=>S(J.Fragment,{children:w.entries.map((E,I)=>Q(J.Fragment,{children:[h(E,v),i&&g(E,v)]},I))},C))]},v.id))})}return S(cwt,{maxWidth:!1,sx:{overflowX:"scroll",display:"flex",height:"80vh"},children:S(Fc,{children:Q(Nc,{size:"small",children:[Q(Ff,{className:Tu.stickyHeader,children:[f(),u()]}),S(Lc,{children:y()})]})})})};function Ki(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var fwt=typeof Symbol=="function"&&Symbol.observable||"@@observable",MZ=fwt,RZ=()=>Math.random().toString(36).substring(7).split("").join("."),pwt={INIT:`@@redux/INIT${RZ()}`,REPLACE:`@@redux/REPLACE${RZ()}`},DZ=pwt;function hwt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Rpe(e,t,n){if(typeof e!="function")throw new Error(Ki(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ki(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ki(1));return n(Rpe)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((v,w)=>{a.set(w,v)}))}function u(){if(l)throw new Error(Ki(3));return o}function f(v){if(typeof v!="function")throw new Error(Ki(4));if(l)throw new Error(Ki(5));let w=!0;c();const C=s++;return a.set(C,v),function(){if(w){if(l)throw new Error(Ki(6));w=!1,c(),a.delete(C),i=null}}}function h(v){if(!hwt(v))throw new Error(Ki(7));if(typeof v.type>"u")throw new Error(Ki(8));if(typeof v.type!="string")throw new Error(Ki(17));if(l)throw new Error(Ki(9));try{l=!0,o=r(o,v)}finally{l=!1}return(i=a).forEach(C=>{C()}),v}function m(v){if(typeof v!="function")throw new Error(Ki(10));r=v,h({type:DZ.REPLACE})}function g(){const v=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Ki(11));function C(){const I=w;I.next&&I.next(u())}return C(),{unsubscribe:v(C)}},[MZ](){return this}}}return h({type:DZ.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:m,[MZ]:g}}function kZ(e,t){return function(...n){return t(e.apply(this,n))}}function _Z(e,t){if(typeof e=="function")return kZ(e,t);if(typeof e!="object"||e===null)throw new Error(Ki(16));const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=kZ(o,t))}return n}function Dpe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function mwt(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(Ki(15))};const a={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=Dpe(...s)(o.dispatch),{...o,dispatch:i}}}var A$={exports:{}},M$={};/**
+`}${a}`.trim()}function cZ(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function hbt(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{cZ(e)}):cZ(e)}function mbt(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const gbt=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=x.useCallback(a=>{if(!$gt(a)||mbt(a.target))return;let s="";if(GP(e)>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=va(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=ppe(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(hbt(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);zfe(e,()=>e.current.rootElementRef.current,"keydown",i),sr(e,"clipboardCopy",t.onClipboardCopy)},ybt=e=>z({},e,{columnMenu:{open:!1}}),vbt=e=>{const t=Qo(e,"useGridColumnMenu"),n=x.useCallback(a=>{const s=kE(e),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),z({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences())},[e,t]),r=x.useCallback(()=>{const a=kE(e);if(a.field){const c=ud(e),u=Fl(e),f=Dc(e);let p=a.field;if(c[p]||(p=f[0]),u[p]===!1){const m=f.filter(y=>y===p?!0:u[y]!==!1),g=m.indexOf(p);p=m[g+1]||m[g-1]}e.current.setColumnHeaderFocus(p)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&e.current.setState(c=>(t.debug("Hiding Column Menu"),z({},c,{columnMenu:s})))},[e,t]),o=x.useCallback(a=>{t.debug("Toggle Column Menu");const s=kE(e);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);yn(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),At(e,"columnResizeStart",r),At(e,"virtualScrollerWheel",e.current.hideColumnMenu),At(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},bbt=(e,t,n)=>{var o,i,a;const r=fg({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return z({},e,{columns:r,pinnedColumns:e.pinnedColumns??CO})};function xbt(e,t){var A,_;const n=Qo(e,"useGridColumns"),r=x.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Fl,changeEvent:"columnVisibilityModelChange"});const o=x.useCallback(N=>{n.debug("Updating columns state."),e.current.setState(uZ(N)),e.current.publishEvent("columnsChange",N.orderedFields)},[n,e]),i=x.useCallback(N=>ud(e)[N],[e]),a=x.useCallback(()=>ql(e),[e]),s=x.useCallback(()=>Yr(e),[e]),l=x.useCallback((N,B=!0)=>(B?Yr(e):ql(e)).findIndex(j=>j.field===N),[e]),c=x.useCallback(N=>{const B=l(N);return Xf(e)[B]},[e,l]),u=x.useCallback(N=>{var H,j;Fl(e)!==N&&(e.current.setState(L=>z({},L,{columns:fg({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:N,keepOnlyColumnsToUpsert:!1})})),(j=(H=e.current).updateRenderContext)==null||j.call(H))},[e]),f=x.useCallback(N=>{if(kh(e)){e.current.updateNonPivotColumns(N);return}const B=fg({apiRef:e,columnsToUpsert:N,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});o(B)},[e,o]),p=x.useCallback((N,B)=>{const H=Fl(e),j=H[N]??!0;if(B!==j){const L=z({},H,{[N]:B});e.current.setColumnVisibilityModel(L)}},[e]),m=x.useCallback(N=>Dc(e).findIndex(H=>H===N),[e]),g=x.useCallback((N,B)=>{const H=Dc(e),j=m(N);if(j===B)return;n.debug(`Moving column ${N} to index ${B}`);const L=[...H],V=L.splice(j,1)[0];L.splice(B,0,V),o(z({},Gl(e),{orderedFields:L}));const W={column:e.current.getColumn(N),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(N),oldIndex:j};e.current.publishEvent("columnIndexChange",W)},[e,n,o,m]),y=x.useCallback((N,B)=>{n.debug(`Updating column ${N} width to ${B}`);const H=Gl(e),j=H.lookup[N],L=z({},j,{width:B,hasBeenResized:!0});o(rj(z({},H,{lookup:z({},H.lookup,{[N]:L})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(N),colDef:L,width:B})},[e,n,o]),v={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:m,updateColumns:f,setColumnVisibilityModel:u,setColumnVisibility:p,setColumnWidth:y},w={setColumnIndex:g};yn(e,v,"public"),yn(e,w,t.signature===Ul.DataGrid?"private":"public");const C=x.useCallback((N,B)=>{var K,G;const H={},j=Fl(e);(!B.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((G=(K=t.initialState)==null?void 0:K.columns)==null?void 0:G.columnVisibilityModel)??{}).length>0||Object.keys(j).length>0)&&(H.columnVisibilityModel=j),H.orderedFields=Dc(e);const V=ql(e),W={};return V.forEach(q=>{if(q.hasBeenResized){const Y={};jfe.forEach(Z=>{let ie=q[Z];ie===1/0&&(ie=-1),Y[Z]=ie}),W[q.field]=Y}}),Object.keys(W).length>0&&(H.dimensions=W),z({},N,{columns:H})},[e,t.columnVisibilityModel,(A=t.initialState)==null?void 0:A.columns]),E=x.useCallback((N,B)=>{var V;const H=(V=B.stateToRestore.columns)==null?void 0:V.columnVisibilityModel,j=B.stateToRestore.columns;if(H==null&&j==null)return N;const L=fg({apiRef:e,columnsToUpsert:[],initialState:j,columnVisibilityModel:H,keepOnlyColumnsToUpsert:!1});return e.current.setState(uZ(L)),j!=null&&e.current.publishEvent("columnsChange",L.orderedFields),N},[e]),I=x.useCallback((N,B)=>{var H;if(B===oa.columns){const j=t.slots.columnsPanel;return k.jsx(j,z({},(H=t.slotProps)==null?void 0:H.columnsPanel))}return N},[t.slots.columnsPanel,(_=t.slotProps)==null?void 0:_.columnsPanel]),O=x.useCallback(N=>{const B=kh(e);return t.disableColumnSelector||B?N:[...N,"columnMenuColumnsItem"]},[t.disableColumnSelector,e]);Hr(e,"columnMenu",O),Hr(e,"exportState",C),Hr(e,"restoreState",E),Hr(e,"preferencePanel",I);const P=x.useRef(null);At(e,"viewportInnerSizeChange",N=>{if(P.current!==N.width){if(P.current=N.width,!Yr(e).some(H=>H.flex&&H.flex>0))return;o(rj(Gl(e),e.current.getRootDimensions()))}});const D=x.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const N=fg({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[e,n,o]);fH(e,"hydrateColumns",D);const M=x.useRef(!0);x.useEffect(()=>{if(M.current){M.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const N=fg({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0});r.current=t.columns,o(N)},[n,e,o,t.columns]),x.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function uZ(e){return t=>z({},t,{columns:e})}const Sbt=(e,t)=>{var n;return z({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},wbt=(e,t)=>{var s;const n=Qo(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Tg,changeEvent:"densityChange"});const o={setDensity:Je(l=>{Tg(e)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>z({},u,{density:l})))})};yn(e,o,"public");const i=x.useCallback((l,c)=>{var p;const u=Tg(e);return!c.exportOnlyDirtyModels||t.density!=null||((p=t.initialState)==null?void 0:p.density)!=null?z({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=x.useCallback((l,c)=>{var f;const u=(f=c.stateToRestore)!=null&&f.density?c.stateToRestore.density:Tg(e);return e.current.setState(p=>z({},p,{density:u})),l},[e]);Hr(e,"exportState",i),Hr(e,"restoreState",a),x.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function Cbt(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const hpe=({apiRef:e,options:t})=>{const n=ql(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:Yr(e)).filter(o=>!o.disableExport)},mpe=({apiRef:e})=>{var l,c;const t=Sfe(e),n=wi(e),r=GP(e),o=t.filter(u=>n[u].type!=="footer"),i=Bv(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];if(o.unshift(...a),o.push(...s),r>0){const u=Efe(e);return o.filter(f=>u.has(f))}return o},Ebt=(e,t)=>{const n=Qo(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=x.useCallback((c={})=>{n.debug("Get data as CSV");const u=hpe({apiRef:e,options:c}),p=(c.getRowsToExport??mpe)({apiRef:e});return pbt({columns:u,rowIds:p,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=x.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),f=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});Cbt(f,"csv",c==null?void 0:c.fileName)},[n,i]);yn(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=x.useCallback((c,u)=>{var f;return(f=u.csvOptions)!=null&&f.disableToolbarButton?c:[...c,{component:k.jsx(Gyt,{options:u.csvOptions}),componentName:"csvExport"}]},[]);Hr(e,"exportMenu",l)};function Tbt(e,t){const n=[],r=t.querySelectorAll("style, link[rel='stylesheet']");for(let o=0;o<r.length;o+=1){const i=r[o];if(i.tagName==="STYLE"){const a=e.createElement(i.tagName),s=i.sheet;if(s){let l="";for(let c=0;c<s.cssRules.length;c+=1)typeof s.cssRules[c].cssText=="string"&&(l+=`${s.cssRules[c].cssText}\r
+`);a.appendChild(e.createTextNode(l)),e.head.appendChild(a)}}else if(i.getAttribute("href")){const a=e.createElement(i.tagName);for(let s=0;s<i.attributes.length;s+=1){const l=i.attributes[s];l&&a.setAttribute(l.nodeName,l.nodeValue||"")}n.push(new Promise(s=>{a.addEventListener("load",()=>s())})),e.head.appendChild(a)}}return n}const $E=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=Ife(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=i===-1?0:kft(r.page,s);return l!==r.page&&(r=z({},r,{page:l})),Afe(r.pageSize,t),r},Obt=(e,t)=>{var C,E;const n=Qo(e,"useGridPaginationModel"),r=Ge(e,Fv),o=x.useRef(Bo(e)),i=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:ri,changeEvent:"paginationModelChange"});const a=x.useCallback(I=>{const O=ri(e);I!==O.page&&(n.debug(`Setting page to ${I}`),e.current.setPaginationModel({page:I,pageSize:O.pageSize}))},[e,n]),s=x.useCallback(I=>{const O=ri(e);I!==O.pageSize&&(n.debug(`Setting page size to ${I}`),e.current.setPaginationModel({pageSize:I,page:O.page}))},[e,n]),l=x.useCallback(I=>{const O=ri(e);I!==O&&(n.debug("Setting 'paginationModel' to",I),e.current.setState(P=>z({},P,{pagination:z({},P.pagination,{paginationModel:$E(P.pagination,t.signature,I)})}),"setPaginationModel"))},[e,n,t.signature]);yn(e,{setPage:a,setPageSize:s,setPaginationModel:l},"public");const u=x.useCallback((I,O)=>{var D,M;const P=ri(e);return!O.exportOnlyDirtyModels||t.paginationModel!=null||((M=(D=t.initialState)==null?void 0:D.pagination)==null?void 0:M.paginationModel)!=null||P.page!==0&&P.pageSize!==Dft(t.autoPageSize)?z({},I,{pagination:z({},I.pagination,{paginationModel:P})}):I},[e,t.paginationModel,(E=(C=t.initialState)==null?void 0:C.pagination)==null?void 0:E.paginationModel,t.autoPageSize]),f=x.useCallback((I,O)=>{var R,D;const P=(R=O.stateToRestore.pagination)!=null&&R.paginationModel?z({},Pfe(t.autoPageSize),(D=O.stateToRestore.pagination)==null?void 0:D.paginationModel):ri(e);return e.current.setState(M=>z({},M,{pagination:z({},M.pagination,{paginationModel:$E(M.pagination,t.signature,P)})}),"stateRestorePreProcessing"),I},[e,t.autoPageSize,t.signature]);Hr(e,"exportState",u),Hr(e,"restoreState",f);const p=()=>{var O;const I=ri(e);(O=e.current.virtualScrollerRef)!=null&&O.current&&e.current.scrollToIndexes({rowIndex:I.page*I.pageSize})},m=x.useCallback(()=>{if(!t.autoPageSize)return;const I=e.current.getRootDimensions(),O=Math.floor(I.viewportInnerSize.height/i);e.current.setPageSize(O)},[e,t.autoPageSize,i]),g=x.useCallback(I=>{if(I==null)return;const O=ri(e);if(O.page===0)return;const P=Dfe(e);O.page>P-1&&e.current.setPage(Math.max(0,P-1))},[e]),y=x.useCallback(()=>{ri(e).page!==0&&e.current.setPage(0),e.current.getScrollPosition().top!==0&&e.current.scroll({top:0})},[e]),v=x.useCallback(I=>{const O=z({},I,{items:ZV(e)});Js(O,o.current)||(o.current=O,y())},[e,y]);At(e,"viewportInnerSizeChange",m),At(e,"paginationModelChange",p),At(e,"rowCountChange",g),At(e,"sortModelChange",y),At(e,"filterModelChange",v);const w=x.useRef(!0);x.useEffect(()=>{if(w.current){w.current=!1;return}t.pagination&&e.current.setState(I=>z({},I,{pagination:z({},I.pagination,{paginationModel:$E(I.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.signature,t.pagination]),x.useEffect(()=>{e.current.setState(I=>{const O=t.pagination===!0;return I.pagination.paginationMode===t.paginationMode||I.pagination.enabled===O?I:z({},I,{pagination:z({},I.pagination,{paginationMode:t.paginationMode,enabled:t.pagination===!0})})})},[e,t.paginationMode,t.pagination]),x.useEffect(m,[m])};function Ibt(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function Pbt(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const Abt=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=Qo(e,"useGridPrintExport"),o=x.useRef(null),i=x.useRef(null),a=x.useRef({}),s=x.useRef([]),l=x.useRef(null);x.useEffect(()=>{o.current=Mr(e.current.rootElementRef.current)},[e,n]);const c=x.useCallback((v,w,C)=>new Promise(E=>{const I=hpe({apiRef:e,options:{fields:v,allColumns:w}}).map(R=>R.field),O=ql(e),P={};O.forEach(R=>{P[R.field]=I.includes(R.field)}),C&&(P[Gv.field]=!0),e.current.setColumnVisibilityModel(P),E()}),[e]),u=x.useCallback(v=>{const C=v({apiRef:e}).reduce((E,I)=>{const O=e.current.getRow(I);return O[Yy]||E.push(O),E},[]);e.current.setRows(C)},[e]),f=x.useCallback((v,w)=>{var j,L,V;const C=z({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},w),E=v.contentDocument;if(!E)return;const I=Qw(e),O=e.current.rootElementRef.current,P=O.cloneNode(!0),R=P.querySelector(`.${ee.main}`);R.style.overflow="visible",P.style.contain="size";let D=((j=O.querySelector(`.${ee.toolbarContainer}`))==null?void 0:j.offsetHeight)||0,M=((L=O.querySelector(`.${ee.footerContainer}`))==null?void 0:L.offsetHeight)||0;const A=P.querySelector(`.${ee.footerContainer}`);C.hideToolbar&&((V=P.querySelector(`.${ee.toolbarContainer}`))==null||V.remove(),D=0),C.hideFooter&&A&&(A.remove(),M=0);const _=I.currentPageTotalHeight+oH(e,t)+D+M;P.style.height=`${_}px`,P.style.boxSizing="content-box",!C.hideFooter&&A&&(A.style.position="absolute",A.style.width="100%",A.style.top=`${_-M}px`);const N=document.createElement("div");N.appendChild(P),E.body.style.marginTop="0px",E.body.innerHTML=N.innerHTML;const B=typeof C.pageStyle=="function"?C.pageStyle():C.pageStyle;if(typeof B=="string"){const W=E.createElement("style");W.appendChild(E.createTextNode(B)),E.head.appendChild(W)}C.bodyClassName&&E.body.classList.add(...C.bodyClassName.split(" "));let H=[];if(C.copyStyles){const W=O.getRootNode(),K=W.constructor.name==="ShadowRoot"?W:o.current;H=Tbt(E,K)}Promise.all(H).then(()=>{v.contentWindow.print()})},[e,o,t]),p=x.useCallback(v=>{var w,C;o.current.body.removeChild(v),e.current.restoreState(i.current||{}),(C=(w=i.current)==null?void 0:w.columns)!=null&&C.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(E=>z({},E,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),g={exportDataAsPrint:x.useCallback(async v=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=Fl(e),s.current=e.current.getSortedRows().filter(C=>!C[Yy]),t.pagination){const E={page:0,pageSize:XV(e)};e.current.setState(I=>z({},I,{pagination:z({},I.pagination,{paginationModel:$E(I.pagination,"DataGridPro",E)})}))}l.current=e.current.state.virtualization,e.current.setState(C=>z({},C,{virtualization:z({},C.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(v==null?void 0:v.fields,v==null?void 0:v.allColumns,v==null?void 0:v.includeCheckboxes),u((v==null?void 0:v.getRowsToExport)??mpe),await Ibt();const w=Pbt(v==null?void 0:v.fileName);w.onload=()=>{f(w,v),w.contentWindow.matchMedia("print").addEventListener("change",E=>{E.matches===!1&&p(w)})},o.current.body.appendChild(w)},[t,r,e,f,p,c,u])};yn(e,g,"public");const y=x.useCallback((v,w)=>{var C;return(C=w.printOptions)!=null&&C.disableToolbarButton?v:[...v,{component:k.jsx(qyt,{options:w.printOptions}),componentName:"printExport"}]},[]);Hr(e,"exportMenu",y)},Mbt=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??AS();return z({},e,{filter:z({filterModel:WV(r,t.disableMultipleColumnsFiltering,n)},ife),visibleRowsLookup:{}})},Rbt=e=>e.filteredRowsLookup;function dZ(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function Dbt(){return Bde(Object.values)}const kbt=(e,t)=>{var D,M,A;const n=Qo(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Bo,changeEvent:"filterModelChange"});const r=x.useCallback(()=>{e.current.setState(_=>{const N=Bo(e),B=e.current.getFilterState(N),H=z({},_,{filter:z({},_.filter,B)}),j=dZ(e,H);return z({},H,{visibleRowsLookup:j})}),e.current.publishEvent("filteredRowsSet")},[e]),o=x.useCallback((_,N)=>N==null||N.filterable===!1||t.disableColumnFilter?_:[..._,"columnMenuFilterItem"],[t.disableColumnFilter]),i=x.useCallback(_=>{const N=Bo(e),B=[...N.items],H=B.findIndex(j=>j.id===_.id);H===-1?B.push(_):B[H]=_,e.current.setFilterModel(z({},N,{items:B}),"upsertFilterItem")},[e]),a=x.useCallback(_=>{const N=Bo(e),B=[...N.items];_.forEach(H=>{const j=B.findIndex(L=>L.id===H.id);j===-1?B.push(H):B[j]=H}),e.current.setFilterModel(z({},N,{items:B}),"upsertFilterItems")},[e]),s=x.useCallback(_=>{const N=Bo(e),B=N.items.filter(H=>H.id!==_.id);B.length!==N.items.length&&e.current.setFilterModel(z({},N,{items:B}),"deleteFilterItem")},[e]),l=x.useCallback((_,N,B)=>{if(n.debug("Displaying filter panel"),_){const H=Bo(e),j=H.items.filter(K=>{var Z;if(K.value!==void 0)return!(Array.isArray(K.value)&&K.value.length===0);const q=(Z=e.current.getColumn(K.field).filterOperators)==null?void 0:Z.find(ie=>ie.value===K.operator);return!(typeof(q==null?void 0:q.requiresFilterValue)>"u"?!0:q==null?void 0:q.requiresFilterValue)});let L;const V=j.find(K=>K.field===_),W=e.current.getColumn(_);V?L=j:t.disableMultipleColumnsFiltering?L=[nj({field:_,operator:W.filterOperators[0].value},e)]:L=[...j,nj({field:_,operator:W.filterOperators[0].value},e)],e.current.setFilterModel(z({},H,{items:L}))}e.current.showPreferences(oa.filters,N,B)},[e,n,t.disableMultipleColumnsFiltering]),c=x.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),u=x.useCallback(_=>{const N=Bo(e);N.logicOperator!==_&&e.current.setFilterModel(z({},N,{logicOperator:_}),"changeLogicOperator")},[e]),f=x.useCallback(_=>{const N=Bo(e);Js(N.quickFilterValues,_)||e.current.setFilterModel(z({},N,{quickFilterValues:[..._]}))},[e]),p=x.useCallback((_,N)=>{Bo(e)!==_&&(n.debug("Setting filter model"),e.current.updateControlState("filter",wJ(_,t.disableMultipleColumnsFiltering,e),N),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),m=x.useCallback(_=>{const N=WV(_,t.disableMultipleColumnsFiltering,e),B=t.filterMode==="client"?Fdt(N,e,t.disableEval):null,H=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:B,filterModel:N??AS()});return z({},H,{filterModel:N})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),g={setFilterLogicOperator:u,unstable_applyFilters:r,deleteFilterItem:s,upsertFilterItem:i,upsertFilterItems:a,setFilterModel:p,showFilterPanel:l,hideFilterPanel:c,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m};yn(e,g,"public");const y=x.useCallback((_,N)=>{var j,L;const B=Bo(e);return B.items.forEach(V=>{delete V.fromInput}),!N.exportOnlyDirtyModels||t.filterModel!=null||((L=(j=t.initialState)==null?void 0:j.filter)==null?void 0:L.filterModel)!=null||!Js(B,AS())?z({},_,{filter:{filterModel:B}}):_},[e,t.filterModel,(M=(D=t.initialState)==null?void 0:D.filter)==null?void 0:M.filterModel]),v=x.useCallback((_,N)=>{var H;const B=(H=N.stateToRestore.filter)==null?void 0:H.filterModel;return B==null?_:(e.current.updateControlState("filter",wJ(B,t.disableMultipleColumnsFiltering,e),"restoreState"),z({},_,{callbacks:[..._.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),w=x.useCallback((_,N)=>{var B;if(N===oa.filters){const H=t.slots.filterPanel;return k.jsx(H,z({},(B=t.slotProps)==null?void 0:B.filterPanel))}return _},[t.slots.filterPanel,(A=t.slotProps)==null?void 0:A.filterPanel]),{getRowId:C}=t,E=Jl(Dbt),I=x.useCallback(_=>{var G;if(t.filterMode!=="client"||!_.isRowMatchingFilters||!_.filterModel.items.length&&!((G=_.filterModel.quickFilterValues)!=null&&G.length))return ife;const N=Us(e),B={},{isRowMatchingFilters:H}=_,j={},L={passingFilterItems:null,passingQuickFilterValues:null},V=E.current(e.current.state.rows.dataRowIdToModelLookup);for(let q=0;q<V.length;q+=1){const Y=V[q],Z=C?C(Y):Y.id;H(Y,void 0,L);const ie=Bdt([L.passingFilterItems],[L.passingQuickFilterValues],_.filterModel,e,j);ie||(B[Z]=ie)}const W="auto-generated-group-footer-root";return N[W]&&(B[W]=!0),{filteredRowsLookup:B,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}},[e,t.filterMode,C,E]);Hr(e,"columnMenu",o),Hr(e,"exportState",y),Hr(e,"restoreState",v),Hr(e,"preferencePanel",w),kS(e,$h,"filtering",I),kS(e,$h,"visibleRowsLookupCreation",Rbt);const O=x.useCallback(()=>{n.debug("onColUpdated - GridColumns changed, applying filters");const _=Bo(e),N=ud(e),B=_.items.filter(H=>H.field&&N[H.field]);B.length<_.items.length&&e.current.setFilterModel(z({},_,{items:B}))},[e,n]),P=x.useCallback(_=>{_==="filtering"&&e.current.unstable_applyFilters()},[e]),R=x.useCallback(()=>{e.current.setState(_=>z({},_,{visibleRowsLookup:dZ(e,_)}))},[e]);At(e,"rowsSet",r),At(e,"columnsChange",O),At(e,"activeStrategyProcessorChange",P),At(e,"rowExpansionChange",R),At(e,"columnVisibilityModelChange",()=>{const _=Bo(e);_.quickFilterValues&&cfe(_)&&e.current.unstable_applyFilters()}),Yw(()=>{e.current.unstable_applyFilters()}),In(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},_bt=e=>z({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),$bt=(e,t)=>{const n=Qo(e,"useGridFocus"),r=x.useRef(null),o=e.current.rootElementRef.current!==null,i=x.useCallback((D,M)=>{D&&e.current.getRow(D.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(D.id,D.field),M)},[e]),a=x.useCallback((D,M)=>{const A=va(e);(A==null?void 0:A.id)===D&&(A==null?void 0:A.field)===M||(e.current.setState(_=>(n.debug(`Focusing on cell with id=${D} and field=${M}`),z({},_,{tabIndex:{cell:{id:D,field:M},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:D,field:M},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.getRow(D)&&(A&&i(A,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(D,M))))},[e,n,i]),s=x.useCallback((D,M={})=>{const A=va(e);i(A,M),e.current.setState(_=>(n.debug(`Focusing on column header with colIndex=${D}`),z({},_,{tabIndex:{columnHeader:{field:D},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:D},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[e,n,i]),l=x.useCallback((D,M={})=>{const A=va(e);i(A,M),e.current.setState(_=>(n.debug(`Focusing on column header filter with colIndex=${D}`),z({},_,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:D},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:D},cell:null,columnGroupHeader:null}})))},[e,n,i]),c=x.useCallback((D,M,A={})=>{const _=va(e);_&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(_.id,_.field),A),e.current.setState(N=>z({},N,{tabIndex:{columnGroupHeader:{field:D,depth:M},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:D,depth:M},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[e]),u=x.useCallback(()=>EO(e),[e]),f=x.useCallback((D,M,A)=>{let _=e.current.getColumnIndex(M);const N=Yr(e),B=Sf(e,{pagination:t.pagination,paginationMode:t.paginationMode}),H=Bv(e),j=[].concat(H.top||[],B.rows,H.bottom||[]);let L=j.findIndex(G=>G.id===D);A==="right"?_+=1:A==="left"?_-=1:L+=1,_>=N.length?(L+=1,L<j.length&&(_=0)):_<0&&(L-=1,L>=0&&(_=N.length-1)),L=Za(L,0,j.length-1);const V=j[L];if(!V)return;const W=e.current.unstable_getCellColSpanInfo(V.id,_);W&&W.spannedByColSpan&&(A==="left"||A==="below"?_=W.leftVisibleCellIndex:A==="right"&&(_=W.rightVisibleCellIndex)),_=Za(_,0,N.length-1);const K=N[_];e.current.setCellFocus(V.id,K.field)},[e,t.pagination,t.paginationMode]),p=x.useCallback(({id:D,field:M})=>{e.current.setCellFocus(D,M)},[e]),m=x.useCallback((D,M)=>{M.key==="Enter"||M.key==="Tab"||M.key==="Shift"||PO(M.key)||e.current.setCellFocus(D.id,D.field)},[e]),g=x.useCallback(({field:D},M)=>{M.target===M.currentTarget&&e.current.setColumnHeaderFocus(D,M)},[e]),y=x.useCallback(({fields:D,depth:M},A)=>{if(A.target!==A.currentTarget)return;const _=EO(e);_!==null&&_.depth===M&&D.includes(_.field)||e.current.setColumnGroupHeaderFocus(D[0],M,A)},[e]),v=x.useCallback((D,M)=>{var A,_;(_=(A=M.relatedTarget)==null?void 0:A.getAttribute("class"))!=null&&_.includes(ee.columnHeader)||(n.debug("Clearing focus"),e.current.setState(N=>z({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),w=x.useCallback(D=>{r.current=D},[]),C=x.useCallback(D=>{const M=r.current;r.current=null;const A=va(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:D,cell:M}))return;if(!A){M&&e.current.setCellFocus(M.id,M.field);return}if((M==null?void 0:M.id)===A.id&&(M==null?void 0:M.field)===A.field)return;const N=e.current.getCellElement(A.id,A.field);N!=null&&N.contains(D.target)||(M?e.current.setCellFocus(M.id,M.field):(e.current.setState(B=>z({},B,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),i(A,D)))},[e,i]),E=x.useCallback(D=>{if(D.cellMode==="view")return;const M=va(e);((M==null?void 0:M.id)!==D.id||(M==null?void 0:M.field)!==D.field)&&e.current.setCellFocus(D.id,D.field)},[e]),I=x.useCallback(()=>{const D=va(e);if(D&&!e.current.getRow(D.id)){const M=D.id;let A=null;if(typeof M<"u"){const _=e.current.getRowElement(M),N=_!=null&&_.dataset.rowindex?Number(_==null?void 0:_.dataset.rowindex):0,B=Sf(e,{pagination:t.pagination,paginationMode:t.paginationMode}),H=B.rows[Za(N,0,B.rows.length-1)];A=(H==null?void 0:H.id)??null}e.current.setState(_=>z({},_,{focus:{cell:A===null?null:{id:A,field:D.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),O=Je(()=>{const D=va(e);if(!D)return;const M=Sf(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(M.rows.find(N=>N.id===D.id))return;const _=Yr(e);e.current.setState(N=>z({},N,{tabIndex:{cell:{id:M.rows[0].id,field:_[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),P={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},R={moveFocusToRelativeCell:f,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};yn(e,P,"public"),yn(e,R,"private"),x.useEffect(()=>{const D=Mr(e.current.rootElementRef.current);return D.addEventListener("mouseup",C),()=>{D.removeEventListener("mouseup",C)}},[e,o,C]),At(e,"columnHeaderBlur",v),At(e,"cellDoubleClick",p),At(e,"cellMouseDown",w),At(e,"cellKeyDown",m),At(e,"cellModeChange",E),At(e,"columnHeaderFocus",g),At(e,"columnGroupHeaderFocus",y),At(e,"rowsSet",I),At(e,"paginationModelChange",O)},S$=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e<n)return e+1}else if(!r&&e>t)return e-1;return null},w$=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e<n)return e+1;return null};function Nbt(e,t,n,r){var s,l;const o=Hfe(e);if(!((s=o[t])!=null&&s[n]))return t;const i=Sfe(e);let a=i.indexOf(t)+(r==="down"?1:-1);for(;a>=0&&a<i.length;){const c=i[a];if(!((l=o[c])!=null&&l[n]))return c;a+=r==="down"?1:-1}return t}const Lbt=Yn(qw,Bv,(e,t)=>(t.top||[]).concat(e.rows,t.bottom||[])),Fbt=(e,t)=>{const n=Qo(e,"useGridKeyboardNavigation"),r=vr(),o=t.listView,i=x.useCallback(()=>Lbt(e),[e]),a=t.signature!=="DataGrid"&&t.headerFilters,s=x.useCallback((w,C,E="left",I="up")=>{const O=Jf(e),P=e.current.unstable_getCellColSpanInfo(C,w);P&&P.spannedByColSpan&&(E==="left"?w=P.leftVisibleCellIndex:E==="right"&&(w=P.rightVisibleCellIndex));const R=o?Jy(e).field:zv(e)[w],D=Nbt(e,C,R,I),M=O.findIndex(A=>A.id===D);n.debug(`Navigating to cell row ${M}, col ${w}`),e.current.scrollToIndexes({colIndex:w,rowIndex:M}),e.current.setCellFocus(D,R)},[e,n,o]),l=x.useCallback((w,C)=>{n.debug(`Navigating to header col ${w}`),e.current.scrollToIndexes({colIndex:w});const E=e.current.getVisibleColumns()[w].field;e.current.setColumnHeaderFocus(E,C)},[e,n]),c=x.useCallback((w,C)=>{n.debug(`Navigating to header filter col ${w}`),e.current.scrollToIndexes({colIndex:w});const E=e.current.getVisibleColumns()[w].field;e.current.setColumnHeaderFilterFocus(E,C)},[e,n]),u=x.useCallback((w,C,E)=>{n.debug(`Navigating to header col ${w}`),e.current.scrollToIndexes({colIndex:w});const{field:I}=e.current.getVisibleColumns()[w];e.current.setColumnGroupHeaderFocus(I,C,E)},[e,n]),f=x.useCallback(w=>{var C;return(C=i()[w])==null?void 0:C.id},[i]),p=x.useCallback((w,C)=>{const E=C.currentTarget.querySelector(`.${ee.columnHeaderTitleContainerContent}`);if(!!E&&E.contains(C.target)&&w.field!==Gv.field)return;const O=i(),P=e.current.getViewportPageSize(),R=w.field?e.current.getColumnIndex(w.field):0,D=O.length>0?0:null,M=O.length-1,A=0,_=Yr(e).length-1,N=Kw(e);let B=!0;switch(C.key){case"ArrowDown":{a?c(R,C):D!==null&&s(R,f(D));break}case"ArrowRight":{const H=w$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});H!==null&&l(H,C);break}case"ArrowLeft":{const H=S$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});H!==null&&l(H,C);break}case"ArrowUp":{N>0&&u(R,N-1,C);break}case"PageDown":{D!==null&&M!==null&&s(R,f(Math.min(D+P,M)));break}case"Home":{l(A,C);break}case"End":{l(_,C);break}case"Enter":{(C.ctrlKey||C.metaKey)&&e.current.toggleColumnMenu(w.field);break}case" ":break;default:B=!1}B&&C.preventDefault()},[e,i,a,c,s,f,r,l,u]),m=x.useCallback((w,C)=>{const E=hpt(e)===w.field,I=mpt(e)===w.field;if(E||I||!PO(C.key))return;const O=i(),P=e.current.getViewportPageSize(),R=w.field?e.current.getColumnIndex(w.field):0,D=0,M=O.length-1,A=0,_=Yr(e).length-1;let N=!0;switch(C.key){case"ArrowDown":{const B=f(D);B!=null&&s(R,B);break}case"ArrowRight":{const B=w$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});B!==null&&c(B,C);break}case"ArrowLeft":{const B=S$({currentColIndex:R,firstColIndex:A,lastColIndex:_,isRtl:r});B!==null?c(B,C):e.current.setColumnHeaderFilterFocus(w.field,C);break}case"ArrowUp":{l(R,C);break}case"PageDown":{M!==null&&s(R,f(Math.min(D+P,M)));break}case"Home":{c(A,C);break}case"End":{c(_,C);break}case" ":break;default:N=!1}N&&C.preventDefault()},[e,i,c,r,l,s,f]),g=x.useCallback((w,C)=>{const E=EO(e);if(E===null)return;const{field:I,depth:O}=E,{fields:P,depth:R,maxDepth:D}=w,M=i(),A=e.current.getViewportPageSize(),_=e.current.getColumnIndex(I),N=I?e.current.getColumnIndex(I):0,B=0,H=M.length-1,j=0,L=Yr(e).length-1;let V=!0;switch(C.key){case"ArrowDown":{R===D-1?l(_,C):u(_,O+1,C);break}case"ArrowUp":{R>0&&u(_,O-1,C);break}case"ArrowRight":{const W=P.length-P.indexOf(I)-1;_+W+1<=L&&u(_+W+1,O,C);break}case"ArrowLeft":{const W=P.indexOf(I);_-W-1>=j&&u(_-W-1,O,C);break}case"PageDown":{H!==null&&s(N,f(Math.min(B+A,H)));break}case"Home":{u(j,O,C);break}case"End":{u(L,O,C);break}case" ":break;default:V=!1}V&&C.preventDefault()},[e,i,l,u,s,f]),y=x.useCallback((w,C)=>{if(Jw(C))return;const E=e.current.getCellParams(w.id,w.field);if(E.cellMode===Qn.Edit||!PO(C.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:C,cell:E}))return;const O=i();if(O.length===0)return;const P=e.current.getViewportPageSize(),R=o?()=>0:e.current.getColumnIndex,D=w.field?R(w.field):0,M=O.findIndex(L=>L.id===w.id),A=0,_=O.length-1,N=0,H=(o?[Jy(e)]:Yr(e)).length-1;let j=!0;switch(C.key){case"ArrowDown":{M<_&&s(D,f(M+1),r?"right":"left","down");break}case"ArrowUp":{M>A?s(D,f(M-1)):a?c(D,C):l(D,C);break}case"ArrowRight":{const L=w$({currentColIndex:D,firstColIndex:N,lastColIndex:H,isRtl:r});L!==null&&s(L,f(M),r?"left":"right");break}case"ArrowLeft":{const L=S$({currentColIndex:D,firstColIndex:N,lastColIndex:H,isRtl:r});L!==null&&s(L,f(M),r?"right":"left");break}case"Tab":{C.shiftKey&&D>N?s(D-1,f(M),"left"):!C.shiftKey&&D<H&&s(D+1,f(M),"right");break}case" ":{if(w.field===VP)break;const V=w.colDef;if(V&&(V.field===oft||Nht(V.field)))break;!C.shiftKey&&M<_&&s(D,f(Math.min(M+P,_)));break}case"PageDown":{M<_&&s(D,f(Math.min(M+P,_)));break}case"PageUp":{const L=Math.max(M-P,A);L!==M&&L>=A?s(D,f(L)):l(D,C);break}case"Home":{C.ctrlKey||C.metaKey||C.shiftKey?s(N,f(A)):s(N,f(M));break}case"End":{C.ctrlKey||C.metaKey||C.shiftKey?s(H,f(_)):s(H,f(M));break}default:j=!1}j&&C.preventDefault()},[e,i,r,s,f,a,c,l,o]),v=x.useCallback((w,{event:C})=>C.key===" "?!1:w,[]);Hr(e,"canStartEditing",v),At(e,"columnHeaderKeyDown",p),At(e,"headerFilterKeyDown",m),At(e,"columnGroupHeaderKeyDown",g),At(e,"cellKeyDown",y)},jbt=(e,t)=>{var g,y;const n=Qo(e,"useGridRowCount"),r=Ge(e,JV),o=Ge(e,Og),i=Ge(e,H0),a=Ge(e,ri),s=Jl(()=>ri(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Og,changeEvent:"rowCountChange"});const c={setRowCount:x.useCallback(v=>{o!==v&&(n.debug("Setting 'rowCount' to",v),e.current.setState(w=>z({},w,{pagination:z({},w.pagination,{rowCount:v})})))},[e,n,o])};yn(e,c,"public");const u=x.useCallback((v,w)=>{var I,O;const C=Og(e);return!w.exportOnlyDirtyModels||t.rowCount!=null||((O=(I=t.initialState)==null?void 0:I.pagination)==null?void 0:O.rowCount)!=null?z({},v,{pagination:z({},v.pagination,{rowCount:C})}):v},[e,t.rowCount,(y=(g=t.initialState)==null?void 0:g.pagination)==null?void 0:y.rowCount]),f=x.useCallback((v,w)=>{var E;const C=(E=w.stateToRestore.pagination)!=null&&E.rowCount?w.stateToRestore.pagination.rowCount:Og(e);return e.current.setState(I=>z({},I,{pagination:z({},I.pagination,{rowCount:C})})),v},[e]);Hr(e,"exportState",u),Hr(e,"restoreState",f);const p=x.useCallback(v=>{t.paginationMode==="client"||!s.current||v.pageSize!==s.current&&(s.current=v.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);At(e,"paginationModelChange",p),x.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const m=i.hasNextPage===!1;x.useEffect(()=>{m&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,m,o,a])},Bbt=(e,t)=>{var l,c;const n=Qo(e,"useGridPaginationMeta"),r=Ge(e,H0);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:H0,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:x.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(f=>z({},f,{pagination:z({},f.pagination,{meta:u})})))},[e,n,r])};yn(e,i,"public");const a=x.useCallback((u,f)=>{var g,y;const p=H0(e);return!f.exportOnlyDirtyModels||t.paginationMeta!=null||((y=(g=t.initialState)==null?void 0:g.pagination)==null?void 0:y.meta)!=null?z({},u,{pagination:z({},u.pagination,{meta:p})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=x.useCallback((u,f)=>{var m;const p=(m=f.stateToRestore.pagination)!=null&&m.meta?f.stateToRestore.pagination.meta:H0(e);return e.current.setState(g=>z({},g,{pagination:z({},g.pagination,{meta:p})})),u},[e]);Hr(e,"exportState",a),Hr(e,"restoreState",s),x.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},zbt=(e,t)=>{var i,a,s,l,c,u,f;const n=z({},Pfe(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));Afe(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount)??(t.paginationMode==="client"?(c=e.rows)==null?void 0:c.totalRowCount:void 0),o=t.paginationMeta??((f=(u=t.initialState)==null?void 0:u.pagination)==null?void 0:f.meta)??{};return z({},e,{pagination:z({},e.pagination,{paginationModel:n,rowCount:r,meta:o,enabled:t.pagination===!0,paginationMode:t.paginationMode})})},Vbt=(e,t)=>{Bbt(e,t),Obt(e,t),jbt(e,t)},Hbt=(e,t)=>{var n;return z({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},Ubt=(e,t)=>{var s;const n=Qo(e,"useGridPreferencesPanel"),r=x.useCallback(()=>{e.current.setState(l=>{if(!l.preferencePanel.open)return l;n.debug("Hiding Preferences Panel");const c=_h(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:c.openedPanelValue}),z({},l,{preferencePanel:{open:!1}})})},[e,n]),o=x.useCallback((l,c,u)=>{n.debug("Opening Preferences Panel"),e.current.setState(f=>z({},f,{preferencePanel:z({},f.preferencePanel,{open:!0,openedPanelValue:l,panelId:c,labelId:u})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:l})},[n,e]);yn(e,{showPreferences:o,hidePreferences:r},"public");const i=x.useCallback((l,c)=>{var p;const u=_h(e);return!c.exportOnlyDirtyModels||((p=t.initialState)==null?void 0:p.preferencePanel)!=null||u.open?z({},l,{preferencePanel:u}):l},[e,(s=t.initialState)==null?void 0:s.preferencePanel]),a=x.useCallback((l,c)=>{const u=c.stateToRestore.preferencePanel;return u!=null&&e.current.setState(f=>z({},f,{preferencePanel:u})),l},[e]);Hr(e,"exportState",i),Hr(e,"restoreState",a)},lj=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},Gbt=["id","field"],qbt=["id","field"],Wbt=(e,t)=>{const[n,r]=x.useState({}),o=x.useRef(n),i=x.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=j=>(...L)=>{t.editMode===Vc.Cell&&j(...L)},f=x.useCallback((j,L)=>{const V=e.current.getCellParams(j,L);if(!e.current.isCellEditable(V))throw new Error(`MUI X: The cell with id=${j} and field=${L} is not editable.`)},[e]),p=x.useCallback((j,L,V)=>{if(e.current.getCellMode(j,L)!==V)throw new Error(`MUI X: The cell with id=${j} and field=${L} is not in ${V} mode.`)},[e]),m=x.useCallback((j,L)=>{if(!j.isEditable||j.cellMode===Qn.Edit)return;const V=z({},j,{reason:Su.cellDoubleClick});e.current.publishEvent("cellEditStart",V,L)},[e]),g=x.useCallback((j,L)=>{if(j.cellMode===Qn.View||e.current.getCellMode(j.id,j.field)===Qn.View)return;const V=z({},j,{reason:Tl.cellFocusOut});e.current.publishEvent("cellEditStop",V,L)},[e]),y=x.useCallback((j,L)=>{if(j.cellMode===Qn.Edit){if(L.which===229)return;let V;if(L.key==="Escape"?V=Tl.escapeKeyDown:L.key==="Enter"?V=Tl.enterKeyDown:L.key==="Tab"&&(V=L.shiftKey?Tl.shiftTabKeyDown:Tl.tabKeyDown,L.preventDefault()),V){const W=z({},j,{reason:V});e.current.publishEvent("cellEditStop",W,L)}}else if(j.isEditable){let V;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:L,cellParams:j,editMode:"cell"}))return;if(spe(L)?V=Su.printableKeyDown:cpe(L)?V=Su.pasteKeyDown:L.key==="Enter"?V=Su.enterKeyDown:(L.key==="Backspace"||L.key==="Delete")&&(V=Su.deleteKeyDown),V){const K=z({},j,{reason:V,key:L.key});e.current.publishEvent("cellEditStart",K,L)}}},[e]),v=x.useCallback(j=>{const{id:L,field:V,reason:W}=j,K={id:L,field:V};(W===Su.printableKeyDown||W===Su.deleteKeyDown||W===Su.pasteKeyDown)&&(K.deleteValue=!0),e.current.startCellEditMode(K)},[e]),w=x.useCallback(j=>{const{id:L,field:V,reason:W}=j;e.current.runPendingEditCellValueMutation(L,V);let K;W===Tl.enterKeyDown?K="below":W===Tl.tabKeyDown?K="right":W===Tl.shiftTabKeyDown&&(K="left");const G=W==="escapeKeyDown";e.current.stopCellEditMode({id:L,field:V,ignoreModifications:G,cellToFocusAfter:K})},[e]),C=j=>async(...L)=>{var V;if(j){const{id:W,field:K}=L[0];((V=e.current.state.editRows[W][K])==null?void 0:V.error)||j(...L)}};At(e,"cellDoubleClick",u(m)),At(e,"cellFocusOut",u(g)),At(e,"cellKeyDown",u(y)),At(e,"cellEditStart",u(v)),At(e,"cellEditStop",u(w)),sr(e,"cellEditStart",t.onCellEditStart),sr(e,"cellEditStop",C(t.onCellEditStop));const E=x.useCallback((j,L)=>{const V=zo(e);return V[j]&&V[j][L]?Qn.Edit:Qn.View},[e]),I=Je(j=>{const L=j!==t.cellModesModel;c&&L&&c(j,{api:e.current}),!(t.cellModesModel&&L)&&(r(j),o.current=j,e.current.publishEvent("cellModesModelChange",j))}),O=x.useCallback((j,L,V)=>{const W=z({},o.current);if(V!==null)W[j]=z({},W[j],{[L]:z({},V)});else{const K=W[j],G=$e(K,[L].map(DS));W[j]=G,Object.keys(W[j]).length===0&&delete W[j]}I(W)},[I]),P=x.useCallback((j,L,V)=>{e.current.setState(W=>{const K=z({},W.editRows);return V!==null?K[j]=z({},K[j],{[L]:z({},V)}):(delete K[j][L],Object.keys(K[j]).length===0&&delete K[j]),z({},W,{editRows:K})})},[e]),R=x.useCallback(j=>{const{id:L,field:V}=j,W=$e(j,Gbt);f(L,V),p(L,V,Qn.View),O(L,V,z({mode:Qn.Edit},W))},[f,p,O]),D=Je(async j=>{const{id:L,field:V,deleteValue:W,initialValue:K}=j,G=e.current.getCellValue(L,V);let q=G;W?q=lj(e.current.getColumn(V)):K&&(q=K);const Y=e.current.getColumn(V),Z=!!Y.preProcessEditCellProps&&W;let ie={value:q,error:!1,isProcessingProps:Z};if(P(L,V,ie),e.current.setCellFocus(L,V),Z&&(ie=await Promise.resolve(Y.preProcessEditCellProps({id:L,row:e.current.getRow(L),props:ie,hasChanged:q!==G})),e.current.getCellMode(L,V)===Qn.Edit)){const se=zo(e);P(L,V,z({},ie,{value:se[L][V].value,isProcessingProps:!1}))}}),M=x.useCallback(j=>{const{id:L,field:V}=j,W=$e(j,qbt);p(L,V,Qn.Edit),O(L,V,z({mode:Qn.View},W))},[p,O]),A=Je(async j=>{var ce;const{id:L,field:V,ignoreModifications:W,cellToFocusAfter:K="none"}=j;p(L,V,Qn.Edit),e.current.runPendingEditCellValueMutation(L,V);const G=()=>{P(L,V,null),O(L,V,null),K!=="none"&&e.current.moveFocusToRelativeCell(L,V,K)};if(W){G();return}const q=zo(e),{error:Y,isProcessingProps:Z}=q[L][V],ie=e.current.getRow(L);if(Y||Z){i.current[L][V].mode=Qn.Edit,O(L,V,{mode:Qn.Edit});return}const se=e.current.getRowWithUpdatedValuesFromCellEditing(L,V);if((ce=t.dataSource)!=null&&ce.updateRow){if(ie[V]===se[V]){G();return}const ye=()=>{i.current[L][V].mode=Qn.Edit,O(L,V,{mode:Qn.Edit})},Se={rowId:L,updatedRow:se,previousRow:ie};try{await e.current.dataSource.editRow(Se),G()}catch{ye()}}else if(a){const ye=Se=>{i.current[L][V].mode=Qn.Edit,O(L,V,{mode:Qn.Edit}),s&&s(Se)};try{Promise.resolve(a(se,ie,{rowId:L})).then(Se=>{e.current.updateRows([Se]),G()}).catch(ye)}catch(Se){ye(Se)}}else e.current.updateRows([se]),G()}),_=x.useCallback(async j=>{var ce,ye;const{id:L,field:V,value:W,debounceMs:K,unstable_skipValueParser:G}=j;f(L,V),p(L,V,Qn.Edit);const q=e.current.getColumn(V),Y=e.current.getRow(L);let Z=W;q.valueParser&&!G&&(Z=q.valueParser(W,Y,q,e));let ie=zo(e),se=z({},ie[L][V],{value:Z,changeReason:K?"debouncedSetEditCellValue":"setEditCellValue"});if(q.preProcessEditCellProps){const Se=W!==ie[L][V].value;se=z({},se,{isProcessingProps:!0}),P(L,V,se),se=await Promise.resolve(q.preProcessEditCellProps({id:L,row:Y,props:se,hasChanged:Se}))}return e.current.getCellMode(L,V)===Qn.View?!1:(ie=zo(e),se=z({},se,{isProcessingProps:!1}),se.value=q.preProcessEditCellProps?ie[L][V].value:Z,P(L,V,se),ie=zo(e),!((ye=(ce=ie[L])==null?void 0:ce[V])!=null&&ye.error))},[e,f,p,P]),N=x.useCallback((j,L)=>{const V=e.current.getColumn(L),W=zo(e),K=e.current.getRow(j);if(!W[j]||!W[j][L])return e.current.getRow(j);const{value:G}=W[j][L];return V.valueSetter?V.valueSetter(G,K,V,e):z({},K,{[L]:G})},[e]),B={getCellMode:E,startCellEditMode:R,stopCellEditMode:M},H={setCellEditingEditCellValue:_,getRowWithUpdatedValuesFromCellEditing:N};yn(e,B,"public"),yn(e,H,"private"),x.useEffect(()=>{l&&I(l)},[l,I]),In(()=>{const j=Us(e),L=i.current;i.current=nfe(n),Object.entries(n).forEach(([V,W])=>{Object.entries(W).forEach(([K,G])=>{var Z,ie;const q=((ie=(Z=L[V])==null?void 0:Z[K])==null?void 0:ie.mode)||Qn.View,Y=j[V]?e.current.getRowId(j[V]):V;G.mode===Qn.Edit&&q===Qn.View?D(z({id:Y,field:K},G)):G.mode===Qn.View&&q===Qn.Edit&&A(z({id:Y,field:K},G))})})},[e,n,D,A])},Kbt=["id"],Ybt=["id"],Qbt=(e,t)=>{const[n,r]=x.useState({}),o=x.useRef(n),i=x.useRef({}),a=x.useRef({}),s=x.useRef(void 0),l=x.useRef(null),{processRowUpdate:c,onProcessRowUpdateError:u,rowModesModel:f,onRowModesModelChange:p}=t,m=G=>(...q)=>{t.editMode===Vc.Row&&G(...q)},g=x.useCallback((G,q)=>{const Y=e.current.getCellParams(G,q);if(!e.current.isCellEditable(Y))throw new Error(`MUI X: The cell with id=${G} and field=${q} is not editable.`)},[e]),y=x.useCallback((G,q)=>{if(e.current.getRowMode(G)!==q)throw new Error(`MUI X: The row with id=${G} is not in ${q} mode.`)},[e]),v=x.useCallback(G=>{const q=zo(e);return Object.values(q[G]).some(Y=>Y.error)},[e]),w=x.useCallback((G,q)=>{if(!G.isEditable||e.current.getRowMode(G.id)===zn.Edit)return;const Y=e.current.getRowParams(G.id),Z=z({},Y,{field:G.field,reason:Ud.cellDoubleClick});e.current.publishEvent("rowEditStart",Z,q)},[e]),C=x.useCallback(G=>{l.current=G},[]),E=x.useCallback((G,q)=>{G.isEditable&&e.current.getRowMode(G.id)!==zn.View&&(l.current=null,s.current=setTimeout(()=>{var Y;if(((Y=l.current)==null?void 0:Y.id)!==G.id){if(!e.current.getRow(G.id)||e.current.getRowMode(G.id)===zn.View||v(G.id))return;const Z=e.current.getRowParams(G.id),ie=z({},Z,{field:G.field,reason:ks.rowFocusOut});e.current.publishEvent("rowEditStop",ie,q)}}))},[e,v]);x.useEffect(()=>()=>{clearTimeout(s.current)},[]);const I=x.useCallback((G,q)=>{if(G.cellMode===zn.Edit){if(q.which===229)return;let Y;if(q.key==="Escape")Y=ks.escapeKeyDown;else if(q.key==="Enter")Y=ks.enterKeyDown;else if(q.key==="Tab"){const Z=zv(e).filter(ie=>e.current.getColumn(ie).type===BP?!0:e.current.isCellEditable(e.current.getCellParams(G.id,ie)));if(q.shiftKey?G.field===Z[0]&&(Y=ks.shiftTabKeyDown):G.field===Z[Z.length-1]&&(Y=ks.tabKeyDown),q.preventDefault(),!Y){const ie=Z.findIndex(ce=>ce===G.field),se=Z[q.shiftKey?ie-1:ie+1];e.current.setCellFocus(G.id,se)}}if(Y){if(Y!==ks.escapeKeyDown&&v(G.id))return;const Z=z({},e.current.getRowParams(G.id),{reason:Y,field:G.field});e.current.publishEvent("rowEditStop",Z,q)}}else if(G.isEditable){let Y;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:q,cellParams:G,editMode:"row"}))return;if(spe(q)||cpe(q)?Y=Ud.printableKeyDown:q.key==="Enter"?Y=Ud.enterKeyDown:(q.key==="Backspace"||q.key==="Delete")&&(Y=Ud.deleteKeyDown),Y){const ie=e.current.getRowParams(G.id),se=z({},ie,{field:G.field,reason:Y});e.current.publishEvent("rowEditStart",se,q)}}},[e,v]),O=x.useCallback(G=>{const{id:q,field:Y,reason:Z}=G,ie={id:q,fieldToFocus:Y};(Z===Ud.printableKeyDown||Z===Ud.deleteKeyDown)&&(ie.deleteValue=!!Y),e.current.startRowEditMode(ie)},[e]),P=x.useCallback(G=>{const{id:q,reason:Y,field:Z}=G;e.current.runPendingEditCellValueMutation(q);let ie;Y===ks.enterKeyDown?ie="below":Y===ks.tabKeyDown?ie="right":Y===ks.shiftTabKeyDown&&(ie="left");const se=Y==="escapeKeyDown";e.current.stopRowEditMode({id:q,ignoreModifications:se,field:Z,cellToFocusAfter:ie})},[e]);At(e,"cellDoubleClick",m(w)),At(e,"cellFocusIn",m(C)),At(e,"cellFocusOut",m(E)),At(e,"cellKeyDown",m(I)),At(e,"rowEditStart",m(O)),At(e,"rowEditStop",m(P)),sr(e,"rowEditStart",t.onRowEditStart),sr(e,"rowEditStop",t.onRowEditStop);const R=x.useCallback(G=>Yfe(e,{rowId:G,editMode:t.editMode})?zn.Edit:zn.View,[e,t.editMode]),D=Je(G=>{const q=G!==t.rowModesModel;p&&q&&p(G,{api:e.current}),!(t.rowModesModel&&q)&&(r(G),o.current=G,e.current.publishEvent("rowModesModelChange",G))}),M=x.useCallback((G,q)=>{const Y=z({},o.current);q!==null?Y[G]=z({},q):delete Y[G],D(Y)},[D]),A=x.useCallback((G,q)=>{e.current.setState(Y=>{const Z=z({},Y.editRows);return q!==null?Z[G]=q:delete Z[G],z({},Y,{editRows:Z})})},[e]),_=x.useCallback((G,q,Y)=>{e.current.setState(Z=>{const ie=z({},Z.editRows);return Y!==null?ie[G]=z({},ie[G],{[q]:z({},Y)}):(delete ie[G][q],Object.keys(ie[G]).length===0&&delete ie[G]),z({},Z,{editRows:ie})})},[e]),N=x.useCallback(G=>{const{id:q}=G,Y=$e(G,Kbt);y(q,zn.View),M(q,z({mode:zn.Edit},Y))},[y,M]),B=Je(G=>{const{id:q,fieldToFocus:Y,deleteValue:Z,initialValue:ie}=G,se=e.current.getRow(q),ce=Dc(e),ye=ce.reduce((Se,ne)=>{if(!e.current.getCellParams(q,ne).isEditable)return Se;const de=e.current.getColumn(ne);let oe=e.current.getCellValue(q,ne);return Y===ne&&(Z||ie)&&(Z?oe=lj(de):ie&&(oe=ie)),Se[ne]={value:oe,error:!1,isProcessingProps:!!de.preProcessEditCellProps&&Z},Se},{});a.current[q]=se,A(q,ye),Y&&e.current.setCellFocus(q,Y),ce.filter(Se=>!!e.current.getColumn(Se).preProcessEditCellProps&&Z).forEach(Se=>{const ne=e.current.getColumn(Se),le=e.current.getCellValue(q,Se),de=Z?lj(ne):ie??le;Promise.resolve(ne.preProcessEditCellProps({id:q,row:se,props:ye[Se],hasChanged:de!==le})).then(oe=>{if(e.current.getRowMode(q)===zn.Edit){const ue=zo(e);_(q,Se,z({},oe,{value:ue[q][Se].value,isProcessingProps:!1}))}})})}),H=x.useCallback(G=>{const{id:q}=G,Y=$e(G,Ybt);y(q,zn.Edit),M(q,z({mode:zn.View},Y))},[y,M]),j=Je(async G=>{var le;const{id:q,ignoreModifications:Y,field:Z,cellToFocusAfter:ie="none"}=G;e.current.runPendingEditCellValueMutation(q);const se=()=>{ie!=="none"&&Z&&e.current.moveFocusToRelativeCell(q,Z,ie),A(q,null),M(q,null),delete a.current[q]};if(Y){se();return}const ce=zo(e),ye=a.current[q];if(Object.values(ce[q]).some(de=>de.isProcessingProps)){i.current[q].mode=zn.Edit;return}if(v(q)){i.current[q].mode=zn.Edit,M(q,{mode:zn.Edit});return}const ne=e.current.getRowWithUpdatedValuesFromRowEditing(q);if((le=t.dataSource)!=null&&le.updateRow){if(Js(ye,ne)){se();return}const de=()=>{i.current[q].mode=zn.Edit,M(q,{mode:zn.Edit})},oe={rowId:q,updatedRow:ne,previousRow:ye};try{await e.current.dataSource.editRow(oe),se()}catch{de()}}else if(c){const de=oe=>{i.current[q]&&(i.current[q].mode=zn.Edit,M(q,{mode:zn.Edit})),u&&u(oe)};try{Promise.resolve(c(ne,ye,{rowId:q})).then(oe=>{e.current.updateRows([oe]),se()}).catch(de)}catch(oe){de(oe)}}else e.current.updateRows([ne]),se()}),L=x.useCallback(G=>{const{id:q,field:Y,value:Z,debounceMs:ie,unstable_skipValueParser:se}=G;g(q,Y);const ce=e.current.getColumn(Y),ye=e.current.getRow(q);let Se=Z;ce.valueParser&&!se&&(Se=ce.valueParser(Z,ye,ce,e));let ne=zo(e),le=z({},ne[q][Y],{value:Se,changeReason:ie?"debouncedSetEditCellValue":"setEditCellValue"});return ce.preProcessEditCellProps||_(q,Y,le),new Promise(de=>{const oe=[];if(ce.preProcessEditCellProps){const ue=le.value!==ne[q][Y].value;le=z({},le,{isProcessingProps:!0}),_(q,Y,le);const pe=ne[q],Ee=$e(pe,[Y].map(DS)),xe=Promise.resolve(ce.preProcessEditCellProps({id:q,row:ye,props:le,hasChanged:ue,otherFieldsProps:Ee})).then(Re=>{if(e.current.getRowMode(q)===zn.View){de(!1);return}ne=zo(e),Re=z({},Re,{isProcessingProps:!1}),Re.value=ce.preProcessEditCellProps?ne[q][Y].value:Se,_(q,Y,Re)});oe.push(xe)}Object.entries(ne[q]).forEach(([ue,pe])=>{if(ue===Y)return;const Ee=e.current.getColumn(ue);if(!Ee.preProcessEditCellProps)return;pe=z({},pe,{isProcessingProps:!0}),_(q,ue,pe),ne=zo(e);const xe=ne[q],Re=$e(xe,[ue].map(DS)),he=Promise.resolve(Ee.preProcessEditCellProps({id:q,row:ye,props:pe,hasChanged:!1,otherFieldsProps:Re})).then(Pe=>{if(e.current.getRowMode(q)===zn.View){de(!1);return}Pe=z({},Pe,{isProcessingProps:!1}),_(q,ue,Pe)});oe.push(he)}),Promise.all(oe).then(()=>{e.current.getRowMode(q)===zn.Edit?(ne=zo(e),de(!ne[q][Y].error)):de(!1)})})},[e,g,_]),V=x.useCallback(G=>{const q=zo(e),Y=e.current.getRow(G);if(!q[G])return e.current.getRow(G);let Z=z({},a.current[G],Y);return Object.entries(q[G]).forEach(([ie,se])=>{const ce=e.current.getColumn(ie);ce!=null&&ce.valueSetter?Z=ce.valueSetter(se.value,Z,ce,e):Z[ie]=se.value}),Z},[e]),W={getRowMode:R,startRowEditMode:N,stopRowEditMode:H},K={setRowEditingEditCellValue:L,getRowWithUpdatedValuesFromRowEditing:V};yn(e,W,"public"),yn(e,K,"private"),x.useEffect(()=>{f&&D(f)},[f,D]),In(()=>{const G=Us(e),q=i.current;i.current=nfe(n);const Y=new Set([...Object.keys(n),...Object.keys(q)]);Array.from(Y).forEach(Z=>{var ye;const ie=n[Z]??{mode:zn.View},se=((ye=q[Z])==null?void 0:ye.mode)||zn.View,ce=G[Z]?e.current.getRowId(G[Z]):Z;ie.mode===zn.Edit&&se===zn.View?B(z({id:ce},ie)):ie.mode===zn.View&&se===zn.Edit&&j(z({id:ce},ie))})},[e,n,B,j])},Xbt=e=>z({},e,{editRows:{}}),Jbt=(e,t)=>{Wbt(e,t),Qbt(e,t);const n=x.useRef({}),{isCellEditable:r}=t,o=x.useCallback(p=>Qy(p.rowNode)||!p.colDef.editable||!p.colDef.renderEditCell?!1:r?r(p):!0,[r]),i=(p,m,g,y)=>{if(!g){y();return}if(n.current[p]||(n.current[p]={}),n.current[p][m]){const[C]=n.current[p][m];clearTimeout(C)}const v=()=>{const[C]=n.current[p][m];clearTimeout(C),y(),delete n.current[p][m]},w=setTimeout(()=>{y(),delete n.current[p][m]},g);n.current[p][m]=[w,v]};x.useEffect(()=>{const p=n.current;return()=>{Object.entries(p).forEach(([m,g])=>{Object.keys(g).forEach(y=>{const[v]=p[m][y];clearTimeout(v),delete p[m][y]})})}},[]);const a=x.useCallback((p,m)=>{if(n.current[p]){if(!m)Object.keys(n.current[p]).forEach(g=>{const[,y]=n.current[p][g];y()});else if(n.current[p][m]){const[,g]=n.current[p][m];g()}}},[]),s=x.useCallback(p=>{const{id:m,field:g,debounceMs:y}=p;return new Promise(v=>{i(m,g,y,async()=>{const w=t.editMode===Vc.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(m,g)===Qn.Edit){const C=await w(p);v(C)}})})},[e,t.editMode]),l=x.useCallback((p,m)=>t.editMode===Vc.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(p,m):e.current.getRowWithUpdatedValuesFromRowEditing(p),[e,t.editMode]),c=x.useCallback((p,m)=>{var y;return((y=zo(e)[p])==null?void 0:y[m])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},f={runPendingEditCellValueMutation:a};yn(e,u,"public"),yn(e,f,"private")},Zbt=(e,t,n)=>{const r=!!t.dataSource;return n.current.caches.rows=RE({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),z({},e,{rows:pfe({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},e0t=(e,t)=>{const n=Qo(e,"useGridRows"),r=x.useRef(Date.now()),o=x.useRef(t.rowCount),i=_o(),a=x.useCallback(j=>{const L=Us(e)[j];if(L)return L;const V=Ec(e,j);return V&&Qy(V)?{[Yy]:j}:null},[e]),s=x.useCallback(j=>Ww(e,j),[e]),l=x.useCallback(({cache:j,throttle:L})=>{const V=()=>{r.current=Date.now(),e.current.setState(K=>z({},K,{rows:pfe({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:wi(e),previousTreeDepths:vJ(e),previousGroupsToFetch:ddt(e)})})),e.current.publishEvent("rowsSet")};if(i.clear(),e.current.caches.rows=j,!L){V();return}const W=t.throttleRowsMs-(Date.now()-r.current);if(W>0){i.start(W,V);return}V()},[t.throttleRowsMs,t.rowCount,t.loading,e,i]),c=x.useCallback(j=>{if(n.debug(`Updating all rows, new length ${j.length}`),kh(e)){e.current.updateNonPivotRows(j,!1);return}const L=RE({rows:j,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),V=e.current.caches.rows;L.rowsBeforePartialUpdates=V.rowsBeforePartialUpdates,l({cache:L,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,l,e]),u=x.useCallback(j=>{if(t.signature===Ul.DataGrid&&j.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
+`));if(kh(e)){e.current.updateNonPivotRows(j);return}const L=AJ(e,j,t.getRowId),V=PJ({updates:L,getRowId:t.getRowId,previousCache:e.current.caches.rows});l({cache:V,throttle:!0})},[t.signature,t.getRowId,l,e]),f=x.useCallback((j,L)=>{const V=AJ(e,j,t.getRowId),W=PJ({updates:V,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:L??[]});l({cache:W,throttle:!1})},[t.getRowId,l,e]),p=x.useCallback(j=>{n.debug(`Setting loading to ${j}`),e.current.setState(L=>z({},L,{rows:z({},L.rows,{loading:j})})),e.current.caches.rows.loadingPropBeforePartialUpdates=j},[e,n]),m=x.useCallback(()=>{const j=Wp(e),L=Us(e);return new Map(j.map(V=>[V,L[V]??{}]))},[e]),g=x.useCallback(()=>Hw(e),[e]),y=x.useCallback(()=>Wp(e),[e]),v=x.useCallback(j=>{const{rowIdToIndexMap:L}=Sf(e);return L.get(j)},[e]),w=x.useCallback((j,L)=>{const V=Ec(e,j);if(!V)throw new Error(`MUI X: No row with id #${j} found.`);if(V.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const W=z({},V,{childrenExpanded:L});e.current.setState(K=>z({},K,{rows:z({},K.rows,{tree:z({},K.rows.tree,{[j]:W})})})),e.current.publishEvent("rowExpansionChange",W)},[e]),C=x.useCallback(j=>Ec(e,j)??null,[e]),E=x.useCallback(({skipAutoGeneratedRows:j=!0,groupId:L,applySorting:V,applyFiltering:W})=>{const K=wi(e);let G;if(V){const q=K[L];if(!q)return[];const Y=Hv(e);G=[];const Z=Y.findIndex(ie=>ie===L)+1;for(let ie=Z;ie<Y.length&&K[Y[ie]].depth>q.depth;ie+=1){const se=Y[ie];(!j||!Qy(K[se]))&&G.push(se)}}else G=YV(K,L,j);if(W){const q=Uv(e);G=HP(q)?G:G.filter(Y=>q[Y]!==!1)}return G},[e]),I=x.useCallback((j,L)=>{const V=Ec(e,j);if(!V)throw new Error(`MUI X: No row with id #${j} found.`);if(V.parent!==ii)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(V.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(W=>{const K=wi(e)[ii],G=K.children,q=G.findIndex(Z=>Z===j);if(q===-1||q===L)return W;n.debug(`Moving row ${j} to index ${L}`);const Y=[...G];return Y.splice(L,0,Y.splice(q,1)[0]),z({},W,{rows:z({},W.rows,{tree:z({},W.rows.tree,{[ii]:z({},K,{children:Y})})})})}),e.current.publishEvent("rowsSet")},[e,n]),O=x.useCallback((j,L)=>{if(t.signature===Ul.DataGrid&&L.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
+`));if(L.length===0)return;if(jv(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const W=z({},wi(e)),K=z({},Us(e)),G=W[ii],q=[...G.children],Y=new Set;for(let ie=0;ie<L.length;ie+=1){const se=L[ie],ce=zP(se,t.getRowId,"A row was provided without id when calling replaceRows()."),[ye]=q.splice(j+ie,1,ce);Y.has(ye)||(delete K[ye],delete W[ye]);const Se={id:ce,depth:0,parent:ii,type:"leaf",groupingKey:null};K[ce]=se,W[ce]=Se,Y.add(ce)}W[ii]=z({},G,{children:q});const Z=q.filter(ie=>{var se;return((se=W[ie])==null?void 0:se.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=K,e.current.setState(ie=>z({},ie,{rows:z({},ie.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,q.length),dataRowIdToModelLookup:K,dataRowIds:Z,tree:W})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId,t.loading,t.rowCount]),P={getRow:a,setLoading:p,getRowId:s,getRowModels:m,getRowsCount:g,getAllRowIds:y,setRows:c,updateRows:u,getRowNode:C,getRowIndexRelativeToVisibleRows:v,unstable_replaceRows:O},R={setRowIndex:I,setRowChildrenExpansion:w,getRowGroupChildren:E},D={updateNestedRows:f},M=x.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let j;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?j=z({},e.current.caches.rows,{updates:{type:"full",rows:Wp(e)}}):j=RE({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),l({cache:j,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,l]),A=Jl(()=>t.dataSource),_=x.useCallback(j=>{if(t.dataSource&&t.dataSource!==A.current){A.current=t.dataSource;return}j==="rowTreeCreation"&&M()},[M,A,t.dataSource]),N=x.useCallback(()=>{e.current.getActiveStrategy(tf.RowTree)!==fdt(e)&&M()},[e,M]);At(e,"activeStrategyProcessorChange",_),At(e,"strategyAvailabilityChange",N);const B=x.useCallback(()=>{e.current.setState(j=>{const L=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:wi(e),treeDepths:vJ(e),dataRowIds:Wp(e),dataRowIdToModelLookup:Us(e)});return z({},j,{rows:z({},j.rows,L,{totalTopLevelRowCount:ffe({tree:L.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet")},[e,t.rowCount]);fH(e,"hydrateRows",B),yn(e,P,"public"),yn(e,R,t.signature===Ul.DataGrid?"private":"public"),yn(e,D,"private");const H=x.useRef(!0);x.useEffect(()=>{if(H.current){H.current=!1;return}let j=!1;t.rowCount!==o.current&&(j=!0,o.current=t.rowCount);const L=t.dataSource?pdt(e):t.rows,V=e.current.caches.rows.rowsBeforePartialUpdates===L,W=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,K=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;V&&(W||(e.current.setState(G=>z({},G,{rows:z({},G.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),K||(e.current.setState(G=>z({},G,{rows:z({},G.rows,{totalRowCount:Math.max(t.rowCount||0,G.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,G.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!j)||(n.debug(`Updating all rows, new length ${L==null?void 0:L.length}`),l({cache:RE({rows:L,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,n,l,e])},t0t=e=>{const t={[ii]:z({},tft(),{children:e})};for(let n=0;n<e.length;n+=1){const r=e[n];t[r]={id:r,depth:0,parent:ii,type:"leaf",groupingKey:null}}return{groupingName:$h,tree:t,treeDepths:{0:e.length},dataRowIds:e}},n0t=({previousTree:e,actions:t})=>{const n=z({},e),r={};for(let a=0;a<t.remove.length;a+=1){const s=t.remove[a];r[s]=!0,delete n[s]}for(let a=0;a<t.insert.length;a+=1){const s=t.insert[a];n[s]={id:s,depth:0,parent:ii,type:"leaf",groupingKey:null}}const o=n[ii];let i=[...o.children,...t.insert];return Object.values(r).length&&(i=i.filter(a=>!r[a])),n[ii]=z({},o,{children:i}),{groupingName:$h,tree:n,treeDepths:{0:i.length},dataRowIds:i}},r0t=e=>e.updates.type==="full"?t0t(e.updates.rows):n0t({previousTree:e.previousTree,actions:e.updates.actions}),o0t=e=>{kS(e,$h,"rowTreeCreation",r0t)};class C$ extends Error{}function i0t(e,t){var g;const n=x.useCallback(y=>({field:y,colDef:e.current.getColumn(y)}),[e]),r=x.useCallback(y=>{const v=e.current.getRow(y);if(!v)throw new C$(`No row with id #${y} found`);return{id:y,columns:e.current.getAllColumns(),row:v}},[e]),o=x.useCallback((y,v,w,{cellMode:C,colDef:E,hasFocus:I,rowNode:O,tabIndex:P})=>{const R=w[v],D=E!=null&&E.valueGetter?E.valueGetter(R,w,E,e):R,M={id:y,field:v,row:w,rowNode:O,colDef:E,cellMode:C,hasFocus:I,tabIndex:P,value:D,formattedValue:D,isEditable:!1,api:e.current};return E&&E.valueFormatter&&(M.formattedValue=E.valueFormatter(D,w,E,e)),M.isEditable=E&&e.current.isCellEditable(M),M},[e]),i=x.useCallback((y,v)=>{var P;const w=e.current.getRow(y),C=Ec(e,y);if(!w||!C)throw new C$(`No row with id #${y} found`);const E=va(e),I=tH(e),O=e.current.getCellMode(y,v);return e.current.getCellParamsForRow(y,v,w,{colDef:t.listView&&((P=t.listViewColumn)==null?void 0:P.field)===v?Jy(e):e.current.getColumn(v),rowNode:C,hasFocus:E!==null&&E.field===v&&E.id===y,tabIndex:I&&I.field===v&&I.id===y?0:-1,cellMode:O})},[e,t.listView,(g=t.listViewColumn)==null?void 0:g.field]),a=x.useCallback((y,v)=>{const w=e.current.getColumn(v),C=e.current.getRow(y);if(!C)throw new C$(`No row with id #${y} found`);return!w||!w.valueGetter?C[v]:w.valueGetter(C[w.field],C,w,e)},[e]),s=x.useCallback((y,v)=>rft(y,v,e),[e]),l=x.useCallback((y,v)=>{const w=s(y,v);return!v||!v.valueFormatter?w:v.valueFormatter(w,y,v,e)},[e,s]),c=x.useCallback(y=>e.current.rootElementRef.current?Rmt(e.current.rootElementRef.current,y):null,[e]),u=x.useCallback(y=>e.current.rootElementRef.current?Dmt(e.current.rootElementRef.current,y):null,[e]),f=x.useCallback((y,v)=>e.current.rootElementRef.current?kmt(e.current.rootElementRef.current,{id:y,field:v}):null,[e]),p={getCellValue:a,getCellParams:i,getCellElement:f,getRowValue:s,getRowFormattedValue:l,getRowParams:r,getRowElement:u,getColumnHeaderParams:n,getColumnHeaderElement:c},m={getCellParamsForRow:o};yn(e,p,"public"),yn(e,m,"private")}const hx={type:"include",ids:new Set},a0t=(e,t)=>z({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??hx:hx}),s0t=(e,t)=>{var G,q,Y,Z,ie,se,ce,ye,Se;const n=Qo(e,"useGridSelection"),r=x.useCallback(ne=>(...le)=>{t.rowSelection&&ne(...le)},[t.rowSelection]),o=t.signature!==Ul.DataGrid&&(((G=t.rowSelectionPropagation)==null?void 0:G.parents)||((q=t.rowSelectionPropagation)==null?void 0:q.descendants)),i=x.useMemo(()=>t.rowSelectionModel,[t.rowSelectionModel]),a=x.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:Rl,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=eH(t),f=Ge(e,wi),p=Ge(e,jv)>1,m=x.useCallback(ne=>{let le=ne;const de=a.current??ne,oe=e.current.isRowSelected(ne);if(oe){const ue=Ug(e),pe=ue.findIndex(xe=>xe===de),Ee=ue.findIndex(xe=>xe===le);if(pe===Ee)return;pe>Ee?le=ue[Ee+1]:le=ue[Ee-1]}a.current=ne,e.current.selectRowRange({startId:de,endId:le},!oe)},[e]),g=Je(()=>t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?kfe(e):Ug(e)),y=x.useCallback(ne=>{if(t.signature===Ul.DataGrid&&!u&&(ne.type!=="include"||ne.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(`
+`));Rl(e)!==ne&&(n.debug("Setting selection model"),e.current.setState(de=>z({},de,{rowSelection:t.rowSelection?ne:hx})))},[e,n,t.rowSelection,t.signature,u]),v=x.useCallback(ne=>Uw(e).has(ne),[e]),w=x.useCallback(ne=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(ne)))return!1;const le=Ec(e,ne);return!((le==null?void 0:le.type)==="footer"||(le==null?void 0:le.type)==="pinnedRow")},[e,t.rowSelection,c]),C=x.useCallback(()=>Efe(e),[e]),E=x.useCallback((ne,le=!0,de=!1)=>{var oe,ue,pe,Ee,xe,Re;if(e.current.isRowSelectable(ne))if(a.current=ne,de){n.debug(`Setting selection for row ${ne}`);const he={type:"include",ids:new Set},Pe=ve=>{he.ids.add(ve)};le&&(Pe(ne),o&&S0(e,f,ne,((oe=t.rowSelectionPropagation)==null?void 0:oe.descendants)??!1,((ue=t.rowSelectionPropagation)==null?void 0:ue.parents)??!1,Pe)),e.current.setRowSelectionModel(he)}else{n.debug(`Toggling selection for row ${ne}`);const he=Rl(e),Pe={type:he.type,ids:new Set(he.ids)},ve=ef(Pe);ve.unselect(ne);const Ie=De=>{ve.select(De)},te=De=>{ve.unselect(De)};le?(Ie(ne),o&&S0(e,f,ne,((pe=t.rowSelectionPropagation)==null?void 0:pe.descendants)??!1,((Ee=t.rowSelectionPropagation)==null?void 0:Ee.parents)??!1,Ie)):o&&MJ(e,f,ne,((xe=t.rowSelectionPropagation)==null?void 0:xe.descendants)??!1,((Re=t.rowSelectionPropagation)==null?void 0:Re.parents)??!1,te),(Pe.type==="include"&&Pe.ids.size<2||u)&&e.current.setRowSelectionModel(Pe)}},[e,n,o,f,(Y=t.rowSelectionPropagation)==null?void 0:Y.descendants,(Z=t.rowSelectionPropagation)==null?void 0:Z.parents,u]),I=x.useCallback((ne,le=!0,de=!1)=>{var xe,Re,he,Pe,ve,Ie;if(n.debug("Setting selection for several rows"),t.rowSelection===!1)return;const oe=new Set;for(let te=0;te<ne.length;te+=1){const Te=ne[te];e.current.isRowSelectable(Te)&&oe.add(Te)}const ue=Rl(e);let pe;if(de){if(pe={type:"include",ids:oe},le){const te=ef(pe);if(o){const Te=De=>{te.select(De)};for(const De of oe)S0(e,f,De,((xe=t.rowSelectionPropagation)==null?void 0:xe.descendants)??!1,((Re=t.rowSelectionPropagation)==null?void 0:Re.parents)??!1,Te)}}else pe.ids=new Set;if(ue.type===pe.type&&pe.ids.size===ue.ids.size&&Array.from(pe.ids).every(te=>ue.ids.has(te)))return}else{pe={type:ue.type,ids:new Set(ue.ids)};const te=ef(pe),Te=Ve=>{te.select(Ve)},De=Ve=>{te.unselect(Ve)};for(const Ve of oe)le?(te.select(Ve),o&&S0(e,f,Ve,((he=t.rowSelectionPropagation)==null?void 0:he.descendants)??!1,((Pe=t.rowSelectionPropagation)==null?void 0:Pe.parents)??!1,Te)):(De(Ve),o&&MJ(e,f,Ve,((ve=t.rowSelectionPropagation)==null?void 0:ve.descendants)??!1,((Ie=t.rowSelectionPropagation)==null?void 0:Ie.parents)??!1,De))}(pe.type==="include"&&pe.ids.size<2||u)&&e.current.setRowSelectionModel(pe)},[n,o,u,e,f,(ie=t.rowSelectionPropagation)==null?void 0:ie.descendants,(se=t.rowSelectionPropagation)==null?void 0:se.parents,t.rowSelection]),O=x.useCallback(ne=>{var ue,pe;if(!p||!o||ne.ids.size===0&&ne.type==="include")return ne;const le={type:ne.type,ids:new Set(ne.ids)},de=ef(le),oe=Ee=>{de.select(Ee)};for(const Ee of ne.ids)S0(e,f,Ee,((ue=t.rowSelectionPropagation)==null?void 0:ue.descendants)??!1,((pe=t.rowSelectionPropagation)==null?void 0:pe.parents)??!1,oe,de);return le},[e,f,(ce=t.rowSelectionPropagation)==null?void 0:ce.descendants,(ye=t.rowSelectionPropagation)==null?void 0:ye.parents,p,o]),P=x.useCallback(({startId:ne,endId:le},de=!0,oe=!1)=>{if(!e.current.getRow(ne)||!e.current.getRow(le))return;n.debug(`Expanding selection from row ${ne} to row ${le}`);const ue=Ug(e),pe=ue.indexOf(ne),Ee=ue.indexOf(le),[xe,Re]=pe>Ee?[Ee,pe]:[pe,Ee],he=ue.slice(xe,Re+1);e.current.selectRows(he,de,oe)},[e,n]),R={selectRow:E,setRowSelectionModel:y,getSelectedRows:C,isRowSelected:v,isRowSelectable:w},D={selectRows:I,selectRowRange:P,getPropagatedRowSelectionModel:O};yn(e,R,"public"),yn(e,D,t.signature===Ul.DataGrid?"private":"public");const M=x.useRef(!0),A=x.useCallback((ne=!1)=>{var he,Pe;if(M.current)return;const le=Rl(e),de=Us(e),oe=Uv(e),ue=ve=>t.filterMode==="server"?!de[ve]:!de[ve]||oe[ve]===!1,pe={type:le.type,ids:new Set(le.ids)},Ee=ef(pe);let xe=!1;for(const ve of le.ids){if(ue(ve)){if(t.keepNonExistentRowsSelected)continue;Ee.unselect(ve),xe=!0;continue}if(!((he=t.rowSelectionPropagation)!=null&&he.parents))continue;const Ie=f[ve];if((Ie==null?void 0:Ie.type)==="group"){if(Ie.isAutoGenerated){Ee.unselect(ve),xe=!0;continue}Ie.children.every(Te=>oe[Te]===!1)||(Ee.unselect(ve),xe=!0)}}const Re=p&&((Pe=t.rowSelectionPropagation)==null?void 0:Pe.parents)&&(pe.ids.size>0||pe.type==="exclude");if(xe||Re&&!ne)if(Re)if(pe.type==="exclude"){const ve=g(),Ie=[];for(let te=0;te<ve.length;te+=1){const Te=ve[te];(t.keepNonExistentRowsSelected||!ue(Te))&&Ee.has(Te)&&Ie.push(Te)}e.current.selectRows(Ie,!0,!0)}else e.current.selectRows(Array.from(pe.ids),!0,!0);else e.current.setRowSelectionModel(pe)},[e,p,(Se=t.rowSelectionPropagation)==null?void 0:Se.parents,t.keepNonExistentRowsSelected,t.filterMode,f,g]),_=x.useCallback((ne,le)=>{const de=le.metaKey||le.ctrlKey,oe=!s&&!de&&!_gt(le),ue=!u||oe,pe=e.current.isRowSelected(ne),Re=GP(e)>1&&ue||!pe;e.current.selectRow(ne,Re,ue)},[e,u,s]),N=x.useCallback((ne,le)=>{var ue;if(l)return;const de=(ue=le.target.closest(`.${ee.cell}`))==null?void 0:ue.getAttribute("data-field");if(de===Gv.field||de===VP)return;if(de){const pe=e.current.getColumn(de);if((pe==null?void 0:pe.type)===BP)return}Ec(e,ne.id).type!=="pinnedRow"&&(le.shiftKey&&u?m(ne.id):_(ne.id,le))},[l,u,e,m,_]),B=x.useCallback((ne,le)=>{var de;u&&le.shiftKey&&((de=window.getSelection())==null||de.removeAllRanges())},[u]),H=x.useCallback((ne,le)=>{u&&le.nativeEvent.shiftKey?m(ne.id):e.current.selectRow(ne.id,ne.value,!u)},[e,m,u]),j=x.useCallback(ne=>{const le=Bo(e),de=bfe(e),oe=le.items.length>0||((de==null?void 0:de.length)||0)>0;!t.isRowSelectable&&!t.checkboxSelectionVisibleOnly&&o&&!oe?e.current.setRowSelectionModel({type:ne?"exclude":"include",ids:new Set}):e.current.selectRows(g(),ne)},[e,o,g,t.checkboxSelectionVisibleOnly,t.isRowSelectable]),L=x.useCallback(ne=>{j(ne.value)},[j]),V=x.useCallback((ne,le)=>{if(e.current.getCellMode(ne.id,ne.field)!==Qn.Edit&&!Jw(le)){if(PO(le.key)&&le.shiftKey){const de=va(e);if(de&&de.id!==ne.id){le.preventDefault();const oe=e.current.isRowSelected(de.id);if(!u){e.current.selectRow(de.id,!oe,!0);return}const ue=e.current.getRowIndexRelativeToVisibleRows(de.id),pe=e.current.getRowIndexRelativeToVisibleRows(ne.id);let Ee,xe;ue>pe?oe?(Ee=pe,xe=ue-1):(Ee=pe,xe=ue):oe?(Ee=ue+1,xe=pe):(Ee=ue,xe=pe);const Re=Sf(e),he=[];for(let Pe=Ee;Pe<=xe;Pe+=1)he.push(Re.rows[Pe].id);e.current.selectRows(he,!oe);return}}if(le.key===" "&&le.shiftKey){le.preventDefault(),_(ne.id,le);return}String.fromCharCode(le.keyCode)==="A"&&(le.ctrlKey||le.metaKey)&&(le.preventDefault(),j(!0))}},[e,u,_,j]),W=Je(()=>{if(!t.rowSelection){e.current.setRowSelectionModel(hx);return}if(i===void 0)return;if(!o||!p||i.type==="include"&&i.ids.size===0){e.current.setRowSelectionModel(i);return}const ne=e.current.getPropagatedRowSelectionModel(i);if(ne.type!==i.type||ne.ids.size!==i.ids.size||!Array.from(i.ids).every(le=>ne.ids.has(le))){e.current.setRowSelectionModel(ne);return}e.current.setRowSelectionModel(i)});At(e,"sortedRowsSet",r(()=>A(!0))),At(e,"filteredRowsSet",r(()=>A())),At(e,"rowClick",r(N)),At(e,"rowSelectionCheckboxChange",r(H)),At(e,"headerSelectionCheckboxChange",L),At(e,"cellMouseDown",r(B)),At(e,"cellKeyDown",r(V)),x.useEffect(()=>{W()},[e,i,t.rowSelection,W]);const K=i!=null;x.useEffect(()=>{if(K||!t.rowSelection||typeof w!="function")return;const ne=Rl(e);if(ne.type!=="include")return;const le=new Set;for(const de of ne.ids)w(de)&&le.add(de);le.size<ne.ids.size&&e.current.setRowSelectionModel({type:ne.type,ids:le})},[e,w,K,t.rowSelection]),x.useEffect(()=>{if(!t.rowSelection||K)return;const ne=Rl(e);!u&&(ne.type==="include"&&ne.ids.size>1||ne.type==="exclude")&&e.current.setRowSelectionModel(hx)},[e,u,s,K,t.rowSelection]),x.useEffect(()=>{r(A)},[A,r]),x.useEffect(()=>{M.current&&(M.current=!1)},[])},l0t=e=>{const{classes:t}=e;return x.useMemo(()=>Me({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},Cn,t),[t])},c0t=(e,t)=>{const n={classes:t.classes},r=l0t(n),o=x.useCallback(i=>{const a=z({},Gv,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[Cu]!=null;return s&&!l?(i.lookup[Cu]=a,i.orderedFields=[Cu,...i.orderedFields]):!s&&l?(delete i.lookup[Cu],i.orderedFields=i.orderedFields.filter(c=>c!==Cu)):s&&l&&(i.lookup[Cu]=z({},a,i.lookup[Cu])),i},[e,r,t.checkboxSelection]);Hr(e,"hydrateColumns",o)},u0t=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return z({},e,{sorting:{sortModel:Zde(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},d0t=(e,t)=>{var O,P;const n=Qo(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Ns,changeEvent:"sortModelChange"});const r=x.useCallback((R,D)=>{const M=Ns(e),A=M.findIndex(N=>N.field===R);let _=[...M];return A>-1?(D==null?void 0:D.sort)==null?_.splice(A,1):_.splice(A,1,D):_=[...M,D],_},[e]),o=x.useCallback((R,D)=>{const A=Ns(e).find(_=>_.field===R.field);if(A){const _=D===void 0?xJ(R.sortingOrder??t.sortingOrder,A.sort):D;return _===void 0?void 0:z({},A,{sort:_})}return{field:R.field,sort:D===void 0?xJ(R.sortingOrder??t.sortingOrder):D}},[e,t.sortingOrder]),i=x.useCallback((R,D)=>D==null||D.sortable===!1||t.disableColumnSorting?R:(D.sortingOrder||t.sortingOrder).some(A=>!!A)?[...R,"columnMenuSortItem"]:R,[t.sortingOrder,t.disableColumnSorting]),a=x.useCallback(()=>{e.current.setState(R=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),z({},R,{sorting:z({},R.sorting,{sortedRows:YV(wi(e),ii,!1)})});const D=Ns(e),M=vdt(D,e),A=e.current.applyStrategyProcessor("sorting",{sortRowList:M});return z({},R,{sorting:z({},R.sorting,{sortedRows:A})})}),e.current.publishEvent("sortedRowsSet")},[e,n,t.sortingMode]),s=x.useCallback(R=>{Ns(e)!==R&&(n.debug("Setting sort model"),e.current.setState(bJ(R,t.disableMultipleColumnsSorting)),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=x.useCallback((R,D,M)=>{const A=e.current.getColumn(R),_=o(A,D);let N;!M||t.disableMultipleColumnsSorting?N=(_==null?void 0:_.sort)==null?[]:[_]:N=r(A.field,_),e.current.setSortModel(N)},[e,r,o,t.disableMultipleColumnsSorting]),c=x.useCallback(()=>Ns(e),[e]),u=x.useCallback(()=>QV(e).map(D=>D.model),[e]),f=x.useCallback(()=>Hv(e),[e]),p=x.useCallback(R=>e.current.getSortedRowIds()[R],[e]);yn(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:f,getRowIdFromRowIndex:p,setSortModel:s,sortColumn:l,applySorting:a},"public");const g=x.useCallback((R,D)=>{var _,N;const M=Ns(e);return!D.exportOnlyDirtyModels||t.sortModel!=null||((N=(_=t.initialState)==null?void 0:_.sorting)==null?void 0:N.sortModel)!=null||M.length>0?z({},R,{sorting:{sortModel:M}}):R},[e,t.sortModel,(P=(O=t.initialState)==null?void 0:O.sorting)==null?void 0:P.sortModel]),y=x.useCallback((R,D)=>{var A;const M=(A=D.stateToRestore.sorting)==null?void 0:A.sortModel;return M==null?R:(e.current.setState(bJ(M,t.disableMultipleColumnsSorting)),z({},R,{callbacks:[...R.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=x.useCallback(R=>{const D=wi(e),M=D[ii],A=R.sortRowList?R.sortRowList(M.children.map(_=>D[_])):[...M.children];return M.footerId!=null&&A.push(M.footerId),A},[e]);Hr(e,"exportState",g),Hr(e,"restoreState",y),kS(e,$h,"sorting",v);const w=x.useCallback(({field:R,colDef:D},M)=>{if(!D.sortable||t.disableColumnSorting)return;const A=M.shiftKey||M.metaKey||M.ctrlKey;l(R,void 0,A)},[l,t.disableColumnSorting]),C=x.useCallback(({field:R,colDef:D},M)=>{!D.sortable||t.disableColumnSorting||M.key==="Enter"&&!M.ctrlKey&&!M.metaKey&&l(R,void 0,M.shiftKey)},[l,t.disableColumnSorting]),E=x.useCallback(()=>{const R=Ns(e),D=ud(e);if(R.length>0){const M=R.filter(A=>D[A.field]);M.length<R.length&&e.current.setSortModel(M)}},[e]),I=x.useCallback(R=>{R==="sorting"&&e.current.applySorting()},[e]);Hr(e,"columnMenu",i),At(e,"columnHeaderClick",w),At(e,"columnHeaderKeyDown",C),At(e,"rowsSet",e.current.applySorting),At(e,"columnsChange",E),At(e,"activeStrategyProcessorChange",I),Yw(()=>{e.current.applySorting()}),In(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function fZ(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o<n)return o}const f0t=(e,t)=>{const n=vr(),r=Qo(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Ge(e,Jf),s=x.useCallback(f=>{var w;const p=fr(e),m=Hw(e),g=t.listView?[Jy(e)]:Yr(e);if(!(f.rowIndex==null)&&m===0||g.length===0)return!1;r.debug(`Scrolling to cell at row ${f.rowIndex}, col: ${f.colIndex} `);let v={};if(f.colIndex!==void 0){const C=Xf(e);let E;if(typeof f.rowIndex<"u"){const I=(w=a[f.rowIndex])==null?void 0:w.id,O=e.current.unstable_getCellColSpanInfo(I,f.colIndex);O&&!O.spannedByColSpan&&(E=O.cellProps.width)}typeof E>"u"&&(E=g[f.colIndex].computedWidth),v.left=fZ({containerSize:p.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:E,elementOffset:C[f.colIndex]})}if(f.rowIndex!==void 0){const C=Qw(e),E=$ft(e),I=Rfe(e),O=t.pagination?f.rowIndex-E*I:f.rowIndex,P=C.positions[O+1]?C.positions[O+1]-C.positions[O]:C.currentPageTotalHeight-C.positions[O];v.top=fZ({containerSize:p.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:P,elementOffset:C.positions[O]})}return v=e.current.unstable_applyPipeProcessors("scrollToIndexes",v,f),typeof v.left!==void 0||typeof v.top!==void 0?(e.current.scroll(v),!0):!1},[r,e,i,t.pagination,a,t.listView]),l=x.useCallback(f=>{if(i.current&&f.left!==void 0&&o.current){const p=n?-1:1;o.current.scrollLeft=f.left,i.current.scrollLeft=p*f.left,r.debug(`Scrolling left: ${f.left}`)}i.current&&f.top!==void 0&&(i.current.scrollTop=f.top,r.debug(`Scrolling top: ${f.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=x.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);yn(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function p0t(e,t){sr(e,"columnHeaderClick",t.onColumnHeaderClick),sr(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),sr(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),sr(e,"columnHeaderOver",t.onColumnHeaderOver),sr(e,"columnHeaderOut",t.onColumnHeaderOut),sr(e,"columnHeaderEnter",t.onColumnHeaderEnter),sr(e,"columnHeaderLeave",t.onColumnHeaderLeave),sr(e,"cellClick",t.onCellClick),sr(e,"cellDoubleClick",t.onCellDoubleClick),sr(e,"cellKeyDown",t.onCellKeyDown),sr(e,"preferencePanelClose",t.onPreferencePanelClose),sr(e,"preferencePanelOpen",t.onPreferencePanelOpen),sr(e,"menuOpen",t.onMenuOpen),sr(e,"menuClose",t.onMenuClose),sr(e,"rowDoubleClick",t.onRowDoubleClick),sr(e,"rowClick",t.onRowClick),sr(e,"stateChange",t.onStateChange)}function h0t(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const cj={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Vc.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1},pg={width:0,height:0},m0t={isReady:!1,root:pg,viewportOuterSize:pg,viewportInnerSize:pg,contentSize:pg,minimumSize:pg,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},g0t=(e,t,n)=>{const r=m0t,o=Fv(n);return z({},e,{dimensions:z({},r,ype(t,n,o,Vv(n)))})},gpe=Pt(Yr,Xf,(e,t)=>{const n=e.length;return n===0?0:Ig(t[n-1]+e[n-1].computedWidth,1)});function y0t(e,t){const n=Qo(e,"useResizeContainer"),r=x.useRef(!1),o=x.useRef(pg),i=Ge(e,Vv),a=Ge(e,Fv),s=Ge(e,gpe),l=x.useRef(!0),{rowHeight:c,headerHeight:u,groupHeaderHeight:f,headerFilterHeight:p,headersTotalHeight:m,leftPinnedWidth:g,rightPinnedWidth:y}=ype(t,e,a,i),v=x.useCallback(()=>fr(e),[e]),w=x.useCallback(A=>{e.current.setState(_=>z({},_,{dimensions:A})),e.current.rootElementRef.current&&pZ(e.current.rootElementRef.current,fr(e))},[e]),C=x.useCallback(()=>{const A=fr(e);if(!A.isReady)return 0;const _=Sf(e);if(t.getRowHeight){const B=Xw(e),H=B.lastRowIndex-B.firstRowIndex;return Math.min(H-1,_.rows.length)}const N=Math.floor(A.viewportInnerSize.height/c);return Math.min(N,_.rows.length)},[e,t.getRowHeight,c]),E=x.useCallback(()=>{var Z,ie;if(l.current)return;const A=v0t(e.current.mainElementRef.current,t.scrollbarSize),_=Qw(e),N=m+_.pinnedTopRowsTotalHeight,B=_.pinnedBottomRowsTotalHeight,H={width:s,height:Ig(_.currentPageTotalHeight,1)};let j,L,V=!1,W=!1;if(t.autoHeight)W=!1,V=Math.round(s)>Math.round(o.current.width),j={width:o.current.width,height:N+B+H.height},L={width:Math.max(0,j.width-(W?A:0)),height:Math.max(0,j.height-(V?A:0))};else{j={width:o.current.width,height:o.current.height},L={width:Math.max(0,j.width),height:Math.max(0,j.height-N-B)};const se=H,ce=L,ye=se.width>ce.width,Se=se.height>ce.height;(ye||Se)&&(W=Se,V=se.width+(W?A:0)>ce.width,V&&(W=se.height+A>ce.height)),W&&(L.width-=A),V&&(L.height-=A)}const K=Math.max(j.width,s+(W?A:0)),G={width:s,height:N+H.height+B},q={isReady:!0,root:o.current,viewportOuterSize:j,viewportInnerSize:L,contentSize:H,minimumSize:G,hasScrollX:V,hasScrollY:W,scrollbarSize:A,headerHeight:u,groupHeaderHeight:f,headerFilterHeight:p,rowWidth:K,rowHeight:c,columnsTotalWidth:s,leftPinnedWidth:g,rightPinnedWidth:y,headersTotalHeight:m,topContainerHeight:N,bottomContainerHeight:B},Y=e.current.state.dimensions;Js(Y,q)||(w(q),b0t(q.viewportInnerSize,Y.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",q.viewportInnerSize),(ie=(Z=e.current).updateRenderContext)==null||ie.call(Z))},[e,w,t.scrollbarSize,t.autoHeight,c,u,f,p,s,m,g,y]),I=Je(E),O=x.useMemo(()=>t.resizeThrottleMs>0?h0t(()=>{I(),e.current.publishEvent("debouncedResize",o.current)},t.resizeThrottleMs):void 0,[e,t.resizeThrottleMs,I]);x.useEffect(()=>O==null?void 0:O.clear,[O]);const P={getRootDimensions:v},R={updateDimensions:E,getViewportPageSize:C};In(E,[E]),yn(e,P,"public"),yn(e,R,"private");const D=x.useCallback(A=>{pZ(A,fr(e))},[e]),M=x.useCallback(A=>{if(o.current=A,A.height===0&&!r.current&&!t.autoHeight&&!OO&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
+`)),r.current=!0),A.width===0&&!r.current&&!OO&&(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
+`)),r.current=!0),l.current||!O){l.current=!1,E();return}O()},[E,t.autoHeight,O,n]);sr(e,"rootMount",D),sr(e,"resize",M),sr(e,"debouncedResize",t.onResize)}function pZ(e,t){const n=(r,o)=>e.style.setProperty(r,o);n("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),n("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),n("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),n("--DataGrid-rowWidth",`${t.rowWidth}px`),n("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),n("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),n("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),n("--DataGrid-headerHeight",`${t.headerHeight}px`),n("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),n("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),n("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),n("--height",`${t.rowHeight}px`)}function ype(e,t,n,r){const o=mfe(e.rowHeight,cj.rowHeight);return{rowHeight:Math.floor(o*n),headerHeight:Math.floor(e.columnHeaderHeight*n),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n),columnsTotalWidth:gpe(t),headersTotalHeight:oH(t,e),leftPinnedWidth:r.left.reduce((i,a)=>i+a.computedWidth,0),rightPinnedWidth:r.right.reduce((i,a)=>i+a.computedWidth,0)}}const hZ=new WeakMap;function v0t(e,t){if(t!==void 0)return t;if(e===null)return 0;const n=hZ.get(e);if(n!==void 0)return n;const o=Mr(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),hZ.set(e,i),i}function b0t(e,t){return e.width===t.width&&e.height===t.height}const x0t=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},S0t=(e,t,n)=>{n.current.caches.rowsMeta={heights:new Map};const r=HV(n),o=Hw(n),i=Gw(n),a=Math.min(i.enabled?i.paginationModel.pageSize:o,o);return z({},e,{rowsMeta:{currentPageTotalHeight:a*r,positions:Array.from({length:a},(s,l)=>l*r),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})},w0t=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=x.useRef(-1),s=x.useRef(!1),l=x.useRef(!1),c=Ge(e,Fv),u=iH(e),f=Ge(e,Bv),p=Ge(e,HV),m=A=>{let _=i.get(A);return _===void 0&&(_={content:p,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(A,_)),_},g=x.useCallback(A=>{const _=fr(e).rowHeight,N=e.current.getRowHeightEntry(A.id);if(!n)N.content=_,N.needsFirstMeasurement=!1;else{const B=n(z({},A,{densityFactor:c}));if(B==="auto"){if(N.needsFirstMeasurement){const H=o?o(z({},A,{densityFactor:c})):_;N.content=H??_}s.current=!0,N.autoHeight=!0}else N.content=mfe(B,_),N.needsFirstMeasurement=!1,N.autoHeight=!1}if(r){const B=e.current.getRowIndexRelativeToVisibleRows(A.id),H=r(z({},A,{isFirstVisible:B===0,isLastVisible:B===u.rows.length-1,indexRelativeToCurrentPage:B}));N.spacingTop=H.top??0,N.spacingBottom=H.bottom??0}else N.spacingTop=0,N.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",N,A),N},[e,u.rows,n,o,p,r,c]),y=x.useCallback(()=>{s.current=!1;const A=f.top.reduce((L,V)=>{const W=g(V);return L+W.content+W.spacingTop+W.spacingBottom+W.detail},0),_=f.bottom.reduce((L,V)=>{const W=g(V);return L+W.content+W.spacingTop+W.spacingBottom+W.detail},0),N=[],B=u.rows.reduce((L,V)=>{N.push(L);const W=g(V),K=W.content+W.spacingTop+W.spacingBottom+W.detail;return L+K},0);s.current||(a.current=1/0);const H=A!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||_!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||B!==e.current.state.rowsMeta.currentPageTotalHeight,j={currentPageTotalHeight:B,positions:N,pinnedTopRowsTotalHeight:A,pinnedBottomRowsTotalHeight:_};e.current.setState(L=>z({},L,{rowsMeta:j})),H&&e.current.updateDimensions(),l.current=!0},[e,f,u.rows,g]),v=A=>{var _;return((_=i.get(A))==null?void 0:_.content)??p},w=(A,_)=>{const N=e.current.getRowHeightEntry(A),B=N.content!==_;N.needsFirstMeasurement=!1,N.content=_,l.current&&(l.current=!B)},C=A=>{var _;return((_=i.get(A))==null?void 0:_.autoHeight)??!1},E=()=>a.current,I=A=>{s.current&&A>a.current&&(a.current=A)},O=()=>{i.clear(),y()},P=Jl(()=>new x0t(A=>{var _;for(let N=0;N<A.length;N+=1){const B=A[N],H=B.borderBoxSize&&B.borderBoxSize.length>0?B.borderBoxSize[0].blockSize:B.contentRect.height,j=B.target.__mui_id;if(((_=Ufe(e))==null?void 0:_.id)===j&&H===0)return;e.current.unstable_storeRowHeightMeasurement(j,H)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,R=(A,_)=>(A.__mui_id=_,P.observe(A),()=>P.unobserve(A));fH(e,"rowHeight",y),In(()=>{y()},[y]);const D={unstable_getRowHeight:v,unstable_setLastMeasuredRowIndex:I,unstable_storeRowHeightMeasurement:w,resetRowHeights:O},M={hydrateRowsMeta:y,observeRowHeight:R,rowHasAutoHeight:C,getRowHeightEntry:m,getLastMeasuredRowIndex:E};yn(e,D,"public"),yn(e,M,"private")},C0t=e=>{const t=x.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=x.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()})},[e]);yn(e,{exportState:t,restoreState:n},"public")},E0t=e=>{const t=x.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=x.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let f=l;f<c;f+=1){const p=T0t({apiRef:e,lookup:t.current,columnIndex:f,rowId:s,minFirstColumnIndex:l,maxLastColumnIndex:c,columns:u});p.colSpan>1&&(f+=p.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};yn(e,i,"public"),yn(e,a,"private"),At(e,"columnOrderChange",r)};function T0t(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),f=t.current.getRowValue(u,c),p=typeof c.colSpan=="function"?c.colSpan(f,u,c,t):c.colSpan;if(!p||p===1)return E$(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let m=c.computedWidth;for(let g=1;g<p;g+=1){const y=r+g;if(y>=i&&y<a){const v=s[y];m+=v.computedWidth,E$(n,o,r+g,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(r+p,l-1),leftVisibleCellIndex:r})}E$(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:p,width:m}})}return{colSpan:p}}function E$(e,t,n,r){e[t]||(e[t]={}),e[t][n]=r}const vpe=(e,t,n)=>{if(ofe(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(`
+`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{vpe(i,[...t,r],n)})},uj=e=>{if(!e)return{};const t={};return e.forEach(n=>{vpe(n,[],t)}),t},dj=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>Js(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l<i;l+=1){const c=e.reduce((u,f)=>{const p=r(f)[l]??null;if(u.length===0)return[{columnFields:[f],groupId:p}];const m=u[u.length-1],g=m.columnFields[m.columnFields.length-1];return m.groupId!==p||!a(g,f,l)||s(g,f)?[...u,{columnFields:[f],groupId:p}]:[...u.slice(0,u.length-1),{columnFields:[...m.columnFields,f],groupId:p}]},[]);o.push(c)}return o},O0t=["groupId","children"],pH=e=>{let t={};return e.forEach(n=>{if(ofe(n))return;const{groupId:r,children:o}=n,i=$e(n,O0t);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=z({},i,{groupId:r}),s=pH(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=z({},t,s,{[r]:a})}),z({},t)},I0t=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=Dc(n),o=zv(n),i=pH(t.columnGroupingModel??[]),a=uj(t.columnGroupingModel??[]),s=dj(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return z({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},P0t=(e,t)=>{const n=x.useCallback(s=>Lfe(e)[s]??[],[e]),r=x.useCallback(()=>Ffe(e),[e]);yn(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=x.useCallback(()=>{const s=uj(t.columnGroupingModel??[]);e.current.setState(l=>{var p;const c=((p=l.columns)==null?void 0:p.orderedFields)??[],u=l.pinnedColumns??{},f=dj(c,s,u);return z({},l,{columnGrouping:z({},l.columnGrouping,{headerStructure:f})})})},[e,t.columnGroupingModel]),a=x.useCallback(s=>{var y,v;const l=((v=(y=e.current).getPinnedColumns)==null?void 0:v.call(y))??{},c=Dc(e),u=zv(e),f=pH(s??[]),p=uj(s??[]),m=dj(c,p,l),g=u.length===0?0:Math.max(...u.map(w=>{var C;return((C=p[w])==null?void 0:C.length)??0}));e.current.setState(w=>z({},w,{columnGrouping:{lookup:f,unwrappedGroupingModel:p,headerStructure:m,maxDepth:g}}))},[e]);At(e,"columnIndexChange",i),At(e,"columnsChange",()=>{a(t.columnGroupingModel)}),At(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),x.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function A0t(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function mZ(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;n<e.changedTouches.length;n+=1){const r=e.changedTouches[n];if(r.identifier===t)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function gZ(e,t,n,r){let o=e;return r==="Right"?o+=t-n.left:o+=n.right-t,o}function M0t(e,t,n){return n==="Left"?e-t.left:t.right-e}function R0t(e){return e==="Right"?"Left":"Right"}function D0t(e,t){const n=e.classList.contains(ee["columnSeparator--sideRight"])?"Right":"Left";return t?R0t(n):n}function yZ(e){e.preventDefault(),e.stopImmediatePropagation()}function k0t(e){const t=x.useRef(void 0),n=()=>Vfe(e),r=Ge(e,n);return x.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=A0t()}return t.current}}function _0t(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s<o+a)}function $0t(e,t,n){const r={},o=e.current.rootElementRef.current;return o.classList.add(ee.autosizing),n.forEach(i=>{const s=Umt(e.current,i.field).map(g=>g.getBoundingClientRect().width??0),l=t.includeOutliers?s:_0t(s,t.outliersFactor);if(t.includeHeaders){const g=Hmt(e.current,i.field);if(g){const y=g.querySelector(`.${ee.columnHeaderTitle}`),v=g.querySelector(`.${ee.columnHeaderTitleContainerContent}`),w=g.querySelector(`.${ee.iconButtonContainer}`),C=g.querySelector(`.${ee.menuIcon}`),E=y??v,I=window.getComputedStyle(g,null),O=parseInt(I.paddingLeft,10)+parseInt(I.paddingRight,10),R=E.scrollWidth+1+O+((w==null?void 0:w.clientWidth)??0)+((C==null?void 0:C.clientWidth)??0);l.push(R)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,f=c?i.minWidth:0,p=u?i.maxWidth:1/0,m=l.length===0?0:Math.max(...l);r[i.field]=Za(m,f,p)}),o.classList.remove(ee.autosizing),r}const N0t=e=>z({},e,{columnResize:{resizingColumnField:""}});function L0t(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const F0t=(e,t)=>{const n=vr(),r=Qo(e,"useGridColumnResize"),o=Jl(L0t).current,i=x.useRef(null),a=x.useRef(null),s=_o(),l=x.useRef(void 0),c=M=>{var j,L;r.debug(`Updating width to ${M} for col ${o.colDef.field}`);const A=o.columnHeaderElement.offsetWidth,_=M-A,N=M-o.initialColWidth;if(N>0){const V=o.initialTotalWidth+N;(L=(j=e.current.rootElementRef)==null?void 0:j.current)==null||L.style.setProperty("--DataGrid-rowWidth",`${V}px`)}o.colDef.computedWidth=M,o.colDef.width=M,o.colDef.flex=0,o.columnHeaderElement.style.width=`${M}px`;const B=o.headerFilterElement;B&&(B.style.width=`${M}px`),o.groupHeaderElements.forEach(V=>{const W=V;let K;W.getAttribute("aria-colspan")==="1"?K=`${M}px`:K=`${W.offsetWidth+_}px`,W.style.width=K}),o.cellElements.forEach(V=>{const W=V;let K;W.getAttribute("aria-colspan")==="1"?K=`${M}px`:K=`${W.offsetWidth+_}px`,W.style.setProperty("--width",K)});const H=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);H===Kd.LEFT&&(sg(o.fillerLeft,"width",_),o.leftPinnedCellsAfter.forEach(V=>{sg(V,"left",_)}),o.leftPinnedHeadersAfter.forEach(V=>{sg(V,"left",_)})),H===Kd.RIGHT&&(sg(o.fillerRight,"width",_),o.rightPinnedCellsBefore.forEach(V=>{sg(V,"right",_)}),o.rightPinnedHeadersBefore.forEach(V=>{sg(V,"right",_)}))},u=M=>{if(w(),o.previousMouseClickEvent){const A=o.previousMouseClickEvent,_=A.timeStamp,N=A.clientX,B=A.clientY;if(M.timeStamp-_<300&&M.clientX===N&&M.clientY===B){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,M);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const A=Gl(e);o.groupHeaderElements.forEach(_=>{const N=Nmt(_),B=_,j=`${N.reduce((L,V)=>A.columnVisibilityModel[V]!==!1?L+A.lookup[V].computedWidth:L,0)}px`;B.style.width=j})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,M)})},f=(M,A,_)=>{var j;const N=e.current.rootElementRef.current;o.initialColWidth=M.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=M,o.columnHeaderElement=$mt(e.current.columnHeadersContainerRef.current,M.field);const B=N.querySelector(`.${ee.headerFilterRow} [data-field="${dd(M.field)}"]`);B&&(o.headerFilterElement=B),o.groupHeaderElements=Lmt((j=e.current.columnHeadersContainerRef)==null?void 0:j.current,M.field),o.cellElements=Fmt(o.columnHeaderElement,e.current),o.fillerLeft=HJ(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=HJ(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const H=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=H!==Kd.LEFT?[]:jmt(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=H!==Kd.RIGHT?[]:Bmt(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=H!==Kd.LEFT?[]:zmt(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=H!==Kd.RIGHT?[]:Vmt(e.current,o.columnHeaderElement,n),a.current=D0t(A,n),i.current=M0t(_,o.columnHeaderElement.getBoundingClientRect(),a.current)},p=Je(u),m=Je(M=>{if(M.buttons===0){p(M);return}let A=gZ(i.current,M.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);A=Za(A,o.colDef.minWidth,o.colDef.maxWidth),c(A);const _={element:o.columnHeaderElement,colDef:o.colDef,width:A};e.current.publishEvent("columnResize",_,M)}),g=Je(M=>{mZ(M,l.current)&&u(M)}),y=Je(M=>{const A=mZ(M,l.current);if(!A)return;if(M.type==="mousemove"&&M.buttons===0){g(M);return}let _=gZ(i.current,A.x,o.columnHeaderElement.getBoundingClientRect(),a.current);_=Za(_,o.colDef.minWidth,o.colDef.maxWidth),c(_);const N={element:o.columnHeaderElement,colDef:o.colDef,width:_};e.current.publishEvent("columnResize",N,M)}),v=Je(M=>{const A=IO(M.target,ee["columnSeparator--resizable"]);if(!A)return;const _=M.changedTouches[0];_!=null&&(l.current=_.identifier);const N=IO(M.target,ee.columnHeader),B=_mt(N),H=e.current.getColumn(B);r.debug(`Start Resize on col ${H.field}`),e.current.publishEvent("columnResizeStart",{field:B},M),f(H,A,_.clientX);const j=Mr(M.currentTarget);j.addEventListener("touchmove",y),j.addEventListener("touchend",g)}),w=x.useCallback(()=>{const M=Mr(e.current.rootElementRef.current);M.body.style.removeProperty("cursor"),M.removeEventListener("mousemove",m),M.removeEventListener("mouseup",p),M.removeEventListener("touchmove",y),M.removeEventListener("touchend",g),setTimeout(()=>{M.removeEventListener("click",yZ,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,m,p,y,g]),C=x.useCallback(({field:M})=>{e.current.setState(A=>z({},A,{columnResize:z({},A.columnResize,{resizingColumnField:M})}))},[e]),E=x.useCallback(()=>{e.current.setState(M=>z({},M,{columnResize:z({},M.columnResize,{resizingColumnField:""})}))},[e]),I=Je(({colDef:M},A)=>{if(A.button!==0||!A.currentTarget.classList.contains(ee["columnSeparator--resizable"]))return;A.preventDefault(),r.debug(`Start Resize on col ${M.field}`),e.current.publishEvent("columnResizeStart",{field:M.field},A),f(M,A.currentTarget,A.clientX);const _=Mr(e.current.rootElementRef.current);_.body.style.cursor="col-resize",o.previousMouseClickEvent=A.nativeEvent,_.addEventListener("mousemove",m),_.addEventListener("mouseup",p),_.addEventListener("click",yZ,!0)}),O=Je((M,A)=>{if(t.disableAutosize||A.button!==0)return;const _=e.current.state.columns.lookup[M.field];_.resizable!==!1&&e.current.autosizeColumns(z({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[_.field]}))}),P=k0t(e),R=x.useRef(!1),D=x.useCallback(async M=>{var H;if(!((H=e.current.rootElementRef)==null?void 0:H.current)||R.current)return;R.current=!0;const _=Gl(e),N=z({},vht,M,{columns:(M==null?void 0:M.columns)??_.orderedFields});N.columns=N.columns.filter(j=>_.columnVisibilityModel[j]!==!1);const B=N.columns.map(j=>e.current.state.columns.lookup[j]);try{!t.disableVirtualization&&N.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await P());const j=$0t(e,N,B),L=B.map(V=>z({},V,{width:j[V.field],computedWidth:j[V.field],flex:0}));if(N.expand){const W=_.orderedFields.map(Y=>_.lookup[Y]).filter(Y=>_.columnVisibilityModel[Y.field]!==!1).reduce((Y,Z)=>Y+(j[Z.field]??Z.computedWidth??Z.width),0),q=e.current.getRootDimensions().viewportInnerSize.width-W;if(q>0){const Y=q/(L.length||1);L.forEach(Z=>{Z.width+=Y,Z.computedWidth+=Y})}}e.current.updateColumns(L),L.forEach((V,W)=>{if(V.width!==B[W].width){const K=V.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(V.field),colDef:V,width:K})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),R.current=!1}},[e,P,t.disableVirtualization]);x.useEffect(()=>w,[w]),Lj(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),zfe(e,()=>{var M;return(M=e.current.columnHeadersContainerRef)==null?void 0:M.current},"touchstart",v,{passive:!0}),yn(e,{autosizeColumns:D},"public"),At(e,"columnResizeStop",E),At(e,"columnResizeStart",C),At(e,"columnSeparatorMouseDown",I),At(e,"columnSeparatorDoubleClick",O),sr(e,"columnResize",t.onColumnResize),sr(e,"columnWidthChange",t.onColumnWidthChange)};function sg(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function j0t(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex<t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?{firstRowIndex:e.firstRowIndex,lastRowIndex:t.firstRowIndex-1}:e}function vZ(e){return e.firstRowIndex!==0||e.lastRowIndex!==0}const T$=(e,t,n)=>{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},Pg={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},RO={firstRowIndex:0,lastRowIndex:0},B0t=new Set([Cu,"__reorder__",VP]),bZ=20,bpe=(e,t,n,r,o,i,a)=>{const s=i?{}:z({},e.current.state.rowSpanning.spannedCells),l=i?{}:z({},e.current.state.rowSpanning.hiddenCells),c=i?{}:z({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=RO),t.forEach(u=>{var f;if(!B0t.has(u.field)){for(let p=o.firstRowIndex;p<o.lastRowIndex;p+=1){const m=n[p];if((f=l[m.id])!=null&&f[u.field])continue;const g=T$(m.model,u,e);if(g==null)continue;let y=m.id,v=p,w=0;const C=[];if(p===o.firstRowIndex){let I=p-1,O=n[I];for(;I>=r.firstRowIndex&&O&&T$(O.model,u,e)===g;){const P=n[I+1];l[P.id]?l[P.id][u.field]=!0:l[P.id]={[u.field]:!0},C.push(p),w+=1,y=O.id,v=I,I-=1,O=n[I]}}C.forEach(I=>{c[I]?c[I][u.field]=v:c[I]={[u.field]:v}});let E=p+1;for(;E<=r.lastRowIndex&&n[E]&&T$(n[E].model,u,e)===g;){const I=n[E];l[I.id]?l[I.id][u.field]=!0:l[I.id]={[u.field]:!0},c[E]?c[E][u.field]=v:c[E]={[u.field]:v},E+=1,w+=1}w>0&&(s[y]?s[y][u.field]=w+1:s[y]={[u.field]:w+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},xpe=(e,t)=>{const n=Wp(t).length;if(e.pagination){const r=Rfe(t);let o=bZ;return r>0&&(o=r-1),{firstRowIndex:0,lastRowIndex:Math.min(o,n)}}return{firstRowIndex:0,lastRowIndex:Math.min(bZ,n)}},z0t=(e,t,n)=>{var g;if(!t.rowSpanning)return z({},e,{rowSpanning:Pg});const r=e.rows.dataRowIds||[],o=e.columns.orderedFields||[],i=e.rows.dataRowIdToModelLookup,a=e.columns.lookup,s=!!e.filter.filterModel.items.length||!!((g=e.filter.filterModel.quickFilterValues)!=null&&g.length);if(!r.length||!o.length||!i||!a||s)return z({},e,{rowSpanning:Pg});const l=xpe(t,n),c=r.map(y=>({id:y,model:i[y]})),u=o.map(y=>a[y]),{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}=bpe(n,u,c,l,l,!0,RO);return z({},e,{rowSpanning:{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}})},V0t=(e,t)=>{const n=Jl(()=>e.current.state.rowSpanning!==Pg?xpe(t,e):RO),r=x.useCallback((i,a=!1)=>{const{range:s,rows:l}=Sf(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(s===null||!vZ(i))return;a&&(n.current=RO);const c=j0t({firstRowIndex:i.firstRowIndex,lastRowIndex:Math.min(i.lastRowIndex,s.lastRowIndex+1)},n.current);if(c===null)return;const u=Yr(e),{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m,processedRange:g}=bpe(e,u,l,s,c,a,n.current);n.current=g;const y=Object.keys(f).length,v=Object.keys(p).length,w=Object.keys(e.current.state.rowSpanning.spannedCells).length,C=Object.keys(e.current.state.rowSpanning.hiddenCells).length;!(a||y!==w||v!==C)||y===0&&w===0||e.current.setState(O=>z({},O,{rowSpanning:{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}}))},[e,n,t.pagination,t.paginationMode]),o=x.useCallback(()=>{const i=Xw(e);vZ(i)&&r(i,!0)},[e,r]);At(e,"renderedRowsIntervalChange",Zd(t.rowSpanning,r)),At(e,"sortedRowsSet",Zd(t.rowSpanning,o)),At(e,"paginationModelChange",Zd(t.rowSpanning,o)),At(e,"filteredRowsSet",Zd(t.rowSpanning,o)),At(e,"columnsChange",Zd(t.rowSpanning,o)),x.useEffect(()=>{t.rowSpanning?e.current.state.rowSpanning===Pg&&o():e.current.state.rowSpanning!==Pg&&e.current.setState(i=>z({},i,{rowSpanning:Pg}))},[e,o,t.rowSpanning])},H0t=(e,t,n)=>z({},e,{listViewColumn:t.listViewColumn?z({},t.listViewColumn,{computedWidth:fj(n)}):void 0});function U0t(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?z({},i,{listViewColumn:z({},i.listViewColumn,{computedWidth:fj(e)})}):i)},r=x.useRef(null);At(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),At(e,"columnVisibilityModelChange",n),In(()=>{const i=t.listViewColumn;i&&e.current.setState(a=>z({},a,{listViewColumn:z({},i,{computedWidth:fj(e)})}))},[e,t.listViewColumn]),x.useEffect(()=>{t.listView&&t.listViewColumn},[t.listView,t.listViewColumn])}function fj(e){return fr(e).viewportInnerSize.width}const G0t=Pt(Bo,Ns,ri,(e,t,n)=>({groupKeys:[],paginationModel:n,sortModel:t,filterModel:e,start:n.page*n.pageSize,end:n.page*n.pageSize+n.pageSize-1}));let O$=function(e){return e.Default="set-new-rows",e.LazyLoading="replace-row-range",e}({});class pj{constructor(t){this.chunkSize=void 0,this.getCacheKeys=n=>{if(this.chunkSize<1||typeof n.start!="number")return[n];const r=[];for(let o=n.start;o<n.end;o+=this.chunkSize){const i=Math.min(o+this.chunkSize-1,n.end);r.push(z({},n,{start:o,end:i}))}return r},this.splitResponse=(n,r)=>{const o=this.getCacheKeys(n),i=new Map;return o.forEach(a=>{var c,u,f,p;const s=a.end===n.end,l=z({},r,{pageInfo:z({},r.pageInfo,{hasNextPage:((c=r.pageInfo)==null?void 0:c.hasNextPage)!==void 0&&!s?!0:(u=r.pageInfo)==null?void 0:u.hasNextPage,nextCursor:((f=r.pageInfo)==null?void 0:f.nextCursor)!==void 0&&!s?r.rows[a.end+1].id:(p=r.pageInfo)==null?void 0:p.nextCursor}),rows:typeof a.start!="number"||typeof n.start!="number"?r.rows:r.rows.slice(a.start-n.start,a.end-n.start+1)});i.set(a,l)}),i},this.chunkSize=t}}pj.mergeResponses=e=>e.length===1?e[0]:e.reduce((t,n)=>({rows:[...t.rows,...n.rows],rowCount:n.rowCount,pageInfo:n.pageInfo}),{rows:[],rowCount:0,pageInfo:{}});const q0t={clear:()=>{},get:()=>{},set:()=>{}};function xZ(e,t={}){return e===null?q0t:e??new wht(t)}const W0t=(e,t,n={})=>{var O,P;const r=x.useCallback(()=>{e.current.setStrategyAvailability(tf.DataSource,O$.Default,t.dataSource?()=>!0:()=>!1)},[e,t.dataSource]),[o,i]=x.useState(!1),a=Ge(e,ri),s=x.useRef(0),l=t.onDataSourceError,c=Jl(()=>{const R=t.pageSizeOptions.map(M=>typeof M=="number"?M:M.value).sort((M,A)=>M-A),D=Math.min(a.pageSize,R[0]);return new pj(D)}).current,[u,f]=x.useState(()=>xZ(t.dataSourceCache,n.cacheOptions)),p=x.useCallback(async(R,D)=>{var H,j,L;const M=(H=t.dataSource)==null?void 0:H.getRows;if(!M)return;if(R&&R!==ii&&t.signature!=="DataGrid"){(j=n.fetchRowChildren)==null||j.call(n,[R]);return}(L=n.clearDataSourceState)==null||L.call(n);const A=z({},G0t(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),D),N=c.getCacheKeys(A).map(V=>u.get(V));if(N.every(V=>V!==void 0)){e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:pj.mergeResponses(N),fetchParams:A});return}(o||e.current.getRowsCount()===0)&&e.current.setLoading(!0);const B=s.current+1;s.current=B;try{const V=await M(A);c.splitResponse(A,V).forEach((K,G)=>u.set(G,K)),s.current===B&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:V,fetchParams:A})}catch(V){s.current===B&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:V,fetchParams:A}),typeof l=="function"&&l(new Cht({message:V==null?void 0:V.message,params:A,cause:V})))}finally{o&&s.current===B&&e.current.setLoading(!1)}},[c,u,e,o,(O=t.dataSource)==null?void 0:O.getRows,l,n,t.signature]),m=x.useCallback(()=>{i(e.current.getActiveStrategy(tf.DataSource)===O$.Default)},[e]),g=x.useCallback(R=>{if("error"in R){e.current.setRows([]);return}const{response:D}=R;D.rowCount!==void 0&&e.current.setRowCount(D.rowCount),e.current.setRows(D.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:R.fetchParams,response:D},!0)},[e]),y=(P=t.dataSource)==null?void 0:P.updateRow,v=n.handleEditRow,w=x.useCallback(async R=>{if(y)try{const D=await y(R);return typeof v=="function"?(v(R,D),D):(e.current.updateNestedRows([D],[]),D&&!Js(D,R.previousRow)&&e.current.dataSource.cache.clear(),D)}catch(D){throw typeof l=="function"&&l(new Eht({message:D==null?void 0:D.message,params:R,cause:D})),D}},[e,y,l,v]),C={dataSource:{fetchRows:p,cache:u,editRow:w}},E=x.useMemo(()=>Lh(p,0),[p]),I=x.useRef(!0);return x.useEffect(()=>{if(I.current){I.current=!1;return}if(t.dataSourceCache===void 0)return;const R=xZ(t.dataSourceCache,n.cacheOptions);f(D=>D!==R?R:D)},[t.dataSourceCache,n.cacheOptions]),x.useEffect(()=>{t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows())},[e,t.dataSource]),{api:{public:C},debouncedFetchRows:E,strategyProcessor:{strategyName:O$.Default,group:"dataSourceRowsUpdate",processor:g},setStrategyAvailability:r,cacheChunkManager:c,cache:u,events:{strategyAvailabilityChange:m,sortModelChange:Zd(o,()=>E()),filterModelChange:Zd(o,()=>E()),paginationModelChange:Zd(o,()=>E())}}},K0t=(e,t)=>{const{api:n,strategyProcessor:r,events:o,setStrategyAvailability:i}=W0t(e,t);yn(e,n.public,"public"),kS(e,r.strategyName,r.group,r.processor),Object.entries(o).forEach(([a,s])=>{At(e,a,s)}),x.useEffect(()=>{i()},[i])},Y0t=(e,t)=>{dbt(e,t),c0t(e,t),o0t(e),Fo(cbt,e,t),Fo(a0t,e,t),Fo(bbt,e,t),Fo(Zbt,e,t),Fo(zbt,e,t),Fo(Xbt,e,t),Fo(_bt,e,t),Fo(u0t,e,t),Fo(Hbt,e,t),Fo(Mbt,e,t),Fo(z0t,e,t),Fo(Sbt,e,t),Fo(N0t,e,t),Fo(ybt,e,t),Fo(I0t,e,t),Fo(Dpt,e,t),Fo(g0t,e,t),Fo(S0t,e,t),Fo(H0t,e,t),Fbt(e,t),s0t(e,t),xbt(e,t),e0t(e,t),V0t(e,t),i0t(e,t),E0t(e),P0t(e,t),Jbt(e,t),$bt(e,t),Ubt(e,t),kbt(e,t),d0t(e,t),wbt(e,t),F0t(e,t),Vbt(e,t),w0t(e,t),f0t(e,t),vbt(e),Ebt(e,t),Abt(e,t),gbt(e,t),y0t(e,t),p0t(e,t),C0t(e),kpt(e,t),U0t(e,t),K0t(e,t)},Q0t=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e,c={root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===On.LEFT&&"columnHeader--pinnedLeft",l===On.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Me(c,Cn,t)};function X0t(e){var W;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:f,pinnedOffset:p}=e,m=yt(),g=vr(),y=x.useRef(null),v=tn(),w=Ge(v,Ffe),C=t?w[t]:{},{headerName:E=t??"",description:I="",headerAlign:O=void 0}=C;let P;const R=t&&((W=w[t])==null?void 0:W.renderHeaderGroup),D=x.useMemo(()=>({groupId:t,headerName:E,description:I,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,E,I,r,o,i,s,u]);t&&R&&(P=R(D));const M=z({},e,{classes:m.classes,headerAlign:O,depth:r,isDragging:!1}),A=E??t,_=bn(),N=t===null?`empty-group-cell-${_}`:t,B=Q0t(M);x.useLayoutEffect(()=>{if(l){const G=y.current.querySelector('[tabindex="0"]')||y.current;G==null||G.focus()}},[v,l]);const H=x.useCallback(K=>G=>{Jw(G)||v.current.publishEvent(K,D,G)},[v,D]),j=x.useMemo(()=>({onKeyDown:H("columnGroupHeaderKeyDown"),onFocus:H("columnGroupHeaderFocus"),onBlur:H("columnGroupHeaderBlur")}),[H]),L=typeof C.headerClassName=="function"?C.headerClassName(D):C.headerClassName,V=x.useMemo(()=>QP(z({},e.style),g,f,p),[f,p,e.style,g]);return k.jsx(ipe,z({ref:y,classes:B,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:P,headerClassName:L,description:I,elementId:N,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:A,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:V},j))}const SZ=ae("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),J0t=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:p}=e,[m,g]=x.useState(""),[y,v]=x.useState(""),w=fs(),C=yt(),E=Ge(w,Lfe),I=Ge(w,Xf),O=Ge(w,Rpt),P=Ge(w,Vv),R=Ge(w,ud),D=Gfe(I,O,P.left.length),M=Ge(w,LP),A=Ge(w,Wde),_=Ge(w,Hut),N=Ge(w,Uut),B=Ge(w,Kde),H=x.useCallback(ce=>v(ce.field),[]),j=x.useCallback(()=>v(""),[]),L=x.useCallback(ce=>g(ce.field),[]),V=x.useCallback(()=>g(""),[]),W=x.useMemo(()=>P.left.length?{firstColumnIndex:0,lastColumnIndex:P.left.length}:null,[P.left.length]),K=x.useMemo(()=>P.right.length?{firstColumnIndex:t.length-P.right.length,lastColumnIndex:t.length}:null,[P.right.length,t.length]);At(w,"columnResizeStart",H),At(w,"columnResizeStop",j),At(w,"columnHeaderDragStart",L),At(w,"columnHeaderDragEnd",V);const G=ce=>{const{renderContext:ye=O}=ce||{},Se=ye.firstColumnIndex,ne=ye.lastColumnIndex;return{renderedColumns:t.slice(Se,ne),firstColumnToRender:Se,lastColumnToRender:ne}},q=(ce,ye,Se,ne=!1)=>{const le=(ce==null?void 0:ce.position)===On.RIGHT,de=(ce==null?void 0:ce.position)===void 0,oe=P.right.length>0&&le||P.right.length===0&&de,ue=D-Se;return k.jsxs(x.Fragment,{children:[de&&k.jsx("div",{role:"presentation",style:{width:ue}}),ye,de&&k.jsx("div",{role:"presentation",className:fe(ee.filler,ne&&ee["filler--borderBottom"])}),oe&&k.jsx(dH,{header:!0,pinnedRight:le,borderBottom:ne,borderTop:!1})]})},Y=(ce,ye={})=>{const{renderedColumns:Se,firstColumnToRender:ne}=G(ce),le=[];for(let de=0;de<Se.length;de+=1){const oe=Se[de],ue=ne+de,pe=ue===0,Ee=o!==null&&o.field===oe.field||pe&&!p?0:-1,xe=a!==null&&a.field===oe.field,Re=c.open&&c.field===oe.field,he=ce==null?void 0:ce.position,Pe=px(he,oe.computedWidth,ue,I,M,B),ve=he===On.RIGHT?Se[de-1]:Se[de+1],Ie=ve?a!==null&&a.field===ve.field:!1,te=ue+1===I.length-P.right.length,Te=de,De=Se.length,Ve=MO(he,Te),We=AO(he,Te,De,C.showColumnVerticalBorder,A);le.push(k.jsx(rgt,z({},n[oe.field],{columnMenuOpen:Re,filterItemsCounter:r[oe.field]&&r[oe.field].length,headerHeight:_,isDragging:oe.field===m,colDef:oe,colIndex:ue,isResizing:y===oe.field,isLast:ue===I.length-1,hasFocus:xe,tabIndex:Ee,pinnedPosition:he,pinnedOffset:Pe,isLastUnpinned:te,isSiblingFocused:Ie,showLeftBorder:Ve,showRightBorder:We},ye),oe.field))}return q(ce,le,0)},Z=()=>k.jsxs(SZ,{role:"row","aria-rowindex":l+1,ownerState:C,className:ee["row--borderBottom"],style:{height:_},children:[W&&Y({position:On.LEFT,renderContext:W},{disableReorder:!0}),Y({renderContext:O}),K&&Y({position:On.RIGHT,renderContext:K},{disableReorder:!0,separatorSide:cH.Left})]}),ie=({depth:ce,params:ye})=>{var De,Ve;const Se=G(ye);if(Se.renderedColumns.length===0)return null;const{firstColumnToRender:ne,lastColumnToRender:le}=Se,de=f[ce],oe=t[ne].field,ue=((De=E[oe])==null?void 0:De[ce])??null,pe=de.findIndex(({groupId:We,columnFields:rt})=>We===ue&&rt.includes(oe)),Ee=t[le-1].field,xe=((Ve=E[Ee])==null?void 0:Ve[ce])??null,Re=de.findIndex(({groupId:We,columnFields:rt})=>We===xe&&rt.includes(Ee)),he=de.slice(pe,Re+1).map(We=>z({},We,{columnFields:We.columnFields.filter(rt=>u[rt]!==!1)})).filter(We=>We.columnFields.length>0),Pe=he[0].columnFields.indexOf(oe),Ie=he[0].columnFields.slice(0,Pe).reduce((We,rt)=>{const ut=R[rt];return We+(ut.computedWidth??0)},0);let te=ne;const Te=he.map(({groupId:We,columnFields:rt},ut)=>{const Be=s!==null&&s.depth===ce&&rt.includes(s.field),et=i!==null&&i.depth===ce&&rt.includes(i.field)?0:-1,Le={width:rt.reduce((lt,vt)=>lt+R[vt].computedWidth,0),fields:rt,colIndex:te},It=ye.position,Lt=px(It,Le.width,te,I,M,B);te+=rt.length;let nt=ut;return It===On.LEFT&&(nt=te-1),k.jsx(X0t,{groupId:We,width:Le.width,fields:Le.fields,colIndex:Le.colIndex,depth:ce,isLastColumn:ut===he.length-1,maxDepth:l,height:N,hasFocus:Be,tabIndex:et,pinnedPosition:It,pinnedOffset:Lt,showLeftBorder:MO(It,nt),showRightBorder:AO(It,nt,he.length,C.showColumnVerticalBorder,A)},ut)});return q(ye,Te,Ie)};return{renderContext:O,leftRenderContext:W,rightRenderContext:K,pinnedColumns:P,visibleColumns:t,columnPositions:I,getFillers:q,getColumnHeadersRow:Z,getColumnsToRender:G,getColumnGroupHeadersRows:()=>{if(l===0)return null;const ce=[];for(let ye=0;ye<l;ye+=1)ce.push(k.jsxs(SZ,{role:"row","aria-rowindex":ye+1,ownerState:C,style:{height:N},children:[W&&ie({depth:ye,params:{position:On.LEFT,renderContext:W,maxLastColumn:W.lastColumnIndex}}),ie({depth:ye,params:{renderContext:O}}),K&&ie({depth:ye,params:{position:On.RIGHT,renderContext:K,maxLastColumn:K.lastColumnIndex}})]},ye));return ce},getPinnedCellOffset:px,isDragging:!!m,getInnerProps:()=>({role:"rowgroup"})}},Z0t=["className"],ext=e=>{const{classes:t}=e;return Me({root:["columnHeaders"]},Cn,t)},txt=Nn("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),nxt=Vt(function(t,n){const{className:r}=t,o=$e(t,Z0t),i=yt(),a=ext(i);return k.jsx(txt,z({className:fe(a.root,r),ownerState:i},o,{role:"presentation",ref:n}))}),rxt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],oxt=Vt(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:f,columnVisibility:p,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g}=t,y=$e(t,rxt),{getInnerProps:v,getColumnHeadersRow:w,getColumnGroupHeadersRows:C}=J0t({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:f,columnVisibility:p,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g});return k.jsxs(nxt,z({},y,v(),{ref:n,children:[C(),w()]}))}),ixt=ld(oxt);function axt(e){return null}function sxt(e){return null}const lxt=Vt(function(t,n){const o=tn().current.getLocaleText("noResultsOverlayLabel");return k.jsx(XP,z({},t,{ref:n,children:o}))}),cxt=new TextEncoder;let NE=2*1024,mx=new ArrayBuffer(NE),I$=new Uint8Array(mx),Tp=new Int32Array(mx);const uxt=dxt;function dxt(e){const t=e.length*2;t>NE&&(NE=t+(4-t%4),mx=new ArrayBuffer(NE),I$=new Uint8Array(mx),Tp=new Int32Array(mx));const n=cxt.encodeInto(e,I$).written,r=0,o=n|0;let i=0,a=(r+o|0)+374761393|0;if(o<16)for(;(i+3|0)<o;i=i+4|0)a=Math.imul(Cl(a+Math.imul(Tp[i]|0,3266489917)|0,17)|0,668265263);else{let s=r+606290984|0,l=r+2246822519|0,c=r,u=r-2654435761|0;for(;(i+15|0)<o;i=i+16|0)s=Math.imul(Cl(s+Math.imul(Tp[i+0|0]|0,2246822519)|0,13)|0,2654435761),l=Math.imul(Cl(l+Math.imul(Tp[i+4|0]|0,2246822519)|0,13)|0,2654435761),c=Math.imul(Cl(c+Math.imul(Tp[i+8|0]|0,2246822519)|0,13)|0,2654435761),u=Math.imul(Cl(u+Math.imul(Tp[i+12|0]|0,2246822519)|0,13)|0,2654435761);for(a=(((Cl(s,1)|0+Cl(l,7)|0)+Cl(c,12)|0)+Cl(u,18)|0)+o|0;(i+3|0)<o;i=i+4|0)a=Math.imul(Cl(a+Math.imul(Tp[i]|0,3266489917)|0,17)|0,668265263)}for(;i<o;i=i+1|0)a=Math.imul(Cl(a+Math.imul(I$[i]|0,374761393)|0,11)|0,2654435761);return a=Math.imul(a^a>>>15,2246822519),a=Math.imul(a^a>>>13,3266489917),((a^a>>>16)>>>0).toString()}function Cl(e,t){return e<<t|e>>>32-t}function fxt(e){const t=new WeakSet;return JSON.stringify(e,(n,r)=>{if(r!==null&&typeof r=="object"){if(t.has(r))return null;t.add(r)}return r})}function pxt(){const e=Lr();return x.useMemo(()=>{const t=uxt(fxt(e)),n=hxt(e);return{id:t,variables:n}},[e])}function hxt(e){var g,y,v,w,C,E;const t=gxt(e),n=e.palette.DataGrid,r=(n==null?void 0:n.bg)??(e.vars||e).palette.background.default,o=(n==null?void 0:n.headerBg)??r,i=(n==null?void 0:n.pinnedBg)??r,a=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:Nt(e.palette.background.default,e.palette.action.disabledOpacity),s=e.palette.mode==="dark"?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper,l=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,c=mxt(e),u=((y=(g=e.vars)==null?void 0:g.font)==null?void 0:y.body2)??P$(e.typography.body2),f=((w=(v=e.vars)==null?void 0:v.font)==null?void 0:w.caption)??P$(e.typography.caption),p=((E=(C=e.vars)==null?void 0:C.font)==null?void 0:E.body1)??P$(e.typography.body1),m=Ct.keys;return{[m.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[m.colors.border.base]:t,[m.colors.background.base]:r,[m.colors.background.overlay]:s,[m.colors.background.backdrop]:a,[m.colors.foreground.base]:(e.vars||e).palette.text.primary,[m.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[m.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[m.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[m.colors.foreground.error]:(e.vars||e).palette.error.dark,[m.colors.interactive.hover]:(e.vars||e).palette.action.hover,[m.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[m.colors.interactive.focus]:wZ((e.vars||e).palette.primary.main),[m.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[m.colors.interactive.disabled]:wZ((e.vars||e).palette.action.disabled),[m.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[m.colors.interactive.selected]:l,[m.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[m.header.background.base]:o,[m.cell.background.pinned]:i,[m.radius.base]:c,[m.typography.fontFamily.base]:e.typography.fontFamily,[m.typography.fontWeight.light]:e.typography.fontWeightLight,[m.typography.fontWeight.regular]:e.typography.fontWeightRegular,[m.typography.fontWeight.medium]:e.typography.fontWeightMedium,[m.typography.fontWeight.bold]:e.typography.fontWeightBold,[m.typography.font.body]:u,[m.typography.font.small]:f,[m.typography.font.large]:p,[m.transitions.easing.easeIn]:e.transitions.easing.easeIn,[m.transitions.easing.easeOut]:e.transitions.easing.easeOut,[m.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[m.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[m.transitions.duration.base]:`${e.transitions.duration.short}ms`,[m.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[m.shadows.base]:(e.vars||e).shadows[2],[m.shadows.overlay]:(e.vars||e).shadows[8],[m.zIndex.panel]:(e.vars||e).zIndex.modal,[m.zIndex.menu]:(e.vars||e).zIndex.modal}}function mxt(e){return e.vars?e.vars.shape.borderRadius:typeof e.shape.borderRadius=="number"?`${e.shape.borderRadius}px`:e.shape.borderRadius}function gxt(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?Hu(Nt(e.palette.divider,1),.88):Vu(Nt(e.palette.divider,1),.68)}function yxt(e,t){return`rgba(from ${e} r g b / ${t})`}function wZ(e){return yxt(e,1)}function P$(e){return`${e.fontWeight} ${e.fontSize} / ${e.lineHeight} ${e.fontFamily}`}const vxt=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],bxt=["onRowsPerPageChange","material","disabled"],xxt=["material"],Sxt=["autoFocus","label","fullWidth","slotProps","className","material"],wxt=["material"],Cxt=["material"],Ext=["material"],Txt=["material"],Oxt=["material"],Ixt=["material"],Pxt=["material"],Axt=["material"],Mxt=["material","label","className"],Rxt=["material"],Dxt=["inert","iconStart","iconEnd","children","material"],kxt=["slotProps","material"],_xt=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],$xt=["key"],Nxt=["inputProps","InputProps","InputLabelProps"],Lxt=["slotProps","material"],Fxt=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],jxt=["native"],CZ=ae(So)(({theme:e})=>({[`&.${ON.positionEnd} .${xN.sizeSmall}`]:{marginRight:e.spacing(-.75)}})),Spe=ae(os,{shouldForwardProp:e=>e!=="fullWidth"})(({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:"hidden",[`& .${mg.label}`]:{fontSize:e.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),EZ=ae(oTe,{shouldForwardProp:e=>e!=="density"})(({theme:e})=>({variants:[{props:{density:"compact"},style:{padding:e.spacing(.5)}}]})),Bxt=ae(Wr)({[`& .${Fp.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),zxt=Vt(function(t,n){const{id:r,label:o,labelId:i,material:a,disabled:s,slotProps:l,onChange:c,onKeyDown:u,onOpen:f,onClose:p,size:m,style:g,fullWidth:y}=t,v=$e(t,vxt),w={PaperProps:{onKeyDown:u}};return p&&(w.onClose=p),k.jsxs(jh,{size:m,fullWidth:y,style:g,disabled:s,ref:n,children:[k.jsx(Bh,{id:i,htmlFor:r,shrink:!0,variant:"outlined",children:o}),k.jsx(jf,z({id:r,labelId:i,label:o,displayEmpty:!0,onChange:c},v,{variant:"outlined",notched:!0,inputProps:l==null?void 0:l.htmlInput,onOpen:f,MenuProps:w,size:m},a))]})}),Vxt=ae(Fne)(({theme:e})=>({[`& .${rh.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${rh.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),Hxt=Vt(function(t,n){const{onRowsPerPageChange:r,material:o,disabled:i}=t,a=$e(t,bxt),s=x.useMemo(()=>{if(i)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}},[i]),l=tn(),c=yt(),{estimatedRowCount:u}=c;return k.jsx(Vxt,z({component:"div",onRowsPerPageChange:Je(f=>{r==null||r(Number(f.target.value))}),labelRowsPerPage:l.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:f=>l.current.getLocaleText("paginationDisplayedRows")(z({},f,{estimated:u})),getItemAriaLabel:l.current.getLocaleText("paginationItemAriaLabel")},s,a,o,{ref:n}))}),Uxt=Vt(function(t,n){const{material:r}=t,o=$e(t,xxt);return k.jsx(sEe,z({},o,r,{ref:n}))}),Gxt=Vt(function(t,n){const{autoFocus:r,label:o,fullWidth:i,slotProps:a,className:s,material:l}=t,c=$e(t,Sxt),u=x.useRef(null),f=en(u,n),p=x.useRef(null);return x.useEffect(()=>{var m;if(r){const g=(m=u.current)==null?void 0:m.querySelector("input");g==null||g.focus({preventScroll:!0})}else r===!1&&p.current&&p.current.stop({})},[r]),o?k.jsx(Spe,{className:s,control:k.jsx(EZ,z({},c,l,{inputProps:a==null?void 0:a.htmlInput,ref:f,touchRippleRef:p})),label:o,fullWidth:i}):k.jsx(EZ,z({},c,l,{className:fe(s,l==null?void 0:l.className),inputProps:a==null?void 0:a.htmlInput,ref:f,touchRippleRef:p}))}),qxt=Vt(function(t,n){const{material:r}=t,o=$e(t,wxt);return k.jsx(nw,z({},o,r,{ref:n}))}),Wxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Cxt);return k.jsx(Bi,z({},o,r,{ref:n}))}),Kxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Ext);return k.jsx(Ene,z({},o,r,{ref:n}))}),Yxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Txt);return k.jsx(ct,z({},o,r,{ref:n}))}),Qxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Oxt);return k.jsx(nl,z({},o,r,{ref:n}))}),Xxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Ixt);return k.jsx(pn,z({},o,r,{ref:n}))}),Jxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Pxt);return k.jsx(qo,z({},o,r,{ref:n}))}),Zxt=Vt(function(t,n){const{material:r}=t,o=$e(t,Axt);return k.jsx(mE,z({},o,r,{ref:n}))}),eSt=Vt(function(t,n){const{material:r,label:o,className:i}=t,a=$e(t,Mxt);return o?k.jsx(Spe,{className:i,control:k.jsx(Wo,z({},a,r,{ref:n})),label:o}):k.jsx(Wo,z({},a,r,{className:i,ref:n}))}),tSt=Vt(function(t,n){const{material:r}=t,o=$e(t,Rxt);return k.jsx(dI,z({},o,r,{ref:n}))});function nSt(e){const{inert:t,iconStart:n,iconEnd:r,children:o,material:i}=e,a=$e(e,Dxt);return t&&(a.disableRipple=!0),x.createElement(Zt,z({},a,i),[n&&k.jsx(rl,{children:n},"1"),k.jsx(Bxt,{children:o},"2"),r&&k.jsx(rl,{children:r},"3")])}function rSt(e){const{slotProps:t,material:n}=e,r=$e(e,kxt);return k.jsx(dn,z({variant:"outlined"},r,n,{inputProps:t==null?void 0:t.htmlInput,InputProps:hH(t==null?void 0:t.input),InputLabelProps:z({shrink:!0},t==null?void 0:t.inputLabel)}))}function oSt(e){const t=yt(),{id:n,multiple:r,freeSolo:o,options:i,getOptionLabel:a,isOptionEqualToValue:s,value:l,onChange:c,label:u,placeholder:f,slotProps:p,material:m}=e,g=$e(e,_xt);return k.jsx($c,z({id:n,multiple:r,freeSolo:o,options:i,getOptionLabel:a,isOptionEqualToValue:s,value:l,onChange:c,renderTags:(y,v)=>y.map((w,C)=>{const E=v({index:C}),{key:I}=E,O=$e(E,$xt);return k.jsx(nl,z({variant:"outlined",size:"small",label:typeof w=="string"?w:a==null?void 0:a(w)},O),I)}),renderInput:y=>{var I;const{inputProps:v,InputProps:w,InputLabelProps:C}=y,E=$e(y,Nxt);return k.jsx(dn,z({},E,{label:u,placeholder:f,inputProps:v,InputProps:hH(w,!1),InputLabelProps:z({shrink:!0},C)},p==null?void 0:p.textField,(I=t.slotProps)==null?void 0:I.baseTextField))}},g,m))}function iSt(e){return k.jsx(iw,z({},hH(e)))}function hH(e,t=!0){if(!e)return;const{slotProps:n,material:r}=e,i=$e(e,Lxt);t&&(i.startAdornment&&(i.startAdornment=k.jsx(CZ,{position:"start",children:i.startAdornment})),i.endAdornment&&(i.endAdornment=k.jsx(CZ,{position:"end",children:i.endAdornment})));for(const a in r)Object.hasOwn(r,a)&&(i[a]=r[a]);return n!=null&&n.htmlInput&&(i.inputProps?i.inputProps=z({},i.inputProps,n==null?void 0:n.htmlInput):i.inputProps=n==null?void 0:n.htmlInput),i}const aSt={"bottom-start":"top left","bottom-end":"top right"};function sSt(e){const{open:t,children:n,className:r,flip:o,onExited:i,onDidShow:a,onDidHide:s,id:l,target:c,transition:u,placement:f,material:p}=e,m=$e(e,Fxt),g=x.useMemo(()=>{const v=[{name:"preventOverflow",options:{padding:8}}];return o&&v.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(a||s)&&v.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{a==null||a()},effect:()=>()=>{s==null||s()}}),v},[o,a,s]);let y;if(!u)y=TZ(e,n);else{const v=w=>C=>{w&&w(),i&&i(C)};y=w=>{var C;return TZ(e,k.jsx(yh,z({},w.TransitionProps,{style:{transformOrigin:aSt[w.placement]},onExited:v((C=w.TransitionProps)==null?void 0:C.onExited),children:k.jsx(go,{children:n})})))}}return k.jsx(lv,z({id:l,className:r,open:t,anchorEl:c,transition:u,placement:f,modifiers:g},m,p,{children:y}))}function TZ(e,t){return cSt(e,lSt(e,t))}function lSt(e,t){return e.onClickAway===void 0?t:k.jsx(yne,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}function cSt(e,t){return e.focusTrap===void 0?t:k.jsx(cB,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:k.jsx("div",{tabIndex:-1,children:t})})}function uSt(e){let{native:t}=e,n=$e(e,jxt);return t?k.jsx("option",z({},n)):k.jsx(Zt,z({},n))}const dSt={booleanCellTrueIcon:JJ,booleanCellFalseIcon:YJ,columnMenuIcon:Ogt,openFilterButtonIcon:bgt,filterPanelDeleteIcon:YJ,columnFilteredIcon:KJ,columnSelectorIcon:Sgt,columnSortedAscendingIcon:UJ,columnSortedDescendingIcon:GJ,columnResizeIcon:wgt,densityCompactIcon:Cgt,densityStandardIcon:Egt,densityComfortableIcon:Tgt,exportIcon:kgt,moreActionsIcon:Agt,treeDataCollapseIcon:WJ,treeDataExpandIcon:qJ,groupingCriteriaCollapseIcon:WJ,groupingCriteriaExpandIcon:qJ,detailPanelExpandIcon:QJ,detailPanelCollapseIcon:Igt,rowReorderIcon:XJ,quickFilterIcon:xgt,quickFilterClearIcon:ZJ,columnMenuHideIcon:Mgt,columnMenuSortAscendingIcon:UJ,columnMenuSortDescendingIcon:GJ,columnMenuUnsortIcon:null,columnMenuFilterIcon:KJ,columnMenuManageColumnsIcon:Rgt,columnMenuClearIcon:ZJ,loadIcon:Pgt,filterPanelAddIcon:QJ,filterPanelRemoveAllIcon:Dgt,columnReorderIcon:XJ,menuItemCheckIcon:JJ},fSt={baseAutocomplete:oSt,baseBadge:Uxt,baseCheckbox:Gxt,baseChip:Qxt,baseCircularProgress:qxt,baseDivider:Wxt,baseInput:iSt,baseLinearProgress:Kxt,baseMenuList:tSt,baseMenuItem:nSt,baseTextField:rSt,baseButton:Yxt,baseIconButton:Xxt,baseTooltip:Jxt,basePagination:Hxt,basePopper:sSt,baseSelect:zxt,baseSelectOption:uSt,baseSkeleton:Zxt,baseSwitch:eSt},pSt=z({},fSt,dSt),hSt=()=>Me({root:["bottomContainer"]},Cn,{}),mSt=Nn("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function gSt(e){const t=hSt();return k.jsx(mSt,z({},e,{className:fe(t.root,ee["container--bottom"]),role:"presentation"}))}const ySt=z({},pSt,{cell:zht,skeletonCell:Qht,columnHeaderFilterIconButton:ygt,columnHeaderSortIcon:mgt,columnMenu:Qgt,columnHeaders:ixt,detailPanels:axt,bottomContainer:gSt,footer:Pvt,footerRowCount:Uvt,toolbar:Cvt,pinnedRows:sxt,loadingOverlay:Nvt,noResultsOverlay:lxt,noRowsOverlay:Lvt,noColumnsOverlay:Fvt,pagination:Bvt,filterPanel:Tyt,columnsPanel:eyt,columnsManagement:_yt,panel:iyt,row:Yvt}),vSt={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",listView:!1},bSt=e=>z({},vSt,e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}),xSt=ySt,SSt=e=>{const t=Lr(),n=x.useMemo(()=>$j({props:e,theme:t,name:"MuiDataGrid"}),[t,e]),r=x.useMemo(()=>z({},Wut,n.localeText),[n.localeText]),o=x.useMemo(()=>_ht({defaultSlots:xSt,slots:n.slots}),[n.slots]),i=x.useMemo(()=>Object.keys(cj).reduce((a,s)=>(a[s]=n[s]??cj[s],a),{}),[n]);return x.useMemo(()=>z({},n,i,{localeText:r,slots:o},bSt(n)),[n,r,o,i])};class wSt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a<i.length;a+=1){const s=i[a];r.regular.has(s)&&s.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}class mH{static create(t){return new mH(t)}constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const wpe=Symbol("mui.api_private"),CSt=e=>e.isPropagationStopped!==void 0;let OZ=0;function ESt(e){var o;const t=(o=e.current)==null?void 0:o[wpe];if(t)return t;const n={},r={state:n,store:mH.create(n),instanceId:{id:OZ}};return OZ+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,f=u[s];(f==null?void 0:f.spying)===!0?f.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new wSt}),r}function TSt(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[wpe]:e.current}}function OSt(e,t){var a;const n=x.useRef(null),r=x.useRef(null);r.current||(r.current=ESt(n)),n.current||(n.current=TSt(r));const o=x.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,CSt(u)&&u.isPropagationStopped())return;const f=t.signature===Ul.DataGridPro||t.signature===Ul.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,f)},[r,t.signature]),i=x.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return yn(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),x.useImperativeHandle(e,()=>n.current,[n]),x.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const ISt={hooks:{useCSSVariables:pxt,useGridAriaAttributes:Qvt,useGridRowAriaAttributes:Xvt,useCellAggregationResult:()=>null}},Cpe=Vt(function(t,n){var i;const r=SSt(t),o=OSt(r.apiRef,r);return Y0t(o,r),k.jsx(Jvt,{privateApiRef:o,configuration:ISt,props:r,children:k.jsx(fmt,z({className:r.className,style:r.style,sx:r.sx},(i=r.slotProps)==null?void 0:i.root,{ref:n}))})}),Epe=x.memo(Cpe);Cpe.propTypes={apiRef:U.shape({current:U.object}),"aria-label":U.string,"aria-labelledby":U.string,autoHeight:U.bool,autoPageSize:U.bool,autosizeOnMount:U.bool,autosizeOptions:U.shape({columns:U.arrayOf(U.string),disableColumnVirtualization:U.bool,expand:U.bool,includeHeaders:U.bool,includeOutliers:U.bool,outliersFactor:U.number}),cellModesModel:U.object,checkboxSelection:U.bool,classes:U.object,className:U.string,clipboardCopyCellDelimiter:U.string,columnBufferPx:U.number,columnGroupHeaderHeight:U.number,columnGroupingModel:U.arrayOf(U.object),columnHeaderHeight:U.number,columns:U.arrayOf(U.object).isRequired,columnVisibilityModel:U.object,dataSource:U.shape({getRows:U.func.isRequired,updateRow:U.func}),dataSourceCache:U.shape({clear:U.func.isRequired,get:U.func.isRequired,set:U.func.isRequired}),density:U.oneOf(["comfortable","compact","standard"]),disableAutosize:U.bool,disableColumnFilter:U.bool,disableColumnMenu:U.bool,disableColumnResize:U.bool,disableColumnSelector:U.bool,disableColumnSorting:U.bool,disableDensitySelector:U.bool,disableEval:U.bool,disableMultipleRowSelection:U.bool,disableRowSelectionOnClick:U.bool,disableVirtualization:U.bool,editMode:U.oneOf(["cell","row"]),estimatedRowCount:U.number,experimentalFeatures:U.shape({warnIfFocusStateIsNotSynced:U.bool}),filterDebounceMs:U.number,filterMode:U.oneOf(["client","server"]),filterModel:U.shape({items:U.arrayOf(U.shape({field:U.string.isRequired,id:U.oneOfType([U.number,U.string]),operator:U.string.isRequired,value:U.any})).isRequired,logicOperator:U.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:U.bool,quickFilterLogicOperator:U.oneOf(["and","or"]),quickFilterValues:U.array}),getCellClassName:U.func,getDetailPanelContent:U.func,getEstimatedRowHeight:U.func,getRowClassName:U.func,getRowHeight:U.func,getRowId:U.func,getRowSpacing:U.func,hideFooter:U.bool,hideFooterPagination:U.bool,hideFooterSelectedRowCount:U.bool,ignoreDiacritics:U.bool,ignoreValueFormatterDuringExport:U.oneOfType([U.shape({clipboardExport:U.bool,csvExport:U.bool}),U.bool]),initialState:U.object,isCellEditable:U.func,isRowSelectable:U.func,keepNonExistentRowsSelected:U.bool,label:U.string,loading:U.bool,localeText:U.object,logger:U.shape({debug:U.func.isRequired,error:U.func.isRequired,info:U.func.isRequired,warn:U.func.isRequired}),logLevel:U.oneOf(["debug","error","info","warn",!1]),nonce:U.string,onCellClick:U.func,onCellDoubleClick:U.func,onCellEditStart:U.func,onCellEditStop:U.func,onCellKeyDown:U.func,onCellModesModelChange:U.func,onClipboardCopy:U.func,onColumnHeaderClick:U.func,onColumnHeaderContextMenu:U.func,onColumnHeaderDoubleClick:U.func,onColumnHeaderEnter:U.func,onColumnHeaderLeave:U.func,onColumnHeaderOut:U.func,onColumnHeaderOver:U.func,onColumnOrderChange:U.func,onColumnResize:U.func,onColumnVisibilityModelChange:U.func,onColumnWidthChange:U.func,onDataSourceError:U.func,onDensityChange:U.func,onFilterModelChange:U.func,onMenuClose:U.func,onMenuOpen:U.func,onPaginationMetaChange:U.func,onPaginationModelChange:U.func,onPreferencePanelClose:U.func,onPreferencePanelOpen:U.func,onProcessRowUpdateError:U.func,onResize:U.func,onRowClick:U.func,onRowCountChange:U.func,onRowDoubleClick:U.func,onRowEditStart:U.func,onRowEditStop:U.func,onRowModesModelChange:U.func,onRowSelectionModelChange:U.func,onSortModelChange:U.func,onStateChange:U.func,pageSizeOptions:U.arrayOf(U.oneOfType([U.number,U.shape({label:U.string.isRequired,value:U.number.isRequired})]).isRequired),pagination:U.oneOf([!0]),paginationMeta:U.shape({hasNextPage:U.bool}),paginationMode:U.oneOf(["client","server"]),paginationModel:U.shape({page:U.number.isRequired,pageSize:U.number.isRequired}),processRowUpdate:U.func,resizeThrottleMs:U.number,rowBufferPx:U.number,rowCount:U.number,rowHeight:U.number,rowModesModel:U.object,rows:U.arrayOf(U.object),rowSelection:U.bool,rowSelectionModel:U.shape({ids:U.instanceOf(Set).isRequired,type:U.oneOf(["exclude","include"]).isRequired}),rowSpacingType:U.oneOf(["border","margin"]),rowSpanning:U.bool,scrollbarSize:U.number,showCellVerticalBorder:U.bool,showColumnVerticalBorder:U.bool,showToolbar:U.bool,slotProps:U.object,slots:U.object,sortingMode:U.oneOf(["client","server"]),sortingOrder:U.arrayOf(U.oneOf(["asc","desc"])),sortModel:U.arrayOf(U.shape({field:U.string.isRequired,sort:U.oneOf(["asc","desc"])})),style:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),virtualizeColumnsWithAutoRowHeight:U.bool};const PSt=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),ASt=e=>{const[t]=je(),n=PSt(e.category.entries),r=Nde(),o=put(),[i,a]=x.useState(n),[s,l]=x.useState({}),c=(C,E)=>{C.reason===ks.rowFocusOut&&(E.defaultMuiPrevented=!0)},u=C=>()=>{l({...s,[C]:{mode:zn.Edit}})},f=C=>()=>{l({...s,[C]:{mode:zn.View}})},p=C=>async()=>{console.log("deleting entry",C),o.mutate(parseInt(C.toString())),a(i.filter(E=>E.id!==C))},m=C=>()=>{l({...s,[C]:{mode:zn.View,ignoreModifications:!0}});const E=i.find(I=>I.id===C);(E==null?void 0:E.id)===null&&a(i.filter(I=>I.id!==C))},g=async C=>{r.mutate({id:C.id,categoryId:C.category,date:C.date,value:C.value,notes:C.notes});const E={...C,isNew:!1};return a(i.map(I=>I.id===C.id?E:I)),E},y=C=>{console.log(C)},v=C=>{l(C)},w=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:C=>C==null?"":C+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:C=>C==null?"":xt.fromJSDate(C).toLocaleString(xt.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:C})=>{var I;return((I=s[C])==null?void 0:I.mode)===zn.Edit?[S(yf,{icon:S(ade,{}),label:"Save",sx:{color:"primary.main"},onClick:f(C)}),S(yf,{icon:S(cw,{}),label:"Cancel",className:"textPrimary",onClick:m(C),color:"inherit"})]:[S(yf,{icon:S(kV,{}),label:"Edit",className:"textPrimary",onClick:u(C),color:"inherit"}),S(yf,{icon:S(OS,{}),label:"Delete",onClick:p(C),color:"inherit"})]}}];return S(Xt,{sx:{width:"100%"},children:S(Epe,{editMode:"row",rows:n,columns:w,initialState:{pagination:{paginationModel:{pageSize:QN.pageSize}}},pageSizeOptions:QN.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:v,onRowEditStop:c,processRowUpdate:g,onProcessRowUpdateError:y})})},JP=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=je();return S(cv,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(ho,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",borderWidth:0,boxShadow:24,p:2},children:[S(Zl,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:S(cw,{onClick:i})}),S(ji,{children:S(at,{variant:"body1",children:r})}),Q(ul,{children:[S(ct,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),S(ct,{color:"primary",onClick:i,children:a("close")})]})]})})},Tpe=({category:e,closeFn:t})=>{const[n]=je(),r=cut(),o=uut(e==null?void 0:e.id),i=Ko({name:Uo().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:Uo().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return S(Oi,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>S(pi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),S(dn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},MSt=e=>{const t=dut(e.category.id),n=sd(),[r]=je(),[o,i]=J.useState(null),[a,s]=J.useState(!1),[l,c]=J.useState(!1),u=!!o,f=I=>{i(I.currentTarget)},p=()=>{m(),v()},m=()=>{i(null)},g=()=>{C(),i(null)},y=()=>{t.mutate(e.category.id),n(on(Yt.MEASUREMENT_OVERVIEW))},v=()=>s(!0),w=()=>s(!1),C=()=>c(!0),E=()=>c(!1);return Q("div",{children:[S(ct,{onClick:f,children:S(_V,{})}),Q(ss,{anchorEl:o,open:u,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Zt,{onClick:p,children:r("edit")}),S(Zt,{onClick:g,children:r("delete")})]}),S(di,{title:r("edit"),isOpen:a,closeFn:w,children:S(Tpe,{category:e.category,closeFn:w})}),S(JP,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:E,deleteFn:y})]})};to.defaultZone=h2e;const Ope=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=je(),i=fut(),a=Nde(),s=$de(n),[l,c]=J.useState(e?xt.fromJSDate(e.date):xt.now()),u=Ko({value:ko().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:Xs().required(r("forms.fieldRequired")),notes:Uo().max(500,r("forms.maxLength",{value:"500"}))});return S(Oi,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async f=>{e?a.mutate({...f,id:e.id}):i.mutate({...f,categoryId:n}),t&&t()},children:f=>S(pi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:f.touched.value&&!!f.errors.value,helperText:f.touched.value&&f.errors.value,...f.getFieldProps("value")}),s.isLoading?S(Er,{}):S(Ys,{dateAdapter:Hl,adapterLocale:o.language,children:S(Ah,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:p=>{p&&f.setFieldValue("date",p.toJSDate()),c(p)},shouldDisableDate:p=>e&&Zn(e.date)===Zn(p.toJSDate())?!1:p?s.data.entries.some(m=>Zn(m.date)===Zn(p.toJSDate())):!1})}),S(dn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:f.touched.notes&&!!f.errors.notes,helperText:f.touched.notes&&f.errors.notes,...f.getFieldProps("notes")}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},RSt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(Tpe,{closeFn:o})})]})},DSt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1),i=Ma(),a=parseInt(i.categoryId);return Q(Tt,{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(Ope,{closeFn:o,categoryId:a})})]})},oE=['"Open Sans Bold"',"sans-serif"].join(","),kSt=['"Open Sans Light"',"sans-serif"].join(","),Ipe={spacing:8,typography:{h3:{fontFamily:oE},h4:{fontFamily:oE},h5:{fontFamily:oE},h6:{fontFamily:oE},fontFamily:kSt},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},nm=ZS(Ipe),_St=e=>ZS({...Ipe,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),Ppe=e=>{const{i18n:t}=je(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return S(Xt,{alignItems:"center",display:"flex",flexDirection:"column",children:S(od,{width:"90%",height:200,children:Q(Wz,{data:r,children:[S(Wh,{type:"monotone",dataKey:"value",stroke:nm.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),S(qf,{stroke:"#ccc",strokeDasharray:"5 5"}),S(ls,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),S(cs,{domain:["auto","auto"],unit:e.category.unit})]})})})},$St=()=>{const e=Ma(),t=parseInt(e.categoryId??"");if(Number.isNaN(t))return S("p",{children:"Please pass an integer as the category id."});const n=$de(t);return n.isLoading?S(Er,{}):S(ds,{title:n.data.name,optionsMenu:S(MSt,{category:n.data}),mainContent:Q(Ft,{spacing:2,children:[S(Ppe,{category:n.data}),S(ASt,{category:n.data})]}),fab:S(DSt,{})})},NSt=e=>{const[t,n]=je(),[r,o]=J.useState(!1),i=()=>o(!0),a=()=>o(!1);return Q(Tt,{children:[Q(ho,{children:[S(Zl,{title:e.category.name,subheader:e.category.unit}),S(ji,{children:S(Ppe,{category:e.category})}),Q(ul,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[S(ct,{size:"small",children:S(Do,{to:on(Yt.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),S(pn,{onClick:i,children:S(Eo,{})})]})]}),S(di,{title:t("add"),isOpen:r,closeFn:a,children:S(Ope,{closeFn:a,categoryId:e.category.id})})]})},IZ=()=>{const e=_de(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("measurements.measurements"),mainContent:Q(Ft,{spacing:2,children:[e.data.length===0&&S(zh,{}),e.data.map(n=>S(NSt,{category:n},n.id))]}),fab:S(RSt,{})})};function Ra(){return yr({queryKey:[st.QUERY_PROFILE],queryFn:HLe})}const LSt=()=>{const e=Mt();return Dt({mutationFn:t=>ULe(t),onSuccess:async()=>{await e.invalidateQueries({queryKey:[st.QUERY_PROFILE]})}})},LE=[{range:"obese",color:"#FF5733",min:30,max:100},{range:"overweight",color:"#FFC107",min:25,max:30},{range:"normal",color:"#90EE90",min:18.5,max:25},{range:"underweight",color:"#FFC300",min:0,max:18.5}],iE=e=>{const t=LE.find(n=>n.range===e);return t?t.color:"gray"},FSt=()=>{const[e]=je(),t=Bw(),n=Ra(),[r,o]=x.useState(),[i,a]=x.useState();x.useEffect(()=>{var u;if(t.data&&t.data.length>0){const f=t.data[0],p=(u=n.data)!=null&&u.useMetric?f.weight:f.weight*.453592;a(p)}},[t.data,n.data]),x.useEffect(()=>{var u;(u=n.data)!=null&&u.height&&o(n.data.height)},[n.data]);const l=(()=>{if(r&&i){const u=r/100;return i/(u*u)}return null})();if(t.isLoading||n.isLoading)return S(Er,{});const c=[];for(let u=140;u<=220;u+=10){const f=u/100,p={height:u};let m=0;LE.forEach((g,y)=>{const v=g.max>100?100:g.max;let w=v*f*f-m;w=Math.min(w,150-m),y===0?p[g.range]=w:p[g.range]=p[LE[y-1].range]+w,m=Math.min(v*f*f,150)}),c.push(p)}return S(ds,{title:e("bmi.calculator"),mainContent:S(Tt,{children:Q(Ft,{spacing:2,children:[Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:6},children:S(dn,{label:e("height"),fullWidth:!0,slotProps:{input:{endAdornment:S(at,{children:e("cm")})}},type:"number",value:r??"",onChange:u=>o(parseFloat(u.target.value))})}),S(me,{size:{xs:12,sm:6},children:S(dn,{label:e("weight"),slotProps:{input:{endAdornment:S(at,{children:e("server.kg")})}},fullWidth:!0,type:"number",value:i??"",onChange:u=>a(parseFloat(u.target.value))})})]}),l!==null&&S(at,{variant:"h6",children:e("bmi.result",{value:l.toFixed(1)})}),S(od,{width:"100%",height:400,children:Q(hYe,{data:c,children:[S(ls,{dataKey:"height",type:"number",domain:[140,220],unit:"cm"}),S(cs,{domain:[40,150],tickFormatter:u=>Math.round(u).toString(),unit:"kg"}),S(qf,{strokeDasharray:"3 3"}),S(ba,{formatter:(u,f)=>[Math.round(u),e("bmi."+f)]}),LE.map(u=>S(Wf,{type:"monotone",dataKey:u.range,stroke:"black",fill:u.color,fillOpacity:.8},u.range)),l!==null&&S(Ow,{x:r,y:i,r:8,fill:"black",stroke:"none"})]})}),Q(Ft,{direction:"row",justifyContent:"center",children:[S(Xt,{height:20,width:20,sx:{backgroundColor:iE("obese")}}),e("bmi.obese"),S(Xt,{height:20,width:20,sx:{backgroundColor:iE("overweight"),marginLeft:2}}),e("bmi.overweight"),S(Xt,{height:20,width:20,sx:{backgroundColor:iE("normal"),marginLeft:2}}),e("bmi.normal"),S(Xt,{height:20,width:20,sx:{backgroundColor:iE("underweight"),marginLeft:2}}),e("bmi.underweight")]})]})})})},jSt=e=>{var r,o,i,a;const[t,n]=je();return Q(cn,{children:[S(ke,{sx:{paddingX:1},children:S(Yl,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:S(ed,{})})}),Q(ke,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:$i(e.item.nutritionalValues.energy,n.language),kj:$i(e.item.nutritionalValues.energyKj,n.language)})}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.item.nutritionalValues.protein,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.item.nutritionalValues.carbohydrates,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},hj=e=>{const[t,n]=je();return S(jc,{children:Q(Lc,{children:[S(Bf,{children:Q(cn,{children:[S(ke,{}),S(ke,{}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),Q(Fc,{children:[e.items.map(r=>S(jSt,{item:r},r.id)),e.showSum&&Q(cn,{children:[S(ke,{sx:{paddingX:1},children:" "}),S(ke,{sx:{paddingX:1},children:t("total")}),S(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:$i(e.values.energy,n.language),kj:$i(e.values.energyKj,n.language)})}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.values.protein,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.values.carbohydrates,n.language)}),S(ke,{align:"right",sx:{paddingX:1},children:$n(e.values.fat,n.language)})]})]})]})})},BSt=e=>{const[t,n]=je();return S(jc,{children:Q(Lc,{size:"small",children:[S(Bf,{children:Q(cn,{children:[S(ke,{children:t("nutrition.macronutrient")}),S(ke,{align:"right",children:t("nutrition.planned")}),S(ke,{align:"right",children:t("nutrition.logged")}),S(ke,{align:"right",children:t("nutrition.difference")})]})}),Q(Fc,{children:[Q(cn,{children:[S(ke,{children:t("nutrition.energy")}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:$i(e.planned.energy,n.language),kj:$i(e.planned.energyKj,n.language)})}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:$i(e.logged.energy,n.language),kj:$i(e.logged.energyKj,n.language)})}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:$i(e.logged.energy-e.planned.energy,n.language),kj:$i(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),Q(cn,{children:[S(ke,{children:t("nutrition.protein")}),S(ke,{align:"right",children:$n(e.planned.protein,n.language)}),S(ke,{align:"right",children:$n(e.logged.protein,n.language)}),S(ke,{align:"right",children:$n(e.logged.protein-e.planned.protein,n.language)})]}),Q(cn,{children:[S(ke,{children:t("nutrition.carbohydrates")}),S(ke,{align:"right",children:$n(e.planned.carbohydrates,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydrates,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),Q(cn,{children:[S(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),S(ke,{align:"right",children:$n(e.planned.carbohydratesSugar,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydratesSugar,n.language)}),S(ke,{align:"right",children:$n(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),Q(cn,{children:[S(ke,{children:t("nutrition.fat")}),S(ke,{align:"right",children:$n(e.planned.fat,n.language)}),S(ke,{align:"right",children:$n(e.logged.fat,n.language)}),S(ke,{align:"right",children:$n(e.logged.fat-e.planned.fat,n.language)})]}),Q(cn,{children:[S(ke,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),S(ke,{align:"right",children:$n(e.planned.fatSaturated,n.language)}),S(ke,{align:"right",children:$n(e.logged.fatSaturated,n.language)}),S(ke,{align:"right",children:$n(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),Q(cn,{children:[S(ke,{children:t("nutrition.others")}),S(ke,{}),S(ke,{}),S(ke,{})]}),Q(cn,{children:[S(ke,{children:t("nutrition.fibres")}),S(ke,{align:"right",children:$n(e.planned.fiber,n.language)}),S(ke,{align:"right",children:$n(e.logged.fiber,n.language)}),S(ke,{align:"right",children:$n(e.logged.fiber-e.planned.fiber,n.language)})]}),Q(cn,{children:[S(ke,{children:t("nutrition.sodium")}),S(ke,{align:"right",children:$n(e.planned.sodium,n.language)}),S(ke,{align:"right",children:$n(e.logged.sodium,n.language)}),S(ke,{align:"right",children:$n(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},PZ=()=>{const[e]=je(),t=Ma(),n=parseInt(t.planId);if(Number.isNaN(n))return S("p",{children:"Please pass an integer as the nutritional plan id."});const r=new Date(t.date),o=ZLe(n,t.date);return o.isLoading?S(Er,{}):S(ds,{title:e("nutrition.nutritionalDiary"),mainContent:S(Tt,{children:Q(Ft,{spacing:2,children:[S(at,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),S(BSt,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),S(hj,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*Zw(e){let t;e<=3?t=p2e:e<=5?t=f2e:t=d2e;for(const n of t)yield n}const zSt=e=>{const[t,n]=je(),r=Zw(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return S(od,{width:"100%",height:300,children:Q(Lle,{children:[S(qc,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:f,payload:p})=>{const m=u+(f-u)*.4,g=s+m*Math.cos(-c*i),y=l+m*Math.sin(-c*i);return S("text",{x:g,y,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:$n(p.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>S(Ev,{fill:r.next().value},`cell-${l}`))}),S(Ic,{})]})})},VSt=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=je(),a=Zw(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return S(od,{width:"100%",height:300,children:Q(Nle,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[S(qf,{strokeDasharray:"3 4"}),S(ls,{dataKey:"name"}),S(cs,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),S(ba,{formatter:l=>$i(l,i.language)}),S(Ic,{}),e&&S(Mc,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),S(Mc,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),S(Mc,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},HSt=e=>{const[t,n]=je();return S(jc,{children:Q(Lc,{size:"small",children:[S(Bf,{children:Q(cn,{children:[S(ke,{children:t("date")}),S(ke,{align:"right",children:t("nutrition.logged")}),S(ke,{align:"right",children:t("nutrition.difference")})]})}),S(Fc,{children:Array.from(e.logged).map(([r])=>{var o,i;return Q(cn,{children:[S(ke,{children:S(Do,{to:on(Yt.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcal",{value:$i((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),S(ke,{align:"right",children:$i(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},USt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(DV,{closeFn:o})})]})},GSt=e=>{const[t]=je(),[n,r]=J.useState(!1),o=()=>r(!0),i=()=>r(!1);return Q("div",{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:S(lw,{})}),S(di,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:S(RV,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},Ape=({meal:e,planId:t,closeFn:n})=>{const[r,o]=je(),i=aFe(t),a=lFe(t),s=Ko({name:Uo().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:Xs().required()});return S(Oi,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:Dx(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>S(pi,{children:Q(Ft,{spacing:2,children:[S(dn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),S(Ys,{dateAdapter:Hl,adapterLocale:o.language,children:S(UF,{label:r("timeOfDay"),value:l.values.time!==null?xt.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),Q(Ft,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&S(ct,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),S(ct,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},qSt=e=>{const[t]=je(),n=Zw(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return S(od,{width:"100%",height:150,children:Q(Nle,{data:r,layout:"vertical",margin:{left:60},children:[S(qf,{strokeDasharray:"3 4"}),S(ls,{type:"number",unit:"%"}),S(cs,{type:"category",dataKey:"name"}),S(Mc,{dataKey:"value",unit:"%",fill:n.next().value})]})})},Mpe=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=je(),i=cFe(e),a=uFe(e),s=dFe(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=Ko({amount:ko().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:ko().required(o("forms.fieldRequired"))});return S(Oi,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const f={...u,meal:n,weight_unit:null};t?a.mutate({...f,id:t.id}):i.mutate(f),r&&r()},children:u=>{var f;return S(pi,{children:Q(Ft,{spacing:2,children:[S(bV,{callback:p=>u.setFieldValue("ingredient",p?p.data.id:null),initialIngredient:t?(f=t.ingredient)==null?void 0:f.name:null}),S(dn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:S(So,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),Q(Ft,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&S(ct,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&S(ct,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),S(ct,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},WSt=e=>{const t=iie(e.planId),n=sFe(e.planId),[r]=je(),[o,i]=J.useState(!1),[a,s]=x.useState(null),[l,c]=x.useState(!1),[u,f]=x.useState(!1),p=!!a,m=D=>{s(D.currentTarget)},g=()=>{y(),C()},y=()=>{s(null)},v=()=>{I(),s(null)},w=()=>{n.mutate(e.meal.id)},C=()=>c(!0),E=()=>c(!1),I=()=>f(!0),O=()=>f(!1),P=(D,M)=>{M!=="clickaway"&&i(!1)},R=()=>{const D=e.meal.items.map(M=>({plan:e.planId,meal:e.meal.id,mealItem:M.id,ingredient:M.ingredientId,weight_unit:M.weightUnitId,datetime:new Date().toISOString(),amount:M.amount}));t.mutate(D),i(!0)};return Q(Tt,{children:[!e.onlyLogging&&S(qo,{title:r("nutrition.logThisMeal"),children:S(pn,{"aria-label":"settings",onClick:R,children:S(lw,{})})}),S(pn,{"aria-label":"settings",onClick:m,children:S(ide,{})}),S(pn,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?S(rde,{}):S(ode,{})}),Q(ss,{anchorEl:a,open:p,onClose:y,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Zt,{onClick:g,children:r("edit")}),S(Zt,{onClick:v,children:r("delete")})]}),S(di,{title:r("edit"),isOpen:l,closeFn:E,children:S(Ape,{meal:e.meal,closeFn:E,planId:e.planId})}),S(JP,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:O,deleteFn:w}),S(fI,{open:o,autoHideDuration:TI,onClose:P,children:S(Ei,{onClose:P,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},KSt=e=>{var o,i,a,s;const[t,n]=x.useState(!1),r=()=>n(!t);return Q(Tt,{children:[Q(Co,{children:[S(pB,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:S(Yl,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:S(ed,{})})}),S(Wr,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),S(aa,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:S(Co,{children:S(Wr,{children:S(Mpe,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},AZ=e=>{const t=Lr(),n=e.meal.id!==xE,[r]=je(),[o,i]=x.useState(!1),a=()=>i(!o),[s,l]=x.useState(!1),c=()=>{l(!s),f(!1)},[u,f]=x.useState(!1),p=()=>{f(!u),l(!1)};return Q(ho,{children:[S(Zl,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==xE&&S(WSt,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),Q(ji,{sx:{paddingY:0},children:[Q(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&S(hj,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),S(at,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&S(qSt,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),S(hj,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&S(ai,{children:e.meal.items.map(m=>S(KSt,{mealItem:m,planId:e.planId,mealId:e.meal.id},m.id))})]}),Q(ul,{children:[!e.onlyLogging&&S(qo,{title:r("nutrition.addMealItem"),children:S(pn,{onClick:c,children:S(Eo,{})})}),S(qo,{title:r("nutrition.addNutritionalDiary"),children:S(pn,{onClick:p,children:S(lw,{})})})]}),S(aa,{in:s,timeout:"auto",unmountOnExit:!0,children:Q(ji,{sx:{paddingY:0},children:[S("p",{children:S("b",{children:r("nutrition.addMealItem")})}),S(Mpe,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),S(aa,{in:u,timeout:"auto",unmountOnExit:!0,children:Q(ji,{sx:{paddingY:0},children:[S("p",{children:S("b",{children:r("nutrition.addNutritionalDiary")})}),S(RV,{closeFn:p,planId:e.planId,mealId:e.meal.id!==xE?e.meal.id:null})]})})]})},MZ=e=>{const[t,n]=je();return S(jc,{children:Q(Lc,{size:"small",children:[S(Bf,{children:Q(cn,{children:[S(ke,{children:t("nutrition.macronutrient")}),S(ke,{align:"right",children:t("total")}),S(ke,{align:"right",children:t("nutrition.percentEnergy")})]})}),Q(Fc,{children:[Q(cn,{children:[S(ke,{children:t("nutrition.energy")}),S(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:$i(e.values.energy,n.language),kj:$i(e.values.energyKj,n.language)})}),S(ke,{align:"right"})]}),Q(cn,{children:[S(ke,{children:t("nutrition.protein")}),S(ke,{align:"right",children:$n(e.values.protein,n.language)}),S(ke,{align:"right",children:ZR(e.values.percent.protein,n.language)})]}),Q(cn,{children:[S(ke,{children:t("nutrition.carbohydrates")}),S(ke,{align:"right",children:$n(e.values.carbohydrates,n.language)}),S(ke,{align:"right",children:ZR(e.values.percent.carbohydrates,n.language)})]}),Q(cn,{children:[S(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),S(ke,{align:"right",children:$n(e.values.carbohydratesSugar,n.language)}),S(ke,{align:"right"})]}),Q(cn,{children:[S(ke,{children:t("nutrition.fat")}),S(ke,{align:"right",children:$n(e.values.fat,n.language)}),S(ke,{align:"right",children:ZR(e.values.percent.fat,n.language)})]}),Q(cn,{children:[S(ke,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),S(ke,{align:"right",children:$n(e.values.fatSaturated,n.language)}),S(ke,{align:"right"})]}),Q(cn,{children:[S(ke,{children:t("nutrition.others")}),S(ke,{children:" "}),S(ke,{align:"right"})]}),Q(cn,{children:[S(ke,{children:t("nutrition.fibres")}),S(ke,{align:"right",children:$n(e.values.fiber,n.language)}),S(ke,{align:"right"})]}),Q(cn,{children:[S(ke,{children:t("nutrition.sodium")}),S(ke,{align:"right",children:$n(e.values.sodium,n.language)}),S(ke,{align:"right"})]})]})]})})},YSt=e=>{const t=tFe(e.plan.id),n=sd(),[r,o]=je(),[i,a]=J.useState(null),[s,l]=J.useState(!1),[c,u]=J.useState(!1),f=!!i,p=R=>{a(R.currentTarget)},m=()=>{g(),E()},g=()=>{a(null)},y=()=>{O(),a(null)},v=()=>{t.mutate(e.plan.id),n(on(Yt.NUTRITION_OVERVIEW))},w=()=>window.location.href=on(Yt.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),C=()=>window.location.href=on(Yt.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),E=()=>l(!0),I=()=>l(!1),O=()=>u(!0),P=()=>u(!1);return Q(Tt,{children:[S(ct,{onClick:p,children:S(_V,{})}),Q(ss,{anchorEl:i,open:f,onClose:g,children:[S(Zt,{onClick:m,children:r("edit")}),S(Zt,{onClick:w,children:r("downloadAsPdf")}),S(Zt,{onClick:C,children:r("nutrition.copyPlan")}),S(Zt,{onClick:y,children:r("delete")})]}),S(di,{title:r("edit"),isOpen:s,closeFn:I,children:S(DV,{plan:e.plan,closeFn:I})}),S(JP,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:P,deleteFn:v})]})},QSt=e=>{const[t]=je(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return S(Tt,{children:Q(Ft,{direction:"column",spacing:1,children:[S(at,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),S(Fg,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),S(Fg,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),S(Fg,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},XSt=()=>{const[e]=je(),t=Ma(),n=parseInt(t.planId??"");if(Number.isNaN(n))return S("p",{children:"Please pass an integer as the nutritional plan id."});const r=JLe(n),[o,i]=x.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?S(Er,{}):S(ds,{title:s.description,optionsMenu:S(YSt,{plan:s}),mainContent:S(Tt,{children:Q(Ft,{spacing:2,children:[s.meals.map(l=>S(AZ,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),S(AZ,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&Q(Tt,{children:[S(qo,{title:e("nutrition.addMeal"),children:S(pn,{onClick:a,children:S(Eo,{})})}),Q(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:[S("p",{children:S("b",{children:e("nutrition.addMeal")})}),S(Ape,{planId:s.id,closeFn:a})]})]}),S(MZ,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&S(zSt,{data:s.plannedNutritionalValues}),S(at,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),S(VSt,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),S(MZ,{values:s.loggedNutritionalValuesToday}),S(HSt,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:S(QSt,{plan:s}),fab:S(GSt,{plan:s})})},JSt=()=>{var n;const e=QLe(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("nutrition.plans"),mainContent:Q(Ft,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&S(zh,{}),S(ewt,{plans:e.data})]}),fab:S(USt,{})})},ZSt=e=>{const[t,n]=je(),r=on(Yt.NUTRITION_DETAIL,n.language,{id:e.plan.id});return Q(Tt,{children:[S(Co,{sx:{p:0},children:Q(Bl,{component:"a",href:r,children:[S(Wr,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.end?`${e.plan.start.toLocaleDateString()} – ${e.plan.end.toLocaleDateString()}`:`${e.plan.start.toLocaleDateString()}`}),S(tde,{})]})}),S(Bi,{component:"li"})]})},ewt=e=>S(go,{children:S(ai,{sx:{py:0},children:e.plans.map(t=>S(ZSt,{plan:t},t.id))},"abc")});function Ju(e){const[t,n]=us(e.fieldName),r=e.fullwidth??!0;return S(dn,{fullWidth:r,id:e.fieldName,label:e.title,variant:"standard",error:n.touched&&!!n.error,helperText:n.touched&&n.error,...t,...e.fieldProps})}const twt=e=>{const{t}=je(),n=Nw(e.routineId),r=[{value:"normal",label:t("routines.set.normalSet")},{value:"dropset",label:t("routines.set.dropSet")},{value:"myo",label:t("routines.set.myo")},{value:"partial",label:t("routines.set.partial")},{value:"forced",label:t("routines.set.forced")},{value:"tut",label:t("routines.set.tut")},{value:"iso",label:t("routines.set.iso")},{value:"jump",label:t("routines.set.jump")}],o=i=>{n.mutate({id:e.slotEntry.id,type:i})};return S(Tt,{children:S(dn,{fullWidth:!0,select:!0,label:t("routines.set.type"),variant:"standard",value:e.slotEntry.type,disabled:n.isPending,onChange:i=>o(i.target.value),children:r.map(i=>S(Zt,{value:i.value,children:i.label},i.value))})})},nwt=e=>{var a;const{t}=je(),n=Nw(e.routineId),r=mst();if(r.isLoading)return S(vh,{});const o=(a=r.data)==null?void 0:a.map(s=>({value:s.id,label:s.name})),i=s=>{n.mutate({id:e.slotEntry.id,repetition_unit:parseInt(s)})};return S(Tt,{children:S(dn,{fullWidth:!0,select:!0,label:t("unit"),variant:"standard",value:e.slotEntry.repetitionUnitId,disabled:n.isPending,onChange:s=>i(s.target.value),children:o.map(s=>S(Zt,{value:s.value,children:s.label},s.value))})})},rwt=e=>{var s;const{t}=je(),n=Nw(e.routineId),r=hst(),o=Ra();if(r.isLoading||o.isLoading)return S(vh,{});const i=(s=r.data)==null?void 0:s.map(l=>({value:l.id,label:l.name})),a=l=>{n.mutate({id:e.slotEntry.id,weight_unit:parseInt(l)})};return S(Tt,{children:S(dn,{fullWidth:!0,select:!0,label:t("unit"),variant:"standard",value:e.slotEntry.weightUnitId,disabled:n.isPending,onChange:l=>a(l.target.value),children:i.map(l=>S(Zt,{value:l.value,children:l.label},l.value))})})};function owt(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const DO=e=>{const{t}=je(),n=Nw(e.routineId),r=LSt(),[o,i]=x.useState(e.initialValue===null?"":e.initialValue),a=x.useCallback(owt(l=>{let c=parseFloat(l);Number.isNaN(c)&&(c=null);const u=e.rounding==="weight"?{weight_rounding:c}:{reps_rounding:c};e.editProfile?r.mutate(u):n.mutate({id:e.entryId,...u})},Nre),[]),s=l=>{i(l),a(l)};return S(dn,{fullWidth:!0,label:e.rounding==="weight"?t("weight"):t("routines.reps"),variant:"standard",value:o,disabled:n.isPending||r.isPending,onChange:l=>s(l.target.value)})},eC=({routine:e,isTemplate:t=!0,isPublicTemplate:n=!0,closeFn:r})=>{const[o,i]=je(),a=Rat(),s=Yue((e==null?void 0:e.id)??-1),l=sd(),[c,u]=x.useState(e?xt.fromJSDate(e.start):xt.now()),[f,p]=x.useState(e?xt.fromJSDate(e.end):xt.now().plus({weeks:B$e})),m=f.diff(c,["weeks","days"]),g=Math.floor(m.weeks),y=Math.floor(m.days),v=Ko({name:Uo().required().max(Hq,o("forms.maxLength",{chars:Hq})).min(Vq,o("forms.minLength",{chars:Vq})),description:Uo().max(Uq,o("forms.maxLength",{chars:Uq})),start:Xs().required(),end:Xs().required().min(MP("start"),o("forms.endBeforeStart")).test("hasMinimumDuration",o("routines.minLengthRoutine",{number:Gq}),function(w){const C=this.parent.start;if(C&&w){const E=xt.fromJSDate(C);return xt.fromJSDate(w).diff(E,"weeks").weeks>=Gq}return!0}).test("hasMaximumDuration",o("routines.maxLengthRoutine",{number:qq}),function(w){const C=this.parent.start;if(C&&w){const E=xt.fromJSDate(C);return xt.fromJSDate(w).diff(E,"weeks").weeks<=qq}return!0}),fitInWeek:Fu()});return S(Oi,{initialValues:{name:e?e.name:"",description:e?e.description:"",start:c,end:f,fitInWeek:e?e.fitInWeek:!0},validationSchema:v,onSubmit:async w=>{var C;if(e){const E=ol.clone(e);E.fitInWeek=w.fitInWeek,E.name=w.name,E.description=w.description,E.start=w.start.toJSDate(),E.end=w.end.toJSDate(),s.mutate(E)}else{const E=await a.mutateAsync(new ol({id:null,name:w.name,description:w.description,created:new Date,start:w.start.toJSDate(),end:(C=w.end)==null?void 0:C.toJSDate(),fitInWeek:w.fitInWeek,isTemplate:t,isPublic:n}));l(on(Yt.ROUTINE_EDIT,i.language,{id:E.id})),r&&r()}},children:w=>S(pi,{children:Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12},children:S(Ju,{fieldName:"name",title:o("name")})}),S(me,{size:12,children:S(Ju,{fieldName:"description",title:o("description"),fieldProps:{multiline:!0,rows:4}})}),S(me,{size:{xs:6},children:S(Ys,{dateAdapter:Hl,adapterLocale:i.language,children:S(Ah,{defaultValue:xt.now(),label:o("start"),value:c,onChange:C=>{C&&(w.setFieldValue("start",C),u(C))},slotProps:{textField:{variant:"standard",fullWidth:!0,error:w.touched.start&&!!w.errors.start,helperText:w.touched.start&&w.errors.start?String(w.errors.start):""}}})})}),S(me,{size:{xs:5},children:S(Ys,{dateAdapter:Hl,adapterLocale:i.language,children:S(Ah,{defaultValue:xt.now(),label:o("end"),value:f,onChange:C=>{C&&(w.setFieldValue("end",C),p(C))},slotProps:{textField:{variant:"standard",fullWidth:!0,error:w.touched.end&&!!w.errors.end,helperText:w.touched.end&&w.errors.end?String(w.errors.end):""}}})})}),S(me,{size:{xs:1},sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:y===0?o("durationWeeks",{number:g}):o("durationWeeksDays",{nrWeeks:g,nrDays:y})}),Q(me,{size:12,children:[S(os,{control:S(Wo,{checked:w.values.fitInWeek,...w.getFieldProps("fitInWeek")}),label:o("routines.fitDaysInWeek")}),S(qo,{title:o("routines.fitDaysInWeekHelpText"),children:S(pn,{size:"small",children:S(IS,{fontSize:"inherit"})})})]}),S(me,{size:12,children:S(ct,{disabled:w.isSubmitting,color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:o("save")})})]})})})},iwt=e=>{const t=Ra(),{t:n}=je(),[r,o]=J.useState(null),i=!!r,a=l=>{o(l.currentTarget)},s=()=>{o(null)};return Q(Ft,{direction:"row",children:[S(ct,{variant:"text",id:"basic-button","aria-controls":i?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":i?"true":void 0,onClick:a,children:n("routines.defaultRounding")}),Q(ss,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Zt,{children:S(DO,{routineId:e.routineId,rounding:"weight",editProfile:!0,initialValue:t.data.weightRounding})}),S(Zt,{children:S(DO,{routineId:e.routineId,rounding:"reps",editProfile:!0,initialValue:t.data.repetitionsRounding})})]}),S(qo,{title:n("routines.roundingHelp"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]})},awt=()=>S(me,{container:!0,children:S(me,{size:6,offset:3,children:S(eC,{})})}),Rpe=e=>{const{t}=je(),n=Yue(e.routine.id),[r,o]=x.useState(e.routine.isTemplate),[i,a]=x.useState(e.routine.isPublic),s=u=>{const f=u&&i;o(u),a(f),c(u,f)},l=u=>{const f=u&&r;a(f),c(r,f)},c=(u,f)=>{const p=ol.clone(e.routine);p.isTemplate=u,p.isPublic=f,n.mutate(p)};return Q(me,{container:!0,spacing:2,children:[S(me,{size:12,children:Q(Ft,{children:[S(os,{disabled:n.isPending,control:S(Wo,{checked:r,onChange:async()=>s(!r)}),label:t("routines.template")}),S(at,{variant:"caption",children:t("routines.templatesHelpText")})]})}),S(me,{size:12,children:Q(Ft,{children:[S(os,{disabled:n.isPending||!r,control:S(Wo,{checked:i,onChange:async()=>l(!i)}),label:t("routines.publicTemplate")}),S(at,{variant:"caption",children:t("routines.publicTemplateHelpText")})]})})]})},swt=e=>{const t=sd(),n=Dat(e.routine.id),[r,o]=je(),[i,a]=x.useState(null),[s,l]=x.useState(0),c=!!i,u=w=>{a(w.currentTarget)},f=()=>{l(1),y()},p=()=>{l(2),y()},m=async()=>{await n.mutateAsync(),t(on(Yt.ROUTINE_OVERVIEW,o.language))},g=()=>{l(0)},y=()=>{a(null)};return Q("div",{children:[S(ct,{onClick:u,children:S(_V,{})}),Q(ss,{anchorEl:i,open:c,onClose:y,children:[S(Zt,{onClick:()=>window.location.href=on(Yt.ROUTINE_EDIT,o.language,{id:e.routine.id}),children:r("edit")}),S(Zt,{component:Do,to:on(Yt.ROUTINE_DETAIL_TABLE,o.language,{id:e.routine.id}),children:"Table view"}),e.routine.isNotTemplate&&S(Zt,{component:Do,to:on(Yt.ROUTINE_LOGS_OVERVIEW,o.language,{id:e.routine.id}),children:r("routines.logsOverview")}),e.routine.isNotTemplate&&S(Zt,{component:Do,to:on(Yt.ROUTINE_STATS_OVERVIEW,o.language,{id:e.routine.id}),children:r("routines.statsOverview")}),S(Zt,{component:"a",href:on(Yt.ROUTINE_COPY,o.language,{id:e.routine.id}),children:r("routines.duplicate")}),S(Zt,{onClick:p,children:r("routines.markAsTemplate")}),S(Zt,{component:"a",href:on(Yt.ROUTINE_PDF_TABLE,o.language,{id:e.routine.id}),download:`Routine-${e.routine.id}-table.pdf`,children:r("routines.downloadPdfTable")}),S(Zt,{component:"a",href:on(Yt.ROUTINE_PDF_LOGS,o.language,{id:e.routine.id}),download:`Routine-${e.routine.id}-logs.pdf`,children:r("routines.downloadPdfLogs")}),S(Zt,{component:"a",href:on(Yt.ROUTINE_ICAL,o.language,{id:e.routine.id}),download:`Routine-${e.routine.id}-calendar.ics`,children:r("routines.downloadIcal")}),S(Bi,{}),S(Zt,{onClick:f,children:r("delete")})]}),Q(Ix,{open:s===1,onClose:g,children:[S(eT,{id:"alert-dialog-title",children:r("delete")}),S(Ax,{children:S(r6,{id:"alert-dialog-description",children:r("deleteConfirmation",{name:e.routine.name})})}),Q(Px,{children:[S(ct,{onClick:g,children:r("cancel")}),S(ct,{onClick:m,color:"error",autoFocus:!0,children:r("delete")})]})]}),Q(Ix,{open:s===2,onClose:g,children:[S(eT,{children:r("routines.markAsTemplate")}),S(Ax,{children:S(r6,{children:S(Rpe,{routine:e.routine})})}),S(Px,{children:S(ct,{onClick:g,children:r("close")})})]})]})},lwt=()=>{const{t:e}=je(),t=Ma(),n=parseInt(t.routineId??"");if(Number.isNaN(n))return S("p",{children:"Please pass an integer as the routine id."});const r=Yc(n),o=r.data,i=`${o==null?void 0:o.start.toLocaleDateString()} - ${o==null?void 0:o.end.toLocaleDateString()} (${o==null?void 0:o.durationText})`,a=o!=null&&o.isTemplate?S(nl,{color:"info",size:"small",label:e("routines.template")}):null;return S(DP,{query:r,child:r.isSuccess&&S(ds,{title:Q(Tt,{children:[o.name," ",a]}),subTitle:i,optionsMenu:S(swt,{routine:r.data}),mainContent:Q(Ft,{spacing:2,children:[o.description!==""&&S(at,{variant:"body2",sx:{whiteSpace:"pre-line"},children:o==null?void 0:o.description}),o.isTemplate&&S(ct,{component:"a",href:on(Yt.ROUTINE_COPY,lr.language,{id:n}),variant:"contained",children:e("routines.copyAndUseTemplate")}),o.dayDataCurrentIteration.filter(s=>s.day!==null).map((s,l)=>S(zV,{routineId:n,dayData:s,readOnly:o.isTemplate},l))]}),sideBar:Q(Ft,{children:[S(Xt,{height:40}),Q(me,{container:!0,children:[S(me,{size:6,children:S(Xl,{primaryMuscles:o.mainMuscles.filter(s=>s.isFront),secondaryMuscles:o.secondaryMuscles.filter(s=>s.isFront),isFront:!0})}),S(me,{size:6,children:S(Xl,{primaryMuscles:o.mainMuscles.filter(s=>!s.isFront),secondaryMuscles:o.secondaryMuscles.filter(s=>!s.isFront),isFront:!1})})]})]})})})},A$="RoutineDetailsTable",Ou={stickyColumn:`${A$}-stickyColumn`,stickyHeader:`${A$}-stickyHeader`,whiteBg:`${A$}-whiteBg`},cwt=ae(Gu)({[`& .${Ou.stickyColumn}`]:{position:"sticky",left:0,zIndex:1},[`& .${Ou.stickyHeader}`]:{position:"sticky",top:0,zIndex:2,background:"white"},[`& .${Ou.whiteBg}`]:{backgroundColor:"white"}}),uwt=()=>{const{t:e,i18n:t}=je(),n=Ma(),r=n.routineId?parseInt(n.routineId):0,o=Yc(r),i=Kue(r),[a,s]=J.useState(!1);return S(DP,{query:o,child:o.isSuccess&&S(Vw,{title:o.data.name,backToUrl:on(Yt.ROUTINE_DETAIL,t.language,{id:r}),maxWidth:!1,children:Q(Ft,{children:[S(os,{control:S(Wo,{checked:a,onChange:(l,c)=>s(c)}),label:e("routines.alsoShowLogs")}),S(Dpe,{routine:o.data,showLogs:a,logData:i.data})]})})})};function dwt(e,t,n){return e==null?null:t!=null&&n!==null&&n!==void 0?e<t?"lower":e>n?"higher":"match":t!=null?e<t?"lower":e>t?"higher":"match":null}const Dpe=e=>{const{t,i18n:n}=je(),r=Lr(),o=Qc(),i=e.showLogs??!1,a=e.logData??[];let s;o.isSuccess&&(s=qu(n.language,o.data));const l={};for(const v of a)for(const w of v.logs)w.iteration!==null&&(l[w.iteration]||(l[w.iteration]=[]),l[w.iteration].push(w));const c=Object.keys(e.routine.groupedDayDataByIteration).map(v=>parseInt(v));function u(){return S(cn,{children:c.map(v=>{const w=v===1?S(ke,{className:Ou.stickyColumn}):null;return Q(J.Fragment,{children:[w,S(ke,{align:"center",children:t("routines.sets")}),S(ke,{align:"center",sx:{minWidth:40},children:t("routines.reps")}),S(ke,{align:"center",sx:{minWidth:40},children:t("weight")}),S(ke,{align:"center",sx:{minWidth:60},children:t("routines.restTime")}),S(ke,{align:"center",sx:{minWidth:40},children:t("routines.rir")})]},`header-${v}`)})})}function f(){return S(cn,{children:c.map(v=>{const w=v===1?S(ke,{className:Ou.stickyColumn}):null;return Q(J.Fragment,{children:[w,S(ke,{colSpan:5,children:S(at,{variant:"h6",children:t("routines.weekNr",{number:v})})})]},`header-iteration-${v}`)})})}function p(v,w){var I;const C={borderBottomWidth:i?0:null,minWidth:40};function E(O,P,R){return Q(Tt,{children:[O===null||P===null?"-/-":P,O!==null&&R!==null&&Q(Tt,{children:[" - ",R]})]})}return Q(cn,{children:[S(ke,{className:Ou.stickyColumn,sx:{minWidth:150,backgroundColor:"white",borderBottomWidth:i?0:null},children:(I=v.exercise)==null?void 0:I.getTranslation(s).name}),c.map(O=>{const P=e.routine.getSetConfigData(w.id,O,v.id);return Q(J.Fragment,{children:[S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.nrOfSets,P==null?void 0:P.maxNrOfSets)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.repetitions,P==null?void 0:P.maxRepetitions)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.weight,P==null?void 0:P.maxWeight)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.restTime,P==null?void 0:P.maxRestTime)}),S(ke,{align:"center",sx:C,children:E(P,P==null?void 0:P.rir,P==null?void 0:P.maxRir)})]},O)})]})}function m(v,w,C,E){const I=dwt(v,w,C);v===105&&console.log(v,w,C,E,I);const O=17;return E=E??!0,I===null?null:I==="lower"?S(elt,{sx:{fontSize:O},color:E?"error":"success"}):I==="higher"?S(Wst,{sx:{fontSize:O},color:E?"success":"error"}):S(zst,{sx:{fontSize:O},color:"success"})}function g(v,w){return Q(cn,{children:[S(ke,{sx:{verticalAlign:"top",backgroundColor:"white"},className:Ou.stickyColumn,children:S("small",{children:t("nutrition.logged")})}),c.map(C=>{const E=e.routine.getSetConfigData(w.id,C,v.id),O=(l[C]??[]).filter(P=>P.slotEntryId===v.id);return Q(J.Fragment,{children:[S(ke,{align:"center",sx:{verticalAlign:"top"}}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.repetitions??"-/-",m(P.repetitions,E==null?void 0:E.repetitions,E==null?void 0:E.maxRepetitions)]})},R))}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.weight??"-/-",m(P.weight,E==null?void 0:E.weight,E==null?void 0:E.maxWeight)]})},R))}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.restTime??"-/-",m(P.restTime,E==null?void 0:E.restTime,E==null?void 0:E.maxRestTime)]})},R))}),S(ke,{align:"center",sx:{verticalAlign:"top"},children:O.map((P,R)=>S(Ft,{children:Q("span",{children:[P.rir??"-/-",m(P.rir,E==null?void 0:E.rir,E==null?void 0:E.maxRir,!1)]})},R))})]},C)})]})}function y(){return S(Tt,{children:e.routine.days.map(v=>Q(J.Fragment,{children:[Q(cn,{children:[S(ke,{sx:{backgroundColor:r.palette.action.hover},className:Ou.stickyColumn,children:S("b",{children:v.getDisplayName()})}),S(ke,{sx:{backgroundColor:r.palette.action.hover},colSpan:5*c.length})]}),v.slots.map((w,C)=>S(J.Fragment,{children:w.entries.map((E,I)=>Q(J.Fragment,{children:[p(E,v),i&&g(E,v)]},I))},C))]},v.id))})}return S(cwt,{maxWidth:!1,sx:{overflowX:"scroll",display:"flex",height:"80vh"},children:S(jc,{children:Q(Lc,{size:"small",children:[Q(Bf,{className:Ou.stickyHeader,children:[f(),u()]}),S(Fc,{children:y()})]})})})};function Ki(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var fwt=typeof Symbol=="function"&&Symbol.observable||"@@observable",RZ=fwt,DZ=()=>Math.random().toString(36).substring(7).split("").join("."),pwt={INIT:`@@redux/INIT${DZ()}`,REPLACE:`@@redux/REPLACE${DZ()}`},kZ=pwt;function hwt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function kpe(e,t,n){if(typeof e!="function")throw new Error(Ki(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ki(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ki(1));return n(kpe)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((v,w)=>{a.set(w,v)}))}function u(){if(l)throw new Error(Ki(3));return o}function f(v){if(typeof v!="function")throw new Error(Ki(4));if(l)throw new Error(Ki(5));let w=!0;c();const C=s++;return a.set(C,v),function(){if(w){if(l)throw new Error(Ki(6));w=!1,c(),a.delete(C),i=null}}}function p(v){if(!hwt(v))throw new Error(Ki(7));if(typeof v.type>"u")throw new Error(Ki(8));if(typeof v.type!="string")throw new Error(Ki(17));if(l)throw new Error(Ki(9));try{l=!0,o=r(o,v)}finally{l=!1}return(i=a).forEach(C=>{C()}),v}function m(v){if(typeof v!="function")throw new Error(Ki(10));r=v,p({type:kZ.REPLACE})}function g(){const v=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Ki(11));function C(){const I=w;I.next&&I.next(u())}return C(),{unsubscribe:v(C)}},[RZ](){return this}}}return p({type:kZ.INIT}),{dispatch:p,subscribe:f,getState:u,replaceReducer:m,[RZ]:g}}function _Z(e,t){return function(...n){return t(e.apply(this,n))}}function $Z(e,t){if(typeof e=="function")return _Z(e,t);if(typeof e!="object"||e===null)throw new Error(Ki(16));const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=_Z(o,t))}return n}function _pe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function mwt(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(Ki(15))};const a={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=_pe(...s)(o.dispatch),{...o,dispatch:i}}}var M$={exports:{}},R$={};/**
* @license React
* use-sync-external-store-with-selector.production.js
*
@@ -476,17 +476,17 @@ return result$$;`.replaceAll("$$",String(wJ)));return wJ+=1,(s,l)=>i(o,s,l)},lfe
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var $Z;function gwt(){if($Z)return M$;$Z=1;var e=GS();function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return M$.useSyncExternalStoreWithSelector=function(l,c,u,f,h){var m=o(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=a(function(){function v(O){if(!w){if(w=!0,C=O,O=f(O),h!==void 0&&g.hasValue){var P=g.value;if(h(P,O))return E=P}return E=O}if(P=E,n(C,O))return P;var R=f(O);return h!==void 0&&h(P,R)?(C=O,P):(C=O,E=R)}var w=!1,C,E,I=u===void 0?null:u;return[function(){return v(c())},I===null?void 0:function(){return v(I())}]},[c,u,f,h]);var y=r(l,m[0],m[1]);return i(function(){g.hasValue=!0,g.value=y},[y]),s(y),y},M$}var NZ;function ywt(){return NZ||(NZ=1,A$.exports=gwt()),A$.exports}ywt();var vwt=x.version.startsWith("19"),bwt=Symbol.for(vwt?"react.transitional.element":"react.element"),xwt=Symbol.for("react.portal"),Swt=Symbol.for("react.fragment"),wwt=Symbol.for("react.strict_mode"),Cwt=Symbol.for("react.profiler"),Ewt=Symbol.for("react.consumer"),Twt=Symbol.for("react.context"),kpe=Symbol.for("react.forward_ref"),Owt=Symbol.for("react.suspense"),Iwt=Symbol.for("react.suspense_list"),gH=Symbol.for("react.memo"),Pwt=Symbol.for("react.lazy"),Awt=kpe,Mwt=gH;function Rwt(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case bwt:switch(e=e.type,e){case Swt:case Cwt:case wwt:case Owt:case Iwt:return e;default:switch(e=e&&e.$$typeof,e){case Twt:case kpe:case Pwt:case gH:return e;case Ewt:return e;default:return t}}case xwt:return t}}}function Dwt(e){return Rwt(e)===gH}function kwt(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s=!1,l,c,u,f,h;function m(C,E){return l=C,c=E,u=e(l,c),f=t(r,c),h=n(u,f,c),s=!0,h}function g(){return u=e(l,c),t.dependsOnOwnProps&&(f=t(r,c)),h=n(u,f,c),h}function y(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(f=t(r,c)),h=n(u,f,c),h}function v(){const C=e(l,c),E=!a(C,u);return u=C,E&&(h=n(u,f,c)),h}function w(C,E){const I=!i(E,c),O=!o(C,l,E,c);return l=C,c=E,I&&O?g():I?y():O?v():h}return function(E,I){return s?w(E,I):m(E,I)}}function _wt(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),a=n(e,o),s=r(e,o);return kwt(i,a,s,e,o)}function $wt(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function hj(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function LZ(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function _pe(e,t){return function(r,{displayName:o}){const i=function(s,l){return i.dependsOnOwnProps?i.mapToProps(s,l):i.mapToProps(s,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(s,l){i.mapToProps=e,i.dependsOnOwnProps=LZ(e);let c=i(s,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=LZ(c),c=i(s,l)),c},i}}function yH(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Nwt(e){return e&&typeof e=="object"?hj(t=>$wt(e,t)):e?typeof e=="function"?_pe(e):yH(e,"mapDispatchToProps"):hj(t=>({dispatch:t}))}function Lwt(e){return e?typeof e=="function"?_pe(e):yH(e,"mapStateToProps"):hj(()=>({}))}function Fwt(e,t,n){return{...n,...e,...t}}function jwt(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,a;return function(l,c,u){const f=e(l,c,u);return i?o(f,a)||(a=f):(i=!0,a=f),a}}}function Bwt(e){return e?typeof e=="function"?jwt(e):yH(e,"mergeProps"):()=>Fwt}function zwt(e){e()}function Vwt(){let e=null,t=null;return{clear(){e=null,t=null},notify(){zwt(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var FZ={notify(){},get:()=>[]};function $pe(e,t){let n,r=FZ,o=0,i=!1;function a(y){u();const v=r.subscribe(y);let w=!1;return()=>{w||(w=!0,v(),f())}}function s(){r.notify()}function l(){g.onStateChange&&g.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=Vwt())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=FZ)}function h(){i||(i=!0,u())}function m(){i&&(i=!1,f())}const g={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:h,tryUnsubscribe:m,getListeners:()=>r};return g}var Hwt=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Uwt=Hwt(),Gwt=()=>typeof navigator<"u"&&navigator.product==="ReactNative",qwt=Gwt(),Wwt=()=>Uwt||qwt?x.useLayoutEffect:x.useEffect,DO=Wwt();function jZ(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function R$(e,t){if(jZ(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!jZ(e[n[o]],t[n[o]]))return!1;return!0}var Kwt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ywt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Qwt={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Npe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xwt={[Awt]:Qwt,[Mwt]:Npe};function BZ(e){return Dwt(e)?Npe:Xwt[e.$$typeof]||Kwt}var Jwt=Object.defineProperty,Zwt=Object.getOwnPropertyNames,zZ=Object.getOwnPropertySymbols,eCt=Object.getOwnPropertyDescriptor,tCt=Object.getPrototypeOf,VZ=Object.prototype;function mj(e,t){if(typeof t!="string"){if(VZ){const i=tCt(t);i&&i!==VZ&&mj(e,i)}let n=Zwt(t);zZ&&(n=n.concat(zZ(t)));const r=BZ(e),o=BZ(t);for(let i=0;i<n.length;++i){const a=n[i];if(!Ywt[a]&&!(o&&o[a])&&!(r&&r[a])){const s=eCt(t,a);try{Jwt(e,a,s)}catch{}}}}return e}var D$=Symbol.for("react-redux-context"),k$=typeof globalThis<"u"?globalThis:{};function nCt(){if(!x.createContext)return{};const e=k$[D$]??(k$[D$]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var Lpe=nCt(),rCt=[null,null];function oCt(e,t,n){DO(()=>e(...t),n)}function iCt(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function aCt(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let f=!1,h=null;const m=()=>{if(f||!s.current)return;const y=t.getState();let v,w;try{v=r(y,o.current)}catch(C){w=C,h=C}w||(h=null),v===i.current?a.current||c():(i.current=v,l.current=v,a.current=!0,u())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}function sCt(e,t){return e===t}function lCt(e,t,n,{pure:r,areStatesEqual:o=sCt,areOwnPropsEqual:i=R$,areStatePropsEqual:a=R$,areMergedPropsEqual:s=R$,forwardRef:l=!1,context:c=Lpe}={}){const u=c,f=Lwt(e),h=Nwt(t),m=Bwt(n),g=!!e;return v=>{const w=v.displayName||v.name||"Component",C=`Connect(${w})`,E={shouldHandleStateChanges:g,displayName:C,wrappedComponentName:w,WrappedComponent:v,initMapStateToProps:f,initMapDispatchToProps:h,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function I(R){const[D,M,A]=x.useMemo(()=>{const{reactReduxForwardedRef:oe,...ue}=R;return[R.context,oe,ue]},[R]),_=x.useMemo(()=>{let oe=u;return D!=null&&D.Consumer,oe},[D,u]),N=x.useContext(_),B=!!R.store&&!!R.store.getState&&!!R.store.dispatch,H=!!N&&!!N.store,j=B?R.store:N.store,L=H?N.getServerState:j.getState,V=x.useMemo(()=>_wt(j.dispatch,E),[j]),[W,K]=x.useMemo(()=>{if(!g)return rCt;const oe=$pe(j,B?void 0:N.subscription),ue=oe.notifyNestedSubs.bind(oe);return[oe,ue]},[j,B,N]),G=x.useMemo(()=>B?N:{...N,subscription:W},[B,N,W]),q=x.useRef(void 0),Y=x.useRef(A),Z=x.useRef(void 0),ie=x.useRef(!1),se=x.useRef(!1),ce=x.useRef(void 0);DO(()=>(se.current=!0,()=>{se.current=!1}),[]);const ye=x.useMemo(()=>()=>Z.current&&A===Y.current?Z.current:V(j.getState(),A),[j,A]),Se=x.useMemo(()=>ue=>W?aCt(g,j,W,V,Y,q,ie,se,Z,K,ue):()=>{},[W]);oCt(iCt,[Y,q,ie,A,Z,K]);let ne;try{ne=x.useSyncExternalStore(Se,ye,L?()=>V(L(),A):ye)}catch(oe){throw ce.current&&(oe.message+=`
+ */var NZ;function gwt(){if(NZ)return R$;NZ=1;var e=GS();function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return R$.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var m=o(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=a(function(){function v(O){if(!w){if(w=!0,C=O,O=f(O),p!==void 0&&g.hasValue){var P=g.value;if(p(P,O))return E=P}return E=O}if(P=E,n(C,O))return P;var R=f(O);return p!==void 0&&p(P,R)?(C=O,P):(C=O,E=R)}var w=!1,C,E,I=u===void 0?null:u;return[function(){return v(c())},I===null?void 0:function(){return v(I())}]},[c,u,f,p]);var y=r(l,m[0],m[1]);return i(function(){g.hasValue=!0,g.value=y},[y]),s(y),y},R$}var LZ;function ywt(){return LZ||(LZ=1,M$.exports=gwt()),M$.exports}ywt();var vwt=x.version.startsWith("19"),bwt=Symbol.for(vwt?"react.transitional.element":"react.element"),xwt=Symbol.for("react.portal"),Swt=Symbol.for("react.fragment"),wwt=Symbol.for("react.strict_mode"),Cwt=Symbol.for("react.profiler"),Ewt=Symbol.for("react.consumer"),Twt=Symbol.for("react.context"),$pe=Symbol.for("react.forward_ref"),Owt=Symbol.for("react.suspense"),Iwt=Symbol.for("react.suspense_list"),gH=Symbol.for("react.memo"),Pwt=Symbol.for("react.lazy"),Awt=$pe,Mwt=gH;function Rwt(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case bwt:switch(e=e.type,e){case Swt:case Cwt:case wwt:case Owt:case Iwt:return e;default:switch(e=e&&e.$$typeof,e){case Twt:case $pe:case Pwt:case gH:return e;case Ewt:return e;default:return t}}case xwt:return t}}}function Dwt(e){return Rwt(e)===gH}function kwt(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s=!1,l,c,u,f,p;function m(C,E){return l=C,c=E,u=e(l,c),f=t(r,c),p=n(u,f,c),s=!0,p}function g(){return u=e(l,c),t.dependsOnOwnProps&&(f=t(r,c)),p=n(u,f,c),p}function y(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(f=t(r,c)),p=n(u,f,c),p}function v(){const C=e(l,c),E=!a(C,u);return u=C,E&&(p=n(u,f,c)),p}function w(C,E){const I=!i(E,c),O=!o(C,l,E,c);return l=C,c=E,I&&O?g():I?y():O?v():p}return function(E,I){return s?w(E,I):m(E,I)}}function _wt(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),a=n(e,o),s=r(e,o);return kwt(i,a,s,e,o)}function $wt(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function mj(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function FZ(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Npe(e,t){return function(r,{displayName:o}){const i=function(s,l){return i.dependsOnOwnProps?i.mapToProps(s,l):i.mapToProps(s,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(s,l){i.mapToProps=e,i.dependsOnOwnProps=FZ(e);let c=i(s,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=FZ(c),c=i(s,l)),c},i}}function yH(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Nwt(e){return e&&typeof e=="object"?mj(t=>$wt(e,t)):e?typeof e=="function"?Npe(e):yH(e,"mapDispatchToProps"):mj(t=>({dispatch:t}))}function Lwt(e){return e?typeof e=="function"?Npe(e):yH(e,"mapStateToProps"):mj(()=>({}))}function Fwt(e,t,n){return{...n,...e,...t}}function jwt(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,a;return function(l,c,u){const f=e(l,c,u);return i?o(f,a)||(a=f):(i=!0,a=f),a}}}function Bwt(e){return e?typeof e=="function"?jwt(e):yH(e,"mergeProps"):()=>Fwt}function zwt(e){e()}function Vwt(){let e=null,t=null;return{clear(){e=null,t=null},notify(){zwt(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var jZ={notify(){},get:()=>[]};function Lpe(e,t){let n,r=jZ,o=0,i=!1;function a(y){u();const v=r.subscribe(y);let w=!1;return()=>{w||(w=!0,v(),f())}}function s(){r.notify()}function l(){g.onStateChange&&g.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=Vwt())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=jZ)}function p(){i||(i=!0,u())}function m(){i&&(i=!1,f())}const g={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return g}var Hwt=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Uwt=Hwt(),Gwt=()=>typeof navigator<"u"&&navigator.product==="ReactNative",qwt=Gwt(),Wwt=()=>Uwt||qwt?x.useLayoutEffect:x.useEffect,kO=Wwt();function BZ(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function D$(e,t){if(BZ(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!BZ(e[n[o]],t[n[o]]))return!1;return!0}var Kwt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ywt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Qwt={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Fpe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xwt={[Awt]:Qwt,[Mwt]:Fpe};function zZ(e){return Dwt(e)?Fpe:Xwt[e.$$typeof]||Kwt}var Jwt=Object.defineProperty,Zwt=Object.getOwnPropertyNames,VZ=Object.getOwnPropertySymbols,eCt=Object.getOwnPropertyDescriptor,tCt=Object.getPrototypeOf,HZ=Object.prototype;function gj(e,t){if(typeof t!="string"){if(HZ){const i=tCt(t);i&&i!==HZ&&gj(e,i)}let n=Zwt(t);VZ&&(n=n.concat(VZ(t)));const r=zZ(e),o=zZ(t);for(let i=0;i<n.length;++i){const a=n[i];if(!Ywt[a]&&!(o&&o[a])&&!(r&&r[a])){const s=eCt(t,a);try{Jwt(e,a,s)}catch{}}}}return e}var k$=Symbol.for("react-redux-context"),_$=typeof globalThis<"u"?globalThis:{};function nCt(){if(!x.createContext)return{};const e=_$[k$]??(_$[k$]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var jpe=nCt(),rCt=[null,null];function oCt(e,t,n){kO(()=>e(...t),n)}function iCt(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function aCt(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let f=!1,p=null;const m=()=>{if(f||!s.current)return;const y=t.getState();let v,w;try{v=r(y,o.current)}catch(C){w=C,p=C}w||(p=null),v===i.current?a.current||c():(i.current=v,l.current=v,a.current=!0,u())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function sCt(e,t){return e===t}function lCt(e,t,n,{pure:r,areStatesEqual:o=sCt,areOwnPropsEqual:i=D$,areStatePropsEqual:a=D$,areMergedPropsEqual:s=D$,forwardRef:l=!1,context:c=jpe}={}){const u=c,f=Lwt(e),p=Nwt(t),m=Bwt(n),g=!!e;return v=>{const w=v.displayName||v.name||"Component",C=`Connect(${w})`,E={shouldHandleStateChanges:g,displayName:C,wrappedComponentName:w,WrappedComponent:v,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function I(R){const[D,M,A]=x.useMemo(()=>{const{reactReduxForwardedRef:oe,...ue}=R;return[R.context,oe,ue]},[R]),_=x.useMemo(()=>{let oe=u;return D!=null&&D.Consumer,oe},[D,u]),N=x.useContext(_),B=!!R.store&&!!R.store.getState&&!!R.store.dispatch,H=!!N&&!!N.store,j=B?R.store:N.store,L=H?N.getServerState:j.getState,V=x.useMemo(()=>_wt(j.dispatch,E),[j]),[W,K]=x.useMemo(()=>{if(!g)return rCt;const oe=Lpe(j,B?void 0:N.subscription),ue=oe.notifyNestedSubs.bind(oe);return[oe,ue]},[j,B,N]),G=x.useMemo(()=>B?N:{...N,subscription:W},[B,N,W]),q=x.useRef(void 0),Y=x.useRef(A),Z=x.useRef(void 0),ie=x.useRef(!1),se=x.useRef(!1),ce=x.useRef(void 0);kO(()=>(se.current=!0,()=>{se.current=!1}),[]);const ye=x.useMemo(()=>()=>Z.current&&A===Y.current?Z.current:V(j.getState(),A),[j,A]),Se=x.useMemo(()=>ue=>W?aCt(g,j,W,V,Y,q,ie,se,Z,K,ue):()=>{},[W]);oCt(iCt,[Y,q,ie,A,Z,K]);let ne;try{ne=x.useSyncExternalStore(Se,ye,L?()=>V(L(),A):ye)}catch(oe){throw ce.current&&(oe.message+=`
The error may be correlated with this previous error:
${ce.current.stack}
-`),oe}DO(()=>{ce.current=void 0,Z.current=void 0,q.current=ne});const le=x.useMemo(()=>x.createElement(v,{...ne,ref:M}),[M,v,ne]);return x.useMemo(()=>g?x.createElement(_.Provider,{value:G},le):le,[_,le,G])}const P=x.memo(I);if(P.WrappedComponent=v,P.displayName=I.displayName=C,l){const D=x.forwardRef(function(A,_){return x.createElement(P,{...A,reactReduxForwardedRef:_})});return D.displayName=C,D.WrappedComponent=v,mj(D,v)}return mj(P,v)}}var Fpe=lCt;function cCt(e){const{children:t,context:n,serverState:r,store:o}=e,i=x.useMemo(()=>{const l=$pe(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),a=x.useMemo(()=>o.getState(),[o]);DO(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,a]);const s=n||Lpe;return x.createElement(s.Provider,{value:i},t)}var uCt=cCt,Ll=function(t){var n=t.top,r=t.right,o=t.bottom,i=t.left,a=r-i,s=o-n,l={top:n,right:r,bottom:o,left:i,width:a,height:s,x:i,y:n,center:{x:(r+i)/2,y:(o+n)/2}};return l},vH=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},HZ=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},dCt=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},_$={top:0,right:0,bottom:0,left:0},bH=function(t){var n=t.borderBox,r=t.margin,o=r===void 0?_$:r,i=t.border,a=i===void 0?_$:i,s=t.padding,l=s===void 0?_$:s,c=Ll(vH(n,o)),u=Ll(HZ(n,a)),f=Ll(HZ(u,l));return{marginBox:c,borderBox:Ll(n),paddingBox:u,contentBox:f,margin:o,border:a,padding:l}},Ms=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var o=Number(n);return isNaN(o)&&Af(),o},fCt=function(){return{x:window.pageXOffset,y:window.pageYOffset}},kO=function(t,n){var r=t.borderBox,o=t.border,i=t.margin,a=t.padding,s=dCt(r,n);return bH({borderBox:s,border:o,margin:i,padding:a})},_O=function(t,n){return n===void 0&&(n=fCt()),kO(t,n)},jpe=function(t,n){var r={top:Ms(n.marginTop),right:Ms(n.marginRight),bottom:Ms(n.marginBottom),left:Ms(n.marginLeft)},o={top:Ms(n.paddingTop),right:Ms(n.paddingRight),bottom:Ms(n.paddingBottom),left:Ms(n.paddingLeft)},i={top:Ms(n.borderTopWidth),right:Ms(n.borderRightWidth),bottom:Ms(n.borderBottomWidth),left:Ms(n.borderLeftWidth)};return bH({borderBox:t,margin:r,padding:o,border:i})},Bpe=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return jpe(n,r)},_S=function(t){var n=[],r=null,o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return o.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},o};function zpe(e,t){}zpe.bind(null,"warn");zpe.bind(null,"error");function xf(){}function pCt(e,t){return{...e,...t}}function Gs(e,t,n){const r=t.map(o=>{const i=pCt(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){r.forEach(i=>{i()})}}const hCt="Invariant failed";class $O extends Error{}$O.prototype.toString=function(){return this.message};function Et(e,t){throw new $O(hCt)}class mCt extends J.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=xf,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof $O&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=Gs(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof $O){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const gCt=`
+`),oe}kO(()=>{ce.current=void 0,Z.current=void 0,q.current=ne});const le=x.useMemo(()=>x.createElement(v,{...ne,ref:M}),[M,v,ne]);return x.useMemo(()=>g?x.createElement(_.Provider,{value:G},le):le,[_,le,G])}const P=x.memo(I);if(P.WrappedComponent=v,P.displayName=I.displayName=C,l){const D=x.forwardRef(function(A,_){return x.createElement(P,{...A,reactReduxForwardedRef:_})});return D.displayName=C,D.WrappedComponent=v,gj(D,v)}return gj(P,v)}}var Bpe=lCt;function cCt(e){const{children:t,context:n,serverState:r,store:o}=e,i=x.useMemo(()=>{const l=Lpe(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),a=x.useMemo(()=>o.getState(),[o]);kO(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,a]);const s=n||jpe;return x.createElement(s.Provider,{value:i},t)}var uCt=cCt,jl=function(t){var n=t.top,r=t.right,o=t.bottom,i=t.left,a=r-i,s=o-n,l={top:n,right:r,bottom:o,left:i,width:a,height:s,x:i,y:n,center:{x:(r+i)/2,y:(o+n)/2}};return l},vH=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},UZ=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},dCt=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},$$={top:0,right:0,bottom:0,left:0},bH=function(t){var n=t.borderBox,r=t.margin,o=r===void 0?$$:r,i=t.border,a=i===void 0?$$:i,s=t.padding,l=s===void 0?$$:s,c=jl(vH(n,o)),u=jl(UZ(n,a)),f=jl(UZ(u,l));return{marginBox:c,borderBox:jl(n),paddingBox:u,contentBox:f,margin:o,border:a,padding:l}},Ms=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var o=Number(n);return isNaN(o)&&Rf(),o},fCt=function(){return{x:window.pageXOffset,y:window.pageYOffset}},_O=function(t,n){var r=t.borderBox,o=t.border,i=t.margin,a=t.padding,s=dCt(r,n);return bH({borderBox:s,border:o,margin:i,padding:a})},$O=function(t,n){return n===void 0&&(n=fCt()),_O(t,n)},zpe=function(t,n){var r={top:Ms(n.marginTop),right:Ms(n.marginRight),bottom:Ms(n.marginBottom),left:Ms(n.marginLeft)},o={top:Ms(n.paddingTop),right:Ms(n.paddingRight),bottom:Ms(n.paddingBottom),left:Ms(n.paddingLeft)},i={top:Ms(n.borderTopWidth),right:Ms(n.borderRightWidth),bottom:Ms(n.borderBottomWidth),left:Ms(n.borderLeftWidth)};return bH({borderBox:t,margin:r,padding:o,border:i})},Vpe=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return zpe(n,r)},_S=function(t){var n=[],r=null,o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return o.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},o};function Hpe(e,t){}Hpe.bind(null,"warn");Hpe.bind(null,"error");function wf(){}function pCt(e,t){return{...e,...t}}function Gs(e,t,n){const r=t.map(o=>{const i=pCt(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){r.forEach(i=>{i()})}}const hCt="Invariant failed";class NO extends Error{}NO.prototype.toString=function(){return this.message};function Et(e,t){throw new NO(hCt)}class mCt extends J.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=wf,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof NO&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=Gs(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof NO){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const gCt=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
-`,NO=e=>e+1,yCt=e=>`
- You have lifted an item in position ${NO(e.source.index)}
-`,Vpe=(e,t)=>{const n=e.droppableId===t.droppableId,r=NO(e.index),o=NO(t.index);return n?`
+`,LO=e=>e+1,yCt=e=>`
+ You have lifted an item in position ${LO(e.source.index)}
+`,Upe=(e,t)=>{const n=e.droppableId===t.droppableId,r=LO(e.index),o=LO(t.index);return n?`
You have moved the item from position ${r}
to position ${o}
`:`
@@ -494,38 +494,38 @@ ${ce.current.stack}
in list ${e.droppableId}
to list ${t.droppableId}
in position ${o}
- `},Hpe=(e,t,n)=>t.droppableId===n.droppableId?`
+ `},Gpe=(e,t,n)=>t.droppableId===n.droppableId?`
The item ${e}
has been combined with ${n.draggableId}`:`
The item ${e}
in list ${t.droppableId}
has been combined with ${n.draggableId}
in list ${n.droppableId}
- `,vCt=e=>{const t=e.destination;if(t)return Vpe(e.source,t);const n=e.combine;return n?Hpe(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},UZ=e=>`
+ `,vCt=e=>{const t=e.destination;if(t)return Upe(e.source,t);const n=e.combine;return n?Gpe(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},GZ=e=>`
The item has returned to its starting position
- of ${NO(e.index)}
+ of ${LO(e.index)}
`,bCt=e=>{if(e.reason==="CANCEL")return`
Movement cancelled.
- ${UZ(e.source)}
+ ${GZ(e.source)}
`;const t=e.destination,n=e.combine;return t?`
You have dropped the item.
- ${Vpe(e.source,t)}
+ ${Upe(e.source,t)}
`:n?`
You have dropped the item.
- ${Hpe(e.draggableId,e.source,n)}
+ ${Gpe(e.draggableId,e.source,n)}
`:`
The item has been dropped while not over a drop area.
- ${UZ(e.source)}
- `},LE={dragHandleUsageInstructions:gCt,onDragStart:yCt,onDragUpdate:vCt,onDragEnd:bCt};function xCt(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function Upe(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!xCt(e[n],t[n]))return!1;return!0}function Kn(e,t){const n=x.useState(()=>({inputs:t,result:e()}))[0],r=x.useRef(!0),o=x.useRef(n),a=r.current||!!(t&&o.current.inputs&&Upe(t,o.current.inputs))?o.current:{inputs:t,result:e()};return x.useEffect(()=>{r.current=!1,o.current=a},[a]),a.result}function Wt(e,t){return Kn(()=>e,t)}const ci={x:0,y:0},wi=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Ka=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Sf=(e,t)=>e.x===t.x&&e.y===t.y,Wv=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),_h=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},$S=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),GZ=(e,t)=>Math.min(...t.map(n=>$S(e,n))),Gpe=e=>t=>({x:e(t.x),y:e(t.y)});var SCt=(e,t)=>{const n=Ll({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const eC=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),qZ=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],wCt={top:0,right:0,bottom:0,left:0},CCt=(e,t)=>t?eC(e,t.scroll.diff.displacement):e,ECt=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,TCt=(e,t)=>t&&t.shouldClipSubject?SCt(t.pageMarginBox,e):Ll(e);var Jy=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=CCt(e.marginBox,r),i=ECt(o,n,t),a=TCt(i,r);return{page:e,withPlaceholder:t,active:a}},xH=(e,t)=>{e.frame||Et();const n=e.frame,r=Ka(t,n.scroll.initial),o=Wv(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=Jy({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function li(e,t=Upe){let n=null;function r(...o){if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;const i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}const qpe=li(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),Wpe=li(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),JP=li(e=>Object.values(e)),OCt=li(e=>Object.values(e));var Kv=li((e,t)=>OCt(t).filter(r=>e===r.descriptor.droppableId).sort((r,o)=>r.descriptor.index-o.descriptor.index));function SH(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function ZP(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var eA=li((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),ICt=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled||!SH(o))return null;function a(m){const g={type:"COMBINE",combine:{draggableId:m,droppableId:n.descriptor.id}};return{...o,at:g}}const s=o.displaced.all,l=s.length?s[0]:null;if(e)return l?a(l):null;const c=eA(t,r);if(!l){if(!c.length)return null;const m=c[c.length-1];return a(m.descriptor.id)}const u=c.findIndex(m=>m.descriptor.id===l);u===-1&&Et();const f=u-1;if(f<0)return null;const h=c[f];return a(h.descriptor.id)},Yv=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Kpe={point:ci,value:0},NS={invisible:{},visible:{},all:[]},PCt={displaced:NS,displacedBy:Kpe,at:null};var Zs=(e,t)=>n=>e<=n&&n<=t,Ype=e=>{const t=Zs(e.top,e.bottom),n=Zs(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(i&&a)return!0;const l=r.top<e.top&&r.bottom>e.bottom,c=r.left<e.left&&r.right>e.right;return l&&c?!0:l&&a||c&&i}},ACt=e=>{const t=Zs(e.top,e.bottom),n=Zs(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const wH={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Qpe={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var MCt=e=>t=>{const n=Zs(t.top,t.bottom),r=Zs(t.left,t.right);return o=>e===wH?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)};const RCt=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:ci;return eC(e,n)},DCt=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,kCt=(e,t,n)=>n(t)(e),CH=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?RCt(e,t):e;return DCt(i,t,o)&&kCt(i,n,o)},_Ct=e=>CH({...e,isVisibleThroughFrameFn:Ype}),Xpe=e=>CH({...e,isVisibleThroughFrameFn:ACt}),$Ct=e=>CH({...e,isVisibleThroughFrameFn:MCt(e.destination.axis)}),NCt=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function LCt(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ll(vH(n,r))}function LS({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(s,l){const c=LCt(l,n),u=l.descriptor.id;if(s.all.push(u),!_Ct({target:c,destination:t,viewport:r,withDroppableDisplacement:!0}))return s.invisible[l.descriptor.id]=!0,s;const h=NCt(u,i,o),m={draggableId:u,shouldAnimate:h};return s.visible[u]=m,s},{all:[],visible:{},invisible:{}})}function FCt(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function WZ({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=FCt(e,{inHomeList:t});return{displaced:NS,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function LO({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=Yv(e,n);if(a==null)return WZ({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(g=>g.descriptor.index===a);if(!c)return WZ({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const u=eA(e,t),f=t.indexOf(c),h=u.slice(f);return{displaced:LS({afterDragging:h,destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function Df(e,t){return!!t.effected[e]}var jCt=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,s=n[i].descriptor.index;return Df(i,o)?e?s:s-1:e?s+1:s},BCt=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index,l=t?s:s+1;return i<a||i>l?null:i},zCt=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Et(),c.type==="REORDER"){const f=BCt({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return f==null?null:LO({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:f})}const u=jCt({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return u==null?null:LO({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},VCt=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=!!(e.visible[n]||e.invisible[n]);return Df(n,t)?o?ci:Wv(r.point):o?r.point:ci},HCt=({afterCritical:e,impact:t,draggables:n})=>{const r=ZP(t);r||Et();const o=r.draggableId,i=n[o].page.borderBox.center,a=VCt({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return wi(i,a)};const Jpe=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,UCt=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,EH=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,KZ=({axis:e,moveRelativeTo:t,isMoving:n})=>_h(e.line,t.marginBox[e.end]+Jpe(e,n),EH(e,t.marginBox,n)),YZ=({axis:e,moveRelativeTo:t,isMoving:n})=>_h(e.line,t.marginBox[e.start]-UCt(e,n),EH(e,t.marginBox,n)),GCt=({axis:e,moveInto:t,isMoving:n})=>_h(e.line,t.contentBox[e.start]+Jpe(e,n),EH(e,t.contentBox,n));var qCt=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=Kv(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return GCt({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,u=l.all[0];if(u){const h=n[u];if(Df(u,o))return YZ({axis:s,moveRelativeTo:h.page,isMoving:a});const m=kO(h.page,c.point);return YZ({axis:s,moveRelativeTo:m,isMoving:a})}const f=i[i.length-1];if(f.descriptor.id===t.descriptor.id)return a.borderBox.center;if(Df(f.descriptor.id,o)){const h=kO(f.page,Wv(o.displacedBy.point));return KZ({axis:s,moveRelativeTo:h,isMoving:a})}return KZ({axis:s,moveRelativeTo:f.page,isMoving:a})},gj=(e,t)=>{const n=e.frame;return n?wi(t,n.scroll.diff.displacement):t};const WCt=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return!n||!a?i:a.type==="REORDER"?qCt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):HCt({impact:e,draggables:r,afterCritical:o})};var tA=e=>{const t=WCt(e),n=e.droppable;return n?gj(n,t):t},Zpe=(e,t)=>{const n=Ka(t,e.scroll.initial),r=Wv(n);return{frame:Ll({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function QZ(e,t){return e.map(n=>t[n])}function KCt(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}var YCt=({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Zpe(t,wi(t.scroll.current,o)),a=n.frame?xH(n,wi(n.frame.scroll.current,o)):n,s=e.displaced,l=LS({afterDragging:QZ(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=LS({afterDragging:QZ(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},f={},h=[s,l,c];return s.all.forEach(g=>{const y=KCt(g,h);if(y){f[g]=y;return}u[g]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:f}}},QCt=(e,t)=>wi(e.scroll.diff.displacement,t),TH=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=QCt(n,e),o=Ka(r,t.page.borderBox.center);return wi(t.client.borderBox.center,o)},ehe=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=Ka(n,e.page.borderBox.center),l={target:eC(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?$Ct(l):Xpe(l)},XCt=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=Kv(n.descriptor.id,r),u=Yv(t,n),f=ICt({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||zCt({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!f)return null;const h=tA({impact:f,draggable:t,droppable:n,draggables:r,afterCritical:l});if(ehe({draggable:t,destination:n,newPageBorderBoxCenter:h,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:TH({pageBorderBoxCenter:h,draggable:t,viewport:i}),impact:f,scrollJumpRequest:null};const g=Ka(h,a),y=YCt({impact:f,viewport:i,destination:n,draggables:r,maxScrollChange:g});return{clientSelection:s,impact:y,scrollJumpRequest:g}};const qi=e=>{const t=e.subject.active;return t||Et(),t};var JCt=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=Zs(i[a.start],i[a.end]),l=JP(r).filter(u=>u!==n).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>Ype(o.frame)(qi(u))).filter(u=>{const f=qi(u);return e?i[a.crossAxisEnd]<f[a.crossAxisEnd]:f[a.crossAxisStart]<i[a.crossAxisStart]}).filter(u=>{const f=qi(u),h=Zs(f[a.start],f[a.end]);return s(f[a.start])||s(f[a.end])||h(i[a.start])||h(i[a.end])}).sort((u,f)=>{const h=qi(u)[a.crossAxisStart],m=qi(f)[a.crossAxisStart];return e?h-m:m-h}).filter((u,f,h)=>qi(u)[a.crossAxisStart]===qi(h[0])[a.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(u=>Zs(qi(u)[a.start],qi(u)[a.end])(t[a.line]));return c.length===1?c[0]:c.length>1?c.sort((u,f)=>qi(u)[a.start]-qi(f)[a.start])[0]:l.sort((u,f)=>{const h=GZ(t,qZ(qi(u))),m=GZ(t,qZ(qi(f)));return h!==m?h-m:qi(u)[a.start]-qi(f)[a.start]})[0]};const XZ=(e,t)=>{const n=e.page.borderBox.center;return Df(e.descriptor.id,t)?Ka(n,t.displacedBy.point):n},ZCt=(e,t)=>{const n=e.page.borderBox;return Df(e.descriptor.id,t)?eC(n,Wv(t.displacedBy.point)):n};var e1t=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter(a=>Xpe({target:ZCt(a,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((a,s)=>{const l=$S(e,gj(n,XZ(a,o))),c=$S(e,gj(n,XZ(s,o)));return l<c?-1:c<l?1:a.descriptor.index-s.descriptor.index})[0]||null,tC=li(function(t,n){const r=n[t.line];return{value:r,point:_h(t.line,r)}});const t1t=(e,t,n)=>{const r=e.axis;if(e.descriptor.mode==="virtual")return _h(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],l=Kv(e.descriptor.id,n).reduce((c,u)=>c+u.client.marginBox[r.size],0)+t[r.line]-o;return l<=0?null:_h(r.line,l)},the=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),nhe=(e,t,n)=>{const r=e.frame;Yv(t,e)&&Et(),e.subject.withPlaceholder&&Et();const o=tC(e.axis,t.displaceBy).point,i=t1t(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const u=Jy({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:u}}const s=i?wi(r.scroll.max,i):r.scroll.max,l=the(r,s),c=Jy({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},n1t=e=>{const t=e.subject.withPlaceholder;t||Et();const n=e.frame;if(!n){const a=Jy({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const r=t.oldFrameMaxScroll;r||Et();const o=the(n,r),i=Jy({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var r1t=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const f={displaced:NS,displacedBy:Kpe,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},h=tA({impact:f,draggable:r,droppable:i,draggables:o,afterCritical:s}),m=Yv(r,i)?i:nhe(i,r,o);return ehe({draggable:r,destination:m,newPageBorderBoxCenter:h,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?f:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],c=(()=>{const f=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?f:f+1})(),u=tC(i.axis,r.displaceBy);return LO({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:u,last:NS,index:c})},o1t=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=JCt({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=Kv(l.descriptor.id,o),u=e1t({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),f=r1t({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:u,insideDestination:c,viewport:a,afterCritical:s});if(!f)return null;const h=tA({impact:f,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:TH({pageBorderBoxCenter:h,draggable:n,viewport:a}),impact:f,scrollJumpRequest:null}},es=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const i1t=(e,t)=>{const n=es(e);return n?t[n]:null};var a1t=({state:e,type:t})=>{const n=i1t(e.impact,e.dimensions.droppables),r=!!n,o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s=a==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||a==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(s&&!r)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",c=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:f,droppables:h}=e.dimensions;return s?XCt({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,destination:i,draggables:f,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):o1t({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,isOver:i,draggables:f,droppables:h,viewport:e.viewport,afterCritical:e.afterCritical})};function Rp(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function rhe(e){const t=Zs(e.top,e.bottom),n=Zs(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function s1t(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function l1t({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(i=>{const a=i.axis,s=_h(i.axis.line,e.center[a.line],i.page.borderBox.center[a.crossAxisLine]);return{id:i.descriptor.id,distance:$S(r,s)}}).sort((i,a)=>a.distance-i.distance);return o[0]?o[0].id:null}function c1t({pageBorderBox:e,draggable:t,droppables:n}){const r=JP(n).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!s1t(e,i))return!1;if(rhe(i)(e.center))return!0;const a=o.axis,s=i.center[a.crossAxisLine],l=e[a.crossAxisStart],c=e[a.crossAxisEnd],u=Zs(i[a.crossAxisStart],i[a.crossAxisEnd]),f=u(l),h=u(c);return!f&&!h?!0:f?l<s:c>s});return r.length?r.length===1?r[0].descriptor.id:l1t({pageBorderBox:e,draggable:t,candidates:r}):null}const ohe=(e,t)=>Ll(eC(e,t));var u1t=(e,t)=>{const n=e.frame;return n?ohe(t,n.scroll.diff.value):t};function ihe({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function d1t({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var f1t=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=tC(n.axis,t.displaceBy),c=l.value,u=e[s.start],f=e[s.end],m=eA(t,r).find(y=>{const v=y.descriptor.id,w=y.page.borderBox.center[s.line],C=Df(v,a),E=ihe({displaced:o,id:v});return C?E?f<=w:u<w-c:E?f<=w+c:u<w})||null,g=d1t({draggable:t,closest:m,inHomeList:Yv(t,n)});return LO({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:g})};const p1t=4;var h1t=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=tC(r.axis,e.displaceBy),l=s.value,c=t[a.start],u=t[a.end],h=eA(e,o).find(g=>{const y=g.descriptor.id,v=g.page.borderBox,C=v[a.size]/p1t,E=Df(y,i),I=ihe({displaced:n.displaced,id:y});return E?I?u>v[a.start]+C&&u<v[a.end]-C:c>v[a.start]-l+C&&c<v[a.end]-l-C:I?u>v[a.start]+l+C&&u<v[a.end]+l-C:c>v[a.start]+C&&c<v[a.end]-C});return h?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:r.descriptor.id}}}:null},ahe=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=ohe(t.page.borderBox,e),l=c1t({pageBorderBox:s,draggable:t,droppables:r});if(!l)return PCt;const c=r[l],u=Kv(c.descriptor.id,n),f=u1t(c,s);return h1t({pageBorderBoxWithDroppableScroll:f,draggable:t,previousImpact:o,destination:c,insideDestination:u,afterCritical:a})||f1t({pageBorderBoxWithDroppableScroll:f,draggable:t,destination:c,insideDestination:u,last:o.displaced,viewport:i,afterCritical:a})},OH=(e,t)=>({...e,[t.descriptor.id]:t});const m1t=({previousImpact:e,impact:t,droppables:n})=>{const r=es(e),o=es(t);if(!r||r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=n1t(i);return OH(n,a)};var g1t=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=m1t({previousImpact:r,impact:o,droppables:n}),a=es(o);if(!a)return i;const s=n[a];if(Yv(e,s)||s.subject.withPlaceholder)return i;const l=nhe(s,e,t);return OH(i,l)},gx=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=Ka(l,e.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:wi(e.initial.client.borderBoxCenter,c)},f={selection:wi(u.selection,a.scroll.current),borderBoxCenter:wi(u.borderBoxCenter,a.scroll.current),offset:wi(u.offset,a.scroll.diff.value)},h={client:u,page:f};if(e.phase==="COLLECTING")return{...e,dimensions:s,viewport:a,current:h};const m=s.draggables[e.critical.draggable.id],g=o||ahe({pageOffset:f.offset,draggable:m,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),y=g1t({draggable:m,impact:g,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:h,dimensions:{draggables:s.draggables,droppables:y},impact:g,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function y1t(e,t){return e.map(n=>t[n])}var she=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=y1t(i.all,n),s=LS({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},lhe=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=tA({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return TH({pageBorderBoxCenter:a,draggable:t,viewport:o})},che=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&Et();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=es(r);c||Et();const u=s[c],f=she({impact:r,viewport:o,destination:u,draggables:a}),h=lhe({impact:f,draggable:l,droppable:u,draggables:a,viewport:o,afterCritical:e.afterCritical});return gx({impact:f,clientSelection:h,state:e,dimensions:i,viewport:o})},v1t=e=>({index:e.index,droppableId:e.droppableId}),uhe=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=tC(t.axis,e.displaceBy),i=Kv(t.descriptor.id,n),a=i.indexOf(e);a===-1&&Et();const s=i.slice(a+1),l=s.reduce((h,m)=>(h[m.descriptor.id]=!0,h),{}),c={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:l};return{impact:{displaced:LS({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:v1t(e.descriptor)}},afterCritical:c}},b1t=(e,t)=>({draggables:e.draggables,droppables:OH(e.droppables,t)}),x1t=({draggable:e,offset:t,initialWindowScroll:n})=>{const r=kO(e.client,t),o=_O(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}},S1t=e=>{const t=e.frame;return t||Et(),t},w1t=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,a=t[i],l=S1t(a).scroll.diff.value,c=wi(r,l);return x1t({draggable:o,offset:c,initialWindowScroll:n.scroll.initial})})},C1t=({state:e,published:t})=>{const n=t.modified.map(w=>{const C=e.dimensions.droppables[w.droppableId];return xH(C,w.scroll)}),r={...e.dimensions.droppables,...qpe(n)},o=Wpe(w1t({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(w=>{delete i[w]});const a={droppables:r,draggables:i},s=es(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],u=a.droppables[e.critical.droppable.id],{impact:f,afterCritical:h}=uhe({draggable:c,home:u,draggables:i,viewport:e.viewport}),m=l&&l.isCombineEnabled?e.impact:f,g=ahe({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:m,viewport:e.viewport,afterCritical:h}),y={...e,phase:"DRAGGING",impact:g,onLiftImpact:f,dimensions:a,afterCritical:h,forceShouldAnimate:!1};return e.phase==="COLLECTING"?y:{...y,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const yj=e=>e.movementMode==="SNAP",$$=(e,t,n)=>{const r=b1t(e.dimensions,t);return!yj(e)||n?gx({state:e,dimensions:r}):che({state:e,dimensions:r})};function N$(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const JZ={phase:"IDLE",completed:null,shouldFlush:!1};var E1t=(e=JZ,t)=>{if(t.type==="FLUSH")return{...JZ,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Et();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:ci},u={client:c,page:{selection:wi(c.selection,o.scroll.initial),borderBoxCenter:wi(c.selection,o.scroll.initial),offset:wi(c.selection,o.scroll.diff.value)}},f=JP(i.droppables).every(y=>!y.isFixedOnPage),{impact:h,afterCritical:m}=uhe({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:f,impact:h,afterCritical:m,onLiftImpact:h,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&Et(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Et(),C1t({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Rp(e)||Et();const{client:n}=t.payload;return Sf(n,e.current.client.selection)?e:gx({state:e,clientSelection:n,impact:yj(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return N$(e);Rp(e)||Et();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=xH(o,r);return $$(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Rp(e)||Et();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Et(),o.isEnabled===r&&Et();const i={...o,isEnabled:r};return $$(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Rp(e)||Et();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Et(),o.isCombineEnabled===r&&Et();const i={...o,isCombineEnabled:r};return $$(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Rp(e)||Et(),e.isWindowScrollAllowed||Et();const n=t.payload.newScroll;if(Sf(e.viewport.scroll.current,n))return N$(e);const r=Zpe(e.viewport,n);return yj(e)?che({state:e,viewport:r}):gx({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Rp(e))return e;const n=t.payload.maxScroll;if(Sf(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Et();const n=a1t({state:e,type:t.type});return n?gx({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&Et(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Et(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function fr(e,t){return e instanceof Object&&"type"in e&&e.type===t}const T1t=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),O1t=e=>({type:"LIFT",payload:e}),I1t=e=>({type:"INITIAL_PUBLISH",payload:e}),P1t=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),A1t=()=>({type:"COLLECTION_STARTING",payload:null}),M1t=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),R1t=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),D1t=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),dhe=e=>({type:"MOVE",payload:e}),k1t=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),_1t=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),$1t=()=>({type:"MOVE_UP",payload:null}),N1t=()=>({type:"MOVE_DOWN",payload:null}),L1t=()=>({type:"MOVE_RIGHT",payload:null}),F1t=()=>({type:"MOVE_LEFT",payload:null}),IH=()=>({type:"FLUSH",payload:null}),j1t=e=>({type:"DROP_ANIMATE",payload:e}),PH=e=>({type:"DROP_COMPLETE",payload:e}),fhe=e=>({type:"DROP",payload:e}),B1t=e=>({type:"DROP_PENDING",payload:e}),phe=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var z1t=e=>({getState:t,dispatch:n})=>r=>o=>{if(!fr(o,"LIFT")){r(o);return}const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();l.phase==="DROP_ANIMATING"&&n(PH({completed:l.completed})),t().phase!=="IDLE"&&Et(),n(IH()),n(T1t({draggableId:i,movementMode:s}));const u={draggableId:i,scrollOptions:{shouldPublishImmediately:s==="SNAP"}},{critical:f,dimensions:h,viewport:m}=e.startPublishing(u);n(I1t({critical:f,dimensions:h,clientSelection:a,movementMode:s,viewport:m}))},V1t=e=>()=>t=>n=>{fr(n,"INITIAL_PUBLISH")&&e.dragging(),fr(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(fr(n,"FLUSH")||fr(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const AH={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},FS={opacity:{drop:0,combining:.7},scale:{drop:.75}},hhe={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Ep=`${hhe.outOfTheWay}s ${AH.outOfTheWay}`,yx={fluid:`opacity ${Ep}`,snap:`transform ${Ep}, opacity ${Ep}`,drop:e=>{const t=`${e}s ${AH.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Ep}`,placeholder:`height ${Ep}, width ${Ep}, margin ${Ep}`},ZZ=e=>Sf(e,ci)?void 0:`translate(${e.x}px, ${e.y}px)`,vj={moveTo:ZZ,drop:(e,t)=>{const n=ZZ(e);if(n)return t?`${n} scale(${FS.scale.drop})`:n}},{minDropTime:bj,maxDropTime:mhe}=hhe,H1t=mhe-bj,eee=1500,U1t=.6;var G1t=({current:e,destination:t,reason:n})=>{const r=$S(e,t);if(r<=0)return bj;if(r>=eee)return mhe;const o=r/eee,i=bj+H1t*o,a=n==="CANCEL"?i*U1t:i;return Number(a.toFixed(2))},q1t=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=es(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],u=lhe({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return Ka(u,t.client.borderBox.center)},W1t=({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>!n.at||t!=="DROP"?{impact:she({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:NS},didDropInsideDroppable:!0};const K1t=({getState:e,dispatch:t})=>n=>r=>{if(!fr(r,"DROP")){n(r);return}const o=e(),i=r.payload.reason;if(o.phase==="COLLECTING"){t(B1t({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&Et(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||Et();const s=o.critical,l=o.dimensions,c=l.draggables[o.critical.draggable.id],{impact:u,didDropInsideDroppable:f}=W1t({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),h=f?SH(u):null,m=f?ZP(u):null,g={index:s.draggable.index,droppableId:s.droppable.id},y={draggableId:c.descriptor.id,type:c.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:h,combine:m},v=q1t({impact:u,draggable:c,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),w={critical:o.critical,afterCritical:o.afterCritical,result:y,impact:u};if(!(!Sf(o.current.client.offset,v)||!!y.combine)){t(PH({completed:w}));return}const E=G1t({current:o.current.client.offset,destination:v,reason:i});t(j1t({newHomeClientOffset:v,dropDuration:E,completed:w}))};var ghe=()=>({x:window.pageXOffset,y:window.pageYOffset});function Y1t(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function Q1t({onWindowScroll:e}){function t(){e(ghe())}const n=_S(t),r=Y1t(n);let o=xf;function i(){return o!==xf}function a(){i()&&Et(),o=Gs(window,[r])}function s(){i()||Et(),n.cancel(),o(),o=xf}return{start:a,stop:s,isActive:i}}const X1t=e=>fr(e,"DROP_COMPLETE")||fr(e,"DROP_ANIMATE")||fr(e,"FLUSH"),J1t=e=>{const t=Q1t({onWindowScroll:n=>{e.dispatch(k1t({newScroll:n}))}});return n=>r=>{!t.isActive()&&fr(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&X1t(r)&&t.stop(),n(r)}};var Z1t=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return o.wasCalled=()=>t,o},eEt=()=>{const e=[],t=o=>{const i=e.findIndex(s=>s.timerId===o);i===-1&&Et();const[a]=e.splice(i,1);a.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),a={timerId:i,callback:o};e.push(a)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const tEt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,nEt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,rEt=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},E0=(e,t)=>{t()},iE=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function L$(e,t,n,r){if(!e){n(r(t));return}const o=Z1t(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var oEt=(e,t)=>{const n=eEt();let r=null;const o=(f,h)=>{r&&Et(),E0("onBeforeCapture",()=>{const m=e().onBeforeCapture;m&&m({draggableId:f,mode:h})})},i=(f,h)=>{r&&Et(),E0("onBeforeDragStart",()=>{const m=e().onBeforeDragStart;m&&m(iE(f,h))})},a=(f,h)=>{r&&Et();const m=iE(f,h);r={mode:h,lastCritical:f,lastLocation:m.source,lastCombine:null},n.add(()=>{E0("onDragStart",()=>L$(e().onDragStart,m,t,LE.onDragStart))})},s=(f,h)=>{const m=SH(h),g=ZP(h);r||Et();const y=!rEt(f,r.lastCritical);y&&(r.lastCritical=f);const v=!tEt(r.lastLocation,m);v&&(r.lastLocation=m);const w=!nEt(r.lastCombine,g);if(w&&(r.lastCombine=g),!y&&!v&&!w)return;const C={...iE(f,r.mode),combine:g,destination:m};n.add(()=>{E0("onDragUpdate",()=>L$(e().onDragUpdate,C,t,LE.onDragUpdate))})},l=()=>{r||Et(),n.flush()},c=f=>{r||Et(),r=null,E0("onDragEnd",()=>L$(e().onDragEnd,f,t,LE.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:()=>{if(!r)return;const f={...iE(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};c(f)}}},iEt=(e,t)=>{const n=oEt(e,t);return r=>o=>i=>{if(fr(i,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(fr(i,"INITIAL_PUBLISH")){const s=i.payload.critical;n.beforeStart(s,i.payload.movementMode),o(i),n.start(s,i.payload.movementMode);return}if(fr(i,"DROP_COMPLETE")){const s=i.payload.completed.result;n.flush(),o(i),n.drop(s);return}if(o(i),fr(i,"FLUSH")){n.abort();return}const a=r.getState();a.phase==="DRAGGING"&&n.update(a.critical,a.impact)}};const aEt=e=>t=>n=>{if(!fr(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&Et(),e.dispatch(PH({completed:r.completed}))},sEt=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return o=>i=>{if((fr(i,"FLUSH")||fr(i,"DROP_COMPLETE")||fr(i,"DROP_ANIMATION_FINISHED"))&&r(),o(i),!fr(i,"DROP_ANIMATE"))return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(phe())}};n=requestAnimationFrame(()=>{n=null,t=Gs(window,[a])})}};var lEt=e=>()=>t=>n=>{(fr(n,"DROP_COMPLETE")||fr(n,"FLUSH")||fr(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},cEt=e=>{let t=!1;return()=>n=>r=>{if(fr(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(fr(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(fr(r,"DROP_COMPLETE")){t=!1;const o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const uEt=e=>fr(e,"DROP_COMPLETE")||fr(e,"DROP_ANIMATE")||fr(e,"FLUSH");var dEt=e=>t=>n=>r=>{if(uEt(r)){e.stop(),n(r);return}if(fr(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();o.phase!=="DRAGGING"&&Et(),e.start(o);return}n(r),e.scroll(t.getState())};const fEt=e=>t=>n=>{if(t(n),!fr(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(fhe({reason:r.reason})))},pEt=Dpe;var hEt=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>Rpe(E1t,pEt(mwt(V1t(n),lEt(e),z1t(e),K1t,aEt,sEt,fEt,dEt(i),J1t,cEt(t),iEt(r,o))));const F$=()=>({additions:{},removals:{},modified:{}});function mEt({registry:e,callbacks:t}){let n=F$(),r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:l,removals:c,modified:u}=n,f=Object.keys(l).map(g=>e.draggable.getById(g).getDimension(ci)).sort((g,y)=>g.descriptor.index-y.descriptor.index),h=Object.keys(u).map(g=>{const v=e.droppable.getById(g).callbacks.getScrollWhileDragging();return{droppableId:g,scroll:v}}),m={additions:f,removals:Object.keys(c),modified:h};n=F$(),t.publish(m)}))};return{add:l=>{const c=l.descriptor.id;n.additions[c]=l,n.modified[l.descriptor.droppableId]=!0,n.removals[c]&&delete n.removals[c],o()},remove:l=>{const c=l.descriptor;n.removals[c.id]=!0,n.modified[c.droppableId]=!0,n.additions[c.id]&&delete n.additions[c.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=F$())}}}var yhe=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=Ka({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},vhe=()=>{const e=document.documentElement;return e||Et(),e},bhe=()=>{const e=vhe();return yhe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},gEt=()=>{const e=ghe(),t=bhe(),n=e.y,r=e.x,o=vhe(),i=o.clientWidth,a=o.clientHeight,s=r+i,l=n+a;return{frame:Ll({top:n,left:r,right:s,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:ci,displacement:ci}}}},yEt=({critical:e,scrollOptions:t,registry:n})=>{const r=gEt(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map(u=>u.callbacks.getDimensionAndWatchScroll(o,t)),s=n.draggable.getAllByType(e.draggable.type).map(u=>u.getDimension(o));return{dimensions:{draggables:Wpe(s),droppables:qpe(a)},critical:e,viewport:r}};function tee(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var vEt=(e,t)=>{let n=null;const r=mEt({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(h,m)=>{e.droppable.exists(h)||Et(),n&&t.updateDroppableIsEnabled({id:h,isEnabled:m})},i=(h,m)=>{n&&(e.droppable.exists(h)||Et(),t.updateDroppableIsCombineEnabled({id:h,isCombineEnabled:m}))},a=(h,m)=>{n&&(e.droppable.exists(h)||Et(),t.updateDroppableScroll({id:h,newScroll:m}))},s=(h,m)=>{n&&e.droppable.getById(h).callbacks.scroll(m)},l=()=>{if(!n)return;r.stop();const h=n.critical.droppable;e.droppable.getAllByType(h.type).forEach(m=>m.callbacks.dragStopped()),n.unsubscribe(),n=null},c=h=>{n||Et();const m=n.critical.draggable;h.type==="ADDITION"&&tee(e,m,h.value)&&r.add(h.value),h.type==="REMOVAL"&&tee(e,m,h.value)&&r.remove(h.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:h=>{n&&Et();const m=e.draggable.getById(h.draggableId),g=e.droppable.getById(m.descriptor.droppableId),y={draggable:m.descriptor,droppable:g.descriptor},v=e.subscribe(c);return n={critical:y,unsubscribe:v},yEt({critical:y,registry:e,scrollOptions:h.scrollOptions})},stopPublishing:l}},xhe=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",bEt=e=>{window.scrollBy(e.x,e.y)};const xEt=li(e=>JP(e).filter(t=>!(!t.isEnabled||!t.frame))),SEt=(e,t)=>xEt(t).find(r=>(r.frame||Et(),rhe(r.frame.pageMarginBox)(e)))||null;var wEt=({center:e,destination:t,droppables:n})=>{if(t){const o=n[t];return o.frame?o:null}return SEt(e,n)};const jS={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var CEt=(e,t,n=()=>jS)=>{const r=n(),o=e[t.size]*r.startFromPercentage,i=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},She=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},MH=1,EEt=(e,t,n=()=>jS)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return MH;const i=1-She({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=r.maxPixelScroll*r.ease(i);return Math.ceil(a)},TEt=(e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,c=Date.now()-a;if(c>=i)return e;if(c<o)return MH;const u=She({startOfRange:o,endOfRange:s,current:c}),f=e*r.ease(u);return Math.ceil(f)},nee=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=EEt(e,t,o);return i===0?0:r?Math.max(TEt(i,n,o),MH):i},ree=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=CEt(e,r,i);return t[r.end]<t[r.start]?nee({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*nee({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})},OEt=({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return!o&&!r?n:o&&r?null:{x:o?0:n.x,y:r?0:n.y}};const IEt=Gpe(e=>e===0?0:e);var whe=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=ree({container:t,distanceToEdges:a,dragStartTime:e,axis:wH,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=ree({container:t,distanceToEdges:a,dragStartTime:e,axis:Qpe,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=IEt({x:l,y:s});if(Sf(c,ci))return null;const u=OEt({container:t,subject:n,proposedScroll:c});return u?Sf(u,ci)?null:u:null};const PEt=Gpe(e=>e===0?0:e>0?1:-1),RH=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const o=wi(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return Sf(i,ci)?null:i}})(),Che=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=PEt(n),i=RH({max:r,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},DH=(e,t)=>Che({current:e.scroll.current,max:e.scroll.max,change:t}),AEt=(e,t)=>{if(!DH(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return RH({current:r,max:n,change:t})},kH=(e,t)=>{const n=e.frame;return n?Che({current:n.scroll.current,max:n.scroll.max,change:t}):!1},MEt=(e,t)=>{const n=e.frame;return!n||!kH(e,t)?null:RH({current:n.scroll.current,max:n.scroll.max,change:t})};var REt=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=whe({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&DH(e,a)?a:null},DEt=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=whe({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&kH(e,s)?s:null},oee=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const f=e.viewport,h=REt({dragStartTime:t,viewport:f,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(h){r(h);return}}const c=wEt({center:a,destination:es(e.impact),droppables:e.dimensions.droppables});if(!c)return;const u=DEt({dragStartTime:t,droppable:c,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});u&&o(c.descriptor.id,u)},kEt=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>jS})=>{const r=_S(e),o=_S(t);let i=null;const a=c=>{i||Et();const{shouldUseTimeDampening:u,dragStartTime:f}=i;oee({state:c,scrollWindow:r,scrollDroppable:o,dragStartTime:f,shouldUseTimeDampening:u,getAutoScrollerOptions:n})};return{start:c=>{i&&Et();const u=Date.now();let f=!1;const h=()=>{f=!0};oee({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:h,scrollDroppable:h,getAutoScrollerOptions:n}),i={dragStartTime:u,shouldUseTimeDampening:f},f&&a(c)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}},_Et=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(s,l)=>{const c=wi(s.current.client.selection,l);e({client:c})},o=(s,l)=>{if(!kH(s,l))return l;const c=MEt(s,l);if(!c)return t(s.descriptor.id,l),null;const u=Ka(l,c);return t(s.descriptor.id,u),Ka(l,u)},i=(s,l,c)=>{if(!s||!DH(l,c))return c;const u=AEt(l,c);if(!u)return n(c),null;const f=Ka(c,u);return n(f),Ka(c,f)};return s=>{const l=s.scrollJumpRequest;if(!l)return;const c=es(s.impact);c||Et();const u=o(s.dimensions.droppables[c],l);if(!u)return;const f=s.viewport,h=i(s.isWindowScrollAllowed,f,u);h&&r(s,h)}},$Et=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=kEt({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=_Et({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(r().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:o.start,stop:o.stop}};const Zy="data-rfd",ev=(()=>{const e=`${Zy}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),xj=(()=>{const e=`${Zy}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),NEt=(()=>{const e=`${Zy}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),iee={contextId:`${Zy}-scroll-container-context-id`},LEt=e=>t=>`[${t}="${e}"]`,T0=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),FEt="pointer-events: none;";var jEt=e=>{const t=LEt(e),n=(()=>{const s=`
+ ${GZ(e.source)}
+ `},FE={dragHandleUsageInstructions:gCt,onDragStart:yCt,onDragUpdate:vCt,onDragEnd:bCt};function xCt(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function qpe(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!xCt(e[n],t[n]))return!1;return!0}function Kn(e,t){const n=x.useState(()=>({inputs:t,result:e()}))[0],r=x.useRef(!0),o=x.useRef(n),a=r.current||!!(t&&o.current.inputs&&qpe(t,o.current.inputs))?o.current:{inputs:t,result:e()};return x.useEffect(()=>{r.current=!1,o.current=a},[a]),a.result}function Wt(e,t){return Kn(()=>e,t)}const ci={x:0,y:0},Ci=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Ka=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Cf=(e,t)=>e.x===t.x&&e.y===t.y,Wv=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Nh=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},$S=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),qZ=(e,t)=>Math.min(...t.map(n=>$S(e,n))),Wpe=e=>t=>({x:e(t.x),y:e(t.y)});var SCt=(e,t)=>{const n=jl({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const tC=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),WZ=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],wCt={top:0,right:0,bottom:0,left:0},CCt=(e,t)=>t?tC(e,t.scroll.diff.displacement):e,ECt=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,TCt=(e,t)=>t&&t.shouldClipSubject?SCt(t.pageMarginBox,e):jl(e);var Zy=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=CCt(e.marginBox,r),i=ECt(o,n,t),a=TCt(i,r);return{page:e,withPlaceholder:t,active:a}},xH=(e,t)=>{e.frame||Et();const n=e.frame,r=Ka(t,n.scroll.initial),o=Wv(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=Zy({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function li(e,t=qpe){let n=null;function r(...o){if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;const i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}const Kpe=li(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),Ype=li(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),ZP=li(e=>Object.values(e)),OCt=li(e=>Object.values(e));var Kv=li((e,t)=>OCt(t).filter(r=>e===r.descriptor.droppableId).sort((r,o)=>r.descriptor.index-o.descriptor.index));function SH(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function eA(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var tA=li((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),ICt=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled||!SH(o))return null;function a(m){const g={type:"COMBINE",combine:{draggableId:m,droppableId:n.descriptor.id}};return{...o,at:g}}const s=o.displaced.all,l=s.length?s[0]:null;if(e)return l?a(l):null;const c=tA(t,r);if(!l){if(!c.length)return null;const m=c[c.length-1];return a(m.descriptor.id)}const u=c.findIndex(m=>m.descriptor.id===l);u===-1&&Et();const f=u-1;if(f<0)return null;const p=c[f];return a(p.descriptor.id)},Yv=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Qpe={point:ci,value:0},NS={invisible:{},visible:{},all:[]},PCt={displaced:NS,displacedBy:Qpe,at:null};var Zs=(e,t)=>n=>e<=n&&n<=t,Xpe=e=>{const t=Zs(e.top,e.bottom),n=Zs(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(i&&a)return!0;const l=r.top<e.top&&r.bottom>e.bottom,c=r.left<e.left&&r.right>e.right;return l&&c?!0:l&&a||c&&i}},ACt=e=>{const t=Zs(e.top,e.bottom),n=Zs(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const wH={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Jpe={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var MCt=e=>t=>{const n=Zs(t.top,t.bottom),r=Zs(t.left,t.right);return o=>e===wH?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)};const RCt=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:ci;return tC(e,n)},DCt=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,kCt=(e,t,n)=>n(t)(e),CH=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?RCt(e,t):e;return DCt(i,t,o)&&kCt(i,n,o)},_Ct=e=>CH({...e,isVisibleThroughFrameFn:Xpe}),Zpe=e=>CH({...e,isVisibleThroughFrameFn:ACt}),$Ct=e=>CH({...e,isVisibleThroughFrameFn:MCt(e.destination.axis)}),NCt=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function LCt(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return jl(vH(n,r))}function LS({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(s,l){const c=LCt(l,n),u=l.descriptor.id;if(s.all.push(u),!_Ct({target:c,destination:t,viewport:r,withDroppableDisplacement:!0}))return s.invisible[l.descriptor.id]=!0,s;const p=NCt(u,i,o),m={draggableId:u,shouldAnimate:p};return s.visible[u]=m,s},{all:[],visible:{},invisible:{}})}function FCt(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function KZ({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=FCt(e,{inHomeList:t});return{displaced:NS,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function FO({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=Yv(e,n);if(a==null)return KZ({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(g=>g.descriptor.index===a);if(!c)return KZ({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const u=tA(e,t),f=t.indexOf(c),p=u.slice(f);return{displaced:LS({afterDragging:p,destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function _f(e,t){return!!t.effected[e]}var jCt=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,s=n[i].descriptor.index;return _f(i,o)?e?s:s-1:e?s+1:s},BCt=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index,l=t?s:s+1;return i<a||i>l?null:i},zCt=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||Et(),c.type==="REORDER"){const f=BCt({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return f==null?null:FO({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:f})}const u=jCt({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return u==null?null:FO({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},VCt=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=!!(e.visible[n]||e.invisible[n]);return _f(n,t)?o?ci:Wv(r.point):o?r.point:ci},HCt=({afterCritical:e,impact:t,draggables:n})=>{const r=eA(t);r||Et();const o=r.draggableId,i=n[o].page.borderBox.center,a=VCt({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return Ci(i,a)};const ehe=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,UCt=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,EH=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,YZ=({axis:e,moveRelativeTo:t,isMoving:n})=>Nh(e.line,t.marginBox[e.end]+ehe(e,n),EH(e,t.marginBox,n)),QZ=({axis:e,moveRelativeTo:t,isMoving:n})=>Nh(e.line,t.marginBox[e.start]-UCt(e,n),EH(e,t.marginBox,n)),GCt=({axis:e,moveInto:t,isMoving:n})=>Nh(e.line,t.contentBox[e.start]+ehe(e,n),EH(e,t.contentBox,n));var qCt=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=Kv(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return GCt({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,u=l.all[0];if(u){const p=n[u];if(_f(u,o))return QZ({axis:s,moveRelativeTo:p.page,isMoving:a});const m=_O(p.page,c.point);return QZ({axis:s,moveRelativeTo:m,isMoving:a})}const f=i[i.length-1];if(f.descriptor.id===t.descriptor.id)return a.borderBox.center;if(_f(f.descriptor.id,o)){const p=_O(f.page,Wv(o.displacedBy.point));return YZ({axis:s,moveRelativeTo:p,isMoving:a})}return YZ({axis:s,moveRelativeTo:f.page,isMoving:a})},yj=(e,t)=>{const n=e.frame;return n?Ci(t,n.scroll.diff.displacement):t};const WCt=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return!n||!a?i:a.type==="REORDER"?qCt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):HCt({impact:e,draggables:r,afterCritical:o})};var nA=e=>{const t=WCt(e),n=e.droppable;return n?yj(n,t):t},the=(e,t)=>{const n=Ka(t,e.scroll.initial),r=Wv(n);return{frame:jl({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function XZ(e,t){return e.map(n=>t[n])}function KCt(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}var YCt=({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=the(t,Ci(t.scroll.current,o)),a=n.frame?xH(n,Ci(n.frame.scroll.current,o)):n,s=e.displaced,l=LS({afterDragging:XZ(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=LS({afterDragging:XZ(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},f={},p=[s,l,c];return s.all.forEach(g=>{const y=KCt(g,p);if(y){f[g]=y;return}u[g]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:f}}},QCt=(e,t)=>Ci(e.scroll.diff.displacement,t),TH=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=QCt(n,e),o=Ka(r,t.page.borderBox.center);return Ci(t.client.borderBox.center,o)},nhe=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=Ka(n,e.page.borderBox.center),l={target:tC(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?$Ct(l):Zpe(l)},XCt=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=Kv(n.descriptor.id,r),u=Yv(t,n),f=ICt({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||zCt({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!f)return null;const p=nA({impact:f,draggable:t,droppable:n,draggables:r,afterCritical:l});if(nhe({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:TH({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:f,scrollJumpRequest:null};const g=Ka(p,a),y=YCt({impact:f,viewport:i,destination:n,draggables:r,maxScrollChange:g});return{clientSelection:s,impact:y,scrollJumpRequest:g}};const qi=e=>{const t=e.subject.active;return t||Et(),t};var JCt=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=Zs(i[a.start],i[a.end]),l=ZP(r).filter(u=>u!==n).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>Xpe(o.frame)(qi(u))).filter(u=>{const f=qi(u);return e?i[a.crossAxisEnd]<f[a.crossAxisEnd]:f[a.crossAxisStart]<i[a.crossAxisStart]}).filter(u=>{const f=qi(u),p=Zs(f[a.start],f[a.end]);return s(f[a.start])||s(f[a.end])||p(i[a.start])||p(i[a.end])}).sort((u,f)=>{const p=qi(u)[a.crossAxisStart],m=qi(f)[a.crossAxisStart];return e?p-m:m-p}).filter((u,f,p)=>qi(u)[a.crossAxisStart]===qi(p[0])[a.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(u=>Zs(qi(u)[a.start],qi(u)[a.end])(t[a.line]));return c.length===1?c[0]:c.length>1?c.sort((u,f)=>qi(u)[a.start]-qi(f)[a.start])[0]:l.sort((u,f)=>{const p=qZ(t,WZ(qi(u))),m=qZ(t,WZ(qi(f)));return p!==m?p-m:qi(u)[a.start]-qi(f)[a.start]})[0]};const JZ=(e,t)=>{const n=e.page.borderBox.center;return _f(e.descriptor.id,t)?Ka(n,t.displacedBy.point):n},ZCt=(e,t)=>{const n=e.page.borderBox;return _f(e.descriptor.id,t)?tC(n,Wv(t.displacedBy.point)):n};var e1t=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter(a=>Zpe({target:ZCt(a,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((a,s)=>{const l=$S(e,yj(n,JZ(a,o))),c=$S(e,yj(n,JZ(s,o)));return l<c?-1:c<l?1:a.descriptor.index-s.descriptor.index})[0]||null,nC=li(function(t,n){const r=n[t.line];return{value:r,point:Nh(t.line,r)}});const t1t=(e,t,n)=>{const r=e.axis;if(e.descriptor.mode==="virtual")return Nh(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],l=Kv(e.descriptor.id,n).reduce((c,u)=>c+u.client.marginBox[r.size],0)+t[r.line]-o;return l<=0?null:Nh(r.line,l)},rhe=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),ohe=(e,t,n)=>{const r=e.frame;Yv(t,e)&&Et(),e.subject.withPlaceholder&&Et();const o=nC(e.axis,t.displaceBy).point,i=t1t(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const u=Zy({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:u}}const s=i?Ci(r.scroll.max,i):r.scroll.max,l=rhe(r,s),c=Zy({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},n1t=e=>{const t=e.subject.withPlaceholder;t||Et();const n=e.frame;if(!n){const a=Zy({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const r=t.oldFrameMaxScroll;r||Et();const o=rhe(n,r),i=Zy({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var r1t=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const f={displaced:NS,displacedBy:Qpe,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},p=nA({impact:f,draggable:r,droppable:i,draggables:o,afterCritical:s}),m=Yv(r,i)?i:ohe(i,r,o);return nhe({draggable:r,destination:m,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?f:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],c=(()=>{const f=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?f:f+1})(),u=nC(i.axis,r.displaceBy);return FO({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:u,last:NS,index:c})},o1t=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=JCt({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=Kv(l.descriptor.id,o),u=e1t({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),f=r1t({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:u,insideDestination:c,viewport:a,afterCritical:s});if(!f)return null;const p=nA({impact:f,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:TH({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:f,scrollJumpRequest:null}},es=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const i1t=(e,t)=>{const n=es(e);return n?t[n]:null};var a1t=({state:e,type:t})=>{const n=i1t(e.impact,e.dimensions.droppables),r=!!n,o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s=a==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||a==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(s&&!r)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",c=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:f,droppables:p}=e.dimensions;return s?XCt({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,destination:i,draggables:f,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):o1t({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,isOver:i,draggables:f,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function kp(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function ihe(e){const t=Zs(e.top,e.bottom),n=Zs(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function s1t(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function l1t({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(i=>{const a=i.axis,s=Nh(i.axis.line,e.center[a.line],i.page.borderBox.center[a.crossAxisLine]);return{id:i.descriptor.id,distance:$S(r,s)}}).sort((i,a)=>a.distance-i.distance);return o[0]?o[0].id:null}function c1t({pageBorderBox:e,draggable:t,droppables:n}){const r=ZP(n).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!s1t(e,i))return!1;if(ihe(i)(e.center))return!0;const a=o.axis,s=i.center[a.crossAxisLine],l=e[a.crossAxisStart],c=e[a.crossAxisEnd],u=Zs(i[a.crossAxisStart],i[a.crossAxisEnd]),f=u(l),p=u(c);return!f&&!p?!0:f?l<s:c>s});return r.length?r.length===1?r[0].descriptor.id:l1t({pageBorderBox:e,draggable:t,candidates:r}):null}const ahe=(e,t)=>jl(tC(e,t));var u1t=(e,t)=>{const n=e.frame;return n?ahe(t,n.scroll.diff.value):t};function she({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function d1t({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var f1t=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=nC(n.axis,t.displaceBy),c=l.value,u=e[s.start],f=e[s.end],m=tA(t,r).find(y=>{const v=y.descriptor.id,w=y.page.borderBox.center[s.line],C=_f(v,a),E=she({displaced:o,id:v});return C?E?f<=w:u<w-c:E?f<=w+c:u<w})||null,g=d1t({draggable:t,closest:m,inHomeList:Yv(t,n)});return FO({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:g})};const p1t=4;var h1t=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=nC(r.axis,e.displaceBy),l=s.value,c=t[a.start],u=t[a.end],p=tA(e,o).find(g=>{const y=g.descriptor.id,v=g.page.borderBox,C=v[a.size]/p1t,E=_f(y,i),I=she({displaced:n.displaced,id:y});return E?I?u>v[a.start]+C&&u<v[a.end]-C:c>v[a.start]-l+C&&c<v[a.end]-l-C:I?u>v[a.start]+l+C&&u<v[a.end]+l-C:c>v[a.start]+C&&c<v[a.end]-C});return p?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:r.descriptor.id}}}:null},lhe=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=ahe(t.page.borderBox,e),l=c1t({pageBorderBox:s,draggable:t,droppables:r});if(!l)return PCt;const c=r[l],u=Kv(c.descriptor.id,n),f=u1t(c,s);return h1t({pageBorderBoxWithDroppableScroll:f,draggable:t,previousImpact:o,destination:c,insideDestination:u,afterCritical:a})||f1t({pageBorderBoxWithDroppableScroll:f,draggable:t,destination:c,insideDestination:u,last:o.displaced,viewport:i,afterCritical:a})},OH=(e,t)=>({...e,[t.descriptor.id]:t});const m1t=({previousImpact:e,impact:t,droppables:n})=>{const r=es(e),o=es(t);if(!r||r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=n1t(i);return OH(n,a)};var g1t=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=m1t({previousImpact:r,impact:o,droppables:n}),a=es(o);if(!a)return i;const s=n[a];if(Yv(e,s)||s.subject.withPlaceholder)return i;const l=ohe(s,e,t);return OH(i,l)},gx=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=Ka(l,e.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:Ci(e.initial.client.borderBoxCenter,c)},f={selection:Ci(u.selection,a.scroll.current),borderBoxCenter:Ci(u.borderBoxCenter,a.scroll.current),offset:Ci(u.offset,a.scroll.diff.value)},p={client:u,page:f};if(e.phase==="COLLECTING")return{...e,dimensions:s,viewport:a,current:p};const m=s.draggables[e.critical.draggable.id],g=o||lhe({pageOffset:f.offset,draggable:m,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),y=g1t({draggable:m,impact:g,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:y},impact:g,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function y1t(e,t){return e.map(n=>t[n])}var che=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=y1t(i.all,n),s=LS({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},uhe=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=nA({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return TH({pageBorderBoxCenter:a,draggable:t,viewport:o})},dhe=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&Et();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=es(r);c||Et();const u=s[c],f=che({impact:r,viewport:o,destination:u,draggables:a}),p=uhe({impact:f,draggable:l,droppable:u,draggables:a,viewport:o,afterCritical:e.afterCritical});return gx({impact:f,clientSelection:p,state:e,dimensions:i,viewport:o})},v1t=e=>({index:e.index,droppableId:e.droppableId}),fhe=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=nC(t.axis,e.displaceBy),i=Kv(t.descriptor.id,n),a=i.indexOf(e);a===-1&&Et();const s=i.slice(a+1),l=s.reduce((p,m)=>(p[m.descriptor.id]=!0,p),{}),c={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:l};return{impact:{displaced:LS({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:v1t(e.descriptor)}},afterCritical:c}},b1t=(e,t)=>({draggables:e.draggables,droppables:OH(e.droppables,t)}),x1t=({draggable:e,offset:t,initialWindowScroll:n})=>{const r=_O(e.client,t),o=$O(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}},S1t=e=>{const t=e.frame;return t||Et(),t},w1t=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,a=t[i],l=S1t(a).scroll.diff.value,c=Ci(r,l);return x1t({draggable:o,offset:c,initialWindowScroll:n.scroll.initial})})},C1t=({state:e,published:t})=>{const n=t.modified.map(w=>{const C=e.dimensions.droppables[w.droppableId];return xH(C,w.scroll)}),r={...e.dimensions.droppables,...Kpe(n)},o=Ype(w1t({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(w=>{delete i[w]});const a={droppables:r,draggables:i},s=es(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],u=a.droppables[e.critical.droppable.id],{impact:f,afterCritical:p}=fhe({draggable:c,home:u,draggables:i,viewport:e.viewport}),m=l&&l.isCombineEnabled?e.impact:f,g=lhe({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:m,viewport:e.viewport,afterCritical:p}),y={...e,phase:"DRAGGING",impact:g,onLiftImpact:f,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return e.phase==="COLLECTING"?y:{...y,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const vj=e=>e.movementMode==="SNAP",N$=(e,t,n)=>{const r=b1t(e.dimensions,t);return!vj(e)||n?gx({state:e,dimensions:r}):dhe({state:e,dimensions:r})};function L$(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const ZZ={phase:"IDLE",completed:null,shouldFlush:!1};var E1t=(e=ZZ,t)=>{if(t.type==="FLUSH")return{...ZZ,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Et();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:ci},u={client:c,page:{selection:Ci(c.selection,o.scroll.initial),borderBoxCenter:Ci(c.selection,o.scroll.initial),offset:Ci(c.selection,o.scroll.diff.value)}},f=ZP(i.droppables).every(y=>!y.isFixedOnPage),{impact:p,afterCritical:m}=fhe({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:f,impact:p,afterCritical:m,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&Et(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Et(),C1t({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;kp(e)||Et();const{client:n}=t.payload;return Cf(n,e.current.client.selection)?e:gx({state:e,clientSelection:n,impact:vj(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return L$(e);kp(e)||Et();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=xH(o,r);return N$(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;kp(e)||Et();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Et(),o.isEnabled===r&&Et();const i={...o,isEnabled:r};return N$(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;kp(e)||Et();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||Et(),o.isCombineEnabled===r&&Et();const i={...o,isCombineEnabled:r};return N$(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;kp(e)||Et(),e.isWindowScrollAllowed||Et();const n=t.payload.newScroll;if(Cf(e.viewport.scroll.current,n))return L$(e);const r=the(e.viewport,n);return vj(e)?dhe({state:e,viewport:r}):gx({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!kp(e))return e;const n=t.payload.maxScroll;if(Cf(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Et();const n=a1t({state:e,type:t.type});return n?gx({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&Et(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Et(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function pr(e,t){return e instanceof Object&&"type"in e&&e.type===t}const T1t=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),O1t=e=>({type:"LIFT",payload:e}),I1t=e=>({type:"INITIAL_PUBLISH",payload:e}),P1t=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),A1t=()=>({type:"COLLECTION_STARTING",payload:null}),M1t=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),R1t=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),D1t=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),phe=e=>({type:"MOVE",payload:e}),k1t=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),_1t=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),$1t=()=>({type:"MOVE_UP",payload:null}),N1t=()=>({type:"MOVE_DOWN",payload:null}),L1t=()=>({type:"MOVE_RIGHT",payload:null}),F1t=()=>({type:"MOVE_LEFT",payload:null}),IH=()=>({type:"FLUSH",payload:null}),j1t=e=>({type:"DROP_ANIMATE",payload:e}),PH=e=>({type:"DROP_COMPLETE",payload:e}),hhe=e=>({type:"DROP",payload:e}),B1t=e=>({type:"DROP_PENDING",payload:e}),mhe=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var z1t=e=>({getState:t,dispatch:n})=>r=>o=>{if(!pr(o,"LIFT")){r(o);return}const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();l.phase==="DROP_ANIMATING"&&n(PH({completed:l.completed})),t().phase!=="IDLE"&&Et(),n(IH()),n(T1t({draggableId:i,movementMode:s}));const u={draggableId:i,scrollOptions:{shouldPublishImmediately:s==="SNAP"}},{critical:f,dimensions:p,viewport:m}=e.startPublishing(u);n(I1t({critical:f,dimensions:p,clientSelection:a,movementMode:s,viewport:m}))},V1t=e=>()=>t=>n=>{pr(n,"INITIAL_PUBLISH")&&e.dragging(),pr(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(pr(n,"FLUSH")||pr(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const AH={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},FS={opacity:{drop:0,combining:.7},scale:{drop:.75}},ghe={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Op=`${ghe.outOfTheWay}s ${AH.outOfTheWay}`,yx={fluid:`opacity ${Op}`,snap:`transform ${Op}, opacity ${Op}`,drop:e=>{const t=`${e}s ${AH.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Op}`,placeholder:`height ${Op}, width ${Op}, margin ${Op}`},eee=e=>Cf(e,ci)?void 0:`translate(${e.x}px, ${e.y}px)`,bj={moveTo:eee,drop:(e,t)=>{const n=eee(e);if(n)return t?`${n} scale(${FS.scale.drop})`:n}},{minDropTime:xj,maxDropTime:yhe}=ghe,H1t=yhe-xj,tee=1500,U1t=.6;var G1t=({current:e,destination:t,reason:n})=>{const r=$S(e,t);if(r<=0)return xj;if(r>=tee)return yhe;const o=r/tee,i=xj+H1t*o,a=n==="CANCEL"?i*U1t:i;return Number(a.toFixed(2))},q1t=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=es(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],u=uhe({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return Ka(u,t.client.borderBox.center)},W1t=({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>!n.at||t!=="DROP"?{impact:che({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:NS},didDropInsideDroppable:!0};const K1t=({getState:e,dispatch:t})=>n=>r=>{if(!pr(r,"DROP")){n(r);return}const o=e(),i=r.payload.reason;if(o.phase==="COLLECTING"){t(B1t({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&Et(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||Et();const s=o.critical,l=o.dimensions,c=l.draggables[o.critical.draggable.id],{impact:u,didDropInsideDroppable:f}=W1t({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=f?SH(u):null,m=f?eA(u):null,g={index:s.draggable.index,droppableId:s.droppable.id},y={draggableId:c.descriptor.id,type:c.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:p,combine:m},v=q1t({impact:u,draggable:c,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),w={critical:o.critical,afterCritical:o.afterCritical,result:y,impact:u};if(!(!Cf(o.current.client.offset,v)||!!y.combine)){t(PH({completed:w}));return}const E=G1t({current:o.current.client.offset,destination:v,reason:i});t(j1t({newHomeClientOffset:v,dropDuration:E,completed:w}))};var vhe=()=>({x:window.pageXOffset,y:window.pageYOffset});function Y1t(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function Q1t({onWindowScroll:e}){function t(){e(vhe())}const n=_S(t),r=Y1t(n);let o=wf;function i(){return o!==wf}function a(){i()&&Et(),o=Gs(window,[r])}function s(){i()||Et(),n.cancel(),o(),o=wf}return{start:a,stop:s,isActive:i}}const X1t=e=>pr(e,"DROP_COMPLETE")||pr(e,"DROP_ANIMATE")||pr(e,"FLUSH"),J1t=e=>{const t=Q1t({onWindowScroll:n=>{e.dispatch(k1t({newScroll:n}))}});return n=>r=>{!t.isActive()&&pr(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&X1t(r)&&t.stop(),n(r)}};var Z1t=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return o.wasCalled=()=>t,o},eEt=()=>{const e=[],t=o=>{const i=e.findIndex(s=>s.timerId===o);i===-1&&Et();const[a]=e.splice(i,1);a.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),a={timerId:i,callback:o};e.push(a)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const tEt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,nEt=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,rEt=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},E0=(e,t)=>{t()},aE=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function F$(e,t,n,r){if(!e){n(r(t));return}const o=Z1t(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var oEt=(e,t)=>{const n=eEt();let r=null;const o=(f,p)=>{r&&Et(),E0("onBeforeCapture",()=>{const m=e().onBeforeCapture;m&&m({draggableId:f,mode:p})})},i=(f,p)=>{r&&Et(),E0("onBeforeDragStart",()=>{const m=e().onBeforeDragStart;m&&m(aE(f,p))})},a=(f,p)=>{r&&Et();const m=aE(f,p);r={mode:p,lastCritical:f,lastLocation:m.source,lastCombine:null},n.add(()=>{E0("onDragStart",()=>F$(e().onDragStart,m,t,FE.onDragStart))})},s=(f,p)=>{const m=SH(p),g=eA(p);r||Et();const y=!rEt(f,r.lastCritical);y&&(r.lastCritical=f);const v=!tEt(r.lastLocation,m);v&&(r.lastLocation=m);const w=!nEt(r.lastCombine,g);if(w&&(r.lastCombine=g),!y&&!v&&!w)return;const C={...aE(f,r.mode),combine:g,destination:m};n.add(()=>{E0("onDragUpdate",()=>F$(e().onDragUpdate,C,t,FE.onDragUpdate))})},l=()=>{r||Et(),n.flush()},c=f=>{r||Et(),r=null,E0("onDragEnd",()=>F$(e().onDragEnd,f,t,FE.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:()=>{if(!r)return;const f={...aE(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};c(f)}}},iEt=(e,t)=>{const n=oEt(e,t);return r=>o=>i=>{if(pr(i,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(pr(i,"INITIAL_PUBLISH")){const s=i.payload.critical;n.beforeStart(s,i.payload.movementMode),o(i),n.start(s,i.payload.movementMode);return}if(pr(i,"DROP_COMPLETE")){const s=i.payload.completed.result;n.flush(),o(i),n.drop(s);return}if(o(i),pr(i,"FLUSH")){n.abort();return}const a=r.getState();a.phase==="DRAGGING"&&n.update(a.critical,a.impact)}};const aEt=e=>t=>n=>{if(!pr(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&Et(),e.dispatch(PH({completed:r.completed}))},sEt=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return o=>i=>{if((pr(i,"FLUSH")||pr(i,"DROP_COMPLETE")||pr(i,"DROP_ANIMATION_FINISHED"))&&r(),o(i),!pr(i,"DROP_ANIMATE"))return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(mhe())}};n=requestAnimationFrame(()=>{n=null,t=Gs(window,[a])})}};var lEt=e=>()=>t=>n=>{(pr(n,"DROP_COMPLETE")||pr(n,"FLUSH")||pr(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},cEt=e=>{let t=!1;return()=>n=>r=>{if(pr(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(pr(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(pr(r,"DROP_COMPLETE")){t=!1;const o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const uEt=e=>pr(e,"DROP_COMPLETE")||pr(e,"DROP_ANIMATE")||pr(e,"FLUSH");var dEt=e=>t=>n=>r=>{if(uEt(r)){e.stop(),n(r);return}if(pr(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();o.phase!=="DRAGGING"&&Et(),e.start(o);return}n(r),e.scroll(t.getState())};const fEt=e=>t=>n=>{if(t(n),!pr(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(hhe({reason:r.reason})))},pEt=_pe;var hEt=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>kpe(E1t,pEt(mwt(V1t(n),lEt(e),z1t(e),K1t,aEt,sEt,fEt,dEt(i),J1t,cEt(t),iEt(r,o))));const j$=()=>({additions:{},removals:{},modified:{}});function mEt({registry:e,callbacks:t}){let n=j$(),r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:l,removals:c,modified:u}=n,f=Object.keys(l).map(g=>e.draggable.getById(g).getDimension(ci)).sort((g,y)=>g.descriptor.index-y.descriptor.index),p=Object.keys(u).map(g=>{const v=e.droppable.getById(g).callbacks.getScrollWhileDragging();return{droppableId:g,scroll:v}}),m={additions:f,removals:Object.keys(c),modified:p};n=j$(),t.publish(m)}))};return{add:l=>{const c=l.descriptor.id;n.additions[c]=l,n.modified[l.descriptor.droppableId]=!0,n.removals[c]&&delete n.removals[c],o()},remove:l=>{const c=l.descriptor;n.removals[c.id]=!0,n.modified[c.droppableId]=!0,n.additions[c.id]&&delete n.additions[c.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=j$())}}}var bhe=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=Ka({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},xhe=()=>{const e=document.documentElement;return e||Et(),e},She=()=>{const e=xhe();return bhe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},gEt=()=>{const e=vhe(),t=She(),n=e.y,r=e.x,o=xhe(),i=o.clientWidth,a=o.clientHeight,s=r+i,l=n+a;return{frame:jl({top:n,left:r,right:s,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:ci,displacement:ci}}}},yEt=({critical:e,scrollOptions:t,registry:n})=>{const r=gEt(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map(u=>u.callbacks.getDimensionAndWatchScroll(o,t)),s=n.draggable.getAllByType(e.draggable.type).map(u=>u.getDimension(o));return{dimensions:{draggables:Ype(s),droppables:Kpe(a)},critical:e,viewport:r}};function nee(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var vEt=(e,t)=>{let n=null;const r=mEt({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(p,m)=>{e.droppable.exists(p)||Et(),n&&t.updateDroppableIsEnabled({id:p,isEnabled:m})},i=(p,m)=>{n&&(e.droppable.exists(p)||Et(),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:m}))},a=(p,m)=>{n&&(e.droppable.exists(p)||Et(),t.updateDroppableScroll({id:p,newScroll:m}))},s=(p,m)=>{n&&e.droppable.getById(p).callbacks.scroll(m)},l=()=>{if(!n)return;r.stop();const p=n.critical.droppable;e.droppable.getAllByType(p.type).forEach(m=>m.callbacks.dragStopped()),n.unsubscribe(),n=null},c=p=>{n||Et();const m=n.critical.draggable;p.type==="ADDITION"&&nee(e,m,p.value)&&r.add(p.value),p.type==="REMOVAL"&&nee(e,m,p.value)&&r.remove(p.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:p=>{n&&Et();const m=e.draggable.getById(p.draggableId),g=e.droppable.getById(m.descriptor.droppableId),y={draggable:m.descriptor,droppable:g.descriptor},v=e.subscribe(c);return n={critical:y,unsubscribe:v},yEt({critical:y,registry:e,scrollOptions:p.scrollOptions})},stopPublishing:l}},whe=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",bEt=e=>{window.scrollBy(e.x,e.y)};const xEt=li(e=>ZP(e).filter(t=>!(!t.isEnabled||!t.frame))),SEt=(e,t)=>xEt(t).find(r=>(r.frame||Et(),ihe(r.frame.pageMarginBox)(e)))||null;var wEt=({center:e,destination:t,droppables:n})=>{if(t){const o=n[t];return o.frame?o:null}return SEt(e,n)};const jS={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var CEt=(e,t,n=()=>jS)=>{const r=n(),o=e[t.size]*r.startFromPercentage,i=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},Che=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},MH=1,EEt=(e,t,n=()=>jS)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return MH;const i=1-Che({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=r.maxPixelScroll*r.ease(i);return Math.ceil(a)},TEt=(e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,c=Date.now()-a;if(c>=i)return e;if(c<o)return MH;const u=Che({startOfRange:o,endOfRange:s,current:c}),f=e*r.ease(u);return Math.ceil(f)},ree=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=EEt(e,t,o);return i===0?0:r?Math.max(TEt(i,n,o),MH):i},oee=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=CEt(e,r,i);return t[r.end]<t[r.start]?ree({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*ree({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})},OEt=({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return!o&&!r?n:o&&r?null:{x:o?0:n.x,y:r?0:n.y}};const IEt=Wpe(e=>e===0?0:e);var Ehe=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=oee({container:t,distanceToEdges:a,dragStartTime:e,axis:wH,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=oee({container:t,distanceToEdges:a,dragStartTime:e,axis:Jpe,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=IEt({x:l,y:s});if(Cf(c,ci))return null;const u=OEt({container:t,subject:n,proposedScroll:c});return u?Cf(u,ci)?null:u:null};const PEt=Wpe(e=>e===0?0:e>0?1:-1),RH=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const o=Ci(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return Cf(i,ci)?null:i}})(),The=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=PEt(n),i=RH({max:r,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},DH=(e,t)=>The({current:e.scroll.current,max:e.scroll.max,change:t}),AEt=(e,t)=>{if(!DH(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return RH({current:r,max:n,change:t})},kH=(e,t)=>{const n=e.frame;return n?The({current:n.scroll.current,max:n.scroll.max,change:t}):!1},MEt=(e,t)=>{const n=e.frame;return!n||!kH(e,t)?null:RH({current:n.scroll.current,max:n.scroll.max,change:t})};var REt=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=Ehe({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&DH(e,a)?a:null},DEt=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=Ehe({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&kH(e,s)?s:null},iee=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const f=e.viewport,p=REt({dragStartTime:t,viewport:f,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(p){r(p);return}}const c=wEt({center:a,destination:es(e.impact),droppables:e.dimensions.droppables});if(!c)return;const u=DEt({dragStartTime:t,droppable:c,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});u&&o(c.descriptor.id,u)},kEt=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>jS})=>{const r=_S(e),o=_S(t);let i=null;const a=c=>{i||Et();const{shouldUseTimeDampening:u,dragStartTime:f}=i;iee({state:c,scrollWindow:r,scrollDroppable:o,dragStartTime:f,shouldUseTimeDampening:u,getAutoScrollerOptions:n})};return{start:c=>{i&&Et();const u=Date.now();let f=!1;const p=()=>{f=!0};iee({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p,getAutoScrollerOptions:n}),i={dragStartTime:u,shouldUseTimeDampening:f},f&&a(c)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}},_Et=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(s,l)=>{const c=Ci(s.current.client.selection,l);e({client:c})},o=(s,l)=>{if(!kH(s,l))return l;const c=MEt(s,l);if(!c)return t(s.descriptor.id,l),null;const u=Ka(l,c);return t(s.descriptor.id,u),Ka(l,u)},i=(s,l,c)=>{if(!s||!DH(l,c))return c;const u=AEt(l,c);if(!u)return n(c),null;const f=Ka(c,u);return n(f),Ka(c,f)};return s=>{const l=s.scrollJumpRequest;if(!l)return;const c=es(s.impact);c||Et();const u=o(s.dimensions.droppables[c],l);if(!u)return;const f=s.viewport,p=i(s.isWindowScrollAllowed,f,u);p&&r(s,p)}},$Et=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=kEt({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=_Et({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(r().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:o.start,stop:o.stop}};const ev="data-rfd",tv=(()=>{const e=`${ev}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Sj=(()=>{const e=`${ev}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),NEt=(()=>{const e=`${ev}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),aee={contextId:`${ev}-scroll-container-context-id`},LEt=e=>t=>`[${t}="${e}"]`,T0=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),FEt="pointer-events: none;";var jEt=e=>{const t=LEt(e),n=(()=>{const s=`
cursor: -webkit-grab;
cursor: grab;
- `;return{selector:t(ev.contextId),styles:{always:`
+ `;return{selector:t(tv.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:s,dragging:FEt,dropAnimating:s}}})(),r=(()=>{const s=`
transition: ${yx.outOfTheWay};
- `;return{selector:t(xj.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}})(),o={selector:t(NEt.contextId),styles:{always:"overflow-anchor: none;"}},a=[r,n,o,{selector:"body",styles:{dragging:`
+ `;return{selector:t(Sj.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}})(),o={selector:t(NEt.contextId),styles:{always:"overflow-anchor: none;"}},a=[r,n,o,{selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
@@ -533,5 +533,5 @@ ${ce.current.stack}
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
- `}}];return{always:T0(a,"always"),resting:T0(a,"resting"),dragging:T0(a,"dragging"),dropAnimating:T0(a,"dropAnimating"),userCancel:T0(a,"userCancel")}};const ts=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,j$=()=>{const e=document.querySelector("head");return e||Et(),e},aee=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function BEt(e,t){const n=Kn(()=>jEt(e),[e]),r=x.useRef(null),o=x.useRef(null),i=Wt(li(f=>{const h=o.current;h||Et(),h.textContent=f}),[]),a=Wt(f=>{const h=r.current;h||Et(),h.textContent=f},[]);ts(()=>{!r.current&&!o.current||Et();const f=aee(t),h=aee(t);return r.current=f,o.current=h,f.setAttribute(`${Zy}-always`,e),h.setAttribute(`${Zy}-dynamic`,e),j$().appendChild(f),j$().appendChild(h),a(n.always),i(n.resting),()=>{const m=g=>{const y=g.current;y||Et(),j$().removeChild(y),g.current=null};m(r),m(o)}},[t,a,i,n.always,n.resting,e]);const s=Wt(()=>i(n.dragging),[i,n.dragging]),l=Wt(f=>{if(f==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),c=Wt(()=>{o.current&&i(n.resting)},[i,n.resting]);return Kn(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function Ehe(e,t){return Array.from(e.querySelectorAll(t))}var The=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function nA(e){return e instanceof The(e).HTMLElement}function zEt(e,t){const n=`[${ev.contextId}="${e}"]`,r=Ehe(document,n);if(!r.length)return null;const o=r.find(i=>i.getAttribute(ev.draggableId)===t);return!o||!nA(o)?null:o}function VEt(e){const t=x.useRef({}),n=x.useRef(null),r=x.useRef(null),o=x.useRef(!1),i=Wt(function(h,m){const g={id:h,focus:m};return t.current[h]=g,function(){const v=t.current;v[h]!==g&&delete v[h]}},[]),a=Wt(function(h){const m=zEt(e,h);m&&m!==document.activeElement&&m.focus()},[e]),s=Wt(function(h,m){n.current===h&&(n.current=m)},[]),l=Wt(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const h=n.current;h&&a(h)}))},[a]),c=Wt(function(h){n.current=null;const m=document.activeElement;m&&m.getAttribute(ev.draggableId)===h&&(n.current=h)},[]);return ts(()=>(o.current=!0,function(){o.current=!1;const h=r.current;h&&cancelAnimationFrame(h)}),[]),Kn(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function HEt(){const e={draggables:{},droppables:{}},t=[];function n(f){return t.push(f),function(){const m=t.indexOf(f);m!==-1&&t.splice(m,1)}}function r(f){t.length&&t.forEach(h=>h(f))}function o(f){return e.draggables[f]||null}function i(f){const h=o(f);return h||Et(),h}const a={register:f=>{e.draggables[f.descriptor.id]=f,r({type:"ADDITION",value:f})},update:(f,h)=>{const m=e.draggables[h.descriptor.id];m&&m.uniqueId===f.uniqueId&&(delete e.draggables[h.descriptor.id],e.draggables[f.descriptor.id]=f)},unregister:f=>{const h=f.descriptor.id,m=o(h);m&&f.uniqueId===m.uniqueId&&(delete e.draggables[h],e.droppables[f.descriptor.droppableId]&&r({type:"REMOVAL",value:f}))},getById:i,findById:o,exists:f=>!!o(f),getAllByType:f=>Object.values(e.draggables).filter(h=>h.descriptor.type===f)};function s(f){return e.droppables[f]||null}function l(f){const h=s(f);return h||Et(),h}const c={register:f=>{e.droppables[f.descriptor.id]=f},unregister:f=>{const h=s(f.descriptor.id);h&&f.uniqueId===h.uniqueId&&delete e.droppables[f.descriptor.id]},getById:l,findById:s,exists:f=>!!s(f),getAllByType:f=>Object.values(e.droppables).filter(h=>h.descriptor.type===f)};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:n,clean:u}}function UEt(){const e=Kn(HEt,[]);return x.useEffect(()=>function(){e.clean()},[e]),e}var _H=J.createContext(null),FO=()=>{const e=document.body;return e||Et(),e};const GEt={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},qEt=e=>`rfd-announcement-${e}`;function WEt(e){const t=Kn(()=>qEt(e),[e]),n=x.useRef(null);return x.useEffect(function(){const i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),z(i.style,GEt),FO().appendChild(i),function(){setTimeout(function(){const l=FO();l.contains(i)&&l.removeChild(i),i===n.current&&(n.current=null)})}},[t]),Wt(o=>{const i=n.current;if(i){i.textContent=o;return}},[])}const KEt={separator:"::"};function $H(e,t=KEt){const n=J.useId();return Kn(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function YEt({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function QEt({contextId:e,text:t}){const n=$H("hidden-text",{separator:"-"}),r=Kn(()=>YEt({contextId:e,uniqueId:n}),[n,e]);return x.useEffect(function(){const i=document.createElement("div");return i.id=r,i.textContent=t,i.style.display="none",FO().appendChild(i),function(){const s=FO();s.contains(i)&&s.removeChild(i)}},[r,t]),r}var rA=J.createContext(null);function Ohe(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),t}function XEt(){let e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&Et();const s={abandon:a};return e=s,s}function o(){e||Et(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}function BS(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const JEt=9,ZEt=13,NH=27,Ihe=32,eTt=33,tTt=34,nTt=35,rTt=36,oTt=37,iTt=38,aTt=39,sTt=40,lTt={[ZEt]:!0,[JEt]:!0};var Phe=e=>{lTt[e.keyCode]&&e.preventDefault()};const oA=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),Ahe=0,see=5;function cTt(e,t){return Math.abs(t.x-e.x)>=see||Math.abs(t.y-e.y)>=see}const lee={type:"IDLE"};function uTt({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:a,clientY:s}=o;if(i!==Ahe)return;const l={x:a,y:s},c=n();if(c.type==="DRAGGING"){o.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&Et();const u=c.point;if(!cTt(u,l))return;o.preventDefault();const f=c.actions.fluidLift(l);r({type:"DRAGGING",actions:f})}},{eventName:"mouseup",fn:o=>{const i=n();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{n().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(n().type==="PENDING"){e();return}if(o.keyCode===NH){o.preventDefault(),e();return}Phe(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=n();if(i.type==="IDLE"&&Et(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:oA,fn:e}]}function dTt(e){const t=x.useRef(lee),n=x.useRef(xf),r=Kn(()=>({eventName:"mousedown",fn:function(f){if(f.defaultPrevented||f.button!==Ahe||f.ctrlKey||f.metaKey||f.shiftKey||f.altKey)return;const h=e.findClosestDraggableId(f);if(!h)return;const m=e.tryGetLock(h,a,{sourceEvent:f});if(!m)return;f.preventDefault();const g={x:f.clientX,y:f.clientY};n.current(),c(m,g)}}),[e]),o=Kn(()=>({eventName:"webkitmouseforcewillbegin",fn:u=>{if(u.defaultPrevented)return;const f=e.findClosestDraggableId(u);if(!f)return;const h=e.findOptionsForDraggable(f);h&&(h.shouldRespectForcePress||e.canGetLock(f)&&u.preventDefault())}}),[e]),i=Wt(function(){const f={passive:!1,capture:!0};n.current=Gs(window,[o,r],f)},[o,r]),a=Wt(()=>{t.current.type!=="IDLE"&&(t.current=lee,n.current(),i())},[i]),s=Wt(()=>{const u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=Wt(function(){const f={capture:!0,passive:!1},h=uTt({cancel:s,completed:a,getPhase:()=>t.current,setPhase:m=>{t.current=m}});n.current=Gs(window,h,f)},[s,a]),c=Wt(function(f,h){t.current.type!=="IDLE"&&Et(),t.current={type:"PENDING",point:h,actions:f},l()},[l]);ts(function(){return i(),function(){n.current()}},[i])}function fTt(){}const pTt={[tTt]:!0,[eTt]:!0,[rTt]:!0,[nTt]:!0};function hTt(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===NH){o.preventDefault(),n();return}if(o.keyCode===Ihe){o.preventDefault(),r();return}if(o.keyCode===sTt){o.preventDefault(),e.moveDown();return}if(o.keyCode===iTt){o.preventDefault(),e.moveUp();return}if(o.keyCode===aTt){o.preventDefault(),e.moveRight();return}if(o.keyCode===oTt){o.preventDefault(),e.moveLeft();return}if(pTt[o.keyCode]){o.preventDefault();return}Phe(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:oA,fn:n}]}function mTt(e){const t=x.useRef(fTt),n=Kn(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Ihe)return;const a=e.findClosestDraggableId(i);if(!a)return;const s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0;const c=s.snapLift();t.current();function u(){l||Et(),l=!1,t.current(),r()}t.current=Gs(window,hTt(c,u),{capture:!0,passive:!1})}}),[e]),r=Wt(function(){const i={passive:!1,capture:!0};t.current=Gs(window,[n],i)},[n]);ts(function(){return r(),function(){t.current()}},[r])}const B$={type:"IDLE"},gTt=120,yTt=.15;function vTt({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===NH&&n.preventDefault(),e()}},{eventName:oA,fn:e}]}function bTt({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:a}=r.touches[0],s={x:i,y:a};r.preventDefault(),o.actions.move(s)}},{eventName:"touchend",fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const o=n();o.type==="IDLE"&&Et();const i=r.touches[0];if(!i||!(i.force>=yTt))return;const s=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){s&&e();return}if(s){if(o.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:oA,fn:e}]}function xTt(e){const t=x.useRef(B$),n=x.useRef(xf),r=Wt(function(){return t.current},[]),o=Wt(function(m){t.current=m},[]),i=Kn(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;const g=e.findClosestDraggableId(m);if(!g)return;const y=e.tryGetLock(g,s,{sourceEvent:m});if(!y)return;const v=m.touches[0],{clientX:w,clientY:C}=v,E={x:w,y:C};n.current(),f(y,E)}}),[e]),a=Wt(function(){const m={capture:!0,passive:!1};n.current=Gs(window,[i],m)},[i]),s=Wt(()=>{const h=t.current;h.type!=="IDLE"&&(h.type==="PENDING"&&clearTimeout(h.longPressTimerId),o(B$),n.current(),a())},[a,o]),l=Wt(()=>{const h=t.current;s(),h.type==="DRAGGING"&&h.actions.cancel({shouldBlockNextClick:!0}),h.type==="PENDING"&&h.actions.abort()},[s]),c=Wt(function(){const m={capture:!0,passive:!1},g={cancel:l,completed:s,getPhase:r},y=Gs(window,bTt(g),m),v=Gs(window,vTt(g),m);n.current=function(){y(),v()}},[l,r,s]),u=Wt(function(){const m=r();m.type!=="PENDING"&&Et();const g=m.actions.fluidLift(m.point);o({type:"DRAGGING",actions:g,hasMoved:!1})},[r,o]),f=Wt(function(m,g){r().type!=="IDLE"&&Et();const y=setTimeout(u,gTt);o({type:"PENDING",point:g,actions:m,longPressTimerId:y}),c()},[c,r,o,u]);ts(function(){return a(),function(){n.current();const g=r();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),o(B$))}},[r,a,o]),ts(function(){return Gs(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const STt=["input","button","textarea","select","option","optgroup","video","audio"];function Mhe(e,t){if(t==null)return!1;if(STt.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Mhe(e,t.parentElement)}function wTt(e,t){const n=t.target;return nA(n)?Mhe(e,n):!1}var CTt=e=>Ll(e.getBoundingClientRect()).center;function ETt(e){return e instanceof The(e).Element}const TTt=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function Rhe(e,t){return e==null?null:e[TTt](t)?e:Rhe(e.parentElement,t)}function OTt(e,t){return e.closest?e.closest(t):Rhe(e,t)}function ITt(e){return`[${ev.contextId}="${e}"]`}function PTt(e,t){const n=t.target;if(!ETt(n))return null;const r=ITt(e),o=OTt(n,r);return!o||!nA(o)?null:o}function ATt(e,t){const n=PTt(e,t);return n?n.getAttribute(ev.draggableId):null}function MTt(e,t){const n=`[${xj.contextId}="${e}"]`,o=Ehe(document,n).find(i=>i.getAttribute(xj.id)===t);return!o||!nA(o)?null:o}function RTt(e){e.preventDefault()}function aE({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function Dhe({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!(!o||!o.options.isEnabled||!xhe(t.getState(),r))}function DTt({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Dhe({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const l=r.draggable.getById(o),c=MTt(t,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&wTt(c,a))return null;const u=e.claim(i||xf);let f="PRE_DRAG";function h(){return l.options.shouldRespectForcePress}function m(){return e.isActive(u)}function g(O,P){aE({expected:O,phase:f,isLockActive:m,shouldWarn:!0})&&n.dispatch(P())}const y=g.bind(null,"DRAGGING");function v(O){function P(){e.release(),f="COMPLETED"}f!=="PRE_DRAG"&&(P(),Et()),n.dispatch(O1t(O.liftActionArgs)),f="DRAGGING";function R(D,M={shouldBlockNextClick:!1}){if(O.cleanup(),M.shouldBlockNextClick){const A=Gs(window,[{eventName:"click",fn:RTt,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(A)}P(),n.dispatch(fhe({reason:D}))}return{isActive:()=>aE({expected:"DRAGGING",phase:f,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:h,drop:D=>R("DROP",D),cancel:D=>R("CANCEL",D),...O.actions}}function w(O){const P=_S(D=>{y(()=>dhe({client:D}))});return{...v({liftActionArgs:{id:o,clientSelection:O,movementMode:"FLUID"},cleanup:()=>P.cancel(),actions:{move:P}}),move:P}}function C(){const O={moveUp:()=>y($1t),moveRight:()=>y(L1t),moveDown:()=>y(N1t),moveLeft:()=>y(F1t)};return v({liftActionArgs:{id:o,clientSelection:CTt(c),movementMode:"SNAP"},cleanup:xf,actions:O})}function E(){aE({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>aE({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:h,fluidLift:w,snapLift:C,abort:E}}const kTt=[dTt,mTt,xTt];function _Tt({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?kTt:[],...r||[]],a=x.useState(()=>XEt())[0],s=Wt(function(v,w){BS(v)&&!BS(w)&&a.tryAbandon()},[a]);ts(function(){let v=t.getState();return t.subscribe(()=>{const C=t.getState();s(v,C),v=C})},[a,t,s]),ts(()=>a.tryAbandon,[a.tryAbandon]);const l=Wt(y=>Dhe({lockAPI:a,registry:n,store:t,draggableId:y}),[a,n,t]),c=Wt((y,v,w)=>DTt({lockAPI:a,registry:n,contextId:e,store:t,draggableId:y,forceSensorStop:v||null,sourceEvent:w&&w.sourceEvent?w.sourceEvent:null}),[e,a,n,t]),u=Wt(y=>ATt(e,y),[e]),f=Wt(y=>{const v=n.draggable.findById(y);return v?v.options:null},[n.draggable]),h=Wt(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(IH()))},[a,t]),m=Wt(()=>a.isClaimed(),[a]),g=Kn(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:f,tryReleaseLock:h,isLockClaimed:m}),[l,c,u,f,h,m]);for(let y=0;y<i.length;y++)i[y](g)}const $Tt=e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};ew.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),NTt=e=>({...jS,...e.autoScrollerOptions,durationDampening:{...jS.durationDampening,...e.autoScrollerOptions}});function O0(e){return e.current||Et(),e.current}function LTt(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=x.useRef(null),s=Ohe(e),l=Wt(()=>$Tt(s.current),[s]),c=Wt(()=>NTt(s.current),[s]),u=WEt(t),f=QEt({contextId:t,text:i}),h=BEt(t,o),m=Wt(A=>{O0(a).dispatch(A)},[]),g=Kn(()=>_Z({publishWhileDragging:P1t,updateDroppableScroll:M1t,updateDroppableIsEnabled:R1t,updateDroppableIsCombineEnabled:D1t,collectionStarting:A1t},m),[m]),y=UEt(),v=Kn(()=>vEt(y,g),[y,g]),w=Kn(()=>$Et({scrollWindow:bEt,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:c,..._Z({move:dhe},m)}),[v.scrollDroppable,m,c]),C=VEt(t),E=Kn(()=>hEt({announce:u,autoScroller:w,dimensionMarshal:v,focusMarshal:C,getResponders:l,styleMarshal:h}),[u,w,v,C,l,h]);a.current=E;const I=Wt(()=>{const A=O0(a);A.getState().phase!=="IDLE"&&A.dispatch(IH())},[]),O=Wt(()=>{const A=O0(a).getState();return A.phase==="DROP_ANIMATING"?!0:A.phase==="IDLE"?!1:A.isDragging},[]),P=Kn(()=>({isDragging:O,tryAbort:I}),[O,I]);n(P);const R=Wt(A=>xhe(O0(a).getState(),A),[]),D=Wt(()=>Rp(O0(a).getState()),[]),M=Kn(()=>({marshal:v,focus:C,contextId:t,canLift:R,isMovementAllowed:D,dragHandleUsageInstructionsId:f,registry:y}),[t,v,f,C,R,D,y]);return _Tt({contextId:t,store:E,registry:y,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),x.useEffect(()=>I,[I]),J.createElement(rA.Provider,{value:M},J.createElement(uCt,{context:_H,store:E},e.children))}function FTt(){return J.useId()}function khe(e){const t=FTt(),n=e.dragHandleUsageInstructions||LE.dragHandleUsageInstructions;return J.createElement(mCt,null,r=>J.createElement(LTt,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const cee={dragging:5e3,dropAnimating:4500},jTt=(e,t)=>t?yx.drop(t.duration):e?yx.snap:yx.fluid,BTt=(e,t)=>{if(e)return t?FS.opacity.drop:FS.opacity.combining},zTt=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function VTt(e){const n=e.dimension.client,{offset:r,combineWith:o,dropping:i}=e,a=!!o,s=zTt(e),l=!!i,c=l?vj.drop(r,a):vj.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:jTt(s,i),transform:c,opacity:BTt(a,l),zIndex:l?cee.dropAnimating:cee.dragging,pointerEvents:"none"}}function HTt(e){return{transform:vj.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function UTt(e){return e.type==="DRAGGING"?VTt(e):HTt(e)}function GTt(e,t,n=ci){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=jpe(o,r),a=_O(i,n),s={client:i,tagName:t.tagName.toLowerCase(),display:r.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:s,displaceBy:l,client:i,page:a}}function qTt(e){const t=$H("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Kn(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=Wt(m=>{const g=o();return g||Et(),GTt(n,g,m)},[n,o]),u=Kn(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),f=x.useRef(u),h=x.useRef(!0);ts(()=>(r.draggable.register(f.current),()=>r.draggable.unregister(f.current)),[r.draggable]),ts(()=>{if(h.current){h.current=!1;return}const m=f.current;f.current=u,r.draggable.update(u,m)},[u,r.draggable])}var LH=J.createContext(null);function jO(e){const t=x.useContext(e);return t||Et(),t}function WTt(e){e.preventDefault()}const KTt=e=>{const t=x.useRef(null),n=Wt((P=null)=>{t.current=P},[]),r=Wt(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=jO(rA),{type:s,droppableId:l}=jO(LH),c=Kn(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:u,draggableId:f,isEnabled:h,shouldRespectForcePress:m,canDragInteractiveElements:g,isClone:y,mapped:v,dropAnimationFinished:w}=e;if(!y){const P=Kn(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:m,isEnabled:h}),[c,a,r,g,m,h]);qTt(P)}const C=Kn(()=>h?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":f,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:WTt}:null,[o,i,f,h]),E=Wt(P=>{v.type==="DRAGGING"&&v.dropping&&P.propertyName==="transform"&&ew.flushSync(w)},[w,v]),I=Kn(()=>{const P=UTt(v),R=v.type==="DRAGGING"&&v.dropping?E:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":f,style:P,onTransitionEnd:R},dragHandleProps:C}},[o,C,f,v,E,n]),O=Kn(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return J.createElement(J.Fragment,null,u(I,v.snapshot,O))};var _he=(e,t)=>e===t,$he=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const YTt=e=>e.combine?e.combine.draggableId:null,QTt=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function XTt(){const e=li((o,i)=>({x:o,y:i})),t=li((o,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:o,draggingOver:a,combineWith:s,combineTargetFor:null})),n=li((o,i,a,s,l=null,c=null,u=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:o,dimension:a,forceShouldAnimate:u,snapshot:t(i,s,l,c,null)}}));return(o,i)=>{if(BS(o)){if(o.critical.draggable.id!==i.draggableId)return null;const a=o.current.client.offset,s=o.dimensions.draggables[i.draggableId],l=es(o.impact),c=QTt(o.impact),u=o.forceShouldAnimate;return n(e(a.x,a.y),o.movementMode,s,i.isClone,l,c,u)}if(o.phase==="DROP_ANIMATING"){const a=o.completed;if(a.result.draggableId!==i.draggableId)return null;const s=i.isClone,l=o.dimensions.draggables[i.draggableId],c=a.result,u=c.mode,f=$he(c),h=YTt(c),g={duration:o.dropDuration,curve:AH.drop,moveTo:o.newHomeClientOffset,opacity:h?FS.opacity.drop:null,scale:h?FS.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:l,dropping:g,draggingOver:f,combineWith:h,mode:u,forceShouldAnimate:null,snapshot:t(u,s,f,h,g)}}}return null}}function Nhe(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const JTt={mapped:{type:"SECONDARY",offset:ci,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Nhe(null)}};function ZTt(){const e=li((a,s)=>({x:a,y:s})),t=li(Nhe),n=li((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:t(s)}})),r=a=>a?n(ci,a,!0):null,o=(a,s,l,c)=>{const u=l.displaced.visible[a],f=!!(c.inVirtualList&&c.effected[a]),h=ZP(l),m=h&&h.draggableId===a?s:null;if(!u){if(!f)return r(m);if(l.displaced.invisible[a])return null;const v=Wv(c.displacedBy.point),w=e(v.x,v.y);return n(w,m,!0)}if(f)return r(m);const g=l.displacedBy.point,y=e(g.x,g.y);return n(y,m,u.shouldAnimate)};return(a,s)=>{if(BS(a))return a.critical.draggable.id===s.draggableId?null:o(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const l=a.completed;return l.result.draggableId===s.draggableId?null:o(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const eOt=()=>{const e=XTt(),t=ZTt();return(r,o)=>e(r,o)||t(r,o)||JTt},tOt={dropAnimationFinished:phe},nOt=Fpe(eOt,tOt,null,{context:_H,areStatePropsEqual:_he})(KTt);function Lhe(e){return jO(LH).isUsingCloneFor===e.draggableId&&!e.isClone?null:J.createElement(nOt,e)}function Fhe(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return J.createElement(Lhe,z({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const jhe=e=>t=>e===t,rOt=jhe("scroll"),oOt=jhe("auto"),uee=(e,t)=>t(e.overflowX)||t(e.overflowY),iOt=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return uee(n,rOt)||uee(n,oOt)},aOt=()=>!1,Bhe=e=>e==null?null:e===document.body?aOt()?e:null:e===document.documentElement?null:iOt(e)?e:Bhe(e.parentElement);var Sj=e=>({x:e.scrollLeft,y:e.scrollTop});const zhe=e=>e?window.getComputedStyle(e).position==="fixed"?!0:zhe(e.parentElement):!1;var sOt=e=>{const t=Bhe(e),n=zhe(e);return{closestScrollable:t,isFixedOnPage:n}},lOt=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:h,client:m}=s,g=yhe({scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:m,scrollSize:h,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:g,diff:{value:ci,displacement:ci}}}})(),c=o==="vertical"?wH:Qpe,u=Jy({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:u}};const cOt=(e,t)=>{const n=Bpe(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,l=vH({top:r,right:a,bottom:i,left:o},n.border);return bH({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})};var uOt=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=cOt(e,l),u=_O(c,r),f=(()=>{if(!l)return null;const m=Bpe(l),g={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:m,page:_O(m,r),scroll:Sj(l),scrollSize:g,shouldClipSubject:s}})();return lOt({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:u,closest:f})};const dOt={passive:!1},fOt={passive:!0};var dee=e=>e.shouldPublishImmediately?dOt:fOt;const sE=e=>e&&e.env.closestScrollable||null;function pOt(e){const t=x.useRef(null),n=jO(rA),r=$H("droppable"),{registry:o,marshal:i}=n,a=Ohe(e),s=Kn(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=x.useRef(s),c=Kn(()=>li((I,O)=>{t.current||Et();const P={x:I,y:O};i.updateDroppableScroll(s.id,P)}),[s.id,i]),u=Wt(()=>{const I=t.current;return!I||!I.env.closestScrollable?ci:Sj(I.env.closestScrollable)},[]),f=Wt(()=>{const I=u();c(I.x,I.y)},[u,c]),h=Kn(()=>_S(f),[f]),m=Wt(()=>{const I=t.current,O=sE(I);if(I&&O||Et(),I.scrollOptions.shouldPublishImmediately){f();return}h()},[h,f]),g=Wt((I,O)=>{t.current&&Et();const P=a.current,R=P.getDroppableRef();R||Et();const D=sOt(R),M={ref:R,descriptor:s,env:D,scrollOptions:O};t.current=M;const A=uOt({ref:R,descriptor:s,env:D,windowScroll:I,direction:P.direction,isDropDisabled:P.isDropDisabled,isCombineEnabled:P.isCombineEnabled,shouldClipSubject:!P.ignoreContainerClipping}),_=D.closestScrollable;return _&&(_.setAttribute(iee.contextId,n.contextId),_.addEventListener("scroll",m,dee(M.scrollOptions))),A},[n.contextId,s,m,a]),y=Wt(()=>{const I=t.current,O=sE(I);return I&&O||Et(),Sj(O)},[]),v=Wt(()=>{const I=t.current;I||Et();const O=sE(I);t.current=null,O&&(h.cancel(),O.removeAttribute(iee.contextId),O.removeEventListener("scroll",m,dee(I.scrollOptions)))},[m,h]),w=Wt(I=>{const O=t.current;O||Et();const P=sE(O);P||Et(),P.scrollTop+=I.y,P.scrollLeft+=I.x},[]),C=Kn(()=>({getDimensionAndWatchScroll:g,getScrollWhileDragging:y,dragStopped:v,scroll:w}),[v,g,y,w]),E=Kn(()=>({uniqueId:r,descriptor:s,callbacks:C}),[C,s,r]);ts(()=>(l.current=E.descriptor,o.droppable.register(E),()=>{t.current&&v(),o.droppable.unregister(E)}),[C,s,v,E,i,o.droppable]),ts(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),ts(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function z$(){}const fee={width:0,height:0,margin:wCt},hOt=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?fee:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},mOt=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=hOt({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?yx.placeholder:null}},gOt=e=>{const t=x.useRef(null),n=Wt(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=x.useState(e.animate==="open");x.useEffect(()=>s?r!=="open"?(n(),l(!1),z$):t.current?z$:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):z$,[r,s,n]);const c=Wt(f=>{f.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),u=mOt({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return J.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var yOt=J.memo(gOt);class vOt extends J.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const bOt=e=>{const t=x.useContext(rA);t||Et();const{contextId:n,isMovementAllowed:r}=t,o=x.useRef(null),i=x.useRef(null),{children:a,droppableId:s,type:l,mode:c,direction:u,ignoreContainerClipping:f,isDropDisabled:h,isCombineEnabled:m,snapshot:g,useClone:y,updateViewportMaxScroll:v,getContainerForClone:w}=e,C=Wt(()=>o.current,[]),E=Wt((_=null)=>{o.current=_},[]);Wt(()=>i.current,[]);const I=Wt((_=null)=>{i.current=_},[]),O=Wt(()=>{r()&&v({maxScroll:bhe()})},[r,v]);pOt({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:h,isCombineEnabled:m,ignoreContainerClipping:f,getDroppableRef:C});const P=Kn(()=>J.createElement(vOt,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:_,data:N,animate:B})=>J.createElement(yOt,{placeholder:N,onClose:_,innerRef:I,animate:B,contextId:n,onTransitionEnd:O})),[n,O,e.placeholder,e.shouldAnimatePlaceholder,I]),R=Kn(()=>({innerRef:E,placeholder:P,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,P,E]),D=y?y.dragging.draggableId:null,M=Kn(()=>({droppableId:s,type:l,isUsingCloneFor:D}),[s,D,l]);function A(){if(!y)return null;const{dragging:_,render:N}=y,B=J.createElement(Lhe,{draggableId:_.draggableId,index:_.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(H,j)=>N(H,j,_));return D0.createPortal(B,w())}return J.createElement(LH.Provider,{value:M},a(R,g),A())};function xOt(){return document.body||Et(),document.body}const pee={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:xOt},Vhe=e=>{let t={...e},n;for(n in pee)e[n]===void 0&&(t={...t,[n]:pee[n]});return t},V$=(e,t)=>e===t.droppable.type,hee=(e,t)=>t.draggables[e.draggable.id],SOt=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=li(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=li((i,a,s,l,c,u)=>{const f=c.descriptor.id;if(c.descriptor.droppableId===i){const g=u?{render:u,dragging:n(c.descriptor)}:null,y={isDraggingOver:s,draggingOverWith:s?f:null,draggingFromThisWith:f,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:y,useClone:g}}if(!a)return t;if(!l)return e;const m={isDraggingOver:s,draggingOverWith:f,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(i,a)=>{const s=Vhe(a),l=s.droppableId,c=s.type,u=!s.isDropDisabled,f=s.renderClone;if(BS(i)){const h=i.critical;if(!V$(c,h))return t;const m=hee(h,i.dimensions),g=es(i.impact)===l;return r(l,u,g,g,m,f)}if(i.phase==="DROP_ANIMATING"){const h=i.completed;if(!V$(c,h.critical))return t;const m=hee(h.critical,i.dimensions);return r(l,u,$he(h.result)===l,es(h.impact)===l,m,f)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const h=i.completed;if(!V$(c,h.critical))return t;const m=es(h.impact)===l,g=!!(h.impact.at&&h.impact.at.type==="COMBINE"),y=h.critical.droppable.id===l;return m?g?e:t:y?e:t}return t}},wOt={updateViewportMaxScroll:_1t},Hhe=Fpe(SOt,wOt,(e,t,n)=>({...Vhe(n),...e,...t}),{context:_H,areStatePropsEqual:_he})(bOt);let mee=!1;const COt=()=>{mee||(console.warn(["MUI: The LoadingButton component functionality is now part of the Button component from Material UI.","","You should use `import Button from '@mui/material/Button'`","or `import { Button } from '@mui/material'`"].join(`
-`)),mee=!0)},EOt=x.forwardRef(function(t,n){return COt(),k.jsx(ct,{ref:n,...t})}),TOt=e=>{const{t}=je(),n=ost(e.routineId),r=sst(e.routineId),[o,i]=x.useState(!1),[a,s]=x.useState(!1),[l,c]=x.useState(e.day.isRest),u=()=>{l?(c(!1),I({isRest:!1})):s(!0)},f=()=>s(!1),h=()=>{I({isRest:!l}),c(!l),s(!1)},m=()=>i(!0),g=()=>{e.setSelectedDayIndex(null),r.mutate(e.day.id),i(!1)},y=()=>i(!1),v=3,w=20,C=1e3,E=Wo().shape({name:Ho().max(w,t("forms.maxLength",{chars:w})).min(v,t("forms.minLength",{chars:v})).required("Name is required"),description:Ho().max(C,t("forms.maxLength",{chars:C})),isRest:Lu(),needsLogsToAdvance:Lu()}),I=O=>n.mutate({id:e.day.id,routine:e.routineId,...O.name!==void 0&&{name:O.name},...O.description!==void 0&&{description:O.description},...O.isRest!==void 0&&{is_rest:l},...O.needsLogsToAdvance!==void 0&&{need_logs_to_advance:O.needsLogsToAdvance}});return S(Tt,{children:S(Ti,{initialValues:{name:e.day.name,description:e.day.description,isRest:e.day.isRest,needsLogsToAdvance:e.day.needLogsToAdvance},validationSchema:E,onSubmit:(O,{setSubmitting:P})=>{I(O),P(!1)},initialTouched:{name:!0,description:!0,isRest:!0,needsLogsToAdvance:!0},children:O=>Q(fi,{children:[Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:6},children:S(Xu,{fieldName:"name",title:"Name",fieldProps:{disabled:l}})}),S(me,{size:{xs:6,sm:2},children:S(os,{control:S(qo,{checked:l,onChange:u}),label:t("routines.restDay")})}),Q(me,{size:{xs:6,sm:4},children:[S(os,{disabled:l,control:S(qo,{checked:O.values.needsLogsToAdvance,...O.getFieldProps("needsLogsToAdvance")}),label:t("routines.needsLogsToAdvance")}),S(Go,{title:t("routines.needsLogsToAdvanceHelpText"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]}),S(me,{size:12,children:S(Xu,{fieldName:"description",title:"Description",fieldProps:{multiline:!0,rows:4,disabled:l}})}),Q(me,{size:8,children:[n.isPending?S(EOt,{loading:!0,variant:"contained",color:"primary",children:t("save")}):S(ct,{variant:"contained",color:"primary",type:"submit",disabled:l,children:t("save")})," ",S(ct,{variant:"outlined",startIcon:S(MP,{}),onClick:m,disabled:n.isPending,children:t("delete")})]}),S(me,{size:4,sx:{display:"flex",justifyContent:"flex-end"},children:S(owt,{routineId:e.routineId})})]}),Q(Ix,{open:a,onClose:f,children:[S(ZE,{children:t("routines.confirmRestDay")}),S(Ax,{children:t("routines.confirmRestDayHelpText")}),Q(Px,{children:[S(ct,{onClick:f,children:t("cancel")}),S(ct,{onClick:h,children:t("continue")})]})]}),S(XP,{title:t("deleteConfirmation",{name:e.day.getDisplayName()}),message:t("routines.deleteDayConfirmation"),isOpen:o,closeFn:y,deleteFn:g})]})})})},OOt=e=>{const{t}=je(),n=gst(e.routineId),[r,o]=x.useState(e.slot.comment),[i,a]=x.useState(!1),s=c=>{a(!0),o(c)},l=()=>{i&&(n.mutate({id:e.slot.id,comment:r}),a(!1))};return S(Tt,{children:S(dn,{label:t("comment"),variant:"standard",fullWidth:!0,size:"small",value:r,disabled:n.isPending,onChange:c=>s(c.target.value),onBlur:l,InputProps:{endAdornment:n.isPending&&S(gh,{})}})})};function Uhe(e){const t=[];if(!e)return t;for(const n in e)Object.hasOwn(e,n)&&t.push(...e[n]);return t}function H$(e){const t=Uhe(e);return t.length>0?t.join(" | "):""}const IOt={weight:{edit:kat,add:_at,delete:$at},"max-weight":{edit:Nat,add:Lat,delete:Fat},reps:{edit:jat,add:Bat,delete:zat},"max-reps":{edit:Vat,add:YX,delete:Hat},sets:{edit:Uat,add:Gat,delete:qat},"max-sets":{edit:Wat,add:Kat,delete:YX},rest:{edit:Jat,add:Zat,delete:est},"max-rest":{edit:tst,add:nst,delete:rst},rir:{edit:Yue,add:Que,delete:Xue},"max-rir":{edit:Yat,add:Qat,delete:Xat}},gee=e=>{var P,R,D,M,A,_,N;const{t}=je(),{edit:n,add:r,delete:o}=IOt[e.type],i=n(e.routineId),a=r(e.routineId),s=o(e.routineId),[l,c]=x.useState(((P=e.config)==null?void 0:P.value)||""),[u,f]=x.useState(null),[h,m]=x.useState(null),g=["sets","max-sets","rest","max-rest"].includes(e.type),y=g?parseInt:parseFloat;let v="";switch(e.type){case"weight":v=t("weight");break;case"max-weight":v="max "+t("weight");break;case"reps":v=t("server.repetitions");break;case"max-reps":v=t("server.max_reps");break;case"sets":v=t("routines.sets");break;case"max-sets":v="max "+t("routines.sets");break;case"rest":v=t("routines.restTime");break;case"max-rest":v="max "+t("routines.restTime");break;case"rir":v=t("routines.rir");break;case"max-rir":v="max "+t("routines.rir");break}const w=B=>{const H={slot_entry:e.slotEntryId,value:y(B)};B===""&&e.config?s.mutate(e.config.id):e.config?i.mutate({id:e.config.id,...H}):a.mutate({iteration:1,operation:Qi,step:"abs",requirements:null,...H})},C=B=>{if(c(B),B!==""&&Number.isNaN(y(B))){f(t(g?"forms.enterInteger":"forms.enterNumber"));return}else f(null);h&&clearTimeout(h),m(setTimeout(()=>w(B),$re))},E=i.isPending||a.isPending||s.isPending,I=i.isError||a.isError||s.isError,O=H$((D=(R=i.error)==null?void 0:R.response)==null?void 0:D.data)||H$((A=(M=a.error)==null?void 0:M.response)==null?void 0:A.data)||H$((N=(_=s.error)==null?void 0:_.response)==null?void 0:N.data);return S(dn,{slotProps:{input:{endAdornment:E&&S(gh,{})}},inputProps:{"data-testid":`${e.type}-field`},label:v,value:l,fullWidth:!0,variant:"standard",disabled:E,onChange:B=>C(B.target.value),error:!!u||I,helperText:u||O})},POt=e=>{const{setFieldValue:t}=AV(),{t:n}=je(),r=e.disabled??!1,[o,i]=x.useState(e.values),[a,s]=J.useState(null),l=u=>{o.includes(u)?i(o.filter(f=>f!==u)):i([...o,u])},c=async()=>{await t(e.fieldName,o),s(null)};return Q(Tt,{children:[S(pn,{disabled:r,onClick:u=>s(u.currentTarget),children:a?S(Tst,{fontSize:"small"}):S(Jst,{fontSize:"small"})}),Q(ss,{anchorEl:a,open:!!a,onClose:()=>s(null),children:[...JN.map((u,f)=>Q(Jt,{onClick:()=>l(u),children:[S(nl,{children:o.includes(u)?S(Rst,{fontSize:"small"}):S(Dst,{fontSize:"small"})}),S(Wr,{children:u})]},f)),S(ji,{}),S(Jt,{children:S(ct,{color:"primary",variant:"contained",type:"submit",size:"small",onClick:c,children:n("save")})})]})]})},AOt=e=>{var i;const t=Yue(e.routineId),n=Xue(e.routineId),r=Que(e.routineId),o=a=>{const s={value:parseFloat(a)};a===""&&e.config?n.mutate(e.config.id):e.config!==void 0?t.mutate({id:e.config.id,...s}):r.mutate({slot_entry:e.slotEntryId,iteration:1,operation:Qi,...s})};return S(dn,{fullWidth:!0,select:!0,label:"RiR",variant:"standard",defaultValue:"",value:(i=e.config)==null?void 0:i.value,disabled:t.isPending,onChange:a=>o(a.target.value),children:Hre.map(a=>S(Jt,{value:a.value,children:a.label},a.value))})};function MOt(e){let t="";for(;e>0;)e--,t=String.fromCharCode(97+e%26)+t,e=Math.floor(e/26);return t}const wl=(e,t,n,r)=>t.length>0?S(gee,{config:t[0],type:e,routineId:n}):S(gee,{type:e,routineId:n,slotEntryId:r}),ROt=e=>{const{t}=je();return Q(Tt,{children:[e.slot.entries.length===0&&Q(Ci,{severity:"warning",children:[S(fh,{children:t("routines.setHasNoExercises")}),t("nothingHereYetAction")]}),e.slot.entries.map((n,r)=>S(DOt,{slotEntry:n,routineId:e.routineId,simpleMode:e.simpleMode,index:r,total:e.slot.entries.length},n.id))]})},DOt=e=>{var g;const{t,i18n:n}=je(),[r,o]=x.useState(!1),i=()=>o(!r),a=Yc(),s=Nw(e.routineId),l=fst(e.routineId),c=s.isPending||l.isPending,u=y=>{y!==null&&(s.mutate({id:e.slotEntry.id,exercise:y.data.base_id}),o(!1))};let f;a.isSuccess&&(f=Gu(n.language,a.data));const h=()=>e.simpleMode?Q(J.Fragment,{children:[S(me,{size:{xs:12,sm:2},children:wl("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)},`sets-config-${e.slotEntry.id}`),S(me,{size:{xs:12,sm:3},children:wl("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)},`weight-config-${e.slotEntry.id}`),S(me,{size:{xs:12,sm:3},children:wl("reps",e.slotEntry.repetitionsConfigs,e.routineId,e.slotEntry.id)},`reps-config-${e.slotEntry.id}`)]}):Q(J.Fragment,{children:[S(me,{size:{xs:6,sm:1},children:wl("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:1},children:wl("max-sets",e.slotEntry.maxNrOfSetsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},children:S(ewt,{routineId:e.routineId,slotEntry:e.slotEntry})}),S(me,{size:{xs:12,sm:2},children:S(AOt,{routineId:e.routineId,config:e.slotEntry.rirConfigs.length>0?e.slotEntry.rirConfigs[0]:void 0,slotEntryId:e.slotEntry.id})}),S(me,{size:{xs:6,sm:1},children:wl("rest",e.slotEntry.restTimeConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:1},children:wl("max-rest",e.slotEntry.maxRestTimeConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},offset:{sm:4},children:wl("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},children:wl("max-weight",e.slotEntry.maxWeightConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:12,sm:4},children:S(nwt,{slotEntry:e.slotEntry,routineId:e.routineId})}),S(me,{size:{xs:6,sm:2},offset:{sm:4},children:wl("reps",e.slotEntry.repetitionsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},children:wl("max-reps",e.slotEntry.maxRepetitionsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:12,sm:4},children:S(twt,{slotEntry:e.slotEntry,routineId:e.routineId})})]}),m=e.total>1?MOt(e.index+1)+") ":"";return S(J.Fragment,{children:Q(me,{container:!0,paddingTop:1,spacing:1,children:[Q(me,{size:{xs:3,sm:1},alignContent:"center",children:[S(pn,{size:"small",onClick:i,disabled:c,children:r?S(Fst,{}):S(DV,{})}),S(pn,{size:"small",onClick:()=>l.mutate(e.slotEntry.id),disabled:c,children:S(OS,{})})]}),S(me,{size:{xs:9,sm:3},alignContent:"center",children:Q(at,{variant:"body1",children:[m," ",(g=e.slotEntry.exercise)==null?void 0:g.getTranslation(f).name]})}),r&&Q(J.Fragment,{children:[S(me,{size:{xs:12,sm:8},children:S(Wy,{callback:u})}),S(me,{size:{xs:12,sm:4}})]}),e.slotEntry.hasProgressionRules?S(me,{size:8,children:S(Ci,{severity:"info",variant:"standard",sx:{mt:2},children:t("routines.exerciseHasProgression")})}):h()]})})},kOt=e=>{const{t}=je(),n=Kc(e.routineId),r=ist(e.routineId),o=ast(e.routineId),i=u=>({background:u?"lightblue":void 0}),a=(u,f)=>({backgroundColor:"white",margin:4,...f,opacity:1}),s=()=>{e.setSelectedDayIndex(null)},l=u=>{if(!u.destination)return;const f=Array.from(n.data.days),[h]=f.splice(u.source.index,1);f.splice(u.destination.index,0,h),e.setSelectedDayIndex(u.destination.index),n.data.days=f,r.mutate(f.map((m,g)=>({id:m.id,order:g+1})))},c=async()=>{const u={routine:e.routineId,name:`${t("routines.newDay")} ${n.data.days.length+1}`,order:n.data.days.length+1,is_rest:!1,need_logs_to_advance:!1};await o.mutateAsync(u),e.setSelectedDayIndex(n.data.days.length)};return n.isLoading?S(Er,{}):Q(me,{container:!0,direction:"row",spacing:1,children:[S(me,{size:12,children:S(Ft,{direction:"row",children:Q(khe,{onDragEnd:l,onDragStart:s,children:[S(Hhe,{droppableId:"dayDroppable",direction:"horizontal",children:(u,f)=>Q(Fne,{ref:u.innerRef,...u.droppableProps,value:e.selectedDayIndex,variant:"scrollable",scrollButtons:"auto",style:i(f.isDraggingOver),children:[n.data.days.map((h,m)=>S(Fhe,{draggableId:h.id.toString(),index:m,children:(g,y)=>S(DN,{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,style:a(y.isDragging,g.draggableProps.style??{}),label:h.getDisplayName(),value:h.id,icon:S(tde,{}),iconPosition:"start",onClick:()=>e.setSelectedDayIndex(m)})},h.id)),u.placeholder]})}),S(ct,{startIcon:o.isPending?S(gh,{}):S(Ko,{}),onClick:c,disabled:o.isPending,children:t("routines.addDay")})]})})}),n.data.days.length===0&&S(me,{size:12,children:Q(Ci,{severity:"info",children:[S(fh,{children:t("routines.routineHasNoDays")}),t("nothingHereYetAction")]})})]})},_Ot=e=>{const[t,n]=je(),r=vst(e.routineId),o=dst(e.routineId),i=mst(e.routineId),a=yst(e.routineId),s=Ra(),l=Lr(),[c,u]=x.useState(!1),[f,h]=x.useState(null),[m,g]=x.useState(null),[y,v]=x.useState(!0),w=(M,A)=>{m!==null&&(A==="timeout"?(r.mutate(m.id),g(null)):A!=="clickaway"&&(e.day.slots=[...e.day.slots,m].sort((_,N)=>_.order-N.order),g(null))),u(!1)},C=M=>{const A=e.day.slots.findIndex(_=>_.id===M);if(A!==-1){const _=[...e.day.slots],[N]=_.splice(A,1);e.day.slots=_,g(N),u(!0)}},E=M=>{if(e.day.slots.find(_=>_.id===M)===void 0){console.info(`Could not find slot with id ${M} to add config`);return}h(f===M?null:M)},I=()=>i.mutate({day:e.day.id,order:e.day.slots.length+1}),O=8,P=M=>{if(!M.destination)return;const A=Array.from(e.day.slots),[_]=A.splice(M.source.index,1);A.splice(M.destination.index,0,_),a.mutate(A.map((N,B)=>({id:N.id,order:B+1}))),e.day.slots=A},R=M=>({background:M?"lightblue":void 0}),D=(M,A)=>({border:M?`1px solid ${l.palette.grey[900]}`:`1px solid ${l.palette.grey[300]}`,backgroundColor:"white",marginBottom:O,...A});return Q(Tt,{children:[S(TOt,{routineId:e.routineId,day:e.day,setSelectedDayIndex:e.setSelectedDayIndex},`day-form-${e.day.id}`),!e.day.isRest&&e.day.slots.length>0&&Q(Tt,{children:[S(Zt,{height:40}),S(os,{control:S(qo,{checked:y,onChange:()=>v(!y)}),label:t("routines.simpleMode")})]}),S(Zt,{height:20}),S(khe,{onDragEnd:P,children:S(Hhe,{droppableId:"setDroppable",direction:"vertical",children:(M,A)=>S("div",{...M.droppableProps,ref:M.innerRef,style:R(A.isDraggingOver),children:e.day.slots.map((_,N)=>Q(J.Fragment,{children:[S(Fhe,{draggableId:_.id.toString(),index:N,children:(B,H)=>Q(me,{container:!0,padding:1,ref:B.innerRef,...B.draggableProps,style:D(H.isDragging,B.draggableProps.style??{}),children:[S(me,{sx:{backgroundColor:l.palette.common.white},size:12,children:Q(me,{container:!0,justifyContent:"space-between",alignItems:"center",children:[S(me,{children:Q(at,{variant:"h6",children:[S(pn,{...B.dragHandleProps,children:S(tde,{})}),S(pn,{onClick:()=>C(_.id),children:S(MP,{})}),_.entries.length>1?t("routines.supersetNr",{number:N+1}):t("routines.exerciseNr",{number:N+1})]})}),S(me,{children:_.entries.length>0&&Q(sB,{variant:"outlined",children:[S(ct,{onClick:()=>E(_.id),size:"small",disabled:o.isPending,startIcon:o.isPending?S(gh,{}):S(Ko,{}),children:t("routines.addSuperset")}),_.entries.length>0&&S(ct,{startIcon:S(elt,{}),component:Ro,size:"small",to:cn(Qt.ROUTINE_EDIT_PROGRESSION,n.language,{id:e.routineId,id2:_.id}),children:t("routines.editProgression")})]})})]})}),!y&&Q(me,{size:12,children:[S(OOt,{routineId:e.routineId,slot:_},`slot-form-${_.id}`),S(Zt,{height:10})]}),S(me,{size:12,children:S(ROt,{slot:_,routineId:e.routineId,simpleMode:y})}),(f===_.id||_.entries.length===0)&&Q(me,{size:12,children:[S(Zt,{height:20}),S(Wy,{callback:j=>{j!==null&&(o.mutate({slot:_.id,exercise:j.data.base_id,type:"normal",order:_.entries.length+1,weight_unit:s.data.useMetric?o2e:i2e}),h(null))}})]})]})},_.id),S(Zt,{height:0,children:M.placeholder})]},`slot-${_.id}-${N}`))})})}),S(dI,{open:c,autoHideDuration:EI,onClose:w,children:S(Ci,{severity:"success",variant:"filled",sx:{width:"100%"},action:S(ct,{color:"warning",variant:"contained",size:"small",onClick:w,children:t("undo")}),children:"Set successfully deleted"})}),!e.day.isRest&&S(ct,{variant:"contained",color:"primary",startIcon:i.isPending?S(gh,{}):S(Ko,{}),onClick:I,children:t("routines.addExercise")})]})},$Ot=()=>{var c;const{t:e,i18n:t}=je(),n=Lr(),r=Ra(),o=Ma(),i=o.routineId?parseInt(o.routineId):0,a=Kc(i),[s,l]=x.useState(null);return a.isLoading||r.isLoading?S(Er,{}):a.isError?Q("p",{children:["Error: ",a.error.message]}):(s===null&&a.data.days.length>0&&l(0),Q(Vw,{title:e("editName",{name:(c=a.data)==null?void 0:c.name}),backToUrl:cn(Qt.ROUTINE_DETAIL,t.language,{id:i}),children:[Q(me,{container:!0,children:[S(me,{size:12,children:S(mH,{routine:a.data})}),Q(me,{size:12,children:[S(Zt,{height:20}),S(kOt,{routineId:i,selectedDayIndex:s,setSelectedDayIndex:l})]}),s!==null&&S(Tt,{children:S(me,{size:12,sx:{backgroundColor:n.palette.grey[100],padding:1},children:S(Zt,{children:S(_Ot,{day:a.data.days[s],routineId:i,setSelectedDayIndex:l})})})})]}),a.data.days.length>0&&Q(Ft,{spacing:2,sx:{mt:2},children:[S(Zt,{height:40}),S(at,{variant:"h4",children:e("routines.resultingRoutine")}),S(ji,{}),Q(Zt,{children:[S(Rct,{}),S(Zt,{height:20}),S(Mpe,{routine:a.data})]})]})]}))},NOt=({initialSession:e,dayId:t,routineId:n,selectedDate:r,setSelectedDate:o})=>{let i;const[a,s]=je(),[l,c]=J.useState(e),u=xst(),f=wst(l==null?void 0:l.id),h=bst(n,{routine:n,date:Zn(r.toJSDate()),day:t}),m=u.isPending||f.isPending||h.isLoading,g=Wo({notes:Ho().max(Wq,a("forms.maxLength",{chars:Wq})),date:Xs().required(),start:Xs().nullable(),end:Xs().nullable().min(AP("start"),a("forms.endBeforeStart")),fitInWeek:Lu()});return x.useEffect(()=>{h.data?(i.setValues({notes:h.data.notes||"",impression:h.data.impression||cg,date:h.data.date,start:h.data.timeStart?xt.fromJSDate(h.data.timeStart):null,end:h.data.timeEnd?xt.fromJSDate(h.data.timeEnd):null}),c(h.data)):h.isSuccess&&!h.data&&(i.setValues({notes:"",impression:cg,date:(e==null?void 0:e.date)||xt.now().toJSDate(),start:e!=null&&e.timeStart?xt.fromJSDate(e.timeStart):null,end:e!=null&&e.timeEnd?xt.fromJSDate(e.timeEnd):null}),c(void 0))},[h.data,h.isSuccess,e,r]),S(Ti,{enableReinitialize:!0,initialValues:{notes:l!==void 0?l.notes:"",date:l!==void 0?l.date:new Date,start:l!==void 0&&l.timeStart!==null?xt.fromJSDate(l.timeStart):null,end:l!==void 0&&l.timeEnd!==null?xt.fromJSDate(l.timeEnd):null,impression:l!==void 0?l.impression:cg},innerRef:y=>i=y,validationSchema:g,onSubmit:async y=>{const v={day:t,routine:n,date:Zn(r.toJSDate()),notes:y.notes,impression:y.impression,time_start:y.start?Dx(y.start.toJSDate()):null,time_end:y.end?Dx(y.end.toJSDate()):null};l!==void 0?await f.mutateAsync({...v,id:l.id}):await u.mutateAsync(v)},children:y=>S(fi,{children:Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:6},children:S(Ys,{dateAdapter:zl,adapterLocale:s.language,children:S(Ih,{value:r,defaultValue:xt.now(),label:a("date"),onChange:v=>{v&&(y.setFieldValue("date",v),o(v))},disableFuture:!0,slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.date&&!!y.errors.date}}})})}),S(me,{size:{xs:6,sm:3},children:S(Ys,{dateAdapter:zl,adapterLocale:s.language,children:S(HF,{label:a("start"),...y.getFieldProps("start"),onChange:v=>{v&&y.setFieldValue("start",v)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.start&&!!y.errors.start,helperText:y.touched.start&&y.errors.start}}})})}),S(me,{size:{xs:6,sm:3},children:S(Ys,{dateAdapter:zl,adapterLocale:s.language,children:S(HF,{label:a("end"),...y.getFieldProps("end"),onChange:v=>{v&&y.setFieldValue("end",v)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.end&&!!y.errors.end,helperText:y.touched.end&&y.errors.end}}})})}),S(me,{size:12,children:S(Xu,{fieldName:"notes",title:a("notes"),fieldProps:{multiline:!0,rows:4}})}),Q(me,{size:12,children:[S(at,{variant:"caption",children:a("routines.impression")}),Q(sB,{fullWidth:!0,color:"primary",children:[Q(ct,{size:"small",color:"info",variant:y.values.impression===uL?"contained":"outlined",onClick:()=>y.setFieldValue("impression",uL),children:[S(Xst,{}),a("routines.impressionBad")]}),Q(ct,{size:"small",color:"info",variant:y.values.impression===cg?"contained":"outlined",onClick:()=>y.setFieldValue("impression",cg),children:[S(Yst,{}),a("routines.impressionNeutral")]}),Q(ct,{size:"small",color:"info",variant:y.values.impression===dL?"contained":"outlined",onClick:()=>y.setFieldValue("impression",dL),children:[S(Qst,{}),a("routines.impressionGood")]})]})]}),S(me,{size:12,display:"flex",justifyContent:"end",children:S(ct,{disabled:m,color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:a("submit")})})]})})})},LOt=({dayId:e,routineId:t,selectedDate:n})=>{const{t:r,i18n:o}=je(),[i,a]=x.useState(!1),s=Kc(t),l=ust(t),c=Yc(),u=()=>a(!1),[f,h]=x.useState(null);let m;if(c.isSuccess&&(m=Gu(o.language,c.data)),s.isLoading)return S(Er,{});const g=s.data,y=(g==null?void 0:g.getDayData(e,n.toJSDate()))??[],v=y.length===0,w=Wo({logs:sh().of(Wo().shape({rir:Do().nullable(),repetitions:Do().typeError(r("forms.enterNumber")).nullable(),weight:Do().typeError(r("forms.enterNumber")).nullable()}))}),C=async P=>{const R=v?null:y[0].iteration,D=P.logs.filter(M=>M.rir!==""||M.repetitions!==""||M.weight!=="").map(M=>{var A,_,N;return{date:n.toISO(),iteration:R,exercise:(A=M.exercise)==null?void 0:A.id,day:e,routine:t,slot_entry:M.slotEntry,rir:M.rir!==""?M.rir:null,rir_target:M.rirTarget!==""?M.rirTarget:null,repetitions_unit:(_=M.repetitionsUnit)==null?void 0:_.id,repetitions:M.repetitions!==""?M.repetitions:null,repetitions_target:M.repetitionsTarget!==""?M.repetitionsTarget:null,weight_unit:(N=M.weightUnit)==null?void 0:N.id,weight:M.weight!==""?M.weight:null,weight_target:M.weightTarget!==""?M.weightTarget:null}});await l.mutateAsync(D),a(!0)},E=async(P,R)=>{if(P===null)return;const D=R.values.logs.map(M=>f===M.exercise.id?{...M,weight:"",weightTarget:"",repetitions:"",repetitionsTarget:"",rir:"",rirTarget:"",exercise:P.exercise}:M);await R.setValues({...R.values,logs:D}),h(null)},I={logs:[]},O=v?g.dayDataCurrentIteration.filter(P=>{var R;return((R=P.day)==null?void 0:R.id)===e}):y;for(const P of O)for(const R of P.slots)for(const D of R.setConfigs)for(let M=0;M<D.nrOfSets;M++)I.logs.push({exercise:D.exercise,repetitionsUnit:D.repetitionsUnit,weightUnit:D.weightUnit,slotEntry:D.slotEntryId,rir:!v&&D.rir!==null?D.rir:"",rirTarget:!v&&D.rir!==null?D.rir:"",repetitions:!v&&D.repetitions!==null?D.repetitions:"",repetitionsTarget:!v&&D.repetitions!==null?D.repetitions:"",weight:!v&&D.weight!==null?D.weight:"",weightTarget:!v&&D.weight!==null?D.weight:""});return Q(Tt,{children:[v&&S(Ci,{severity:"info",sx:{marginTop:2},children:r("routines.weightLogNotPlanned")}),S(Ti,{enableReinitialize:!0,initialValues:I,validationSchema:w,onSubmit:C,children:P=>Q(fi,{children:[S(Due,{name:"logs",children:({insert:R,remove:D})=>S(Tt,{children:P.values.logs.map((M,A)=>{var _,N,B,H;return Q(me,{container:!0,spacing:1,sx:{mt:2},children:[(A===0||A>0&&P.values.logs[A-1].exercise.id!=P.values.logs[A].exercise.id)&&Q(Tt,{children:[Q(me,{size:12,children:[f!==P.values.logs[A].exercise.id&&S(at,{variant:"h6",children:(_=P.values.logs[A].exercise)==null?void 0:_.getTranslation(m).name}),f===P.values.logs[A].exercise.id&&S(Wy,{loadExercise:!0,callback:j=>E(j,P)})]}),Q(me,{size:12,children:[Q(ct,{type:"button",size:"small",onClick:()=>R(A,{exercise:P.values.logs[A].exercise,repetitions:P.values.logs[A].repetitions,weight:P.values.logs[A].weight}),children:[S(Ko,{}),r("routines.addAdditionalLog")]}),Q(ct,{type:"button",size:"small",onClick:()=>{f===P.values.logs[A].exercise.id?h(null):h(P.values.logs[A].exercise.id)},children:[S(tlt,{}),r("exercises.swapExercise")]}),Q(ct,{type:"button",size:"small",onClick:async()=>await P.setValues({...P.values,logs:P.values.logs.filter(j=>j.exercise.id!==P.values.logs[A].exercise.id)}),children:[S(OS,{}),r("delete")]})]})]}),S(me,{size:4,children:S(Xu,{fieldName:`logs.${A}.repetitions`,title:r("server.repetitions"),fieldProps:{slotProps:{input:{endAdornment:S(So,{position:"end",children:((N=P.values.logs[A].repetitionsUnit)==null?void 0:N.id)!==r2e?S(at,{variant:"caption",children:(B=P.values.logs[A].repetitionsUnit)==null?void 0:B.name}):null})}}}})}),S(me,{size:4,children:S(Xu,{fieldName:`logs.${A}.weight`,title:r("weight"),fieldProps:{slotProps:{input:{endAdornment:S(So,{position:"end",children:S(at,{variant:"caption",children:(H=P.values.logs[A].weightUnit)==null?void 0:H.name})})}}}})}),S(me,{size:3,children:S(dn,{fullWidth:!0,select:!0,label:r("routines.rir"),variant:"standard",...P.getFieldProps(`logs.${A}.rir`),children:Hre.map(j=>S(Jt,{value:j.value,children:j.label},j.value))})}),S(me,{size:1,children:S(pn,{size:"small",onClick:()=>D(A),children:S(OS,{})})})]},A)})})}),S(me,{container:!0,spacing:2,children:S(me,{size:12,display:"flex",justifyContent:"end",children:S(ct,{color:"primary",disabled:!P.isValid||P.isSubmitting||l.isPending,variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})})]})}),S(dI,{open:i,autoHideDuration:EI,onClose:u,children:S(Ci,{onClose:u,severity:"success",sx:{width:"100%"},children:r("success")})})]})},FOt=()=>{const e=Ma(),{t,i18n:n}=je(),[r,o]=x.useState(xt.now()),i=parseInt(e.routineId??"");if(Number.isNaN(i))return S("p",{children:"Please pass an integer as the routine id."});const a=parseInt(e.dayId??"");return Number.isNaN(a)?S("p",{children:"Please pass an integer as the day id."}):S(ds,{title:t("routines.addWeightLog"),backToUrl:cn(Qt.ROUTINE_DETAIL,n.language,{id:i}),mainContent:Q(Ft,{children:[S(NOt,{routineId:i,dayId:a,selectedDate:r,setSelectedDate:o}),S(at,{variant:"h5",children:t("exercises.exercises")}),S(at,{variant:"body2",children:t("routines.impressionHelpText")}),S(LOt,{routineId:i,dayId:a,selectedDate:r})]})})},Ghe=e=>{var t,n,r;return(t=e.mutationQuery)!=null&&t.isError?S(Tt,{children:Q(Ci,{severity:"error",sx:{mb:1},children:[S(fh,{children:(n=e.mutationQuery.error)==null?void 0:n.message}),S("ul",{children:Uhe((r=e.mutationQuery.error.response)==null?void 0:r.data).map((o,i)=>S("li",{children:o},i))})]})}):null},I0=e=>{var y,v;const{t}=je(),[n,r]=x.useState(!0),[o,i]=x.useState([]),a=Dat(e.routineId),s=e.forceInteger??!1;let l,c,u="";switch(e.type){case"weight":l=St.WEIGHT_CONFIG,c=St.MAX_WEIGHT_CONFIG,u=t("weight");break;case"reps":l=St.REPETITIONS_CONFIG,c=St.MAX_REPS_CONFIG,u=t("server.repetitions");break;case"sets":l=St.NR_OF_SETS_CONFIG,c=St.MAX_NR_OF_SETS_CONFIG,u=t("routines.sets");break;case"rest":l=St.REST_CONFIG,c=St.MAX_REST_CONFIG,u=t("routines.restTime");break;case"rir":l=St.RIR_CONFIG,c=St.MAX_RIR_CONFIG,u=t("routines.rir");break}const f=Wo({entries:sh().of(Wo().shape({edited:Lu(),iteration:Do().required(),value:Do().when("forceInteger",{is:!0,then:w=>w.integer(t("forms.enterInteger")).typeError(t("forms.enterNumber")),otherwise:w=>w.typeError(t("forms.enterNumber")).nullable().notRequired()}),valueMax:Do().typeError(t("forms.enterNumber")).nullable().when("forceInteger",{is:!0,then:w=>w.integer(t("forms.enterInteger")).typeError(t("forms.enterNumber")),otherwise:w=>w.typeError(t("forms.enterNumber")).nullable().notRequired()}).when("operation",{is:Qi,then:w=>w.min(AP("value"),t("forms.maxLessThanMin")),otherwise:w=>w}),operation:Ho().required(),operationMax:Ho().required(),requirements:sh().of(Ho().oneOf(JN)),requirementsMax:sh().of(Ho().oneOf(JN)),repeat:Lu(),repeatMax:Lu()})).test("inter-entry-validation","Your error message here",function(w){const{createError:C}=this,E=w;for(let I=0;I<E.length;I++){const O=E[I];if(O.iteration>1&&O.operation!==Qi){let P=!1,R=!1;for(let D=0;D<I;D++)E[D].operation===Qi&&E[D].value!==""&&E[D].edited&&(P=!0),E[D].operation===Qi&&E[D].valueMax!==""&&E[D].edited&&(R=!0);if(!P)return C({path:`entries[${I}].value`,message:t("routines.progressionNeedsReplace")});if(!R)return C({path:`entries[${I}].valueMax`,message:t("routines.progressionNeedsReplace")})}}return!0})}),h=(w,C)=>({forceInteger:s,edited:C,iteration:w,id:null,idMax:null,value:"",valueMax:"",operation:Qi,operationMax:Qi,step:"abs",stepMax:"abs",requirements:[],requirementsMax:[],repeat:!1,repeatMax:!1}),m={entries:[]};for(const w of e.iterations){const C=e.configs.find(I=>I.iteration===w),E=e.configsMax.find(I=>I.iteration===w);C===void 0?m.entries.push(h(w,!1)):m.entries.push({forceInteger:s,edited:!0,id:C.id,idMax:E===void 0?null:E.id,iteration:w,value:String(C.value),valueMax:E===void 0?"":String(E.value),operation:C.operation,operationMax:E===void 0?Qi:C.operation,step:C.step,stepMax:E===void 0?"abs":E.step,requirements:((y=C.requirements)==null?void 0:y.rules)??[],requirementsMax:E===void 0?[]:((v=E.requirements)==null?void 0:v.rules)??[],repeat:C.repeat,repeatMax:E===void 0?!1:C.repeat})}const g=w=>{const C=w.entries.filter(M=>M.edited),E=C.filter(M=>M.id!==null).map(M=>({id:M.id,slot_entry:e.slotEntryId,value:M.value,iteration:M.iteration,operation:M.operation,step:M.step,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),I=C.filter(M=>M.id===null&&M.value!=="").map(M=>({slot_entry:e.slotEntryId,value:M.value,iteration:M.iteration,operation:M.operation,step:M.step,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),O=e.configs.filter(M=>o.includes(M.iteration)).map(M=>M.id);C.forEach(M=>{M.value===""&&M.id!==null&&!O.includes(M.id)&&O.push(M.id)});const P=C.filter(M=>M.idMax!==null&&M.valueMax!=="").map(M=>({id:M.idMax,slot_entry:e.slotEntryId,value:M.valueMax,iteration:M.iteration,operation:M.operation,step:M.step,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),R=C.filter(M=>M.idMax===null&&M.valueMax!=="").map(M=>({iteration:M.iteration,slot_entry:e.slotEntryId,value:M.valueMax,operation:M.operation,step:M.stepMax,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),D=e.configsMax.filter(M=>o.includes(M.iteration)).map(M=>M.id);C.forEach(M=>{M.valueMax===""&&M.idMax!==null&&!O.includes(M.idMax)&&D.push(M.idMax)}),a.mutate({values:{toAdd:I,toDelete:O,toEdit:E,apiPath:l},maxValues:{toAdd:R,toDelete:D,toEdit:P,apiPath:c}})};return S(Tt,{children:Q(Ft,{sx:{width:"100%"},children:[S(at,{variant:"h6",children:u}),S(Ti,{enableReinitialize:!0,initialValues:m,validationSchema:f,onSubmit:(w,{setSubmitting:C})=>{g(w),C(!1)},children:w=>S(fi,{children:Q(me,{container:!0,spacing:1,children:[S(me,{size:4,offset:2,textAlign:"center",children:t("value")}),S(me,{size:6,children:Q(me,{container:!0,spacing:1,children:[S(me,{size:3,children:t("routines.operation")}),S(me,{size:3,children:t("routines.step")}),Q(me,{size:3,textAlign:"center",children:[t("routines.requirements"),S("br",{}),S(Go,{title:t("routines.requirementsHelpText"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]}),Q(me,{size:3,textAlign:"center",children:[t("routines.repeat"),S("br",{}),S(Go,{title:t("routines.repeatHelpText"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]})]})}),S(me,{size:12,children:S(ji,{})}),S(Due,{name:"entries",validateOnChange:!0,children:({insert:C,remove:E})=>S(Tt,{children:w.values.entries.map((I,O)=>Q(J.Fragment,{children:[Q(me,{size:2,display:"flex",justifyContent:"space-around",alignItems:"center",children:[e.cycleLength===7?t("routines.weekNr",{number:I.iteration}):t("routines.workoutNr",{number:I.iteration}),I.edited?S(pn,{disabled:I.iteration===1&&w.values.entries.filter(P=>P.edited&&P.iteration!==1).length>0,size:"small",onClick:()=>{I.id!==null&&i([...o,I.iteration]),E(O),C(O,h(I.iteration,!1))},children:S(MP,{})}):S(pn,{size:"small",onClick:()=>{E(O),C(O,h(I.iteration,!0))},children:S(Ko,{})})]}),S(me,{size:2,children:I.edited&&S(Xu,{fieldName:`entries.${O}.value`,title:t("min"),fullwidth:!0})}),S(me,{size:2,children:I.edited&&S(Xu,{fieldName:`entries.${O}.valueMax`,title:t("max"),fullwidth:!0})}),S(me,{size:6,children:Q(me,{container:!0,spacing:1,children:[S(me,{size:3,children:I.edited&&S(dn,{disabled:I.iteration===1,fullWidth:!0,select:!0,label:t("routines.operation"),variant:"standard",...w.getFieldProps(`entries.${O}.operation`),onChange:async P=>{w.handleChange(P),P.target.value===Qi&&(await w.setFieldValue(`entries.${O}.requirements`,[]),await w.setFieldValue(`entries.${O}.repeat`,!1))},children:M2e.map(P=>S(Jt,{value:P.value,children:P.label},P.value))})}),S(me,{size:3,children:I.edited&&Q(dn,{disabled:I.iteration===1||I.operation===Qi,fullWidth:!0,select:!0,label:t("routines.step"),variant:"standard",...w.getFieldProps(`entries.${O}.step`),children:[A2e.map(P=>S(Jt,{value:P.value,children:P.label},P.value)),(I.iteration===1||I.operation===Qi)&&S(Jt,{value:"na",children:"n/a"},"na")]})}),Q(me,{size:3,textAlign:"center",children:[I.edited&&S(POt,{disabled:I.iteration===1||I.operation===Qi,values:I.requirements,fieldName:`entries.${O}.requirements`}),I.requirements.length>=0&&S("br",{}),I.requirements.length>=0&&I.requirements.map((P,R)=>Q(at,{variant:"caption",children:[P,"  "]},R))]}),S(me,{size:3,textAlign:"center",children:I.edited&&S(qo,{checked:w.values.entries[O].repeat,...w.getFieldProps(`entries.${O}.repeat`),disabled:I.iteration===1||I.operation===Qi})})]})})]},O))})}),a.isError&&S(me,{size:12,children:S(Ghe,{mutationQuery:a})}),S(me,{size:12,display:"flex",justifyContent:"end",children:S(ct,{color:"primary",disabled:!w.isValid||w.isSubmitting||!w.dirty,variant:"contained",type:"submit",sx:{mt:2},children:t("save")})}),S(me,{size:12,children:S(Zt,{height:20})})]})})})]})})},jOt=()=>{const{t:e,i18n:t}=je(),n=Ma(),r=n.routineId?parseInt(n.routineId):-1,o=n.slotId?parseInt(n.slotId):-1,i=Kc(r),a=Yc();if(i.isLoading)return S(Er,{});const s=i.data;let l;a.isSuccess&&(l=Gu(t.language,a.data));let c=null;for(const f of s.days){const h=f.slots.find(m=>m.id===o);if(h){c=h;break}}if(c===null)return S("p",{children:"Slot not found!"});const u=Object.keys(s.groupedDayDataByIteration).map(Number);return S(Tt,{children:S(Vw,{title:e("routines.editProgression"),backToUrl:cn(Qt.ROUTINE_EDIT,t.language,{id:r}),children:c.entries.map(f=>{var h;return Q(J.Fragment,{children:[S(at,{variant:"h5",gutterBottom:!0,children:(h=f.exercise)==null?void 0:h.getTranslation(l).name}),Q(me,{container:!0,spacing:1,children:[S(me,{size:2,display:"flex",alignItems:"end",children:S(at,{variant:"body2",children:e("routines.rounding")})}),S(me,{size:5,children:S(RO,{routineId:r,entryId:f.id,initialValue:f.weightRounding,rounding:"weight",editProfile:!1})}),S(me,{size:5,children:S(RO,{routineId:r,entryId:f.id,initialValue:f.repetitionRounding,rounding:"reps",editProfile:!1})}),S(I0,{type:"sets",configs:f.nrOfSetsConfigs,configsMax:f.maxNrOfSetsConfigs,slotEntryId:f.id,routineId:r,iterations:u,forceInteger:!0,cycleLength:s.cycleLength}),S(I0,{type:"weight",configs:f.weightConfigs,configsMax:f.maxWeightConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength}),S(I0,{type:"reps",configs:f.repetitionsConfigs,configsMax:f.maxRepetitionsConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength}),S(I0,{type:"rir",configs:f.rirConfigs,configsMax:f.maxRirConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength}),S(I0,{type:"rest",configs:f.restTimeConfigs,configsMax:f.maxRestTimeConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength})]})]},f.id)})})})},BOt=()=>{const{t:e,i18n:t}=je(),n=Ma(),r=parseInt(n.routineId??"");if(Number.isNaN(r))return S("p",{children:"Please pass an integer as the routine id."});const o=Kc(r),i=o.data;return S(RP,{query:o,child:o.isSuccess&&S(ds,{title:i!=null&&i.isPublic?e("routines.publicTemplate"):e("routines.template"),subTitle:i.name,mainContent:Q(Ft,{spacing:2,children:[Q(at,{variant:"subtitle1",children:[i.start.toLocaleDateString()," - ",i.end.toLocaleDateString()," (",i.durationText,")"]}),i.description!==""&&S(at,{variant:"body2",sx:{whiteSpace:"pre-line"},children:i==null?void 0:i.description}),S(ct,{component:"a",href:cn(Qt.ROUTINE_COPY,t.language,{id:r}),variant:"contained",children:e("routines.copyAndUseTemplate")}),i.dayDataCurrentIteration.filter(a=>a.day!==null).map((a,s)=>S(BV,{dayData:a,routineId:r,readOnly:!0},`dayDetails-${s}`))]}),sideBar:Q(Ft,{children:[S(Zt,{height:40}),Q(me,{container:!0,children:[S(me,{size:6,children:S(Ql,{primaryMuscles:i.mainMuscles.filter(a=>a.isFront),secondaryMuscles:i.secondaryMuscles.filter(a=>a.isFront),isFront:!0})}),S(me,{size:6,children:S(Ql,{primaryMuscles:i.mainMuscles.filter(a=>!a.isFront),secondaryMuscles:i.secondaryMuscles.filter(a=>!a.isFront),isFront:!1})})]})]})})})},zOt=e=>{const{t}=je(),n=e.logEntries??[],r=lst(e.routineId),o=cst(e.routineId),i=n.map(E=>({id:E.id,date:E.date,repetitions:E.repetitions,weight:E.weight,rir:E.rir,entry:E})),[a,s]=J.useState(i),[l,c]=J.useState({}),u=(E,I)=>{E.reason===ks.rowFocusOut&&(I.defaultMuiPrevented=!0)},f=E=>()=>{c({...l,[E]:{mode:zn.Edit}})},h=E=>()=>{c({...l,[E]:{mode:zn.View}})},m=E=>()=>{r.mutate(E),s(a.filter(I=>I.id!==E))},g=E=>()=>{c({...l,[E]:{mode:zn.View,ignoreModifications:!0}}),a.find(O=>O.id===E).isNew&&s(a.filter(O=>O.id!==E))},y=E=>{const I=E.entry;I!==void 0&&(I.date=E.date,I.repetitions=E.repetitions,I.weight=E.weight,I.rir=E.rir,o.mutate(I));const O={...E,isNew:!1};return s(a.map(P=>P.id===E.id?O:P)),O},v=E=>{c(E)},w=[{field:"date",type:"dateTime",flex:1,editable:!0,disableColumnMenu:!0,headerName:t("date"),valueFormatter:E=>E==null?"":`${E.toLocaleDateString()}`},{field:"repetitions",type:"number",disableColumnMenu:!0,editable:!0,headerName:t("routines.reps")},{field:"weight",type:"number",disableColumnMenu:!0,editable:!0,headerName:t("weight")},{field:"rir",type:"singleSelect",disableColumnMenu:!0,editable:!0,headerName:t("routines.rir"),getOptionValue:E=>E.value,getOptionLabel:E=>E.label,valueOptions:Vre},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({id:E})=>{var O;return((O=l[E])==null?void 0:O.mode)===zn.Edit?[S(mf,{icon:S(ide,{}),sx:{color:"primary.main"},label:t("save"),onClick:h(E)}),S(mf,{icon:S(Mst,{}),label:t("cancel"),className:"textPrimary",onClick:g(E),color:"inherit"})]:[S(mf,{icon:S(DV,{}),label:t("edit"),className:"textPrimary",onClick:f(E),color:"inherit"}),S(mf,{icon:S(OS,{}),label:t("delete"),onClick:m(E),color:"inherit"})]}}],C={pagination:{paginationModel:{pageSize:5}}};return Q(Tt,{children:[S(at,{variant:"h6",sx:{mt:4},children:e.exercise.getTranslation().name}),Q(me,{container:!0,spacing:2,children:[Q(me,{size:{xs:12,md:6},children:[S(Ghe,{mutationQuery:o}),S(Cpe,{initialState:C,pageSizeOptions:YN.pageSizeOptions,disableRowSelectionOnClick:!0,rows:a,columns:w,editMode:"row",rowModesModel:l,onRowModesModelChange:v,onRowEditStop:u,processRowUpdate:y})]}),S(me,{size:{xs:12,md:6},children:S(UOt,{data:n},e.exercise.id)})]})]})},VOt=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),HOt=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),S(ho,{children:Q(Fi,{children:[S(at,{variant:"body1",children:xt.fromMillis(t==null?void 0:t[0].value).toLocaleString(xt.DATE_MED)}),Q(at,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.repetitions," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},UOt=e=>{const t=e.data.reduce(function(r,o){return r.set(o.repetitions,r.get(o.repetitions)||[]),r.get(o.repetitions).push(o),r},new Map),n=Zw(t.size);return S(Zt,{children:S(nd,{width:"100%",height:250,children:Q(fYe,{children:[S(ls,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>xt.fromMillis(r).toLocaleString(xt.DATE_MED),type:"number"}),S(cs,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=VOt(o);return S(Iw,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r==null?void 0:r.toString()},r)}),S(ba,{content:S(HOt,{})}),S(Uf,{strokeDasharray:"3 3"}),S(Oc,{})]})})})},GOt=()=>{const e=Ma(),t=e.routineId?parseInt(e.routineId):0,[n,r]=je(),o=Wue(t),i=Kc(t);if(o.isLoading||i.isLoading)return S(Er,{});let a=new Map;return a=o.data.reduce((s,l)=>(l.logs.forEach(c=>{const u=c.exerciseId;s.set(u,s.get(u)||[]),s.get(u).push(c)}),s),a),Q(Vw,{title:n("routines.logsHeader"),backToUrl:cn(Qt.ROUTINE_DETAIL,r.language,{id:t}),optionsMenu:S(Go,{title:n("routines.statsOverview"),children:S(pn,{component:"a",href:cn(Qt.ROUTINE_STATS_OVERVIEW,r.language,{id:t}),children:S(Zue,{})})}),children:[S(at,{variant:"body1",children:n("routines.logsFilterNote")}),i.data.dayDataCurrentIteration.filter(s=>s.day!==null&&!s.day.isRest).map((s,l)=>Q(J.Fragment,{children:[Q(Ft,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[S(at,{variant:"h4",children:s.day.name}),S(ct,{component:Ro,to:cn(Qt.ROUTINE_ADD_LOG,r.language,{id:t,id2:s.day.id}),variant:"contained",children:n("routines.addLogToDay")})]}),s.slots.map(c=>c.exercises.map(u=>S(zOt,{routineId:t,exercise:u,logEntries:a.get(u.id)},u.id)))]},l))]})};var Dp=(e=>(e.Volume="volume",e.Sets="sets",e.Intensity="intensity",e))(Dp||{}),kp=(e=>(e.Mesocycle="mesocycle",e.Weekly="weekly",e.Iteration="iteration",e.Daily="daily",e))(kp||{}),G0=(e=>(e.Exercises="exercises",e.Muscles="muscles",e.Total="total",e))(G0||{});const U$=({label:e,options:t,value:n,onChange:r})=>Q(Fh,{fullWidth:!0,children:[S(jh,{id:`${e}-label`,children:e}),S(Lf,{labelId:`${e}-label`,id:`${e}-select`,value:n,label:e,onChange:r,children:t.map(o=>S(Jt,{value:o.value,children:o.label},o.value))})]});function qOt(e,t,n,r,o){switch(r){case"exercises":{const i=Object.keys(o.exercises).map(s=>{var l,c;return(c=(l=e.find(u=>u.id===parseInt(s)))==null?void 0:l.getTranslation(t))==null?void 0:c.name}),a=Object.keys(o.exercises).map(Number);return{headers:i,data:a.map(s=>o.exercises[s])}}case"muscles":{const i=Object.keys(o.muscle).map(s=>{var l;return((l=n.find(c=>c.id===parseInt(s)))==null?void 0:l.translatedName)??""}),a=Object.keys(o.muscle).map(Number);return{headers:i,data:a.map(s=>o.muscle[s])}}case"total":return{headers:[hr.t("total")],data:[o.total]};default:return{headers:[],data:[]}}}const WOt=(e,t,n,r,o,i,a,s)=>{const l={},c=e[t];let u=[],f=[];const h=(y,v)=>qOt(o,a,i,y,v);f=(y=>{let v=[];switch(n){case"mesocycle":v=h(r,c.mesocycle).headers;break;case"iteration":for(const w in y.iteration)v=v.concat(h(r,y.iteration[w]).headers);break;case"weekly":for(const w in y.weekly)v=v.concat(h(r,y.weekly[w]).headers);break;case"daily":for(const w in y.daily)v=v.concat(h(r,y.daily[w]).headers);break}return[...new Set(v)]})(c),f.forEach(y=>{l[y]=0});function g(y,v){f.map(C=>y[h(r,v).headers.indexOf(C)]).forEach((C,E)=>{C!==void 0&&(l[f[E]]+=C)})}switch(n){case"mesocycle":{const{data:y}=h(r,c.mesocycle);u=[{key:hr.t("total"),values:f.map(v=>y[f.indexOf(v)])}];break}case"iteration":{u=Object.entries(c.iteration).map(([y,v])=>{const{data:w}=h(r,v);return g(w,v),{key:`iteration ${y}`,values:f.map(C=>w[h(r,v).headers.indexOf(C)])}});break}case"weekly":{u=Object.entries(c.weekly).map(([y,v])=>{const{data:w}=h(r,v);return g(w,v),{key:`week ${y}`,values:f.map(C=>w[h(r,v).headers.indexOf(C)])}});break}case"daily":{u=Object.entries(c.daily).map(([y,v])=>{const{data:w}=h(r,v);return g(w,v),{key:new Date(y).toLocaleDateString(s),values:f.map(C=>w[h(r,v).headers.indexOf(C)])}});break}}return{headers:f,data:u,totals:l}};function KOt(e){const t=[];return e.headers.forEach(n=>{t.push({name:n,data:[]})}),e.data.forEach(n=>{n.values.forEach((r,o)=>{var a;const i=e.headers[o];i&&((a=t.find(s=>s.name===i))==null||a.data.push({category:n.key.toString(),value:r}))})}),t}const YOt=()=>{const e=Lr(),[t,n]=je(),r=Ma(),[o,i]=x.useState(Dp.Volume),[a,s]=x.useState(kp.Daily),[l,c]=x.useState(G0.Exercises),u=parseInt(r.routineId??"");if(Number.isNaN(u))return S("p",{children:"Please pass an integer as the routine id."});const f=Kc(u),h=Tat(u),m=_v(),g=Yc();if(h.isLoading||f.isLoading||m.isLoading||g.isLoading)return S(Er,{});const y=Gu(n.language,g.data),v=f.data,w=[{value:Dp.Volume,label:t("routines.volume")},{value:Dp.Sets,label:t("routines.sets")},{value:Dp.Intensity,label:t("routines.intensity")}],C=[{value:kp.Mesocycle,label:t("routines.currentRoutine")},{value:kp.Weekly,label:t("routines.weekly")},{value:kp.Iteration,label:t("routines.iteration")},{value:kp.Daily,label:t("routines.daily")}],E=[{value:G0.Exercises,label:t("exercises.exercises")},{value:G0.Muscles,label:t("exercises.muscles")},{value:G0.Total,label:t("total")}],I=_=>{i(_.target.value)},O=_=>{s(_.target.value)},P=_=>{c(_.target.value)},R=WOt(h.data,o,a,l,v.exercises,m.data,y,n.language),D=KOt(R),M=()=>S(Fc,{children:Q(Nc,{size:"small",children:[S(Ff,{children:Q(ln,{children:[S(ke,{}),R.headers.map(_=>S(ke,{sx:{textAlign:"right"},children:_},_))]})}),Q(Lc,{children:[R.data.map(_=>Q(ln,{children:[S(ke,{children:_.key}),_.values.map((N,B)=>S(ke,{sx:{textAlign:"right"},children:(N==null?void 0:N.toFixed(o===Dp.Intensity?2:0))||""},B))]},_.key)),a!==kp.Mesocycle&&Q(ln,{children:[S(ke,{sx:{fontWeight:"bold",backgroundColor:e.palette.grey.A200},children:t("total")}),R.headers.map(_=>{var N;return S(ke,{sx:{fontWeight:"bold",backgroundColor:e.palette.grey.A200,textAlign:"right"},children:(N=R.totals[_==null?void 0:_.toString()])==null?void 0:N.toFixed(o===Dp.Intensity?2:0)},_)})]})]})]})}),A=Zw(D.length);return S(Vw,{title:`${t("routines.statsOverview")} - ${v.name}`,backToUrl:cn(Qt.ROUTINE_DETAIL,n.language,{id:u}),optionsMenu:S(Go,{title:t("routines.logsOverview"),children:S(pn,{component:"a",href:cn(Qt.ROUTINE_LOGS_OVERVIEW,n.language,{id:u}),children:S(Zue,{})})}),children:Q(me,{container:!0,spacing:1,children:[S(me,{size:2,offset:3,children:S(U$,{label:"type",options:w,value:o,onChange:I})}),S(me,{size:2,children:S(U$,{label:"sub type",options:C,value:a,onChange:O})}),S(me,{size:2,children:S(U$,{label:"group by",options:E,value:l,onChange:P})}),S(me,{size:12,children:S(Zt,{width:"100%",height:400,children:S(nd,{width:"100%",height:"100%",children:Q(qz,{width:500,height:300,children:[S(Uf,{strokeDasharray:"3 3"}),S(ls,{dataKey:"category",type:"category",allowDuplicatedCategory:!1}),S(cs,{dataKey:"value"}),S(ba,{formatter:_=>Number.isInteger(_)?_.toFixed(0):_.toFixed(2)}),S(Oc,{layout:"vertical",verticalAlign:"middle",align:"right",wrapperStyle:{paddingLeft:"20px"}}),D.map(_=>S(qh,{dataKey:"value",data:_.data,name:_.name,stroke:A.next().value},_.name))]})})})}),Q(me,{size:12,children:[S(Zt,{height:20}),M()]})]})})},QOt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Ko,{})}),S(Bi,{title:e("add"),isOpen:t,closeFn:o,children:S(mH,{closeFn:o})})]})},FH=e=>{const[t,n]=je(),r=e.showTemplateChip??!0,o=e.linkDestination??Qt.ROUTINE_DETAIL,i=cn(o,n.language,{id:e.routine.id}),a=e.routine.name!==""?e.routine.name:t("routines.routine"),s=e.routine.isTemplate&&r?S(Wl,{color:"info",size:"small",label:t("routines.template")}):null;return Q(Tt,{children:[S(Co,{sx:{p:0},children:Q(Fl,{component:"a",href:i,children:[S(Wr,{primary:Q(Tt,{children:[a," ",s]}),secondary:`${e.routine.durationText} (${e.routine.start.toLocaleDateString()} - ${e.routine.end.toLocaleDateString()})`}),S(ede,{})]})}),S(ji,{component:"li"})]})},yee=()=>{const e=Oat(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("routines.routines"),mainContent:S(Tt,{children:e.data.length===0?S(Bh,{}):S(go,{children:S(ai,{sx:{py:0},children:e.data.map(n=>S(FH,{routine:n},n.id))},"abc")})}),fab:S(QOt,{})})},XOt=()=>{const e=Iat(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("routines.templates"),mainContent:S(Tt,{children:e.data.length===0?S(Bh,{}):S(go,{children:S(ai,{sx:{py:0},children:e.data.map(n=>S(FH,{routine:n,showTemplateChip:!1,linkDestination:Qt.TEMPLATE_DETAIL},n.id))},"abc")})})})},JOt=()=>{const e=Pat(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("routines.publicTemplates"),mainContent:S(Tt,{children:e.data.length===0?S(Bh,{}):S(go,{children:S(ai,{sx:{py:0},children:e.data.map(n=>S(FH,{routine:n,linkDestination:Qt.TEMPLATE_DETAIL,showTemplateChip:!1},n.id))},"abc")})})})},ZOt=()=>S("div",{children:"About Page"});function jH(e){const[t]=je(),[n,r,o]=us(e.fieldName);return S(_c,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>Sx(Wl,{label:s,...a({index:l}),key:l})),onBlur:n.onBlur,renderInput:i=>S(dn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function eIt(e){const[t]=je(),[n,r,o]=us(e.fieldName);return S(_c,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>e.options.find(a=>a.id===i).translatedName,...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>S(dn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function BH(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function tIt(e){const[t]=je(),[n,r]=us(e.fieldName);return Q(Fh,{fullWidth:!0,children:[S(jh,{id:"label-category",children:t("category")}),S(Lf,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&S(aw,{error:!0,children:r.error})]})}const qhe=5,Whe=40,zH=e=>Ho().min(qhe,e("forms.valueTooShort")).max(Whe,e("forms.valueTooLong")).required(e("forms.fieldRequired")),VH=e=>sh().ensure().compact().of(Ho().min(qhe,e("forms.valueTooShort")).max(Whe,e("forms.valueTooLong"))),HH=e=>Ho().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),Khe=e=>sh().ensure().compact().of(Ho().min(15,e("forms.valueTooShort"))),nIt=e=>Do().required(e("forms.fieldRequired"));var Yhe=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(Yhe||{}),Wn=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))(Wn||{});const vee=e=>({type:Yhe.SET_NOTIFICATION,payload:e}),bee={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},rIt=x.createContext([bee,()=>bee]),oIt=()=>x.useContext(rIt),iIt=e=>({type:Wn.SET_NAME_EN,payload:e}),aIt=e=>({type:Wn.SET_DESCRIPTION_EN,payload:e}),sIt=e=>({type:Wn.SET_NOTES_EN,payload:e}),lIt=e=>({type:Wn.SET_ALIASES_EN,payload:e}),cIt=e=>({type:Wn.SET_NAME_I18N,payload:e}),uIt=e=>({type:Wn.SET_DESCRIPTION_I18N,payload:e}),dIt=e=>({type:Wn.SET_NOTES_I18N,payload:e}),fIt=e=>({type:Wn.SET_ALIASES_I18N,payload:e}),pIt=e=>({type:Wn.SET_CATEGORY,payload:e}),hIt=e=>({type:Wn.SET_EQUIPMENT,payload:e}),mIt=e=>({type:Wn.SET_PRIMARY_MUSCLES,payload:e}),gIt=e=>({type:Wn.SET_MUSCLES_SECONDARY,payload:e}),yIt=e=>({type:Wn.SET_VARIATION_ID,payload:e}),vIt=e=>({type:Wn.SET_NEW_VARIATION_BASE_ID,payload:e}),bIt=e=>({type:Wn.SET_LANGUAGE,payload:e}),xIt=e=>({type:Wn.SET_IMAGES,payload:e}),SIt=(e,t)=>{if(t===void 0)return e;switch(t.type){case Wn.RESET:return BO;case Wn.SET_NAME_EN:return{...e,nameEn:t.payload};case Wn.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case Wn.SET_NOTES_EN:return{...e,notesEn:t.payload};case Wn.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case Wn.SET_CATEGORY:return{...e,category:t.payload};case Wn.SET_EQUIPMENT:return{...e,equipment:t.payload};case Wn.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case Wn.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case Wn.SET_VARIATION_ID:return{...e,variationId:t.payload};case Wn.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationExerciseId:t.payload};case Wn.SET_LANGUAGE:return{...e,languageId:t.payload};case Wn.SET_NAME_I18N:return{...e,nameI18n:t.payload};case Wn.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case Wn.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case Wn.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case Wn.SET_IMAGES:return{...e,images:t.payload};default:return e}},BO={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationExerciseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},Qhe=x.createContext([BO,()=>BO]),wIt=({children:e})=>{const[t,n]=x.useReducer(SIt,BO);return S(Qhe.Provider,{value:[t,n],children:e})},Qv=()=>x.useContext(Qhe),CIt=({onContinue:e})=>{const[t]=je(),[n,r]=Qv(),[o,i]=x.useState(n.muscles),[a,s]=x.useState(n.musclesSecondary);x.useEffect(()=>{r(mIt(o))},[r,o]),x.useEffect(()=>{r(gIt(a))},[r,a]);const l=DP(),c=_v(),u=kP(),f=Wo({nameEn:zH(t),newAlternativeNameEn:VH(t),category:nIt(t)});return S(Ti,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:f,onSubmit:h=>{r(iIt(h.nameEn)),r(pIt(h.category)),r(lIt(h.newAlternativeNameEn)),r(hIt(h.equipment)),e()},children:h=>Q(fi,{children:[Q(Ft,{spacing:2,children:[S(BH,{fieldName:"nameEn"}),S(jH,{fieldName:"newAlternativeNameEn"}),l.isLoading?Q(Zt,{children:[" ",S(Qa,{})," "]}):S(tIt,{fieldName:"category",options:l.data.map(m=>S(Jt,{value:m.id,children:m.translatedName},m.id))}),u.isLoading?Q(Zt,{children:[" ",S(Qa,{})," "]}):S(eIt,{fieldName:"equipment",options:u.data}),c.isLoading?Q(Zt,{children:[" ",S(Qa,{})," "]}):Q(Tt,{children:[S(_c,{multiple:!0,id:"muscles",options:c.data.map(m=>m.id),getOptionDisabled:m=>a.includes(m),getOptionLabel:m=>c.data.find(g=>g.id===m).getName(),value:o,onChange:(m,g)=>{i(g)},renderInput:m=>S(dn,{...m,variant:"standard",label:t("exercises.muscles"),value:h.getFieldProps("muscles").value,onChange:g=>{h.setFieldValue(h.getFieldProps("muscles").name,g.target.value)}})}),S(_c,{multiple:!0,id:"secondary-muscles",options:c.data.map(m=>m.id),getOptionDisabled:m=>o.includes(m),getOptionLabel:m=>c.data.find(g=>g.id===m).getName(),value:a,onChange:(m,g)=>{s(g)},renderInput:m=>S(dn,{...m,variant:"standard",label:t("exercises.secondaryMuscles"),value:h.getFieldProps("muscles").value})})]}),Q(me,{container:!0,children:[S(me,{display:"flex",justifyContent:"center",size:6,children:S(Ql,{primaryMuscles:o.map(m=>c.data.find(g=>g.id===m)),secondaryMuscles:a.map(m=>c.data.find(g=>g.id===m)),isFront:!0})}),S(me,{display:"flex",justifyContent:"center",size:6,children:S(Ql,{primaryMuscles:o.map(m=>c.data.find(g=>g.id===m)),secondaryMuscles:a.map(m=>c.data.find(g=>g.id===m)),isFront:!1})})]})]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Zt,{sx:{mb:2},children:S("div",{children:S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function EIt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const xee=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=Qv(),[s,l]=x.useState(!1),[c,u]=x.useState(i.variationId),[f,h]=x.useState(i.newVariationExerciseId);x.useEffect(()=>{a(yIt(c))},[a,c]),x.useEffect(()=>{a(vIt(f))},[a,f]);const m=(y,v)=>()=>{y!==null?(v=null,y===i.variationId&&(y=null)):(y=null,v===i.newVariationExerciseId&&(v=null)),u(y),h(v)};let g;return r===null?g=i.newVariationExerciseId===o:g=r===i.variationId,S(Co,{disableGutters:!0,children:S(Fl,{onClick:m(r,o),children:Q(me,{container:!0,children:[S(me,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:S(Y1e,{max:4,spacing:"small",children:e.map(y=>y.mainImage?S(Kl,{src:y.mainImage.url},y.id):S(Kl,{children:S(Ju,{})},y.id))})}),Q(me,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(y=>S("p",{style:{margin:0},children:y.getTranslation().name},y.id)),!s&&e.length>5?S(Du,{onMouseEnter:()=>l(!0)}):null]}),S(me,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:S(qo,{edge:"start",checked:g,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),S(me,{size:12,children:S(ji,{sx:{pt:1}})})]})})})},TIt=({onContinue:e,onBack:t})=>{const[n]=je(),r=ade(),[o,i]=x.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=EIt(a.filter(l=>l.variationId!==null),l=>l.variationId),Q(Tt,{children:[Q(me,{container:!0,children:[S(me,{size:{xs:12,sm:6},children:S(at,{children:n("exercises.whatVariationsExist")})}),S(me,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:S(dn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:S(So,{position:"start",children:S(yV,{})})}})})]}),r.isLoading?S(Er,{}):S(go,{elevation:2,sx:{mt:2},children:Q(ai,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>S(xee,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>S(xee,{exercises:s.get(l)},"variation-"+l))]})}),Q(Ci,{severity:"info",variant:"filled",sx:{mt:2},children:[S(fh,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Zt,{sx:{mb:2},children:Q("div",{children:[S(ct,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};function OIt(e){const{t}=je(),[n,r]=J.useState(e.initial.toString()),o=DP(),i=Ra(),a=async s=>{r(s.target.value),await PB(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?Q(Fh,{fullWidth:!0,children:[S(jh,{id:"label-category",children:t("category")}),S(Lf,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>S(Jt,{value:s.id,children:s.translatedName},s.id))})]}):null}function IIt(e){const{t}=je(),[n,r]=J.useState(e.initial),o=kP(),i=Ra(),a=async s=>{r(s),await PB(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?S(_c,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>o.data.find(l=>l.id===s).translatedName,onChange:(s,l)=>a(l),renderInput:s=>S(dn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var Uo=function(){return Uo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Uo.apply(this,arguments)};function iA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function See(e){if(e){var t=e.textContent,n=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;e.style.direction=t&&n.test(t[0])?"rtl":"ltr"}}function Xhe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function PIt(){if(document.selection)return document.selection.createRange().parentElement();var e=window.getSelection();if(e&&e.rangeCount>0)return e.getRangeAt(0).startContainer.parentNode||void 0}function wee(e){return e?e.replace(/&nbsp;|\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>"):""}function AIt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function Jhe(e,t){typeof t=="function"?t(e):typeof t=="object"&&t&&(t.current=e)}var MIt=J.memo(J.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=t.placeholder,c=iA(t,["className","disabled","tagName","value","placeholder"]),u=J.useRef(null),f=J.useRef(s),h=J.useRef(c);return J.useEffect(function(){h.current=c;var m=u.current;m&&wee(f.current)!==wee(s)&&(f.current=s,m.innerHTML=s,AIt(m))}),J.useMemo(function(){function m(v){u.current=v,See(v),Jhe(v,n)}function g(v){var w,C,E=u.current;if(E){var I=E.innerHTML;I!==f.current&&((C=(w=h.current).onChange)===null||C===void 0||C.call(w,Uo(Uo({},v),{target:{value:I,name:c.name}}))),See(E),f.current=I}}var y=Xhe("rsw-ce",r);return J.createElement(i||"div",Uo(Uo({},c),{className:y,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(v){return(h.current.onBlur||g)(v)},onInput:g,onKeyDown:function(v){return(h.current.onKeyDown||g)(v)},onKeyUp:function(v){return(h.current.onKeyUp||g)(v)},placeholder:l,ref:m}))},[r,o,l,i])})),Zhe=J.createContext(void 0);function eme(e){var t=e.children,n=J.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return Uo(Uo({},s),a)})}return J.createElement(Zhe.Provider,{value:r},t)}function nC(){var e=J.useContext(Zhe);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}var Cee=[],P0=[];function RIt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=Cee.indexOf(i);a===-1&&(a=Cee.push(i)-1,P0[a]={}),n=P0[a]&&P0[a][r]?P0[a][r]:P0[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;u<c.length;u++)l.setAttribute(c[u],t.attributes[c[u]]);var f=r==="prepend"?"afterbegin":"beforeend";return i.insertAdjacentElement(f,l),l}}var DIt=".rsw-editor{border:1px solid #ddd;border-radius:.375rem;display:flex;flex-direction:column;min-height:100px;overflow:hidden}.rsw-ce{flex:1 0 auto;padding:.5rem}.rsw-ce:focus{outline:1px solid #668}.rsw-ce[contentEditable=true]:empty:not(:focus):before{color:grey;content:attr(placeholder);pointer-events:none}.rsw-html{background:transparent;border:none;font-family:monospace,Courier New}.rsw-separator{align-self:stretch;border-right:1px solid #ddd;display:flex;margin:0 3px}.rsw-dd{box-sizing:border-box;outline:none}.rsw-btn{background:transparent;border:0;color:#222;cursor:pointer;font-size:1em;height:2em;outline:none;padding:0;width:2em}.rsw-btn:hover{background:#eaeaea}.rsw-btn[data-active=true]{background:#e0e0e0}.rsw-toolbar{align-items:center;background-color:#f5f5f5;border-bottom:1px solid #ddd;display:flex}";RIt(DIt,{});var tme=J.forwardRef(function(t,n){var r=t.autoFocus,o=t.children,i=t.containerProps,a=t.onSelect,s=iA(t,["autoFocus","children","containerProps","onSelect"]),l=nC();J.useEffect(function(){return document.addEventListener("click",c),function(){return document.removeEventListener("click",c)}});function c(m){var g;m.target!==l.$el&&(!((g=l.$el)===null||g===void 0)&&g.contains(m.target)||l.update({$selection:void 0}))}function u(m){a==null||a(m),l.update({$selection:PIt()})}function f(m){l.update({$el:m}),Jhe(m,n),r&&m&&l.$el===void 0&&m.focus()}var h=Xhe("rsw-editor",i==null?void 0:i.className);return l.htmlMode?J.createElement("div",Uo({},i,{className:h}),o,J.createElement("textarea",Uo({},s,{className:"rsw-ce rsw-html"}))):J.createElement("div",Uo({},i,{className:h}),o,J.createElement(MIt,Uo({},s,{ref:f,onSelect:u})))});function kIt(){return J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",style:{verticalAlign:"text-top"}},J.createElement("path",{fill:"currentColor",d:"M6.99938 12.998v-2H20.9994v2H6.99938zm0 6.0001v-2H20.9994v2H6.99938zm0-12.00001v-2H20.9994v2H6.99938zm-4 1v-3h-1v-1h2v4h-1zm-1 9.00001v-1h3v4h-3v-1h2v-.5h-1v-1h1v-.5h-2zM4.25 10c.41421 0 .75.3358.75.75 0 .2024-.08017.3861-.2105.521L3.11983 13H5v1H2v-.9218L4 11H2v-1h2.25z"}))}function _It(){return J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",style:{verticalAlign:"text-top"}},J.createElement("path",{fill:"currentColor",d:"M7 5h14v2H7V5zm0 8v-2h14v2H7zM4 4.50001c.83 0 1.5.66992 1.5 1.5 0 .83007-.67 1.5-1.5 1.5s-1.5-.66993-1.5-1.5c0-.83008.67-1.5 1.5-1.5zM4 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zM7 19v-2h14v2H7zm-3-2.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z"}))}var nme=Zc("Bold","𝐁","bold"),rme=Zc("Bullet list",J.createElement(_It,null),"insertUnorderedList"),$It=Zc("Clear formatting","T̲ₓ","removeFormat"),ome=Zc("Italic","𝑰","italic"),NIt=Zc("Strike through",J.createElement("s",null,"ab"),"strikeThrough"),LIt=Zc("Link","🔗",function(e){var t=e.$selection;(t==null?void 0:t.nodeName)==="A"?document.execCommand("unlink"):document.execCommand("createLink",!1,prompt("URL","")||void 0)}),ime=Zc("Numbered list",J.createElement(kIt,null),"insertOrderedList"),ame=Zc("Redo","↷","redo"),sme=Zc("Underline",J.createElement("span",{style:{textDecoration:"underline"}},"𝐔"),"underline"),lme=Zc("Undo","↶","undo");function Zc(e,t,n){return r.displayName=e.replace(/\s/g,""),r;function r(o){var i=nC(),a=i.$el,s=i.$selection,l=!1;typeof n=="string"&&(l=!!s&&document.queryCommandState(n));function c(u){u.preventDefault(),document.activeElement!==a&&(a==null||a.focus()),typeof n=="function"?n(i):document.execCommand(n)}return i.htmlMode?null:J.createElement("button",Uo({className:"rsw-btn","data-active":l,onMouseDown:c,tabIndex:-1,title:e,type:"button"},o),t)}}var FIt=jIt("Styles",[["Normal","formatBlock","DIV"],["𝗛𝗲𝗮𝗱𝗲𝗿 𝟭","formatBlock","H1"],["Header 2","formatBlock","H2"],["𝙲𝚘𝚍𝚎","formatBlock","PRE"]]);function jIt(e,t){return n.displayName=e,n;function n(r){var o=nC(),i=o.$el,a=o.$selection,s=o.htmlMode;if(s)return null;var l=t.findIndex(function(u){return u[1]==="formatBlock"&&(a==null?void 0:a.nodeName)===u[2]});return J.createElement(BIt,Uo({},r,{items:t,onChange:c,selected:l,tabIndex:-1,title:e}));function c(u){var f=u.target,h=f.value,m=parseInt(h,10),g=t[m]||[],y=g[1],v=g[2];u.preventDefault(),document.activeElement!==i&&(i==null||i.focus()),typeof y=="function"?y(o):y&&document.execCommand(y,!1,v),setTimeout(function(){return f.value=h},10)}}}function BIt(e){var t=e.items,n=e.selected,r=iA(e,["items","selected"]);return J.createElement("select",Uo({className:"rsw-dd"},r,{value:n}),J.createElement("option",{hidden:!0},r.title),t.map(function(o,i){return J.createElement("option",{key:o[2],value:i},o[0])}))}function zIt(e){var t=iA(e,[]),n=nC();function r(){n.update({htmlMode:!n.htmlMode})}return J.createElement("button",Uo({className:"rsw-btn","data-active":n.htmlMode,onClick:r,tabIndex:-1,title:"HTML mode",type:"button"},t),"</>")}function Pg(e){var t=nC();return t.htmlMode?null:J.createElement("div",Uo({className:"rsw-separator"},e))}function cme(e){return J.createElement("div",Uo({className:"rsw-toolbar"},e))}J.forwardRef(function(t,n){return J.createElement(eme,null,J.createElement(tme,Uo({},t,{ref:n}),t.children||J.createElement(cme,null,J.createElement(lme,null),J.createElement(ame,null),J.createElement(Pg,null),J.createElement(nme,null),J.createElement(ome,null),J.createElement(sme,null),J.createElement(NIt,null),J.createElement(Pg,null),J.createElement(ime,null),J.createElement(rme,null),J.createElement(Pg,null),J.createElement(LIt,null),J.createElement($It,null),J.createElement(zIt,null),J.createElement(Pg,null),J.createElement(FIt,null))))});function VIt(e){return S(eme,{children:S(tme,{...e,children:Q(cme,{children:[S(nme,{}),S(ome,{}),S(sme,{}),S(Pg,{}),S(rme,{}),S(ime,{}),S(Pg,{}),S(lme,{}),S(ame,{})]})})})}function UH(e){const[t,n,r]=us(e.fieldName);return Q(Tt,{children:[S("div",{"data-testid":"jodit-editor",children:S(VIt,{value:t.value,onChange:o=>r.setValue(o.target.value)})}),n.touched&&!!n.error&&S(aw,{error:!0,children:n.error})]})}const HIt=({exerciseId:e,image:t,canDelete:n})=>{const[r]=je(),o=alt(e);return Q(ho,{children:[S($c,{component:"img",image:t.url,sx:{height:120},alt:""}),S(ll,{children:n&&S(ct,{color:"primary",onClick:()=>o.mutate(t.id),children:r("delete")})})]})},UIt=({exerciseId:e})=>{const[t]=je(),n=Ra(),r=slt(e),o=async i=>{var s;if(!((s=i.target.files)!=null&&s.length))return;const[a]=i.target.files;n.isSuccess&&await r.mutate({exerciseId:e,image:a,imageData:{url:"",file:a,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return Q(ho,{children:[S($c,{children:S(Zt,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:S(Jue,{sx:{fontSize:80,color:"gray"}})})}),S(ll,{children:Q(ct,{component:"label",children:[t("add"),S("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:o})]})})]})};function Eee(e){const{t}=je(),n=_v(),r=async o=>{e.setValue(o),await PB(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?S(_c,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(t),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>S(dn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const GIt=({video:e,canDelete:t})=>{const[n]=je();return Q(ho,{children:[S($c,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),S(ll,{children:t&&S(ct,{color:"primary",onClick:()=>O2e(e.id),children:n("delete")})})]})},qIt=({exerciseId:e})=>{const[t]=je(),n=Ra(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await T2e(e,n.data.username,i)};return Q(ho,{children:[S($c,{children:S(Zt,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:S(Jue,{sx:{fontSize:80,color:"gray"}})})}),S(ll,{children:Q(ct,{component:"label",children:[t("add"),S("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},WIt="check-permission",KIt=async e=>{const t=ft(WIt,{query:{permission:e}}),n=await it.get(t,{headers:ht()});return n.status===400?!1:n.data.result};function ef(e){return yr({queryKey:[l2e,e],queryFn:()=>KIt(e.valueOf())})}var Pu=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.ADD_IMAGE="exercises.add_exerciseimage",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.ADD_VIDEO="exercises.add_exercisevideo",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(Pu||{});const YIt=({exerciseId:e,language:t})=>{const[n]=je(),[r,o]=x.useState(!1),[i,a]=x.useState([]),[s,l]=x.useState([]),c=rlt(e),u=olt(e),f=ilt(e),h=ef(Pu.ADD_IMAGE),m=ef(Pu.DELETE_IMAGE),g=ef(Pu.ADD_VIDEO),y=ef(Pu.DELETE_VIDEO),v=ef(Pu.EDIT_EXERCISE),w=_v(),C=Ra(),E=c.data;if(x.useEffect(()=>{c.data!==void 0&&(a(E.muscles.map(M=>M.id)),l(E.musclesSecondary.map(M=>M.id)))},[c.data]),c.isLoading||w.isLoading||c.isLoading||C.isLoading||h.isLoading||m.isLoading||g.isLoading||y.isLoading||v.isLoading)return S(Qa,{});const I=E.getTranslation(t),P=t.id!==(I==null?void 0:I.language)?new Dre(null,null,"","",t.id):I,R=E.getTranslation(),D=Wo({name:zH(n),alternativeNames:VH(n),description:HH(n)});return Q(Tt,{children:[S(Ti,{initialValues:{name:P.name,alternativeNames:P.aliases.map(M=>M.alias),description:P.description},enableReinitialize:!0,validationSchema:D,onSubmit:async M=>{const A=P.id?await f.mutateAsync({id:P.id,exerciseId:E.id,languageId:t.id,name:M.name,description:M.description,author:""}):await u.mutateAsync({exerciseId:E.id,languageId:t.id,name:M.name,description:M.description,author:C.data.username}),_=P.aliases.map(j=>j.alias),N=M.alternativeNames,B=N.filter(j=>!_.includes(j)),H=_.filter(j=>!N.includes(j));B.forEach(j=>{XN(A.id,j)}),H.forEach(j=>{E2e(P.aliases.find(L=>L.alias===j).id)}),o(!0)},children:S(fi,{children:Q(me,{container:!0,spacing:1,children:[r&&Q(me,{size:12,children:[S(Ci,{severity:"success",action:S(pn,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:S(cw,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),S(yi,{})]}),S(me,{size:6,children:S(at,{variant:"h5",children:n("English")})}),S(me,{size:6,children:Q(at,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),Q(me,{size:12,children:[S(yi,{}),S(at,{variant:"h6",children:n("name")})]}),Q(me,{size:6,children:[R.name,S("ul",{children:R.aliases.map(M=>S("li",{children:M.alias},M.id))})]}),Q(me,{size:6,children:[S(Zt,{mb:2,children:S(BH,{fieldName:"name"})}),S(jH,{fieldName:"alternativeNames"})]}),S(me,{size:12,children:S(yi,{})}),S(me,{size:12,children:S(at,{variant:"h6",children:n("exercises.description")})}),S(me,{size:{xs:12,md:6},children:S("div",{dangerouslySetInnerHTML:{__html:R.description}})}),S(me,{size:{xs:12,md:6},children:S(UH,{fieldName:"description"})}),v.data&&Q(Tt,{children:[S(me,{size:12,children:S(yi,{})}),S(me,{size:{xs:12,md:6},children:S(OIt,{exerciseId:E.id,initial:E.category.id})}),S(me,{size:{xs:12,md:6},children:S(IIt,{exerciseId:E.id,initial:E.equipment.map(M=>M.id)})})]}),Q(me,{size:12,children:[S(yi,{}),S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},disabled:c.isLoading||u.isPending||f.isPending,children:n("save")})]})]})})}),S(yi,{}),S(at,{variant:"h6",children:n("images")}),Q(me,{container:!0,spacing:2,mt:2,children:[h.data&&S(me,{size:{md:3},children:S(UIt,{exerciseId:E.id})},"add"),E.images.map(M=>S(me,{size:{md:3},children:S(HIt,{exerciseId:E.id,image:M,canDelete:m.data})},M.id))]}),S(yi,{}),S(at,{variant:"h6",children:n("videos")}),Q(me,{container:!0,spacing:2,mt:2,children:[g.data&&S(me,{size:{md:3},children:S(qIt,{exerciseId:E.id})},"add"),E.videos.map(M=>S(me,{size:{md:3},children:S(GIt,{video:M,canDelete:y.data})},M.id))]}),v.data&&Q(Tt,{children:[S(yi,{}),S(at,{variant:"h6",children:n("exercises.muscles")}),Q(me,{container:!0,spacing:1,mt:2,children:[S(me,{size:{xs:12,md:6},children:S(Eee,{exerciseId:E.id,value:i,setValue:a,blocked:s,isMain:!0})}),S(me,{size:{xs:12,md:6},children:S(Eee,{exerciseId:E.id,value:s,setValue:l,blocked:i,isMain:!1})}),S(me,{size:{sm:6},offset:{md:3},children:Q(me,{container:!0,children:[S(me,{display:"flex",justifyContent:"center",size:6,children:S(Ql,{primaryMuscles:i.map(M=>w.data.find(A=>A.id===M)),secondaryMuscles:s.map(M=>w.data.find(A=>A.id===M)),isFront:!0})}),S(me,{display:"flex",justifyContent:"center",size:6,children:S(Ql,{primaryMuscles:i.map(M=>w.data.find(A=>A.id===M)),secondaryMuscles:s.map(M=>w.data.find(A=>A.id===M)),isFront:!1})})]})})]})]})]})},QIt=({mainImage:e,sideImages:t})=>Q(me,{container:!0,spacing:1,children:[e&&S(me,{size:12,children:S(ho,{children:S($c,{component:"img",image:e.url,alt:""})})}),t.map(n=>S(me,{size:6,children:S(ho,{children:S($c,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),XIt=({videos:e})=>S(me,{container:!0,spacing:1,children:e.map(t=>S(me,{size:6,children:S(ho,{children:S($c,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function GH(){var r,o;const e=Ra(),t=ef(Pu.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const JIt=({setEditMode:e})=>{const[t]=je();return Q(Zt,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[S(at,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),S(at,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),S(ct,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},ZIt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=je(),i=GH(),a=e.getTranslation(n),s=n&&n.id!==a.language;return Q(me,{container:!0,children:[s&&i.canContribute&&S(me,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:S(JIt,{setEditMode:r})}),Q(me,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&Q(Tt,{children:[Q("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),S(yi,{})]}),S(at,{variant:"h5",children:o("exercises.description")}),S("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),S(yi,{}),(a==null?void 0:a.notes.length)>0&&S(at,{variant:"h5",children:o("exercises.notes")}),S("ul",{children:a==null?void 0:a.notes.map(c=>S("li",{children:c.note},c.id))}),S(yi,{}),S(at,{variant:"h5",children:o("exercises.muscles")}),Q(me,{container:!0,children:[S(me,{order:{xs:1},size:{xs:6,md:3},children:S(Ql,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),Q(me,{order:{xs:2,md:3},size:{xs:6,md:3},children:[S("h3",{children:o("exercises.primaryMuscles")}),S("ul",{children:e.muscles.map(c=>S("li",{children:c.getName()},c.id))})]}),S(me,{order:{xs:3,md:2},size:{xs:6,md:3},children:S(Ql,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),Q(me,{order:{xs:4},size:{xs:6,md:3},children:[S("h3",{children:o("exercises.secondaryMuscles")}),S("ul",{children:e.musclesSecondary.map(c=>S("li",{children:c.getName()},c.id))})]})]}),S(yi,{})]}),Q(me,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[S(QIt,{mainImage:e.mainImage,sideImages:e.sideImages}),S(yi,{}),S(XIt,{videos:e.videos})]}),Q(me,{order:{xs:3},size:12,children:[S(ji,{}),S(yi,{}),t.length>0&&S(at,{variant:"h5",children:o("exercises.variations")}),S(me,{container:!0,spacing:2,children:t.map(c=>S(me,{size:{xs:6,md:2},children:S(Rde,{exercise:c,language:n},c.id)},c.id))})]}),S(me,{order:{xs:4},size:12,children:Q(at,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",S("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};function ePt(e){var f,h;const[t,n]=J.useState(null),[r,o]=J.useState(null),[i]=je(),a=id(),s=()=>{o(null),n(null)},l=async()=>{var m;await x2e((m=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:m.id),e.onClose(),e.onChangeLanguage()},c=async(m=!1)=>{m?await pq(e.currentExercise.id,r==null?void 0:r.uuid):await pq(e.currentExercise.id),e.onClose(),a("../overview")},u=async m=>{const g=m!==void 0?m:t;if(g!==null)try{const y=await pv(g);o(y)}catch{o(null)}};return Q(Tt,{children:[S(ZE,{id:"alert-dialog-title",children:i("delete")}),Q(Ax,{children:[S("p",{children:i("exercises.deleteExerciseBody",{name:(f=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:f.name,language:(h=e.currentLanguage)==null?void 0:h.nameLong})}),S("p",{children:i("cannotBeUndone")}),S("p",{children:S("b",{children:i("exercises.replacements")})}),S("p",{children:i("exercises.replacementsInfoText")}),S("p",{children:i("exercises.replacementsSearch")}),S(Wy,{callback:m=>{m!==null&&(n(m.data.base_id),u(m.data.base_id))}}),S(dn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async m=>{n(m.target.value!==""?parseInt(m.target.value):null)},value:t??"",InputProps:{endAdornment:S(So,{position:"start",children:S(pn,{onClick:()=>u(),children:S(Ist,{})})})},fullWidth:!0,variant:"standard"}),r===null&&S(Tt,{children:S("p",{children:S("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&Q(Tt,{children:[Q("p",{children:["Selected exercise for replacement:",S(Go,{title:i("copyToClipboard"),children:S(pn,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:S(Nst,{})})})]}),Q(Co,{disablePadding:!0,children:[S(fB,{children:S(Kl,{children:r.mainImage?S(Kl,{alt:"",src:`${wB}${r.mainImage.url}`,variant:"rounded"}):S(Ju,{})})}),S(Wr,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),S(pn,{onClick:s,children:S(_st,{})})]})]})]}),Q(Px,{children:[S(ct,{onClick:()=>e.onClose(),children:i("cancel")}),S(ct,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),S(ct,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),S(ct,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const tPt="_root_l288f_1",nPt="_detail_language_l288f_4",rPt="_detail_l288f_4",oPt="_languages_l288f_28",iPt="_language_l288f_28",aPt="_header_l288f_52",sPt="_toolbar_l288f_55",Tp={root:tPt,detail_language:nPt,detail:rPt,languages:oPt,language:iPt,header:aPt,toolbar:sPt},lPt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var O,P,R;const[a,s]=x.useState(null),[l,c]=J.useState(!1),u=!!a,[f]=je(),h=ef(Pu.DELETE_EXERCISE),m=ef(Pu.EDIT_EXERCISE),g=Ra(),y=g.isSuccess&&g.data===null;let v=!1;g.isSuccess&&m.isSuccess&&(v=m.data||g.data!==null&&g.data.isTrustworthy);const w=D=>{s(D.currentTarget)},C=()=>{s(null)},E=D=>{n(D),C()},I=t.map(D=>Q(Jt,{onClick:()=>E(D),selected:(r==null?void 0:r.id)===D.id,children:[S(Wr,{children:D.nameLong}),S(nl,{children:e.availableLanguages.includes(D.id)?S(Kst,{}):S(Ko,{})})]},D.nameShort));return S(me,{container:!0,children:S(me,{size:12,children:Q("div",{className:Tp.root,children:[S(Ix,{open:l,onClose:()=>c(!1),children:S(ePt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),Q("div",{className:Tp.detail_language,children:[Q("div",{className:Tp.detail,children:[S(Ro,{to:"../overview",children:f("exercises.exercises")})," > ",(O=e.getTranslation(r))==null?void 0:O.name]}),S("div",{className:Tp.languages,children:Q("div",{className:Tp.language,children:[S(ct,{size:"small",id:"basic-button",onClick:w,startIcon:S(ode,{}),children:r==null?void 0:r.nameLong}),Q(ss,{id:"basic-menu",anchorEl:a,open:u,onClose:C,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[S(Jt,{disabled:!0,children:f("exercises.changeExerciseLanguage")}),S(ji,{}),I]})]})})]}),Q("div",{className:Tp.header,children:[S(at,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(P=e.getTranslation(r))==null?void 0:P.name}),!y&&Q("nav",{className:Tp.toolbar,children:[h.isSuccess&&h.data&&(r==null?void 0:r.id)===((R=e.getTranslation(r))==null?void 0:R.language)&&S(ct,{onClick:()=>c(!0),children:f("delete")}),v&&S(ct,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),S(ct,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),Q(Ft,{direction:"row",spacing:1,mt:2,children:[S(Wl,{label:e.category.translatedName,size:"small"}),e.equipment.map(D=>S(Wl,{label:D.translatedName,variant:"outlined",size:"small"},D.id))]})]})})})},yi=()=>S(Zt,{sx:{height:20}}),cPt=()=>{var g;const[e,t]=x.useState(t2e),[n,r]=x.useState(!1),{i18n:o}=je(),i=id(),a=Yc(),s=Ma(),l=parseInt(s.exerciseId??"");if(Number.isNaN(l))return S("p",{children:"Please pass an integer as the exercise id."});const c=yr({queryKey:[s2e,l],queryFn:()=>pv(l),enabled:a.isSuccess}),u=yr({queryKey:[a2e,(g=c.data)==null?void 0:g.variationId],queryFn:()=>{var y;return m2e((y=c.data)==null?void 0:y.variationId)},enabled:c.isSuccess});if(J.useEffect(()=>{if(a.data===void 0)return;const y=Gu(o.language,a.data);t(y)},[a.data]),c.isError||a.isError||u.isError)return i("/not-found"),null;const f=y=>{const v=Gu(y.nameShort,a.data);v!==void 0&&t(v)},h=u.isSuccess?u.data.filter(y=>y.id!==l):[];let m;return c.isSuccess&&a.isSuccess&&(m=n?S(YIt,{exerciseId:c.data.id,language:e}):S(ZIt,{exercise:c.data,language:e,variations:h,setEditMode:r})),Q(Tt,{children:[c.isSuccess&&a.isSuccess&&S(Uu,{children:S(lPt,{exercise:c.data,languages:a.data,changeLanguage:f,language:e,setEditMode:r,editMode:n})}),S(yi,{}),Q(Uu,{maxWidth:"lg",children:[c.isLoading&&a.isLoading&&S(Qa,{}),m]})]})};function ume(e){const[t]=je(),[n,r,o]=us(e.fieldName),[i,a]=x.useState(""),s=u=>{o.setValue(n.value.filter((f,h)=>h!==u))},l=(u,f)=>{n.value[u]=f,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return Q(Tt,{children:[S(me,{size:12,children:S(dn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:S(So,{position:"end",children:S(pn,{onClick:c,children:S(Ko,{})})})}})}),n.value.map((u,f)=>S(dn,{fullWidth:!0,value:u,onChange:h=>l(f,h.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:S(So,{position:"end",children:S(pn,{onClick:()=>s(f),children:S(MP,{})})})}},f))]})}const uPt=({onContinue:e,onBack:t})=>{const[n]=je(),[r,o]=Qv(),i=Wo({description:HH(n),notes:Khe(n)});return S(Ti,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(aIt(a.description)),o(sIt(a.notes)),e()},children:S(fi,{children:Q(Ft,{children:[S(UH,{fieldName:"description"}),S(yi,{}),S(ume,{fieldName:"notes"}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Zt,{sx:{mb:2},children:Q("div",{children:[S(ct,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},dPt=({onContinue:e,onBack:t})=>{const[n]=je(),r=Yc(),[o,i]=Qv(),[a,s]=x.useState(o.languageId!==null),l=Wo(a?{description:HH(n),name:zH(n),alternativeNames:VH(n),notes:Khe(n),language:Do().required()}:{});return S(Ti,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(cIt(c.name)),i(uIt(c.description)),i(fIt(c.alternativeNames)),i(bIt(c.language===""?null:c.language)),i(dIt(c.notes)),e()},children:c=>Q(fi,{children:[Q(Ft,{spacing:2,children:[S(Mx,{children:S(os,{checked:a,onClick:()=>s(!a),control:S(qo,{}),label:n("exercises.translateExerciseNow")})}),a&&Q(Tt,{children:[r.isLoading?S(Zt,{children:S(Qa,{})}):Q(Fh,{fullWidth:!0,children:[S(jh,{id:"label-language",children:n("language")}),S(Lf,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==bh).map(u=>Q(Jt,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),S(BH,{fieldName:"name"}),S(jH,{fieldName:"alternativeNames"}),S(UH,{fieldName:"description"}),S(yi,{}),S(ume,{fieldName:"notes"})]})]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Zt,{sx:{mb:2},children:Q("div",{children:[S(ct,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function fPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function pPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function hPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function mPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function gPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function yPt(e){const[t]=je(),[n,r]=x.useState(Cu.PHOTO),[o,i,a]=us(e.fieldName);return Q(VMe,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[S(Zb,{value:Cu.PHOTO,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Wst,{}),S(at,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),S(Zb,{value:Cu.THREE_D,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(zst,{}),S(at,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),S(Zb,{value:Cu.LINE_ART,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Vst,{}),S(at,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),S(Zb,{value:Cu.LOW_POLY,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Hst,{}),S(at,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),S(Zb,{value:Cu.OTHER,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Ust,{}),S(at,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const vPt=({onContinue:e,onBack:t})=>{const[n]=je(),r=Ra(),[o,i]=Qv(),[a,s]=x.useState(o.images),[l,c]=x.useState(void 0),[u,f]=J.useState(!1),h=()=>f(!1);x.useEffect(()=>{i(xIt(a))},[i,a]);const m=C=>{var O;if(!((O=C.target.files)!=null&&O.length))return;const[E]=C.target.files,I=URL.createObjectURL(E);f(!0),c({url:I,file:E,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:Cu.PHOTO.toString()})},g=C=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:C.author,authorUrl:C.authorUrl,title:C.title,derivativeSourceUrl:C.derivativeSourceUrl,objectUrl:C.objectUrl,style:C.imageStyle.toString()})),h()},y=C=>{const E=a.filter(I=>I.url!==C);s(E)},v=()=>{e()};return Q("div",{children:[S(lv,{open:u,onClose:h,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(Zt,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[S(at,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),Q(me,{container:!0,spacing:2,children:[S(me,{size:4,children:l&&S("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),S(me,{size:8,children:S(Ti,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:Cu.PHOTO},onSubmit:C=>{console.log(C),g(C)},children:C=>Q(fi,{children:[Q(Ft,{spacing:2,children:[S(gPt,{fieldName:"title"}),S(mPt,{fieldName:"objectUrl"}),S(fPt,{fieldName:"author"}),S(pPt,{fieldName:"authorUrl"}),S(hPt,{fieldName:"derivativeSourceUrl"}),S(yPt,{fieldName:"imageStyle"}),Q(Ci,{icon:S(nde,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",S("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),S(at,{children:n("exercises.compatibleImagesCC")}),Q(Ft,{direction:"row",justifyContent:"center",children:[Q("div",{children:[S("label",{htmlFor:"camera-input",children:S(Ast,{fontSize:"large",sx:{m:2}})}),S("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:m})]}),Q("div",{children:[S("label",{htmlFor:"image-input",children:S($st,{fontSize:"large",sx:{m:2}})}),S("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:m})]})]}),S(Sne,{cols:3,style:{maxHeight:"400px"},children:a.map(C=>Q(wne,{children:[S("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:C.url,alt:"",loading:"lazy"}),S(BOe,{title:C.title,subtitle:C.author,actionIcon:S(pn,{onClick:()=>y(C.url),sx:{color:"white"},children:S(Lst,{})})})]},C.url))}),S(at,{children:n("forms.supportedImageFormats")}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Zt,{sx:{mb:2},children:Q(Tt,{children:[S(ct,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",onClick:v,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},bPt="exercisecomment",Tee=async e=>{const t=new Rre,n=ft(bPt),r=await it.post(n,t.toJson(e),{headers:ht()});return t.fromJson(r.data)},xPt="variation",SPt=async()=>{const e=ft(xPt);return(await it.post(e,{},{headers:ht()})).data.id},wPt=({onBack:e})=>{const[t,n]=je(),[r]=Qv(),o=id(),i=DP(),a=Yc(),s=_v(),l=kP(),c=Ra(),[u,f]=x.useState("initial"),h=async()=>{f("loading");let g;r.newVariationExerciseId!==null?g=await SPt():g=r.variationId;const y=await g2e(r.category,r.equipment,r.muscles,r.musclesSecondary,g,c.data.username),v=await QN({exerciseId:y,languageId:bh,name:r.nameEn,description:r.descriptionEn,author:c.data.username});for(const w of r.alternativeNamesEn)await XN(v.id,w);for(const w of r.images)await jre({exerciseId:y,image:w.file,imageData:w});for(const w of r.notesEn)await Tee(new WN(null,v.id,w));if(r.languageId!==null){const w=await QN({exerciseId:y,languageId:r.languageId,name:r.nameI18n,description:r.descriptionI18n,author:c.data.username});for(const C of r.alternativeNamesI18n)await XN(w.id,C);for(const C of r.notesI18n)await Tee(new WN(null,w.id,C))}console.log("Exercise created"),f("done")},m=()=>{o(cn(Qt.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?S(Er,{}):Q(Tt,{children:[S(at,{variant:"h6",children:t("exercises.step1HeaderBasics")}),S(Fc,{children:S(Nc,{children:Q(Lc,{children:[Q(ln,{children:[S(ke,{children:t("name")}),S(ke,{children:r.nameEn})]}),Q(ln,{children:[S(ke,{children:t("exercises.alternativeNames")}),S(ke,{children:r.alternativeNamesEn.join(", ")})]}),Q(ln,{children:[S(ke,{children:t("description")}),S(ke,{children:r.descriptionEn})]}),Q(ln,{children:[S(ke,{children:t("exercises.notes")}),S(ke,{children:r.notesEn.map(g=>Q(Tt,{children:[g,S("br",{})]}))})]}),Q(ln,{children:[S(ke,{children:t("category")}),S(ke,{children:i.data.find(g=>g.id===r.category).translatedName})]}),Q(ln,{children:[S(ke,{children:t("exercises.equipment")}),S(ke,{children:r.equipment.map(g=>l.data.find(y=>y.id===g).translatedName).join(", ")})]}),Q(ln,{children:[S(ke,{children:t("exercises.muscles")}),S(ke,{children:r.muscles.map(g=>s.data.find(y=>y.id===g).getName()).join(", ")})]}),Q(ln,{children:[S(ke,{children:t("exercises.secondaryMuscles")}),S(ke,{children:r.musclesSecondary.map(g=>s.data.find(y=>y.id===g).getName()).join(", ")})]}),Q(ln,{children:[S(ke,{children:t("exercises.variations")}),Q(ke,{children:[r.variationId," / ",r.newVariationExerciseId]})]})]})})}),r.images.length>0&&S(Sne,{cols:3,style:{maxHeight:"200px"},children:r.images.map(g=>S(wne,{children:S("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:g.url,alt:"",loading:"lazy"})},g.url))}),r.languageId!==null&&Q(Tt,{children:[S(at,{variant:"h6",sx:{mt:3},children:a.data.find(g=>g.id===r.languageId).nameLong}),S(Fc,{children:S(Nc,{children:Q(Lc,{children:[Q(ln,{children:[S(ke,{children:t("name")}),S(ke,{children:r.nameI18n})]}),Q(ln,{children:[S(ke,{children:t("exercises.alternativeNames")}),S(ke,{children:r.alternativeNamesI18n.join(", ")})]}),Q(ln,{children:[S(ke,{children:t("description")}),S(ke,{children:r.descriptionI18n})]}),Q(ln,{children:[S(ke,{children:t("exercises.notes")}),S(ke,{children:r.notesI18n.map(g=>Q(Tt,{children:[g,S("br",{})]}))})]})]})})})]}),u!=="done"?S(Ci,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):Q(Ci,{severity:"success",sx:{mt:2},children:[S(fh,{children:t("success")}),t("exercises.cacheWarning")]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Zt,{sx:{mb:2},children:Q("div",{children:[u!=="done"&&S(ct,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&S(ct,{variant:"contained",disabled:u!=="initial",onClick:h,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&Q(ct,{variant:"contained",onClick:m,sx:{mt:1,mr:1},color:"success",children:[t("overview"),S(Gst,{})]})]})})})})]})},CPt=()=>{const[e]=je(),[t,n]=J.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return S(wIt,{children:Q(Uu,{maxWidth:"md",children:[S(Ft,{direction:"row",children:S(at,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),S(Zt,{children:Q(CAe,{activeStep:t,orientation:"vertical",children:[Q(Vm,{children:[S(Pp,{children:e("exercises.step1HeaderBasics")}),S(Hm,{children:S(CIt,{onContinue:r,onBack:o})})]},1),Q(Vm,{children:[S(Pp,{children:e("exercises.variations")}),S(Hm,{children:S(TIt,{onContinue:r,onBack:o})})]},2),Q(Vm,{children:[S(Pp,{children:e("description")}),S(Hm,{children:S(uPt,{onContinue:r,onBack:o})})]},3),Q(Vm,{children:[S(Pp,{children:e("translation")}),S(Hm,{children:S(dPt,{onContinue:r,onBack:o})})]},4),Q(Vm,{children:[S(Pp,{children:e("images")}),S(Hm,{children:S(vPt,{onContinue:r,onBack:o})})]},5),Q(Vm,{children:[S(Pp,{children:e("overview")}),S(Hm,{children:S(wPt,{onBack:o})})]},6)]})})]})})},EPt=()=>{const[e]=je(),t=GH();return Q(Uu,{maxWidth:"md",children:[S(at,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),Q(Zt,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[S(at,{mb:2,children:e("exercises.notEnoughRights",{days:n2e})}),!t.anonymous&&!t.emailVerified&&S(ct,{variant:"contained",href:"/user/preferences",endIcon:S(Ost,{}),children:e("preferences")})]})]})},TPt=()=>{const e=GH();return S(Tt,{children:e.canContribute?S(CPt,{}):S(EPt,{})})},OPt=()=>S("div",{children:"Add Weight Page"}),IPt=({day:e,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})=>{const i=Lr(),a=Tf(i.breakpoints.down("sm")),s=Tf(i.breakpoints.down("md")),l=xa(e.date,r.date),c=xa(e.date,n),u=e.date.getTime()<=n.getTime(),f=e.date.getDay()===6||e.date.getDay()===0,h=()=>l||c?"white":u?f?"#E53945":"black":"gray",m=()=>a?35:s?40:50,g=()=>a?8:s?9:10,y=()=>e.measurements.length>0||e.weightEntry!==void 0||e.workoutSession!==void 0,v=()=>{u&&o(e)},w=m(),C=g();return Q("div",{style:{position:"relative",width:`${w}px`,height:`${w+C/2}px`,display:"flex",flexDirection:"column",alignItems:"center"},children:[S("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:`${w}px`,height:`${w}px`,fontSize:a?"0.8rem":s?"0.9rem":"1rem",color:l||c?"white":h(),backgroundColor:l?"#E53945":c?"#FEC107":"transparent",borderRadius:"50%",fontWeight:"bold",cursor:u?"pointer":"default",opacity:e.date.getMonth()!==t?.25:1},"data-testid":`day-${Zn(e.date)}`,onClick:v,children:e.date.getDate()}),y()&&S("div",{style:{width:`${C}px`,height:`${C}px`,backgroundColor:"black",borderRadius:"50%",position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",zIndex:2}})]})},PPt=({days:e,currentMonth:t,currentDate:n,selectedDay:r,onDayClick:o})=>{const{i18n:i}=je(),a=Array.from({length:7},(s,l)=>new Date(1970,0,l+5).toLocaleString(i.language,{weekday:"short"}));return Q(me,{container:!0,spacing:1,rowSpacing:2,children:[a.map((s,l)=>S(me,{size:12/7,children:S(at,{variant:"body1",sx:{fontWeight:"bold",textAlign:"center"},children:s})},`weekday-${l}`)),e.map((s,l)=>S(me,{size:12/7,sx:{display:"flex",justifyContent:"center"},children:S(IPt,{day:s,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})},`day-${l}`))]})},APt=({currentMonth:e,currentYear:t,onPrevMonth:n,onNextMonth:r})=>{const{i18n:o}=je(),i=Array.from({length:12},(a,s)=>new Date(2024,s,1).toLocaleString(o.language,{month:"long"}));return Q("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:"3%"},children:[S(ct,{variant:"outlined",onClick:n,children:"<"}),Q(at,{variant:"h5",children:[i[e]," ",t]}),S(ct,{variant:"outlined",onClick:r,children:">"})]})};class MPt{constructor(t,n,r,o){this.name=t,this.unit=n,this.value=r,this.date=o}}const RPt=({selectedDay:e})=>{const[t]=je(),[n,r]=J.useState(!1),[o,i]=J.useState(!1),[a,s]=J.useState(!1);return Q(ho,{sx:{width:{xs:"auto",md:"45%"},height:{xs:"60%",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2}},children:[S(Jl,{title:Q(at,{variant:"h5",component:"div",sx:{fontWeight:"bold"},children:[t("entries")," - ",e.date.toLocaleDateString()]})}),S(Fi,{sx:{flex:1,height:"100%",overflow:"auto",display:"flex",flexDirection:"column",gap:2},children:Q(ai,{children:[e.weightEntry&&S(Co,{children:S(Wr,{primary:t("weight"),secondary:e.weightEntry.weight.toFixed(1),sx:{pl:2}})}),e.measurements.length===1&&S(Co,{children:S(Wr,{primary:t("measurements.measurements"),secondary:`${e.measurements[0].name}: ${e.measurements[0].value} ${e.measurements[0].unit}`,sx:{pl:2}})}),e.measurements.length>1&&Q(Tt,{children:[S(Co,{children:Q(Fl,{onClick:()=>r(!n),selected:n,children:[S(Wr,{primary:t("measurements.measurements")}),n?S(J0,{}):S(Du,{})]})}),S(aa,{in:n,timeout:"auto",unmountOnExit:!0,children:S(ai,{sx:{pl:4,pt:0},children:e.measurements.map((l,c)=>S(Co,{dense:!0,children:S(Wr,{primary:l.name,secondary:`${l.value} ${l.unit}`})},c))})})]}),e.workoutSession&&Q(Tt,{children:[S(Co,{children:Q(Fl,{onClick:()=>i(!o),selected:o,children:[S(Wr,{primary:t("routines.workoutSession"),secondary:e.workoutSession.textRepresentation,sx:{"& .MuiListItemText-secondary":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}),o?S(J0,{}):S(Du,{})]})}),S(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:S(ai,{sx:{pl:4,pt:0},children:e.workoutSession.logs.map((l,c)=>{var u;return S(Co,{dense:!0,children:S(Wr,{primary:(u=l.exerciseObj)==null?void 0:u.getTranslation().name,secondary:`${l.repetitions} × ${l.weight} `})},c)})})})]}),e.nutritionLogs.length>0&&Q(Tt,{children:[S(Co,{children:Q(Fl,{onClick:()=>s(!a),selected:a,children:[S(Wr,{primary:t("nutrition.nutritionalDiary")}),a?S(J0,{}):S(Du,{})]})}),S(aa,{in:a,timeout:"auto",unmountOnExit:!0,children:S(ai,{sx:{pl:4,pt:0},children:e.nutritionLogs.map((l,c)=>{var u;return S(Co,{dense:!0,children:S(Wr,{primary:(u=l.ingredient)==null?void 0:u.name,secondary:`${l.amount} ${t("nutrition.gramShort")}`})},c)})})})]})]})})]})},DPt=()=>{const[e]=je(),t=new Date,[n,r]=x.useState(t.getMonth()),[o,i]=x.useState(t.getFullYear()),a=new Date(o,n,1),s=new Date(o,n+1,0),l=Bw(),c=Sst({filtersetQuerySessions:{date__gte:Zn(a),date__lte:Zn(s)},filtersetQueryLogs:{date__gte:Zn(a),date__lte:Zn(s)}}),u=kde({filtersetQueryEntries:{date__gte:Zn(a),date__lte:Zn(s)}}),f=nFe({filtersetQuery:{datetime__gte:Zn(a),datetime__lte:Zn(s)}}),h=l.isLoading||c.isLoading||u.isLoading||f.isLoading,m=l.isSuccess&&c.isSuccess&&u.isSuccess&&f.isSuccess,g=u.data,y=(g==null?void 0:g.flatMap(A=>A.entries.map(_=>new MPt(A.name,A.unit,_.value,_.date))))??[],v=(A,_)=>{var W,K,G;const N=new Date(A,_,1),B=[];let j=new Date(A,_,1).getDay();j=j===0?6:j-1;for(let q=0;q<j;q++)B.push({date:new Date(A,_,-j+q+1),weightEntry:void 0,measurements:[],nutritionLogs:[],workoutSession:void 0});for(;N.getMonth()===_;)B.push({date:new Date(N),weightEntry:(W=l.data)==null?void 0:W.find(q=>xa(q.date,N)),measurements:y.filter(q=>xa(q.date,N))||[],workoutSession:((K=c.data)==null?void 0:K.find(q=>xa(q.date,N)))||void 0,nutritionLogs:((G=f.data)==null?void 0:G.filter(q=>xa(q.datetime,N)))||[]}),N.setDate(N.getDate()+1);j=new Date(A,_+1,0).getDay();const V=j===0?0:7-j;for(let q=1;q<=V;q++)B.push({date:new Date(A,_+1,q),weightEntry:void 0,workoutSession:void 0,measurements:[],nutritionLogs:[]});return B},w={date:t,weightEntry:void 0,workoutSession:void 0,measurements:[],nutritionLogs:[]},C=x.useMemo(()=>v(o,n),[o,n,l.data,c.data,u.data,f.data]),[E,I]=x.useState(C.find(A=>xa(A.date,t))||w),O=Lr(),P=Tf(O.breakpoints.down("sm"));x.useEffect(()=>{if(m){const A=C.find(_=>xa(_.date,t));A&&I(A)}},[m]),x.useEffect(()=>{r(E.date.getMonth()),i(E.date.getFullYear())},[E]);const R=A=>{I(A)},D=()=>{n===0?(r(11),i(o-1)):r(n-1)},M=()=>{(n<t.getMonth()||o<t.getFullYear())&&(n===11?(r(0),i(o+1)):r(n+1))};return Q(Zt,{sx:{display:"flex",gap:2,flexDirection:{xs:"column",md:"row"},height:{xs:"auto",md:"calc(100vh - 130px)"},width:"100%"},children:[Q(ho,{sx:{width:{xs:"auto",md:"65%"},height:{xs:"auto",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2},display:"flex",flexDirection:"column"},children:[S(Jl,{sx:{"& .MuiCardHeader-content":{width:"100%"}},title:S("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:Q("div",{style:{display:"flex",alignItems:"center",marginBottom:"16px"},children:[S(Pst,{style:{width:P?"28px":"32px",height:P?"28px":"32px",marginRight:"12px"}}),S("span",{style:{fontSize:P?"1.5rem":"1.8rem",fontWeight:"bold"},children:e("calendar")})]})})}),Q(Fi,{sx:{overflow:"auto",flex:1,"&:last-child":{paddingBottom:2}},children:[S(APt,{currentMonth:n,currentYear:o,onPrevMonth:D,onNextMonth:M}),S(PPt,{days:C,currentMonth:n,currentDate:t,selectedDay:E,onDayClick:R})]})]}),h&&S(ho,{sx:{width:{xs:"auto",md:"65%"},height:{xs:"60%",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2}},children:S(Er,{})}),m&&S(RPt,{selectedDay:E})]})},kPt=()=>S("div",{children:S(DPt,{})}),_Pt=()=>S("div",{children:"Calories Calculator Page"}),$Pt=()=>S("div",{children:"Equipments Page"}),NPt=()=>S("div",{children:"Gallery Page"}),LPt=()=>S("div",{children:"Ingredients Page"}),FPt=()=>S("div",{children:"Login Page"}),jPt=()=>S("div",{children:"Preferences Page"}),BPt=()=>S("div",{children:"RestApi Page"}),zPt=({weight:e})=>{const t=$ct(),[n]=je(),[r,o]=J.useState(null),[i,a]=J.useState(!1),s=!!r,l=g=>{o(g.currentTarget)},c=()=>{u(),h()},u=()=>{o(null)},f=()=>{t.mutate(e.id),o(null)},h=()=>a(!0),m=()=>a(!1);return Q("div",{children:[S(ct,{onClick:l,children:S(Est,{})}),Q(ss,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Jt,{onClick:c,children:n("edit")}),S(Jt,{onClick:f,children:n("delete")})]}),S(Bi,{title:n("edit"),isOpen:i,closeFn:m,children:S(Lv,{weightEntry:e,closeFn:m})})]})},VPt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Lh,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Ko,{})}),S(Bi,{title:e("add"),isOpen:t,closeFn:o,children:S(Lv,{closeFn:o})})]})},HPt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),UPt="WeightTable",dme={table:`${UPt}-table`},GPt=ae("div")(({theme:e})=>({[`&.${dme.table}`]:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),qPt=({weights:e})=>{const t=[10,50,100],[n]=je(),r=HPt(e),[o,i]=x.useState(t[0]),[a,s]=x.useState(0),l=(u,f)=>{s(f)},c=u=>{i(parseInt(u.target.value,10)),s(0)};return Q(GPt,{className:dme.table,children:[Q(Fc,{children:[Q(Nc,{sx:{minWidth:650},"aria-label":"simple table",children:[S(Ff,{children:Q(ln,{children:[S(ke,{align:"center",children:n("date")}),S(ke,{align:"center",children:n("weight")}),S(ke,{align:"center",children:n("difference")}),S(ke,{align:"center",children:n("days")}),S(ke,{align:"center"})]})}),S(Lc,{children:r.slice(a*o,a*o+o).map(u=>Q(ln,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[S(ke,{component:"th",scope:"row",align:"center",children:u.entry.date.toLocaleDateString()}),S(ke,{align:"center",children:u.entry.weight}),S(ke,{align:"center",children:+u.change.toFixed(2)}),S(ke,{align:"center",children:u.days}),S(ke,{align:"center",children:S(zPt,{weight:u.entry})})]},u.entry.date.toLocaleDateString()))})]}),S(Lne,{rowsPerPageOptions:t,component:"div",count:r.length,rowsPerPage:o,page:a,onPageChange:l,onRowsPerPageChange:c})]}),S(VPt,{})]})},WPt=()=>{const[e]=je(),[t,n]=x.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Ko,{})}),S(Bi,{title:e("add"),isOpen:t,closeFn:o,children:S(Lv,{closeFn:o})})]})},KPt=({currentFilter:e,onFilterChange:t})=>{const[n]=je(),r=Lr(),o=i=>{e!==i&&t(i)};return Q(sB,{variant:"outlined",sx:{mb:2},children:[S(ct,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),S(ct,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),S(ct,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),S(ct,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),S(ct,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},YPt=()=>{const[e]=je(),[t,n]=x.useState("lastYear"),r=Bw(t),o=i=>{n(i)};return r.isLoading?S(Er,{}):S(ds,{title:e("weight"),mainContent:Q(Ft,{spacing:2,children:[S(KPt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&S(Bh,{}),r.data.length!==0&&Q(Tt,{children:[S(Ode,{weights:r.data}),S(Zt,{sx:{mt:4}}),S(qPt,{weights:r.data})]})]}),fab:S(WPt,{})})},QPt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),S(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:S(Jt,{component:Ro,to:cn(Qt.WEIGHT_OVERVIEW,e.language),children:"Weight overview"})})]})},XPt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),S(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:S(Jt,{component:Ro,to:cn(Qt.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},JPt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),S(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:S(Jt,{component:Ro,to:cn(Qt.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},ZPt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),Q(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[S(Jt,{component:Ro,to:cn(Qt.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),S(Jt,{component:Ro,to:cn(Qt.PRIVATE_TEMPLATE_OVERVIEW,e.language),children:"Private template overview"}),S(Jt,{component:Ro,to:cn(Qt.PUBLIC_TEMPLATE_OVERVIEW,e.language),children:"Public template overview"}),S(Jt,{component:Ro,to:cn(Qt.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),S(Jt,{component:Ro,to:cn(Qt.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"}),S(Jt,{component:Ro,to:cn(Qt.CALENDAR,e.language),children:"Calendar"})]})]})},eAt=()=>S(jwe,{position:"static",children:Q(_ne,{children:[S(at,{variant:"h6",component:"div",mr:3,children:"wger"}),S(ZPt,{}),S(QPt,{}),S(XPt,{}),S(JPt,{})]})}),tAt=()=>S(YPt,{}),nAt=()=>S("div",{children:"Workout Page"}),G$=()=>S(cPt,{}),qH=()=>Q(Jlt,{children:[Q(Ht,{path:"/:lang",children:[Q(Ht,{path:"workout",children:[S(Ht,{path:"overview",element:S(nAt,{})}),S(Ht,{path:"gallery",element:S(NPt,{})})]}),Q(Ht,{path:"routine",children:[S(Ht,{index:!0,element:S(yee,{})}),S(Ht,{path:"overview",element:S(yee,{})}),S(Ht,{path:"calendar",element:S(kPt,{})}),S(Ht,{path:"add",element:S(iwt,{})}),Q(Ht,{path:":routineId",children:[S(Ht,{path:"day/:dayId",children:S(Ht,{path:"add-logs",element:S(FOt,{})})}),Q(Ht,{path:"edit",children:[S(Ht,{index:!0,element:S($Ot,{})}),S(Ht,{path:"progression/:slotId",element:S(jOt,{})})]}),S(Ht,{path:"view",element:S(lwt,{})}),S(Ht,{path:"table",element:S(uwt,{})}),S(Ht,{path:"logs",element:S(GOt,{})}),S(Ht,{path:"statistics",element:S(YOt,{})})]}),Q(Ht,{path:"templates",children:[S(Ht,{path:":routineId",children:S(Ht,{path:"view",element:S(BOt,{})})}),Q(Ht,{path:"overview",children:[S(Ht,{path:"private",element:S(XOt,{})}),S(Ht,{path:"public",element:S(JOt,{})})]})]})]}),Q(Ht,{path:"measurement",children:[S(Ht,{index:!0,element:S(OZ,{})}),S(Ht,{path:"overview",element:S(OZ,{})}),S(Ht,{path:"category/:categoryId",element:S(_St,{})})]}),Q(Ht,{path:"exercise",children:[S(Ht,{index:!0,element:S(aJ,{})}),S(Ht,{path:"overview",element:S(aJ,{})}),S(Ht,{path:":exerciseId",element:S(G$,{}),children:S(Ht,{path:"view",element:S(G$,{}),children:S(Ht,{path:":slug",element:S(G$,{})})})}),S(Ht,{path:"contribute",element:S(TPt,{})})]}),Q(Ht,{path:"weight",children:[S(Ht,{path:"overview",element:S(tAt,{})}),S(Ht,{path:"add",element:S(OPt,{})})]}),Q(Ht,{path:"nutrition",children:[S(Ht,{path:"overview",element:S(XSt,{})}),Q(Ht,{path:":planId",children:[S(Ht,{path:"view",element:S(QSt,{})}),S(Ht,{path:":date",element:S(IZ,{})}),S(Ht,{path:"diary",element:S(IZ,{})})]}),Q(Ht,{path:"calculator",children:[S(Ht,{path:"bmi",element:S(LSt,{})}),S(Ht,{path:"calories",element:S(_Pt,{})})]}),S(Ht,{path:"ingredient",children:S(Ht,{path:"overview",element:S(LPt,{})})})]}),Q(Ht,{path:"software",children:[S(Ht,{path:"about-us",element:S(ZOt,{})}),S(Ht,{path:"api",element:S(BPt,{})}),S(Ht,{path:"equipment",element:S($Pt,{})})]}),S(Ht,{path:"login",element:S(FPt,{})}),S(Ht,{path:"user",children:S(Ht,{path:"preferences",element:S(jPt,{})})})]}),S(Ht,{path:"/",element:S(Kct,{})}),S(Ht,{path:"*",element:S("main",{style:{padding:"1rem"},children:S("p",{children:"404, Page NOT FOUND"})})})]}),rAt="_notification_bbb61_1",Oee={notification:rAt},oAt=()=>{const[e,t]=oIt(),n=()=>{t(vee({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(vee({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?Q(Ci,{className:Oee.notification,severity:e.notification.severity,action:S(ct,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[S(fh,{children:e.notification.title}),S("strong",{children:e.notification.message})]}):Q(Ci,{className:Oee.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[S(fh,{children:e.notification.title}),S("strong",{children:e.notification.message})]}):null};function iAt(){return Q(me,{container:!0,children:[S(me,{size:12,children:S(eAt,{})}),S(me,{size:12,children:S(oAt,{})}),S(me,{size:12,children:S(qH,{})})]})}const Xv=new zxe({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),aAt=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=Xee({key:"css",prepend:!0,container:o});em.createRoot(r).render(S(uve,{value:a,children:S(x.Suspense,{fallback:S(Qa,{}),children:S(jV,{children:S(Nh,{theme:kSt(r),children:S(av,{client:Xv,children:S(qH,{})})})})})}))},Iee=document.getElementById("root");Iee&&em.createRoot(Iee).render(S(J.StrictMode,{children:S(x.Suspense,{fallback:S(Qa,{}),children:S(jV,{children:S(Nh,{theme:tm,children:Q(av,{client:Xv,children:[S(iAt,{}),S(aSe,{})]})})})})}));const Pee=document.getElementById("react-page-no-shadow-dom");Pee&&em.createRoot(Pee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(jV,{children:S(Nh,{theme:tm,children:S(av,{client:Xv,children:S(qH,{})})})})}));aAt("react-page");const Aee=document.getElementById("react-weight-dashboard");Aee&&em.createRoot(Aee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Nh,{theme:tm,children:S(av,{client:Xv,children:S(Ide,{})})})}));const Mee=document.getElementById("react-nutrition-dashboard");Mee&&em.createRoot(Mee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Nh,{theme:tm,children:S(av,{client:Xv,children:S(Gue,{})})})}));const Ree=document.getElementById("react-routine-dashboard");Ree&&em.createRoot(Ree).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Nh,{theme:tm,children:S(av,{client:Xv,children:S(Ede,{})})})}));const Dee=document.getElementById("react-ingredient-search");Dee&&em.createRoot(Dee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Nh,{theme:tm,children:S(Hct,{})})}));export{f1 as c,Gn as g};
+ `}}];return{always:T0(a,"always"),resting:T0(a,"resting"),dragging:T0(a,"dragging"),dropAnimating:T0(a,"dropAnimating"),userCancel:T0(a,"userCancel")}};const ts=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,B$=()=>{const e=document.querySelector("head");return e||Et(),e},see=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function BEt(e,t){const n=Kn(()=>jEt(e),[e]),r=x.useRef(null),o=x.useRef(null),i=Wt(li(f=>{const p=o.current;p||Et(),p.textContent=f}),[]),a=Wt(f=>{const p=r.current;p||Et(),p.textContent=f},[]);ts(()=>{!r.current&&!o.current||Et();const f=see(t),p=see(t);return r.current=f,o.current=p,f.setAttribute(`${ev}-always`,e),p.setAttribute(`${ev}-dynamic`,e),B$().appendChild(f),B$().appendChild(p),a(n.always),i(n.resting),()=>{const m=g=>{const y=g.current;y||Et(),B$().removeChild(y),g.current=null};m(r),m(o)}},[t,a,i,n.always,n.resting,e]);const s=Wt(()=>i(n.dragging),[i,n.dragging]),l=Wt(f=>{if(f==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),c=Wt(()=>{o.current&&i(n.resting)},[i,n.resting]);return Kn(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function Ohe(e,t){return Array.from(e.querySelectorAll(t))}var Ihe=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function rA(e){return e instanceof Ihe(e).HTMLElement}function zEt(e,t){const n=`[${tv.contextId}="${e}"]`,r=Ohe(document,n);if(!r.length)return null;const o=r.find(i=>i.getAttribute(tv.draggableId)===t);return!o||!rA(o)?null:o}function VEt(e){const t=x.useRef({}),n=x.useRef(null),r=x.useRef(null),o=x.useRef(!1),i=Wt(function(p,m){const g={id:p,focus:m};return t.current[p]=g,function(){const v=t.current;v[p]!==g&&delete v[p]}},[]),a=Wt(function(p){const m=zEt(e,p);m&&m!==document.activeElement&&m.focus()},[e]),s=Wt(function(p,m){n.current===p&&(n.current=m)},[]),l=Wt(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const p=n.current;p&&a(p)}))},[a]),c=Wt(function(p){n.current=null;const m=document.activeElement;m&&m.getAttribute(tv.draggableId)===p&&(n.current=p)},[]);return ts(()=>(o.current=!0,function(){o.current=!1;const p=r.current;p&&cancelAnimationFrame(p)}),[]),Kn(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function HEt(){const e={draggables:{},droppables:{}},t=[];function n(f){return t.push(f),function(){const m=t.indexOf(f);m!==-1&&t.splice(m,1)}}function r(f){t.length&&t.forEach(p=>p(f))}function o(f){return e.draggables[f]||null}function i(f){const p=o(f);return p||Et(),p}const a={register:f=>{e.draggables[f.descriptor.id]=f,r({type:"ADDITION",value:f})},update:(f,p)=>{const m=e.draggables[p.descriptor.id];m&&m.uniqueId===f.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[f.descriptor.id]=f)},unregister:f=>{const p=f.descriptor.id,m=o(p);m&&f.uniqueId===m.uniqueId&&(delete e.draggables[p],e.droppables[f.descriptor.droppableId]&&r({type:"REMOVAL",value:f}))},getById:i,findById:o,exists:f=>!!o(f),getAllByType:f=>Object.values(e.draggables).filter(p=>p.descriptor.type===f)};function s(f){return e.droppables[f]||null}function l(f){const p=s(f);return p||Et(),p}const c={register:f=>{e.droppables[f.descriptor.id]=f},unregister:f=>{const p=s(f.descriptor.id);p&&f.uniqueId===p.uniqueId&&delete e.droppables[f.descriptor.id]},getById:l,findById:s,exists:f=>!!s(f),getAllByType:f=>Object.values(e.droppables).filter(p=>p.descriptor.type===f)};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:n,clean:u}}function UEt(){const e=Kn(HEt,[]);return x.useEffect(()=>function(){e.clean()},[e]),e}var _H=J.createContext(null),jO=()=>{const e=document.body;return e||Et(),e};const GEt={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},qEt=e=>`rfd-announcement-${e}`;function WEt(e){const t=Kn(()=>qEt(e),[e]),n=x.useRef(null);return x.useEffect(function(){const i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),z(i.style,GEt),jO().appendChild(i),function(){setTimeout(function(){const l=jO();l.contains(i)&&l.removeChild(i),i===n.current&&(n.current=null)})}},[t]),Wt(o=>{const i=n.current;if(i){i.textContent=o;return}},[])}const KEt={separator:"::"};function $H(e,t=KEt){const n=J.useId();return Kn(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function YEt({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function QEt({contextId:e,text:t}){const n=$H("hidden-text",{separator:"-"}),r=Kn(()=>YEt({contextId:e,uniqueId:n}),[n,e]);return x.useEffect(function(){const i=document.createElement("div");return i.id=r,i.textContent=t,i.style.display="none",jO().appendChild(i),function(){const s=jO();s.contains(i)&&s.removeChild(i)}},[r,t]),r}var oA=J.createContext(null);function Phe(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),t}function XEt(){let e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&Et();const s={abandon:a};return e=s,s}function o(){e||Et(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}function BS(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const JEt=9,ZEt=13,NH=27,Ahe=32,eTt=33,tTt=34,nTt=35,rTt=36,oTt=37,iTt=38,aTt=39,sTt=40,lTt={[ZEt]:!0,[JEt]:!0};var Mhe=e=>{lTt[e.keyCode]&&e.preventDefault()};const iA=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),Rhe=0,lee=5;function cTt(e,t){return Math.abs(t.x-e.x)>=lee||Math.abs(t.y-e.y)>=lee}const cee={type:"IDLE"};function uTt({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:a,clientY:s}=o;if(i!==Rhe)return;const l={x:a,y:s},c=n();if(c.type==="DRAGGING"){o.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&Et();const u=c.point;if(!cTt(u,l))return;o.preventDefault();const f=c.actions.fluidLift(l);r({type:"DRAGGING",actions:f})}},{eventName:"mouseup",fn:o=>{const i=n();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{n().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(n().type==="PENDING"){e();return}if(o.keyCode===NH){o.preventDefault(),e();return}Mhe(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=n();if(i.type==="IDLE"&&Et(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:iA,fn:e}]}function dTt(e){const t=x.useRef(cee),n=x.useRef(wf),r=Kn(()=>({eventName:"mousedown",fn:function(f){if(f.defaultPrevented||f.button!==Rhe||f.ctrlKey||f.metaKey||f.shiftKey||f.altKey)return;const p=e.findClosestDraggableId(f);if(!p)return;const m=e.tryGetLock(p,a,{sourceEvent:f});if(!m)return;f.preventDefault();const g={x:f.clientX,y:f.clientY};n.current(),c(m,g)}}),[e]),o=Kn(()=>({eventName:"webkitmouseforcewillbegin",fn:u=>{if(u.defaultPrevented)return;const f=e.findClosestDraggableId(u);if(!f)return;const p=e.findOptionsForDraggable(f);p&&(p.shouldRespectForcePress||e.canGetLock(f)&&u.preventDefault())}}),[e]),i=Wt(function(){const f={passive:!1,capture:!0};n.current=Gs(window,[o,r],f)},[o,r]),a=Wt(()=>{t.current.type!=="IDLE"&&(t.current=cee,n.current(),i())},[i]),s=Wt(()=>{const u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=Wt(function(){const f={capture:!0,passive:!1},p=uTt({cancel:s,completed:a,getPhase:()=>t.current,setPhase:m=>{t.current=m}});n.current=Gs(window,p,f)},[s,a]),c=Wt(function(f,p){t.current.type!=="IDLE"&&Et(),t.current={type:"PENDING",point:p,actions:f},l()},[l]);ts(function(){return i(),function(){n.current()}},[i])}function fTt(){}const pTt={[tTt]:!0,[eTt]:!0,[rTt]:!0,[nTt]:!0};function hTt(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===NH){o.preventDefault(),n();return}if(o.keyCode===Ahe){o.preventDefault(),r();return}if(o.keyCode===sTt){o.preventDefault(),e.moveDown();return}if(o.keyCode===iTt){o.preventDefault(),e.moveUp();return}if(o.keyCode===aTt){o.preventDefault(),e.moveRight();return}if(o.keyCode===oTt){o.preventDefault(),e.moveLeft();return}if(pTt[o.keyCode]){o.preventDefault();return}Mhe(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:iA,fn:n}]}function mTt(e){const t=x.useRef(fTt),n=Kn(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Ahe)return;const a=e.findClosestDraggableId(i);if(!a)return;const s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0;const c=s.snapLift();t.current();function u(){l||Et(),l=!1,t.current(),r()}t.current=Gs(window,hTt(c,u),{capture:!0,passive:!1})}}),[e]),r=Wt(function(){const i={passive:!1,capture:!0};t.current=Gs(window,[n],i)},[n]);ts(function(){return r(),function(){t.current()}},[r])}const z$={type:"IDLE"},gTt=120,yTt=.15;function vTt({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===NH&&n.preventDefault(),e()}},{eventName:iA,fn:e}]}function bTt({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:a}=r.touches[0],s={x:i,y:a};r.preventDefault(),o.actions.move(s)}},{eventName:"touchend",fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const o=n();o.type==="IDLE"&&Et();const i=r.touches[0];if(!i||!(i.force>=yTt))return;const s=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){s&&e();return}if(s){if(o.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:iA,fn:e}]}function xTt(e){const t=x.useRef(z$),n=x.useRef(wf),r=Wt(function(){return t.current},[]),o=Wt(function(m){t.current=m},[]),i=Kn(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;const g=e.findClosestDraggableId(m);if(!g)return;const y=e.tryGetLock(g,s,{sourceEvent:m});if(!y)return;const v=m.touches[0],{clientX:w,clientY:C}=v,E={x:w,y:C};n.current(),f(y,E)}}),[e]),a=Wt(function(){const m={capture:!0,passive:!1};n.current=Gs(window,[i],m)},[i]),s=Wt(()=>{const p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),o(z$),n.current(),a())},[a,o]),l=Wt(()=>{const p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),c=Wt(function(){const m={capture:!0,passive:!1},g={cancel:l,completed:s,getPhase:r},y=Gs(window,bTt(g),m),v=Gs(window,vTt(g),m);n.current=function(){y(),v()}},[l,r,s]),u=Wt(function(){const m=r();m.type!=="PENDING"&&Et();const g=m.actions.fluidLift(m.point);o({type:"DRAGGING",actions:g,hasMoved:!1})},[r,o]),f=Wt(function(m,g){r().type!=="IDLE"&&Et();const y=setTimeout(u,gTt);o({type:"PENDING",point:g,actions:m,longPressTimerId:y}),c()},[c,r,o,u]);ts(function(){return a(),function(){n.current();const g=r();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),o(z$))}},[r,a,o]),ts(function(){return Gs(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const STt=["input","button","textarea","select","option","optgroup","video","audio"];function Dhe(e,t){if(t==null)return!1;if(STt.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Dhe(e,t.parentElement)}function wTt(e,t){const n=t.target;return rA(n)?Dhe(e,n):!1}var CTt=e=>jl(e.getBoundingClientRect()).center;function ETt(e){return e instanceof Ihe(e).Element}const TTt=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function khe(e,t){return e==null?null:e[TTt](t)?e:khe(e.parentElement,t)}function OTt(e,t){return e.closest?e.closest(t):khe(e,t)}function ITt(e){return`[${tv.contextId}="${e}"]`}function PTt(e,t){const n=t.target;if(!ETt(n))return null;const r=ITt(e),o=OTt(n,r);return!o||!rA(o)?null:o}function ATt(e,t){const n=PTt(e,t);return n?n.getAttribute(tv.draggableId):null}function MTt(e,t){const n=`[${Sj.contextId}="${e}"]`,o=Ohe(document,n).find(i=>i.getAttribute(Sj.id)===t);return!o||!rA(o)?null:o}function RTt(e){e.preventDefault()}function sE({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function _he({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!(!o||!o.options.isEnabled||!whe(t.getState(),r))}function DTt({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!_he({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const l=r.draggable.getById(o),c=MTt(t,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&wTt(c,a))return null;const u=e.claim(i||wf);let f="PRE_DRAG";function p(){return l.options.shouldRespectForcePress}function m(){return e.isActive(u)}function g(O,P){sE({expected:O,phase:f,isLockActive:m,shouldWarn:!0})&&n.dispatch(P())}const y=g.bind(null,"DRAGGING");function v(O){function P(){e.release(),f="COMPLETED"}f!=="PRE_DRAG"&&(P(),Et()),n.dispatch(O1t(O.liftActionArgs)),f="DRAGGING";function R(D,M={shouldBlockNextClick:!1}){if(O.cleanup(),M.shouldBlockNextClick){const A=Gs(window,[{eventName:"click",fn:RTt,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(A)}P(),n.dispatch(hhe({reason:D}))}return{isActive:()=>sE({expected:"DRAGGING",phase:f,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,drop:D=>R("DROP",D),cancel:D=>R("CANCEL",D),...O.actions}}function w(O){const P=_S(D=>{y(()=>phe({client:D}))});return{...v({liftActionArgs:{id:o,clientSelection:O,movementMode:"FLUID"},cleanup:()=>P.cancel(),actions:{move:P}}),move:P}}function C(){const O={moveUp:()=>y($1t),moveRight:()=>y(L1t),moveDown:()=>y(N1t),moveLeft:()=>y(F1t)};return v({liftActionArgs:{id:o,clientSelection:CTt(c),movementMode:"SNAP"},cleanup:wf,actions:O})}function E(){sE({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>sE({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:w,snapLift:C,abort:E}}const kTt=[dTt,mTt,xTt];function _Tt({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?kTt:[],...r||[]],a=x.useState(()=>XEt())[0],s=Wt(function(v,w){BS(v)&&!BS(w)&&a.tryAbandon()},[a]);ts(function(){let v=t.getState();return t.subscribe(()=>{const C=t.getState();s(v,C),v=C})},[a,t,s]),ts(()=>a.tryAbandon,[a.tryAbandon]);const l=Wt(y=>_he({lockAPI:a,registry:n,store:t,draggableId:y}),[a,n,t]),c=Wt((y,v,w)=>DTt({lockAPI:a,registry:n,contextId:e,store:t,draggableId:y,forceSensorStop:v||null,sourceEvent:w&&w.sourceEvent?w.sourceEvent:null}),[e,a,n,t]),u=Wt(y=>ATt(e,y),[e]),f=Wt(y=>{const v=n.draggable.findById(y);return v?v.options:null},[n.draggable]),p=Wt(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(IH()))},[a,t]),m=Wt(()=>a.isClaimed(),[a]),g=Kn(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:f,tryReleaseLock:p,isLockClaimed:m}),[l,c,u,f,p,m]);for(let y=0;y<i.length;y++)i[y](g)}const $Tt=e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};ew.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),NTt=e=>({...jS,...e.autoScrollerOptions,durationDampening:{...jS.durationDampening,...e.autoScrollerOptions}});function O0(e){return e.current||Et(),e.current}function LTt(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=x.useRef(null),s=Phe(e),l=Wt(()=>$Tt(s.current),[s]),c=Wt(()=>NTt(s.current),[s]),u=WEt(t),f=QEt({contextId:t,text:i}),p=BEt(t,o),m=Wt(A=>{O0(a).dispatch(A)},[]),g=Kn(()=>$Z({publishWhileDragging:P1t,updateDroppableScroll:M1t,updateDroppableIsEnabled:R1t,updateDroppableIsCombineEnabled:D1t,collectionStarting:A1t},m),[m]),y=UEt(),v=Kn(()=>vEt(y,g),[y,g]),w=Kn(()=>$Et({scrollWindow:bEt,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:c,...$Z({move:phe},m)}),[v.scrollDroppable,m,c]),C=VEt(t),E=Kn(()=>hEt({announce:u,autoScroller:w,dimensionMarshal:v,focusMarshal:C,getResponders:l,styleMarshal:p}),[u,w,v,C,l,p]);a.current=E;const I=Wt(()=>{const A=O0(a);A.getState().phase!=="IDLE"&&A.dispatch(IH())},[]),O=Wt(()=>{const A=O0(a).getState();return A.phase==="DROP_ANIMATING"?!0:A.phase==="IDLE"?!1:A.isDragging},[]),P=Kn(()=>({isDragging:O,tryAbort:I}),[O,I]);n(P);const R=Wt(A=>whe(O0(a).getState(),A),[]),D=Wt(()=>kp(O0(a).getState()),[]),M=Kn(()=>({marshal:v,focus:C,contextId:t,canLift:R,isMovementAllowed:D,dragHandleUsageInstructionsId:f,registry:y}),[t,v,f,C,R,D,y]);return _Tt({contextId:t,store:E,registry:y,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),x.useEffect(()=>I,[I]),J.createElement(oA.Provider,{value:M},J.createElement(uCt,{context:_H,store:E},e.children))}function FTt(){return J.useId()}function $he(e){const t=FTt(),n=e.dragHandleUsageInstructions||FE.dragHandleUsageInstructions;return J.createElement(mCt,null,r=>J.createElement(LTt,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const uee={dragging:5e3,dropAnimating:4500},jTt=(e,t)=>t?yx.drop(t.duration):e?yx.snap:yx.fluid,BTt=(e,t)=>{if(e)return t?FS.opacity.drop:FS.opacity.combining},zTt=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function VTt(e){const n=e.dimension.client,{offset:r,combineWith:o,dropping:i}=e,a=!!o,s=zTt(e),l=!!i,c=l?bj.drop(r,a):bj.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:jTt(s,i),transform:c,opacity:BTt(a,l),zIndex:l?uee.dropAnimating:uee.dragging,pointerEvents:"none"}}function HTt(e){return{transform:bj.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function UTt(e){return e.type==="DRAGGING"?VTt(e):HTt(e)}function GTt(e,t,n=ci){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=zpe(o,r),a=$O(i,n),s={client:i,tagName:t.tagName.toLowerCase(),display:r.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:s,displaceBy:l,client:i,page:a}}function qTt(e){const t=$H("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Kn(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=Wt(m=>{const g=o();return g||Et(),GTt(n,g,m)},[n,o]),u=Kn(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),f=x.useRef(u),p=x.useRef(!0);ts(()=>(r.draggable.register(f.current),()=>r.draggable.unregister(f.current)),[r.draggable]),ts(()=>{if(p.current){p.current=!1;return}const m=f.current;f.current=u,r.draggable.update(u,m)},[u,r.draggable])}var LH=J.createContext(null);function BO(e){const t=x.useContext(e);return t||Et(),t}function WTt(e){e.preventDefault()}const KTt=e=>{const t=x.useRef(null),n=Wt((P=null)=>{t.current=P},[]),r=Wt(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=BO(oA),{type:s,droppableId:l}=BO(LH),c=Kn(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:u,draggableId:f,isEnabled:p,shouldRespectForcePress:m,canDragInteractiveElements:g,isClone:y,mapped:v,dropAnimationFinished:w}=e;if(!y){const P=Kn(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:m,isEnabled:p}),[c,a,r,g,m,p]);qTt(P)}const C=Kn(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":f,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:WTt}:null,[o,i,f,p]),E=Wt(P=>{v.type==="DRAGGING"&&v.dropping&&P.propertyName==="transform"&&ew.flushSync(w)},[w,v]),I=Kn(()=>{const P=UTt(v),R=v.type==="DRAGGING"&&v.dropping?E:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":f,style:P,onTransitionEnd:R},dragHandleProps:C}},[o,C,f,v,E,n]),O=Kn(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return J.createElement(J.Fragment,null,u(I,v.snapshot,O))};var Nhe=(e,t)=>e===t,Lhe=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const YTt=e=>e.combine?e.combine.draggableId:null,QTt=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function XTt(){const e=li((o,i)=>({x:o,y:i})),t=li((o,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:o,draggingOver:a,combineWith:s,combineTargetFor:null})),n=li((o,i,a,s,l=null,c=null,u=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:o,dimension:a,forceShouldAnimate:u,snapshot:t(i,s,l,c,null)}}));return(o,i)=>{if(BS(o)){if(o.critical.draggable.id!==i.draggableId)return null;const a=o.current.client.offset,s=o.dimensions.draggables[i.draggableId],l=es(o.impact),c=QTt(o.impact),u=o.forceShouldAnimate;return n(e(a.x,a.y),o.movementMode,s,i.isClone,l,c,u)}if(o.phase==="DROP_ANIMATING"){const a=o.completed;if(a.result.draggableId!==i.draggableId)return null;const s=i.isClone,l=o.dimensions.draggables[i.draggableId],c=a.result,u=c.mode,f=Lhe(c),p=YTt(c),g={duration:o.dropDuration,curve:AH.drop,moveTo:o.newHomeClientOffset,opacity:p?FS.opacity.drop:null,scale:p?FS.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:l,dropping:g,draggingOver:f,combineWith:p,mode:u,forceShouldAnimate:null,snapshot:t(u,s,f,p,g)}}}return null}}function Fhe(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const JTt={mapped:{type:"SECONDARY",offset:ci,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Fhe(null)}};function ZTt(){const e=li((a,s)=>({x:a,y:s})),t=li(Fhe),n=li((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:t(s)}})),r=a=>a?n(ci,a,!0):null,o=(a,s,l,c)=>{const u=l.displaced.visible[a],f=!!(c.inVirtualList&&c.effected[a]),p=eA(l),m=p&&p.draggableId===a?s:null;if(!u){if(!f)return r(m);if(l.displaced.invisible[a])return null;const v=Wv(c.displacedBy.point),w=e(v.x,v.y);return n(w,m,!0)}if(f)return r(m);const g=l.displacedBy.point,y=e(g.x,g.y);return n(y,m,u.shouldAnimate)};return(a,s)=>{if(BS(a))return a.critical.draggable.id===s.draggableId?null:o(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const l=a.completed;return l.result.draggableId===s.draggableId?null:o(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const eOt=()=>{const e=XTt(),t=ZTt();return(r,o)=>e(r,o)||t(r,o)||JTt},tOt={dropAnimationFinished:mhe},nOt=Bpe(eOt,tOt,null,{context:_H,areStatePropsEqual:Nhe})(KTt);function jhe(e){return BO(LH).isUsingCloneFor===e.draggableId&&!e.isClone?null:J.createElement(nOt,e)}function Bhe(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return J.createElement(jhe,z({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const zhe=e=>t=>e===t,rOt=zhe("scroll"),oOt=zhe("auto"),dee=(e,t)=>t(e.overflowX)||t(e.overflowY),iOt=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return dee(n,rOt)||dee(n,oOt)},aOt=()=>!1,Vhe=e=>e==null?null:e===document.body?aOt()?e:null:e===document.documentElement?null:iOt(e)?e:Vhe(e.parentElement);var wj=e=>({x:e.scrollLeft,y:e.scrollTop});const Hhe=e=>e?window.getComputedStyle(e).position==="fixed"?!0:Hhe(e.parentElement):!1;var sOt=e=>{const t=Vhe(e),n=Hhe(e);return{closestScrollable:t,isFixedOnPage:n}},lOt=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:p,client:m}=s,g=bhe({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:m,scrollSize:p,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:g,diff:{value:ci,displacement:ci}}}})(),c=o==="vertical"?wH:Jpe,u=Zy({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:u}};const cOt=(e,t)=>{const n=Vpe(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,l=vH({top:r,right:a,bottom:i,left:o},n.border);return bH({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})};var uOt=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=cOt(e,l),u=$O(c,r),f=(()=>{if(!l)return null;const m=Vpe(l),g={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:m,page:$O(m,r),scroll:wj(l),scrollSize:g,shouldClipSubject:s}})();return lOt({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:u,closest:f})};const dOt={passive:!1},fOt={passive:!0};var fee=e=>e.shouldPublishImmediately?dOt:fOt;const lE=e=>e&&e.env.closestScrollable||null;function pOt(e){const t=x.useRef(null),n=BO(oA),r=$H("droppable"),{registry:o,marshal:i}=n,a=Phe(e),s=Kn(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=x.useRef(s),c=Kn(()=>li((I,O)=>{t.current||Et();const P={x:I,y:O};i.updateDroppableScroll(s.id,P)}),[s.id,i]),u=Wt(()=>{const I=t.current;return!I||!I.env.closestScrollable?ci:wj(I.env.closestScrollable)},[]),f=Wt(()=>{const I=u();c(I.x,I.y)},[u,c]),p=Kn(()=>_S(f),[f]),m=Wt(()=>{const I=t.current,O=lE(I);if(I&&O||Et(),I.scrollOptions.shouldPublishImmediately){f();return}p()},[p,f]),g=Wt((I,O)=>{t.current&&Et();const P=a.current,R=P.getDroppableRef();R||Et();const D=sOt(R),M={ref:R,descriptor:s,env:D,scrollOptions:O};t.current=M;const A=uOt({ref:R,descriptor:s,env:D,windowScroll:I,direction:P.direction,isDropDisabled:P.isDropDisabled,isCombineEnabled:P.isCombineEnabled,shouldClipSubject:!P.ignoreContainerClipping}),_=D.closestScrollable;return _&&(_.setAttribute(aee.contextId,n.contextId),_.addEventListener("scroll",m,fee(M.scrollOptions))),A},[n.contextId,s,m,a]),y=Wt(()=>{const I=t.current,O=lE(I);return I&&O||Et(),wj(O)},[]),v=Wt(()=>{const I=t.current;I||Et();const O=lE(I);t.current=null,O&&(p.cancel(),O.removeAttribute(aee.contextId),O.removeEventListener("scroll",m,fee(I.scrollOptions)))},[m,p]),w=Wt(I=>{const O=t.current;O||Et();const P=lE(O);P||Et(),P.scrollTop+=I.y,P.scrollLeft+=I.x},[]),C=Kn(()=>({getDimensionAndWatchScroll:g,getScrollWhileDragging:y,dragStopped:v,scroll:w}),[v,g,y,w]),E=Kn(()=>({uniqueId:r,descriptor:s,callbacks:C}),[C,s,r]);ts(()=>(l.current=E.descriptor,o.droppable.register(E),()=>{t.current&&v(),o.droppable.unregister(E)}),[C,s,v,E,i,o.droppable]),ts(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),ts(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function V$(){}const pee={width:0,height:0,margin:wCt},hOt=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?pee:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},mOt=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=hOt({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?yx.placeholder:null}},gOt=e=>{const t=x.useRef(null),n=Wt(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=x.useState(e.animate==="open");x.useEffect(()=>s?r!=="open"?(n(),l(!1),V$):t.current?V$:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):V$,[r,s,n]);const c=Wt(f=>{f.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),u=mOt({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return J.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var yOt=J.memo(gOt);class vOt extends J.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const bOt=e=>{const t=x.useContext(oA);t||Et();const{contextId:n,isMovementAllowed:r}=t,o=x.useRef(null),i=x.useRef(null),{children:a,droppableId:s,type:l,mode:c,direction:u,ignoreContainerClipping:f,isDropDisabled:p,isCombineEnabled:m,snapshot:g,useClone:y,updateViewportMaxScroll:v,getContainerForClone:w}=e,C=Wt(()=>o.current,[]),E=Wt((_=null)=>{o.current=_},[]);Wt(()=>i.current,[]);const I=Wt((_=null)=>{i.current=_},[]),O=Wt(()=>{r()&&v({maxScroll:She()})},[r,v]);pOt({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:p,isCombineEnabled:m,ignoreContainerClipping:f,getDroppableRef:C});const P=Kn(()=>J.createElement(vOt,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:_,data:N,animate:B})=>J.createElement(yOt,{placeholder:N,onClose:_,innerRef:I,animate:B,contextId:n,onTransitionEnd:O})),[n,O,e.placeholder,e.shouldAnimatePlaceholder,I]),R=Kn(()=>({innerRef:E,placeholder:P,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,P,E]),D=y?y.dragging.draggableId:null,M=Kn(()=>({droppableId:s,type:l,isUsingCloneFor:D}),[s,D,l]);function A(){if(!y)return null;const{dragging:_,render:N}=y,B=J.createElement(jhe,{draggableId:_.draggableId,index:_.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(H,j)=>N(H,j,_));return D0.createPortal(B,w())}return J.createElement(LH.Provider,{value:M},a(R,g),A())};function xOt(){return document.body||Et(),document.body}const hee={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:xOt},Uhe=e=>{let t={...e},n;for(n in hee)e[n]===void 0&&(t={...t,[n]:hee[n]});return t},H$=(e,t)=>e===t.droppable.type,mee=(e,t)=>t.draggables[e.draggable.id],SOt=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=li(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=li((i,a,s,l,c,u)=>{const f=c.descriptor.id;if(c.descriptor.droppableId===i){const g=u?{render:u,dragging:n(c.descriptor)}:null,y={isDraggingOver:s,draggingOverWith:s?f:null,draggingFromThisWith:f,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:y,useClone:g}}if(!a)return t;if(!l)return e;const m={isDraggingOver:s,draggingOverWith:f,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(i,a)=>{const s=Uhe(a),l=s.droppableId,c=s.type,u=!s.isDropDisabled,f=s.renderClone;if(BS(i)){const p=i.critical;if(!H$(c,p))return t;const m=mee(p,i.dimensions),g=es(i.impact)===l;return r(l,u,g,g,m,f)}if(i.phase==="DROP_ANIMATING"){const p=i.completed;if(!H$(c,p.critical))return t;const m=mee(p.critical,i.dimensions);return r(l,u,Lhe(p.result)===l,es(p.impact)===l,m,f)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const p=i.completed;if(!H$(c,p.critical))return t;const m=es(p.impact)===l,g=!!(p.impact.at&&p.impact.at.type==="COMBINE"),y=p.critical.droppable.id===l;return m?g?e:t:y?e:t}return t}},wOt={updateViewportMaxScroll:_1t},Ghe=Bpe(SOt,wOt,(e,t,n)=>({...Uhe(n),...e,...t}),{context:_H,areStatePropsEqual:Nhe})(bOt);let gee=!1;const COt=()=>{gee||(console.warn(["MUI: The LoadingButton component functionality is now part of the Button component from Material UI.","","You should use `import Button from '@mui/material/Button'`","or `import { Button } from '@mui/material'`"].join(`
+`)),gee=!0)},EOt=x.forwardRef(function(t,n){return COt(),k.jsx(ct,{ref:n,...t})}),TOt=e=>{const{t}=je(),n=ist(e.routineId),r=lst(e.routineId),[o,i]=x.useState(!1),[a,s]=x.useState(!1),[l,c]=x.useState(e.day.isRest),u=()=>{l?(c(!1),I({isRest:!1})):s(!0)},f=()=>s(!1),p=()=>{I({isRest:!l}),c(!l),s(!1)},m=()=>i(!0),g=()=>{e.setSelectedDayIndex(null),r.mutate(e.day.id),i(!1)},y=()=>i(!1),v=3,w=20,C=1e3,E=Ko().shape({name:Uo().max(w,t("forms.maxLength",{chars:w})).min(v,t("forms.minLength",{chars:v})).required("Name is required"),description:Uo().max(C,t("forms.maxLength",{chars:C})),isRest:Fu(),needsLogsToAdvance:Fu()}),I=O=>n.mutate({id:e.day.id,routine:e.routineId,...O.name!==void 0&&{name:O.name},...O.description!==void 0&&{description:O.description},...O.isRest!==void 0&&{is_rest:l},...O.needsLogsToAdvance!==void 0&&{need_logs_to_advance:O.needsLogsToAdvance}});return S(Tt,{children:S(Oi,{initialValues:{name:e.day.name,description:e.day.description,isRest:e.day.isRest,needsLogsToAdvance:e.day.needLogsToAdvance},validationSchema:E,onSubmit:(O,{setSubmitting:P})=>{I(O),P(!1)},initialTouched:{name:!0,description:!0,isRest:!0,needsLogsToAdvance:!0},children:O=>Q(pi,{children:[Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:6},children:S(Ju,{fieldName:"name",title:"Name",fieldProps:{disabled:l}})}),S(me,{size:{xs:6,sm:2},children:S(os,{control:S(Wo,{checked:l,onChange:u}),label:t("routines.restDay")})}),Q(me,{size:{xs:6,sm:4},children:[S(os,{disabled:l,control:S(Wo,{checked:O.values.needsLogsToAdvance,...O.getFieldProps("needsLogsToAdvance")}),label:t("routines.needsLogsToAdvance")}),S(qo,{title:t("routines.needsLogsToAdvanceHelpText"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]}),S(me,{size:12,children:S(Ju,{fieldName:"description",title:"Description",fieldProps:{multiline:!0,rows:4,disabled:l}})}),Q(me,{size:8,children:[n.isPending?S(EOt,{loading:!0,variant:"contained",color:"primary",children:t("save")}):S(ct,{variant:"contained",color:"primary",type:"submit",disabled:l,children:t("save")})," ",S(ct,{variant:"outlined",startIcon:S(RP,{}),onClick:m,disabled:n.isPending,children:t("delete")})]}),S(me,{size:4,sx:{display:"flex",justifyContent:"flex-end"},children:S(iwt,{routineId:e.routineId})})]}),Q(Ix,{open:a,onClose:f,children:[S(eT,{children:t("routines.confirmRestDay")}),S(Ax,{children:t("routines.confirmRestDayHelpText")}),Q(Px,{children:[S(ct,{onClick:f,children:t("cancel")}),S(ct,{onClick:p,children:t("continue")})]})]}),S(JP,{title:t("deleteConfirmation",{name:e.day.getDisplayName()}),message:t("routines.deleteDayConfirmation"),isOpen:o,closeFn:y,deleteFn:g})]})})})},OOt=e=>{const{t}=je(),n=yst(e.routineId),[r,o]=x.useState(e.slot.comment),[i,a]=x.useState(!1),s=c=>{a(!0),o(c)},l=()=>{i&&(n.mutate({id:e.slot.id,comment:r}),a(!1))};return S(Tt,{children:S(dn,{label:t("comment"),variant:"standard",fullWidth:!0,size:"small",value:r,disabled:n.isPending,onChange:c=>s(c.target.value),onBlur:l,InputProps:{endAdornment:n.isPending&&S(vh,{})}})})};function qhe(e){const t=[];if(!e)return t;for(const n in e)Object.hasOwn(e,n)&&t.push(...e[n]);return t}function U$(e){const t=qhe(e);return t.length>0?t.join(" | "):""}const IOt={weight:{edit:_at,add:$at,delete:Nat},"max-weight":{edit:Lat,add:Fat,delete:jat},reps:{edit:Bat,add:zat,delete:Vat},"max-reps":{edit:Hat,add:QX,delete:Uat},sets:{edit:Gat,add:qat,delete:Wat},"max-sets":{edit:Kat,add:Yat,delete:QX},rest:{edit:Zat,add:est,delete:tst},"max-rest":{edit:nst,add:rst,delete:ost},rir:{edit:Que,add:Xue,delete:Jue},"max-rir":{edit:Qat,add:Xat,delete:Jat}},yee=e=>{var P,R,D,M,A,_,N;const{t}=je(),{edit:n,add:r,delete:o}=IOt[e.type],i=n(e.routineId),a=r(e.routineId),s=o(e.routineId),[l,c]=x.useState(((P=e.config)==null?void 0:P.value)||""),[u,f]=x.useState(null),[p,m]=x.useState(null),g=["sets","max-sets","rest","max-rest"].includes(e.type),y=g?parseInt:parseFloat;let v="";switch(e.type){case"weight":v=t("weight");break;case"max-weight":v="max "+t("weight");break;case"reps":v=t("server.repetitions");break;case"max-reps":v=t("server.max_reps");break;case"sets":v=t("routines.sets");break;case"max-sets":v="max "+t("routines.sets");break;case"rest":v=t("routines.restTime");break;case"max-rest":v="max "+t("routines.restTime");break;case"rir":v=t("routines.rir");break;case"max-rir":v="max "+t("routines.rir");break}const w=B=>{const H={slot_entry:e.slotEntryId,value:y(B)};B===""&&e.config?s.mutate(e.config.id):e.config?i.mutate({id:e.config.id,...H}):a.mutate({iteration:1,operation:Qi,step:"abs",requirements:null,...H})},C=B=>{if(c(B),B!==""&&Number.isNaN(y(B))){f(t(g?"forms.enterInteger":"forms.enterNumber"));return}else f(null);p&&clearTimeout(p),m(setTimeout(()=>w(B),Nre))},E=i.isPending||a.isPending||s.isPending,I=i.isError||a.isError||s.isError,O=U$((D=(R=i.error)==null?void 0:R.response)==null?void 0:D.data)||U$((A=(M=a.error)==null?void 0:M.response)==null?void 0:A.data)||U$((N=(_=s.error)==null?void 0:_.response)==null?void 0:N.data);return S(dn,{slotProps:{input:{endAdornment:E&&S(vh,{})}},inputProps:{"data-testid":`${e.type}-field`},label:v,value:l,fullWidth:!0,variant:"standard",disabled:E,onChange:B=>C(B.target.value),error:!!u||I,helperText:u||O})},POt=e=>{const{setFieldValue:t}=MV(),{t:n}=je(),r=e.disabled??!1,[o,i]=x.useState(e.values),[a,s]=J.useState(null),l=u=>{o.includes(u)?i(o.filter(f=>f!==u)):i([...o,u])},c=async()=>{await t(e.fieldName,o),s(null)};return Q(Tt,{children:[S(pn,{disabled:r,onClick:u=>s(u.currentTarget),children:a?S(Ost,{fontSize:"small"}):S(Zst,{fontSize:"small"})}),Q(ss,{anchorEl:a,open:!!a,onClose:()=>s(null),children:[...ZN.map((u,f)=>Q(Zt,{onClick:()=>l(u),children:[S(rl,{children:o.includes(u)?S(Dst,{fontSize:"small"}):S(kst,{fontSize:"small"})}),S(Wr,{children:u})]},f)),S(Bi,{}),S(Zt,{children:S(ct,{color:"primary",variant:"contained",type:"submit",size:"small",onClick:c,children:n("save")})})]})]})},AOt=e=>{var i;const t=Que(e.routineId),n=Jue(e.routineId),r=Xue(e.routineId),o=a=>{const s={value:parseFloat(a)};a===""&&e.config?n.mutate(e.config.id):e.config!==void 0?t.mutate({id:e.config.id,...s}):r.mutate({slot_entry:e.slotEntryId,iteration:1,operation:Qi,...s})};return S(dn,{fullWidth:!0,select:!0,label:"RiR",variant:"standard",defaultValue:"",value:(i=e.config)==null?void 0:i.value,disabled:t.isPending,onChange:a=>o(a.target.value),children:Ure.map(a=>S(Zt,{value:a.value,children:a.label},a.value))})};function MOt(e){let t="";for(;e>0;)e--,t=String.fromCharCode(97+e%26)+t,e=Math.floor(e/26);return t}const El=(e,t,n,r)=>t.length>0?S(yee,{config:t[0],type:e,routineId:n}):S(yee,{type:e,routineId:n,slotEntryId:r}),ROt=e=>{const{t}=je();return Q(Tt,{children:[e.slot.entries.length===0&&Q(Ei,{severity:"warning",children:[S(hh,{children:t("routines.setHasNoExercises")}),t("nothingHereYetAction")]}),e.slot.entries.map((n,r)=>S(DOt,{slotEntry:n,routineId:e.routineId,simpleMode:e.simpleMode,index:r,total:e.slot.entries.length},n.id))]})},DOt=e=>{var g;const{t,i18n:n}=je(),[r,o]=x.useState(!1),i=()=>o(!r),a=Qc(),s=Nw(e.routineId),l=pst(e.routineId),c=s.isPending||l.isPending,u=y=>{y!==null&&(s.mutate({id:e.slotEntry.id,exercise:y.data.base_id}),o(!1))};let f;a.isSuccess&&(f=qu(n.language,a.data));const p=()=>e.simpleMode?Q(J.Fragment,{children:[S(me,{size:{xs:12,sm:2},children:El("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)},`sets-config-${e.slotEntry.id}`),S(me,{size:{xs:12,sm:3},children:El("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)},`weight-config-${e.slotEntry.id}`),S(me,{size:{xs:12,sm:3},children:El("reps",e.slotEntry.repetitionsConfigs,e.routineId,e.slotEntry.id)},`reps-config-${e.slotEntry.id}`)]}):Q(J.Fragment,{children:[S(me,{size:{xs:6,sm:1},children:El("sets",e.slotEntry.nrOfSetsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:1},children:El("max-sets",e.slotEntry.maxNrOfSetsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},children:S(twt,{routineId:e.routineId,slotEntry:e.slotEntry})}),S(me,{size:{xs:12,sm:2},children:S(AOt,{routineId:e.routineId,config:e.slotEntry.rirConfigs.length>0?e.slotEntry.rirConfigs[0]:void 0,slotEntryId:e.slotEntry.id})}),S(me,{size:{xs:6,sm:1},children:El("rest",e.slotEntry.restTimeConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:1},children:El("max-rest",e.slotEntry.maxRestTimeConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},offset:{sm:4},children:El("weight",e.slotEntry.weightConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},children:El("max-weight",e.slotEntry.maxWeightConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:12,sm:4},children:S(rwt,{slotEntry:e.slotEntry,routineId:e.routineId})}),S(me,{size:{xs:6,sm:2},offset:{sm:4},children:El("reps",e.slotEntry.repetitionsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:6,sm:2},children:El("max-reps",e.slotEntry.maxRepetitionsConfigs,e.routineId,e.slotEntry.id)}),S(me,{size:{xs:12,sm:4},children:S(nwt,{slotEntry:e.slotEntry,routineId:e.routineId})})]}),m=e.total>1?MOt(e.index+1)+") ":"";return S(J.Fragment,{children:Q(me,{container:!0,paddingTop:1,spacing:1,children:[Q(me,{size:{xs:3,sm:1},alignContent:"center",children:[S(pn,{size:"small",onClick:i,disabled:c,children:r?S(jst,{}):S(kV,{})}),S(pn,{size:"small",onClick:()=>l.mutate(e.slotEntry.id),disabled:c,children:S(OS,{})})]}),S(me,{size:{xs:9,sm:3},alignContent:"center",children:Q(at,{variant:"body1",children:[m," ",(g=e.slotEntry.exercise)==null?void 0:g.getTranslation(f).name]})}),r&&Q(J.Fragment,{children:[S(me,{size:{xs:12,sm:8},children:S(Ky,{callback:u})}),S(me,{size:{xs:12,sm:4}})]}),e.slotEntry.hasProgressionRules?S(me,{size:8,children:S(Ei,{severity:"info",variant:"standard",sx:{mt:2},children:t("routines.exerciseHasProgression")})}):p()]})})},kOt=e=>{const{t}=je(),n=Yc(e.routineId),r=ast(e.routineId),o=sst(e.routineId),i=u=>({background:u?"lightblue":void 0}),a=(u,f)=>({backgroundColor:"white",margin:4,...f,opacity:1}),s=()=>{e.setSelectedDayIndex(null)},l=u=>{if(!u.destination)return;const f=Array.from(n.data.days),[p]=f.splice(u.source.index,1);f.splice(u.destination.index,0,p),e.setSelectedDayIndex(u.destination.index),n.data.days=f,r.mutate(f.map((m,g)=>({id:m.id,order:g+1})))},c=async()=>{const u={routine:e.routineId,name:`${t("routines.newDay")} ${n.data.days.length+1}`,order:n.data.days.length+1,is_rest:!1,need_logs_to_advance:!1};await o.mutateAsync(u),e.setSelectedDayIndex(n.data.days.length)};return n.isLoading?S(Er,{}):Q(me,{container:!0,direction:"row",spacing:1,children:[S(me,{size:12,children:S(Ft,{direction:"row",children:Q($he,{onDragEnd:l,onDragStart:s,children:[S(Ghe,{droppableId:"dayDroppable",direction:"horizontal",children:(u,f)=>Q(jne,{ref:u.innerRef,...u.droppableProps,value:e.selectedDayIndex,variant:"scrollable",scrollButtons:"auto",style:i(f.isDraggingOver),children:[n.data.days.map((p,m)=>S(Bhe,{draggableId:p.id.toString(),index:m,children:(g,y)=>S(kN,{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,style:a(y.isDragging,g.draggableProps.style??{}),label:p.getDisplayName(),value:p.id,icon:S(nde,{}),iconPosition:"start",onClick:()=>e.setSelectedDayIndex(m)})},p.id)),u.placeholder]})}),S(ct,{startIcon:o.isPending?S(vh,{}):S(Eo,{}),onClick:c,disabled:o.isPending,children:t("routines.addDay")})]})})}),n.data.days.length===0&&S(me,{size:12,children:Q(Ei,{severity:"info",children:[S(hh,{children:t("routines.routineHasNoDays")}),t("nothingHereYetAction")]})})]})},_Ot=e=>{const[t,n]=je(),r=bst(e.routineId),o=fst(e.routineId),i=gst(e.routineId),a=vst(e.routineId),s=Ra(),l=Lr(),[c,u]=x.useState(!1),[f,p]=x.useState(null),[m,g]=x.useState(null),[y,v]=x.useState(!0),w=(M,A)=>{m!==null&&(A==="timeout"?(r.mutate(m.id),g(null)):A!=="clickaway"&&(e.day.slots=[...e.day.slots,m].sort((_,N)=>_.order-N.order),g(null))),u(!1)},C=M=>{const A=e.day.slots.findIndex(_=>_.id===M);if(A!==-1){const _=[...e.day.slots],[N]=_.splice(A,1);e.day.slots=_,g(N),u(!0)}},E=M=>{if(e.day.slots.find(_=>_.id===M)===void 0){console.info(`Could not find slot with id ${M} to add config`);return}p(f===M?null:M)},I=()=>i.mutate({day:e.day.id,order:e.day.slots.length+1}),O=8,P=M=>{if(!M.destination)return;const A=Array.from(e.day.slots),[_]=A.splice(M.source.index,1);A.splice(M.destination.index,0,_),a.mutate(A.map((N,B)=>({id:N.id,order:B+1}))),e.day.slots=A},R=M=>({background:M?"lightblue":void 0}),D=(M,A)=>({border:M?`1px solid ${l.palette.grey[900]}`:`1px solid ${l.palette.grey[300]}`,backgroundColor:"white",marginBottom:O,...A});return Q(Tt,{children:[S(TOt,{routineId:e.routineId,day:e.day,setSelectedDayIndex:e.setSelectedDayIndex},`day-form-${e.day.id}`),!e.day.isRest&&e.day.slots.length>0&&Q(Tt,{children:[S(Xt,{height:40}),S(os,{control:S(Wo,{checked:y,onChange:()=>v(!y)}),label:t("routines.simpleMode")})]}),S(Xt,{height:20}),S($he,{onDragEnd:P,children:S(Ghe,{droppableId:"setDroppable",direction:"vertical",children:(M,A)=>S("div",{...M.droppableProps,ref:M.innerRef,style:R(A.isDraggingOver),children:e.day.slots.map((_,N)=>Q(J.Fragment,{children:[S(Bhe,{draggableId:_.id.toString(),index:N,children:(B,H)=>Q(me,{container:!0,padding:1,ref:B.innerRef,...B.draggableProps,style:D(H.isDragging,B.draggableProps.style??{}),children:[S(me,{sx:{backgroundColor:l.palette.common.white},size:12,children:Q(me,{container:!0,justifyContent:"space-between",alignItems:"center",children:[S(me,{children:Q(at,{variant:"h6",children:[S(pn,{...B.dragHandleProps,children:S(nde,{})}),S(pn,{onClick:()=>C(_.id),children:S(RP,{})}),_.entries.length>1?t("routines.supersetNr",{number:N+1}):t("routines.exerciseNr",{number:N+1})]})}),S(me,{children:_.entries.length>0&&Q(lB,{variant:"outlined",children:[S(ct,{onClick:()=>E(_.id),size:"small",disabled:o.isPending,startIcon:o.isPending?S(vh,{}):S(Eo,{}),children:t("routines.addSuperset")}),_.entries.length>0&&S(ct,{startIcon:S(tlt,{}),component:Do,size:"small",to:on(Yt.ROUTINE_EDIT_PROGRESSION,n.language,{id:e.routineId,id2:_.id}),children:t("routines.editProgression")})]})})]})}),!y&&Q(me,{size:12,children:[S(OOt,{routineId:e.routineId,slot:_},`slot-form-${_.id}`),S(Xt,{height:10})]}),S(me,{size:12,children:S(ROt,{slot:_,routineId:e.routineId,simpleMode:y})}),(f===_.id||_.entries.length===0)&&Q(me,{size:12,children:[S(Xt,{height:20}),S(Ky,{callback:j=>{j!==null&&(o.mutate({slot:_.id,exercise:j.data.base_id,type:"normal",order:_.entries.length+1,weight_unit:s.data.useMetric?a2e:s2e}),p(null))}})]})]})},_.id),S(Xt,{height:0,children:M.placeholder})]},`slot-${_.id}-${N}`))})})}),S(fI,{open:c,autoHideDuration:TI,onClose:w,children:S(Ei,{severity:"success",variant:"filled",sx:{width:"100%"},action:S(ct,{color:"warning",variant:"contained",size:"small",onClick:w,children:t("undo")}),children:"Set successfully deleted"})}),!e.day.isRest&&S(ct,{variant:"contained",color:"primary",startIcon:i.isPending?S(vh,{}):S(Eo,{}),onClick:I,children:t("routines.addExercise")})]})},$Ot=()=>{const{t:e,i18n:t}=je(),n=Lr(),r=Ra(),o=Ma(),i=o.routineId?parseInt(o.routineId):0,a=Yc(i),[s,l]=x.useState(null);if(a.isLoading||r.isLoading)return S(Er,{});if(a.isError)return Q("p",{children:["Error: ",a.error.message]});const c=a.data;return s===null&&c.days.length>0&&l(0),Q(Vw,{title:e("editName",{name:c.name}),backToUrl:on(Yt.ROUTINE_DETAIL,t.language,{id:i}),children:[Q(me,{container:!0,spacing:2,children:[S(me,{size:c.isTemplate?8:12,children:S(eC,{routine:c})}),c.isTemplate&&Q(me,{size:4,children:[S(Xt,{height:20}),S(Rpe,{routine:c})]}),Q(me,{size:12,children:[S(Xt,{height:20}),S(kOt,{routineId:i,selectedDayIndex:s,setSelectedDayIndex:l})]}),s!==null&&S(Tt,{children:S(me,{size:12,sx:{backgroundColor:n.palette.grey[100],padding:1},children:S(Xt,{children:S(_Ot,{day:c.days[s],routineId:i,setSelectedDayIndex:l})})})})]}),a.data.days.length>0&&Q(Ft,{spacing:2,sx:{mt:2},children:[S(Xt,{height:40}),S(at,{variant:"h4",children:e("routines.resultingRoutine")}),S(Bi,{}),Q(Xt,{children:[S(Dct,{}),S(Xt,{height:20}),S(Dpe,{routine:a.data})]})]})]})},NOt=({initialSession:e,dayId:t,routineId:n,selectedDate:r,setSelectedDate:o})=>{let i;const[a,s]=je(),[l,c]=J.useState(e),u=Sst(),f=Cst(l==null?void 0:l.id),p=xst(n,{routine:n,date:Zn(r.toJSDate()),day:t}),m=u.isPending||f.isPending||p.isLoading,g=Ko({notes:Uo().max(Kq,a("forms.maxLength",{chars:Kq})),date:Xs().required(),start:Xs().nullable(),end:Xs().nullable().min(MP("start"),a("forms.endBeforeStart")),fitInWeek:Fu()});return x.useEffect(()=>{p.data?(i.setValues({notes:p.data.notes||"",impression:p.data.impression||ug,date:p.data.date,start:p.data.timeStart?xt.fromJSDate(p.data.timeStart):null,end:p.data.timeEnd?xt.fromJSDate(p.data.timeEnd):null}),c(p.data)):p.isSuccess&&!p.data&&(i.setValues({notes:"",impression:ug,date:(e==null?void 0:e.date)||xt.now().toJSDate(),start:e!=null&&e.timeStart?xt.fromJSDate(e.timeStart):null,end:e!=null&&e.timeEnd?xt.fromJSDate(e.timeEnd):null}),c(void 0))},[p.data,p.isSuccess,e,r]),S(Oi,{enableReinitialize:!0,initialValues:{notes:l!==void 0?l.notes:"",date:l!==void 0?l.date:new Date,start:l!==void 0&&l.timeStart!==null?xt.fromJSDate(l.timeStart):null,end:l!==void 0&&l.timeEnd!==null?xt.fromJSDate(l.timeEnd):null,impression:l!==void 0?l.impression:ug},innerRef:y=>i=y,validationSchema:g,onSubmit:async y=>{const v={day:t,routine:n,date:Zn(r.toJSDate()),notes:y.notes,impression:y.impression,time_start:y.start?Dx(y.start.toJSDate()):null,time_end:y.end?Dx(y.end.toJSDate()):null};l!==void 0?await f.mutateAsync({...v,id:l.id}):await u.mutateAsync(v)},children:y=>S(pi,{children:Q(me,{container:!0,spacing:2,children:[S(me,{size:{xs:12,sm:6},children:S(Ys,{dateAdapter:Hl,adapterLocale:s.language,children:S(Ah,{value:r,defaultValue:xt.now(),label:a("date"),onChange:v=>{v&&(y.setFieldValue("date",v),o(v))},disableFuture:!0,slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.date&&!!y.errors.date}}})})}),S(me,{size:{xs:6,sm:3},children:S(Ys,{dateAdapter:Hl,adapterLocale:s.language,children:S(UF,{label:a("start"),...y.getFieldProps("start"),onChange:v=>{v&&y.setFieldValue("start",v)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.start&&!!y.errors.start,helperText:y.touched.start&&y.errors.start}}})})}),S(me,{size:{xs:6,sm:3},children:S(Ys,{dateAdapter:Hl,adapterLocale:s.language,children:S(UF,{label:a("end"),...y.getFieldProps("end"),onChange:v=>{v&&y.setFieldValue("end",v)},slotProps:{textField:{variant:"standard",fullWidth:!0,error:y.touched.end&&!!y.errors.end,helperText:y.touched.end&&y.errors.end}}})})}),S(me,{size:12,children:S(Ju,{fieldName:"notes",title:a("notes"),fieldProps:{multiline:!0,rows:4}})}),Q(me,{size:12,children:[S(at,{variant:"caption",children:a("routines.impression")}),Q(lB,{fullWidth:!0,color:"primary",children:[Q(ct,{size:"small",color:"info",variant:y.values.impression===dL?"contained":"outlined",onClick:()=>y.setFieldValue("impression",dL),children:[S(Jst,{}),a("routines.impressionBad")]}),Q(ct,{size:"small",color:"info",variant:y.values.impression===ug?"contained":"outlined",onClick:()=>y.setFieldValue("impression",ug),children:[S(Qst,{}),a("routines.impressionNeutral")]}),Q(ct,{size:"small",color:"info",variant:y.values.impression===fL?"contained":"outlined",onClick:()=>y.setFieldValue("impression",fL),children:[S(Xst,{}),a("routines.impressionGood")]})]})]}),S(me,{size:12,display:"flex",justifyContent:"end",children:S(ct,{disabled:m,color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:a("submit")})})]})})})},LOt=({dayId:e,routineId:t,selectedDate:n})=>{const{t:r,i18n:o}=je(),[i,a]=x.useState(!1),s=Yc(t),l=dst(t),c=Qc(),u=()=>a(!1),[f,p]=x.useState(null);let m;if(c.isSuccess&&(m=qu(o.language,c.data)),s.isLoading)return S(Er,{});const g=s.data,y=(g==null?void 0:g.getDayData(e,n.toJSDate()))??[],v=y.length===0,w=Ko({logs:ch().of(Ko().shape({rir:ko().nullable(),repetitions:ko().typeError(r("forms.enterNumber")).nullable(),weight:ko().typeError(r("forms.enterNumber")).nullable()}))}),C=async P=>{const R=v?null:y[0].iteration,D=P.logs.filter(M=>M.rir!==""||M.repetitions!==""||M.weight!=="").map(M=>{var A,_,N;return{date:n.toISO(),iteration:R,exercise:(A=M.exercise)==null?void 0:A.id,day:e,routine:t,slot_entry:M.slotEntry,rir:M.rir!==""?M.rir:null,rir_target:M.rirTarget!==""?M.rirTarget:null,repetitions_unit:(_=M.repetitionsUnit)==null?void 0:_.id,repetitions:M.repetitions!==""?M.repetitions:null,repetitions_target:M.repetitionsTarget!==""?M.repetitionsTarget:null,weight_unit:(N=M.weightUnit)==null?void 0:N.id,weight:M.weight!==""?M.weight:null,weight_target:M.weightTarget!==""?M.weightTarget:null}});await l.mutateAsync(D),a(!0)},E=async(P,R)=>{if(P===null)return;const D=R.values.logs.map(M=>f===M.exercise.id?{...M,weight:"",weightTarget:"",repetitions:"",repetitionsTarget:"",rir:"",rirTarget:"",exercise:P.exercise}:M);await R.setValues({...R.values,logs:D}),p(null)},I={logs:[]},O=v?g.dayDataCurrentIteration.filter(P=>{var R;return((R=P.day)==null?void 0:R.id)===e}):y;for(const P of O)for(const R of P.slots)for(const D of R.setConfigs)for(let M=0;M<D.nrOfSets;M++)I.logs.push({exercise:D.exercise,repetitionsUnit:D.repetitionsUnit,weightUnit:D.weightUnit,slotEntry:D.slotEntryId,rir:!v&&D.rir!==null?D.rir:"",rirTarget:!v&&D.rir!==null?D.rir:"",repetitions:!v&&D.repetitions!==null?D.repetitions:"",repetitionsTarget:!v&&D.repetitions!==null?D.repetitions:"",weight:!v&&D.weight!==null?D.weight:"",weightTarget:!v&&D.weight!==null?D.weight:""});return Q(Tt,{children:[v&&S(Ei,{severity:"info",sx:{marginTop:2},children:r("routines.weightLogNotPlanned")}),S(Oi,{enableReinitialize:!0,initialValues:I,validationSchema:w,onSubmit:C,children:P=>Q(pi,{children:[S(kue,{name:"logs",children:({insert:R,remove:D})=>S(Tt,{children:P.values.logs.map((M,A)=>{var _,N,B,H;return Q(me,{container:!0,spacing:1,sx:{mt:2},children:[(A===0||A>0&&P.values.logs[A-1].exercise.id!=P.values.logs[A].exercise.id)&&Q(Tt,{children:[Q(me,{size:12,children:[f!==P.values.logs[A].exercise.id&&S(at,{variant:"h6",children:(_=P.values.logs[A].exercise)==null?void 0:_.getTranslation(m).name}),f===P.values.logs[A].exercise.id&&S(Ky,{loadExercise:!0,callback:j=>E(j,P)})]}),Q(me,{size:12,children:[Q(ct,{type:"button",size:"small",onClick:()=>R(A,{exercise:P.values.logs[A].exercise,repetitions:P.values.logs[A].repetitions,weight:P.values.logs[A].weight}),children:[S(Eo,{}),r("routines.addAdditionalLog")]}),Q(ct,{type:"button",size:"small",onClick:()=>{f===P.values.logs[A].exercise.id?p(null):p(P.values.logs[A].exercise.id)},children:[S(nlt,{}),r("exercises.swapExercise")]}),Q(ct,{type:"button",size:"small",onClick:async()=>await P.setValues({...P.values,logs:P.values.logs.filter(j=>j.exercise.id!==P.values.logs[A].exercise.id)}),children:[S(OS,{}),r("delete")]})]})]}),S(me,{size:4,children:S(Ju,{fieldName:`logs.${A}.repetitions`,title:r("server.repetitions"),fieldProps:{slotProps:{input:{endAdornment:S(So,{position:"end",children:((N=P.values.logs[A].repetitionsUnit)==null?void 0:N.id)!==i2e?S(at,{variant:"caption",children:(B=P.values.logs[A].repetitionsUnit)==null?void 0:B.name}):null})}}}})}),S(me,{size:4,children:S(Ju,{fieldName:`logs.${A}.weight`,title:r("weight"),fieldProps:{slotProps:{input:{endAdornment:S(So,{position:"end",children:S(at,{variant:"caption",children:(H=P.values.logs[A].weightUnit)==null?void 0:H.name})})}}}})}),S(me,{size:3,children:S(dn,{fullWidth:!0,select:!0,label:r("routines.rir"),variant:"standard",...P.getFieldProps(`logs.${A}.rir`),children:Ure.map(j=>S(Zt,{value:j.value,children:j.label},j.value))})}),S(me,{size:1,children:S(pn,{size:"small",onClick:()=>D(A),children:S(OS,{})})})]},A)})})}),S(me,{container:!0,spacing:2,children:S(me,{size:12,display:"flex",justifyContent:"end",children:S(ct,{color:"primary",disabled:!P.isValid||P.isSubmitting||l.isPending,variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})})]})}),S(fI,{open:i,autoHideDuration:TI,onClose:u,children:S(Ei,{onClose:u,severity:"success",sx:{width:"100%"},children:r("success")})})]})},FOt=()=>{const e=Ma(),{t,i18n:n}=je(),[r,o]=x.useState(xt.now()),i=parseInt(e.routineId??"");if(Number.isNaN(i))return S("p",{children:"Please pass an integer as the routine id."});const a=parseInt(e.dayId??"");return Number.isNaN(a)?S("p",{children:"Please pass an integer as the day id."}):S(ds,{title:t("routines.addWeightLog"),backToUrl:on(Yt.ROUTINE_DETAIL,n.language,{id:i}),mainContent:Q(Ft,{children:[S(NOt,{routineId:i,dayId:a,selectedDate:r,setSelectedDate:o}),S(at,{variant:"h5",children:t("exercises.exercises")}),S(at,{variant:"body2",children:t("routines.impressionHelpText")}),S(LOt,{routineId:i,dayId:a,selectedDate:r})]})})},Whe=e=>{var t,n,r;return(t=e.mutationQuery)!=null&&t.isError?S(Tt,{children:Q(Ei,{severity:"error",sx:{mb:1},children:[S(hh,{children:(n=e.mutationQuery.error)==null?void 0:n.message}),S("ul",{children:qhe((r=e.mutationQuery.error.response)==null?void 0:r.data).map((o,i)=>S("li",{children:o},i))})]})}):null},I0=e=>{var y,v;const{t}=je(),[n,r]=x.useState(!0),[o,i]=x.useState([]),a=kat(e.routineId),s=e.forceInteger??!1;let l,c,u="";switch(e.type){case"weight":l=St.WEIGHT_CONFIG,c=St.MAX_WEIGHT_CONFIG,u=t("weight");break;case"reps":l=St.REPETITIONS_CONFIG,c=St.MAX_REPS_CONFIG,u=t("server.repetitions");break;case"sets":l=St.NR_OF_SETS_CONFIG,c=St.MAX_NR_OF_SETS_CONFIG,u=t("routines.sets");break;case"rest":l=St.REST_CONFIG,c=St.MAX_REST_CONFIG,u=t("routines.restTime");break;case"rir":l=St.RIR_CONFIG,c=St.MAX_RIR_CONFIG,u=t("routines.rir");break}const f=Ko({entries:ch().of(Ko().shape({edited:Fu(),iteration:ko().required(),value:ko().when("forceInteger",{is:!0,then:w=>w.integer(t("forms.enterInteger")).typeError(t("forms.enterNumber")),otherwise:w=>w.typeError(t("forms.enterNumber")).nullable().notRequired()}),valueMax:ko().typeError(t("forms.enterNumber")).nullable().when("forceInteger",{is:!0,then:w=>w.integer(t("forms.enterInteger")).typeError(t("forms.enterNumber")),otherwise:w=>w.typeError(t("forms.enterNumber")).nullable().notRequired()}).when("operation",{is:Qi,then:w=>w.min(MP("value"),t("forms.maxLessThanMin")),otherwise:w=>w}),operation:Uo().required(),operationMax:Uo().required(),requirements:ch().of(Uo().oneOf(ZN)),requirementsMax:ch().of(Uo().oneOf(ZN)),repeat:Fu(),repeatMax:Fu()})).test("inter-entry-validation","Your error message here",function(w){const{createError:C}=this,E=w;for(let I=0;I<E.length;I++){const O=E[I];if(O.iteration>1&&O.operation!==Qi){let P=!1,R=!1;for(let D=0;D<I;D++)E[D].operation===Qi&&E[D].value!==""&&E[D].edited&&(P=!0),E[D].operation===Qi&&E[D].valueMax!==""&&E[D].edited&&(R=!0);if(!P)return C({path:`entries[${I}].value`,message:t("routines.progressionNeedsReplace")});if(!R)return C({path:`entries[${I}].valueMax`,message:t("routines.progressionNeedsReplace")})}}return!0})}),p=(w,C)=>({forceInteger:s,edited:C,iteration:w,id:null,idMax:null,value:"",valueMax:"",operation:Qi,operationMax:Qi,step:"abs",stepMax:"abs",requirements:[],requirementsMax:[],repeat:!1,repeatMax:!1}),m={entries:[]};for(const w of e.iterations){const C=e.configs.find(I=>I.iteration===w),E=e.configsMax.find(I=>I.iteration===w);C===void 0?m.entries.push(p(w,!1)):m.entries.push({forceInteger:s,edited:!0,id:C.id,idMax:E===void 0?null:E.id,iteration:w,value:String(C.value),valueMax:E===void 0?"":String(E.value),operation:C.operation,operationMax:E===void 0?Qi:C.operation,step:C.step,stepMax:E===void 0?"abs":E.step,requirements:((y=C.requirements)==null?void 0:y.rules)??[],requirementsMax:E===void 0?[]:((v=E.requirements)==null?void 0:v.rules)??[],repeat:C.repeat,repeatMax:E===void 0?!1:C.repeat})}const g=w=>{const C=w.entries.filter(M=>M.edited),E=C.filter(M=>M.id!==null).map(M=>({id:M.id,slot_entry:e.slotEntryId,value:M.value,iteration:M.iteration,operation:M.operation,step:M.step,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),I=C.filter(M=>M.id===null&&M.value!=="").map(M=>({slot_entry:e.slotEntryId,value:M.value,iteration:M.iteration,operation:M.operation,step:M.step,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),O=e.configs.filter(M=>o.includes(M.iteration)).map(M=>M.id);C.forEach(M=>{M.value===""&&M.id!==null&&!O.includes(M.id)&&O.push(M.id)});const P=C.filter(M=>M.idMax!==null&&M.valueMax!=="").map(M=>({id:M.idMax,slot_entry:e.slotEntryId,value:M.valueMax,iteration:M.iteration,operation:M.operation,step:M.step,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),R=C.filter(M=>M.idMax===null&&M.valueMax!=="").map(M=>({iteration:M.iteration,slot_entry:e.slotEntryId,value:M.valueMax,operation:M.operation,step:M.stepMax,repeat:M.repeat,requirements:{rules:M.requirements??[]}})),D=e.configsMax.filter(M=>o.includes(M.iteration)).map(M=>M.id);C.forEach(M=>{M.valueMax===""&&M.idMax!==null&&!O.includes(M.idMax)&&D.push(M.idMax)}),a.mutate({values:{toAdd:I,toDelete:O,toEdit:E,apiPath:l},maxValues:{toAdd:R,toDelete:D,toEdit:P,apiPath:c}})};return S(Tt,{children:Q(Ft,{sx:{width:"100%"},children:[S(at,{variant:"h6",children:u}),S(Oi,{enableReinitialize:!0,initialValues:m,validationSchema:f,onSubmit:(w,{setSubmitting:C})=>{g(w),C(!1)},children:w=>S(pi,{children:Q(me,{container:!0,spacing:1,children:[S(me,{size:4,offset:2,textAlign:"center",children:t("value")}),S(me,{size:6,children:Q(me,{container:!0,spacing:1,children:[S(me,{size:3,children:t("routines.operation")}),S(me,{size:3,children:t("routines.step")}),Q(me,{size:3,textAlign:"center",children:[t("routines.requirements"),S("br",{}),S(qo,{title:t("routines.requirementsHelpText"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]}),Q(me,{size:3,textAlign:"center",children:[t("routines.repeat"),S("br",{}),S(qo,{title:t("routines.repeatHelpText"),children:S(pn,{onClick:()=>{},children:S(IS,{fontSize:"small"})})})]})]})}),S(me,{size:12,children:S(Bi,{})}),S(kue,{name:"entries",validateOnChange:!0,children:({insert:C,remove:E})=>S(Tt,{children:w.values.entries.map((I,O)=>Q(J.Fragment,{children:[Q(me,{size:2,display:"flex",justifyContent:"space-around",alignItems:"center",children:[e.cycleLength===7?t("routines.weekNr",{number:I.iteration}):t("routines.workoutNr",{number:I.iteration}),I.edited?S(pn,{disabled:I.iteration===1&&w.values.entries.filter(P=>P.edited&&P.iteration!==1).length>0,size:"small",onClick:()=>{I.id!==null&&i([...o,I.iteration]),E(O),C(O,p(I.iteration,!1))},children:S(RP,{})}):S(pn,{size:"small",onClick:()=>{E(O),C(O,p(I.iteration,!0))},children:S(Eo,{})})]}),S(me,{size:2,children:I.edited&&S(Ju,{fieldName:`entries.${O}.value`,title:t("min"),fullwidth:!0})}),S(me,{size:2,children:I.edited&&S(Ju,{fieldName:`entries.${O}.valueMax`,title:t("max"),fullwidth:!0})}),S(me,{size:6,children:Q(me,{container:!0,spacing:1,children:[S(me,{size:3,children:I.edited&&S(dn,{disabled:I.iteration===1,fullWidth:!0,select:!0,label:t("routines.operation"),variant:"standard",...w.getFieldProps(`entries.${O}.operation`),onChange:async P=>{w.handleChange(P),P.target.value===Qi&&(await w.setFieldValue(`entries.${O}.requirements`,[]),await w.setFieldValue(`entries.${O}.repeat`,!1))},children:D2e.map(P=>S(Zt,{value:P.value,children:P.label},P.value))})}),S(me,{size:3,children:I.edited&&Q(dn,{disabled:I.iteration===1||I.operation===Qi,fullWidth:!0,select:!0,label:t("routines.step"),variant:"standard",...w.getFieldProps(`entries.${O}.step`),children:[R2e.map(P=>S(Zt,{value:P.value,children:P.label},P.value)),(I.iteration===1||I.operation===Qi)&&S(Zt,{value:"na",children:"n/a"},"na")]})}),Q(me,{size:3,textAlign:"center",children:[I.edited&&S(POt,{disabled:I.iteration===1||I.operation===Qi,values:I.requirements,fieldName:`entries.${O}.requirements`}),I.requirements.length>=0&&S("br",{}),I.requirements.length>=0&&I.requirements.map((P,R)=>Q(at,{variant:"caption",children:[P,"  "]},R))]}),S(me,{size:3,textAlign:"center",children:I.edited&&S(Wo,{checked:w.values.entries[O].repeat,...w.getFieldProps(`entries.${O}.repeat`),disabled:I.iteration===1||I.operation===Qi})})]})})]},O))})}),a.isError&&S(me,{size:12,children:S(Whe,{mutationQuery:a})}),S(me,{size:12,display:"flex",justifyContent:"end",children:S(ct,{color:"primary",disabled:!w.isValid||w.isSubmitting||!w.dirty,variant:"contained",type:"submit",sx:{mt:2},children:t("save")})}),S(me,{size:12,children:S(Xt,{height:20})})]})})})]})})},jOt=()=>{const{t:e,i18n:t}=je(),n=Ma(),r=n.routineId?parseInt(n.routineId):-1,o=n.slotId?parseInt(n.slotId):-1,i=Yc(r),a=Qc();if(i.isLoading)return S(Er,{});const s=i.data;let l;a.isSuccess&&(l=qu(t.language,a.data));let c=null;for(const f of s.days){const p=f.slots.find(m=>m.id===o);if(p){c=p;break}}if(c===null)return S("p",{children:"Slot not found!"});const u=Object.keys(s.groupedDayDataByIteration).map(Number);return S(Tt,{children:S(Vw,{title:e("routines.editProgression"),backToUrl:on(Yt.ROUTINE_EDIT,t.language,{id:r}),children:c.entries.map(f=>{var p;return Q(J.Fragment,{children:[S(at,{variant:"h5",gutterBottom:!0,children:(p=f.exercise)==null?void 0:p.getTranslation(l).name}),Q(me,{container:!0,spacing:1,children:[S(me,{size:2,display:"flex",alignItems:"end",children:S(at,{variant:"body2",children:e("routines.rounding")})}),S(me,{size:5,children:S(DO,{routineId:r,entryId:f.id,initialValue:f.weightRounding,rounding:"weight",editProfile:!1})}),S(me,{size:5,children:S(DO,{routineId:r,entryId:f.id,initialValue:f.repetitionRounding,rounding:"reps",editProfile:!1})}),S(I0,{type:"sets",configs:f.nrOfSetsConfigs,configsMax:f.maxNrOfSetsConfigs,slotEntryId:f.id,routineId:r,iterations:u,forceInteger:!0,cycleLength:s.cycleLength}),S(I0,{type:"weight",configs:f.weightConfigs,configsMax:f.maxWeightConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength}),S(I0,{type:"reps",configs:f.repetitionsConfigs,configsMax:f.maxRepetitionsConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength}),S(I0,{type:"rir",configs:f.rirConfigs,configsMax:f.maxRirConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength}),S(I0,{type:"rest",configs:f.restTimeConfigs,configsMax:f.maxRestTimeConfigs,slotEntryId:f.id,routineId:r,iterations:u,cycleLength:s.cycleLength})]})]},f.id)})})})},BOt=()=>{const{t:e,i18n:t}=je(),n=Ma(),r=parseInt(n.routineId??"");if(Number.isNaN(r))return S("p",{children:"Please pass an integer as the routine id."});const o=Yc(r),i=o.data;return S(DP,{query:o,child:o.isSuccess&&S(ds,{title:i!=null&&i.isPublic?e("routines.publicTemplate"):e("routines.template"),subTitle:i.name,mainContent:Q(Ft,{spacing:2,children:[Q(at,{variant:"subtitle1",children:[i.start.toLocaleDateString()," - ",i.end.toLocaleDateString()," (",i.durationText,")"]}),i.description!==""&&S(at,{variant:"body2",sx:{whiteSpace:"pre-line"},children:i==null?void 0:i.description}),S(ct,{component:"a",href:on(Yt.ROUTINE_COPY,t.language,{id:r}),variant:"contained",children:e("routines.copyAndUseTemplate")}),i.dayDataCurrentIteration.filter(a=>a.day!==null).map((a,s)=>S(zV,{dayData:a,routineId:r,readOnly:!0},`dayDetails-${s}`))]}),sideBar:Q(Ft,{children:[S(Xt,{height:40}),Q(me,{container:!0,children:[S(me,{size:6,children:S(Xl,{primaryMuscles:i.mainMuscles.filter(a=>a.isFront),secondaryMuscles:i.secondaryMuscles.filter(a=>a.isFront),isFront:!0})}),S(me,{size:6,children:S(Xl,{primaryMuscles:i.mainMuscles.filter(a=>!a.isFront),secondaryMuscles:i.secondaryMuscles.filter(a=>!a.isFront),isFront:!1})})]})]})})})},zOt=e=>{const{t}=je(),n=e.logEntries??[],r=cst(e.routineId),o=ust(e.routineId),i=n.map(E=>({id:E.id,date:E.date,repetitions:E.repetitions,weight:E.weight,rir:E.rir,entry:E})),[a,s]=J.useState(i),[l,c]=J.useState({}),u=(E,I)=>{E.reason===ks.rowFocusOut&&(I.defaultMuiPrevented=!0)},f=E=>()=>{c({...l,[E]:{mode:zn.Edit}})},p=E=>()=>{c({...l,[E]:{mode:zn.View}})},m=E=>()=>{r.mutate(E),s(a.filter(I=>I.id!==E))},g=E=>()=>{c({...l,[E]:{mode:zn.View,ignoreModifications:!0}}),a.find(O=>O.id===E).isNew&&s(a.filter(O=>O.id!==E))},y=E=>{const I=E.entry;I!==void 0&&(I.date=E.date,I.repetitions=E.repetitions,I.weight=E.weight,I.rir=E.rir,o.mutate(I));const O={...E,isNew:!1};return s(a.map(P=>P.id===E.id?O:P)),O},v=E=>{c(E)},w=[{field:"date",type:"dateTime",flex:1,editable:!0,disableColumnMenu:!0,headerName:t("date"),valueFormatter:E=>E==null?"":`${E.toLocaleDateString()}`},{field:"repetitions",type:"number",disableColumnMenu:!0,editable:!0,headerName:t("routines.reps")},{field:"weight",type:"number",disableColumnMenu:!0,editable:!0,headerName:t("weight")},{field:"rir",type:"singleSelect",disableColumnMenu:!0,editable:!0,headerName:t("routines.rir"),getOptionValue:E=>E.value,getOptionLabel:E=>E.label,valueOptions:Hre},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({id:E})=>{var O;return((O=l[E])==null?void 0:O.mode)===zn.Edit?[S(yf,{icon:S(ade,{}),sx:{color:"primary.main"},label:t("save"),onClick:p(E)}),S(yf,{icon:S(Rst,{}),label:t("cancel"),className:"textPrimary",onClick:g(E),color:"inherit"})]:[S(yf,{icon:S(kV,{}),label:t("edit"),className:"textPrimary",onClick:f(E),color:"inherit"}),S(yf,{icon:S(OS,{}),label:t("delete"),onClick:m(E),color:"inherit"})]}}],C={pagination:{paginationModel:{pageSize:5}}};return Q(Tt,{children:[S(at,{variant:"h6",sx:{mt:4},children:e.exercise.getTranslation().name}),Q(me,{container:!0,spacing:2,children:[Q(me,{size:{xs:12,md:6},children:[S(Whe,{mutationQuery:o}),S(Epe,{initialState:C,pageSizeOptions:QN.pageSizeOptions,disableRowSelectionOnClick:!0,rows:a,columns:w,editMode:"row",rowModesModel:l,onRowModesModelChange:v,onRowEditStop:u,processRowUpdate:y})]}),S(me,{size:{xs:12,md:6},children:S(UOt,{data:n},e.exercise.id)})]})]})},VOt=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),HOt=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),S(ho,{children:Q(ji,{children:[S(at,{variant:"body1",children:xt.fromMillis(t==null?void 0:t[0].value).toLocaleString(xt.DATE_MED)}),Q(at,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.repetitions," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},UOt=e=>{const t=e.data.reduce(function(r,o){return r.set(o.repetitions,r.get(o.repetitions)||[]),r.get(o.repetitions).push(o),r},new Map),n=Zw(t.size);return S(Xt,{children:S(od,{width:"100%",height:250,children:Q(pYe,{children:[S(ls,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>xt.fromMillis(r).toLocaleString(xt.DATE_MED),type:"number"}),S(cs,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=VOt(o);return S(Iw,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r==null?void 0:r.toString()},r)}),S(ba,{content:S(HOt,{})}),S(qf,{strokeDasharray:"3 3"}),S(Ic,{})]})})})},GOt=()=>{const e=Ma(),t=e.routineId?parseInt(e.routineId):0,[n,r]=je(),o=Kue(t),i=Yc(t);if(o.isLoading||i.isLoading)return S(Er,{});let a=new Map;return a=o.data.reduce((s,l)=>(l.logs.forEach(c=>{const u=c.exerciseId;s.set(u,s.get(u)||[]),s.get(u).push(c)}),s),a),Q(Vw,{title:n("routines.logsHeader"),backToUrl:on(Yt.ROUTINE_DETAIL,r.language,{id:t}),optionsMenu:S(qo,{title:n("routines.statsOverview"),children:S(pn,{component:"a",href:on(Yt.ROUTINE_STATS_OVERVIEW,r.language,{id:t}),children:S(ede,{})})}),children:[S(at,{variant:"body1",children:n("routines.logsFilterNote")}),i.data.dayDataCurrentIteration.filter(s=>s.day!==null&&!s.day.isRest).map((s,l)=>Q(J.Fragment,{children:[Q(Ft,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[S(at,{variant:"h4",children:s.day.name}),S(ct,{component:Do,to:on(Yt.ROUTINE_ADD_LOG,r.language,{id:t,id2:s.day.id}),variant:"contained",children:n("routines.addLogToDay")})]}),s.slots.map(c=>c.exercises.map(u=>S(zOt,{routineId:t,exercise:u,logEntries:a.get(u.id)},u.id)))]},l))]})};var _p=(e=>(e.Volume="volume",e.Sets="sets",e.Intensity="intensity",e))(_p||{}),$p=(e=>(e.Mesocycle="mesocycle",e.Weekly="weekly",e.Iteration="iteration",e.Daily="daily",e))($p||{}),G0=(e=>(e.Exercises="exercises",e.Muscles="muscles",e.Total="total",e))(G0||{});const G$=({label:e,options:t,value:n,onChange:r})=>Q(jh,{fullWidth:!0,children:[S(Bh,{id:`${e}-label`,children:e}),S(jf,{labelId:`${e}-label`,id:`${e}-select`,value:n,label:e,onChange:r,children:t.map(o=>S(Zt,{value:o.value,children:o.label},o.value))})]});function qOt(e,t,n,r,o){switch(r){case"exercises":{const i=Object.keys(o.exercises).map(s=>{var l,c;return(c=(l=e.find(u=>u.id===parseInt(s)))==null?void 0:l.getTranslation(t))==null?void 0:c.name}),a=Object.keys(o.exercises).map(Number);return{headers:i,data:a.map(s=>o.exercises[s])}}case"muscles":{const i=Object.keys(o.muscle).map(s=>{var l;return((l=n.find(c=>c.id===parseInt(s)))==null?void 0:l.translatedName)??""}),a=Object.keys(o.muscle).map(Number);return{headers:i,data:a.map(s=>o.muscle[s])}}case"total":return{headers:[lr.t("total")],data:[o.total]};default:return{headers:[],data:[]}}}const WOt=(e,t,n,r,o,i,a,s)=>{const l={},c=e[t];let u=[],f=[];const p=(y,v)=>qOt(o,a,i,y,v);f=(y=>{let v=[];switch(n){case"mesocycle":v=p(r,c.mesocycle).headers;break;case"iteration":for(const w in y.iteration)v=v.concat(p(r,y.iteration[w]).headers);break;case"weekly":for(const w in y.weekly)v=v.concat(p(r,y.weekly[w]).headers);break;case"daily":for(const w in y.daily)v=v.concat(p(r,y.daily[w]).headers);break}return[...new Set(v)]})(c),f.forEach(y=>{l[y]=0});function g(y,v){f.map(C=>y[p(r,v).headers.indexOf(C)]).forEach((C,E)=>{C!==void 0&&(l[f[E]]+=C)})}switch(n){case"mesocycle":{const{data:y}=p(r,c.mesocycle);u=[{key:lr.t("total"),values:f.map(v=>y[f.indexOf(v)])}];break}case"iteration":{u=Object.entries(c.iteration).map(([y,v])=>{const{data:w}=p(r,v);return g(w,v),{key:`iteration ${y}`,values:f.map(C=>w[p(r,v).headers.indexOf(C)])}});break}case"weekly":{u=Object.entries(c.weekly).map(([y,v])=>{const{data:w}=p(r,v);return g(w,v),{key:`week ${y}`,values:f.map(C=>w[p(r,v).headers.indexOf(C)])}});break}case"daily":{u=Object.entries(c.daily).map(([y,v])=>{const{data:w}=p(r,v);return g(w,v),{key:new Date(y).toLocaleDateString(s),values:f.map(C=>w[p(r,v).headers.indexOf(C)])}});break}}return{headers:f,data:u,totals:l}};function KOt(e){const t=[];return e.headers.forEach(n=>{t.push({name:n,data:[]})}),e.data.forEach(n=>{n.values.forEach((r,o)=>{var a;const i=e.headers[o];i&&((a=t.find(s=>s.name===i))==null||a.data.push({category:n.key.toString(),value:r}))})}),t}const YOt=()=>{const e=Lr(),[t,n]=je(),r=Ma(),[o,i]=x.useState(_p.Volume),[a,s]=x.useState($p.Daily),[l,c]=x.useState(G0.Exercises),u=parseInt(r.routineId??"");if(Number.isNaN(u))return S("p",{children:"Please pass an integer as the routine id."});const f=Yc(u),p=Oat(u),m=_v(),g=Qc();if(p.isLoading||f.isLoading||m.isLoading||g.isLoading)return S(Er,{});const y=qu(n.language,g.data),v=f.data,w=[{value:_p.Volume,label:t("routines.volume")},{value:_p.Sets,label:t("routines.sets")},{value:_p.Intensity,label:t("routines.intensity")}],C=[{value:$p.Mesocycle,label:t("routines.currentRoutine")},{value:$p.Weekly,label:t("routines.weekly")},{value:$p.Iteration,label:t("routines.iteration")},{value:$p.Daily,label:t("routines.daily")}],E=[{value:G0.Exercises,label:t("exercises.exercises")},{value:G0.Muscles,label:t("exercises.muscles")},{value:G0.Total,label:t("total")}],I=_=>{i(_.target.value)},O=_=>{s(_.target.value)},P=_=>{c(_.target.value)},R=WOt(p.data,o,a,l,v.exercises,m.data,y,n.language),D=KOt(R),M=()=>S(jc,{children:Q(Lc,{size:"small",children:[S(Bf,{children:Q(cn,{children:[S(ke,{}),R.headers.map(_=>S(ke,{sx:{textAlign:"right"},children:_},_))]})}),Q(Fc,{children:[R.data.map(_=>Q(cn,{children:[S(ke,{children:_.key}),_.values.map((N,B)=>S(ke,{sx:{textAlign:"right"},children:(N==null?void 0:N.toFixed(o===_p.Intensity?2:0))||""},B))]},_.key)),a!==$p.Mesocycle&&Q(cn,{children:[S(ke,{sx:{fontWeight:"bold",backgroundColor:e.palette.grey.A200},children:t("total")}),R.headers.map(_=>{var N;return S(ke,{sx:{fontWeight:"bold",backgroundColor:e.palette.grey.A200,textAlign:"right"},children:(N=R.totals[_==null?void 0:_.toString()])==null?void 0:N.toFixed(o===_p.Intensity?2:0)},_)})]})]})]})}),A=Zw(D.length);return S(Vw,{title:`${t("routines.statsOverview")} - ${v.name}`,backToUrl:on(Yt.ROUTINE_DETAIL,n.language,{id:u}),optionsMenu:S(qo,{title:t("routines.logsOverview"),children:S(pn,{component:"a",href:on(Yt.ROUTINE_LOGS_OVERVIEW,n.language,{id:u}),children:S(ede,{})})}),children:Q(me,{container:!0,spacing:1,children:[S(me,{size:2,offset:3,children:S(G$,{label:"type",options:w,value:o,onChange:I})}),S(me,{size:2,children:S(G$,{label:"sub type",options:C,value:a,onChange:O})}),S(me,{size:2,children:S(G$,{label:"group by",options:E,value:l,onChange:P})}),S(me,{size:12,children:S(Xt,{width:"100%",height:400,children:S(od,{width:"100%",height:"100%",children:Q(Wz,{width:500,height:300,children:[S(qf,{strokeDasharray:"3 3"}),S(ls,{dataKey:"category",type:"category",allowDuplicatedCategory:!1}),S(cs,{dataKey:"value"}),S(ba,{formatter:_=>Number.isInteger(_)?_.toFixed(0):_.toFixed(2)}),S(Ic,{layout:"vertical",verticalAlign:"middle",align:"right",wrapperStyle:{paddingLeft:"20px"}}),D.map(_=>S(Wh,{dataKey:"value",data:_.data,name:_.name,stroke:A.next().value},_.name))]})})})}),Q(me,{size:12,children:[S(Xt,{height:20}),M()]})]})})},QOt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(eC,{closeFn:o})})]})},XOt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(eC,{closeFn:o,isTemplate:!0,isPublicTemplate:!0})})]})},JOt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(eC,{closeFn:o,isTemplate:!0,isPublicTemplate:!1})})]})},FH=e=>{const[t,n]=je(),r=e.showTemplateChip??!0,o=e.showTemplateVisibility??!1,i=e.linkDestination??Yt.ROUTINE_DETAIL,a=on(i,n.language,{id:e.routine.id}),s=e.routine.name!==""?e.routine.name:t("routines.routine"),l=e.routine.isTemplate&&r?S(nl,{color:"info",size:"small",label:t("routines.template")}):null,c=e.routine.isTemplate&&o?S(nl,{color:"info",size:"small",label:t(e.routine.isPublic?"public":"private")}):null;return Q(Tt,{children:[S(Co,{sx:{p:0},children:Q(Bl,{component:"a",href:a,children:[S(Wr,{primary:Q(Tt,{children:[s," ",l," ",c]}),secondary:`${e.routine.durationText} (${e.routine.start.toLocaleDateString()} - ${e.routine.end.toLocaleDateString()})`}),S(tde,{})]})}),S(Bi,{component:"li"})]})},vee=()=>{const e=Iat(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("routines.routines"),mainContent:S(Tt,{children:e.data.length===0?S(zh,{}):S(go,{children:S(ai,{sx:{py:0},children:e.data.map(n=>S(FH,{routine:n},n.id))},"abc")})}),fab:S(QOt,{})})},ZOt=()=>{const e=Pat(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("routines.templates"),mainContent:S(Tt,{children:e.data.length===0?S(zh,{}):S(go,{children:S(ai,{sx:{py:0},children:e.data.map(n=>S(FH,{routine:n,showTemplateChip:!1,showTemplateVisibility:!0,linkDestination:Yt.ROUTINE_DETAIL},n.id))},"abc")})}),fab:S(JOt,{})})},eIt=()=>{const e=Aat(),[t]=je();return e.isLoading?S(Er,{}):S(ds,{title:t("routines.publicTemplates"),mainContent:S(Tt,{children:e.data.length===0?S(zh,{}):S(go,{children:S(ai,{sx:{py:0},children:e.data.map(n=>S(FH,{routine:n,linkDestination:Yt.TEMPLATE_DETAIL,showTemplateChip:!1},n.id))},"abc")})}),fab:S(XOt,{})})},tIt=()=>S("div",{children:"About Page"});function jH(e){const[t]=je(),[n,r,o]=us(e.fieldName);return S($c,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>Sx(nl,{label:s,...a({index:l}),key:l})),onBlur:n.onBlur,renderInput:i=>S(dn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function nIt(e){const[t]=je(),[n,r,o]=us(e.fieldName);return S($c,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>e.options.find(a=>a.id===i).translatedName,...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>S(dn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function BH(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function rIt(e){const[t]=je(),[n,r]=us(e.fieldName);return Q(jh,{fullWidth:!0,children:[S(Bh,{id:"label-category",children:t("category")}),S(jf,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&S(aw,{error:!0,children:r.error})]})}const Khe=5,Yhe=40,zH=e=>Uo().min(Khe,e("forms.valueTooShort")).max(Yhe,e("forms.valueTooLong")).required(e("forms.fieldRequired")),VH=e=>ch().ensure().compact().of(Uo().min(Khe,e("forms.valueTooShort")).max(Yhe,e("forms.valueTooLong"))),HH=e=>Uo().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),Qhe=e=>ch().ensure().compact().of(Uo().min(15,e("forms.valueTooShort"))),oIt=e=>ko().required(e("forms.fieldRequired"));var Xhe=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(Xhe||{}),Wn=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))(Wn||{});const bee=e=>({type:Xhe.SET_NOTIFICATION,payload:e}),xee={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},iIt=x.createContext([xee,()=>xee]),aIt=()=>x.useContext(iIt),sIt=e=>({type:Wn.SET_NAME_EN,payload:e}),lIt=e=>({type:Wn.SET_DESCRIPTION_EN,payload:e}),cIt=e=>({type:Wn.SET_NOTES_EN,payload:e}),uIt=e=>({type:Wn.SET_ALIASES_EN,payload:e}),dIt=e=>({type:Wn.SET_NAME_I18N,payload:e}),fIt=e=>({type:Wn.SET_DESCRIPTION_I18N,payload:e}),pIt=e=>({type:Wn.SET_NOTES_I18N,payload:e}),hIt=e=>({type:Wn.SET_ALIASES_I18N,payload:e}),mIt=e=>({type:Wn.SET_CATEGORY,payload:e}),gIt=e=>({type:Wn.SET_EQUIPMENT,payload:e}),yIt=e=>({type:Wn.SET_PRIMARY_MUSCLES,payload:e}),vIt=e=>({type:Wn.SET_MUSCLES_SECONDARY,payload:e}),bIt=e=>({type:Wn.SET_VARIATION_ID,payload:e}),xIt=e=>({type:Wn.SET_NEW_VARIATION_BASE_ID,payload:e}),SIt=e=>({type:Wn.SET_LANGUAGE,payload:e}),wIt=e=>({type:Wn.SET_IMAGES,payload:e}),CIt=(e,t)=>{if(t===void 0)return e;switch(t.type){case Wn.RESET:return zO;case Wn.SET_NAME_EN:return{...e,nameEn:t.payload};case Wn.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case Wn.SET_NOTES_EN:return{...e,notesEn:t.payload};case Wn.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case Wn.SET_CATEGORY:return{...e,category:t.payload};case Wn.SET_EQUIPMENT:return{...e,equipment:t.payload};case Wn.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case Wn.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case Wn.SET_VARIATION_ID:return{...e,variationId:t.payload};case Wn.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationExerciseId:t.payload};case Wn.SET_LANGUAGE:return{...e,languageId:t.payload};case Wn.SET_NAME_I18N:return{...e,nameI18n:t.payload};case Wn.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case Wn.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case Wn.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case Wn.SET_IMAGES:return{...e,images:t.payload};default:return e}},zO={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationExerciseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},Jhe=x.createContext([zO,()=>zO]),EIt=({children:e})=>{const[t,n]=x.useReducer(CIt,zO);return S(Jhe.Provider,{value:[t,n],children:e})},Qv=()=>x.useContext(Jhe),TIt=({onContinue:e})=>{const[t]=je(),[n,r]=Qv(),[o,i]=x.useState(n.muscles),[a,s]=x.useState(n.musclesSecondary);x.useEffect(()=>{r(yIt(o))},[r,o]),x.useEffect(()=>{r(vIt(a))},[r,a]);const l=kP(),c=_v(),u=_P(),f=Ko({nameEn:zH(t),newAlternativeNameEn:VH(t),category:oIt(t)});return S(Oi,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:f,onSubmit:p=>{r(sIt(p.nameEn)),r(mIt(p.category)),r(uIt(p.newAlternativeNameEn)),r(gIt(p.equipment)),e()},children:p=>Q(pi,{children:[Q(Ft,{spacing:2,children:[S(BH,{fieldName:"nameEn"}),S(jH,{fieldName:"newAlternativeNameEn"}),l.isLoading?Q(Xt,{children:[" ",S(Qa,{})," "]}):S(rIt,{fieldName:"category",options:l.data.map(m=>S(Zt,{value:m.id,children:m.translatedName},m.id))}),u.isLoading?Q(Xt,{children:[" ",S(Qa,{})," "]}):S(nIt,{fieldName:"equipment",options:u.data}),c.isLoading?Q(Xt,{children:[" ",S(Qa,{})," "]}):Q(Tt,{children:[S($c,{multiple:!0,id:"muscles",options:c.data.map(m=>m.id),getOptionDisabled:m=>a.includes(m),getOptionLabel:m=>c.data.find(g=>g.id===m).getName(),value:o,onChange:(m,g)=>{i(g)},renderInput:m=>S(dn,{...m,variant:"standard",label:t("exercises.muscles"),value:p.getFieldProps("muscles").value,onChange:g=>{p.setFieldValue(p.getFieldProps("muscles").name,g.target.value)}})}),S($c,{multiple:!0,id:"secondary-muscles",options:c.data.map(m=>m.id),getOptionDisabled:m=>o.includes(m),getOptionLabel:m=>c.data.find(g=>g.id===m).getName(),value:a,onChange:(m,g)=>{s(g)},renderInput:m=>S(dn,{...m,variant:"standard",label:t("exercises.secondaryMuscles"),value:p.getFieldProps("muscles").value})})]}),Q(me,{container:!0,children:[S(me,{display:"flex",justifyContent:"center",size:6,children:S(Xl,{primaryMuscles:o.map(m=>c.data.find(g=>g.id===m)),secondaryMuscles:a.map(m=>c.data.find(g=>g.id===m)),isFront:!0})}),S(me,{display:"flex",justifyContent:"center",size:6,children:S(Xl,{primaryMuscles:o.map(m=>c.data.find(g=>g.id===m)),secondaryMuscles:a.map(m=>c.data.find(g=>g.id===m)),isFront:!1})})]})]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Xt,{sx:{mb:2},children:S("div",{children:S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function OIt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const See=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=Qv(),[s,l]=x.useState(!1),[c,u]=x.useState(i.variationId),[f,p]=x.useState(i.newVariationExerciseId);x.useEffect(()=>{a(bIt(c))},[a,c]),x.useEffect(()=>{a(xIt(f))},[a,f]);const m=(y,v)=>()=>{y!==null?(v=null,y===i.variationId&&(y=null)):(y=null,v===i.newVariationExerciseId&&(v=null)),u(y),p(v)};let g;return r===null?g=i.newVariationExerciseId===o:g=r===i.variationId,S(Co,{disableGutters:!0,children:S(Bl,{onClick:m(r,o),children:Q(me,{container:!0,children:[S(me,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:S(X1e,{max:4,spacing:"small",children:e.map(y=>y.mainImage?S(Yl,{src:y.mainImage.url},y.id):S(Yl,{children:S(ed,{})},y.id))})}),Q(me,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(y=>S("p",{style:{margin:0},children:y.getTranslation().name},y.id)),!s&&e.length>5?S(ku,{onMouseEnter:()=>l(!0)}):null]}),S(me,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:S(Wo,{edge:"start",checked:g,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),S(me,{size:12,children:S(Bi,{sx:{pt:1}})})]})})})},IIt=({onContinue:e,onBack:t})=>{const[n]=je(),r=sde(),[o,i]=x.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=OIt(a.filter(l=>l.variationId!==null),l=>l.variationId),Q(Tt,{children:[Q(me,{container:!0,children:[S(me,{size:{xs:12,sm:6},children:S(at,{children:n("exercises.whatVariationsExist")})}),S(me,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:S(dn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:S(So,{position:"start",children:S(vV,{})})}})})]}),r.isLoading?S(Er,{}):S(go,{elevation:2,sx:{mt:2},children:Q(ai,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>S(See,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>S(See,{exercises:s.get(l)},"variation-"+l))]})}),Q(Ei,{severity:"info",variant:"filled",sx:{mt:2},children:[S(hh,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Xt,{sx:{mb:2},children:Q("div",{children:[S(ct,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};function PIt(e){const{t}=je(),[n,r]=J.useState(e.initial.toString()),o=kP(),i=Ra(),a=async s=>{r(s.target.value),await AB(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?Q(jh,{fullWidth:!0,children:[S(Bh,{id:"label-category",children:t("category")}),S(jf,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>S(Zt,{value:s.id,children:s.translatedName},s.id))})]}):null}function AIt(e){const{t}=je(),[n,r]=J.useState(e.initial),o=_P(),i=Ra(),a=async s=>{r(s),await AB(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?S($c,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>o.data.find(l=>l.id===s).translatedName,onChange:(s,l)=>a(l),renderInput:s=>S(dn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var Go=function(){return Go=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Go.apply(this,arguments)};function aA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function wee(e){if(e){var t=e.textContent,n=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;e.style.direction=t&&n.test(t[0])?"rtl":"ltr"}}function Zhe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function MIt(){if(document.selection)return document.selection.createRange().parentElement();var e=window.getSelection();if(e&&e.rangeCount>0)return e.getRangeAt(0).startContainer.parentNode||void 0}function Cee(e){return e?e.replace(/&nbsp;|\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>"):""}function RIt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function eme(e,t){typeof t=="function"?t(e):typeof t=="object"&&t&&(t.current=e)}var DIt=J.memo(J.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=t.placeholder,c=aA(t,["className","disabled","tagName","value","placeholder"]),u=J.useRef(null),f=J.useRef(s),p=J.useRef(c);return J.useEffect(function(){p.current=c;var m=u.current;m&&Cee(f.current)!==Cee(s)&&(f.current=s,m.innerHTML=s,RIt(m))}),J.useMemo(function(){function m(v){u.current=v,wee(v),eme(v,n)}function g(v){var w,C,E=u.current;if(E){var I=E.innerHTML;I!==f.current&&((C=(w=p.current).onChange)===null||C===void 0||C.call(w,Go(Go({},v),{target:{value:I,name:c.name}}))),wee(E),f.current=I}}var y=Zhe("rsw-ce",r);return J.createElement(i||"div",Go(Go({},c),{className:y,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(v){return(p.current.onBlur||g)(v)},onInput:g,onKeyDown:function(v){return(p.current.onKeyDown||g)(v)},onKeyUp:function(v){return(p.current.onKeyUp||g)(v)},placeholder:l,ref:m}))},[r,o,l,i])})),tme=J.createContext(void 0);function nme(e){var t=e.children,n=J.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return Go(Go({},s),a)})}return J.createElement(tme.Provider,{value:r},t)}function rC(){var e=J.useContext(tme);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}var Eee=[],P0=[];function kIt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=Eee.indexOf(i);a===-1&&(a=Eee.push(i)-1,P0[a]={}),n=P0[a]&&P0[a][r]?P0[a][r]:P0[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;u<c.length;u++)l.setAttribute(c[u],t.attributes[c[u]]);var f=r==="prepend"?"afterbegin":"beforeend";return i.insertAdjacentElement(f,l),l}}var _It=".rsw-editor{border:1px solid #ddd;border-radius:.375rem;display:flex;flex-direction:column;min-height:100px;overflow:hidden}.rsw-ce{flex:1 0 auto;padding:.5rem}.rsw-ce:focus{outline:1px solid #668}.rsw-ce[contentEditable=true]:empty:not(:focus):before{color:grey;content:attr(placeholder);pointer-events:none}.rsw-html{background:transparent;border:none;font-family:monospace,Courier New}.rsw-separator{align-self:stretch;border-right:1px solid #ddd;display:flex;margin:0 3px}.rsw-dd{box-sizing:border-box;outline:none}.rsw-btn{background:transparent;border:0;color:#222;cursor:pointer;font-size:1em;height:2em;outline:none;padding:0;width:2em}.rsw-btn:hover{background:#eaeaea}.rsw-btn[data-active=true]{background:#e0e0e0}.rsw-toolbar{align-items:center;background-color:#f5f5f5;border-bottom:1px solid #ddd;display:flex}";kIt(_It,{});var rme=J.forwardRef(function(t,n){var r=t.autoFocus,o=t.children,i=t.containerProps,a=t.onSelect,s=aA(t,["autoFocus","children","containerProps","onSelect"]),l=rC();J.useEffect(function(){return document.addEventListener("click",c),function(){return document.removeEventListener("click",c)}});function c(m){var g;m.target!==l.$el&&(!((g=l.$el)===null||g===void 0)&&g.contains(m.target)||l.update({$selection:void 0}))}function u(m){a==null||a(m),l.update({$selection:MIt()})}function f(m){l.update({$el:m}),eme(m,n),r&&m&&l.$el===void 0&&m.focus()}var p=Zhe("rsw-editor",i==null?void 0:i.className);return l.htmlMode?J.createElement("div",Go({},i,{className:p}),o,J.createElement("textarea",Go({},s,{className:"rsw-ce rsw-html"}))):J.createElement("div",Go({},i,{className:p}),o,J.createElement(DIt,Go({},s,{ref:f,onSelect:u})))});function $It(){return J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",style:{verticalAlign:"text-top"}},J.createElement("path",{fill:"currentColor",d:"M6.99938 12.998v-2H20.9994v2H6.99938zm0 6.0001v-2H20.9994v2H6.99938zm0-12.00001v-2H20.9994v2H6.99938zm-4 1v-3h-1v-1h2v4h-1zm-1 9.00001v-1h3v4h-3v-1h2v-.5h-1v-1h1v-.5h-2zM4.25 10c.41421 0 .75.3358.75.75 0 .2024-.08017.3861-.2105.521L3.11983 13H5v1H2v-.9218L4 11H2v-1h2.25z"}))}function NIt(){return J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",style:{verticalAlign:"text-top"}},J.createElement("path",{fill:"currentColor",d:"M7 5h14v2H7V5zm0 8v-2h14v2H7zM4 4.50001c.83 0 1.5.66992 1.5 1.5 0 .83007-.67 1.5-1.5 1.5s-1.5-.66993-1.5-1.5c0-.83008.67-1.5 1.5-1.5zM4 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zM7 19v-2h14v2H7zm-3-2.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z"}))}var ome=eu("Bold","𝐁","bold"),ime=eu("Bullet list",J.createElement(NIt,null),"insertUnorderedList"),LIt=eu("Clear formatting","T̲ₓ","removeFormat"),ame=eu("Italic","𝑰","italic"),FIt=eu("Strike through",J.createElement("s",null,"ab"),"strikeThrough"),jIt=eu("Link","🔗",function(e){var t=e.$selection;(t==null?void 0:t.nodeName)==="A"?document.execCommand("unlink"):document.execCommand("createLink",!1,prompt("URL","")||void 0)}),sme=eu("Numbered list",J.createElement($It,null),"insertOrderedList"),lme=eu("Redo","↷","redo"),cme=eu("Underline",J.createElement("span",{style:{textDecoration:"underline"}},"𝐔"),"underline"),ume=eu("Undo","↶","undo");function eu(e,t,n){return r.displayName=e.replace(/\s/g,""),r;function r(o){var i=rC(),a=i.$el,s=i.$selection,l=!1;typeof n=="string"&&(l=!!s&&document.queryCommandState(n));function c(u){u.preventDefault(),document.activeElement!==a&&(a==null||a.focus()),typeof n=="function"?n(i):document.execCommand(n)}return i.htmlMode?null:J.createElement("button",Go({className:"rsw-btn","data-active":l,onMouseDown:c,tabIndex:-1,title:e,type:"button"},o),t)}}var BIt=zIt("Styles",[["Normal","formatBlock","DIV"],["𝗛𝗲𝗮𝗱𝗲𝗿 𝟭","formatBlock","H1"],["Header 2","formatBlock","H2"],["𝙲𝚘𝚍𝚎","formatBlock","PRE"]]);function zIt(e,t){return n.displayName=e,n;function n(r){var o=rC(),i=o.$el,a=o.$selection,s=o.htmlMode;if(s)return null;var l=t.findIndex(function(u){return u[1]==="formatBlock"&&(a==null?void 0:a.nodeName)===u[2]});return J.createElement(VIt,Go({},r,{items:t,onChange:c,selected:l,tabIndex:-1,title:e}));function c(u){var f=u.target,p=f.value,m=parseInt(p,10),g=t[m]||[],y=g[1],v=g[2];u.preventDefault(),document.activeElement!==i&&(i==null||i.focus()),typeof y=="function"?y(o):y&&document.execCommand(y,!1,v),setTimeout(function(){return f.value=p},10)}}}function VIt(e){var t=e.items,n=e.selected,r=aA(e,["items","selected"]);return J.createElement("select",Go({className:"rsw-dd"},r,{value:n}),J.createElement("option",{hidden:!0},r.title),t.map(function(o,i){return J.createElement("option",{key:o[2],value:i},o[0])}))}function HIt(e){var t=aA(e,[]),n=rC();function r(){n.update({htmlMode:!n.htmlMode})}return J.createElement("button",Go({className:"rsw-btn","data-active":n.htmlMode,onClick:r,tabIndex:-1,title:"HTML mode",type:"button"},t),"</>")}function Ag(e){var t=rC();return t.htmlMode?null:J.createElement("div",Go({className:"rsw-separator"},e))}function dme(e){return J.createElement("div",Go({className:"rsw-toolbar"},e))}J.forwardRef(function(t,n){return J.createElement(nme,null,J.createElement(rme,Go({},t,{ref:n}),t.children||J.createElement(dme,null,J.createElement(ume,null),J.createElement(lme,null),J.createElement(Ag,null),J.createElement(ome,null),J.createElement(ame,null),J.createElement(cme,null),J.createElement(FIt,null),J.createElement(Ag,null),J.createElement(sme,null),J.createElement(ime,null),J.createElement(Ag,null),J.createElement(jIt,null),J.createElement(LIt,null),J.createElement(HIt,null),J.createElement(Ag,null),J.createElement(BIt,null))))});function UIt(e){return S(nme,{children:S(rme,{...e,children:Q(dme,{children:[S(ome,{}),S(ame,{}),S(cme,{}),S(Ag,{}),S(ime,{}),S(sme,{}),S(Ag,{}),S(ume,{}),S(lme,{})]})})})}function UH(e){const[t,n,r]=us(e.fieldName);return Q(Tt,{children:[S("div",{"data-testid":"jodit-editor",children:S(UIt,{value:t.value,onChange:o=>r.setValue(o.target.value)})}),n.touched&&!!n.error&&S(aw,{error:!0,children:n.error})]})}const GIt=({exerciseId:e,image:t,canDelete:n})=>{const[r]=je(),o=slt(e);return Q(ho,{children:[S(Nc,{component:"img",image:t.url,sx:{height:120},alt:""}),S(ul,{children:n&&S(ct,{color:"primary",onClick:()=>o.mutate(t.id),children:r("delete")})})]})},qIt=({exerciseId:e})=>{const[t]=je(),n=Ra(),r=llt(e),o=async i=>{var s;if(!((s=i.target.files)!=null&&s.length))return;const[a]=i.target.files;n.isSuccess&&await r.mutate({exerciseId:e,image:a,imageData:{url:"",file:a,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return Q(ho,{children:[S(Nc,{children:S(Xt,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:S(Zue,{sx:{fontSize:80,color:"gray"}})})}),S(ul,{children:Q(ct,{component:"label",children:[t("add"),S("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:o})]})})]})};function Tee(e){const{t}=je(),n=_v(),r=async o=>{e.setValue(o),await AB(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?S($c,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>S(dn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const WIt=({video:e,canDelete:t})=>{const[n]=je();return Q(ho,{children:[S(Nc,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),S(ul,{children:t&&S(ct,{color:"primary",onClick:()=>P2e(e.id),children:n("delete")})})]})},KIt=({exerciseId:e})=>{const[t]=je(),n=Ra(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await I2e(e,n.data.username,i)};return Q(ho,{children:[S(Nc,{children:S(Xt,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:S(Zue,{sx:{fontSize:80,color:"gray"}})})}),S(ul,{children:Q(ct,{component:"label",children:[t("add"),S("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},YIt="check-permission",QIt=async e=>{const t=ft(YIt,{query:{permission:e}}),n=await it.get(t,{headers:ht()});return n.status===400?!1:n.data.result};function nf(e){return yr({queryKey:[u2e,e],queryFn:()=>QIt(e.valueOf())})}var Au=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.ADD_IMAGE="exercises.add_exerciseimage",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.ADD_VIDEO="exercises.add_exercisevideo",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(Au||{});const XIt=({exerciseId:e,language:t})=>{const[n]=je(),[r,o]=x.useState(!1),[i,a]=x.useState([]),[s,l]=x.useState([]),c=olt(e),u=ilt(e),f=alt(e),p=nf(Au.ADD_IMAGE),m=nf(Au.DELETE_IMAGE),g=nf(Au.ADD_VIDEO),y=nf(Au.DELETE_VIDEO),v=nf(Au.EDIT_EXERCISE),w=_v(),C=Ra(),E=c.data;if(x.useEffect(()=>{c.data!==void 0&&(a(E.muscles.map(M=>M.id)),l(E.musclesSecondary.map(M=>M.id)))},[c.data]),c.isLoading||w.isLoading||c.isLoading||C.isLoading||p.isLoading||m.isLoading||g.isLoading||y.isLoading||v.isLoading)return S(Qa,{});const I=E.getTranslation(t),P=t.id!==(I==null?void 0:I.language)?new kre(null,null,"","",t.id):I,R=E.getTranslation(),D=Ko({name:zH(n),alternativeNames:VH(n),description:HH(n)});return Q(Tt,{children:[S(Oi,{initialValues:{name:P.name,alternativeNames:P.aliases.map(M=>M.alias),description:P.description},enableReinitialize:!0,validationSchema:D,onSubmit:async M=>{const A=P.id?await f.mutateAsync({id:P.id,exerciseId:E.id,languageId:t.id,name:M.name,description:M.description,author:""}):await u.mutateAsync({exerciseId:E.id,languageId:t.id,name:M.name,description:M.description,author:C.data.username}),_=P.aliases.map(j=>j.alias),N=M.alternativeNames,B=N.filter(j=>!_.includes(j)),H=_.filter(j=>!N.includes(j));B.forEach(j=>{JN(A.id,j)}),H.forEach(j=>{O2e(P.aliases.find(L=>L.alias===j).id)}),o(!0)},children:S(pi,{children:Q(me,{container:!0,spacing:1,children:[r&&Q(me,{size:12,children:[S(Ei,{severity:"success",action:S(pn,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:S(cw,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),S(vi,{})]}),S(me,{size:6,children:S(at,{variant:"h5",children:n("English")})}),S(me,{size:6,children:Q(at,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),Q(me,{size:12,children:[S(vi,{}),S(at,{variant:"h6",children:n("name")})]}),Q(me,{size:6,children:[R.name,S("ul",{children:R.aliases.map(M=>S("li",{children:M.alias},M.id))})]}),Q(me,{size:6,children:[S(Xt,{mb:2,children:S(BH,{fieldName:"name"})}),S(jH,{fieldName:"alternativeNames"})]}),S(me,{size:12,children:S(vi,{})}),S(me,{size:12,children:S(at,{variant:"h6",children:n("exercises.description")})}),S(me,{size:{xs:12,md:6},children:S("div",{dangerouslySetInnerHTML:{__html:R.description}})}),S(me,{size:{xs:12,md:6},children:S(UH,{fieldName:"description"})}),v.data&&Q(Tt,{children:[S(me,{size:12,children:S(vi,{})}),S(me,{size:{xs:12,md:6},children:S(PIt,{exerciseId:E.id,initial:E.category.id})}),S(me,{size:{xs:12,md:6},children:S(AIt,{exerciseId:E.id,initial:E.equipment.map(M=>M.id)})})]}),Q(me,{size:12,children:[S(vi,{}),S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},disabled:c.isLoading||u.isPending||f.isPending,children:n("save")})]})]})})}),S(vi,{}),S(at,{variant:"h6",children:n("images")}),Q(me,{container:!0,spacing:2,mt:2,children:[p.data&&S(me,{size:{md:3},children:S(qIt,{exerciseId:E.id})},"add"),E.images.map(M=>S(me,{size:{md:3},children:S(GIt,{exerciseId:E.id,image:M,canDelete:m.data})},M.id))]}),S(vi,{}),S(at,{variant:"h6",children:n("videos")}),Q(me,{container:!0,spacing:2,mt:2,children:[g.data&&S(me,{size:{md:3},children:S(KIt,{exerciseId:E.id})},"add"),E.videos.map(M=>S(me,{size:{md:3},children:S(WIt,{video:M,canDelete:y.data})},M.id))]}),v.data&&Q(Tt,{children:[S(vi,{}),S(at,{variant:"h6",children:n("exercises.muscles")}),Q(me,{container:!0,spacing:1,mt:2,children:[S(me,{size:{xs:12,md:6},children:S(Tee,{exerciseId:E.id,value:i,setValue:a,blocked:s,isMain:!0})}),S(me,{size:{xs:12,md:6},children:S(Tee,{exerciseId:E.id,value:s,setValue:l,blocked:i,isMain:!1})}),S(me,{size:{sm:6},offset:{md:3},children:Q(me,{container:!0,children:[S(me,{display:"flex",justifyContent:"center",size:6,children:S(Xl,{primaryMuscles:i.map(M=>w.data.find(A=>A.id===M)),secondaryMuscles:s.map(M=>w.data.find(A=>A.id===M)),isFront:!0})}),S(me,{display:"flex",justifyContent:"center",size:6,children:S(Xl,{primaryMuscles:i.map(M=>w.data.find(A=>A.id===M)),secondaryMuscles:s.map(M=>w.data.find(A=>A.id===M)),isFront:!1})})]})})]})]})]})},JIt=({mainImage:e,sideImages:t})=>Q(me,{container:!0,spacing:1,children:[e&&S(me,{size:12,children:S(ho,{children:S(Nc,{component:"img",image:e.url,alt:""})})}),t.map(n=>S(me,{size:6,children:S(ho,{children:S(Nc,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),ZIt=({videos:e})=>S(me,{container:!0,spacing:1,children:e.map(t=>S(me,{size:6,children:S(ho,{children:S(Nc,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function GH(){var r,o;const e=Ra(),t=nf(Au.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const ePt=({setEditMode:e})=>{const[t]=je();return Q(Xt,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[S(at,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),S(at,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),S(ct,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},tPt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=je(),i=GH(),a=e.getTranslation(n),s=n&&n.id!==a.language;return Q(me,{container:!0,children:[s&&i.canContribute&&S(me,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:S(ePt,{setEditMode:r})}),Q(me,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&Q(Tt,{children:[Q("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),S(vi,{})]}),S(at,{variant:"h5",children:o("exercises.description")}),S("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),S(vi,{}),(a==null?void 0:a.notes.length)>0&&S(at,{variant:"h5",children:o("exercises.notes")}),S("ul",{children:a==null?void 0:a.notes.map(c=>S("li",{children:c.note},c.id))}),S(vi,{}),S(at,{variant:"h5",children:o("exercises.muscles")}),Q(me,{container:!0,children:[S(me,{order:{xs:1},size:{xs:6,md:3},children:S(Xl,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),Q(me,{order:{xs:2,md:3},size:{xs:6,md:3},children:[S("h3",{children:o("exercises.primaryMuscles")}),S("ul",{children:e.muscles.map(c=>S("li",{children:c.getName()},c.id))})]}),S(me,{order:{xs:3,md:2},size:{xs:6,md:3},children:S(Xl,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),Q(me,{order:{xs:4},size:{xs:6,md:3},children:[S("h3",{children:o("exercises.secondaryMuscles")}),S("ul",{children:e.musclesSecondary.map(c=>S("li",{children:c.getName()},c.id))})]})]}),S(vi,{})]}),Q(me,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[S(JIt,{mainImage:e.mainImage,sideImages:e.sideImages}),S(vi,{}),S(ZIt,{videos:e.videos})]}),Q(me,{order:{xs:3},size:12,children:[S(Bi,{}),S(vi,{}),t.length>0&&S(at,{variant:"h5",children:o("exercises.variations")}),S(me,{container:!0,spacing:2,children:t.map(c=>S(me,{size:{xs:6,md:2},children:S(Dde,{exercise:c,language:n},c.id)},c.id))})]}),S(me,{order:{xs:4},size:12,children:Q(at,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",S("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};function nPt(e){var f,p;const[t,n]=J.useState(null),[r,o]=J.useState(null),[i]=je(),a=sd(),s=()=>{o(null),n(null)},l=async()=>{var m;await w2e((m=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:m.id),e.onClose(),e.onChangeLanguage()},c=async(m=!1)=>{m?await pq(e.currentExercise.id,r==null?void 0:r.uuid):await pq(e.currentExercise.id),e.onClose(),a("../overview")},u=async m=>{const g=m!==void 0?m:t;if(g!==null)try{const y=await hv(g);o(y)}catch{o(null)}};return Q(Tt,{children:[S(eT,{id:"alert-dialog-title",children:i("delete")}),Q(Ax,{children:[S("p",{children:i("exercises.deleteExerciseBody",{name:(f=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:f.name,language:(p=e.currentLanguage)==null?void 0:p.nameLong})}),S("p",{children:i("cannotBeUndone")}),S("p",{children:S("b",{children:i("exercises.replacements")})}),S("p",{children:i("exercises.replacementsInfoText")}),S("p",{children:i("exercises.replacementsSearch")}),S(Ky,{callback:m=>{m!==null&&(n(m.data.base_id),u(m.data.base_id))}}),S(dn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async m=>{n(m.target.value!==""?parseInt(m.target.value):null)},value:t??"",InputProps:{endAdornment:S(So,{position:"start",children:S(pn,{onClick:()=>u(),children:S(Pst,{})})})},fullWidth:!0,variant:"standard"}),r===null&&S(Tt,{children:S("p",{children:S("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&Q(Tt,{children:[Q("p",{children:["Selected exercise for replacement:",S(qo,{title:i("copyToClipboard"),children:S(pn,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:S(Lst,{})})})]}),Q(Co,{disablePadding:!0,children:[S(pB,{children:S(Yl,{children:r.mainImage?S(Yl,{alt:"",src:`${CB}${r.mainImage.url}`,variant:"rounded"}):S(ed,{})})}),S(Wr,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),S(pn,{onClick:s,children:S($st,{})})]})]})]}),Q(Px,{children:[S(ct,{onClick:()=>e.onClose(),children:i("cancel")}),S(ct,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),S(ct,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),S(ct,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const rPt="_root_l288f_1",oPt="_detail_language_l288f_4",iPt="_detail_l288f_4",aPt="_languages_l288f_28",sPt="_language_l288f_28",lPt="_header_l288f_52",cPt="_toolbar_l288f_55",Ip={root:rPt,detail_language:oPt,detail:iPt,languages:aPt,language:sPt,header:lPt,toolbar:cPt},uPt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var O,P,R;const[a,s]=x.useState(null),[l,c]=J.useState(!1),u=!!a,[f]=je(),p=nf(Au.DELETE_EXERCISE),m=nf(Au.EDIT_EXERCISE),g=Ra(),y=g.isSuccess&&g.data===null;let v=!1;g.isSuccess&&m.isSuccess&&(v=m.data||g.data!==null&&g.data.isTrustworthy);const w=D=>{s(D.currentTarget)},C=()=>{s(null)},E=D=>{n(D),C()},I=t.map(D=>Q(Zt,{onClick:()=>E(D),selected:(r==null?void 0:r.id)===D.id,children:[S(Wr,{children:D.nameLong}),S(rl,{children:e.availableLanguages.includes(D.id)?S(Yst,{}):S(Eo,{})})]},D.nameShort));return S(me,{container:!0,children:S(me,{size:12,children:Q("div",{className:Ip.root,children:[S(Ix,{open:l,onClose:()=>c(!1),children:S(nPt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),Q("div",{className:Ip.detail_language,children:[Q("div",{className:Ip.detail,children:[S(Do,{to:"../overview",children:f("exercises.exercises")})," > ",(O=e.getTranslation(r))==null?void 0:O.name]}),S("div",{className:Ip.languages,children:Q("div",{className:Ip.language,children:[S(ct,{size:"small",id:"basic-button",onClick:w,startIcon:S(ide,{}),children:r==null?void 0:r.nameLong}),Q(ss,{id:"basic-menu",anchorEl:a,open:u,onClose:C,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[S(Zt,{disabled:!0,children:f("exercises.changeExerciseLanguage")}),S(Bi,{}),I]})]})})]}),Q("div",{className:Ip.header,children:[S(at,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(P=e.getTranslation(r))==null?void 0:P.name}),!y&&Q("nav",{className:Ip.toolbar,children:[p.isSuccess&&p.data&&(r==null?void 0:r.id)===((R=e.getTranslation(r))==null?void 0:R.language)&&S(ct,{onClick:()=>c(!0),children:f("delete")}),v&&S(ct,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),S(ct,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),Q(Ft,{direction:"row",spacing:1,mt:2,children:[S(nl,{label:e.category.translatedName,size:"small"}),e.equipment.map(D=>S(nl,{label:D.translatedName,variant:"outlined",size:"small"},D.id))]})]})})})},vi=()=>S(Xt,{sx:{height:20}}),dPt=()=>{var g;const[e,t]=x.useState(r2e),[n,r]=x.useState(!1),{i18n:o}=je(),i=sd(),a=Qc(),s=Ma(),l=parseInt(s.exerciseId??"");if(Number.isNaN(l))return S("p",{children:"Please pass an integer as the exercise id."});const c=yr({queryKey:[c2e,l],queryFn:()=>hv(l),enabled:a.isSuccess}),u=yr({queryKey:[l2e,(g=c.data)==null?void 0:g.variationId],queryFn:()=>{var y;return y2e((y=c.data)==null?void 0:y.variationId)},enabled:c.isSuccess});if(J.useEffect(()=>{if(a.data===void 0)return;const y=qu(o.language,a.data);t(y)},[a.data]),c.isError||a.isError||u.isError)return i("/not-found"),null;const f=y=>{const v=qu(y.nameShort,a.data);v!==void 0&&t(v)},p=u.isSuccess?u.data.filter(y=>y.id!==l):[];let m;return c.isSuccess&&a.isSuccess&&(m=n?S(XIt,{exerciseId:c.data.id,language:e}):S(tPt,{exercise:c.data,language:e,variations:p,setEditMode:r})),Q(Tt,{children:[c.isSuccess&&a.isSuccess&&S(Gu,{children:S(uPt,{exercise:c.data,languages:a.data,changeLanguage:f,language:e,setEditMode:r,editMode:n})}),S(vi,{}),Q(Gu,{maxWidth:"lg",children:[c.isLoading&&a.isLoading&&S(Qa,{}),m]})]})};function fme(e){const[t]=je(),[n,r,o]=us(e.fieldName),[i,a]=x.useState(""),s=u=>{o.setValue(n.value.filter((f,p)=>p!==u))},l=(u,f)=>{n.value[u]=f,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return Q(Tt,{children:[S(me,{size:12,children:S(dn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:S(So,{position:"end",children:S(pn,{onClick:c,children:S(Eo,{})})})}})}),n.value.map((u,f)=>S(dn,{fullWidth:!0,value:u,onChange:p=>l(f,p.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:S(So,{position:"end",children:S(pn,{onClick:()=>s(f),children:S(RP,{})})})}},f))]})}const fPt=({onContinue:e,onBack:t})=>{const[n]=je(),[r,o]=Qv(),i=Ko({description:HH(n),notes:Qhe(n)});return S(Oi,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(lIt(a.description)),o(cIt(a.notes)),e()},children:S(pi,{children:Q(Ft,{children:[S(UH,{fieldName:"description"}),S(vi,{}),S(fme,{fieldName:"notes"}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Xt,{sx:{mb:2},children:Q("div",{children:[S(ct,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},pPt=({onContinue:e,onBack:t})=>{const[n]=je(),r=Qc(),[o,i]=Qv(),[a,s]=x.useState(o.languageId!==null),l=Ko(a?{description:HH(n),name:zH(n),alternativeNames:VH(n),notes:Qhe(n),language:ko().required()}:{});return S(Oi,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(dIt(c.name)),i(fIt(c.description)),i(hIt(c.alternativeNames)),i(SIt(c.language===""?null:c.language)),i(pIt(c.notes)),e()},children:c=>Q(pi,{children:[Q(Ft,{spacing:2,children:[S(Mx,{children:S(os,{checked:a,onClick:()=>s(!a),control:S(Wo,{}),label:n("exercises.translateExerciseNow")})}),a&&Q(Tt,{children:[r.isLoading?S(Xt,{children:S(Qa,{})}):Q(jh,{fullWidth:!0,children:[S(Bh,{id:"label-language",children:n("language")}),S(jf,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==Sh).map(u=>Q(Zt,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),S(BH,{fieldName:"name"}),S(jH,{fieldName:"alternativeNames"}),S(UH,{fieldName:"description"}),S(vi,{}),S(fme,{fieldName:"notes"})]})]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Xt,{sx:{mb:2},children:Q("div",{children:[S(ct,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function hPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function mPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function gPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function yPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function vPt(e){const[t]=je(),[n,r]=us(e.fieldName);return S(dn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function bPt(e){const[t]=je(),[n,r]=x.useState(Eu.PHOTO),[o,i,a]=us(e.fieldName);return Q(UMe,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[S(Zb,{value:Eu.PHOTO,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Kst,{}),S(at,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),S(Zb,{value:Eu.THREE_D,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Vst,{}),S(at,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),S(Zb,{value:Eu.LINE_ART,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Hst,{}),S(at,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),S(Zb,{value:Eu.LOW_POLY,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Ust,{}),S(at,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),S(Zb,{value:Eu.OTHER,children:Q(Ft,{justifyContent:"center",alignItems:"center",children:[S(Gst,{}),S(at,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const xPt=({onContinue:e,onBack:t})=>{const[n]=je(),r=Ra(),[o,i]=Qv(),[a,s]=x.useState(o.images),[l,c]=x.useState(void 0),[u,f]=J.useState(!1),p=()=>f(!1);x.useEffect(()=>{i(wIt(a))},[i,a]);const m=C=>{var O;if(!((O=C.target.files)!=null&&O.length))return;const[E]=C.target.files,I=URL.createObjectURL(E);f(!0),c({url:I,file:E,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:Eu.PHOTO.toString()})},g=C=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:C.author,authorUrl:C.authorUrl,title:C.title,derivativeSourceUrl:C.derivativeSourceUrl,objectUrl:C.objectUrl,style:C.imageStyle.toString()})),p()},y=C=>{const E=a.filter(I=>I.url!==C);s(E)},v=()=>{e()};return Q("div",{children:[S(cv,{open:u,onClose:p,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(Xt,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[S(at,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),Q(me,{container:!0,spacing:2,children:[S(me,{size:4,children:l&&S("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),S(me,{size:8,children:S(Oi,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:Eu.PHOTO},onSubmit:C=>{console.log(C),g(C)},children:C=>Q(pi,{children:[Q(Ft,{spacing:2,children:[S(vPt,{fieldName:"title"}),S(yPt,{fieldName:"objectUrl"}),S(hPt,{fieldName:"author"}),S(mPt,{fieldName:"authorUrl"}),S(gPt,{fieldName:"derivativeSourceUrl"}),S(bPt,{fieldName:"imageStyle"}),Q(Ei,{icon:S(rde,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",S("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),S(Ft,{direction:"row",justifyContent:"end",sx:{mt:2},children:S(ct,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),S(at,{children:n("exercises.compatibleImagesCC")}),Q(Ft,{direction:"row",justifyContent:"center",children:[Q("div",{children:[S("label",{htmlFor:"camera-input",children:S(Mst,{fontSize:"large",sx:{m:2}})}),S("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:m})]}),Q("div",{children:[S("label",{htmlFor:"image-input",children:S(Nst,{fontSize:"large",sx:{m:2}})}),S("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:m})]})]}),S(wne,{cols:3,style:{maxHeight:"400px"},children:a.map(C=>Q(Cne,{children:[S("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:C.url,alt:"",loading:"lazy"}),S(VOe,{title:C.title,subtitle:C.author,actionIcon:S(pn,{onClick:()=>y(C.url),sx:{color:"white"},children:S(Fst,{})})})]},C.url))}),S(at,{children:n("forms.supportedImageFormats")}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Xt,{sx:{mb:2},children:Q(Tt,{children:[S(ct,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),S(ct,{variant:"contained",onClick:v,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},SPt="exercisecomment",Oee=async e=>{const t=new Dre,n=ft(SPt),r=await it.post(n,t.toJson(e),{headers:ht()});return t.fromJson(r.data)},wPt="variation",CPt=async()=>{const e=ft(wPt);return(await it.post(e,{},{headers:ht()})).data.id},EPt=({onBack:e})=>{const[t,n]=je(),[r]=Qv(),o=sd(),i=kP(),a=Qc(),s=_v(),l=_P(),c=Ra(),[u,f]=x.useState("initial"),p=async()=>{f("loading");let g;r.newVariationExerciseId!==null?g=await CPt():g=r.variationId;const y=await v2e(r.category,r.equipment,r.muscles,r.musclesSecondary,g,c.data.username),v=await XN({exerciseId:y,languageId:Sh,name:r.nameEn,description:r.descriptionEn,author:c.data.username});for(const w of r.alternativeNamesEn)await JN(v.id,w);for(const w of r.images)await Bre({exerciseId:y,image:w.file,imageData:w});for(const w of r.notesEn)await Oee(new KN(null,v.id,w));if(r.languageId!==null){const w=await XN({exerciseId:y,languageId:r.languageId,name:r.nameI18n,description:r.descriptionI18n,author:c.data.username});for(const C of r.alternativeNamesI18n)await JN(w.id,C);for(const C of r.notesI18n)await Oee(new KN(null,w.id,C))}console.log("Exercise created"),f("done")},m=()=>{o(on(Yt.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?S(Er,{}):Q(Tt,{children:[S(at,{variant:"h6",children:t("exercises.step1HeaderBasics")}),S(jc,{children:S(Lc,{children:Q(Fc,{children:[Q(cn,{children:[S(ke,{children:t("name")}),S(ke,{children:r.nameEn})]}),Q(cn,{children:[S(ke,{children:t("exercises.alternativeNames")}),S(ke,{children:r.alternativeNamesEn.join(", ")})]}),Q(cn,{children:[S(ke,{children:t("description")}),S(ke,{children:r.descriptionEn})]}),Q(cn,{children:[S(ke,{children:t("exercises.notes")}),S(ke,{children:r.notesEn.map(g=>Q(Tt,{children:[g,S("br",{})]}))})]}),Q(cn,{children:[S(ke,{children:t("category")}),S(ke,{children:i.data.find(g=>g.id===r.category).translatedName})]}),Q(cn,{children:[S(ke,{children:t("exercises.equipment")}),S(ke,{children:r.equipment.map(g=>l.data.find(y=>y.id===g).translatedName).join(", ")})]}),Q(cn,{children:[S(ke,{children:t("exercises.muscles")}),S(ke,{children:r.muscles.map(g=>s.data.find(y=>y.id===g).getName()).join(", ")})]}),Q(cn,{children:[S(ke,{children:t("exercises.secondaryMuscles")}),S(ke,{children:r.musclesSecondary.map(g=>s.data.find(y=>y.id===g).getName()).join(", ")})]}),Q(cn,{children:[S(ke,{children:t("exercises.variations")}),Q(ke,{children:[r.variationId," / ",r.newVariationExerciseId]})]})]})})}),r.images.length>0&&S(wne,{cols:3,style:{maxHeight:"200px"},children:r.images.map(g=>S(Cne,{children:S("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:g.url,alt:"",loading:"lazy"})},g.url))}),r.languageId!==null&&Q(Tt,{children:[S(at,{variant:"h6",sx:{mt:3},children:a.data.find(g=>g.id===r.languageId).nameLong}),S(jc,{children:S(Lc,{children:Q(Fc,{children:[Q(cn,{children:[S(ke,{children:t("name")}),S(ke,{children:r.nameI18n})]}),Q(cn,{children:[S(ke,{children:t("exercises.alternativeNames")}),S(ke,{children:r.alternativeNamesI18n.join(", ")})]}),Q(cn,{children:[S(ke,{children:t("description")}),S(ke,{children:r.descriptionI18n})]}),Q(cn,{children:[S(ke,{children:t("exercises.notes")}),S(ke,{children:r.notesI18n.map(g=>Q(Tt,{children:[g,S("br",{})]}))})]})]})})})]}),u!=="done"?S(Ei,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):Q(Ei,{severity:"success",sx:{mt:2},children:[S(hh,{children:t("success")}),t("exercises.cacheWarning")]}),S(me,{container:!0,children:S(me,{display:"flex",justifyContent:"end",size:12,children:S(Xt,{sx:{mb:2},children:Q("div",{children:[u!=="done"&&S(ct,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&S(ct,{variant:"contained",disabled:u!=="initial",onClick:p,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&Q(ct,{variant:"contained",onClick:m,sx:{mt:1,mr:1},color:"success",children:[t("overview"),S(qst,{})]})]})})})})]})},TPt=()=>{const[e]=je(),[t,n]=J.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return S(EIt,{children:Q(Gu,{maxWidth:"md",children:[S(Ft,{direction:"row",children:S(at,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),S(Xt,{children:Q(TAe,{activeStep:t,orientation:"vertical",children:[Q(Hm,{children:[S(Mp,{children:e("exercises.step1HeaderBasics")}),S(Um,{children:S(TIt,{onContinue:r,onBack:o})})]},1),Q(Hm,{children:[S(Mp,{children:e("exercises.variations")}),S(Um,{children:S(IIt,{onContinue:r,onBack:o})})]},2),Q(Hm,{children:[S(Mp,{children:e("description")}),S(Um,{children:S(fPt,{onContinue:r,onBack:o})})]},3),Q(Hm,{children:[S(Mp,{children:e("translation")}),S(Um,{children:S(pPt,{onContinue:r,onBack:o})})]},4),Q(Hm,{children:[S(Mp,{children:e("images")}),S(Um,{children:S(xPt,{onContinue:r,onBack:o})})]},5),Q(Hm,{children:[S(Mp,{children:e("overview")}),S(Um,{children:S(EPt,{onBack:o})})]},6)]})})]})})},OPt=()=>{const[e]=je(),t=GH();return Q(Gu,{maxWidth:"md",children:[S(at,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),Q(Xt,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[S(at,{mb:2,children:e("exercises.notEnoughRights",{days:o2e})}),!t.anonymous&&!t.emailVerified&&S(ct,{variant:"contained",href:"/user/preferences",endIcon:S(Ist,{}),children:e("preferences")})]})]})},IPt=()=>{const e=GH();return S(Tt,{children:e.canContribute?S(TPt,{}):S(OPt,{})})},PPt=()=>S("div",{children:"Add Weight Page"}),APt=({day:e,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})=>{const i=Lr(),a=If(i.breakpoints.down("sm")),s=If(i.breakpoints.down("md")),l=xa(e.date,r.date),c=xa(e.date,n),u=e.date.getTime()<=n.getTime(),f=e.date.getDay()===6||e.date.getDay()===0,p=()=>l||c?"white":u?f?"#E53945":"black":"gray",m=()=>a?35:s?40:50,g=()=>a?8:s?9:10,y=()=>e.measurements.length>0||e.weightEntry!==void 0||e.workoutSession!==void 0,v=()=>{u&&o(e)},w=m(),C=g();return Q("div",{style:{position:"relative",width:`${w}px`,height:`${w+C/2}px`,display:"flex",flexDirection:"column",alignItems:"center"},children:[S("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:`${w}px`,height:`${w}px`,fontSize:a?"0.8rem":s?"0.9rem":"1rem",color:l||c?"white":p(),backgroundColor:l?"#E53945":c?"#FEC107":"transparent",borderRadius:"50%",fontWeight:"bold",cursor:u?"pointer":"default",opacity:e.date.getMonth()!==t?.25:1},"data-testid":`day-${Zn(e.date)}`,onClick:v,children:e.date.getDate()}),y()&&S("div",{style:{width:`${C}px`,height:`${C}px`,backgroundColor:"black",borderRadius:"50%",position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",zIndex:2}})]})},MPt=({days:e,currentMonth:t,currentDate:n,selectedDay:r,onDayClick:o})=>{const{i18n:i}=je(),a=Array.from({length:7},(s,l)=>new Date(1970,0,l+5).toLocaleString(i.language,{weekday:"short"}));return Q(me,{container:!0,spacing:1,rowSpacing:2,children:[a.map((s,l)=>S(me,{size:12/7,children:S(at,{variant:"body1",sx:{fontWeight:"bold",textAlign:"center"},children:s})},`weekday-${l}`)),e.map((s,l)=>S(me,{size:12/7,sx:{display:"flex",justifyContent:"center"},children:S(APt,{day:s,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})},`day-${l}`))]})},RPt=({currentMonth:e,currentYear:t,onPrevMonth:n,onNextMonth:r})=>{const{i18n:o}=je(),i=Array.from({length:12},(a,s)=>new Date(2024,s,1).toLocaleString(o.language,{month:"long"}));return Q("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:"3%"},children:[S(ct,{variant:"outlined",onClick:n,children:"<"}),Q(at,{variant:"h5",children:[i[e]," ",t]}),S(ct,{variant:"outlined",onClick:r,children:">"})]})};class DPt{constructor(t,n,r,o){this.name=t,this.unit=n,this.value=r,this.date=o}}const kPt=({selectedDay:e})=>{const[t]=je(),[n,r]=J.useState(!1),[o,i]=J.useState(!1),[a,s]=J.useState(!1);return Q(ho,{sx:{width:{xs:"auto",md:"45%"},height:{xs:"60%",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2}},children:[S(Zl,{title:Q(at,{variant:"h5",component:"div",sx:{fontWeight:"bold"},children:[t("entries")," - ",e.date.toLocaleDateString()]})}),S(ji,{sx:{flex:1,height:"100%",overflow:"auto",display:"flex",flexDirection:"column",gap:2},children:Q(ai,{children:[e.weightEntry&&S(Co,{children:S(Wr,{primary:t("weight"),secondary:e.weightEntry.weight.toFixed(1),sx:{pl:2}})}),e.measurements.length===1&&S(Co,{children:S(Wr,{primary:t("measurements.measurements"),secondary:`${e.measurements[0].name}: ${e.measurements[0].value} ${e.measurements[0].unit}`,sx:{pl:2}})}),e.measurements.length>1&&Q(Tt,{children:[S(Co,{children:Q(Bl,{onClick:()=>r(!n),selected:n,children:[S(Wr,{primary:t("measurements.measurements")}),n?S(J0,{}):S(ku,{})]})}),S(aa,{in:n,timeout:"auto",unmountOnExit:!0,children:S(ai,{sx:{pl:4,pt:0},children:e.measurements.map((l,c)=>S(Co,{dense:!0,children:S(Wr,{primary:l.name,secondary:`${l.value} ${l.unit}`})},c))})})]}),e.workoutSession&&Q(Tt,{children:[S(Co,{children:Q(Bl,{onClick:()=>i(!o),selected:o,children:[S(Wr,{primary:t("routines.workoutSession"),secondary:e.workoutSession.textRepresentation,sx:{"& .MuiListItemText-secondary":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}),o?S(J0,{}):S(ku,{})]})}),S(aa,{in:o,timeout:"auto",unmountOnExit:!0,children:S(ai,{sx:{pl:4,pt:0},children:e.workoutSession.logs.map((l,c)=>{var u;return S(Co,{dense:!0,children:S(Wr,{primary:(u=l.exerciseObj)==null?void 0:u.getTranslation().name,secondary:`${l.repetitions} × ${l.weight} `})},c)})})})]}),e.nutritionLogs.length>0&&Q(Tt,{children:[S(Co,{children:Q(Bl,{onClick:()=>s(!a),selected:a,children:[S(Wr,{primary:t("nutrition.nutritionalDiary")}),a?S(J0,{}):S(ku,{})]})}),S(aa,{in:a,timeout:"auto",unmountOnExit:!0,children:S(ai,{sx:{pl:4,pt:0},children:e.nutritionLogs.map((l,c)=>{var u;return S(Co,{dense:!0,children:S(Wr,{primary:(u=l.ingredient)==null?void 0:u.name,secondary:`${l.amount} ${t("nutrition.gramShort")}`})},c)})})})]})]})})]})},_Pt=()=>{const[e]=je(),t=new Date,[n,r]=x.useState(t.getMonth()),[o,i]=x.useState(t.getFullYear()),a=new Date(o,n,1),s=new Date(o,n+1,0),l=Bw(),c=wst({filtersetQuerySessions:{date__gte:Zn(a),date__lte:Zn(s)},filtersetQueryLogs:{date__gte:Zn(a),date__lte:Zn(s)}}),u=_de({filtersetQueryEntries:{date__gte:Zn(a),date__lte:Zn(s)}}),f=rFe({filtersetQuery:{datetime__gte:Zn(a),datetime__lte:Zn(s)}}),p=l.isLoading||c.isLoading||u.isLoading||f.isLoading,m=l.isSuccess&&c.isSuccess&&u.isSuccess&&f.isSuccess,g=u.data,y=(g==null?void 0:g.flatMap(A=>A.entries.map(_=>new DPt(A.name,A.unit,_.value,_.date))))??[],v=(A,_)=>{var W,K,G;const N=new Date(A,_,1),B=[];let j=new Date(A,_,1).getDay();j=j===0?6:j-1;for(let q=0;q<j;q++)B.push({date:new Date(A,_,-j+q+1),weightEntry:void 0,measurements:[],nutritionLogs:[],workoutSession:void 0});for(;N.getMonth()===_;)B.push({date:new Date(N),weightEntry:(W=l.data)==null?void 0:W.find(q=>xa(q.date,N)),measurements:y.filter(q=>xa(q.date,N))||[],workoutSession:((K=c.data)==null?void 0:K.find(q=>xa(q.date,N)))||void 0,nutritionLogs:((G=f.data)==null?void 0:G.filter(q=>xa(q.datetime,N)))||[]}),N.setDate(N.getDate()+1);j=new Date(A,_+1,0).getDay();const V=j===0?0:7-j;for(let q=1;q<=V;q++)B.push({date:new Date(A,_+1,q),weightEntry:void 0,workoutSession:void 0,measurements:[],nutritionLogs:[]});return B},w={date:t,weightEntry:void 0,workoutSession:void 0,measurements:[],nutritionLogs:[]},C=x.useMemo(()=>v(o,n),[o,n,l.data,c.data,u.data,f.data]),[E,I]=x.useState(C.find(A=>xa(A.date,t))||w),O=Lr(),P=If(O.breakpoints.down("sm"));x.useEffect(()=>{if(m){const A=C.find(_=>xa(_.date,t));A&&I(A)}},[m]),x.useEffect(()=>{r(E.date.getMonth()),i(E.date.getFullYear())},[E]);const R=A=>{I(A)},D=()=>{n===0?(r(11),i(o-1)):r(n-1)},M=()=>{(n<t.getMonth()||o<t.getFullYear())&&(n===11?(r(0),i(o+1)):r(n+1))};return Q(Xt,{sx:{display:"flex",gap:2,flexDirection:{xs:"column",md:"row"},height:{xs:"auto",md:"calc(100vh - 130px)"},width:"100%"},children:[Q(ho,{sx:{width:{xs:"auto",md:"65%"},height:{xs:"auto",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2},display:"flex",flexDirection:"column"},children:[S(Zl,{sx:{"& .MuiCardHeader-content":{width:"100%"}},title:S("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:Q("div",{style:{display:"flex",alignItems:"center",marginBottom:"16px"},children:[S(Ast,{style:{width:P?"28px":"32px",height:P?"28px":"32px",marginRight:"12px"}}),S("span",{style:{fontSize:P?"1.5rem":"1.8rem",fontWeight:"bold"},children:e("calendar")})]})})}),Q(ji,{sx:{overflow:"auto",flex:1,"&:last-child":{paddingBottom:2}},children:[S(RPt,{currentMonth:n,currentYear:o,onPrevMonth:D,onNextMonth:M}),S(MPt,{days:C,currentMonth:n,currentDate:t,selectedDay:E,onDayClick:R})]})]}),p&&S(ho,{sx:{width:{xs:"auto",md:"65%"},height:{xs:"60%",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2}},children:S(Er,{})}),m&&S(kPt,{selectedDay:E})]})},$Pt=()=>S("div",{children:S(_Pt,{})}),NPt=()=>S("div",{children:"Calories Calculator Page"}),LPt=()=>S("div",{children:"Equipments Page"}),FPt=()=>S("div",{children:"Ingredients Page"}),jPt=()=>S("div",{children:"Login Page"}),BPt=()=>S("div",{children:"Preferences Page"}),zPt=()=>S("div",{children:"RestApi Page"}),VPt=({weight:e})=>{const t=Nct(),[n]=je(),[r,o]=J.useState(null),[i,a]=J.useState(!1),s=!!r,l=g=>{o(g.currentTarget)},c=()=>{u(),p()},u=()=>{o(null)},f=()=>{t.mutate(e.id),o(null)},p=()=>a(!0),m=()=>a(!1);return Q("div",{children:[S(ct,{onClick:l,children:S(Tst,{})}),Q(ss,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[S(Zt,{onClick:c,children:n("edit")}),S(Zt,{onClick:f,children:n("delete")})]}),S(di,{title:n("edit"),isOpen:i,closeFn:m,children:S(Lv,{weightEntry:e,closeFn:m})})]})},HPt=()=>{const[e]=je(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Zu,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(Lv,{closeFn:o})})]})},UPt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),GPt="WeightTable",pme={table:`${GPt}-table`},qPt=ae("div")(({theme:e})=>({[`&.${pme.table}`]:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),WPt=({weights:e})=>{const t=[10,50,100],[n]=je(),r=UPt(e),[o,i]=x.useState(t[0]),[a,s]=x.useState(0),l=(u,f)=>{s(f)},c=u=>{i(parseInt(u.target.value,10)),s(0)};return Q(qPt,{className:pme.table,children:[Q(jc,{children:[Q(Lc,{sx:{minWidth:650},"aria-label":"simple table",children:[S(Bf,{children:Q(cn,{children:[S(ke,{align:"center",children:n("date")}),S(ke,{align:"center",children:n("weight")}),S(ke,{align:"center",children:n("difference")}),S(ke,{align:"center",children:n("days")}),S(ke,{align:"center"})]})}),S(Fc,{children:r.slice(a*o,a*o+o).map(u=>Q(cn,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[S(ke,{component:"th",scope:"row",align:"center",children:u.entry.date.toLocaleDateString()}),S(ke,{align:"center",children:u.entry.weight}),S(ke,{align:"center",children:+u.change.toFixed(2)}),S(ke,{align:"center",children:u.days}),S(ke,{align:"center",children:S(VPt,{weight:u.entry})})]},u.entry.date.toLocaleDateString()))})]}),S(Fne,{rowsPerPageOptions:t,component:"div",count:r.length,rowsPerPage:o,page:a,onPageChange:l,onRowsPerPageChange:c})]}),S(HPt,{})]})},KPt=()=>{const[e]=je(),[t,n]=x.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[S(Zu,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:S(Eo,{})}),S(di,{title:e("add"),isOpen:t,closeFn:o,children:S(Lv,{closeFn:o})})]})},YPt=({currentFilter:e,onFilterChange:t})=>{const[n]=je(),r=Lr(),o=i=>{e!==i&&t(i)};return Q(lB,{variant:"outlined",sx:{mb:2},children:[S(ct,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),S(ct,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),S(ct,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),S(ct,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),S(ct,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},QPt=()=>{const[e]=je(),[t,n]=x.useState("lastYear"),r=Bw(t),o=i=>{n(i)};return r.isLoading?S(Er,{}):S(ds,{title:e("weight"),mainContent:Q(Ft,{spacing:2,children:[S(YPt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&S(zh,{}),r.data.length!==0&&Q(Tt,{children:[S(Ide,{weights:r.data}),S(Xt,{sx:{mt:4}}),S(WPt,{weights:r.data})]})]}),fab:S(KPt,{})})},XPt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),S(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:S(Zt,{component:Do,to:on(Yt.WEIGHT_OVERVIEW,e.language),children:"Weight overview"})})]})},JPt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),S(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:S(Zt,{component:Do,to:on(Yt.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},ZPt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),S(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:S(Zt,{component:Do,to:on(Yt.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},eAt=()=>{const{i18n:e}=je(),[t,n]=J.useState(null);return Q(Tt,{children:[S(ct,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),Q(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[S(Zt,{component:Do,to:on(Yt.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),S(Zt,{component:Do,to:on(Yt.PRIVATE_TEMPLATE_OVERVIEW,e.language),children:"Private template overview"}),S(Zt,{component:Do,to:on(Yt.PUBLIC_TEMPLATE_OVERVIEW,e.language),children:"Public template overview"}),S(Zt,{component:Do,to:on(Yt.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),S(Zt,{component:Do,to:on(Yt.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"}),S(Zt,{component:Do,to:on(Yt.CALENDAR,e.language),children:"Calendar"})]})]})},tAt=()=>S(zwe,{position:"static",children:Q($ne,{children:[S(at,{variant:"h6",component:"div",mr:3,children:"wger"}),S(eAt,{}),S(XPt,{}),S(JPt,{}),S(ZPt,{})]})}),nAt=()=>S(QPt,{}),q$=()=>S(dPt,{}),qH=()=>Q(Zlt,{children:[Q(qt,{path:"/:lang",children:[Q(qt,{path:"routine",children:[S(qt,{index:!0,element:S(vee,{})}),S(qt,{path:"overview",element:S(vee,{})}),S(qt,{path:"calendar",element:S($Pt,{})}),S(qt,{path:"add",element:S(awt,{})}),Q(qt,{path:":routineId",children:[S(qt,{path:"day/:dayId",children:S(qt,{path:"add-logs",element:S(FOt,{})})}),Q(qt,{path:"edit",children:[S(qt,{index:!0,element:S($Ot,{})}),S(qt,{path:"progression/:slotId",element:S(jOt,{})})]}),S(qt,{path:"view",element:S(lwt,{})}),S(qt,{path:"table",element:S(uwt,{})}),S(qt,{path:"logs",element:S(GOt,{})}),S(qt,{path:"statistics",element:S(YOt,{})})]}),Q(qt,{path:"templates",children:[S(qt,{path:":routineId",children:S(qt,{path:"view",element:S(BOt,{})})}),Q(qt,{path:"overview",children:[S(qt,{path:"private",element:S(ZOt,{})}),S(qt,{path:"public",element:S(eIt,{})})]})]})]}),Q(qt,{path:"measurement",children:[S(qt,{index:!0,element:S(IZ,{})}),S(qt,{path:"overview",element:S(IZ,{})}),S(qt,{path:"category/:categoryId",element:S($St,{})})]}),Q(qt,{path:"exercise",children:[S(qt,{index:!0,element:S(sJ,{})}),S(qt,{path:"overview",element:S(sJ,{})}),S(qt,{path:":exerciseId",element:S(q$,{}),children:S(qt,{path:"view",element:S(q$,{}),children:S(qt,{path:":slug",element:S(q$,{})})})}),S(qt,{path:"contribute",element:S(IPt,{})})]}),Q(qt,{path:"weight",children:[S(qt,{path:"overview",element:S(nAt,{})}),S(qt,{path:"add",element:S(PPt,{})})]}),Q(qt,{path:"nutrition",children:[S(qt,{path:"overview",element:S(JSt,{})}),Q(qt,{path:":planId",children:[S(qt,{path:"view",element:S(XSt,{})}),S(qt,{path:":date",element:S(PZ,{})}),S(qt,{path:"diary",element:S(PZ,{})})]}),Q(qt,{path:"calculator",children:[S(qt,{path:"bmi",element:S(FSt,{})}),S(qt,{path:"calories",element:S(NPt,{})})]}),S(qt,{path:"ingredient",children:S(qt,{path:"overview",element:S(FPt,{})})})]}),Q(qt,{path:"software",children:[S(qt,{path:"about-us",element:S(tIt,{})}),S(qt,{path:"api",element:S(zPt,{})}),S(qt,{path:"equipment",element:S(LPt,{})})]}),S(qt,{path:"login",element:S(jPt,{})}),S(qt,{path:"user",children:S(qt,{path:"preferences",element:S(BPt,{})})})]}),S(qt,{path:"/",element:S(Yct,{})}),S(qt,{path:"*",element:S("main",{style:{padding:"1rem"},children:S("p",{children:"404, Page NOT FOUND"})})})]}),rAt="_notification_bbb61_1",Iee={notification:rAt},oAt=()=>{const[e,t]=aIt(),n=()=>{t(bee({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(bee({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?Q(Ei,{className:Iee.notification,severity:e.notification.severity,action:S(ct,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[S(hh,{children:e.notification.title}),S("strong",{children:e.notification.message})]}):Q(Ei,{className:Iee.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[S(hh,{children:e.notification.title}),S("strong",{children:e.notification.message})]}):null};function iAt(){return Q(me,{container:!0,children:[S(me,{size:12,children:S(tAt,{})}),S(me,{size:12,children:S(oAt,{})}),S(me,{size:12,children:S(qH,{})})]})}const Xv=new Hxe({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),aAt=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=Jee({key:"css",prepend:!0,container:o});tm.createRoot(r).render(S(fve,{value:a,children:S(x.Suspense,{fallback:S(Qa,{}),children:S(BV,{children:S(Fh,{theme:_St(r),children:S(sv,{client:Xv,children:S(qH,{})})})})})}))},Pee=document.getElementById("root");Pee&&tm.createRoot(Pee).render(S(J.StrictMode,{children:S(x.Suspense,{fallback:S(Qa,{}),children:S(BV,{children:S(Fh,{theme:nm,children:Q(sv,{client:Xv,children:[S(iAt,{}),S(lSe,{})]})})})})}));const Aee=document.getElementById("react-page-no-shadow-dom");Aee&&tm.createRoot(Aee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(BV,{children:S(Fh,{theme:nm,children:S(sv,{client:Xv,children:S(qH,{})})})})}));aAt("react-page");const Mee=document.getElementById("react-weight-dashboard");Mee&&tm.createRoot(Mee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Fh,{theme:nm,children:S(sv,{client:Xv,children:S(Pde,{})})})}));const Ree=document.getElementById("react-nutrition-dashboard");Ree&&tm.createRoot(Ree).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Fh,{theme:nm,children:S(sv,{client:Xv,children:S(que,{})})})}));const Dee=document.getElementById("react-routine-dashboard");Dee&&tm.createRoot(Dee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Fh,{theme:nm,children:S(sv,{client:Xv,children:S(Tde,{})})})}));const kee=document.getElementById("react-ingredient-search");kee&&tm.createRoot(kee).render(S(x.Suspense,{fallback:S(Qa,{}),children:S(Fh,{theme:nm,children:S(Uct,{})})}));export{p1 as c,Gn as g};